Connection correctness detection method and system, meter installation and power connection intelligent process detection method and system
By constructing a wiring segmentation model and using deep learning technology, the problems of low efficiency and inaccuracy in wiring sequence detection in existing technologies have been solved, achieving fast and accurate detection of wiring errors and quality assessment, thus meeting the high requirements of smart grids.
Patent Information
- Application Number
- CN202411222040.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-09-02
AI Technical Summary
Existing technologies cannot quickly and accurately detect the correctness of wiring sequence, especially for bent wiring. Furthermore, manual inspection is inefficient and prone to errors, failing to meet the high requirements of smart grids for meter installation and power connection.
A wiring segmentation model is constructed, and deep learning technology is used to segment and detect colors in the wiring image. The wiring sequence is determined through correlation, and the wiring is compared with a reference wiring sequence array to detect the correctness of the wiring. The wiring quality is evaluated by measuring straightness and perpendicularity.
It enables rapid and accurate detection of correct wiring sequence, improves the efficiency of meter installation and power connection training and actual testing, can detect complex or hidden wiring errors, and meets the management needs of smart grids.
Smart Images

Figure CN119360013B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electric power engineering, in particular to a wiring correctness detection method and system and an intelligent meter installation and power connection process detection method and system. BACKGROUND
[0002] With the development of smart grids, higher requirements are put forward for the management of meter installation and power connection. Meter installation refers to the installation of electric energy metering devices by power supply enterprises for user customers, and after the power connection, the customer turns on his own switch and can start using electricity. Power connection refers to the connection of power receiving devices of power service customers to the power supply network. Meter installation and power connection are important work in electric power engineering, which involves the installation of electric meters, the arrangement of wiring and the connection of electrical equipment.
[0003] It should be noted that meter installation and power connection is a highly professional work that must be completed by professionals with appropriate qualifications and skills. The content of meter installation and power connection training usually includes electric meter installation, line laying, wiring commissioning, etc. After the training, the training effect is usually evaluated to understand the learning achievements of the students. Traditional meter installation and power connection correctness judgment and process analysis often rely on manual experience and visual inspection. This method is easily affected by human factors, environmental lighting conditions, equipment status and other factors, which not only has low efficiency and is prone to errors, but also has subjective factors.
[0004] It should also be noted that with the development of smart grids, higher requirements are put forward for the management of meter installation and power connection. Manual meter installation and power connection correctness judgment and process analysis requires a lot of time and effort, and it is difficult to quickly find complex or hidden errors.
[0005] Although the Chinese patent with application number 202310875243.9 discloses an electric energy meter installation and connection process detection device and method based on deep learning image recognition, the detection device and method cannot detect the correctness of the wiring sequence, and cannot fully meet the needs of meter installation and power connection training and actual detection. In addition, the electric energy meter installation and connection process detection device and method can only detect straight-line wiring and cannot handle most of the bent wiring in the actual wiring process.
[0006] In order to solve the above problems, people have been seeking an ideal technical solution. SUMMARY
[0007] Therefore, it is necessary to provide a wiring correctness detection method and system and an intelligent meter installation and power connection process detection method and system to solve the above technical problems.
[0008] In order to achieve the above object, the first aspect of the present application provides a wiring correctness detection method, comprising: constructing a wiring segmentation model in advance, and configuring a first wiring segmentation data set;
[0009] Training the wiring segmentation model by using the first wiring segmentation data set;
[0010] Obtaining a to-be-tested wiring Figure 1 Segmenting the conductors in the vertical direction of the to-be-tested wiring Figure 1 by using the wiring segmentation model trained by the first wiring segmentation data set, to obtain a wiring state grayscale Figure 1 ; wherein different grayscale values in the wiring state grayscale Figure 1 correspond to different labels, and the labels refer to unique identifiers assigned to different color conductors at different wiring positions in a wiring diagram;
[0011] When the corresponding wiring position in the wiring state grayscale Figure 1 is not empty, determining a wiring color detection result based on a pre-established association relationship and the grayscale value corresponding to each conductor in the wiring state grayscale Figure 1 ; wherein the wiring color detection result refers to the color of the conductors at different wiring positions in the wiring state grayscale Figure 1 , and the association relationship refers to a pre-established mapping relationship between different labels and different grayscale values;
[0012] Determining a to-be-tested wiring sequence array based on the wiring color detection result; wherein different element symbols in the to-be-tested wiring sequence array correspond to different wiring colors and wiring states;
[0013] When the corresponding wiring position in the wiring state grayscale Figure 1 is empty, setting the element symbol at the corresponding position in the to-be-tested wiring sequence array to a, and a represents a missing wiring condition at the corresponding wiring position;
[0014] Obtaining a pre-configured reference wiring sequence array, comparing the to-be-tested wiring sequence array and the reference wiring sequence array, and obtaining a correctness detection sequence array based on the comparison result; wherein different element symbols in the correctness detection sequence array represent different wiring sequence detection results, element symbol a represents a missing wiring condition at the corresponding wiring position, element symbol b represents a correct wiring color at the corresponding wiring position, and element symbol c represents an incorrect wiring color at the corresponding wiring position;
[0015] Based on the correctness detection sequence array, obtaining a wrong wiring detection result and a missing wiring detection result corresponding to the to-be-tested wiring Figure 1 .
[0016] To achieve the above object, the second aspect of the present application provides an intelligent process detection method for wiring connection, comprising:
[0017] The wiring correctness detection method is used to detect the wiring area in the wiring under test Figure 1 to obtain the wrong wiring detection result and the missing wiring detection result;
[0018] The wiring state grayscale Figure 1 is obtained, the wiring closed area corresponding to each wire in the wiring state grayscale Figure 1 is determined, and a fitting straight line I corresponding to the pixel coordinate points in each wiring closed area is constructed;
[0019] The minimum circumscribed rectangle of the corresponding wiring closed area is determined based on the fitting straight line I, and the straightness of the wire in the vertical direction is measured based on the number of pixel points in each minimum circumscribed rectangle and the pixel area of the corresponding minimum circumscribed rectangle;
[0020] A horizontal baseline is constructed based on the upper frame of the wiring box in the wiring under test Figure 1 , and the perpendicularity of the wire in the vertical direction is measured according to the horizontal baseline and the fitting straight line I in each wiring closed area.
[0021] To achieve the above object, the third aspect of the present application provides a wiring correctness detection system, comprising a model management module, a segmentation module, a wiring color detection module, a wiring sequence determination module and a correctness detection module, wherein,
[0022] The model management module is used to pre-construct a wiring segmentation model and configure a first wiring segmentation data set, and is also used to train the wiring segmentation model by using the first wiring segmentation data set;
[0023] The segmentation module is used to obtain the wiring under test Figure 1 , segment the wire in the vertical direction in the wiring under test Figure 1 by using the wiring segmentation model trained by the first wiring segmentation data set, and obtain the wiring state grayscale Figure 1 ; wherein different grayscale values in the wiring state grayscale Figure 1 correspond to different labels, and the label refers to a unique identifier assigned to the different color wires at different wiring positions in the wiring diagram;
[0024] The wiring color detection module is used to determine the corresponding wiring position in the wiring state grayscale Figure 1 is not empty, based on the pre-established association relationship, and according to the wiring state grayscale Figure 1The grayscale value corresponding to each wire is used to determine the wiring color detection result; wherein, the wiring color detection result refers to the grayscale value of the wiring status. Figure 1 The color of the wires at different connection points in the diagram refers to the pre-established mapping relationship between different labels and different grayscale values;
[0025] The wiring sequence determination module is used to determine the array of wiring sequences to be tested based on the wiring color detection results; it is also used to determine the grayscale of the wiring status. Figure 1 When the corresponding wiring position is empty, the element symbol at the corresponding position in the wiring sequence array to be tested is set to 'a', where 'a' indicates that there is a missing wire at the corresponding wiring position; different element symbols in the wiring sequence array to be tested correspond to different wiring colors and wiring states.
[0026] The error detection module is used to obtain a pre-configured reference wiring sequence array, compare the wiring sequence array to be tested with the reference wiring sequence array, and obtain an error detection wiring sequence array based on the comparison result; it is also used to obtain the wiring sequence to be tested based on the error detection wiring sequence array. Figure 1 The corresponding incorrect wiring detection results and missing wiring detection results; wherein, different element symbols in the correct and incorrect wiring sequence array represent different wiring sequence detection results, element symbol a indicates that there is a missing wiring at the corresponding wiring position, element symbol b indicates that the wiring color at the corresponding wiring position is correct, and element symbol c indicates that the wiring color at the corresponding wiring position is incorrect.
[0027] To achieve the above objectives, a fourth aspect of the present invention provides an intelligent process detection system for meter installation and connection, comprising a wiring correctness detection unit, a straightness measurement unit, and a perpendicularity measurement unit, wherein...
[0028] The wiring error detection unit uses the wiring error detection method according to claim 1 or 2 to detect the wiring under test. Figure 1 The wiring area is used to detect wiring errors to obtain results for incorrect wiring and missing wiring.
[0029] The straightness measurement unit is used to obtain the grayscale of the wiring status. Figure 1 Determine the grayscale of the wiring status. Figure 1 The system defines the connection enclosure area corresponding to each wire and constructs a fitted straight line I corresponding to the pixel coordinates within each connection enclosure area; it is also used to determine the minimum bounding rectangle of the corresponding connection enclosure area based on the fitted straight line I, and to measure the straightness of the wires in the vertical direction based on the number of pixels in each minimum bounding rectangle and the pixel area of the corresponding minimum bounding rectangle.
[0030] The verticality measurement unit is used to measure the verticality of the wiring under test.Figure 1 The upper frame of the middle junction box constructs a horizontal base line; and the verticality of the conductor in the vertical direction is measured according to the horizontal base line and the fitting straight line I in each junction closed area.
[0031] To achieve the above object, the fifth aspect of the present application provides an intelligent process detection device for meter installation and power connection, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus; the memory is used for storing a computer program; and the processor is used for executing the program stored on the memory to realize the above-mentioned junction correctness detection method or the above-mentioned intelligent process detection method for meter installation and power connection.
[0032] To achieve the above object, the sixth aspect of the present application provides a readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to execute the above-mentioned junction correctness detection method or the above-mentioned intelligent process detection method for meter installation and power connection.
[0033] The present application has the following beneficial effects:
[0034] 1) The present application pre-constructs a junction segmentation model, trains the junction segmentation model by using a first junction segmentation data set, and adopts the trained junction segmentation model to segment the to-be-detected junction Figure 1 in the vertical direction quickly and accurately. The present application also determines a to-be-detected junction sequence array based on the correlation between the labels of different color conductors at different junctions and different gray values, obtains a correctness detection sequence array based on the to-be-detected junction sequence array and a reference junction sequence array, and thus quickly and accurately detects whether the junction sequence is correct;
[0035] 2) The present application can also quickly and accurately detect the straightness of the junction and whether the straightness of the junction is qualified, and meet the diversified needs of meter installation and power connection training and actual detection;
[0036] 3) The present application also constructs a fitting straight line corresponding to the horizontal degree and determines a horizontal degree detection result based on the fitting straight line corresponding to the horizontal degree, and thus quickly and accurately determines whether the horizontal degree of the to-be-detected junction in the junction image is qualified;
[0037] 4) The present application also pre-constructs a copper exposure detection model, detects the pixel value of the copper exposure area, and thus determines the true copper leakage size. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 is a flowchart of the junction correctness detection method of the present application;
[0039] Figure 1 is a structural diagram of the junction segmentation model (PP_LiteSeg model) of the present application;
[0040] Fig. 3(a) is a schematic diagram of a connection image in Example 1;
[0041] Fig. 3(b) is a schematic diagram of connection marking in Example 1 (corresponding to the association between different color wires at different connections and different gray scale values);
[0042] Fig. 3(c) is a gray scale marking diagram in Example 1;
[0043] Fig. 3(d) is a schematic diagram of a reference connection sequence array, a to-be-tested connection sequence array and a correct / incorrect detection sequence array in Example 1;
[0044] Figure 1 is a flowchart of the intelligent process detection method for meter installation and electricity connection of the present application Figure 1 ;
[0045] Figure 1 is a schematic diagram of a fitting straight line and a minimum circumscribed rectangle in Example 2 of the present application;
[0046] Fig. 6(a) is a connection image in one specific embodiment of the present application (the connection is chaotic, the connection region is mutually occluded, and there is an individual connection with a large horizontal span);
[0047] Fig. 6(b) is a color diagram marking diagram of Fig. 6(a);
[0048] Fig. 7(a) is a connection image in another specific embodiment of the present application (standard connection, no mutual occlusion, and small horizontal span);
[0049] Fig. 7(b) is a color diagram marking diagram of Fig. 7(a);
[0050] Figure 1 is a schematic diagram of the process detection result of the present application;
[0051] Figure 1 is a flowchart of the intelligent process detection method for meter installation and electricity connection of the present application Figure 1 (including copper missing detection);
[0052] Figure 1 is a schematic diagram of the copper exposure detection model detection result of the present application;
[0053] Figure 1 is a structural schematic diagram of the hardware device of the present application. DETAILED DESCRIPTION
[0054] The technical solutions of the present application will be further described in detail through specific embodiments.
[0055] To facilitate understanding, the interactive parties and / or terms and / or custom terms involved in this invention will first be explained in conjunction with the technical solution of this invention:
[0056] Wiring segmentation model: Used to segment the areas containing wires in the wiring diagram under test based on deep learning segmentation technology. Specifically, the PP_LiteSeg segmentation model can be used, as shown in the attached figure. Figure 1 As shown; PP-LiteSeg is a lightweight real-time semantic segmentation model in PaddleSeg, designed for mobile and embedded devices, featuring high accuracy and low latency; using the Baidu PaddlePaddle framework to deploy and run the lightweight real-time segmentation model PP-LiteSeg is a very effective way to achieve efficient image segmentation in resource-constrained environments.
[0057] In PaddleSeg's segmentation task, labeled images refer to images that label each pixel in the original image. These labels are used to train the model to identify specific objects or regions in the image. As shown in Figure 3(c), the role of labeled images is to tell the model which pixels belong to a specific category, such as wires. With this labeled information, the model can learn how to distinguish different objects from the background, thereby improving its segmentation accuracy on real images.
[0058] Wiring under test Figure 1 : This is the image to be processed, which can be used as input for line sequence detection, straightness measurement, and perpendicularity measurement; the wiring to be tested... Figure 1 Input the wiring segmentation model trained on the first wiring segmentation dataset to segment the wiring under test. Figure 1 The vertical conductor is separated.
[0059] Wiring under test Figure 1 : This is the image to be processed, which can be used as the input image for levelness measurement. The wiring to be measured... Figure 1 Input the wiring segmentation model trained on the second wiring segmentation dataset to segment the wiring under test. Figure 1 The horizontal conductor is separated.
[0060] Exposed copper detection model: A deep learning object detection method is used, with the YOLOv5 backbone network as the detection model; the YOLOv5 model is pre-trained using an exposed copper dataset to detect exposed copper lines in images.
[0061] Example 1
[0062] As attached Figure 1 As shown in the figure, this embodiment provides a specific implementation method for a wiring error detection method; the wiring error detection method includes:
[0063] a wiring segmentation model is pre-built, and a first wiring segmentation dataset is configured;
[0064] The wiring segmentation model is trained using the first wiring segmentation dataset;
[0065] Obtain the wiring to be tested Figure 1 The wiring segmentation model trained using the first wiring segmentation dataset is used to segment the wires in the vertical direction of the wiring to be tested Figure 1 , and obtain a wiring state grayscale Figure 1 ; wherein different grayscale values in the wiring state grayscale Figure 1 correspond to different labels, and the labels refer to unique identifiers assigned to different color wires at different wiring positions in the wiring diagram;
[0066] When the corresponding wiring position in the wiring state grayscale Figure 1 is not empty, based on a pre-established association relationship, the wiring color detection result is determined according to the grayscale value corresponding to each wire in the wiring state grayscale Figure 1 ; wherein the wiring color detection result refers to the color of the wire at different wiring positions in the wiring state grayscale Figure 1 , and the association relationship refers to the mapping relationship between different labels and different grayscale values;
[0067] According to the wiring color detection result, a wiring sequence array of the wiring to be tested is determined; wherein different element symbols in the wiring sequence array of the wiring to be tested correspond to different wiring colors and wiring states;
[0068] When the corresponding wiring position in the wiring state grayscale Figure 1 is empty, the element symbol at the corresponding position in the wiring sequence array of the wiring to be tested is set to a, and a represents a missing wiring condition of the wire at the corresponding wiring position;
[0069] A reference wiring sequence array is obtained, the wiring sequence array of the wiring to be tested and the reference wiring sequence array are compared, and a true / false detection sequence array is obtained according to the comparison result; wherein different element symbols in the true / false detection sequence array represent different sequence detection results, element symbol a represents a missing wiring condition at the corresponding wiring position, element symbol b represents a correct wiring color at the corresponding wiring position, and element symbol c represents an incorrect wiring color at the corresponding wiring position;
[0070] Based on the true / false detection sequence array, the corresponding wrong wiring detection result and missing wiring detection result of the wiring to be tested Figure 1 are obtained.
[0071] It should be noted that the different element symbols in the to-be-tested wiring sequence array are used to distinguish the wire color (such as red, yellow, green or black) and the wiring state (wired or not wired) at the corresponding wiring position, and the specific value or specific symbol can be preconfigured by the user and can be modified later. For example, the element symbol R represents that the wire color at the corresponding wiring position is red, the element symbol Y represents that the wire color at the corresponding wiring position is yellow, the element symbol G represents that the wire color at the corresponding wiring position is green, the element symbol B represents that the wire color at the corresponding wiring position is black or blue, and the element symbol a (the specific value of a can be preconfigured by the user, such as 0) represents that the wire at the corresponding wiring position is missing.
[0072] It should also be noted that in the comparison, the element symbol in the to-be-tested wiring sequence array theoretically represents a wiring color. The element symbols a, b and c in the correctness detection wiring sequence array are used to distinguish the wiring correctness, and the specific value or specific symbol can be preconfigured by the user and can be modified later. The element symbol a represents that the corresponding wiring position is empty, and the wiring position is in a missing wiring state; the element symbol c represents that the wire color at the corresponding wiring position does not match, and the wiring position is in a wiring error state; and the element symbol b represents that the wire color at the corresponding wiring position matches, and the wiring position is in a correct wiring state.
[0073] It should also be noted that since different colors of wires at different wiring positions in the wiring diagram are assigned different labels, and there is a mapping relationship between different labels and different gray values; therefore, the present application can determine the corresponding wire color at different wiring positions in the wiring diagram based on the gray value corresponding to each wire in the wiring state gray value Figure 1 map between different labels and different gray values, so as to quickly and accurately detect whether the wiring sequence is correct.
[0074] In other embodiments, before outputting the wiring state gray value diagram, a 3x3 convolution kernel is used to perform an erosion operation on the segmentation result diagram to eliminate the influence of individual fine pixels on the main part of the wiring, and to make the segmentation result more consistent with the core area of the wiring.
[0075] In a specific embodiment, the wiring table is a three-phase four-wire electric energy meter, which can perform three-phase three-type wiring or three-phase four-type wiring, and the wiring diagram is shown in FIG. 3(a);
[0076] The wires are divided into three regions, namely the left ammeter wiring region (the wiring region below the left meter), the right ammeter wiring region (the wiring region below the right meter), and the middle bottom wiring region (the wiring region above the wiring box). The wires are labeled from left to right and from top to bottom to obtain the labels L1-L10, R1-R10, and D1-D14 of the different color wires at different wiring positions in the wiring diagram, as shown in FIG. 3(b);
[0077] The correlation between the yellow wires and the gray scale values at different wiring positions is shown in the following table:
[0078]
[0079] The correlation between the green wires and the gray scale values at different wiring positions is shown in the following table:
[0080]
[0081] The correlation between the red wires and the gray scale values at different wiring positions is shown in the following table:
[0082]
[0083] The correlation between the ground wires and the gray scale values is shown in the following table:
[0084] Figure 1 Figure 1 Figure 1 Figure 1 201 202 203 204
[0085] It should be noted that before the wiring segmentation model is predicted, the present application also pre-establishes the correlation between different labels and different gray scale values to assign the corresponding gray scale values to the different color wires at different wiring positions. Therefore, the wiring region can be extracted one by one by the threshold segmentation method, and the wires of different colors can be output in different gray scale value intervals to obtain the wiring information data set at each wiring position.
[0086] In another specific embodiment, in the standardized operation process, the correct wiring sequence of the left ammeter wiring region should be [YYYGGGRRRB], the correct wiring sequence of the right ammeter wiring region should be [YYYGGGRRRB], and the correct wiring sequence of the middle bottom wiring region should be [YYYYGGGGRRRRBB]. The above three arrays are used as reference wiring sequence arrays. Y represents yellow wire, G represents green wire, R represents red wire, and B represents ground wire, which is commonly black or blue. The wiring sequence output in the data processing stage may have missing wires, and the region without wires is filled with '0' in the wiring sequence, as shown in FIG. 3(d);
[0087] Using the wiring segmentation model to test the wiring Figure 1After the wires in the middle vertical direction are segmented, 34 sets of wiring information data sets are obtained, each including pixel point coordinate information and gray value information of each wiring, and if there is no wire connected at the wiring, the current data set is empty;
[0088] According to the gray value information in the wiring information data set and the pre-established association relationship, the wire color at different wiring positions is determined.
[0089] According to the coordinate point position, the wiring closed areas corresponding to the 34 sets of wiring information data sets are sorted, and finally three area sets of left electricity meter wiring area, right electricity meter wiring area, and middle bottom wiring area are formed, the left upper corner endpoint of the circumscribed rectangle in the area is sorted from left to right, the current wiring sequence is output, and three measured wiring sequence arrays corresponding to the left electricity meter wiring area, the right electricity meter wiring area, and the middle bottom wiring area are obtained.
[0090] In the wiring correctness judgment: according to the correct wiring sequence corresponding to the reference wiring sequence array, the wiring color and the wiring state in the three measured wiring sequence arrays corresponding to the left electricity meter wiring area, the right electricity meter wiring area, and the middle bottom wiring area are compared.
[0091] The correct wiring sequence and the actual wiring sequence are compared one by one to obtain a correctness detection sequence array: if the two are the same, 1 is output, if the two are different, 2 is output, and if the wiring sequence is 0 and the two are different, 0 is output, as shown in FIG. 3(d).
[0092] In some embodiments, based on the correctness detection sequence array, the measured wiring Figure 1 corresponding wrong wiring detection result and missing wiring detection result are obtained by executing:
[0093] According to the number and position of the element symbol c in the correctness detection sequence array, the wrong wiring detection result is determined; wherein the wrong wiring detection result refers to the number and position of the wrong wiring in the measured wiring Figure 1 ;
[0094] According to the number and position of the element symbol a in the correctness detection sequence array, the missing wiring detection result is determined; wherein the missing wiring detection result refers to the number and position of the missing wiring in the measured wiring Figure 1 .
[0095] As shown in FIG. 3(d), in the standardized work process, the second wire from left to right in the left electricity meter wiring area or the right electricity meter wiring area should be Y (yellow), but the measured wiring Figure 1The color of the wire in this place is R (red), indicating that there is a wrong connection; therefore, the second element in the correct detection line sequence array is 2, and the number and position of the wrong connection can be known according to the number and position of 2 in the correct detection line sequence array;
[0096] As shown in FIG. 3(d), in the standardized operation process, the fifth wire from left to right in the left or right electric meter connection area should be G (green), but the test wire Figure 1 The color of the wire in this place is R (red), indicating that there is a wrong connection; therefore, the second element in the correct detection line sequence array is 2, and the number and position of the wrong connection can be known according to the number and position of 2 in the correct detection line sequence array;
[0097] It should be noted that the connection correct detection method can not only determine the correctness of the connection, but also find the specific position and error type (missing connection or wrong connection) of the connection error through line sequence comparison, which facilitates the subsequent inspection and guidance of the error in the meter connection process.
[0098] On the basis of the above connection correct detection method, the embodiment further provides a specific implementation of a connection correct detection system;
[0099] The connection correct detection system comprises a model management module, a segmentation module, a connection color detection module, a connection line sequence determination module and a correct detection module, wherein
[0100] The model management module is configured to pre-construct a connection segmentation model and configure a first connection segmentation data set, and is further configured to train the connection segmentation model by using the first connection segmentation data set;
[0101] The segmentation module is configured to acquire a test connection Figure 1 The connection segmentation model trained by using the first connection segmentation data set is used to segment the conductors in the vertical direction of the test connection Figure 1 to obtain a connection state grayscale Figure 1 ; wherein different grayscale values in the connection state grayscale Figure 1 correspond to different labels, and the label refers to a unique identifier assigned to a different color conductor at a different connection position in the connection diagram;
[0102] The connection color detection module is configured to, when the corresponding connection position in the connection state grayscale Figure 1 is not empty, determine a connection color detection result according to the grayscale value corresponding to each conductor in the connection state grayscale Figure 1 based on a pre-established association relationship; wherein the connection color detection result refers to the connection state grayscale Figure 1The color of the wires at different connection points in the diagram refers to the pre-established mapping relationship between different labels and different grayscale values;
[0103] The wiring sequence determination module is used to determine the array of wiring sequences to be tested based on the wiring color detection results; it is also used to determine the grayscale of the wiring status. Figure 1 When the corresponding wiring position is empty, the element symbol at the corresponding position in the wiring sequence array to be tested is set to 'a', where 'a' indicates that there is a missing wire at the corresponding wiring position; different element symbols in the wiring sequence array to be tested correspond to different wiring colors and wiring states.
[0104] The error detection module is used to obtain a pre-configured reference wiring sequence array, compare the wiring sequence array to be tested with the reference wiring sequence array, and obtain an error detection wiring sequence array based on the comparison result; it is also used to obtain the wiring sequence to be tested based on the error detection wiring sequence array. Figure 1 The corresponding incorrect wiring detection results and missing wiring detection results; wherein, different element symbols in the correct and incorrect wiring sequence array represent different wiring sequence detection results, element symbol a indicates that there is a missing wiring at the corresponding wiring position, element symbol b indicates that the wiring color at the corresponding wiring position is correct, and element symbol c indicates that the wiring color at the corresponding wiring position is incorrect.
[0105] In some embodiments, the wiring segmentation model employs the lightweight real-time segmentation model PP-LiteSeg.
[0106] It should be noted that this invention pre-constructs a wiring segmentation model. Before segmentation, the wiring segmentation model is trained using a first wiring segmentation dataset, where the labeled objects in the first wiring segmentation dataset are wires in the numerical direction. The pre-trained wiring segmentation model is then used to segment the wiring to be tested. Figure 1 The vertical wires can be quickly and accurately separated, facilitating a highly objective analysis and judgment of the circuit diagram, and greatly improving the efficiency and accuracy of the wiring test.
[0107] In another specific implementation, real data of each power grid company and its subsidiaries in the meter installation and wiring task are obtained in advance, and the target area is marked to create the first wiring segmentation dataset;
[0108] The data types in the first wiring segmentation dataset include various wiring modes, various wiring background boards, and various wiring states at different stages. The wiring mode is divided into three-phase three-wire wiring and three-phase four-wire wiring. In a three-phase power system, three wires are used to transmit power, including three-phase power supply wires (A, B, and C phases) with a phase-to-phase voltage of a phase voltage, but not including a neutral wire (N wire). Three-phase four-wire refers to a three-phase power system that includes a neutral wire (N wire) and a ground wire (PE wire, but not all three-phase four-wire systems include a ground wire) in addition to the three-phase power supply wires (A, B, and C phases). Various wiring background boards include conventional frosted iron surface background boards, wooden texture background boards, and stainless steel hole light surface background boards. Different types of backgrounds have different effects on the wiring segmentation model. The wiring state at each stage includes the wiring state at each step in the standardized table installation wiring process, and the wiring colors are different and the number of wires varies from 1 to 34.
[0109] The first wiring segmentation dataset is divided into a training set, a test set, and a validation set according to a certain proportion for model training. After 80000 iters of training on the self-made dataset, the accuracy (Acc) and the mean intersection over union (mIou) of the wiring segmentation model reach 99.646% and 91.718%, respectively. The size of the wiring segmentation model is 47.2Mb, and the detection speed of the wiring segmentation model is 138ms / step. The wiring segmentation model achieves a good balance in segmentation accuracy, segmentation speed, and model size, and is very suitable for real-time wiring state segmentation in the table installation wiring process.
[0110] It can be understood that when training the wiring segmentation model, the training effect of the model can be improved by adjusting the input size of the image during preprocessing and the number of iterations and learning rate strategy of the model. Through comparative experiments, the detection effects of different configurations of the model on wiring segmentation are compared, and the actual detection effects of the same model at different training rounds are compared longitudinally, and finally a segmentation model with relatively balanced segmentation accuracy and detection speed is selected.
[0111] Embodiment 2
[0112] Based on embodiment 1, this embodiment gives a specific implementation of the table installation and power supply intelligent process detection method, as shown in FIG. 8. Figure 1
[0113] In some embodiments, the table installation and power supply intelligent process detection method comprises:
[0114] The wiring correct detection method in embodiment 1 is used to detect the wiring area in the wiring to be tested to obtain a wrong wiring detection result and a missing wiring detection result. Figure 1
[0115] acquire the wiring state gray scale Figure 1 determine the wiring closed area corresponding to each wire in the wiring state gray scale Figure 1 , and construct a fitting straight line I corresponding to the pixel coordinate points in each wiring closed area;
[0116] determine the minimum circumscribed rectangle of the corresponding wiring closed area based on the fitting straight line I, and measure the straightness of the wire in the vertical direction based on the number of pixel points in each minimum circumscribed rectangle and the pixel area of the corresponding minimum circumscribed rectangle;
[0117] construct a horizontal baseline based on the upper frame of the junction box in the to-be-tested wiring Figure 1 , and measure the perpendicularity of the wire in the vertical direction according to the horizontal baseline and the fitting straight line I in each wiring closed area.
[0118] On the basis of the above-mentioned intelligent process detection method for meter installation and power connection, the embodiment further provides a specific implementation of an intelligent process detection system for meter installation and power connection;
[0119] The intelligent process detection system for meter installation and power connection comprises a wiring correctness detection unit, a straightness measurement unit, and a perpendicularity measurement unit, wherein
[0120] The wiring correctness detection unit uses the wiring correctness detection method in Embodiment 1 to perform wiring correctness detection on the wiring area in the to-be-tested wiring Figure 1 , so as to obtain a wrong wiring detection result and a missing wiring detection result;
[0121] The straightness measurement unit is used to acquire the wiring state gray scale Figure 1 , determine the wiring closed area corresponding to each wire in the wiring state gray scale Figure 1 , and construct a fitting straight line I corresponding to the pixel coordinate points in each wiring closed area; and is further used to determine the minimum circumscribed rectangle of the corresponding wiring closed area based on the fitting straight line I, and measure the straightness of the wire in the vertical direction based on the number of pixel points in each minimum circumscribed rectangle and the pixel area of the corresponding minimum circumscribed rectangle;
[0122] The perpendicularity measurement unit is used to construct a horizontal baseline based on the upper frame of the junction box in the to-be-tested wiring Figure 1 , and measure the perpendicularity of the wire in the vertical direction according to the horizontal baseline and the fitting straight line I in each wiring closed area.
[0123] It should be noted that the intelligent process detection method for meter installation and connection can not only obtain the detection results of incorrect wiring and missing wiring, but also measure the straightness and perpendicularity of the conductors in the vertical direction. It can fully meet the needs of meter installation and connection training and actual testing, which not only improves the efficiency of meter installation and connection process detection, but also quickly and accurately detects complex or hidden wiring errors.
[0124] It should also be noted that the minimum bounding rectangle for each fitted line to determine the corresponding connection area is defined by gradually increasing the width to both sides along the direction of the fitted line until it completely encompasses the coordinates of all pixels, as shown in the attached diagram. Figure 1 As shown. In determining the grayscale of the wiring status. Figure 1 When defining the closed area of each wire, the influence of individual pixels is eliminated by the height of the minimum bounding rectangle of the closed pixel area, thereby filtering the maximum closed area of each wire segment.
[0125] It should also be noted that when measuring the straightness of a vertical conductor, one can calculate the average straightness of all conductors or the straightness of each individual conductor in the vertical direction.
[0126] It should also be noted that straightness measurement uses the intersection-union ratio (IUU) of the pixel points of the connection and the smallest bounding rectangle of the connection as the metric. Based on the straightness of each wire in the vertical direction, the straightness of the connection under test is calculated using the following formula. Figure 1 Average straightness of all conductors in the middle:
[0127]
[0128] Where mIou represents the grayscale of the wiring status. Figure 1 The average straightness of all conductors in the diagram;
[0129] Num i Grayscale representing the wiring status Figure 1 The number of pixels within the minimum bounding rectangle corresponding to the i-th wire, H i The grayscale value indicates the wiring status. Figure 1 The length of the minimum bounding rectangle corresponding to the i-th wire, W i The grayscale value indicates the wiring status. Figure 1 The width of the minimum outer rectangle corresponding to the i-th wire, where n represents the grayscale of the wiring state. Figure 1 The number of wires in the vertical direction.
[0130] It should also be noted that the ratio of the number of pixels within the smallest bounding rectangle to the pixel area of the smallest bounding rectangle is used as the straightness measure. Therefore, the formula for calculating the straightness of the i-th vertical wire is:
[0131]
[0132] The value of i ranges from [1, n].
[0133] It should also be noted that errors in the angle and shooting distance of the wiring images can lead to image tilt or distortion. Therefore, when measuring verticality, it is necessary to automatically construct a horizontal baseline to reduce the error in verticality measurement and lower the false judgment rate. For determining the horizontal baseline, this embodiment uses the upper edge of the junction box. Specifically, a new fitted straight line can be constructed from the 14 lowest points of the wiring in the middle bottom wiring area (i.e., the contact points between the wiring and the junction box) as the horizontal baseline.
[0134] It should also be noted that when measuring the verticality of the conductors in the vertical direction based on the horizontal baseline and the fitted line I in each closed area of the wiring, the verticality of each conductor in the vertical direction can be calculated (the verticality is the angle between the fitted line I corresponding to the conductor and the horizontal baseline), or the overall verticality of all conductors can be calculated.
[0135] When constructing the fitted straight line I for the pixel coordinates within each closed area of the wiring, the least squares method is used to process the pixel coordinates in each wiring information dataset, resulting in the fitted straight line as shown in the attached figure. Figure 1 As shown, the expression is y1 = k1x1 + b1;
[0136]
[0137] Therefore, the formula for calculating the perpendicularity of each conductor is as shown above.
[0138] Example 3
[0139] Based on the above embodiments, this embodiment provides another specific implementation method for intelligent process detection of meter installation and power connection.
[0140] In some embodiments, the intelligent process detection method for meter connection further includes:
[0141] First, the wiring segmentation model is trained using the second wiring segmentation dataset. Then, the obtained wiring under test is processed using the wiring segmentation model trained on the second wiring segmentation dataset. Figure 1 The horizontal conductors are segmented to obtain the grayscale of the wiring status. Figure 1 In this dataset, the labeled objects are the horizontal wires in the second wire segmentation dataset.
[0142] Determine the grayscale of the wiring status. Figure 1corresponding to each wire in the wire connection closed area, and a fitting straight line II corresponding to each pixel coordinate point in each wire connection closed area is constructed;
[0143] based on the wire connection state gray Figure 1 corresponding to the fitting straight line II, a preset level calculation model is used to measure the level of the wire in the to-be-measured wire connection. Figure 1
[0144] In some embodiments, the measurement results of all horizontal wires are integrated to evaluate the level of the entire image or video frame, and therefore the preset level calculation model is:
[0145]
[0146] wherein A represents the level of the wire connection state gray Figure 1 in all horizontal directions, N t represents the total number of pixel points of the wire in the wire connection state gray Figure 1 , and m represents the number of wire connection closed areas in the wire connection state gray Figure 1 ; N j represents the number of wire connection pixel points in the jth wire connection closed area in the wire connection state gray Figure 1 , and A j represents the fitting straight line inclination angle in the jth wire connection closed area in the wire connection state gray
[0147] The fitting straight line in the jth wire connection closed area can be expressed as y3=k3x3+b3, and therefore the fitting straight line inclination angle in the jth wire connection closed area is:
[0148]
[0149] It should be noted that the meter connection and electricity intelligent process detection method of the present embodiment can not only obtain the wrong connection detection result and the missing connection detection result (see embodiment 1), but also can measure the straightness and perpendicularity of the wire in the vertical direction (see embodiment 2), and can also measure the level of the wire in the horizontal direction.
[0150] It should be further noted that the meter connection and electricity intelligent process detection method standardizes and digitizes the process detection in the meter connection and electricity process, greatly reduces the time of manual detection, greatly improves the detection efficiency, and provides a new method and direction for the process detection field.
[0151] On the basis of the meter connection and electricity intelligent process detection method and the meter connection and electricity intelligent process detection system in embodiment 2, the present embodiment further gives another specific implementation of the meter connection and electricity intelligent process detection system;
[0152] The meter installation and power connection intelligent process detection system further comprises a levelness measurement unit, which is configured to train a wiring segmentation model by using a second wiring segmentation dataset, and then use the wiring segmentation model trained by the second wiring segmentation dataset to segment the conductors in the to-be-tested wiring in a horizontal direction to obtain wiring state grayscale Figure 1 Figure 1 The wiring state grayscale is used to measure the levelness of the conductors in the to-be-tested wiring based on a preset levelness calculation model. Figure 1 Figure 1 The wiring state grayscale is used to measure the levelness of the conductors in the to-be-tested wiring based on a preset levelness calculation model.
[0153] It should be further noted that, when measuring the levelness, the wiring segmentation model used is also the PP_LiteSeg segmentation model; the difference lies in that different datasets are used to train the wiring segmentation model, and the wiring segmentation model trained by different datasets outputs different prediction results.
[0154] It should be further noted that the to-be-tested wiring Figure 1 and the to-be-tested wiring Figure 1 are images collected manually or automatically during the wiring process from the input image or video frame. The image or video frame is acquired in real time by an industrial camera and transmitted to the server in the form of a video stream. The server performs frame extraction processing, which can process image information faster and give result feedback.
[0155] It should be further noted that, when performing meter installation and power connection intelligent process detection, the to-be-tested wiring Figure 1 and the to-be-tested wiring Figure 1 may be the same image. The wiring segmentation model trained by different datasets is used to segment the same image to segment the conductors in the vertical direction and the conductors in the horizontal direction, respectively. Figure 1 and the to-be-tested wiring Figure 1 may be different images in different regions of the same hardware device. The wiring segmentation model trained by different datasets is used to segment different images to segment the conductors in the vertical direction and the conductors in the horizontal direction, respectively.
[0156] It should be further noted that an image may contain both conductors in the vertical direction and conductors in the horizontal direction. In order to improve the segmentation efficiency, the conductors in the horizontal direction and the conductors in the vertical direction can also be labeled on an image in advance (they correspond to different labels, as shown in FIGS. 6 and 7, the vertical conductors above the wiring box are labeled as L1-L10, R1-R10, and D1-D14; the vertical conductors below the wiring box are labeled as V1-V10, and the horizontal wiring is labeled as H1-H10); as shown in FIGS. 8 and 9, the conductors in the horizontal direction and the conductors in the vertical direction are labeled on the same image. Figure 1 6(b) As shown in Figs. 7(a) and 7(b), when the splitting processing is performed, the wires in the vertical direction and the wires in the horizontal direction on the same image are split, the wires in the vertical direction are subjected to the connection correctness detection, the straightness measurement, and the perpendicularity measurement, and the wires in the horizontal direction are subjected to the horizontality measurement.
[0157] In a specific embodiment, the to-be-tested connection Figure 1 and the to-be-tested connection Figure 1 are of the same image, which contains the wires in the vertical direction and the wires in the horizontal direction, and the prediction result image, the line sequence result image (the target detection result image in which each connection is individually framed by a corresponding color frame), and the perpendicularity result image (in which the perpendicularity is displayed at the upper end of each connection) are obtained after the splitting processing, as shown in Fig. 7(c). Figure 1
[0158] Embodiment 4
[0159] Based on the above-mentioned embodiments, another specific embodiment of the intelligent process detection method for meter installation and connection is given, as shown in the accompanying drawings. Figure 1
[0160] In some embodiments, the intelligent process detection method for meter installation and connection further comprises:
[0161] pre-constructing a copper exposure detection model;
[0162] processing the acquired to-be-tested connection image III by using the copper exposure detection model trained by the first copper leakage data set to detect the connection box region and the electric energy meter connection region;
[0163] detecting the copper exposure region by using the copper exposure detection model trained by the second copper leakage data set to detect the connection box region and the electric energy meter connection region;
[0164] determining the real copper exposure size based on the scale and the pixel value of the copper exposure region, wherein the scale is the ratio between the pixel width of the detected connection box region and the real width of the connection box.
[0165] Based on the above-mentioned intelligent process detection method for meter installation and connection and the intelligent process detection system for meter installation and connection in Embodiment 2 or 3, another specific embodiment of the intelligent process detection system for meter installation and connection is given.
[0166] The intelligent process detection system for meter installation and connection further comprises a horizontality measurement unit and / or a copper exposure detection unit, wherein
[0167] The horizontality measurement unit is configured to train the connection splitting model by using the second connection splitting data set, and then perform the horizontality measurement on the to-be-tested connection image II by using the connection splitting model trained by the second connection splitting data set. Figure 1 The conductor in the middle horizontal direction is segmented to obtain a connection state gray scale Figure 1 ; also used for detecting the connection state gray scale Figure 1 The corresponding fitting straight line II, using a preset level calculation model, measures the level of the conductor in the to-be-measured connection Figure 1 .
[0168] The exposed copper detection unit is configured to pre-construct an exposed copper detection model, and also configured to process the acquired to-be-measured connection diagram III by using the exposed copper detection model trained by the first copper leakage data set, to detect the connection box region and the electric energy meter connection region in the to-be-measured connection diagram III, and also configured to detect the exposed copper region by using the exposed copper detection model trained by the second copper leakage data set, to detect the exposed copper region, and also configured to determine the real exposed copper size based on the scale and the pixel value of the exposed copper region, with the ratio between the pixel width of the detected connection box region and the real width of the connection box as the scale.
[0169] It should be noted that during the meter connection, the exposed copper wire may cause electric shock and short circuit, which may threaten the health and safety of personnel and equipment. Therefore, the exposed copper detection is particularly important in the meter connection task. The exposed copper detection in the embodiment mainly detects the exposed copper wire of the conductor, the connection box and the electric meter contact position. The exposed copper belongs to a small scale target, and the proportion in the connection image is relatively small, so it is relatively difficult to identify the exposed copper. For the detection of such small targets as exposed copper, the present application adopts secondary detection, first detects the electric energy meter connection region and the connection box region, and then detects the exposed copper in the region to reduce the interference of the background to the small scale target as much as possible. While detecting the exposed copper, the pixel width of the connection box is also detected, and the ratio between the pixel width and the real width of the connection box is used as a scale, so that the area or perimeter of the exposed copper part in the image can be measured by the pixel value of the exposed copper to evaluate its size.
[0170] In some embodiments, the exposed copper detection model is constructed by using a YOLOv5 target detection algorithm.
[0171] It should be noted that when the YOLOv5 target detection algorithm is used for the first time, the connection box region can be detected. The connection box region is a region with the same width as the connection box, so the pixel width of the connection box region can be calculated through the target detection result of this time.
[0172] It should also be noted that when the YOLOv5 target detection algorithm is used for the second time, the exposed copper region can be detected, so the pixel value (pixel y value difference) of the exposed copper region can be calculated through the target detection result of this time.
[0173] It should be noted that the actual width of the terminal box can be obtained by prior measurement. The specific steps of determining the actual copper exposure size based on the scale and the pixel value of the copper exposure area are not described here.
[0174] In a specific embodiment, the copper exposure detection result is as shown in FIG. 6, and the copper exposure size is displayed in the copper exposure area respectively. Figure 1
[0175] It should be noted that before training the copper exposure detection model, the image of the copper exposure part is manually or automatically collected from the input image or video frame, and the first copper leakage data set (annotated objects are the terminal box area and the electric energy meter wiring area) and the second copper leakage data set (annotated objects are the copper exposure area) are made for subsequent model training. The first copper leakage data set and the second copper leakage data set both include samples of different angles, lighting conditions and different scale copper exposure conditions.
[0176] It should be noted that in the training process, the performance of the model is optimized by adjusting the model parameters (such as input size and channel number), increasing the training rounds and using data enhancement techniques (preprocessing operations, including random rotation, symmetry processing, single-channel output, etc.).
[0177] It should be noted that the present application uses a neural network model and an image processing algorithm to automatically detect and analyze process problems in the circuit image, such as the perpendicularity, straightness, levelness of wiring and whether there is copper exposure, etc. It is an important link to ensure the quality of work, which not only improves the efficiency and accuracy of process detection, but also provides strong support for process improvement and optimization.
[0178] It should be noted that the meter installation and electricity connection correct and wrong judgment and process analysis method based on deep learning segmentation technology of the present application can be combined with the smart grid system to lay a solid foundation for realizing the intelligent management of meter installation and electricity connection.
[0179] Embodiment 5
[0180] On the basis of the above-mentioned embodiments, this embodiment gives a specific implementation of a computer device.
[0181] In some embodiments, the computer includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete the communication among each other through the communication bus.
[0182] The memory is used to store computer programs.
[0183] The processor is used to execute the programs stored on the memory, and realizes the wiring correct and wrong detection method in embodiment 1, or the meter installation and electricity connection intelligent process detection method in embodiment 2 or 3 or 4.
[0184] It should be noted that the embodiment is an intelligent detection equipment specially designed for the power and communication industry, aiming to improve the quality and efficiency of meter installation and wiring process, and ensure the safety and stability of network topology. The equipment integrates high-precision measurement module and intelligent identification system, which can automatically detect errors and hidden dangers in wiring process and feedback detection results in real time, providing accurate guidance for operators.
[0185] Specifically, the computer device can be a terminal, and its external structure diagram can be as shown in Figure 1 Those skilled in the art can understand that Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure 1 Figure The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0186] Embodiment 6
[0187] On the basis of the above-mentioned embodiments, the present embodiment provides a readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the wiring correctness detection method in embodiment 1, or the meter installation and wiring intelligent process detection method in embodiment 2 or 3 or 4.
[0188] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0189] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0190] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for detecting wiring errors, characterized in that, include: A wiring segmentation model is pre-built, and a first wiring segmentation dataset is configured; The wiring segmentation model is trained using the first wiring segmentation dataset; Obtain the wiring diagram to be tested I, and use the wiring segmentation model trained on the first wiring segmentation dataset to segment the vertical wires in the wiring diagram to be tested I to obtain the wiring state grayscale image I; wherein, different grayscale values in the wiring state grayscale image I correspond to different labels, and the label refers to the unique identifier assigned to the different colored wires at different wiring positions in the wiring diagram. When the corresponding wiring position in the grayscale image I of the wiring status is not empty, the wiring color detection result is determined based on the pre-established association relationship and the grayscale value corresponding to each wire in the grayscale image I of the wiring status; wherein, the wiring color detection result refers to the color of the wire at different wiring positions in the grayscale image I of the wiring status, and the association relationship refers to the pre-established mapping relationship between different labels and different grayscale values; Based on the wiring color detection results, a wiring sequence array to be tested is determined; wherein, different element symbols in the wiring sequence array to be tested correspond to different wiring colors and wiring states; When the corresponding wiring position in the grayscale image I of the wiring status is empty, the element symbol at the corresponding position in the wiring sequence array to be tested is set to a, where a indicates that there is a missing wire at the corresponding wiring position; Obtain a pre-configured reference wiring sequence array, compare the wiring sequence array to be tested with the reference wiring sequence array, and obtain a correct / incorrect detection wiring sequence array based on the comparison result; wherein, different element symbols in the correct / incorrect detection wiring sequence array represent different wiring sequence detection results, element symbol a indicates that there is a missing wire at the corresponding wiring position, element symbol b indicates that the wiring color at the corresponding wiring position is correct, and element symbol c indicates that the wiring color at the corresponding wiring position is incorrect; Based on the correct and incorrect wire sequence array, the incorrect wiring detection results and missing wiring detection results corresponding to the wiring diagram I to be tested are obtained.
2. The wiring error detection method according to claim 1, characterized in that, When the incorrect wiring detection result and the missing wiring detection result corresponding to the wiring diagram I under test are obtained based on the correct and incorrect wiring sequence array, the following steps are executed: The incorrect wiring detection result is determined based on the number and position of the element symbol 'c' in the correct / incorrect wiring sequence array; wherein, the incorrect wiring detection result refers to the number and position of incorrect wiring in the wiring diagram I to be tested; The missing wire detection result is determined based on the number and position of element symbol 'a' in the correctness detection line sequence array; wherein, the missing wire detection result refers to the number and position of missing wires in the wiring diagram I to be tested.
3. A method for detecting intelligent processes involving meter installation and power connection, characterized in that, include: Using the wiring error detection method described in claim 1 or 2, the wiring area in the wiring diagram I to be tested is used to detect wiring errors, so as to obtain incorrect wiring detection results and missing wiring detection results; Obtain the grayscale image I of the wiring status, determine the closed area of the wiring corresponding to each wire in the grayscale image I of the wiring status, and construct the fitting straight line I corresponding to the pixel coordinate points in each closed area of the wiring. Based on the fitted straight line I, the minimum bounding rectangle of the corresponding closed area is determined. Based on the number of pixels in each minimum bounding rectangle and the pixel area of the corresponding minimum bounding rectangle, the straightness of the wire in the vertical direction is measured. Based on the upper border of the junction box in the wiring diagram I to be tested, a horizontal baseline is constructed; according to the horizontal baseline and the fitted straight line I in each wiring closed area, the verticality of the wires in the vertical direction is measured.
4. The intelligent process detection method for meter installation and power connection according to claim 3, characterized in that, Also includes: First, the wiring segmentation model is trained using the second wiring segmentation dataset. Then, the wiring segmentation model trained using the second wiring segmentation dataset is used to segment the horizontal wires in the obtained wiring diagram II to obtain the grayscale image II of the wiring status. Based on the fitted straight line II corresponding to the grayscale image II of the wiring state, the horizontality of the conductors in the wiring diagram II to be tested is measured using a preset horizontality calculation model.
5. The intelligent process detection method for meter installation and connection according to claim 3 or 4, characterized in that, Also includes: Pre-build a copper exposure detection model; Using the copper exposure detection model trained on the first copper leakage dataset, the obtained wiring diagram III to be tested is processed to detect the junction box area and the electricity meter wiring area in the wiring diagram III to be tested. Using the exposed copper detection model trained on the second exposed copper dataset, the junction box area and the electricity meter wiring area are detected, and the exposed copper area is identified. The ratio between the detected pixel width of the junction box area and the actual width of the junction box is used as a scale. Based on the scale and the pixel value of the exposed copper area, the actual exposed copper size is determined.
6. A wiring error detection system, characterized in that, It includes a model management module, a segmentation module, a wiring color detection module, a wiring sequence determination module, and a correctness / error detection module. The model management module is used to pre-build a wiring segmentation model and configure a first wiring segmentation dataset; it is also used to train the wiring segmentation model using the first wiring segmentation dataset. The segmentation module is used to acquire the wiring diagram to be tested I, and use the wiring segmentation model trained on the first wiring segmentation dataset to segment the vertical wires in the wiring diagram to be tested I to obtain the wiring state grayscale image I; wherein, different grayscale values in the wiring state grayscale image I correspond to different labels, and the label refers to the unique identifier assigned to the different colored wires at different wiring positions in the wiring diagram. The wiring color detection module is used to determine the wiring color detection result based on the grayscale value of each wire in the wiring state grayscale image I when the corresponding wiring position is not empty, based on a pre-established association relationship; wherein, the wiring color detection result refers to the color of the wire at different wiring positions in the wiring state grayscale image I, and the association relationship refers to the pre-established mapping relationship between different labels and different grayscale values. The wiring sequence determination module is used to determine the wiring sequence array to be tested based on the wiring color detection result; it is also used to set the element symbol at the corresponding position in the wiring sequence array to be tested to 'a' when the corresponding wiring position in the grayscale image I of the wiring status is empty, where 'a' indicates that there is a missing wire at the corresponding wiring position; wherein, different element symbols in the wiring sequence array to be tested correspond to different wiring colors and wiring statuses. The correctness detection module is used to obtain a pre-configured reference wiring sequence array, compare the wiring sequence array to be tested with the reference wiring sequence array, and obtain a correctness detection wiring sequence array based on the comparison result; it is also used to obtain the incorrect wiring detection result and the missing wiring detection result corresponding to the wiring diagram I to be tested based on the correctness detection wiring sequence array; wherein, different element symbols in the correctness detection wiring sequence array represent different wiring sequence detection results, element symbol a indicates that there is a missing wiring at the corresponding wiring position, element symbol b indicates that the wiring color at the corresponding wiring position is correct, and element symbol c indicates that the wiring color at the corresponding wiring position is incorrect.
7. A smart process detection system for meter installation and power connection, characterized in that, It includes a wiring correctness detection unit, a straightness measurement unit, and a perpendicularity measurement unit, among which, The wiring error detection unit uses the wiring error detection method described in claim 1 or 2 to perform wiring error detection on the wiring area in the wiring diagram I to be tested, so as to obtain the incorrect wiring detection result and the missing wiring detection result. The straightness measurement unit is used to acquire the grayscale image I of the wiring state, determine the wiring closed area corresponding to each wire in the grayscale image I of the wiring state, and construct the fitting line I corresponding to the pixel coordinate points in each wiring closed area; it is also used to determine the minimum bounding rectangle of the corresponding wiring closed area based on the fitting line I, and to measure the straightness of the wire in the vertical direction based on the number of pixels in each minimum bounding rectangle and the pixel area of the corresponding minimum bounding rectangle. The verticality measurement unit is used to construct a horizontal baseline based on the upper frame of the junction box in the wiring diagram I to be tested; and to measure the verticality of the conductors in the vertical direction according to the horizontal baseline and the fitted straight line I in each wiring closed area.
8. The intelligent process detection system for meter installation and power connection according to claim 7, characterized in that, It also includes a levelness measurement unit and / or an exposed copper detection unit, wherein, The levelness measurement unit is used to first train the wiring segmentation model using the second wiring segmentation dataset, and then use the wiring segmentation model trained by the second wiring segmentation dataset to segment the horizontal wires in the obtained wiring diagram II to obtain the wiring state grayscale image II; it is also used to measure the levelness of the wires in the wiring diagram II to be tested based on the fitted line II corresponding to the wiring state grayscale image II and using a preset levelness calculation model. The exposed copper detection unit is used to pre-build an exposed copper detection model; it is also used to process the acquired wiring diagram III under test using the exposed copper detection model trained on the first exposed copper dataset, and detect the junction box area and the electricity meter wiring area in the wiring diagram III under test; it is also used to detect the junction box area and the electricity meter wiring area using the exposed copper detection model trained on the second exposed copper dataset, and detect the exposed copper area; it is also used to determine the actual exposed copper size based on the ratio between the pixel width of the detected junction box area and the actual width of the junction box as a scale and the pixel value of the exposed copper area.
9. A computer device, characterized in that: It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in a memory, it implements the wiring error detection method as described in any one of claims 1 or 2, or the intelligent process detection method for meter installation and power connection as described in any one of claims 3 to 5.
10. A readable storage medium, characterized in that: It stores instructions that, when executed by one or more processors, cause the processors to perform the wiring correctness detection method as described in claim 1 or 2, or the intelligent process detection method for meter installation and power connection as described in any one of claims 3 to 5.
Citation Information
Patent Citations
Electric energy meter assembly process detection device and method based on deep learning image recognition
CN116893386B
Intelligent wiring terminal comparison method and system, computer equipment and storage medium
CN114494681A
PCB line sequence detection method and system based on image recognition
CN115239690A