A method for automatically collecting switch information and checking switch
Through the automatic collection of circuit breaker information by cheap cameras and servers, combined with manual marking and server calculations, the automation of three-off and one-off inspections is realized, solving the problems of low efficiency and large occupation of computing resources, saving manpower and improving inspection accuracy.
Patent Information
- Application Number
- CN202210290868.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-23
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-03-23
AI Technical Summary
The existing three-gate and one-close inspection requires manual inspection of catering stores one by one, which is inefficient and prone to negligence or malfeasance. In addition, traditional image recognition technology consumes a large amount of computing resources, making it difficult to implement a cheap and efficient automated solution.
Adopt an automatic collection method of gate information based on cheap cameras and servers. By manually marking the gates, the camera collects pictures, the server recognizes the marks and searches for color mutation blocks, calculates whether the mutation blocks exceed the threshold, adds identification boxes and records them, and combines longitudinal search and verification. , to achieve automated inspection.
It realizes the automation of three-off and one-off inspections, saves manpower, avoids negligence or malfeasance, reduces computing resource requirements, and improves efficiency and accuracy.
Smart Images

Figure CN114581807B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of safety management in building asset management, and in particular to a method for automatically collecting switch information and checking the switch. Background Art
[0002] At present, the "three-off and one-off" inspection is an important part of the store closing management in shopping malls. The purpose is to strengthen the store closing norms and prevent accidents such as fires. At present, the "three-off and one-off" inspection requires the property staff of the plaza to inspect each catering store one by one. Each property staff can inspect up to 15 stores within 2 hours. If a shopping mall has 60 catering stores, it will take 4 to 5 property staff 2 hours of work. At the same time, after applying for closure, the store needs to wait for the property staff to inspect, which also causes the store staff to leave work late. In addition, some stores have the situation of opening the valves and switches after completing the inspection. Therefore, if the "three-off and one-off" inspection can rely on computers to improve efficiency, or even be completed automatically, it will save a lot of time for both property staff and store staff. At the same time, the "three-off and one-off" involves security. Some computer inspections are more stable than human inspections, and also eliminate the negligence or dereliction of duty of personnel.
[0003] The three-off and one-close include: turning off the power switch, turning off the water valve, turning off the gas, and locking the door. The inspection standard for turning off the power switch is: all power supplies should be cut off except for the equipment that is always open 24 hours a day or must be turned on when the store is closed. The equipment that is always open and turned on when the store is closed includes: refrigerators, ice machines, emergency lighting, emergency exit lights, gas alarm devices, automatic fire extinguishing devices, etc. Summary of the invention
[0004] The technical problem to be solved by the present invention is to realize the process of automatic inspection based on the on-site installation of cameras and the processing and comparison of the images captured during the inspection. The difficulty of the processing process is mainly to consider cost control. It needs to be based on a relatively cheap general camera, and the computing resources of the server are also compressed as much as possible.
[0005] To solve the above technical problems, the present invention provides a method for automatically collecting switch information, comprising the steps of: manually marking the top of the switch in the electrical box; using a camera to collect image information of the switch and transmitting it to a server for calculation and processing; the server identifying the mark and searching downward for a color mutation block based on the mark position; the server calculating whether the mutation block exceeds a set threshold; when the calculation result is greater than a preset threshold, adding an identification frame to the color mutation block, and recording the identification frame information and the corresponding mark in a temporary candidate pool for the switch position; when the calculation result is less than the preset threshold, continuing to search for the color mutation block; when the vertical search is completed and the calculation result is always less than the preset threshold, storing the corresponding mark in a mark problem pool; after identifying all the marks of the image information, when the mark problem pool is not empty, outputting the result recorded in the mark problem pool for manual processing; when the mark problem pool is empty, storing the information of the temporary candidate pool for the switch position for subsequent calls.
[0006] Furthermore, after all the marks of the image information are identified, all the candidate positions in the temporary candidate pool of the switch position need to be verified.
[0007] Furthermore, the verification includes a relative position verification between switch positions and a distance verification between the switch position and the corresponding mark position; when the verification result does not meet the verification preset value, the mark position is stored in the identification problem pool.
[0008] Furthermore, the markings include a red label, a green label and a yellow label, which are respectively defined as closed, open and no need to check.
[0009] Furthermore, the identification frame added to the mutation block is expanded vertically by 50%.
[0010] Furthermore, the switch state features within the identification frame are extracted and recorded in a temporary candidate pool of switch positions.
[0011] Furthermore, the switch state characteristics include wide at the top and narrow at the bottom and narrow at the top and wide at the bottom, which are defined as switch on and switch off respectively.
[0012] The second aspect of an embodiment of the present invention also provides a method for inspecting a switch, wherein the switch is turned off before closing the store, and an inspection instruction is sent to a server through a terminal to start an inspection program, wherein the camera collects image information of the switch and transmits it to the server for processing; the server matches the image information of the current switch with the information of a temporary candidate pool for the switch position; when the information matches, the server stores the image information of the current switch and sends an inspection pass message to the terminal, and the inspection program terminates; when the information matches inconsistently, the server sends an inspection fail message to the terminal, and the terminal can send an inspection instruction to the server again.
[0013] Furthermore, after the check procedure is terminated, the server enters a polling state every second.
[0014] Furthermore, the polling status per second includes: collecting image information of the switch through the camera and checking the average grayscale value of the image; if the grayscale value is lower than the set threshold, it is considered that the room is in the lights-off state and no action is required; if the grayscale value is higher than the set threshold, the inspection program is restarted. When the information matches, no action is required. When the information does not match, the server sends an inspection failure message to the terminal and stops the polling status per second.
[0015] The above technical solution of the present invention has the following advantages: it realizes the automation of the three-gate and one-close inspection, saves a lot of manpower, and avoids problems such as negligence or malfeasance in manual inspection.
[0016] It solves the problem that traditional image recognition technology requires a lot of computing resources, and reduces the performance requirements of the camera and the computing resources of the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic diagram of a flow chart of a method for automatically collecting switch information according to the present invention;
[0018] Figure 2 It is a schematic diagram of the switch and its logo;
[0019] Figure 3 A schematic flow chart of a method for checking a switch according to the present invention;
[0020] In the picture: 1. Green label; 2. Yellow label; 3. Red label; 4. Narrow at the top and wide at the bottom; 5. Wide at the top and narrow at the bottom. DETAILED DESCRIPTION
[0021] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0022] In the description of the present invention, it is necessary to understand that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0023] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0024] Please refer to Figure 1 In an embodiment of the present invention, a method for automatically collecting switch information is provided, comprising the steps of:
[0025] S1 manually marks the top of the switch in the electrical box.
[0026] Before marking, the plaza property and the store owners need to jointly confirm which switches need to be closed, which switches need to be opened, and which switches do not need to be checked. Then, different marks are affixed above each switch in the power box, but not limited to the top. Different colors or symbols can be used to distinguish them. The marking can improve recognition to avoid the influence of light and other factors, and also reduce the requirements of the camera. At the same time, each switch in the power box corresponds to the corresponding state.
[0027] Then, after opening the distribution box door, you can see the status of all switches in the entire distribution box and the locations of all stickers and marks. Adjust the angle to make the image observed in the lens clear enough. If the camera is far away, you can add a selection box to frame the location range of the distribution box and store the rectangular coordinates. No selection defaults to a rectangular frame for the entire image.
[0028] The S2 camera collects image information of the switch and transmits it to the server for processing.
[0029] The S3 server identifies the marker and searches down for the color mutation block based on the marker position.
[0030] The marking can be used to quickly locate the approximate position of the switch, reducing the amount of computing power on the server. At the same time, the color mutation block, i.e. the switch, is different from the electrical box in that it is obviously darker in color. The purpose of identifying the color mutation block is to find the specific position of the switch.
[0031] The S4 server calculates whether the mutation block exceeds the set threshold.
[0032] The threshold is set to prevent stains from being mistaken for switches when identifying blocks with color mutations. The switch is correctly identified only when the threshold is exceeded.
[0033] S5: When the calculation result is greater than a preset threshold, an identification frame is added to the color mutation block, and the identification frame information and the corresponding mark are recorded in the temporary candidate pool of the switch position.
[0034] The temporary candidate pool of switch positions is stored in the cache area of the server.
[0035] S6: When the calculated result is less than the preset threshold, continue searching for the color mutation block.
[0036] S7 When the vertical search reaches the end and the calculation result is always less than the preset threshold, the corresponding mark is stored in the mark question pool.
[0037] This means that although the server recognized the tag, it could not find the corresponding switch.
[0038] After all the marks of the image information are identified, if the identification problem pool is not empty, S8 outputs the result recorded in the identification problem pool for manual processing;
[0039] The workload of manual review is relatively small, and it is usually aimed at factors such as the server's misidentification of the logo or damage to the switch, which can be corrected in a timely manner.
[0040] S9 When the problem pool is marked as empty, the information of the temporary candidate pool of the switch position is stored for subsequent calls.
[0041] If the identification question pool is empty, it means there is no identification question. The server transfers the temporary information in the buffer area to storage information, and stores the identification box information and the mark respectively.
[0042] In some embodiments, after all the marks of the image information are identified, all the candidate positions in the temporary candidate pool of the switch position need to be verified. The purpose of the verification is to improve the accuracy of recognition.
[0043] In some embodiments, the verification includes a relative position verification between switch positions and a distance verification between switch positions and corresponding mark positions. The relative position verification between switch positions is performed by comparing the relative position between two adjacent switches with a preset distance. If the difference is large, it is possible that the identified information is incorrect. The distance verification between switch positions and corresponding mark positions is performed by comparing the distance between switch positions and corresponding mark positions. If the difference is large, it is possible that the identified information is incorrect. When the verification result does not meet the preset verification value, the marked position is stored in the identification problem pool for further manual investigation and confirmation.
[0044] Please refer to Figure 2In some embodiments, the mark includes a red label 3, a green label 1, and a yellow label 2, which are respectively defined as off, on, and no need to check. The off label indicates that the corresponding switch should be in the off state, the on label indicates that the corresponding switch should be in the on state, and the no need to check label indicates that the corresponding switch can be in the off state or in the on state. Using labels of different colors can improve recognition, avoid the influence of light, etc., and also reduce the requirements of the camera.
[0045] In some embodiments, the identification frame added to the mutation block is expanded vertically by 50%. Since the vertical position of the switch changes when it is switched, the switch position can be completely selected by expanding it vertically by 50%. The range of the vertical expansion is not limited to 50% and can be adjusted appropriately.
[0046] In some embodiments, the switch status features within the identification frame are extracted and recorded in a temporary candidate pool for switch positions. The server's operation and processing of the identification frame information can be arranged between S5 and S9. Therefore, the information of the temporary candidate pool for switch positions includes the switch status features and their corresponding identifiers, which is convenient for subsequent calling in a switch inspection method.
[0047] Please refer to Figure 2 In some embodiments, the switch state characteristics include 5 which is wide at the top and narrow at the bottom and 4 which is narrow at the top and wide at the bottom, and are defined as switch on and switch off, respectively. Usually, the switch of an air switch which is 5 which is wide at the top and narrow at the bottom represents that the switch is opened upward, at this time the switch is on, and the switch which is 4 which is narrow at the top and wide at the bottom represents that the switch is closed downward, at this time the switch is off.
[0048] Please refer to Figure 3 The second aspect of an embodiment of the present invention further provides a method for checking a switch, which is an aspect of an application scenario based on the above-mentioned method for automatically collecting switch information.
[0049] First, before closing the store, the store clerk turns off the switch and sends a check command to the server through the terminal. The terminal can be a mobile phone with an APP pre-installed with the server. The store clerk clicks "Check the switch after closing the store" to start the check procedure, which includes:
[0050] The camera collects image information of the switch and transmits it to the server for processing.
[0051] The server matches the image information of the current switch with the information of the temporary candidate pool of switch positions. That is, the operation and processing of the switch information are classified by the identification information extracted from the image information of the current switch. For example, switches that do not need to be checked are not matched, while switches that need to be checked further extract switch status information and match it with the switch status information stored in the information of the temporary candidate pool.
[0052] When the information matches, the server stores and archives the image information of the current switch to facilitate subsequent investigation and evidence collection. At the same time, it sends an inspection pass message to the terminal, that is, "Switch closure inspection passed" is sent to the merchant's clerk's mobile phone APP. The switch inspection status changes to "Completed", the store's switch inspection is completed, and the inspection program is terminated.
[0053] When the information does not match, the server sends an inspection failure message to the terminal, that is, it sends "power switch off detection failed" to the merchant clerk's mobile phone APP, and the power switch inspection status changes to "pending inspection". After the merchant clerk investigates and handles it, the terminal can send an inspection instruction to the server again.
[0054] In some embodiments, after the checking procedure is terminated, the server enters a polling state every second. The polling state every second is to prevent the merchant's staff from turning on the switch again, and to play a role in real-time monitoring.
[0055] In some embodiments, the polling state every second includes: collecting image information of the switch through a camera and checking the average grayscale value of the image, where the grayscale value is based on prior knowledge determined by previous experiments. It is possible to consider adding an electromagnetic induction sensor between the distribution box door and the distribution box, and to detect the on and off of the electromagnetic induction sensor instead of the grayscale value to achieve real-time monitoring of the switch.
[0056] If the grayscale value is lower than the set threshold, the room is considered to be in the lights-off state and no action is required.
[0057] If the grayscale value is higher than the set threshold, the inspection program will be restarted. When the information matches, no action is required. When the information does not match, the server sends an inspection failure message to the terminal and stops polling every second. The server sends an inspection failure message to the terminal, that is, "Switch off detection failed" is sent to the merchant's clerk's mobile phone APP. The switch inspection status changes to "Pending Inspection" and you need to manually click "Store Closing Switch Inspection" again to start the inspection program.
[0058] If the grayscale value is always lower than the set threshold, when the store is opened, when the merchant's clerk operates the switch in the electrical box, since the server is still in the polling state per second, it will detect that the grayscale value is higher than the set threshold and restart the inspection program. When the information matches, no action is required. When the information does not match, the server sends a check failure message to the terminal and stops the polling state per second. The switch inspection status changes to "pending inspection" and you need to manually click "Close store switch inspection" again to start the inspection program.
[0059] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for checking a switch, characterized in that : Turn off the power switch before closing the store, and send an inspection instruction to the server through the terminal to start the inspection procedure, which includes: The server matches the image information of the current switch with the information of the temporary candidate pool of switch positions; When the information matches, the server stores the image information of the current switch and sends a check pass message to the terminal, and the check procedure ends; When the information does not match, the server sends a check failure message to the terminal, and the terminal can send a check instruction to the server again; The method further comprises: Manually mark the top of the switch in the electrical box; The camera collects the image information of the switch and transmits it to the server for calculation and processing; The server identifies the mark and searches downward for the color mutation block based on the mark position; The server calculates whether the mutation block exceeds the set threshold; When the calculation result is greater than the preset threshold, an identification frame is added to the color mutation block, and the identification frame information and the corresponding mark are recorded in the temporary candidate pool of the switch position; When the calculated result is less than the preset threshold, continue searching for the color mutation block; When the vertical search is completed and the calculation result is always less than the preset threshold, the corresponding mark is stored in the mark question pool; After all the marks of the image information are identified, if the identification problem pool is not empty, the results recorded in the identification problem pool are output for manual processing; When the problem pool is empty, the information of the temporary candidate pool of the switch position is stored for subsequent calls; The markings include red stickers, green stickers and yellow stickers, which are defined as closed, open and no need to check respectively; The switch status features within the recognition frame are extracted and recorded in the temporary candidate pool of the switch position.
2. A method for checking a switch as claimed in claim 1, characterized in that :After identifying all the marks of the image information, it is also necessary to verify all the candidate positions in the temporary candidate pool of the switch position.
3. A method for checking a switch as claimed in claim 2, characterized in that : The verification includes a relative position verification between switch positions and a distance verification between the switch position and the corresponding mark position; When the verification result does not meet the verification preset value, the marked position is stored in the identification problem pool.
4. A method for checking a switch as claimed in claim 1, characterized in that : The identification box added to the mutation block is expanded vertically by 50%.
5. A method for checking a switch as claimed in claim 1, characterized in that The switch state characteristics include wide at the top and narrow at the bottom and narrow at the top and wide at the bottom, which are defined as switch on and switch off respectively.
6. A method for checking a switch as claimed in claim 1, characterized in that : After the check program terminates, the server enters the polling state every second.
7. A method for checking a switch as claimed in claim 6, characterized in that : The polling status per second includes: collecting the image information of the switch through the camera and checking the average grayscale value of the image; If the grayscale value is lower than the set threshold, the room is considered to be in a light-off state and no action is required; If the gray value is higher than the set threshold, restart the check program. When the information matches, no action is required. When the information does not match, the server sends a check failure message to the terminal and stops the polling status every second.
