State detection equipment, state detection method and state detection device of mechanical switch
By installing a color block array and synchronously moving color block pointers on the mechanical switch, and constructing a grayscale matrix by combining a camera device and a processor, the shortcomings of manual inspection and mechanical sensors in mechanical switch detection are solved, achieving high-precision and low-cost state detection.
Patent Information
- Application Number
- CN202511770561.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-02-13
AI Technical Summary
Fault detection of existing mechanical switches relies on manual inspection and mechanical sensors, which is inefficient and susceptible to interference from high-voltage and strong electromagnetic environments, leading to false alarms and reduced reliability.
Using a color block array and synchronously moving color block pointers, images are captured by a camera device and a grayscale matrix is constructed using a processor. The state of the mechanical switch is determined based on the grayscale features.
It achieves high-precision, non-contact mechanical switch status detection, reduces human error, improves the accuracy and response speed of fault detection, and has a low cost.
Smart Images

Figure CN121521860A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electric power, in particular to a mechanical switch state detection device, a mechanical switch state detection method and a mechanical switch state detection apparatus. BACKGROUND
[0002] At present, in the electric power system, the reliable operation of the mechanical switch as a key electrical equipment is directly related to the power supply safety and system stability. The fault detection of the traditional mechanical switch mainly relies on manual inspection and mechanical sensors. However, in the high-voltage strong electromagnetic environment, manual inspection relies on experience judgment, which is low in efficiency and easy to miss judgment due to subjective factors. Moreover, due to the interference of the high-voltage strong electromagnetic environment, the mechanical sensor is prone to false reporting and reduced reliability, and is inconvenient to install and maintain.
[0003] Therefore, there is an urgent need for a non-contact, high-precision and real-time feedback mechanical switch mechanical state detection scheme to solve the problems of the prior art. SUMMARY
[0004] Therefore, the present application provides a mechanical switch state detection device, a mechanical switch state detection method and a mechanical switch state detection apparatus to solve the problems of the prior art.
[0005] According to one aspect of the present application, a mechanical switch state detection device is provided, comprising: a color block array comprising at least two color blocks of different colors, the color blocks being installed in parallel and insulated with respect to the static contact of the mechanical switch along the movement direction of the moving contact of the mechanical switch, the colors of adjacent color blocks being grayscale contrast colors; a color block pointer comprising a main body and a pointer head connected thereto, the main body being coaxial and parallel and insulated with respect to the moving contact of the mechanical switch so that the main body and the moving contact move synchronously, the surface of the pointer head being coated with the at least two different colors in sequence, the pointer head being correspondingly arranged with the color block array so that the pointer head can shield part of the color blocks; a camera device for shooting an image containing the pointer head and the color block array after the mechanical switch completes a closing operation; a processor electrically connected to the camera device, the processor executing the following steps when executing a program: extracting the grayscale value of the area where the color block array is located in the image; constructing a grayscale matrix based on the number of the at least two different colors and the grayscale value; determining the mechanical state of the mechanical switch based on the target number of rows of the grayscale matrix corresponding to the grayscale feature of the pointer head.
[0006] Optionally, the length of the area with different colors on the surface of the pointer head is the same.
[0007] Optionally, the color blocks of the at least two different colors are black color blocks and white color blocks.
[0008] Optionally, the width of the pointer head is less than the width of the color block.
[0009] According to another aspect of the present application, a mechanical switch state detection method is provided, comprising: acquiring an image containing a pointer head and a color block array after the mechanical switch completes a closing operation, wherein the color block array comprises color blocks of at least two different colors, the color blocks are insulatively installed along a moving direction of a moving contact of the mechanical switch and parallel to a static contact of the mechanical switch, a surface of the pointer head is coated with the at least two different colors in sequence, and the pointer head and the moving contact move synchronously; extracting a gray value of a region where the color block array is located in the image; constructing a gray matrix based on the number of the at least two different colors and the gray value; determining a mechanical state of the mechanical switch based on a target row number of the gray feature corresponding to the pointer head in the gray matrix.
[0010] Optionally, the determining of the mechanical state of the mechanical switch based on the target row number of the gray feature corresponding to the pointer head in the gray matrix comprises: comparing the target row number with different row number intervals; if the target row number is located in a first row number interval, determining that the mechanical switch is in a relaxed state; if the target row number is located in a second row number interval, determining that the mechanical switch is in a normal state; if the target row number is located in a third row number interval, determining that the mechanical switch is in a stuck state; wherein the second row number interval is configured based on a row number of the color block corresponding to the pointer head in the color block array when the moving contact of the mechanical switch in the normal state contacts the static contact, the minimum value of the first row number interval is greater than the maximum value of the second row number interval, and the maximum value of the third row number interval is less than the minimum value of the second row number interval.
[0011] Optionally, the constructing of the gray matrix based on the number of the at least two different colors and the gray value comprises: dividing the color block array region in the image into a grid composed of rows and columns based on the number of the color blocks in the color block array and the number of the at least two different colors; calculating a mean value or a median of the gray values of pixels in a grid unit in the grid, and mapping the mean value or the median as a feature value; combining the feature values based on an array arrangement order of the grid units to generate the gray matrix.
[0012] Optionally, the state detection method of the mechanical switch further comprises: matching the gray scale feature with feature values of each row in the gray scale matrix; determining the number of rows in the gray scale matrix that match the gray scale feature as the target number of rows.
[0013] Optionally, the number of the at least two different colors is 2, and the state detection method of the mechanical switch further comprises: performing binaryzation processing on the gray scale value.
[0014] According to another aspect of the present application, a state detection device of a mechanical switch is provided, comprising: an acquisition module configured to acquire an image containing a pointer head and a color block array after the mechanical switch completes a closing operation, wherein the color block array comprises color blocks of at least two different colors, the color blocks are installed in parallel with a static contact of the mechanical switch along a moving direction of a dynamic contact of the mechanical switch, a surface of the pointer head is coated with the at least two different colors in sequence, and the pointer head and the dynamic contact move synchronously; a gray scale processing module configured to extract a gray scale value of a region where the color block array is located in the image, and construct a gray scale matrix based on the number of the at least two different colors and the gray scale value; a state detection module configured to determine a mechanical state of the mechanical switch based on a target number of rows in the gray scale matrix corresponding to a gray scale feature of the pointer head.
[0015] Optionally, the state detection module is specifically configured to compare the target number of rows with different row number intervals, determine that the mechanical switch is in a relaxed state if the target number of rows is located in a first row number interval, determine that the mechanical switch is in a normal state if the target number of rows is located in a second row number interval, and determine that the mechanical switch is in a stuck state if the target number of rows is located in a third row number interval, wherein the second row number interval is configured based on a number of rows in the color block array corresponding to color blocks arranged on the pointer head and contacting the static contact of the mechanical switch in the normal state, a minimum value of the first row number interval is greater than a maximum value of the second row number interval, and a maximum value of the third row number interval is less than a minimum value of the second row number interval.
[0016] Optionally, the gray scale processing module is specifically configured to divide a region of the color block array in the image into a grid composed of rows and columns based on the number of color blocks in the color block array and the number of the at least two different colors, calculate a mean value or a median of gray scale values of pixels in a grid unit in the grid, and map the mean value or the median as a feature value, and generate the gray scale matrix based on an array arrangement order of the grid units.
[0017] Optionally, the state detection device of the mechanical switch further comprises: a matching module, configured to match the gray scale feature with feature values of each row in the gray scale matrix, and determine the number of rows in the gray scale matrix that match the gray scale feature as the target number of rows.
[0018] Optionally, the number of the at least two different colors is 2, and the gray scale processing module is further configured to perform binaryzation processing on the gray scale values.
[0019] According to still another aspect of the present application, a readable storage medium is provided, which stores a program or instructions, and the program or instructions are executed by a processor to implement the steps of the state detection method of the mechanical switch.
[0020] By means of the above technical solution, the displacement of the moving contact is converted into the relative position change of the pointer on the array, so that the quantitative measurement of the displacement is realized, and the faults such as jamming and looseness are accurately identified, and the subjective misjudgment of the manual is reduced. Moreover, the pointer heads of the color block array and the color block pointer are adjacent in gray scale contrast color, and a strong gray scale contrast is formed, so that the processor can quickly and accurately separate the pointer head from the background (the color block array). Thus, the relative position of the key components of the mechanical switch is detected with high precision and non-contact, and the mechanical fault states such as jamming and looseness can be effectively identified even in special environments, and the accuracy and response speed of fault detection are higher. Moreover, the existing mechanical switch can be easily adapted without the need for substantial modification of the equipment, and the detection cost is lower.
[0021] The above description is only a summary of the technical solutions of the present application. In order to more clearly understand the technical means of the present application, the specific embodiments of the present application can be implemented in accordance with the content of the description, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS
[0022] The accompanying drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings: Figure 1 Fig. 1 shows a structural schematic diagram of a state detection device of a mechanical switch provided by an embodiment of the present application; Figure 2 Fig. 2 shows a flow schematic diagram of a state detection method of a mechanical switch provided by an embodiment of the present application; Figure 3 Fig. 3 shows a structural block diagram of a state detection device of a mechanical switch provided by an embodiment of the present application.
[0023] Reference Signs: 110 patch array, 120 patch pointer, 121 body, 122 pointer head, 130 camera, 140 processor. DETAILED DESCRIPTION
[0024] Hereinafter, the present application will be described in detail with reference to the accompanying drawings and examples. It is to be noted that the examples and features in the examples of the present application can be combined with each other unless they conflict.
[0025] Examples of the embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, in which the same or similar components are denoted by the same or similar reference numerals throughout. The examples described below by reference to the accompanying drawings are exemplary and are for the purpose of explanation only and are not to be construed as limiting the present application.
[0026] It is to be understood by those skilled in the art that, as used in this application, the singular form "a", "an" and "the" include plural references unless the context clearly dictates otherwise. It should further be understood that the word "comprising" used in the specification of the present application means that there are features, integers, steps, operations, elements, and / or components present, but not excluding the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or there can be intervening elements present. In addition, "connected" or "coupled" as used herein can include wireless connection or wireless coupling. The word "and / or" as used herein includes all or any of the associated listed items, and all combinations thereof.
[0027] Exemplary embodiments according to the present application will now be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in various different forms and should not be construed as being limited to the embodiments set forth herein. It should be understood that the embodiments are provided so that the disclosure of the present application is complete and comprehensive, and the ideas of the exemplary embodiments are sufficiently conveyed to those of ordinary skill in the art.
[0028] In the present embodiment, a state detection device of a mechanical switch is provided, as shown in Figure 1 including a patch array 110, a patch pointer 120, a camera 130, and a processor 140.
[0029] Specifically, the color block array 110 includes at least two different colors of color blocks. The color blocks are installed parallel and insulated from the stationary contact of the mechanical switch along the direction of movement of the moving contact. Adjacent color blocks are contrasting grayscale colors to serve as fixed reference markers. The color block pointer 120 includes a connected body 121 and a pointer head 122. The body 121 is coaxial with and parallel to the moving contact of the mechanical switch, allowing the body 121 and the moving contact to move synchronously. The surface of the pointer head 122 is sequentially coated with at least two different colors. The pointer head 122 is correspondingly positioned with the color block array 110 so that it can partially obscure the color blocks. The camera device 130 is used to capture an image of the pointer head 122 and the color block array 110 after the mechanical switch has completed its closing action. The processor 140 is electrically connected to the camera device 130.
[0030] When the processor 140 executes the program, it performs the following steps: extracting the gray values of the area where the color block array is located in the image; constructing a gray matrix based on the number of at least two different colors and their gray values; and determining the mechanical state of the mechanical switch based on the target row number of the gray features corresponding to the pointer head in the gray matrix.
[0031] In this embodiment, since the pointer tip surface is also coated with multiple colors, when the pointer tip passes over a single-color block in the color block array, it can be ensured that at least one color on the pointer tip will form a clear contrast with the color block. Thus, after the camera device captures an image of the mechanical switch after it completes the closing action, the processor first extracts the grayscale values of the color block array area, and then constructs a two-dimensional grayscale matrix based on the types of colors (at least two) and grayscale values in the color block array, thereby digitizing the visual features. By utilizing the positional changes of the surface grayscale features in the matrix, the positional state of the moving contact relative to the stationary contact can be accurately reflected, and the rationality of the pointer tip's obstruction of the color block position can be analyzed to determine the mechanical state. This achieves high-precision, non-contact detection of the relative positions of key components of the mechanical switch, enabling indirect detection of mechanical switch jamming and loosening at a lower cost in confined indoor spaces, and better ensuring the safe operation of the grounding switch.
[0032] In one embodiment, in power systems and industrial control scenarios, mechanical switches can be grounding switches (e.g., grounding knives), circuit breakers, disconnect switches, contactors, etc.
[0033] It is worth mentioning that if the mechanical switch is a three-phase switch, corresponding pointers and color block arrays can be set for the moving and stationary contacts of each phase. Three camera devices can be deployed to capture color block array images of different phases respectively, or a camera device with a movable field of view can be used to sequentially capture color block array images of different phases. After the camera devices capture the color block array images of different phases, they are processed and analyzed by a processor.
[0034] In one embodiment, such as Figure 1As shown, the surface of the pointer head 122 has regions of different colors with the same length.
[0035] In this embodiment, the different color regions of the same length, that is, the pointer head is evenly divided according to different colors. The pointer head forms a regular gray scale alternating feature in the image, and the gray scale distribution has a fixed rule. On the one hand, during subsequent image processing, the feature confusion caused by uneven length of color regions is avoided, and the recognition speed and accuracy are improved. On the other hand, the range of the pointer head blocking the color block has a clear spatial meaning. Combined with the row and column division of the gray scale matrix, the target row number can be directly linearly related to the displacement distance of the moving contact, so as to accurately capture the slight displacement fluctuation through the change of the row number, and provide data support for accurate judgment of faults such as jamming and loosening.
[0036] In an embodiment, as shown in Figure 1 The at least two different color blocks are black color blocks and white color blocks.
[0037] In this embodiment, black (theoretical gray scale value 0) and white (theoretical gray scale value 255) are the most significant combination of gray scale difference in the RGB color space, and the gray scale value difference is close to the limit (255). This strong contrast makes the boundary profile of the color block array clear and sharp in the image, which can quickly distinguish the target region from the background, avoid the boundary blur caused by gray scale gradient, and ensure that the processor accurately extracts the gray scale value and constructs an unambiguous gray scale matrix, providing a reliable visual basis for the position positioning of the pointer head. Moreover, the optical properties of black and white are stable, and neither is prone to gray scale value drift caused by changes in ambient light, so they have higher adaptability to the environment, which can ensure the consistency and stability of the detection results under different working conditions.
[0038] In an embodiment, as shown in Figure 1 The width of the pointer head 122 is less than the width of the color block.
[0039] In this embodiment, when the width of the pointer head is less than the width of a single color block, only a local area of a single color block can be blocked at the same time, so that the gray scale feature has uniqueness, avoiding blocking multiple color blocks at a time and reducing the confusion of gray scale information in the image. In order to quickly match the unique target row number in the gray scale matrix, avoid the ambiguity of position recognition, and improve the detection efficiency and accuracy.
[0040] In an embodiment, the processor can include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface and application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor.
[0041] The processor can be installed in a computer device, which can be a personal computer, a server, a network device, etc.
[0042] Further, the computer device can further include a memory, a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface can include a display, an input unit such as a keyboard, etc. The optional user interface can further include a USB interface, a card reader interface, etc. The network interface can optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), etc.
[0043] Those skilled in the art can understand that the computer device structure provided in the embodiment does not constitute a limitation on the computer device, and can include more or fewer components, or combine certain components, or different component arrangements.
[0044] In the embodiment, a mechanical switch state detection method is provided, as shown in Figure 2 The method includes the following steps. Step 201: An image containing a pointer head and a color block array after the mechanical switch completes a closing action is acquired.
[0045] The color block array includes at least two color blocks of different colors, the color blocks are insulatively installed along the moving direction of a moving contact of the mechanical switch and parallel to a static contact of the mechanical switch, the surface of the pointer head is coated with at least two different colors in sequence, and the pointer head and the moving contact of the mechanical switch move synchronously.
[0046] In the embodiment, the mechanical switch performs a closing action once in response to a closing instruction, and the moving contact of the mechanical switch has been stationary after the closing action is completed. At this time, a static image containing the pointer head and the color block array can be captured by the camera device. Thus, the blur that can be generated in the moving process is completely avoided, and the judgment of the system is performed in a unified and consistent state every time.
[0047] It can be understood that whether the mechanical switch completes the closing action can be judged according to the time required for the closing action. For example, the mechanical switch requires 2s for the closing action in a normal state, the timing is started when the mechanical switch is triggered to perform the closing action, and the camera device is triggered to capture the image after 3s.
[0048] Step 202: The gray value of the region where the color block array is located in the image is extracted.
[0049] In this embodiment, the processor first segments the image, locks the region where the color block array is located, and then extracts the gray value of the region where the color block array is located. Thus, irrelevant background information (such as equipment box, shadow, other components) is ignored, effectively avoiding environmental interference.
[0050] In an embodiment, when the color block array is composed of two different colors of color blocks, the state detection method of the mechanical switch after step 202 further includes: performing binaryzation processing on the gray value.
[0051] In this embodiment, the 0-255 level gray scale is compressed into black and white binary information, the data amount is greatly reduced, the processing, storage and transmission costs can be reduced. At the same time, the contrast between the pointer head and the color block can be enhanced, the light and shadow, noise interference can be eliminated, the boundary contour is clear, and the accuracy and stability of position judgment and fault identification are improved.
[0052] For example, taking black and white color blocks as an example, when the pixel gray value VS of the image is less than or equal to 50, it is set to 0; when the pixel gray value VS of the image is greater than or equal to 200, it is set to 255.
[0053] Step 203, constructing a gray matrix based on the number of at least two different colors and the gray value.
[0054] In this embodiment, the color block array is arranged along the movement direction of the moving contact, the pointer head moves synchronously and contains the corresponding color, when constructing the matrix, the number of colors corresponds to the target region range, the gray value distinguishes different color blocks / pointer head colors, and the matrix row / column is naturally bound with the moving contact movement track (position). The system can more accurately distinguish and identify the position of the pointer head through the gray characteristics of different color blocks.
[0055] In actual application scenarios, step 203, that is, constructing a gray matrix based on the number of at least two different colors and the gray value, specifically includes the following steps: Step 203-1, based on the number of color blocks in the color block array and the number of at least two different colors, dividing the color block array region in the image into a grid composed of rows and columns.
[0056] Step 203-2, calculating the mean or median of the gray values of the pixels in the grid cells in the grid, and mapping the mean or median of the gray values to a feature value.
[0057] Step 203-3, combining the feature values based on the grid cell array arrangement order to generate a gray matrix.
[0058] In this embodiment, the physical position boundary of each color block in the color block array is anchored by splitting the color block array region by the number of color blocks, and the region where each color block is located is further divided by at least two different color numbers. Thus, the grid matching the actual distribution of different colors can be generated by taking the number of color blocks in the color block array and the number of at least two different colors as the matrix rows / columns, respectively. Then, the feature value is determined by combining the mean or median of the gray value in the grid unit to construct the gray matrix. Both the color block position and the feature are accurately corresponded, and the influence of single-pixel noise and light and shadow fluctuation is weakened by the statistical quantity, which significantly enhances the feature discrimination degree of different color blocks and pointer head corresponding regions, so that the gray matrix can more truly reflect the position correlation of the color block array and the pointer head, and provide more reliable and anti-interference core data support for subsequent determination of the mechanical state of the mechanical switch by the target row number, thereby improving the accuracy and stability of the recognition.
[0059] For example, taking black and white color blocks as an example, if the pixel gray value VS=0, the feature value Bivalent Logic=0; if the pixel gray value VS is 255, then the feature value Bivalent Logic=1.
[0060] The matrix containing 1 and 0 constructed by the matrix converter is represented as: ; , In the formula, i is the number of different colors, and the specific value is 1 or 2. j is the number of color blocks, and the value is 1, 2, 3...n; n is a positive integer.
[0061] Step 204, determining the mechanical state of the mechanical switch based on the target row number of the gray scale feature corresponding to the pointer head in the gray scale matrix.
[0062] The state detection method of the mechanical switch provided by the embodiments of the present application collects an image containing a synchronous motion pointer head and a specific installation color block array, fuses multiple color numbers and gray values to construct a gray scale matrix, reverses the extremely precise stop position of the moving contact based on the matrix target row number of the pointer head gray scale feature, and determines whether the mechanical switch is closed in place or stuck based on the stop position. Thus, the precise binding of position and feature is realized by means of the synchronous association of color and moving contact, the relative position of the moving contact and the static contact during the closing of the mechanical switch is accurately identified, and the accuracy and anti-interference of the mechanical state (such as closing in place and sticking) judgment are greatly improved. Without the need for a large number of mature technologies and supporting industrial chains, the sticking and looseness of the mechanical switch can be indirectly detected in a small space at a lower cost, and the safe operation of the mechanical switch can be better ensured.
[0063] It is worth mentioning that the mechanical switch state detection method provided by the embodiments of the present application can be applied to a terminal, can be applied to a server, and can also be software running in the terminal or the server. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server can be configured as a separate physical server, can be configured as a server cluster or a distributed system formed by multiple physical servers, and can also be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform.
[0064] In an embodiment, before step 204, the mechanical switch state detection method further includes: matching the gray feature with the feature values of each row in the gray matrix; and determining the number of rows in the gray matrix in which the feature values matched with the gray feature as the target number of rows.
[0065] In this embodiment, the feature values of each row in the gray matrix have been associated with the physical positions of the color block array, and the actual position row number corresponding to the pointer head can be directly locked through feature matching, avoiding errors in single gray analysis or manual judgment; at the same time, the matching logic is intuitive and robust, and can effectively resist the interference of image noise and light changes on feature recognition, ensuring the accuracy of the extraction of the target number of rows and providing accurate and reliable core data support for subsequent determination of the relaxed, normal, and stuck states of the mechanical switch through the number of rows.
[0066] For example, taking black and white color blocks as an example, the color block pointer head gray feature is represented as , and the color block pointer head gray feature is searched in the binary matrix Sequence representing the color block array. The binary matrix Sequence is as follows: ; The search is performed from left to right by column in the binary matrix Sequence, if the current column does not contain the color block pointer head gray feature, the target number of rows is incremented by 1, and if the current column contains the color block pointer head gray feature, the column search of the binary matrix Sequence is stopped and the current target number of rows is output. Through the search operation, the gray feature of the color block pointer head is located in the 7th column in the binary matrix Sequence, and it can be concluded that the target number of rows Number is 7, that is, the position of the color block pointer in the color block array is found.
[0067] In an actual application scenario, step 204, that is, determining the mechanical state of the mechanical switch based on the target number of rows of the gray feature corresponding to the pointer head in the gray matrix, specifically includes the following steps: Step 204-1, comparing the target number of rows with different row number intervals. Step 204-2, if the target row number is located in the first row number interval, it is determined that the mechanical switch is in a loose state.
[0068] Step 204-3, if the target row number is located in the second row number interval, it is determined that the mechanical switch is in a normal state.
[0069] Step 204-4, if the target row number is located in the third row number interval, it is determined that the mechanical switch is in a stuck state.
[0070] The second row number interval is configured based on the row number of the color block corresponding to the pointer head when the moving contact of the mechanical switch contacts the static contact in the normal state. The minimum value of the first row number interval is greater than the maximum value of the second row number interval, and the maximum value of the third row number interval is less than the minimum value of the second row number interval.
[0071] In this embodiment, by comparing the target row number corresponding to the gray scale feature of the pointer head with the three types of preset row number intervals, and combining the row number configuration of the corresponding color block of the pointer head when the moving contact contacts the static contact in the normal state, the intervals are accurately divided, and by reasonably setting the interval value relationship, the clear definition and rapid determination of the three states of the mechanical switch, i.e. loose, normal and stuck, are realized. Thus, the accurate judgment of the state of the mechanical switch is realized, which greatly improves the reliability and sensitivity of the system monitoring, and can ensure timely response and early warning of faults.
[0072] For example, for the target row number Number, the following comparison is performed: 1) If Number>LS, it is displayed that the mechanical switch is loose; 2) If LS>Number>LK, it is displayed that the mechanical switch is normal; 3) If NumberLK, it is displayed that the mechanical switch is stuck. Wherein, LK is the preset value of stuck, and LS is the preset value of loose.
[0073] The comparison results in three different cases are shown in Table 1. It can be seen that the working condition 1 concludes that the working condition is stuck; the working condition 2 concludes that the working condition is normal; and the working condition 3 concludes that the working condition is loose.
[0074] Table 1
[0075] It should be noted that the size of the serial number of each step in the above embodiment does not mean the execution order, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0076] Further, as Figure 3As shown, as a specific implementation of the state detection method of the mechanical switch, the embodiment of the application provides a mechanical switch state detection device 300, which comprises an acquisition module 301, a grayscale processing module 302 and a state detection module 303.
[0077] The acquisition module 301 is configured to acquire an image containing a pointer head and a color block array after the mechanical switch completes a closing operation, wherein the color block array comprises color blocks of at least two different colors, the color blocks are installed in parallel with a static contact of the mechanical switch along a moving direction of a dynamic contact of the mechanical switch, and a surface of the pointer head is coated with the at least two different colors in sequence; and the pointer head and the dynamic contact move synchronously. The grayscale processing module 302 is configured to extract a grayscale value of a region where the color block array is located in the image, and construct a grayscale matrix based on the number of the at least two different colors and the grayscale value. The state detection module 303 is configured to determine a mechanical state of the mechanical switch based on a target row number of the grayscale feature corresponding to the pointer head in the grayscale matrix.
[0078] Further, the state detection module 303 is specifically configured to compare the target row number with different row number intervals; if the target row number is located in a first row number interval, it is determined that the mechanical switch is in a relaxed state; if the target row number is located in a second row number interval, it is determined that the mechanical switch is in a normal state; and if the target row number is located in a third row number interval, it is determined that the mechanical switch is in a stuck state; wherein the second row number interval is configured based on the row number of the color block corresponding to the pointer head in the color block array when the dynamic contact of the mechanical switch contacts the static contact in the normal state; the minimum value of the first row number interval is greater than the maximum value of the second row number interval, and the maximum value of the third row number interval is less than the minimum value of the second row number interval.
[0079] Further, the grayscale processing module 302 is specifically configured to divide the color block array region in the image into a grid composed of rows and columns based on the number of the color blocks in the color block array and the number of the at least two different colors; calculate a mean value or a median of the grayscale values of the pixels in a grid unit in the grid, and map the mean value or the median of the grayscale values to a feature value; and generate the grayscale matrix based on the order of the array arrangement of the grid units and the combination of the feature values.
[0080] Further, the mechanical switch state detection device 300 further comprises: a matching module (not shown in the figure), configured to match the grayscale feature with the feature values of each row in the grayscale matrix, and determine the row number of the feature value matched with the grayscale feature in the grayscale matrix as the target row number.
[0081] Further, the number of the at least two different colors is 2, and the grayscale processing module 302 is further configured to perform a binaryzation processing on the grayscale value.
[0082] The specific limitation of the state detection device of the mechanical switch can refer to the limitation of the state detection method of the mechanical switch in the foregoing, and will not be described here. Each module in the state detection device of the mechanical switch can be realized by software, hardware, and a combination thereof, in whole or in part. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so that the processor calls and executes the operations corresponding to each of the above modules.
[0083] Based on the above-mentioned method as shown in Figure 2 Accordingly, the embodiments of the present application also provide a readable storage medium having a computer program stored thereon, which is executed by a processor to implement the above-mentioned mechanical switch state detection method as shown in Figure 2
[0084] Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various implementation scenarios of the present application.
[0085] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and a necessary general hardware platform, or by hardware to obtain an image containing a pointer head and a color block array after the closing operation of the mechanical switch is completed, wherein the color block array includes at least two color blocks of different colors, the color blocks are installed in parallel with the static contact of the mechanical switch along the movement direction of the moving contact of the mechanical switch, the surface of the pointer head is coated with at least two different colors in turn, and the pointer head and the moving contact move synchronously; the gray value of the region where the color block array is located in the image is extracted; a gray matrix is constructed based on the number of at least two different colors and the gray value; and the mechanical state of the mechanical switch is determined based on the target row number of the gray feature corresponding to the pointer head in the gray matrix. In the embodiments of the present application, an image containing a synchronously moving pointer head and a specifically installed color block array is collected, a gray matrix is constructed by fusing the number of multiple colors and the gray value, and the target row number of the matrix corresponding to the gray feature of the pointer head is used to reversely deduce the extremely precise stop position of the moving contact, and the stop position is used to determine whether the mechanical switch is closed in place or stuck. Thus, by means of the synchronous association of color and the moving contact, the precise binding of position and feature is realized, the relative position of the moving contact and the static contact of the mechanical switch during closing is accurately identified, and the accuracy and anti-interference of the mechanical state (such as closing in place or sticking) judgment are greatly improved. Without the need for a large number of mature technologies and supporting industrial chains, the sticking and looseness of the mechanical switch can be indirectly detected in a small space at a low cost, and the safe operation of the mechanical switch can be better ensured.
[0086] Those skilled in the art can understand that the modules or flows in the drawings are not necessarily required for implementing the present application. Those skilled in the art can understand that the modules in the devices in the implementation scenarios can be distributed in the devices in the implementation scenarios according to the description of the implementation scenarios, or can be changed to be located in one or more devices different from the implementation scenarios. The modules in the above implementation scenarios can be combined into one module, or can be further split into multiple sub-modules.
[0087] The above serial numbers of the present application are only for description, and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only some specific implementation scenarios of the present application, however, the present application is not limited thereto, and any changes that can be thought of by those skilled in the art shall fall within the protection scope of the present application.
Claims
1. A state detection device for a mechanical switch, characterized in that, The device includes: A color block array, comprising at least two different colors of color blocks, wherein the color blocks are installed parallel and insulated from the stationary contact of the mechanical switch along the direction of movement of the moving contact of the mechanical switch, and the colors of adjacent color blocks are grayscale contrast colors; A color block pointer includes a connected body and a pointer head. The body is coaxially and parallelly insulatedly mounted with the moving contact of the mechanical switch so that the body and the moving contact move synchronously. The surface of the pointer head is sequentially coated with at least two different colors. The pointer head is correspondingly arranged with the color block array so that the pointer head can block part of the color blocks. A camera device is used to capture an image of the pointer head and the color block array after the mechanical switch has completed the closing action; The processor, electrically connected to the camera device, executes the following steps when running a program: extracting the grayscale values of the area where the color block array is located in the image; constructing a grayscale matrix based on the number of the at least two different colors and the grayscale values; and determining the mechanical state of the mechanical switch based on the target row number in the grayscale matrix according to the grayscale feature corresponding to the pointer head.
2. The state detection device for a mechanical switch according to claim 1, characterized in that, The lengths of the regions with different colors on the surface of the pointer head are the same.
3. The state detection device for a mechanical switch according to claim 1, characterized in that, The at least two different colored blocks are black blocks and white blocks.
4. The state detection device for a mechanical switch according to claim 1, characterized in that, The width of the pointer head is smaller than the width of the color block.
5. A method for detecting the state of a mechanical switch, characterized in that, The method includes: The image of the mechanical switch after it has completed the closing action, including the pointer head and the color block array, is obtained. The color block array includes at least two different colors of color blocks. The color blocks are installed insulated parallel to the stationary contact of the mechanical switch along the movement direction of the moving contact. The surface of the pointer head is coated with the at least two different colors in sequence. The pointer head and the moving contact move synchronously. Extract the grayscale value of the region where the color block array is located in the image; Construct a grayscale matrix based on the number of the at least two different colors and the grayscale values; The mechanical state of the mechanical switch is determined based on the target row number in the grayscale matrix corresponding to the grayscale feature of the pointer head.
6. The method for detecting the state of a mechanical switch according to claim 5, characterized in that, Determining the mechanical state of the mechanical switch based on the target row number in the grayscale matrix according to the grayscale feature corresponding to the pointer head includes: Compare the target number of rows with the range of different row numbers; If the target row number is within the first row number interval, then the mechanical switch is determined to be in a relaxed state; If the target row number is within the second row number range, then the mechanical switch is determined to be in a normal state; If the target row number is located in the third row number interval, then the mechanical switch is determined to be in a stuck state; The second row number interval is based on the row configuration of the color block corresponding to the pointer head in the color block array when the moving contact of the mechanical switch contacts the stationary contact under normal conditions; the minimum value of the first row number interval is greater than the maximum value of the second row number interval, and the maximum value of the third row number interval is less than the minimum value of the second row number interval.
7. The method for detecting the state of a mechanical switch according to claim 5, characterized in that, Constructing a grayscale matrix based on the number of the at least two different colors and the grayscale values includes: Based on the number of color blocks in the color block array and the number of the at least two different colors, the color block array region in the image is divided into a grid consisting of rows and columns; Calculate the mean or median gray value of pixels within the grid cells in the grid, and map the mean or median gray value to feature values; The grayscale matrix is generated by combining the feature values based on the arrangement order of the grid cell array.
8. The method for detecting the state of a mechanical switch according to claim 5, characterized in that, The method further includes: Match the grayscale features with the feature values of each row in the grayscale matrix; The number of rows in the grayscale matrix that matches the grayscale feature is determined as the target row number.
9. The method for detecting the state of a mechanical switch according to claim 5, characterized in that, The number of at least two different colors is 2, and the method further includes: The grayscale values are binarized.
10. A state detection device for a mechanical switch, characterized in that, The device includes: The acquisition module is used to acquire an image containing a pointer head and a color block array after the mechanical switch completes the closing action. The color block array includes at least two different colors of color blocks. The color blocks are installed insulated parallel to the stationary contact of the mechanical switch along the movement direction of the moving contact. The surface of the pointer head is coated with the at least two different colors in sequence. The pointer head and the moving contact move synchronously. The grayscale processing module is used to extract the grayscale values of the region where the color block array is located in the image; and, Construct a grayscale matrix based on the number of the at least two different colors and the grayscale values; The state detection module is used to determine the mechanical state of the mechanical switch based on the target row number in the grayscale matrix corresponding to the grayscale feature of the pointer head.