Port occupancy detection method and device, electronic equipment and storage medium

By improving the rotating frame detection algorithm and dual-target detection model, combined with a method that supports detection of quadrilaterals of arbitrary shapes, the problem of low accuracy and efficiency in PON port identification has been solved, achieving accurate detection of PON boards and PON ports, and improving identification effect and service activation efficiency.

CN116935294BActive Publication Date: 2026-03-27CHINA MOBILE COMM LTD RES INST +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies suffer from low accuracy and efficiency when identifying PON ports in network device images. This is especially true in scenarios involving the identification of actual connection pigtail information of passive fiber optic network ports in OLT devices. Conventional rectangular rotating frame algorithms struggle to accurately distinguish between target and non-target PON boards, leading to mislabeling of plugs and PON ports on non-target PON boards and affecting the identification results.

Method used

An improved rotating frame detection algorithm is adopted. By training a dual-target detection model and combining it with a method that supports the detection of quadrilaterals of arbitrary shapes, a pre-trained neural network model is used to detect PON boards and PON ports. The detection frames of the target PON boards and PON ports are determined by weighted averaging the confidence of candidate detection frames and auxiliary information.

Benefits of technology

It improves the accuracy and efficiency of PON board and PON port identification, ensuring accurate detection of PON port status within a small target PON board detection frame, thereby improving identification accuracy and efficiency and reducing the time cost of resource configuration and service activation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116935294B_ABST
    Figure CN116935294B_ABST
Patent Text Reader

Abstract

The embodiment discloses a port occupation detection method and device, electronic equipment and a computer storage medium. The method comprises the following steps: performing target detection on a to-be-processed image for a first target to determine a detection frame of a target passive optical network (PON) board in the to-be-processed image, wherein the first target at least comprises the PON board; performing target detection on an image in the detection frame of the target PON board for a second target to obtain a detection frame of the second target and a category of the second target, wherein the second target comprises a PON port, and the category of the second target comprises an occupied PON port and an idle PON port.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of artificial intelligence (AI), and particularly relates to a port occupation detection method and device, an electronic device, and a storage medium. BACKGROUND

[0002] In related technologies, a port in a network device image can be recognized based on AI technology; in an information recognition scene in which a passive optical network (PON) port of an OLT device is actually connected to a tail fiber, in order to clearly expose the situation of each plug and socket, the image shooting angle needs to be tilted to a certain extent; if a rectangular rotating box is used to label a target PON board, in some images, the non-target PON board adjacent to the target PON board will be inevitably labeled, causing the plugs and PON ports on the non-target PON board to also enter the recognition range, and thus reducing the recognition accuracy and efficiency. SUMMARY

[0003] Embodiments of the present application provide a port occupation detection method and device, an electronic device, and a storage medium.

[0004] Embodiments of the present application provide a port occupation detection method, which comprises:

[0005] performing target detection on a first target on a to-be-processed image to determine a detection box of a target PON board in the to-be-processed image, wherein the first target at least includes a PON board;

[0006] performing target detection on a second target on an image in the detection box of the target PON board to obtain a detection box of the second target and a category of the second target, wherein the second target includes a PON port, and the category of the second target includes an occupied PON port and an idle PON port.

[0007] In some embodiments, the performing target detection on a first target on a to-be-processed image to determine a detection box of a target PON board in the to-be-processed image comprises: detecting a PON board on the to-be-processed image to determine a candidate detection box of the PON board in the to-be-processed image; and determining the detection box of the target PON board in the to-be-processed image according to a confidence of the candidate detection box of the PON board.

[0008] It can be seen that, since the detection box of the target PON board in the to-be-processed image is determined according to the confidence of the candidate detection box of the PON board, and the confidence of the candidate detection box of the PON board can accurately reflect the fitting degree of the candidate detection box of the PON board and the real PON board, the detection box of the target PON board in the to-be-processed image can be accurately determined in the embodiments of the present application.

[0009] In some embodiments, before determining the bounding box of the target PON board in the image to be processed according to the confidence of the candidate bounding box of the PON board, the method further comprises: screening out, from the candidate bounding boxes of the PON board, a candidate bounding box whose geometric attribute meets a first set condition; and taking the candidate bounding box whose geometric attribute meets the first set condition as the updated candidate bounding box of the PON board.

[0010] It can be seen that, according to the geometric attribute of the candidate bounding box of the PON board, the candidate bounding box whose geometric attribute meets the first set condition is screened out, which is beneficial to remove the candidate bounding box of the PON board that does not conform to the actual situation, so that the candidate bounding box whose geometric attribute meets the first set condition is more real, that is, the updated candidate bounding box of the PON board is more accurate.

[0011] In some embodiments, the first target further comprises a pre-set marker; the target detection on the image to be processed for the first target to determine the bounding box of the target PON board in the image to be processed further comprises: target detection on the image to be processed for the first target to determine the bounding box of the marker in the image to be processed; and the determination of the bounding box of the target PON board in the image to be processed according to the confidence of the candidate bounding box of the PON board comprises: determination of the bounding box of the target PON board in the image to be processed according to the confidence of the candidate bounding box of the PON board and auxiliary information; and the auxiliary information comprises at least one of the distance between the candidate bounding box of the PON board and the bounding box of the marker and the overlapping area between the candidate bounding box of the PON board and the bounding box of the marker.

[0012] It can be seen that, since the bounding box of the target PON board in the image to be processed is determined according to the confidence of the candidate bounding box of the PON board and auxiliary information, the confidence of the candidate bounding box of the PON board can accurately reflect the fitting degree of the candidate bounding box of the PON board and the real PON board, and the auxiliary information can reflect the reliability of the candidate bounding box of the PON board; therefore, the bounding box of the target PON board in the image to be processed can be accurately determined.

[0013] In some embodiments, the number of the candidate detection boxes of the PON board is greater than 1; and the determining the detection box of the target PON board in the image to be processed according to the confidence and the auxiliary information of the candidate detection boxes of the PON board comprises: determining a first weight of each candidate detection box of the PON board according to the confidence of the candidate detection box, and determining a second weight of the candidate detection box according to the auxiliary information corresponding to the candidate detection box; the first weight of the candidate detection box is positively correlated with the confidence of the candidate detection box, the second weight of the candidate detection box is negatively correlated with the first information, and the second weight of the candidate detection box is positively correlated with the second information; the first information represents the distance between the candidate detection box and the detection box of the marker, and the second information represents the overlapping area between the candidate detection box and the detection box of the marker; and the detection box of the target PON board in the image to be processed is determined according to the first weight of each candidate detection box of the PON board, the second weight of each candidate detection box of the PON board, and the position information of each candidate detection box of the PON board.

[0014] It can be seen that the confidence and the auxiliary information of the candidate detection boxes of the PON board are converted into the first weight and the second weight for easy calculation, so that the detection box of the target PON board in the image to be processed can be determined conveniently and quickly based on the first weight of each candidate detection box, the second weight of each candidate detection box, and the position information of each candidate detection box.

[0015] In some embodiments, the determining the detection box of the target PON board in the image to be processed according to the first weight of each candidate detection box of the PON board, the second weight of each candidate detection box of the PON board, and the position information of each candidate detection box of the PON board comprises: performing weighted average calculation on the position coordinates of each candidate detection box of the PON board according to the first weight of each candidate detection box of the PON board and the second weight of each candidate detection box of the PON board, to obtain the position coordinates of the detection box of the target PON board; and determining the detection box of the target PON board in the image to be processed according to the position coordinates of the detection box of the target PON board.

[0016] It can be seen that, since the first weight can reflect the confidence of each candidate detection box, and the second weight can reflect the distance and / or the overlapping area between the candidate detection box and the marker, the position coordinates of the detection box of the target PON board can be calculated by performing weighted average calculation on the position coordinates of each candidate detection box based on the first weight of each candidate detection box and the second weight of each candidate detection box, so that the position coordinates of the detection box of the target PON board finally calculated can be consistent with the real scene, that is, the detection box of the target PON board in the image to be processed can be determined more accurately.

[0017] In some embodiments, the first target further includes a preset marker; the target detection on the to-be-processed image for the first target to determine the detection frame of the target passive optical network (PON) board in the to-be-processed image includes: performing target detection on the to-be-processed image for the first target to determine the detection frame of the marker and the candidate detection frame of the PON board in the to-be-processed image; and determining the detection frame of the target PON board in the to-be-processed image according to the auxiliary information of the candidate detection frame of the PON board; the auxiliary information includes at least one of the distance between the candidate detection frame of the PON board and the detection frame of the marker and the overlapping area between the candidate detection frame of the PON board and the detection frame of the marker.

[0018] It can be seen that, since the detection frame of the target PON board in the to-be-processed image is determined according to the auxiliary information of the candidate detection frame of the PON board, and the auxiliary information can reflect the reliability of the candidate detection frame of the PON board, the detection frame of the target PON board in the to-be-processed image can be determined more accurately.

[0019] The embodiment of the present application further provides a port occupation detection device, and the device includes:

[0020] a first detection module, configured to perform target detection on a to-be-processed image for a first target to determine a detection frame of a target passive optical network (PON) board in the to-be-processed image, wherein the first target at least includes the PON board;

[0021] a second detection module, configured to perform target detection on an image in the detection frame of the target PON board for a second target to obtain a detection frame of the second target and a category of the second target, wherein the second target includes a PON port, and the category of the second target includes an occupied PON port and an idle PON port.

[0022] The embodiment of the present application further provides an electronic device, including a processor and a memory for storing a computer program capable of running on the processor; wherein the processor is configured to run the computer program to perform any of the above port occupation detection methods.

[0023] The embodiment of the present application further provides a computer storage medium, which stores a computer program, and the computer program is executed by a processor to implement any of the above port occupation detection methods.

[0024] It can be seen that the embodiment of the present application can not only detect the PON board in the to-be-processed image, but also further detect the state of the PON port in the detection frame of the target PON board on the basis of determining the detection frame of the target PON board, so that, compared with target detection in the to-be-processed image, the embodiment of the present application can more accurately detect the state of the PON port in the smaller detection frame of the target PON board, thereby facilitating improvement of the recognition accuracy and efficiency of the PON port state. BRIEF DESCRIPTION OF DRAWINGS

[0025] Figure 1 An annotation diagram of a PON board and a PON port in the related art;

[0026] Figure 2 A flowchart of a port occupancy detection method according to an embodiment of the present application;

[0027] Figure 3 An annotation diagram of a PON board and a PON port detected by a detection method supporting arbitrary quadrilateral detection according to an embodiment of the present application;

[0028] Figure 4 An annotation diagram of a candidate detection frame of a PON board screened according to an embodiment of the present application;

[0029] Figure 5 A flowchart of a port occupancy detection method according to an embodiment of the present application;

[0030] Figure 6 An exemplary to-be-processed image according to an embodiment of the present application;

[0031] Figure 7 An annotation diagram of a detection frame of a first target according to an embodiment of the present application;

[0032] Figure 8 An image obtained by modifying a to-be-processed image according to a detection frame of a target PON board according to an embodiment of the present application;

[0033] Figure 9 A detection result diagram of a target PON board and a PON port detected in a to-be-processed image according to an embodiment of the present application;

[0034] Figure 10 Another detection result diagram of a target PON board and a PON port detected in a to-be-processed image according to an embodiment of the present application;

[0035] Figure 11 An exemplary diagram of a PON port state list provided according to an embodiment of the present application;

[0036] Figure 12This is a diagram illustrating the verification results of the PON port occupancy status presented on the network management side and the actual occupancy status on site, derived from relevant technologies.

[0037] Figure 13 The first schematic diagram showing the actual on-site occupancy of the PON port provided in this application embodiment;

[0038] Figure 14 This is a schematic diagram illustrating an errata of the PON port occupancy status as presented on the network management side and the actual occupancy status on site, obtained using the technical solution of this application embodiment.

[0039] Figure 15 A second schematic diagram illustrating the actual on-site occupancy of the PON port provided in this application embodiment;

[0040] Figure 16 This is a schematic diagram showing the verification results of the PON port occupancy status presented on the network management side and the actual occupancy status on site in the embodiments of this application;

[0041] Figure 17 This is a schematic diagram illustrating another correction result regarding the occupancy status of the PON port on the network management side and the actual occupancy status on site, obtained using the technical solution of the embodiments of this application.

[0042] Figure 18 This is a schematic diagram of the port occupancy detection device according to an embodiment of this application;

[0043] Figure 19 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0044] As active device ports, PON ports can have their operating status and traffic monitored in real time. However, if an idle PON port is plugged into a pigtail on-site, verifying its actual occupancy / pre-occupancy requires joint confirmation from multiple parties, including resource configuration providers, home customers, enterprise customers, core network maintenance personnel, and regional support centers, which is time-consuming and labor-intensive. Currently, wired networks undergo frequent optimization and adjustments, and discrepancies often occur between the occupancy status displayed on the PON port management side and the actual occupancy status of PON port pigtails (or PON terminal pigtails) on-site.

[0045] In transmission or other service scenarios, on the one hand, when developing new services, a shortage of PON ports can occur, requiring the application for PON boards and subsequent resource allocation, which can impact the efficiency of rapid service activation. On the other hand, the lack of an effective post-application evaluation loop for PON port resources can lead to situations such as idle PON port pigtails and the inability to quickly identify whether actual service traffic is being generated, hindering cost reduction and service development. Therefore, it is necessary to monitor the status of PON ports.

[0046] In the related art, a scheme for identifying a port in a network device image based on an AI technology is as follows: a convolutional neural network model is trained by collecting images of a large number of original devices on site, and then the trained convolutional neural network model is used for image feature recognition and target detection to obtain a result representing a port state. Since a device port usually includes multiple rows and multiple columns of ports, and a device panel is blocked by labels or optical fibers, etc., the occupation of the ports cannot be accurately identified. Exemplarily, general target detection algorithms such as a Faster Region Convolutional Neural Network (FasterRCNN), You Only Look Once (YOLO), and CenterNet are algorithms designed for horizontal rectangular frame detection. In the actual information identification scene of OLT device PON ports connected to optical fibers, in order to clearly expose the situation of each plug and socket, the image shooting angle needs to be tilted. In this case, if a horizontal rectangular frame is used to label each plug and socket, there will be a large amount of overlap in the labeling frames of different targets, which will adversely affect the positioning of the targets and reduce the recognition accuracy and efficiency. Further, if a rectangular rotating frame is used to label the target PON board, due to the shooting angle, the non-target PON board adjacent to the target PON board will be inevitably labeled in some images, causing the plugs and PON ports on the non-target PON board to also enter the recognition range. Referring to Figure 1 , the PON board in the rectangular frame on the left is a target PON board, and the PON board in the rectangular frame on the right is a non-target PON board. When labeling the PON ports in the target PON board, due to the shooting angle, the plugs and PON ports on the non-target PON board will enter the rectangular frame on the left, for example, Figure 1 , the PON ports in the dashed frame in Figure 1 also include the PON ports on the non-target PON board.

[0047] As can be seen, the conventional rectangular rotating frame algorithm such as R3Det and ROI-transformer algorithm is difficult to adapt to the actual information identification needs of OLT device PON ports connected to optical fibers, which ultimately leads to low recognition efficiency and low recognition accuracy.

[0048] To solve the above technical problems, the technical scheme of the embodiments of the present application is proposed. The embodiments of the present application improve the rotating frame detection algorithm based on the actual data characteristics, and obtain a double target detection model through training and optimization. Here, the double target detection model represents a detection model for detecting PON boards and PON ports respectively.

[0049] The embodiments of the present application will be further described in details below with reference to the drawings and embodiments. It should be understood that the embodiments provided herein are only used to explain the embodiments of the present application, and are not used to limit the embodiments of the present application. In addition, the embodiments provided below are used to implement some embodiments of the present application, and the technical solutions described in the embodiments of the present application can be combined in any manner without conflict.

[0050] It should be noted that in the embodiments of the present application, the terms “comprising”, “containing” or any other variants thereof are intended to cover non-exclusive containing, so that the method or device comprising a series of elements not only includes the elements explicitly described, but also includes other elements not explicitly listed, or includes the elements inherent in the implementation of the method or device. Without more limitation, the element defined by the sentence “comprising a......” does not exclude the presence of other related elements (such as steps in the method or units in the device, for example, the unit can be part of the circuit, part of the processor, part of the program or software, etc.) in the method or device comprising the element.

[0051] The embodiments of the present application provide a port occupation detection method, the port occupation detection method provided by the embodiments of the present application includes a series of steps, but the port occupation detection method provided by the embodiments of the present application is not limited to the steps described, similarly, the port occupation detection device provided by the embodiments of the present application includes a series of modules, but the device provided by the embodiments of the present application is not limited to including the modules explicitly described, and can also include the modules required to be set when obtaining related information or processing based on information.

[0052] Figure 2 A flowchart of the port occupation detection method of the embodiments of the present application is shown in Figure 2 The flowchart can include:

[0053] Step 201: performing target detection on a to-be-processed image for a first target to determine a detection frame of a target PON board in the to-be-processed image, and the first target at least includes the PON board.

[0054] In some embodiments, the to-be-processed image can be an original image collected by an image collection device, or an image obtained by preprocessing the original image.

[0055] In the embodiments of the present application, a pre-trained first neural network model can be used to perform target detection on the to-be-processed image, where the first neural network model is a model used for target detection.

[0056] Step 202: performing target detection on the image in the detection frame of the target PON board to obtain a detection frame of a second target and a category of the second target, the second target including a PON port, and the category of the second target including an occupied PON port and an idle PON port.

[0057] In some embodiments, after determining the detection frame of the target PON board in the to-be-processed image, image cropping can be performed on the detection frame of the target PON board in the to-be-processed image to obtain the image in the detection frame of the target PON board.

[0058] In the embodiments of the present application, the second neural network model can be used to perform target detection on the to-be-processed image, where the second neural network model is a model for target detection. In the embodiments of the present application, the occupied PON port represents a PON port with a plug, for example, an occupied PON port represents a PON occupied by an optical fiber or the like; and the idle PON port represents a PON port not occupied by any object.

[0059] In actual applications, steps 201 to 202 can be implemented based on a processor of an electronic device, and the processor can be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor.

[0060] It can be seen that the embodiments of the present application not only can detect the PON board in the to-be-processed image, but also can further detect the state of the PON port in the detection frame of the target PON board on the basis of determining the detection frame of the target PON board, so that, compared with target detection in the to-be-processed image, the embodiments of the present application can more accurately detect the state of the PON port in the smaller detection frame of the target PON board, thereby facilitating to improve the recognition accuracy and efficiency of the PON port state.

[0061] In some embodiments of the present application, the process of performing target detection on the to-be-processed image for the first target can include: detecting the first target from the to-be-processed image by using a detection method supporting arbitrary-shape quadrilateral detection; here, the detection method supporting arbitrary-shape quadrilateral detection can be a Rotation Sensitive Detector (RSDet) algorithm or other algorithms.

[0062] It can be seen that, compared with the scheme of detecting a target by using a rectangular rotating frame in the related art, the embodiments of the present application can detect a PON board by using a detection method supporting arbitrary-shape quadrilateral detection; since an arbitrary quadrilateral frame can make the annotation frame of the PON board fit the actual edge of the PON board, it can effectively avoid covering adjacent board cards, and for the PON board pictures actually taken in production, the problem of serious occlusion of the tail fiber, the detection method supporting arbitrary-shape quadrilateral detection used in the embodiments of the present application can improve the recognition accuracy of the target PON board.

[0063] In some embodiments of the present application, the process of performing target detection on the image in the detection frame of the target PON board for the second target can include: detecting the second target from the image in the detection frame of the target PON board by using a detection method supporting arbitrary-shape quadrilateral detection.

[0064] Reference is made to Figure 3 In the rectangular detection frame of the PON board, the detection frame of the PON port is an arbitrary-shape quadrilateral detection frame.

[0065] It can be seen that, compared with the scheme of detecting a target by using a rectangular rotating frame in the related art, the embodiments of the present application can detect a PON port by using a detection method supporting arbitrary-shape quadrilateral detection; since an arbitrary quadrilateral frame can make the annotation frame of the PON port fit the actual edge of the PON port, it can improve the recognition accuracy of the PON port.

[0066] In some embodiments of the present application, the process of performing target detection on the to-be-processed image for the first target can include: detecting the first target from the to-be-processed image by using a detection method supporting arbitrary-shape quadrilateral detection; here, the detection method supporting arbitrary-shape quadrilateral detection can be a Rotation Sensitive Detector (RSDet) algorithm or other algorithms.

[0067] In the embodiments of the present application, the higher the confidence of the candidate detection frame of the PON board, the more likely the candidate detection frame of the PON board fits the real PON board.

[0068] In some embodiments, a first weight of the candidate detection frame of the PON board can be determined according to the confidence of the candidate detection frame of the PON board, and then the detection frame of the target PON board in the image to be processed can be determined according to the first weight of the candidate detection frame of the PON board. Here, the first weight of the candidate detection frame of the PON board is positively correlated with the confidence. For example, the confidence of the candidate detection frame of the PON board can be directly determined as the first weight of the candidate detection frame of the PON board; in the case that i is an integer greater than or equal to 1, the first weight of the i-th candidate detection frame of the PON board can be denoted as

[0069] It can be seen that since the detection frame of the target PON board in the image to be processed is determined according to the confidence of the candidate detection frame of the PON board, and the confidence of the candidate detection frame of the PON board can accurately reflect the fitting degree of the candidate detection frame of the PON board and the real PON board, the detection frame of the target PON board in the image to be processed can be accurately determined by the embodiments of the present application.

[0070] In some embodiments of the present application, before the detection frame of the target PON board in the image to be processed is determined according to the confidence of the candidate detection frame of the PON board, candidate detection frames of the PON board whose geometric properties meet a first set condition can also be screened out from the candidate detection frames of the PON board; the candidate detection frames of the PON board whose geometric properties meet the first set condition are taken as the updated candidate detection frames of the PON board; the geometric properties include at least one of area and shape.

[0071] In the embodiments of the present application, in the case that the candidate detection frames of the PON board are at least two before screening, candidate detection frames of the PON board whose areas meet the first set condition can be screened out from the candidate detection frames of the PON board, or candidate detection frames of the PON board whose shapes meet the first set condition can be screened out from the candidate detection frames of the PON board, or candidate detection frames of the PON board whose areas and shapes meet the first set condition can be screened out from the candidate detection frames of the PON board. That is, the candidate detection frames of the PON board can be screened according to the area or the shape, or the candidate detection frames of the PON board can be screened according to the area and the shape.

[0072] In some embodiments, the set value range of the area of the candidate detection frame of the PON board can be determined according to the actual size of the PON board, if the area of the candidate detection frame of the PON board is within the set value range, it is considered that the area of the candidate detection frame of the PON board meets the first set condition; if the area of the candidate detection frame of the PON board is not within the set value range, it is considered that the area of the candidate detection frame of the PON board does not meet the first set condition, that is, the area of the candidate detection frame of the PON board does not match the actual situation, at this time, the candidate detection frame of the PON board can be removed.

[0073] In some embodiments, the shape parameter of the candidate detection frame of the PON board can be set according to the actual shape of the PON board. If the shape parameter of the candidate detection frame of the PON board is within the set value range, it is considered that the shape of the candidate detection frame of the PON board meets the first set condition. If the shape of the candidate detection frame of the PON board is not within the set value range, it is considered that the shape of the candidate detection frame of the PON board does not meet the first set condition, that is, the shape of the candidate detection frame of the PON board does not conform to the actual situation, and at this time, the candidate detection frame of the PON board can be removed. It can be seen that by judging whether the shape parameter of the candidate detection frame of the PON board is within the set value range, the embodiment of the present application can remove the candidate detection frame with obviously special shape.

[0074] In some embodiments, since the shape of the PON board is usually an arbitrary quadrilateral, the aspect ratio can be used as the shape parameter. For example, if the aspect ratio of the candidate detection frame of the PON board is greater than or equal to the aspect ratio threshold, it is considered that the shape of the candidate detection frame of the PON board meets the first set condition. If the aspect ratio of the candidate detection frame of the PON board is greater than or equal to the aspect ratio threshold, it is considered that the shape of the candidate detection frame of the PON board meets the first set condition.

[0075] In some embodiments, the number of candidate detection frames of the PON board before screening is m, and m is an integer greater than 1. In the m candidate detection frames of the PON board, the number of candidate detection frames whose geometric properties do not meet the first set condition is n, and n is an integer greater than or equal to 1. It can be seen that in the m candidate detection frames of the PON board, the number of candidate detection frames whose geometric properties meet the first set condition is m-n. Figure 4 In the figure, the candidate detection frame that meets the first set condition is presented by a rectangular frame.

[0076] It can be seen that the embodiment of the present application can screen the candidate detection frame whose geometric properties meet the first set condition according to the geometric properties of the candidate detection frame of the PON board, which is beneficial to remove the candidate detection frame of the PON board that does not conform to the actual situation, so that the candidate detection frame whose geometric properties meet the first set condition is more real, that is, the updated candidate detection frame of the PON board is more accurate.

[0077] In some embodiments of the present application, the first target can also include a pre-set marker. The process of target detection on the first target for the to-be-processed image to determine the detection frame of the target PON board further includes: performing target detection on the first target for the to-be-processed image to determine the detection frame of the marker in the to-be-processed image.

[0078] According to the confidence of the candidate detection frame of the PON board, the flow of determining the detection frame of the target PON board in the to-be-processed image can include: determining the detection frame of the target PON board in the to-be-processed image according to the confidence of the candidate detection frame of the PON board and auxiliary information; the auxiliary information includes at least one of the distance between the candidate detection frame of the PON board and the detection frame of the marker and the overlapping area between the candidate detection frame of the PON board and the detection frame of the marker.

[0079] Here, the marker can be set according to actual needs. For example, the marker is usually an object that facilitates positioning of the PON board in the image. For example, the marker can be a fixed shape patch that enhances target positioning. The marker can be a green or red circular magnetic patch. Of course, the marker can also be other objects that facilitate positioning of the PON board.

[0080] In some embodiments, at least two candidate detection frames of the marker in the to-be-processed image can be determined by first detecting a first target in the to-be-processed image. Then, a candidate detection frame that meets a second set condition in terms of geometric properties can be selected from the at least two candidate detection frames of the marker in the to-be-processed image. Finally, the detection frame of the marker in the to-be-processed image can be determined according to the candidate detection frame that meets the second set condition in terms of geometric properties.

[0081] For example, a set value range of the area of the candidate detection frame of the marker can be determined in advance. If the area of the candidate detection frame of the marker is within the set value range, it is considered that the area of the candidate detection frame of the marker meets the second set condition. If the area of the candidate detection frame of the marker is not within the set value range, it is considered that the area of the candidate detection frame of the marker does not meet the second set condition, and the corresponding candidate detection frame of the marker can be removed. For example, if the area of the candidate detection frame of the marker is too small, the transverse size (i.e., the size in the width direction of the PON board) of the candidate detection frame of the marker is greatly different from the width of the PON board, and it is not conducive to marking the PON board using the candidate detection frame of the marker. Therefore, the corresponding candidate detection frame of the PON board should be removed.

[0082] In some embodiments, the shape of the marker within the candidate detection frame of the marker can be detected, and it is determined whether the shape of the marker within the candidate detection frame of the marker matches the actual shape of the marker. If the shape of the marker within the candidate detection frame of the marker matches the actual shape of the marker, it is considered that the shape of the candidate detection frame of the marker meets the second set condition. If the shape of the marker within the candidate detection frame of the marker does not match the actual shape of the marker, it is considered that the shape of the candidate detection frame of the marker does not meet the second set condition, and the corresponding candidate detection frame of the marker can be removed. For example, in the case where the actual shape of the marker is a circle, if the shape of the marker within the candidate detection frame of the marker is not a circle, the corresponding candidate detection frame of the marker can be removed.

[0083] In some embodiments, after the candidate detection frame whose geometric attribute meets the second set condition is screened out, the coordinates of the vertexes of the candidate detection frame whose geometric attribute meets the second set condition can be averaged to obtain the detection frame of the marker in the to-be-processed image. In some embodiments, one of the candidate detection frames whose geometric attribute meets the second set condition can be randomly selected as the detection frame of the marker in the to-be-processed image. Of course, after the candidate detection frame whose geometric attribute meets the second set condition is screened out, the detection frame of the marker in the to-be-processed image can also be determined by other manners.

[0084] In some embodiments, the coordinates of the center point of the detection frame of the marker and the coordinates of the two vertexes of the proximal end of the candidate detection frame of the PON board can be determined, where the proximal end of the candidate detection frame of the PON board represents the end adjacent to the detection frame of the marker. Then, the distance between the candidate detection frame of the PON board and the detection frame of the marker can be determined according to the Euclidean distances between the two vertexes of the proximal end of the candidate detection frame of the PON board and the center point of the detection frame of the marker, respectively. In one example, the smaller value or the larger value can be selected as the distance between the candidate detection frame of the PON board and the detection frame of the marker from the Euclidean distances between the two vertexes of the proximal end of the candidate detection frame of the PON board and the center point of the detection frame of the marker, respectively. In another example, the distance between the candidate detection frame of the PON board and the detection frame of the marker can be obtained by averaging the Euclidean distances between the two vertexes of the proximal end of the candidate detection frame of the PON board and the center point of the detection frame of the marker, respectively.

[0085] In some embodiments, a second weight of the candidate detection frame of the PON board can be determined according to the auxiliary information of the candidate detection frame of the PON board; and then, the detection frame of the target PON board in the image to be processed can be determined according to the first weight and the second weight of the candidate detection frame of the PON board. Here, the second weight of the candidate detection frame is negatively correlated with the first information, and the second weight of the candidate detection frame is positively correlated with the second information; the first information represents the distance between the candidate detection frame and the detection frame of the marker, and the second information represents the overlapping area between the candidate detection frame and the detection frame of the marker. In the embodiments of the present application, in the case that i is an integer greater than or equal to 1, the second weight of the i th candidate detection frame of the PON board can be denoted as

[0086] It can be seen that, since the detection frame of the target PON board in the image to be processed is determined according to the confidence and the auxiliary information of the candidate detection frame of the PON board, the confidence of the candidate detection frame of the PON board can accurately reflect the fitting degree of the candidate detection frame of the PON board to the real PON board, and the auxiliary information can reflect the reliability of the candidate detection frame of the PON board; therefore, the embodiments of the present application can accurately determine the detection frame of the target PON board in the image to be processed.

[0087] In some embodiments of the present application, in the case that the number of the candidate detection frames of the PON board is greater than 1, the process of determining the detection frame of the target PON board in the image to be processed according to the confidence and the auxiliary information of the candidate detection frame of the PON board can include: determining the first weight of each candidate detection frame of the PON board according to the confidence of each candidate detection frame, and determining the second weight of each candidate detection frame according to the auxiliary information corresponding to each candidate frame; determining the detection frame of the target PON board in the image to be processed according to the first weight of each candidate detection frame of the PON board, the second weight of each candidate detection frame of the PON board, and the position information of each candidate detection frame of the PON board.

[0088] It can be seen that, the embodiments of the present application can convert the confidence and the auxiliary information of the candidate detection frame of the PON board into the first weight and the second weight which are convenient to calculate, so as to facilitate the determination of the detection frame of the target PON board in the image to be processed based on the first weight of each candidate detection frame, the second weight of each candidate detection frame, and the position information of each candidate detection frame.

[0089] In some embodiments of the present application, the position coordinates of each candidate detection frame of the PON board can be weighted and averaged according to the first weight of each candidate detection frame of the PON board and the second weight of each candidate detection frame of the PON board, to obtain the position coordinates of the detection frame of the target PON board; and the detection frame of the target PON board in the to-be-processed image is determined according to the position coordinates of the detection frame of the target PON board.

[0090] For example, the position coordinates of the i th candidate detection frame of the PON board can be denoted as (Coor) i , i is an integer from 1 to m-n, m-n is the number of the candidate detection frames of the updated PON board; and the coordinate information in (Coor) i may be embodied according to formula (1):

[0091] (Coor) i =(x1,y1,x2,y2,x3,y3,x4,y4) (1)

[0092] In formula (1), x1, x2, x3 and x4 respectively represent the horizontal coordinates of the four vertices of the i th candidate detection frame of the PON board, and y1, y2, y3 and y4 respectively represent the vertical coordinates of the four vertices of the i th candidate detection frame of the PON board.

[0093] For example, the position coordinates of each candidate detection frame of the PON board can be weighted and averaged according to formula (2):

[0094]

[0095] It can be seen that, since the first weight can reflect the confidence of each candidate detection frame, and the second weight can reflect the distance and / or overlapping area between the candidate detection frame and the marker, the weighted and averaged calculation of the position coordinates of each candidate detection frame based on the first weight of each candidate detection frame and the second weight of each candidate detection frame can make the finally calculated position coordinates of the detection frame of the target PON board consistent with the real scene, that is, the detection frame of the target PON board in the to-be-processed image can be determined more accurately.

[0096] In some embodiments of the present application, the process of performing target detection on the to-be-processed image for the first target to determine the detection frame of the target PON board in the to-be-processed image can include: performing target detection on the to-be-processed image for the first target to determine the detection frame of the marker and the candidate detection frame of the PON board in the to-be-processed image; and determining the detection frame of the target PON board in the to-be-processed image according to the auxiliary information of the candidate detection frame of the PON board.

[0097] In some embodiments, a second weight of the candidate detection frame of the PON board can be determined according to the auxiliary information of the candidate detection frame of the PON board; and then, the detection frame of the target PON board in the to-be-processed image can be determined according to the second weight of the candidate detection frame of the PON board.

[0098] It can be seen that, since the detection frame of the target PON board in the to-be-processed image is determined according to the auxiliary information of the candidate detection frame of the PON board, and the auxiliary information can reflect the reliability of the candidate detection frame of the PON board, the embodiments of the present application can more accurately determine the detection frame of the target PON board in the to-be-processed image.

[0099] In some embodiments, according to the characteristics of the target objects such as the PON board and the PON port in the actual image, the embodiments of the present application can make some improvements to the RSDet algorithm, design a double-target detection stage and multiple sets of detection frames, and at the same time ensure the recognition ability of small aspect ratio targets (such as PON ports) and large aspect ratio targets (such as PON boards). It is stipulated that a marker will be pasted on one end of the target PON board before the image is taken. The embodiments of the present application can assist in locating and detecting the target PON board with the help of the marker. By using a two-stage RSDet detection model, the objects detected in the double-target detection stage of the embodiments of the present application include: the target PON board (objcol), the marker (marker), the occupied PON port (inuse) and the idle PON port (nouse). Among them, the occupied PON port and the idle PON port are the objects to be recognized. The role of the target PON board is to help limit the area to be recognized, and the role of the marker is to help screen and adjust the detected objcol frame.

[0100] Figure 5 For a flowchart of the port occupancy detection method of the embodiments of the present application, as shown in Figure 5 , the flowchart can include:

[0101] Step 501: input a to-be-processed image.

[0102] Here, the user can upload the to-be-processed image taken by the electronic device to the electronic device, Figure 6 For an exemplary to-be-processed image in the embodiments of the present application, as can be seen, Figure 6 , which is an image of a PON board.

[0103] Step 502: perform target detection on the to-be-processed image for a first target to determine a detection frame of a target PON board in the to-be-processed image.

[0104] Here, by performing target detection on the to-be-processed image for a first target, the detection frame of the target PON board and the detection frame of the marker can be obtained, Figure 7 , in which the solid rectangular frame represents the detection frame of the target PON board, and the dashed square frame represents the detection frame of the marker.

[0105] Step 503: Extract the image in the detection frame of the target PON board.

[0106] In the embodiment of the present application, after the detection frame of the target PON board is determined, the to-be-processed image can be modified, that is, the part in the detection frame of the target PON board is reserved in the to-be-processed image, and the remaining part is blackened, and the modified image as shown in Figure 8 may be obtained. Here, the modified image can be used as the input data of the second neural network model for detecting the second target.

[0107] Step 504: Perform target detection on the image in the detection frame of the target PON board for the second target.

[0108] In the embodiment of the present application, after the image in the detection frame of the target PON board is detected for the second target, the detection frame of the second target, the category of the second target, and the confidence of the detection frame of the second target can be output. Here, the category of the second target can be an idle PON port or an occupied PON port. In some embodiments, the detection frame of the second target can be filtered according to the confidence of the detection frame of the second target, and the detection frame whose confidence is less than a preset confidence threshold is filtered out.

[0109] In some embodiments, after the image in the detection frame of the target PON board is detected for the second target, the detection frame of the first target and the detection result of the second target can be presented in the to-be-processed image, so that the image as shown in Figure 9 or Figure 10 may be obtained.

[0110] Step 505: Output the PON port state list.

[0111] In some embodiments, according to the detection result of the second target, the state of each PON port can be output in a preset order of each PON port. When the category of the PON port is an occupied PON port, the state of the PON port is defined as 1; when the category of the PON port is an idle PON port, the state of the PON port is defined as 0. In this way, by summarizing the states of each PON port, the PON port state list can be obtained, for example, the PON port state list is a list of numbers in the rectangular frame as shown in Figure 11 . Exemplarily, the preset order is the order from near to far from the PON port to the marker, and the preset order can also be other orders set according to actual needs.

[0112] In some embodiments, for the scene of detecting a single target PON board, the original result of target detection does not need to consider the spatial position relationship between PON boards; in the case that there are multiple target PON boards to be detected in a single image, the spatial position relationship between the detection frame of each target PON board and the detection frame of each PON port needs to be determined to determine the detection frame of the PON port corresponding to the detection frame of the target PON board; the detection frame of the PON port corresponding to the detection frame of the target PON board is located within the detection frame of the corresponding target PON board. After determining the corresponding relationship between the detection frame of the target PON board and the detection frame of the PON port, the spatial position relationship between the detection frame of each target PON board and the detection frame of each marker can be determined to determine the detection frame of the marker corresponding to the detection frame of the target PON board. In actual implementation, the distance between the detection frame of a target PON board and the detection frame of each marker can be calculated to determine the minimum distance value between the detection frame of the target PON board and the detection frame of each marker, and the detection frame of the marker corresponding to the minimum distance value is determined as the detection frame of the marker corresponding to the detection frame of the target PON board. After determining the corresponding relationship among the detection frame of the target PON board, the detection frame of the marker, and the detection frame of the PON port, the PON port state list on each target PON board can be output according to the corresponding relationship among the detection frame of the target PON board, the detection frame of the marker, and the detection frame of the PON port.

[0113] In some embodiments, in order to improve the recognition accuracy of targets of different sizes, different brightness, and different inclination, image flipping, mirror symmetry, grayscale images, image size enlargement and reduction, brightness contrast change, artificial negative samples, and other data enhancement strategies can be used to more accurately locate the target.

[0114] The technical effects of the embodiments of the present application will be described below through an application scenario.

[0115] In the scene of using related technologies to detect PON ports, the following can be obtained Figure 12 The check result diagram of the occupation of the PON port shown in FIG. 8A is consistent with the actual occupation in the field. Figure 12 In the light path option, the display port state is consistent with the system, that is, the occupation of the PON port presented on the network management side is consistent with the actual occupation in the field. However, in the light path option, the display port state is inconsistent with the system, that is, the occupation of the PON port presented on the network management side is inconsistent with the actual occupation in the field. Figure 13 In the first diagram of the actual occupation of the PON port in the field shown in FIG. 8B, the PON port in the rectangular box is port 8, and port 8 is in the actual occupation state in the field. However, port 8 is in an idle state on the network management side, that is, the occupation of port 8 presented on the network management side is inconsistent with the actual occupation in the field.

[0116] For the above problems, Figure 13Remove the image taken by hand, the technical scheme of the embodiment of the application can re-detect the state of each PON port, so as to find the correction result that the occupation condition of the port 8 presented on the network management side is inconsistent with the actual occupation condition on the site, that is, it can be concluded that Figure 14 The correction result diagram that the occupation condition of the PON port presented on the network management side is inconsistent with the actual occupation condition on the site is shown in the following figure, Figure 14 The system result represents the occupation condition of the PON port presented on the network management side, and the recognition result represents the actual occupation condition of the PON port on the site. In the system result and the recognition result, the eighth digit of the port information represents the occupation state of 8. It can be seen that the embodiment of the application can identify the correction result that the occupation condition of the port 8 presented on the network management side is inconsistent with the actual occupation condition on the site.

[0117] After the display interface of the electronic device presents Figure 14 The correction result, the plug on the port 8 can be pulled out, and the second diagram of the actual occupation condition of the PON port on the site can be obtained. Figure 15

[0118] For Figure 15 Remove the image taken by hand, the technical scheme of the embodiment of the application can re-detect the state of each PON port, so as to find the correction result that the occupation condition of the port 8 presented on the network management side is inconsistent with the actual occupation condition on the site, that is, it can be concluded that Figure 16 The correction result diagram that the occupation condition of the PON port presented on the network management side is inconsistent with the actual occupation condition on the site is shown in the following figure, Figure 17 The correction result diagram that the occupation condition of the PON port presented on the network management side is inconsistent with the actual occupation condition on the site is shown in the following figure. Figure 17 The system result represents the occupation condition of the PON port presented on the network management side, and the recognition result represents the actual occupation condition of the PON port on the site. In the system result and the recognition result, the eighth digit of the port information represents the occupation state of 8. It can be seen that the embodiment of the application can identify the correction result that the occupation condition of the port 8 presented on the network management side is inconsistent with the actual occupation condition on the site.

[0119] ​In summary, the embodiment of the present application is based on the actual data characteristics, selects the rotating frame detection algorithm and modifies it. The model is obtained through training and optimization. Based on the two-stage RSDet arbitrary quadrilateral detection algorithm, a target detection model is constructed, and a double target detection method is adopted. First, the position information of the target PON board is detected, and the confidence of each PON board detection frame, the mutual distance between the PON board and the marker, and the overlapping degree of the PON board and the marker are comprehensively considered, so as to select the detection frame that is most likely to be the real target PON board from the multiple candidate detection frames of the target PON board. After obtaining the detection frame of the first target, the PON port state information is detected, and in the target PON board area, the precise detection of the dense small port is carried out, the corresponding relationship between the jack and each target PON board is detected, and finally the PON port state list is output, which can effectively improve the precision and recall rate of the AI recognition of the port connection state.

[0120] The embodiment of the present application is based on AI recognition technology. By taking a photo of the PON port panel, the on-site PON port tail fiber occupation can be quickly identified, and the port that has not actually opened the network management and has not actually generated actual traffic can be found. The on-site personnel releases the empty occupation PON port according to the identification result.

[0121] The embodiment of the present application relies on the artificial intelligence basic platform, core capabilities and application product research and development. By using artificial intelligence technology, from the three angles of operation and maintenance, business and value, the OLT PON virtual occupation identification application is created. The on-site maintenance personnel simply takes a photo, the system completes image recognition, port and network management data, pipeline data comparison, and then outputs the identification result of the empty occupation PON port through the pipeline application (APP), and issues a fiber removal work order. The on-site maintenance personnel directly implements tail fiber removal and resource release, assists in business splicing of the PON board with less slot in the actual network, and removes the idle PON board from the network, improves the PON network business carrying efficiency, and improves the resource utilization rate. The intelligent judgment and implementation of the mature system are presented, the operation time is reduced, the error correction efficiency is improved, the resources are accurately promoted, and a virtuous cycle is formed.

[0122] The embodiment of the application can compare the consistency of three points through the inventory PON port network management data, pipeline data and field tail fiber image, analyze inconsistent cases, determine the releasable empty occupied PON port, release the PON port and its full-range physical port, system optical path and redundant network management data. The embodiment of the application can be deployed in a network intelligent platform, developed using the python language, applied to the open source web development framework Django, and followed the idea of MVC design. The distributed technology kubernetes is used to deploy in the form of microservices, realize independent deployment between services, monitor the system running in real time, and ensure the stable operation of the system. The embodiment of the application can be realized based on the AI capability of the network intelligent platform, and each region can aggregate, assemble, layout the local customized AI application scene according to the demand, and quickly reuse and flexibly promote. Since the dumb resource construction management mode, management pain points and improvement demands of each region are consistent, and the management model is uniformly standardized by the group, the technical solution of the embodiment of the application can be quickly deployed and landed in each region.

[0123] The embodiment of the application aims at the inventory OLT board card, checks the terminal occupation and data accuracy in a full amount, compares the extracted information with the data in the system, automatically issues a correction work order, and activates the inventory resources. Further, the embodiment of the application can improve the utilization rate of the board card, can generate an enabling value, changes the manual data input and resource management process to automatic completion by taking pictures, and greatly improves the efficiency.

[0124] Those skilled in the art can understand that in the above method of the specific embodiment, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0125] On the basis of the port occupation detection method proposed in the foregoing embodiment, the embodiment of the application further proposes a port occupation detection device.

[0126] Figure 18 The structure diagram of a port occupation detection device of the embodiment of the application is shown in Figure 18 The device can include:

[0127] A first detection module 1801 is configured to perform target detection on a first target for a to-be-processed image, determine a detection frame of a target PON board in the to-be-processed image, and the first target at least includes a PON board.

[0128] A second detection module 1802 is configured to perform target detection on a second target for an image in the detection frame of the target PON board, obtain a detection frame of the second target and a category of the second target, and the second target includes a PON port, and the category of the second target includes an occupied PON port and an idle PON port.

[0129] In some embodiments, the first detection module 1801 is configured to perform target detection on the to-be-processed image for the first target, and determine a detection frame of a target PON board in the to-be-processed image, including:

[0130] detecting the PON board in the to-be-processed image, and determining a candidate detection frame of the PON board in the to-be-processed image;

[0131] determining the detection frame of the target PON board in the to-be-processed image according to the confidence of the candidate detection frame of the PON board.

[0132] In some embodiments, the first detection module 1801 is further configured to, before determining the detection frame of the target PON board in the to-be-processed image according to the confidence of the candidate detection frame of the PON board, filter out a candidate detection frame with a geometric attribute meeting a first set condition from the candidate detection frame of the PON board; and take the candidate detection frame with the geometric attribute meeting the first set condition as an updated candidate detection frame of the PON board.

[0133] In some embodiments, the first target further includes a pre-set marker; and the first detection module 1801 is configured to perform target detection on the to-be-processed image for the first target, and determine a detection frame of a target PON board in the to-be-processed image, including: performing target detection on the to-be-processed image for the first target, and determining a detection frame of the marker in the to-be-processed image.

[0134] The first detection module 1801 is configured to determine the detection frame of the target PON board in the to-be-processed image according to the confidence of the candidate detection frame of the PON board, including: determining the detection frame of the target PON board in the to-be-processed image according to the confidence of the candidate detection frame of the PON board and auxiliary information; and the auxiliary information includes at least one of a distance between the candidate detection frame of the PON board and the detection frame of the marker and an overlapping area between the candidate detection frame of the PON board and the detection frame of the marker.

[0135] In some embodiments, the number of the candidate detection frames of the PON board is greater than 1; and the first detection module 1801 is configured to determine the detection frame of the target PON board in the to-be-processed image according to the confidence of the candidate detection frame of the PON board and auxiliary information, including:

[0136] determine a first weight of each candidate detection frame of the PON board according to the confidence of the candidate detection frame, and determine a second weight of the candidate detection frame according to the auxiliary information corresponding to the candidate detection frame; the first weight of the candidate detection frame is positively correlated with the confidence of the candidate detection frame, the second weight of the candidate detection frame is negatively correlated with the first information, and the second weight of the candidate detection frame is positively correlated with the second information; the first information represents the distance between the candidate detection frame and the detection frame of the marker, and the second information represents the overlapping area between the candidate detection frame and the detection frame of the marker.

[0137] determine the detection frame of the target PON board in the image to be processed according to the first weight of each candidate detection frame of the PON board, the second weight of each candidate detection frame of the PON board, and the position information of each candidate detection frame of the PON board.

[0138] In some embodiments, the first detection module 1801 is configured to determine the detection frame of the target PON board in the image to be processed according to the first weight of each candidate detection frame of the PON board, the second weight of each candidate detection frame of the PON board, and the position information of each candidate detection frame of the PON board, and includes:

[0139] perform weighted average calculation on the position coordinates of each candidate detection frame of the PON board according to the first weight of each candidate detection frame of the PON board and the second weight of each candidate detection frame of the PON board, to obtain the position coordinates of the detection frame of the target PON board; and determine the detection frame of the target PON board in the image to be processed according to the position coordinates of the detection frame of the target PON board.

[0140] In some embodiments, the first target further includes a pre-set marker; and the first detection module 1801 is configured to perform target detection on the image to be processed for the first target to determine the detection frame of the target PON board in the image to be processed, including: performing target detection on the image to be processed for the first target to determine the detection frame of the marker and the candidate detection frame of the PON board in the image to be processed; and determining the detection frame of the target PON board in the image to be processed according to the auxiliary information of the candidate detection frame of the PON board; the auxiliary information includes at least one of the distance between the candidate detection frame of the PON board and the detection frame of the marker, and the overlapping area between the candidate detection frame of the PON board and the detection frame of the marker.

[0141] In actual applications, the first detection module 1801 and the second detection module 1802 can both be implemented based on a processor of an electronic device.

[0142] It should be noted that the description of the above device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.

[0143] It should be noted that in the embodiments of the present application, if the above-mentioned method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a terminal, a server, etc.) to execute all or part of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various media that can store program codes. Thus, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0144] Correspondingly, the embodiments of the present application further provide a computer program product, which includes computer executable instructions for implementing any one of the port occupation detection methods provided by the embodiments of the present application.

[0145] Correspondingly, the embodiments of the present application further provide a computer storage medium, which stores computer executable instructions for implementing any one of the port occupation detection methods provided by the above embodiments.

[0146] The embodiments of the present application also provide an electronic device, Figure 19 The constituent structure of the electronic device provided by the embodiments of the present application is shown in FIG. 19, which can include: Figure 19

[0147] a memory 191 for storing executable instructions;

[0148] a processor 192 for executing the executable instructions stored in the memory 191 to implement any one of the port occupation detection methods.

[0149] The processor 192 can be at least one of an ASIC, a DSP, a DSPD, a PLD, an FPGA, a CPU, a controller, a microcontroller, and a microprocessor.

[0150] ​The computer readable storage medium / memory described above can be a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Ferromagnetic Random Access Memory (FRAM), a Flash Memory, a magnetic surface memory, an optical disc, a Compact Disc Read-Only Memory (CD-ROM), or the like memory; or can be various terminals including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, and the like.

[0151] In some embodiments, the apparatus provided by the embodiments of the present application has functions or includes modules that can be used to perform the methods described in the above method embodiments, and the specific implementation can refer to the description of the above method embodiments. For brevity, it will not be repeated here.

[0152] The above description of each embodiment tends to emphasize the differences between each embodiment, and the same or similar parts can be mutually referred to. For brevity, it will not be repeated here.

[0153] The methods disclosed in each of the method embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method embodiments.

[0154] The features disclosed in each of the product embodiments provided by the present application can be combined arbitrarily without conflict to obtain new product embodiments.

[0155] The features disclosed in each of the method or device embodiments provided by the present application can be combined arbitrarily without conflict to obtain new method or device embodiments.

[0156] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, also can be through hardware, but many cases the former is the better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the contribution to the prior art can be embodied in the form of software products, the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disc, optical disc), including a number of instructions to make a terminal (may be a mobile phone, computer, server, air conditioner, or network equipment, etc.) executes the method described in various embodiments of the present application.

[0157] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, the above-mentioned specific embodiments are only illustrative, but not limited, those skilled in the art can make many forms without departing from the purpose of the present application and the scope protected by the claims under the inspiration of the present application, which all belong to the protection of the present application.

Claims

1. A method for detecting port occupancy, characterized in that, The method includes: Target detection is performed on the image to be processed for a first target to determine the detection frame of the target passive optical fiber network (PON) board in the image to be processed, wherein the first target includes at least the PON board; The image within the detection frame of the target PON board is subjected to target detection for the second target to obtain the detection frame of the second target and the category of the second target. The second target includes a PON port, and the category of the second target includes occupied PON ports and idle PON ports. The first target also includes pre-defined markers; The step of performing target detection on the image to be processed for a first target, and determining the detection frame of the target passive optical network (PON) board in the image to be processed, includes: Target detection is performed on the image to be processed for the first target to determine the detection box of the marker in the image to be processed and the candidate detection box of the PON board; Based on the auxiliary information of the candidate detection box of the PON board, the detection box of the target PON board in the image to be processed is determined; the auxiliary information includes at least one of the following: the distance between the candidate detection box of the PON board and the detection box of the marker, and the overlap area between the candidate detection box of the PON board and the detection box of the marker.

2. The method according to claim 1, characterized in that, Before determining the detection bounding box of the target PON board in the image to be processed, the method further includes: Candidate detection frames whose geometric properties meet the first set conditions are selected from the candidate detection frames of the PON board; the candidate detection frames whose geometric properties meet the first set conditions are used as the updated candidate detection frames of the PON board.

3. The method according to claim 1, characterized in that, The step of determining the detection box of the target PON board in the image to be processed based on the auxiliary information of the candidate detection box of the PON board includes: Based on the confidence level and auxiliary information of the candidate detection boxes of the PON board, the detection box of the target PON board in the image to be processed is determined.

4. The method according to claim 3, characterized in that, The step of determining the detection box of the target PON board in the image to be processed based on the confidence level and auxiliary information of the candidate detection boxes of the PON board includes: A first weight is determined for each candidate detection frame based on the confidence level of each candidate detection frame on the PON board, and a second weight is determined for each candidate detection frame based on the auxiliary information corresponding to each candidate frame. The first weight of the candidate detection frame is positively correlated with the confidence level of the candidate detection frame, the second weight of the candidate detection frame is negatively correlated with the first information, and the second weight of the candidate detection frame is positively correlated with the second information. The first information represents the distance between the candidate detection frame and the detection frame of the marker, and the second information represents the overlap area between the candidate detection frame and the detection frame of the marker. The detection box of the target PON board in the image to be processed is determined based on the first weight of each candidate detection box of the PON board, the second weight of each candidate detection box of the PON board, and the position information of each candidate detection box of the PON board.

5. The method according to claim 4, characterized in that, The step of determining the detection box of the target PON board in the image to be processed based on the first weight of each candidate detection box of the PON board, the second weight of each candidate detection box of the PON board, and the position information of each candidate detection box of the PON board includes: Based on the first weight and the second weight of each candidate detection box of the PON board, the position coordinates of each candidate detection box of the PON board are calculated by weighted average to obtain the position coordinates of the detection box of the target PON board; based on the position coordinates of the detection box of the target PON board, the detection box of the target PON board in the image to be processed is determined.

6. A port occupancy detection device, characterized in that, The device includes: The first detection module is used to perform target detection on the image to be processed for a first target, and to determine the detection frame of the target passive optical fiber network (PON) board in the image to be processed, wherein the first target includes at least the PON board. The second detection module is used to perform target detection on the image within the detection frame of the target PON board for the second target, and obtain the detection frame of the second target and the category of the second target. The second target includes a PON port, and the category of the second target includes occupied PON port and idle PON port. The first target also includes pre-defined markers; the second detection module is further used to perform target detection on the image to be processed for the first target, and to determine the detection box of the markers and the candidate detection box of the PON board in the image to be processed. Based on the auxiliary information of the candidate detection box of the PON board, the detection box of the target PON board in the image to be processed is determined; the auxiliary information includes at least one of the following: the distance between the candidate detection box of the PON board and the detection box of the marker, and the overlap area between the candidate detection box of the PON board and the detection box of the marker.

7. An electronic device, characterized in that, Includes a processor and memory for storing computer programs that can run on the processor; wherein, The processor is used to run the computer program to perform the port occupancy detection method according to any one of claims 1 to 5.

8. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the port occupancy detection method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • ODF socket state identification method and system based on machine vision

    CN114926414A