Optical distribution facility port management method and device, electronic equipment and storage medium

The port lattice diagram of the optical distribution facility is generated through the port detection model and compared with the resource management system, which solves the problem of low efficiency in port resource management of the optical distribution facility and achieves automated management and accurate comparison.

CN118736237APending Publication Date: 2024-10-01CHINA TELECOM CORP LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410099968.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-24
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The port resource accuracy management efficiency of optical transfer boxes and optical distribution frames in optical distribution facilities is low, resulting in manual verification of manual records one by one, which is inefficient.

Method used

The port image of the optical distribution facility is detected through the port detection model, a port lattice diagram is generated, and compared with the port resource data in the resource management system, the bounding box and status of the missing port are determined, and automated management is achieved.

Benefits of technology

It improves the efficiency of port management of optical distribution facilities, avoids manual recording, and achieves accurate management and comparison of port data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736237A_ABST
    Figure CN118736237A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an optical distribution facility port management method and device, electronic equipment and a storage medium, and the method comprises the steps: carrying out the port detection of a port image of a target optical distribution facility through a port detection model, and obtaining a bounding box and a port state of each detection port in the port image; determining a bounding box and a port state of a missing port in the port image according to the bounding box of each detection port, and generating a port lattice diagram of the target optical distribution facility according to the bounding box and the port state of each port, the ports including the detection ports and the missing port; and comparing the port lattice diagram with the port resource data of the target optical distribution facility in the resource management system to obtain a port comparison result. According to the embodiment of the invention, the mode of manually checking ports one by one on site and manually recording for management is avoided, and the port management efficiency of the optical distribution facility is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular, to a method, device, electronic device and storage medium for managing ports of optical distribution facilities. Background Art

[0002] In the communication network, the optical distribution facility is a node device that connects the various optical cable segments in the optical cable network. It is also a passive optical device that optically couples the optical fibers on both sides. The role of the optical distribution facility in the optical fiber communication system is to connect the optical cable and the equipment to complete the networking. It can not only act as a connector but also dispatch the optical fiber. When a large number of optical fiber connections need to be processed in a large-scale communication network, the accuracy of the optical distribution facility resources directly affects the efficiency of resource allocation and service activation.

[0003] However, the resource accuracy management of optical cross-connect boxes and optical distribution frames in optical distribution facilities has always been a difficult problem in the industry. Since the port resources of optical distribution facilities are relatively dense and each port has a label, it will cause a lot of obstruction to the port occupancy, resulting in fewer ports that can be identified through image recognition. The ports are difficult to locate and cannot be compared with the data in the existing resource management system. Therefore, the current management is mainly carried out by manually checking and recording each port on site, resulting in low port resource management efficiency. Summary of the invention

[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for managing ports of optical distribution facilities, which are helpful to improve the management efficiency of port resources.

[0005] In order to solve the above problems, in a first aspect, an embodiment of the present application provides a method for managing an optical distribution facility port, comprising:

[0006] Perform port detection on the port image of the target optical distribution facility by using the port detection model to obtain the boundary box and port status of each detection port in the port image;

[0007] Determining the bounding boxes and port states of missing ports in the port image according to the bounding boxes of each of the detection ports, and generating a port dot matrix of the target optical distribution facility according to the bounding boxes and port states of each port, the ports including the detection ports and the missing ports;

[0008] The port dot matrix diagram is compared with the port resource data of the target optical distribution facility in the resource management system to obtain a port comparison result.

[0009] In a second aspect, an embodiment of the present application provides an optical distribution facility port management device, including:

[0010] A port detection module, used to perform port detection on the port image of the target optical distribution facility through a port detection model, and obtain a boundary box and a port state of each detection port in the port image;

[0011] a dot map generation module, for determining the bounding boxes and port states of the missing ports in the port image according to the bounding boxes of the detection ports, and generating a port dot map of the target optical distribution facility according to the bounding boxes and port states of the ports, the ports including the detection ports and the missing ports;

[0012] The port comparison module is used to compare the port dot matrix diagram with the port resource data of the target optical distribution facility in the resource management system to obtain a port comparison result.

[0013] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the optical distribution facility port management method described in the embodiment of the present application when executing the computer program.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the optical distribution facility port management method disclosed in the embodiment of the present application are performed.

[0015] The optical distribution facility port management method, device, electronic device and storage medium provided in the embodiments of the present application perform port detection on the port image of the target optical distribution facility through a port detection model to obtain the bounding box and port status of each detected port in the port image, determine the bounding box and port status of the missing port in the port image based on the bounding box of each detected port, and generate a port dot matrix map of the target optical distribution facility based on the bounding box and port status of each port, and compare the port dot matrix map with the port resource data of the target optical distribution facility in the resource management system to obtain a port comparison result. Since the bounding box and port status of the missing port are determined based on the bounding box of each detected port and a port dot matrix map is generated, the image detection data can be compared with the port resource data in the resource management system, thereby realizing the management of port data, avoiding the management by manual on-site verification and manual recording of each port, and improving the port management efficiency of the optical distribution facility. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0017] Figure 1 is a flow chart of a method for managing optical distribution facility ports provided by an embodiment of the present application;

[0018] Figure 2 is a flow chart of a method for managing optical distribution facility ports provided by an embodiment of the present application;

[0019] Figure 3 is an example diagram of the detection result of the port image in the embodiment of the present application;

[0020] Figure 4 is a schematic diagram of the system architecture of the optical distribution facility port management method in an embodiment of the present application;

[0021] Figure 5 is a flow chart of a method for managing optical distribution facility ports provided by an embodiment of the present application;

[0022] Figure 6 is a schematic diagram of the coordinate information of the bounding box of the detection port in an embodiment of the present application;

[0023] Figure 7 is a schematic diagram of the bounding box information after the detection port branches are sorted in an embodiment of the present application;

[0024] Figure 8 This is an example diagram of a picture of an optical cross-connection box port detection in an embodiment of the present application;

[0025] Fig. 9 is a schematic diagram of the bounding box information after the port adds row and column information in an embodiment of the present application;

[0026] Fig.10 It is a schematic diagram of the processing process of the optical distribution facility port management method in an embodiment of the present application;

[0027] Fig.11 It is a structural schematic diagram of an optical distribution facility port management device provided in an embodiment of the present application;

[0028] Fig.12 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0030] Figure 1is a flow chart of a method for managing optical distribution facility ports provided by an embodiment of the present application, such as Figure 1 As shown, the method includes: step 110 to step 130.

[0031] Step 110: Perform port detection on the port image of the target optical distribution facility by using a port detection model to obtain a boundary box and a port status of each detected port in the port image.

[0032] The port detection model is a target detection model based on a neural network. The detected port is a port detected in the port image by the port detection model.

[0033] The optical distribution facility images generated during the operator's on-site maintenance work can be collected, and the image annotation tool (lableimg) can be used to annotate the occupancy status and location of the ports in the images. The annotated data can be used as a data set, and the YOLOv5 target detection algorithm can be used to train the port detection model based on the data set to obtain a trained port detection model. Among them, the optical distribution facilities include ODF (Optical Distribution Frame, fiber distribution frame) and optical junction boxes. ODF is used for the termination and distribution of the trunk optical cable at the local end of the optical fiber communication system, which can easily realize the connection, distribution and scheduling of optical fiber lines. YOLOv5 (You Only Look Once version 5) is a target detection model used to identify and locate objects in videos or images.

[0034] Based on the trained port detection model, the port image of the target optical distribution facility is identified, and the port status and bounding box of each detection port in the port image are obtained. Among them, the bounding box refers to a directed rectangular box used to represent the position and size of an object (port) in target detection. The bounding box includes the four vertex coordinates of the bounding box (Bbox), namely the left X-axis coordinate (xmin), the right X-axis coordinate (xmax), the upper Y-axis coordinate (ymin), and the lower Y-axis coordinate (ymax) of the bounding box. The port status of the detection port includes an idle state or an occupied state. "1" can be used to represent the idle state, and "0" can be used to represent the occupied state.

[0035] Step 120, determining the bounding box and port status of the missing port in the port image according to the bounding box of each detection port, and generating a port dot matrix of the target optical distribution facility according to the bounding box and port status of each port, wherein the ports include the detection port and the missing port.

[0036] The port dot matrix diagram is a matrix arrangement of the ports, which gives the row and column of each port and the port status.

[0037] In an exemplary embodiment, each detection port can be sorted by row according to the bounding box of each detection port, and based on the row sorting result, the position and port status of the missing port can be determined, and the missing port can be filled. In the row sorting result after filling the missing port, each port can be sorted by row in a column to obtain a column sorting result, and the row sorting result, the column sorting result and the port status of each port can be combined to generate a port dot matrix diagram of all ports in the target optical distribution facility.

[0038] In another exemplary embodiment, each detection port can be sorted in columns according to the bounding box of each detection port, and based on the column sorting result, the position and port status of the missing port can be determined, and the missing port can be filled. In the column sorting result after filling the missing port, each port can be sorted in rows by column to obtain the row sorting result, and the column sorting result, the row sorting result and the port status of each port can be combined to generate a port dot matrix diagram of all ports in the target optical distribution facility.

[0039] Step 130: compare the port dot matrix with the port resource data of the target optical distribution facility in the resource management system to obtain a port comparison result.

[0040] An interface for obtaining the port information of the optical distribution facility in the resource management system (cloud network resource center) is established. The interface outputs the port resource data. The port resource data includes the facility code, facility ID, facility name of the optical distribution facility, and the detailed code, name, row and column number and occupancy status information of each port.

[0041] The port row and column information in the port dot matrix is ​​matched with the row and column information in the port resource data, and the port status of the detection port is compared with the port status of the corresponding port in the port resource data to compare whether the port usage status (including port occupation and idle status) is consistent. For missing ports added by the algorithm due to port obstruction and other reasons, only the port position information (bounding box) is matched, and the port usage status is not compared.

[0042] The comparison result is returned in the form of an API (Application Programming Interface) interface text file, and the API interface is returned to the interface caller. At the same time, the comparison result data is stored in the form of a text file in the network resource data sharing platform of the cloud network resource center (resource management system).

[0043] In the embodiment of the present application, the input of the port image, the generation of the dot map and the comparison of the resource data can be encapsulated as an interface or function respectively, and the Flask technology of python can be used to realize the encapsulation of the interface capability according to the standard of openAPI. For the port image input, the request method in Flask can be used to complete the reading of the interface input port image, and the port image is converted to base64 encoded data, and then the data is converted to an array in Numpy, and the port image is converted to RGB format through color space conversion. For the generation of the optical distribution facility dot map, the optical distribution facility dot map generation algorithm (i.e., step 110 and step 120) can be encapsulated as a function, the function is called, the input port image data is detected and analyzed, and the result of the port dot map obtained by reasoning is converted into data in json format. For the comparison of resource data, it can be encapsulated as an interface, and the interface is called to complete the comparison of the port dot map and the port resource data in the resource management system. The optical distribution facility dot map generation algorithm is embedded in the inspection execution application, and the port image taken of the optical distribution facilities such as the optical transfer box can be obtained in real time in the inspection process, and the interface is called to realize the detection of the facility port in the port image. By encapsulating image detection capabilities and resource data comparison capabilities into openAPI interfaces, real-time intelligent inspection and management of port resource data is achieved. Flask is a lightweight Web application framework written in Python. Numpy is an open source numerical computing extension of Python, which can be used to store and process large matrices.

[0044] The optical distribution facility port management method provided in the embodiment of the present application performs port detection on the port image of the target optical distribution facility through a port detection model to obtain the bounding box and port status of each detected port in the port image, determines the bounding box and port status of the missing port in the port image based on the bounding box of each detected port, and generates a port dot matrix map of the target optical distribution facility based on the bounding box and port status of each port, and compares the port dot matrix map with the port resource data of the target optical distribution facility in the resource management system to obtain a port comparison result. Since the bounding box and port status of the missing port are determined based on the bounding box of each detected port and a port dot matrix map is generated, the image detection data can be compared with the port resource data in the resource management system, thereby realizing the management of port data, avoiding the management by manual on-site verification and manual recording of each port, and improving the port management efficiency of the optical distribution facility.

[0045] Figure 2 is a flow chart of a method for managing optical distribution facility ports provided by an embodiment of the present application, such as Figure 2 As shown, the method includes: step 210 to step 260.

[0046] Step 210: Perform port detection on the port image of the target optical distribution facility by using the port detection model to obtain the boundary box and port status of each detected port in the port image.

[0047] Step 220 , sorting the detection ports by row according to the boundary boxes of the detection ports to obtain a row sorting result.

[0048] According to the Y-axis information in the bounding box of each detection port, each detection port is sorted by row, the detection ports belonging to the same row are determined, and the row number of each row is determined to obtain the row sorting result.

[0049] In one embodiment of the present invention, the step of sorting the detection ports by row according to the bounding boxes of the detection ports to obtain the sorting results by row includes:

[0050] Determine the center point coordinates of each detection port according to the bounding box of each detection port, and determine the size median of all the detection ports, wherein the size median includes the X-axis size median and the Y-axis size median;

[0051] Sorting the detection ports according to the Y-axis coordinate of the center point in the center point coordinates, and taking the first detection port after sorting as the reference port of the first row;

[0052] Determine the difference between the Y-axis coordinate of the center point of the detection port and the Y-axis coordinate of the center point of the reference port in sequence according to the order of the detection ports after the reference port;

[0053] When the difference is less than the first row spacing threshold, it is determined that the current detection port and the reference port are located in the same row; when the difference is greater than or equal to the first row spacing threshold, it is determined that the current detection port is located in the next row of the reference port, and the current detection port is used as the reference port of the next row, and the operation of determining the difference and the row where each detection port is located is cyclically performed until the row where all detection ports are located is determined, and the row sorting result is obtained, wherein the first row spacing threshold is determined based on the median of the Y-axis size and the first row spacing threshold coefficient.

[0054] The center point coordinates include the center point X-axis coordinates and the center point Y-axis coordinates. The X-axis size median is the median of the width of the bounding boxes of all detection ports, and the Y-axis size median is the median of the height of the bounding boxes of all detection ports.

[0055] According to the bounding box of each detection port, the coordinate information of the center point of the bounding box of each detection port in the X-axis and Y-axis directions is calculated to obtain the X-axis coordinate (x_center) and Y-axis coordinate (y_center) of the center point, and the median of the size of the bounding box of all detection ports in the X-axis and Y-axis directions is calculated to obtain the median of the X-axis size (xscale_mean) and the median of the Y-axis size (yscale_mean).

[0056] Traverse all the detection ports and sort them in ascending order according to the Y-axis coordinate of the center point (y_center) to form a list. Use the first detection port in the list as the reference port of the first row, and initialize the Y-axis coordinate of the center point of the first detection port to the Y-axis coordinate of the center point of the reference port (row_start_y).

[0057] Start traversing the list from the reference port after the reference port, calculate the difference between the Y-axis coordinate of the center point of the currently traversed detection port and the Y-axis coordinate of the center point of the reference port, and determine whether the difference is less than the first row spacing threshold. If the difference is less than the first row spacing threshold, determine that the currently traversed detection port and the reference port are in the same row. If the difference is greater than or equal to the first row spacing threshold, determine that the currently traversed detection port is in the next row of the reference port, the row number of the next row is the row number of the row where the reference port is located plus 1, and use the currently traversed detection port as the reference port of the next row, initialize the Y-axis coordinate of the center point of the detection port to the Y-axis coordinate of the center point of the reference port in the next row (row_start_y), determine the row where the currently traversed detection port is located, continue to traverse the next detection port, and use the next detection port as the currently traversed detection port, and determine the row where the detection port is located in the same way, until the row where each detection port is located is determined, and obtain the row sorting results of all detection ports. The first line spacing threshold is the product of the first line spacing threshold coefficient (k1) and the Y-axis size median (yscale_mean), k1*yscale_mean.

[0058] By sorting the detection ports according to the Y-axis coordinate of the center point and determining the row where each detection port is located in sequence, the row where each detection port is located can be accurately determined, thereby improving the accuracy of row information determination.

[0059] Step 230 , filling missing ports in the branch sorting result according to the bounding box of each of the detection ports and the branch sorting result, and determining the port status of each of the missing ports.

[0060] The number of ports in a row of the target optical distribution facility is fixed. The position of the missing port can be determined based on the fixed number and the bounding box of each detection port in the same row in the row sorting result, and the missing port can be filled in at this position. The state of the missing port can be an obstructed state.

[0061] In one embodiment of the present application, the filling of missing ports in the branch sorting result according to the bounding boxes of each of the detection ports and the branch sorting result, and determining the port status of each missing port, includes: traversing all rows in the branch sorting result, and when the spacing between two adjacent rows is greater than or equal to a second row spacing threshold, adding a new row between the two adjacent rows, and determining the bounding boxes of the missing ports to be filled in the new row according to the bounding boxes of each detection port in the two adjacent rows, adding the determined missing ports to the new row, and determining that the port status of the missing ports is an empty row; in the branch sorting result after the row is filled, determining a target row whose number of ports is less than a target number, and filling the missing ports in the target row according to the bounding boxes of each port in the target row, and determining that the port status of the filled missing ports is an obstructed state.

[0062] The second row spacing threshold is determined according to the median of the Y-axis size of the detection port and the second row spacing threshold coefficient, and can be the product of the median of the Y-axis size (yscale_mean) and the second row spacing threshold coefficient (k2), k2*yscale_mean. The second row spacing threshold coefficient can be a coefficient value determined according to the spacing between the rows of ports of the target optical distribution facility and the height of the port.

[0063] In some cases, there may be some locations in the target optical distribution facility where no boards are plugged in and no ports actually exist, such as Figure 3 As shown, Figure 3 The ports in rows 11-12 of the Zhongguang junction box do not exist. However, in the operator's resource management system, facilities are managed according to unified specifications, and the area without plug-ins will be numbered in order. In order to ensure that the image recognition data can be compared with the port resource data in the resource management system, this area needs to be filled.

[0064] There may be a situation in the port image where the entire row is not recognized. All rows can be traversed. If the spacing between two adjacent rows is greater than or equal to the second row spacing threshold, a new row is added between the two adjacent rows and a missing port is filled in the new row. The port state of the missing port is determined to be an empty row, and "3" can be used to represent the state "empty row". The bounding box (Bbox) information of the filled missing port is as follows: the left X-axis coordinate (xmin) is the minimum left X-axis coordinate (xmin) of the ports in the previous row of two adjacent rows; the right X-axis coordinate (xmax) is the sum of the left X-axis coordinate of the bounding box and the median of the X-axis size (xmin+xscale_mean); the upper Y-axis coordinate (ymin) is the sum of the maximum upper Y-axis coordinate in the previous row of two adjacent rows and the third row spacing threshold (k3*yscale_mean, k3 is the third row spacing coefficient, yscale_mean is the median of the Y-axis size) ymin+k3*yscale_min, k3 is the row spacing coefficient; the lower Y-axis coordinate (ymax) is the sum of the upper Y-axis coordinate of the bounding box and the median of the Y-axis size (ymin+yscale_mean).

[0065] In the row sorting result after filling the row, the number of ports in each row is calculated, and the number of ports in each row is compared with the target number, and the row with the number of ports less than the target number is determined as the target row, and the position and bounding box information of the missing port in the target row are determined according to the bounding box of each port in the target row and the bounding box of the port in other rows, and the missing port is filled at the position, and the port state of the filled missing port is determined to be the blocked state. Among them, the target number is the number of ports in a row of the target optical distribution facility, for example, it can be 12.

[0066] By traversing all the rows in the branch sorting results, filling the empty rows based on the spacing between two adjacent rows, and filling the missing ports based on the branch sorting results after filling the empty rows, it is easy to determine the row and column numbers of each port, which can solve the problem that the image recognition results cannot be compared with the port resource data in the resource management system.

[0067] Step 240 , in the row-wise sorting result of filling the missing ports, sort the detection ports and the missing ports in columns to obtain a column-wise sorting result.

[0068] In the row-wise sorting result of filling the missing ports, all ports (including detection ports and missing ports) in each row are sorted by columns according to the bounding boxes of each port in the row to obtain the column where each port in the row is located. After each row is sorted by columns, the column-wise sorting result of all ports is obtained.

[0069] In one embodiment of the present application, in the row-by-row sorting results of filling missing ports, each of the detection ports and each of the missing ports are sorted in columns to obtain a column-by-column sorting result, including: in the row-by-row sorting results of filling missing ports, according to the boundary box of each of the ports, the X-axis coordinate of the center point of each of the ports is determined; according to the row-by-row sorting results of filling missing ports, according to the X-axis coordinate of the center point of each port in the same row, each port in the same row is sorted in columns to obtain a column-by-column sorting result of the same row.

[0070] For all ports after filling, calculate the center point X-axis coordinate (x_center) and Y-axis center point coordinate (y_center) of the center point of the bounding box according to the information of xmin, ymin, xmax, and ymax of the bounding box. According to the row sorting results of the filled missing ports, sort the center point X-axis coordinates of each port in the same row by row number to obtain the column number of each port in the same row.

[0071] By sorting the ports in the same row according to the X-axis coordinates of the center points of the ports in the same row in the row sorting result of filling the missing ports, the column information of each port can be accurately obtained.

[0072] Step 250, generating a port dot matrix diagram of the target optical distribution facility according to the row-wise sorting result of filling the missing ports, the column-wise sorting result and the port status of each port.

[0073] The row number of each port is determined by the row sorting result, and the column number of each port is determined by the column sorting result. The ports are arranged according to the row number and column number, and the port dot matrix of the target optical distribution facility is generated in combination with the port status of the port. In the port dot matrix, each dot represents a port, and the port status of the port can be represented by different colors, for example, green represents the occupied state, red represents the idle state, black represents the blocked state, and yellow represents the empty row.

[0074] Step 260: Compare the port dot matrix diagram with the port resource data of the target optical distribution facility in the resource management system to obtain a port comparison result.

[0075] The port management method of the optical distribution facility provided in the embodiment of the present application is to sort each detection port by row according to the boundary box of each detection port to obtain the row sorting result, fill the missing port in the row sorting result based on the boundary box of each detection port, and sort each detection port and the missing port by column in the row sorting result of filling the missing port, and then generate a port dot matrix of the target optical distribution facility based on the row sorting result, the column sorting result and the port status of each port. The port dot matrix generated in this way is filled with ports that cannot be identified in the image due to occlusion or other situations, so that the image detection data can be compared with the port resource data in the resource management system, thereby realizing the management of port data, avoiding the management by manual on-site verification and manual recording of each port, and improving the port management efficiency of the optical distribution facility.

[0076] On the basis of the above technical solution, the step of filling the missing ports in the target row according to the bounding boxes of the ports in the target row, and determining that the port state of the filled missing ports is a blocked state, includes:

[0077] In the row with the largest number of detection ports in the row sorting result, determine the distance between two adjacent detection ports, and determine the median of each distance;

[0078] When the distance between two adjacent ports in the target row is greater than a distance threshold, fill the missing port between the two adjacent ports in the target row according to the median of the distance and the bounding box of the port in the target row, and determine that the port state of the filled missing port is an obstruction state;

[0079] When the left X-axis coordinate of the bounding box of the leftmost port in the target row is greater than a first target value, fill the missing port at the leftmost side of the target row according to the bounding boxes of the leftmost ports in other rows, and determine that the port state of the filled missing port is an obstructed state, wherein the first target value is determined according to the minimum value of the left X-axis coordinate of the leftmost port in the other rows and the median of the distance;

[0080] When the right X-axis coordinate of the bounding box of the rightmost port in the target row is less than a second target value, fill the missing port at the rightmost side of the target row according to the bounding boxes of the rightmost ports in other rows, and determine that the port state of the filled missing port is an obstructed state, wherein the second target value is determined according to the maximum value of the right X-axis coordinate of the rightmost port in the other rows and the median of the distance;

[0081] If there are missing ports in the target row whose port status is an empty row, the missing ports are filled in the target row according to the boundary box of the missing port, that is, based on the missing ports whose port status is an empty row, a missing port is filled to the right of the missing port at every median distance, so that the number of ports in the target row reaches the target number, and the port status of the filled missing ports is determined to be an obstructed state.

[0082] In the row sorting results, the number of ports in each row is counted to determine the row with the largest number of ports. If the number of ports in multiple rows is the same and is the target number, a row can be selected from them, and the distance between two adjacent detection ports is calculated from the determined row. The distance between two adjacent detection ports refers to the horizontal spacing between the bounding boxes of two adjacent detection ports. The median distance (x_term_median) of all distances in the row is calculated.

[0083] When the distance between two adjacent ports in the target row (each port can be a detection port or a filled missing port) is greater than the distance threshold, one of the two adjacent ports can be used as the reference, and the missing endpoints can be filled from this port to the gap between the two adjacent ports. The distance between the missing port and the port after this port can be the median of the distance. One or more missing ports are filled between the two adjacent ports, so that the distance between each two adjacent ports after the missing ports are filled is less than the distance threshold, and the state of the filled missing port is determined to be the blocked state. Wherein, the distance threshold is the product w*x_term_median of the preset port spacing threshold coefficient (w) and the median of the distance (x_term_median).

[0084] If the left X-axis coordinate of the bounding box of the leftmost port in the target row (i.e., the minimum value xmin of the X-axis coordinate of the bounding box) is greater than the first target value, it is determined that there is a port on the leftmost side of the target row that has not been detected. At this time, it is necessary to fill the missing port on the leftmost side of the target row, and determine that the port state of the filled missing port is blocked. When filling the missing port on the leftmost side of the target row, the bounding box of the missing port to be filled can be determined based on the bounding boxes of each port in the target row and the bounding boxes of the leftmost ports in other rows. For example, the minimum value of the left X-axis coordinate of the bounding boxes in other rows can be determined as the left X-axis coordinate of the bounding box of the missing port, the right X-axis coordinate of the bounding box corresponding to the minimum value can be determined as the right X-axis coordinate of the bounding box of the missing port, and the average value of the Y-axis coordinates of the bounding boxes of each port in the target row or the Y-axis coordinate of any one of the bounding boxes can be determined as the Y-axis coordinate of the bounding box of the missing port (including the upper Y-axis coordinate ymin and the lower Y-axis coordinate ymax). Among them, the first target value is determined based on the minimum value of the left X-axis coordinate of the leftmost port of the other rows and the median distance, that is, the product K4*x_term_median of the left spacing coefficient (K4) and the median distance (x_term_median) is determined, and the sum of the product and the minimum value is determined as the first target value.

[0085] If the right X-axis coordinate of the bounding box of the rightmost port in the target row (i.e., the minimum value xmin of the X-axis coordinate of the bounding box) is less than the first target value, it is determined that there is a port on the rightmost side of the target row that has not been detected. At this time, it is necessary to fill the missing port on the rightmost side of the target row, and determine that the port state of the filled missing port is blocked. When filling the missing port on the rightmost side of the target row, the bounding box of the missing port to be filled can be determined based on the bounding boxes of the ports in the target row and the bounding boxes of the rightmost ports in other rows. For example, the maximum value of the right X-axis coordinate of the bounding boxes in other rows can be determined as the right X-axis coordinate of the bounding box of the missing port, the left X-axis coordinate of the bounding box corresponding to the maximum value can be determined as the left X-axis coordinate of the bounding box of the missing port, and the average value of the Y-axis coordinates of the bounding boxes of the ports in the target row or the Y-axis coordinate of any one of the bounding boxes can be determined as the Y-axis coordinate of the bounding box of the missing port (including the upper Y-axis coordinate ymin and the lower Y-axis coordinate ymax). Among them, the second target value is determined based on the maximum value of the right X-axis coordinate of the rightmost port of the other rows and the median of the distance, that is, the product K5*x_term_median of the right spacing coefficient (K5) and the median of the distance (x_term_median) is determined, and the difference between the maximum value and the product is determined as the second target value.

[0086] If there is a missing port with a port status of an empty row in the target row, and the missing port is filled when the row is detected to be an empty row, then the other missing ports of the target row are filled in accordance with the port filling method of "empty row", so that the number of ports in the target row reaches the target number, and the port status of the filled missing ports is determined to be an obstructed state. When filling the other missing ports of the target row in accordance with the port filling method of "empty row", the other missing ports are filled based on the bounding box (xmin, ymin, xmax, ymax) of the missing port with a port status of an empty row (the filled missing port), the Y-axis coordinates of the bounding boxes of the other missing ports are the same as the Y-axis coordinates of the filled missing ports, and the X-axis coordinates of the bounding boxes of the other missing ports are determined by adding the median of the distance to the X-axis coordinate of the filled missing port.

[0087] By determining the missing ports at different positions and filling the corresponding missing ports according to the port filling method at the position, the position of each missing port can be accurately determined and filled at the accurate position.

[0088] On the basis of the above technical solution, the step of filling the missing ports between two adjacent ports in the target row according to the median distance and the bounding box of the ports in the target row includes:

[0089] When the number of ports in the target row is less than or equal to the number threshold, determine the X-axis coordinate of the bounding box of the missing port to be filled according to the X-axis coordinate of the bounding box of the previous port of two adjacent ports in the target row and the median of the distance, determine the Y-axis coordinate of the bounding box of the missing port to be filled according to the Y-axis coordinate of the bounding box of the two adjacent ports in the target row, and fill the missing port between the two adjacent detection ports according to the bounding box X-axis coordinate and the bounding box Y-axis coordinate;

[0090] When the number of ports in the target row is greater than the number threshold, a bidirectional autoregressive algorithm is used to determine the bounding box of the missing port to be filled according to the bounding box of each port in the target row, and the missing port is filled between two adjacent ports in the target row according to the bounding box of the missing port to be filled.

[0091] The quantity threshold is a value smaller than the target quantity. For example, when the target quantity is 12, the quantity threshold may be 3.

[0092] If the number of ports in the target row is less than or equal to 3, the X-axis coordinate of the bounding box of the missing port to be filled is determined according to the X-axis coordinate and the median distance of the bounding box of the previous port of the two adjacent ports in the target row, the left X-axis coordinate in the X-axis coordinate of the bounding box is the sum xmin+x_term_median of the left X-axis coordinate (xmin) of the previous port and the median distance (x_term_median), and the right X-axis coordinate in the X-axis coordinate of the bounding box is the sum xmin+xscale_mean of the left X-axis coordinate (xmin) and the median X-axis size (xscale_mean) in the X-axis coordinate of the bounding box; the Y-axis coordinate of the bounding box of the missing port to be filled is determined according to the Y-axis coordinate of the bounding box of the two adjacent ports in the target row, the upper Y-axis coordinate (ymin) in the Y-axis coordinate of the bounding box is the average of the upper Y-axis coordinates (ymin) of the two adjacent ports, and the lower Y-axis coordinate (ymax) in the Y-axis coordinate of the bounding box is the average of the lower Y-axis coordinates (ymax) of the two adjacent ports.

[0093] If the number of ports in the target row is greater than the quantity threshold, a bidirectional autoregressive algorithm is used to determine the bounding box of the missing port to be filled according to the detection box of each port in the target row, that is, the bounding box of the missing port to be filled is predicted from left to right using the autoregressive algorithm to obtain a first prediction result, and the bounding box of the missing port to be filled is predicted from right to left using the autoregressive algorithm to obtain a second prediction result, and the first prediction result and the second prediction result are averaged as the prediction result of the final bounding box, and the missing port is filled in the corresponding position based on the prediction result of the bounding box.

[0094] When using the autoregressive algorithm to predict the bounding box of the missing port to be filled, an appropriate lag order (lags) can be used. For example, the lag order can be 2. At this time, the bounding boxes of the two ports before the missing port to be filled are used to predict the bounding box of the missing port to be filled, that is, when using the autoregressive algorithm to predict the bounding box of the missing port to be filled from left to right, the bounding boxes of the two ports on the left side of the missing port to be filled are used for prediction. When using the autoregressive algorithm to predict the bounding box of the missing port to be filled from right to left, the bounding boxes of the two ports on the right side of the missing port to be filled are used for prediction.

[0095] By using a bidirectional autoregressive algorithm to determine the bounding box of the missing port to be filled, the problem of inaccurate position prediction caused by image distortion can be improved, and the accuracy of position prediction of the occluded port can be improved.

[0096] On the basis of the above technical solution, the method of filling the missing port on the leftmost side of the target row according to the bounding box of the leftmost port of other rows includes: determining the bounding box of the leftmost missing port to be filled in the target row by using a bidirectional autoregressive algorithm according to the bounding box of the leftmost port of other rows; and filling the missing port on the leftmost side of the target row according to the bounding box of the leftmost missing port to be filled in the target row.

[0097] Due to the problem of image distortion, in order to improve the accuracy of port position prediction, a bidirectional autoregressive algorithm is used. According to the bounding box information of the leftmost ports of all other rows, the autoregressive model is used from top to bottom and from bottom to top to predict the bounding box (xmin, ymin, xmax, ymax) of the missing port to be filled on the leftmost side of the target row. When using the bidirectional autoregressive algorithm to predict the bounding box of the missing port to be filled on the leftmost side of the target row, the autoregressive algorithm is used from top to bottom to predict the bounding box of the missing port to be filled in the target row as the third prediction result, and the autoregressive algorithm is used from bottom to top to predict the bounding box of the missing port to be filled in the target row as the fourth prediction result. The third prediction result and the fourth prediction result are averaged as the bounding box of the missing port to be filled, and based on the bounding box, the missing port is filled in the corresponding position on the leftmost side of the target row.

[0098] On the basis of the above technical solution, the method of filling the missing port on the rightmost side of the target row according to the bounding box of the rightmost port of other rows includes: determining the bounding box of the rightmost missing port to be filled in the target row by using a bidirectional autoregressive algorithm according to the bounding box of the rightmost port of other rows; and filling the missing port on the rightmost side of the target row according to the bounding box of the rightmost missing port to be filled in the target row.

[0099] Due to the problem of image distortion, in order to improve the accuracy of port position prediction, a bidirectional autoregressive algorithm is used. According to the bounding box information of the rightmost ports of all other rows, the autoregressive model is used from top to bottom and from bottom to top to predict the bounding box (xmin, ymin, xmax, ymax) of the missing port to be filled on the rightmost side of the target row. When using the bidirectional autoregressive algorithm to predict the bounding box of the missing port to be filled on the rightmost side of the target row, the autoregressive algorithm is used from top to bottom to predict the bounding box of the missing port to be filled in the target row as the fifth prediction result, and the autoregressive algorithm is used from bottom to top to predict the bounding box of the missing port to be filled in the target row as the sixth prediction result. The fifth prediction result and the sixth prediction result are averaged as the bounding box of the missing port to be filled, and based on the bounding box, the missing port is filled in the corresponding rightmost position in the target row.

[0100] Figure 4is a schematic diagram of the system architecture of the optical distribution facility port management method in an embodiment of the present application, such as Figure 4 As shown in the figure, in the algorithm fusion optimization process, the labeled data set is trained based on the YOLOv5 target detection algorithm to obtain the trained port detection model; the port image is detected based on the port detection model through the adaptive dot map algorithm, and the resource port occupancy information is identified to generate a port dot map; the resource management system (network data sharing platform) collects twin data of optical distribution facilities, and compares the port dot map with the port resource data collected by the resource management system (network data sharing platform). As the data analysis result, the data analysis result is stored in the network data sharing platform; the optical distribution facility dot map generation algorithm is embedded in the execution application of the inspection process. In the inspection process, the port images taken of optical distribution facilities such as optical junction boxes can be obtained in real time, and the interface is called to realize the detection of facility ports in the port image.

[0101] Figure 5 is a flow chart of a method for managing optical distribution facility ports provided by an embodiment of the present application, such as Figure 5 As shown, the optical distribution facility port management method includes:

[0102] Step 501: model training.

[0103] Collect photos of optical distribution facilities generated during the operator's on-site maintenance work, and use the image annotation tool labelimg to annotate the occupancy status and location of the port. Use the annotated data as a data set, use the YOLOv5 target detection algorithm to train the model on the data set, and obtain a trained port detection model. The number of collected and annotated photos can exceed 2,000, and the data set can be expanded through data enhancement technology so that the training mAP (mean Average Precision) reaches more than 95%.

[0104] Step 502: Model-based port detection.

[0105] The port detection model is used to perform port detection on the port image of the target optical distribution facility, and the bounding box and port status of each detection port in the port image are obtained. Based on the trained port detection model, the port image information of the captured target optical distribution facility is identified to obtain the port status (whether occupied) and position information (bounding box) of each detection port. The position information includes the four vertex coordinates xmin, xmax, ymin, and ymax of each bounding box. The classification information class of the port status is "1" and "0", respectively, indicating the "idle" state and the "occupied" state, such as Figure 6 shown.

[0106] Step 503: sort the ports by line.

[0107] According to the bounding box of each detection port, each detection port is sorted by row to obtain the row sorting result. According to the bounding box of each detection port, the center point coordinates (x_center, y_cente) of each detection port are determined, and the size median of all detection ports is determined, and the size median includes the X-axis size median (xscale_mean) and the Y-axis size median (yscale_mean); according to the center point Y-axis coordinates in the center point coordinates, each detection port is sorted to form a list, and the first detection port after sorting is used as the reference port of the first row, and the center point Y-axis coordinate of the first detection port is the center point Y-axis coordinate of the reference port. (row_start_y); according to the median (height) of the Y-axis size of the bounding box, set the first row spacing threshold coefficient k1 = 1.3 of the dot matrix, traverse all the detection ports, and when the difference between the Y-axis coordinate of the center point of the detection port and the Y-axis coordinate of the center point of the reference port is greater than the first row spacing threshold (k1*yscale_mean), the detection port is judged to be in the next row, the row number of the detection port is increased by 1, and the Y-axis coordinate of the center point of the detection port is used as the Y-axis coordinate of the center point of the reference port in the next row (row_start_y). After traversing all the detection ports, Figure 6 In the table shown, add a row information column for the row where the port is located, and record the information of the row where the port is located in order from top to bottom, such as Figure 7 shown.

[0108] Step 504, calculating the median distance between two ports.

[0109] Calculate the distance between two ports in a row with a total of 12 ports or the largest number of ports, and calculate the mean (x_term_mean) and median (x_term_median) of the distance between the two ports.

[0110] Step 505 , traverse all rows and determine whether the row spacing is greater than the second row spacing threshold. If yes, execute step 506 ; if no, execute step 507 .

[0111] Step 506, fill in the blank line port information.

[0112] In some cases, there are optical distribution facilities on site where some locations do not have boards installed and there are no ports. Figure 3As shown in the figure, the ports in rows 11-12 of the optical cross-connection box do not exist. However, in the operator's resource management system, facilities are managed according to unified specifications, and the area without plug-in boards will also be numbered in order. In order to ensure that the image recognition data can be compared with the data in the resource management system, this area needs to be filled.

[0113] Set the threshold coefficient of the second row spacing to k2, traverse all rows, if the spacing between two rows exceeds the second row spacing threshold (k2*yscale_mean), add a port in a new row, and the port boundary box information is: xmin is the smallest xmin in the previous row; xmax is xmin+xscale_mean; ymin is the largest ymin+k3*yscale_mean in the previous row, k3 is the row spacing coefficient; ymax is ymin+yscale_mean. The classification information (class) and state name (name) information are filled with "3" and "blank row".

[0114] When adding ports, if there is a port in the row with the status of "empty row", the port status of the row is added as "empty row". In the final dot matrix, the port in the "empty row" state can be represented by a color different from other port states, for example, yellow can be used to represent the port in the "empty row" state.

[0115] Step 507 , traverse all rows to determine whether there is a port spacing greater than a spacing threshold in the row, if yes, execute step 508 , if no, execute step 509 .

[0116] Step 508: autoregressively fill in the missing port information.

[0117] Figure 8 This is an example picture of an optical cross-connection box port detection in an embodiment of the present application. It can be seen from the picture that there are still some ports blocked by labels and the like that have not been detected.

[0118] The port spacing threshold coefficient is set to w1=1.5, and the total number of ports in each row is set to 12 (target number). If the spacing between two ports is greater than the spacing threshold (w1*x_term_median) and the total number of ports in the row is currently less than 12, ports are filled between the two ports.

[0119] Through the bidirectional autoregressive algorithm, the lag order is set to 2, that is, under the influence of the positions of the first and second ports, the autoregressive algorithm is used to predict the values ​​of the missing port information xmin, ymin, xmax, and ymax from left to right and from right to left, and the average of the bidirectional prediction results is taken as the final prediction result. The classification information of the port status of the filled port is "2" and the status name is "blocked".

[0120] Step 509 , traverse all rows to determine whether the positions of the ports on both sides exceed the threshold, if yes, execute step 510 , if no, execute step 511 .

[0121] The judgment of the leftmost port in a row is to judge whether the left X-axis coordinate of the bounding box of the leftmost port is greater than the first target value; the judgment of the rightmost port in a row is to judge whether the right X-axis coordinate of the bounding box of the rightmost port is less than the second target value.

[0122] Step 510: autoregressively fill in the missing port information on both sides.

[0123] If the left X-axis coordinate (xmin) of the leftmost port in a row is greater than the first target value (i.e., the sum of the minimum value of the leftmost ports of all rows and w2*x_term_median, w2 is the left spacing coefficient), and the total number of ports in the row is less than 12 (w2 can be set to 0.7), then add the port information on the left. Using the bidirectional autoregressive algorithm, the coordinate information of the Y-axis direction of the currently missing port depends on the coordinate position of the leftmost ports of the previous and next two rows, and the lag order is set to 2, that is, affected by the position of the leftmost ports of the previous and next two rows, the coordinate of the missing port in the X-axis direction depends on the coordinate position information of the port on the right. This method predicts the bounding box xmin, ymin, xmax, ymax of the missing port on the left side of the row.

[0124] If the right X-axis coordinate (xmax) of the rightmost port in a row is less than the second target value (i.e., the difference between the maximum value of the rightmost ports of all rows and w3*x_term_median, w3 is the right spacing coefficient), and the total number of ports in the row is less than 12 (w3 can be set to 0.8), then add the port information on the right side. Using the bidirectional autoregressive algorithm, the coordinate information of the Y-axis direction of the currently missing port depends on the coordinate position of the rightmost ports of the previous and next two rows, and the lag order is set to 2, that is, affected by the position of the rightmost ports of the previous and next two rows, the coordinate of the missing port in the X-axis direction depends on the coordinate position information of the left port. This method predicts the bounding box xmin, ymin, xmax, ymax of the missing port on the right side of the row.

[0125] Step 511, sort and add port column information.

[0126] For all ports after filling, calculate the center point coordinates (x_center and y_center) of the bounding box according to the information of the bounding box xmin, ymin, xmax, and ymax. Sort by the row number information and the center point X-axis coordinates (x_center information) of all ports to obtain the column information of the target optical distribution facility port, such as Fig. 9 Combined with the row information formed in step 503, a port dot matrix diagram of a complete optical distribution facility is formed, the dot matrix size is 16*12, and there are 192 ports in total. Different colored dots can be used in the dot matrix diagram to represent different port states, for example, green dots represent occupied ports, red dots represent idle ports, and black dots represent blocked ports.

[0127] The embodiment of the present application is based on a deep learning target detection algorithm to identify the port usage status of the optical distribution facility and compare it with the port data in the resource management system, thereby realizing the management of the accuracy of the port resource data; by filling in the missing ports, the obstructed ports are processed in a dot matrix, and a bidirectional autoregressive algorithm is added to improve the accuracy of the prediction of the position of the obstructed port; the image detection capability and resource data comparison capability are encapsulated into an openAPI interface to realize real-time intelligent inspection and management of resource data; the effectiveness of the comparison between the detection result data and the data in the resource management system can be further improved, thereby realizing the intelligent management of resource accuracy.

[0128] Fig.10 FIG. 1 is a schematic diagram of the processing process of the optical distribution facility port management method in an embodiment of the present application. Fig.10 As shown, in the inspection process, the port image of the optical distribution facility is uploaded through the client; the port image is converted into base64-encoded data, and then the data is converted into an array in Numpy, and the port image is converted into RGB format through color space conversion; the optical distribution facility dot map generation algorithm is called to perform image port information recognition, and a port dot map is generated as a recognition result; the recognition result is output; the port resource data is queried through the resource center (resource management system) query interface; the recognition result is compared with the port resource data to obtain the port comparison result; the port comparison result is returned to the client through the API; the port comparison result is stored in the form of a text file in the network data sharing platform of the resource management system.

[0129] Compared with the prior art, the embodiments of the present application solve the problem of incomplete detection of optical facility ports due to dense optical ports and obstruction, and the inability to compare with the port resource data in the resource management system. By adding a bidirectional autoregressive algorithm, the accuracy of the port dot matrix is ​​improved, which can significantly improve the accuracy of optical port resource data and the effectiveness of management.

[0130] Fig.11 is a schematic diagram of the structure of an optical distribution facility port management device provided in this embodiment, such as Fig.11 As shown, the device comprises:

[0131] The port detection module 1110 is used to perform port detection on the port image of the target optical distribution facility through the port detection model to obtain the boundary box and port status of each detection port in the port image;

[0132] A dot map generation module 1120, for determining the bounding boxes and port states of the missing ports in the port image according to the bounding boxes of the detection ports, and generating a port dot map of the target optical distribution facility according to the bounding boxes and port states of the ports, the ports including the detection ports and the missing ports;

[0133] The port comparison module 1130 is used to compare the port dot matrix diagram with the port resource data of the target optical distribution facility in the resource management system to obtain a port comparison result.

[0134] Optionally, the dot map generation module includes:

[0135] A line sorting submodule, used to sort the detection ports by line according to the boundary boxes of the detection ports to obtain a line sorting result;

[0136] A missing port filling submodule, used to fill the missing ports in the branch sorting result according to the boundary box of each detection port and the branch sorting result, and determine the port status of each missing port;

[0137] A column sorting submodule, used for sorting the detection ports and the missing ports in the row sorting result of filling the missing ports, to obtain a column sorting result;

[0138] The dot-map generation submodule is used to generate a port dot-map of the target optical distribution facility according to the row-wise sorting result of filling the missing ports, the column-wise sorting result and the port status of each port.

[0139] Optionally, the branch sorting submodule is specifically used for:

[0140] Determine the center point coordinates of each detection port according to the bounding box of each detection port, and determine the size median of all the detection ports, wherein the size median includes the X-axis size median and the Y-axis size median;

[0141] Sorting the detection ports according to the Y-axis coordinate of the center point in the center point coordinates, and taking the first detection port after sorting as the reference port of the first row;

[0142] Determine the difference between the Y-axis coordinate of the center point of the detection port and the Y-axis coordinate of the center point of the reference port in sequence according to the order of the detection ports after the reference port;

[0143] When the difference is less than the first row spacing threshold, it is determined that the current detection port and the reference port are located in the same row; when the difference is greater than or equal to the first row spacing threshold, it is determined that the current detection port is located in the next row of the reference port, and the current detection port is used as the reference port of the next row, and the operation of determining the difference and the row where each detection port is located is cyclically performed until the row where all detection ports are located is determined, and the row sorting result is obtained, wherein the first row spacing threshold is determined based on the median of the Y-axis size and the first row spacing threshold coefficient.

[0144] Optionally, the missing port filling submodule includes:

[0145] a blank row filling unit, configured to traverse all rows in the row sorting result, and when the spacing between two adjacent rows is greater than or equal to a second row spacing threshold, add a new row between the two adjacent rows, and determine the boundary box of the missing port to be filled in the new row according to the boundary box of each detection port in the two adjacent rows, and add the determined missing port to the new row, and determine that the port state of the missing port is a blank row;

[0146] The port filling unit is used to determine a target row whose port quantity is less than the target quantity in the row sorting result after the row is filled, fill the missing ports in the target row according to the boundary box of each port in the target row, and determine that the port state of the filled missing ports is a blocked state.

[0147] Optionally, the port filling unit includes:

[0148] a distance median determination subunit, configured to determine the distance between two adjacent detection ports in a row with the largest number of detection ports in the row sorting result, and determine the distance median of each of the distances;

[0149] a middle missing port filling subunit, configured to fill the missing port between the two adjacent ports in the target row according to the median of the distance and the bounding box of the port in the target row when the distance between the two adjacent ports in the target row is greater than the distance threshold, and determine that the port state of the filled missing port is an occlusion state;

[0150] a left missing port filling subunit, configured to fill the missing port at the leftmost side of the target row according to the bounding boxes of the leftmost ports of other rows, and determine that the port state of the filled missing port is an occluded state when the left X-axis coordinate of the bounding box of the leftmost port in the target row is greater than a first target value, wherein the first target value is determined according to the minimum value of the left X-axis coordinate of the leftmost port of the other rows and the median of the distance;

[0151] a right missing port filling subunit, configured to fill the missing port on the rightmost side of the target row according to the bounding boxes of the rightmost ports of other rows, and determine that the port state of the filled missing port is an obstructed state when the right X-axis coordinate of the bounding box of the rightmost port in the target row is less than a second target value, wherein the second target value is determined according to the maximum value of the right X-axis coordinate of the rightmost port in the other rows and the median of the distance;

[0152] The empty row port filling subunit is used to fill the missing ports in the target row according to the boundary box of the missing ports if there are missing ports with the port status of the empty row in the target row, so that the number of ports in the target row reaches the target number, and determine that the port status of the filled missing ports is the blocked state.

[0153] Optionally, the middle missing port filling subunit is specifically used for:

[0154] When the number of ports in the target row is less than or equal to the number threshold, determine the X-axis coordinate of the bounding box of the missing port to be filled according to the X-axis coordinate of the bounding box of the previous port of two adjacent ports in the target row and the median of the distance, determine the Y-axis coordinate of the bounding box of the missing port to be filled according to the Y-axis coordinate of the bounding box of the two adjacent ports in the target row, and fill the missing port between the two adjacent detection ports according to the bounding box X-axis coordinate and the bounding box Y-axis coordinate;

[0155] When the number of ports in the target row is greater than the number threshold, a bidirectional autoregressive algorithm is used to determine the bounding box of the missing port to be filled according to the bounding box of each port in the target row, and the missing port is filled between two adjacent ports in the target row according to the bounding box of the missing port to be filled.

[0156] Optionally, the left missing port filling subunit is specifically used for:

[0157] Determine the bounding box of the leftmost missing port to be filled in the target row by using a bidirectional autoregressive algorithm according to the bounding box of the leftmost port of the other rows;

[0158] Fill the missing port at the leftmost side of the target row according to the bounding box of the missing port to be filled at the leftmost side of the target row.

[0159] Optionally, the right missing port filling subunit is specifically used for:

[0160] Determine the bounding box of the rightmost missing port to be filled in the target row using a bidirectional autoregressive algorithm according to the bounding box of the rightmost port of the other row;

[0161] Fill the missing port at the far right of the target row according to the bounding box of the missing port to be filled at the far right of the target row.

[0162] Optionally, the column sorting submodule is specifically used for:

[0163] In the row sorting result of filling the missing ports, determining the X-axis coordinate of the center point of each port according to the bounding box of each port;

[0164] According to the row-wise sorting result of filling the missing ports, the ports in the same row are sorted in columns according to the X-axis coordinates of the center points of the ports in the same row to obtain the column-wise sorting result of the same row.

[0165] The optical distribution facility port management device provided in the embodiment of the present application is used to implement the various steps of the optical distribution facility port management method described in the embodiment of the present application. The specific implementation methods of each module of the device refer to the corresponding steps and will not be repeated here.

[0166] The optical distribution facility port management device provided in the embodiment of the present application performs port detection on the port image of the target optical distribution facility through a port detection model to obtain the bounding box and port status of each detected port in the port image, determines the bounding box and port status of the missing port in the port image based on the bounding box of each detected port, and generates a port dot matrix map of the target optical distribution facility based on the bounding box and port status of each port, and compares the port dot matrix map with the port resource data of the target optical distribution facility in the resource management system to obtain a port comparison result. Since the bounding box and port status of the missing port are determined based on the bounding box of each detected port and a port dot matrix map is generated, the image detection data can be compared with the port resource data in the resource management system, thereby realizing the management of the port data, avoiding the management by manual on-site verification and manual recording of each port, and improving the port management efficiency of the optical distribution facility.

[0167] Fig.12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Fig.12As shown, the electronic device 1200 may include one or more processors 1210 and one or more memories 1220 connected to the processor 1210. The electronic device 1200 may also include an input interface 1230 and an output interface 1240 for communicating with another device or system. The program code executed by the processor 1210 may be stored in the memory 1220.

[0168] The processor 1210 in the electronic device 1200 calls the program code stored in the memory 1220 to execute the optical distribution facility port management method in the above embodiment.

[0169] The embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the optical distribution facility port management method as described in the embodiment of the present application is implemented.

[0170] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0171] The above is a detailed introduction to an optical distribution facility port management method, device, electronic device and storage medium provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0172] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

Claims

1. A method for managing optical distribution facility ports, It is characterized in that include: Perform port detection on the port image of the target optical distribution facility by using the port detection model to obtain the boundary box and port status of each detection port in the port image; Determining the bounding boxes and port states of missing ports in the port image according to the bounding boxes of each of the detection ports, and generating a port dot matrix of the target optical distribution facility according to the bounding boxes and port states of each port, the ports including the detection ports and the missing ports; The port dot matrix diagram is compared with the port resource data of the target optical distribution facility in the resource management system to obtain a port comparison result.

2. The method according to claim 1, It is characterized in that Determining the bounding box and port status of the missing port in the port image according to the bounding box of each detected port, and generating a port dot matrix of the target optical distribution facility according to the bounding box and port status of each port, includes: According to the boundary boxes of the detection ports, the detection ports are sorted by row to obtain a row sorting result; Filling missing ports in the branch sorting result according to the bounding box of each of the detection ports and the branch sorting result, and determining the port status of each of the missing ports; In the row-wise sorting result of filling the missing ports, each of the detection ports and each of the missing ports is sorted in columns to obtain a column-wise sorting result; A port dot matrix diagram of the target optical distribution facility is generated according to the row-wise sorting result of filling the missing ports, the column-wise sorting result and the port status of each port.

3. The method according to claim 2, It is characterized in that The step of sorting the detection ports by row according to the boundary boxes of the detection ports to obtain the sorting results by row includes: Determine the center point coordinates of each detection port according to the bounding box of each detection port, and determine the size median of all the detection ports, wherein the size median includes the X-axis size median and the Y-axis size median; Sorting the detection ports according to the Y-axis coordinate of the center point in the center point coordinates, and taking the first detection port after sorting as the reference port of the first row; Determine the difference between the Y-axis coordinate of the center point of the detection port and the Y-axis coordinate of the center point of the reference port in sequence according to the order of the detection ports after the reference port; When the difference is less than the first row spacing threshold, it is determined that the current detection port and the reference port are located in the same row; when the difference is greater than or equal to the first row spacing threshold, it is determined that the current detection port is located in the next row of the reference port, and the current detection port is used as the reference port of the next row, and the operation of determining the difference and the row where each detection port is located is cyclically performed until the row where all detection ports are located is determined, and the row sorting result is obtained, wherein the first row spacing threshold is determined based on the median of the Y-axis size and the first row spacing threshold coefficient.

4. The method according to claim 2, It is characterized in that The step of filling the missing ports in the branch sorting result according to the bounding box of each of the detection ports and the branch sorting result, and determining the port status of each of the missing ports, comprises: Traversing all rows in the row sorting result, when the spacing between two adjacent rows is greater than or equal to a second row spacing threshold, adding a new row between the two adjacent rows, and determining the bounding box of the missing port to be filled in the new row according to the bounding box of each detection port in the two adjacent rows, adding the determined missing port to the new row, and determining that the port state of the missing port is an empty row; In the row sorting result after filling the row, a target row whose port quantity is less than the target quantity is determined, and missing ports are filled in the target row according to the bounding box of each port in the target row, and the port state of the filled missing ports is determined to be an obstructed state.

5. The method according to claim 4, It is characterized in that The step of filling the missing ports in the target row according to the bounding boxes of the ports in the target row, and determining that the port states of the filled missing ports are blocked states, comprises: In the row with the largest number of detection ports in the row sorting result, determine the distance between two adjacent detection ports, and determine the median of each distance; When the distance between two adjacent ports in the target row is greater than a distance threshold, fill the missing port between the two adjacent ports in the target row according to the median of the distance and the bounding box of the port in the target row, and determine that the port state of the filled missing port is an obstruction state; When the left X-axis coordinate of the bounding box of the leftmost port in the target row is greater than a first target value, fill the missing port at the leftmost side of the target row according to the bounding boxes of the leftmost ports in other rows, and determine that the port state of the filled missing port is an obstructed state, wherein the first target value is determined according to the minimum value of the left X-axis coordinate of the leftmost port in the other rows and the median of the distance; When the right X-axis coordinate of the bounding box of the rightmost port in the target row is less than a second target value, fill the missing port at the rightmost side of the target row according to the bounding boxes of the rightmost ports in other rows, and determine that the port state of the filled missing port is an obstructed state, wherein the second target value is determined according to the maximum value of the right X-axis coordinate of the rightmost port in the other rows and the median of the distance; If there are missing ports in the target row whose port status is an empty row, the missing ports are filled in the target row according to the boundary box of the missing ports so that the number of ports in the target row reaches the target number, and the port status of the filled missing ports is determined to be a blocked state.

6. The method according to claim 5, It is characterized in that Filling the missing ports between two adjacent ports in the target row according to the median distance and the bounding box of the ports in the target row includes: When the number of ports in the target row is less than or equal to the number threshold, determine the X-axis coordinate of the bounding box of the missing port to be filled according to the X-axis coordinate of the bounding box of the previous port of two adjacent ports in the target row and the median of the distance, determine the Y-axis coordinate of the bounding box of the missing port to be filled according to the Y-axis coordinate of the bounding box of the two adjacent ports in the target row, and fill the missing port between the two adjacent detection ports according to the bounding box X-axis coordinate and the bounding box Y-axis coordinate; When the number of ports in the target row is greater than the number threshold, a bidirectional autoregressive algorithm is used to determine the bounding box of the missing port to be filled according to the bounding box of each port in the target row, and the missing port is filled between two adjacent ports in the target row according to the bounding box of the missing port to be filled.

7. The method according to claim 5, It is characterized in that Filling the missing port at the leftmost side of the target row according to the bounding box of the leftmost port of other rows includes: Determine the bounding box of the leftmost missing port to be filled in the target row by using a bidirectional autoregressive algorithm according to the bounding box of the leftmost port of the other rows; Fill the missing port at the leftmost side of the target row according to the bounding box of the missing port to be filled at the leftmost side of the target row.

8. The method according to claim 5, It is characterized in that Filling the missing port at the rightmost side of the target row according to the bounding box of the rightmost port of other rows includes: Determine the bounding box of the rightmost missing port to be filled in the target row using a bidirectional autoregressive algorithm according to the bounding box of the rightmost port of the other row; Fill the missing port at the far right of the target row according to the bounding box of the missing port to be filled at the far right of the target row.

9. The method according to any one of claims 2 to 8, It is characterized in that In the row-wise sorting result of filling the missing ports, each of the detection ports and each of the missing ports is sorted in columns to obtain a column-wise sorting result, including: In the row sorting result of filling the missing ports, determining the X-axis coordinate of the center point of each port according to the bounding box of each port; According to the row-wise sorting result of filling the missing ports, the ports in the same row are sorted in columns according to the X-axis coordinates of the center points of the ports in the same row to obtain the column-wise sorting result of the same row.

10. An optical distribution facility port management device, It is characterized in that include: A port detection module, used to perform port detection on the port image of the target optical distribution facility through a port detection model, and obtain a boundary box and a port state of each detection port in the port image; a dot map generation module, for determining the bounding boxes and port states of the missing ports in the port image according to the bounding boxes of the detection ports, and generating a port dot map of the target optical distribution facility according to the bounding boxes and port states of the ports, the ports including the detection ports and the missing ports; The port comparison module is used to compare the port dot matrix diagram with the port resource data of the target optical distribution facility in the resource management system to obtain a port comparison result.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the optical distribution facility port management method according to any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the optical distribution facility port management method according to any one of claims 1 to 9 is implemented.

Citation Information

Cited By

  • Method and system for identifying port state of optical splitter

    CN120471919A