A method for barcode recognition of pre-terminal junction boxes based on Android applications

By combining deep learning and image enhancement algorithms, efficient and accurate barcode recognition of pre-terminal junction boxes is achieved, solving the problems of low efficiency and accuracy of barcode recognition in the maintenance of fiber optic access equipment, and providing a convenient fiber optic information management solution.

CN116227512BActive Publication Date: 2026-05-26YI TAI FEI LIU INFORMATION TECH LLC
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
YI TAI FEI LIU INFORMATION TECH LLC
Filing Date
2022-12-12
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In the maintenance of fiber optic access equipment, existing technologies rely on manual identification and entry of barcode information, which is inefficient, error-prone, and inaccurate in positioning in complex environments, making it difficult to meet the needs of efficient management.

Method used

The YOLOv4 object detection network based on deep learning is used to detect the pre-terminal junction box. Combined with image enhancement algorithm, port and terminal information is identified, and the correspondence is determined by port and terminal matching module. The barcode information is accurately identified by terminal barcode recognition module.

Benefits of technology

It improves the accuracy and efficiency of barcode area positioning, enables convenient, fast and accurate entry and management of fiber optic information, and solves the problems of inefficiency and error in manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116227512B_ABST
    Figure CN116227512B_ABST
Patent Text Reader

Abstract

This invention discloses a barcode recognition method for pre-terminal junction boxes based on an Android application, belonging to the field of image recognition technology. It employs a YOLOv4 target detection network to detect 20 target types, including the pre-terminal junction box body, ports, and terminals, thereby significantly improving the accuracy of barcode area positioning. A relative position stability filter is used to match ports and barcode terminals, determining the correspondence between multiple ports and barcode terminals, ensuring that each inserted barcode terminal accurately finds its corresponding port number. Finally, a barcode recognition module is used to identify the barcode information. This method facilitates more convenient, faster, and more accurate fiber optic information entry and management for relevant personnel using highly flexible and portable handheld devices such as mobile phones, solving the problems of low efficiency, incorrect barcode information entry, and high operational difficulty in current manual fiber optic line maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a pre-terminal junction box barcode recognition method based on an Android application. Background Technology

[0002] Pre-terminal junction boxes, as a widely used fiber optic access and switching device in network construction, are extensively used in various network environments, such as shopping malls and residential buildings. A vast number of fiber optic splitter boxes maintain and manage the access and switching of hundreds of millions of optical fibers with complete accuracy through the port numbers and barcode information on the terminals.

[0003] In practical applications, when maintaining fiber optic lines, equipment maintenance personnel rely on manual methods to check the plaintext information of the barcodes on each access terminal of the corresponding port one by one and manually enter the relevant information into the management platform, or use handheld devices to perform individual barcode recognition. This manual processing method or recognition one by one has disadvantages such as slow efficiency, errors in barcode information entry, and high operational difficulty. In particular, a large number of devices are installed in narrow, low-light corridor environments, where it is not convenient for manual operation to check the barcode information, and individual recognition is also easily affected by other terminals.

[0004] A search revealed, for example, Chinese patent application CN201611086011.1, which proposes a barcode positioning method. This method uses a camera to acquire barcode images, then extracts identifiable barcodes through image processing and pattern recognition techniques. Further, it determines the object information identified by the barcode based on its encoding technology, thus achieving the recognition of the interactive object. This patent utilizes the image characteristics of barcodes to find vertical stripes in the image and determines the effective barcode area by setting a threshold. However, in scenarios with multiple adjacent barcodes or complex backgrounds, this method cannot effectively or adequately capture the effective barcode area using a specific threshold, significantly hindering subsequent barcode information recognition and even preventing the identification of relevant information. Another example is Chinese patent application CN201910129971.9, which proposes a barcode positioning method based on image features. This method uses sampling to extract features to locate images containing barcodes, thereby finding the required barcode information within the image. The abstracted features are characterized by small data volume and clarity, reducing the actual computational load and accelerating processing speed. The patented method considers using feature extraction to locate barcode areas, but because it extracts features by sampling, information may be lost, which leads to inaccurate positioning in complex scenarios.

[0005] It is evident that traditional image processing and simple feature extraction methods cannot accurately locate the effective area of ​​the barcode and cannot effectively handle complex scenarios. On the other hand, manual scanning is inefficient and prone to errors. Therefore, a pre-terminal connector box barcode recognition method based on Android applications is needed. Summary of the Invention

[0006] The purpose of this application is to provide a pre-terminal junction box barcode recognition method based on an Android application to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, this application provides the following technical solution: a pre-terminal junction box barcode recognition method based on an Android application, comprising the following steps:

[0008] Step 1: Access the Android phone's camera to obtain camera image data, and encode the image into an RGB format image according to the encoding format of the input image data;

[0009] Step 2: Based on a deep learning-based object detection network, perform pre-terminal box body, port, and terminal detection on the encoded image from Step 1;

[0010] If a box is detected and its validity is confirmed, the maximum number of corresponding ports is determined according to the box type and the process proceeds to step 3. If no box is detected or the pre-terminal connector box is confirmed to be invalid, it is assumed that there is no pre-terminal connector box or that it is not adapted in the current image, and the process returns to step 1.

[0011] Step 3: Determine the validity of the pre-terminal junction box port and terminal information detected by the detection network in Step 2, filter out invalid ports and terminals, and sort the ports from left to right in the horizontal direction of the image;

[0012] Step 4: Use the port and terminal matching module to match the port and terminal targets obtained in Step 3 to obtain the port number corresponding to the port and the matching terminal.

[0013] If a terminal is matched with a corresponding port, the corresponding port number and terminal are bound to that port; if no terminal is matched with a corresponding port, only the corresponding port number is bound to that port.

[0014] Step 5: Using the terminal barcode recognition module, obtain the matched port and terminal information based on the port number from the port terminal matching information obtained in Step 4.

[0015] If the terminal barcode information corresponding to the corresponding port number has already been identified, then the barcode will not be identified again; if the terminal barcode information corresponding to the corresponding port number does not exist, then the terminal barcode information will be identified.

[0016] Preferably, in step 1, image frames are acquired from the Android phone camera using an image data reading module for subsequent processing.

[0017] Preferably, in step 2, the YOLOv4 model algorithm is used to perform calculations and inferences on the read image frames to detect relevant information in the image regarding the box body, ports, terminals, etc. of the pre-terminal junction box;

[0018] If a box is detected and its validity is confirmed, the maximum number of corresponding ports is determined according to the box type and the relevant information of the update module is set; if no box is detected or the pre-terminal junction box is confirmed to be invalid, it is assumed that there is no pre-terminal junction box or that it is not adapted in the current image, and the process returns to step 1 to continue reading image data.

[0019] Preferably, in step 3, the information detected in step 2 is filtered to remove obviously erroneous information, including target location errors and false detections.

[0020] Preferably, in step 3, the training of the YOLOv4 model is as follows: keeping the backbone network unchanged, modifying the number of classes in each YOLOlayer layer to 20 and the number of filters in the preceding convolutional layer to 75 according to the number of target types; keeping the input image 3 channels and performing 0-1 normalization; finally selecting the model with smaller loss values ​​on both the training and validation sets for conversion and int8 quantization as the final model.

[0021] Preferably, in step 5, the terminal barcode recognition module includes an image enhancement submodule. If the terminal barcode information corresponding to the corresponding port number does not exist, the image enhancement submodule is first used to perform bilateral filtering on the image containing the barcode information, and the filtered image is weighted and added to the original image to obtain a sharpened image with enhanced edge information, and the barcode information is recognized by the recognition algorithm.

[0022] In summary, the technical effects and advantages of this invention are as follows:

[0023] 1. In this invention, the YOLOv4 target detection network is used to detect 20 types of targets, including pre-terminal connector box body, ports, and terminals, thereby greatly improving the accuracy of barcode area positioning; the relative position stability filter box is used to match ports and barcode terminals to determine the correspondence between multiple ports and barcode terminals, so that the inserted barcode terminals can accurately find the corresponding port number.

[0024] 2. In this invention, a barcode recognition module is used to identify barcode information. This method makes it easier for relevant practitioners to use highly flexible and mobile handheld devices such as mobile phones to enter and manage fiber optic information more conveniently, quickly and accurately, solving the problems of low efficiency, incorrect barcode information entry and high operation difficulty in the current manual fiber optic line maintenance.

[0025] 3. In this invention, in response to the poor imaging quality of handheld devices such as mobile phones in different environments, the terminal image is first processed by bilateral filtering, and the processed and filtered image is weighted and fused with the original image. The enhancement algorithm of this module can reduce image noise and enhance image edge information, thereby increasing the robustness of image recognition. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a flowchart of the method in this embodiment;

[0028] Figure 2 This is a flowchart of the image enhancement algorithm used in the terminal barcode recognition module of this embodiment. Detailed Implementation

[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0030] Example: Reference Figure 1 The method for barcode recognition of pre-terminal junction boxes based on an Android application, as shown, includes the following steps:

[0031] Step 1: Access the Android phone's camera, use the image data reading module to acquire image frames from the Android phone's camera, and encode the image into an RGB format image according to the encoding format of the input image data;

[0032] Step 2: Based on a deep learning-based object detection network, the YOLOv4 model algorithm is used to perform calculations and inferences on the read image frames to detect relevant information about the pre-terminal junction box, such as the box body, ports, and terminals.

[0033] If a box is detected and its validity is confirmed, the maximum number of corresponding ports is determined according to the box type and processed in step 3; if no box is detected or the pre-terminal connector box is confirmed to be invalid, it is assumed that there is no pre-terminal connector box in the current image or that it is not adapted, and the process returns to step 1 to continue reading image data.

[0034] The training of the YOLOv4 model is as follows: the backbone network remains unchanged, and the number of classes in each YOLOlayer layer is modified to 20 and the number of filters in the preceding convolutional layer is modified to 75 according to the number of target types; the input image is kept to have 3 channels and is normalized to 0-1; finally, the model with smaller loss values ​​on both the training and validation sets is selected for transformation and int8 quantization as the final model.

[0035] Step 3: Determine the validity of the pre-terminal junction box port and terminal information detected by the detection network in Step 2, filter out invalid ports and terminals, delete obviously erroneous information, including target location errors and false detection targets, and sort the ports from left to right in the horizontal direction of the image;

[0036] Step 4: Use the port and terminal matching module to match the port and terminal targets obtained in Step 3 to obtain the port number corresponding to the port and the matching terminal.

[0037] If a terminal is matched with a corresponding port, the corresponding port number and terminal are bound to that port; if no terminal is matched with a corresponding port, only the corresponding port number is bound to that port.

[0038] Step 5: Using the terminal barcode recognition module, obtain the matched port and terminal information based on the port number from the port terminal matching information obtained in Step 4.

[0039] The terminal barcode recognition module includes an image enhancement submodule. If the terminal barcode information corresponding to the corresponding port number has already been recognized, it will not be recognized again; if the terminal barcode information corresponding to the corresponding port number does not exist, such as... Figure 2 As shown, the image enhancement submodule is first used to perform bilateral filtering on the image containing barcode information, and the filtered image is weighted and added to the original image to obtain a sharpened image with enhanced edge information. The barcode information is then recognized by the recognition algorithm, and the recognized port number and corresponding terminal barcode information are reported. The process then returns to step 1 to continue reading image data.

[0040] To address the issue of poor image quality in handheld devices such as mobile phones in different environments, the terminal images (including barcodes) are first processed by bilateral filtering. The filtered images are then weighted and fused with the original images. This module enhances the algorithm by reducing image noise and enhancing image edge information, thereby increasing the robustness of image recognition.

[0041] This invention utilizes a deep learning-based target detection network, specifically the YOLOv4 network, to detect 20 target types, including pre-terminal junction box bodies, ports, and terminals, significantly improving the accuracy of barcode area localization. A relative position stability filter is used to match ports and barcode terminals, determining the correspondence between multiple ports and barcode terminals, ensuring that each inserted barcode terminal accurately identifies its corresponding port number. Finally, a barcode recognition module identifies the barcode information. This method allows professionals to conveniently, quickly, and accurately input and manage fiber optic information using highly flexible, portable handheld devices like mobile phones, solving the problems of low efficiency, incorrect barcode information input, and high operational difficulty in current manual fiber optic line maintenance.

[0042] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An Android application-based pre-termination box barcode recognition method, characterized in that, Includes the following steps: Step 1: Access the Android phone's camera to obtain camera image data, and encode the image into an RGB format image according to the encoding format of the input image data; Step 2: Based on a deep learning-based object detection network, perform pre-terminal box body, port, and terminal detection on the encoded image from Step 1; If a box is detected and its validity is confirmed, the maximum number of corresponding ports is determined according to the box type and the process proceeds to step 3; if no box is detected or the pre-terminal connector box is confirmed to be invalid, then there is no pre-terminal connector box in the current image, and the process returns to step 1. Step 3: Determine the validity of the pre-terminal junction box port and terminal information detected by the detection network in Step 2, filter out invalid ports and terminals, and sort the ports from left to right in the horizontal direction of the image; Step 4: Use the port and terminal matching module to match the port and terminal targets obtained in Step 3 to obtain the port number corresponding to the port and the matching terminal. If a terminal is matched with a corresponding port, the corresponding port number and terminal are bound to that port; if no terminal is matched with a corresponding port, only the corresponding port number is bound to that port. Step 5: Using the terminal barcode recognition module, obtain the matched port and terminal information based on the port number from the port terminal matching information obtained in Step 4. If the terminal barcode information corresponding to the corresponding port number has already been identified, then no further barcode identification will be performed; if the terminal barcode information corresponding to the corresponding port number does not exist, then the terminal barcode identification module will be used to identify the terminal barcode information.

2. The barcode recognition method of the pre-termination box based on Android application according to claim 1, characterized in that: In step 1, image frames are acquired from the Android phone camera using the image data reading module for subsequent processing.

3. The method for barcode recognition of pre-terminal junction boxes based on Android applications according to claim 2, characterized in that: In step 2, the YOLOv4 model algorithm is used to perform calculations and inferences on the read image frames to detect information about the box body, port, and terminal of the pre-terminal junction box in the image. If a box is detected and its validity is confirmed, the maximum number of corresponding ports is determined according to the box type and processed according to step 3; if no box is detected or the pre-terminal junction box is confirmed to be invalid, then there is no pre-terminal junction box in the current image, and the process returns to step 1 to continue reading image data.

4. The method for barcode recognition of pre-terminal junction boxes based on Android applications according to claim 3, characterized in that: In step 3, the information detected in step 2 is filtered to remove obviously erroneous information, including target location errors and false detections.

5. The method for barcode recognition of pre-terminal junction boxes based on an Android application according to claim 3, characterized in that: In step 3, the training of the YOLOv4 model is as follows: keeping the backbone network unchanged, the number of classes in each YOLOlayer layer is modified to 20 and the number of filters in the preceding convolutional layer is modified to 75 according to the number of target types; the input image is kept to have 3 channels and is normalized to 0-1; finally, the model with smaller loss values ​​on both the training and validation sets is selected for conversion as the final model.

6. The method for barcode recognition of pre-terminal junction boxes based on Android applications according to claim 1, characterized in that: In step 5, the terminal barcode recognition module includes an image enhancement submodule. If the terminal barcode information corresponding to the corresponding port number does not exist, the image enhancement submodule is first used to perform bilateral filtering on the image containing the barcode information, and the filtered image is weighted and added to the original image to obtain a sharpened image with enhanced edge information, and the barcode information is recognized by the recognition algorithm.