Edge distance detection method based on AI identification and medium

Through the margin detection method based on AI recognition, the margin distance is automatically calculated and compared, and the problems of low margin detection accuracy and low efficiency in the existing technology are solved, and efficient and accurate margin detection and quality management are achieved.

CN119006389AActive Publication Date: 2024-11-22XIAMEN FOUR FAITH COMM TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411036552.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-22
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

Existing margin detection tools such as vernier calipers and laser measuring instruments have low accuracy and are affected by human factors, low work efficiency and high equipment costs, making it difficult to meet the precise detection requirements of the installation location of electronic equipment display screens.

Method used

Using the margin detection method based on AI recognition, the SN number on the margin detection device is automatically identified, combined with AI analysis of image data to calculate the margin distance, and compared with the preset allowable error range to determine whether the deviation exceeds the production quality requirements. scope, realize automated detection and recording.

Benefits of technology

It improves the accuracy and efficiency of margin detection, reduces the influence of human factors, reduces the complexity of operation and equipment costs, simplifies data processing and rework processing processes, and improves product quality management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006389A_ABST
    Figure CN119006389A_ABST
Patent Text Reader

Abstract

The invention discloses an edge distance detection method based on AI identification and a medium, and the method comprises the steps: operating an edge distance detection service program, and reporting an equipment model and configuration parameter information; judging whether new configuration parameter information is issued or not, and determining final configuration parameter information; acquiring image data, and sending an edge distance detection request when an SN number is identified; judging whether edge distance detection is executed or not and feeding back; identifying a first fixture and a second fixture in the image data, and generating an X-axis unit distance and a Y-axis unit distance; identifying a to-be-detected area, and generating an X-axis edge distance measurement data set and a Y-axis edge distance measurement data set; extracting a plurality of maximum numerical values and a plurality of minimum numerical values in the X-axis edge distance measurement data set and the Y-axis edge distance measurement data set, judging whether the to-be-detected area exceeds an allowable error range or not, and sending a result to a user interface program; and the user interface program reports a result to the production management platform and processes the result. According to the invention, a qualified prompt is automatically generated, so that edge distance detection is more automatic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of margin detection methods, and in particular to a margin detection method and medium based on AI recognition. Background Art

[0002] In the production process of electronic devices with display screens, there are strict requirements for the installation position of the display screen of the electronic device, which needs to be installed within a specific range to ensure the quality of the electronic device. The installation position of the display screen is usually checked by detecting the margin between the edge of the electronic device and the edge of the display screen, checking the installation of the display screen of the electronic device and the accuracy of the margin of the structural frame, and judging whether the deviation is within the effective range. If it exceeds the preset deviation threshold, a prompt is given to rework and abnormal records are made to improve product quality. The inspection data is reported to the production management platform for storage, which is convenient for subsequent production and quality departments to analyze and improve the production data.

[0003] In the prior art, the commonly used tools for margin detection are vernier calipers and laser measuring instruments. However, the vernier caliper has low precision, which will cause large deviations, and requires manual measurement, which makes the measurement results highly affected by human factors. Although the laser measuring instrument has high precision, it still requires special personnel to operate the measurement, and the measurement results will also be affected by human factors, resulting in low work efficiency. In addition, the laser measuring instrument is large in size and high in equipment cost. Summary of the invention

[0004] In view of this, the purpose of the present invention is to propose a margin detection method based on AI recognition, which automatically identifies the SN number on the margin detection device and then requests confirmation to start margin detection, and automatically generates the X-axis unit distance of each pixel point of each pixel row on the first fixture and the second fixture in the image data according to the first reference margin and the second reference margin preset on the first fixture and the second fixture, and combines AI analysis to identify the area to be detected in the image data to calculate the actual margin distance to be detected, and further compares it with the preset allowable error range to determine whether it exceeds the deviation range required for production quality, and makes corresponding records and processing prompts.

[0005] In order to achieve the above technical objectives, the technical solution adopted by the present invention is:

[0006] The present invention provides a margin detection method based on AI recognition, which is applied to a margin detection device with a display screen to be detected and a production management platform, and comprises the following steps:

[0007] Step 1: running a margin detection service program on the margin detection device, wherein the margin detection service program reports the device model and configuration parameter information of the current margin detection device to the production management platform;

[0008] Step 2, the production management platform determines whether to issue new configuration parameter information according to the equipment model and configuration parameter information, and the margin detection device determines the final configuration parameter information according to the issuance situation;

[0009] Step 3, the margin detection service program acquires the image data collected by the camera in real time, and identifies whether there is an SN number of the margin detection device in the image data according to the final configuration parameter information, and when the SN number is identified, sends a margin detection request carrying the SN number to the user interface program on the margin detection device;

[0010] Step 4, the user interface program receives the margin detection request, determines whether to perform margin detection according to the SN number carried in the margin detection request, and feeds back the determination result to the margin detection service program;

[0011] Step 5: When the margin detection service program receives feedback from the user interface program that it agrees to perform margin detection, the first fixture and the second fixture in the image data are analyzed and identified by the AI ​​recognition algorithm, and the X-axis unit distance of each pixel point in each pixel row in the first fixture and the Y-axis unit distance of each pixel point in each pixel column in the second fixture are calculated and generated according to the final configuration parameter information and the image pixel size;

[0012] Step 6: Analyze and identify the area to be detected in the image data through the AI ​​recognition algorithm, and calculate and generate an X-axis margin measurement data group and a Y-axis margin measurement data group corresponding to the area to be detected according to the number of pixels in the area to be detected, the X-axis unit distance of each pixel row, and the Y-axis unit distance of each pixel column;

[0013] Step 7, respectively extracting the largest multiple values ​​and the smallest multiple values ​​in the X-axis margin measurement data group and the Y-axis margin measurement data group, judging whether the area to be detected exceeds the allowable error range according to the configuration parameter information, the largest multiple values ​​and the smallest multiple values, and sending the result to the user interface program;

[0014] Step 8: The user interface program reports the result to the production management platform for processing.

[0015] Furthermore, the step 1 specifically includes:

[0016] Step 11, configuring a margin detection service program on the margin detection device;

[0017] Step 12: Start the margin detection device and establish a network connection with the production management platform through the TCP protocol;

[0018] Step 13: a login account and password for registration are pre-stored in the margin detection device;

[0019] Step 14: Run the margin detection service program, which calls the http interface and uses the login account and password pre-stored in the margin detection device to register and log in to the production management platform;

[0020] Step 15. After logging in, the margin detection service program reports the device model and configuration parameter information of the current margin detection device to the production management platform; the configuration parameter information includes the actual value of the reference margin, the standard value of the margin to be detected of the margin detection device, the allowable error range of the margin detection device, and the SN number reference format of the margin detection device.

[0021] Furthermore, the step 2 specifically includes:

[0022] Step 21: A production management database for storing data is configured on the production management platform;

[0023] Step 22: Different equipment models and corresponding configuration parameter information are preset in the production management database; each group of equipment models and their corresponding configuration parameter information are associated one by one;

[0024] Step 23, the production management platform receives the reported equipment model and configuration parameter information;

[0025] Step 24, the production management platform finds matching equipment model and configuration parameter information from the production management database according to the received equipment model;

[0026] Step 25, the production management platform compares the received configuration parameter information with the configuration parameter information found in the production management database; if the comparison result is inconsistent, it is determined that the configuration parameter information of the margin detection device needs to be updated, and the process goes to step 26; if the comparison result is consistent, it is determined that the configuration parameter information of the margin detection device does not need to be updated, and the current configuration parameter information of the margin detection device is used as the final configuration parameter information, and the process goes to step 3;

[0027] Step 26, the production management platform sends the configuration parameter information found in the production management database as new configuration parameter information to the margin detection device;

[0028] Step 27: The margin detection device receives the new configuration parameter information as the final configuration parameter information, and stores the final configuration parameter information in the flash, and then proceeds to step 3.

[0029] Furthermore, the step 3 specifically includes:

[0030] Step 31, a camera is fixed directly above the margin detection device;

[0031] Step 33, the camera collects image data of the margin detection device in real time and sends it to the margin detection device, the image data captured by the camera is an image containing the contents of the margin detection device, the display screen, two first fixtures respectively installed on the left and right edges of the margin detection device, and two second fixtures respectively installed on the upper and lower edges of the margin detection device;

[0032] Step 32: Connect the camera to the margin detection device via a USB interface or an Ethernet port;

[0033] Step 34, the margin detection service program obtains the image data, and calls the OCR recognition algorithm to recognize the SN number in the image data, and compares the character format of the SN number in the image data with the SN number reference format of the margin detection device preset in the final configuration parameter information. If they are consistent, it is determined that the SN number is recognized, and the process proceeds to step 35; if they are inconsistent, it is determined that the SN number is not recognized, and the process returns to step 34;

[0034] Step 35: The margin detection service program sends a margin detection request carrying the SN number to the user interface program configured on the margin detection device.

[0035] Furthermore, the step 4 specifically includes:

[0036] Step 41, the margin detection device starts the user interface program and creates a message queue, the message list is used to receive messages from the margin detection service program;

[0037] Step 42: the user interface program receives a margin detection request sent by the margin detection service program through a message queue;

[0038] Step 43: parse the margin detection request, obtain the SN number of the margin detection device, and display it on the display screen;

[0039] Step 44: compare the SN number displayed on the display screen with the SN number attached to the margin detection device. If they are consistent, the user interface program sends feedback information of agreeing to perform the detection to the margin detection service program, and enters step 5; if they are inconsistent, enter step 45.

[0040] Step 45: Manually correct the SN number on the display screen through the user interface and return to step 44.

[0041] Furthermore, in step 5, the first fixture and the second fixture in the image data are analyzed and identified by the AI ​​recognition algorithm, and the X-axis unit distance of each pixel point in each pixel row in the first fixture and the Y-axis unit distance of each pixel point in each pixel column in the second fixture are calculated and generated according to the final configuration parameter information and the image pixel size, specifically including:

[0042] Step 51, the margin detection service program starts the detection task thread to enter the margin detection process;

[0043] Step 52, the margin detection service program analyzes and identifies the first fixture and the second fixture in the image data through an AI recognition algorithm, the known fixed width distance between the left edge of the margin detection device and the edge of the first fixture on the left side and the known fixed width distance between the right edge of the margin detection device and the edge of the first fixture on the right side are both first reference margins, the known fixed height distance between the upper edge of the margin detection device and the edge of the second fixture on the upper side and the known fixed height distance between the lower edge of the margin detection device and the edge of the second fixture on the lower side are both second reference margins; the values ​​of the first reference margin and the second reference margin are both equal to the actual values ​​of the reference margins;

[0044] Step 53, obtaining the actual value of the reference margin, the number of pixel rows of the first fixture, and the number of pixel columns of the second fixture in the final configuration parameter information, and calculating the X-axis unit distance of each pixel point in each pixel row of the first fixture according to the actual value of the reference margin and the number of pixel points in each pixel row of the first fixture, and storing them in the corresponding array CKX[]. The calculation formula is: X-axis unit distance of pixel points in the current pixel row = actual value of the reference margin ÷ number of pixel points in the current pixel row;

[0045] Step 54, calculate the Y-axis unit distance of each pixel point in each pixel column of the second fixture according to the actual value of the reference margin and the number of pixels in each pixel column in the second fixture, and store it in the corresponding array CKY[]. The calculation formula is: Y-axis unit distance of pixel points in the current pixel column = actual value of the reference margin ÷ number of pixels in the current pixel column.

[0046] Furthermore, the step 6 specifically includes:

[0047] Step 61: Analyze and identify the area to be detected in the image data through an AI recognition algorithm, wherein the area to be detected is an area formed between an edge line where the first clamp and the second clamp contact the margin detection device and the edge of the display screen; the area to be detected includes a first area, a second area, a third area, and a fourth area, wherein the first area is an area close to the first clamp located on the left, the second area is an area close to the first clamp located on the right, the third area is an area close to the second clamp located on the top, and the fourth area is an area close to the second clamp located on the bottom;

[0048] Step 62, identify the number of pixel rows in the first area and the number of pixel points in each pixel row, and obtain the X-axis unit distance of the pixel row at the corresponding position from the array CKX[]. Generate X-axis margin measurement data of the corresponding pixel row in the first area according to the number of pixel points in each pixel row and the X-axis unit distance. The calculation formula is: X-axis margin measurement data corresponding to the current pixel row in the first area = X-axis unit distance of the current pixel row × number of pixel points in the current pixel row;

[0049] Step 63, identify the number of pixel rows and the number of pixel points in each pixel row in the second area, and obtain the X-axis unit distance of the pixel row at the corresponding position from the array CKX[]. Generate X-axis margin measurement data of the corresponding pixel row in the second area according to the number of pixel points in each pixel row and the X-axis unit distance. The calculation formula is: X-axis margin measurement data corresponding to the current pixel row in the second area = X-axis unit distance of the current pixel row × number of pixel points in the current pixel row; all X-axis margin measurement data calculated for the first area and the second area constitute an X-axis margin measurement data group Val_xl[].

[0050] Step 64, identify the number of pixel columns in the third area and the number of pixels in each pixel column, and obtain the Y-axis unit distance of the pixel column at the corresponding position from the array CKY[]. Generate Y-axis margin measurement data of the corresponding pixel column in the third area according to the number of pixels in each pixel column and the Y-axis unit distance. The calculation formula is: Y-axis margin measurement data corresponding to the current pixel column in the third area = Y-axis unit distance of the current pixel column × number of pixels in the current pixel column.

[0051] Step 65, identify the number of pixel columns and the number of pixels in each pixel column in the fourth region, and obtain the Y-axis unit distance of the pixel column at the corresponding position from the array CKY[]. Generate Y-axis margin measurement data of the corresponding pixel column in the fourth region according to the number of pixels in each pixel column and the Y-axis unit distance. The calculation formula is: Y-axis margin measurement data corresponding to the current pixel column in the fourth region = Y-axis unit distance of the current pixel column × number of pixels in the current pixel column. All Y-axis margin measurement data calculated in the third region and the fourth region constitute a Y-axis margin measurement data group Val_yl[].

[0052] Step 66: Merge the two X-axis margin measurement data calculated from the adjacent pixel rows in the X-axis margin measurement data group Val_xl[] to obtain the average value for data compression, so as to obtain the compressed X-axis margin measurement data group Val_x2[]. At the same time, merge the two Y-axis margin measurement data calculated from the adjacent pixel columns in the Y-axis margin measurement data group Val_yl[] to obtain the average value for data compression, so as to obtain the compressed Y-axis margin measurement data group Val_y2[].

[0053] Furthermore, the step 7 specifically includes:

[0054] Step 71: the standard values ​​of the margins to be detected in the configuration parameter information include an X-axis standard value x_val and a Y-axis standard value y_val; the width distance of the first area or the second area is the first margin to be detected, and the height distance of the third area or the fourth area is the second margin to be detected;

[0055] Step 72, extract the largest m1 values ​​in the X-axis margin measurement data group Val_x2[] and store them in the max1[m1] array and the smallest n1 values ​​in the min1[n1] array; the values ​​of m1 and n1 are set according to user needs;

[0056] Step 73, calculate the difference between the m1 values ​​in the max1[m1] array and the X-axis standard value x_val, obtain m1 first difference values, and compare the m1 first difference values ​​with the allowable error range. If at least one first difference value is greater than the allowable error range, it is determined that the margin detection device has a positive deviation exceeding the allowable error range, and the positive deviation rate of the X-axis = the number of positive deviations exceeding the allowable error range / m1;

[0057] Step 74, perform difference calculations on the X-axis standard value x_val and the n1 values ​​in the min1[n1] array to obtain n1 second difference values, and compare the n1 second difference values ​​with the allowable error range. If at least one second difference value is greater than the allowable error range, it is determined that the margin detection device has a negative deviation that exceeds the allowable error range, and the negative deviation rate of the X-axis = the number of negative deviations that exceed the allowable error range / n1;

[0058] Step 75, extract the largest m2 values ​​in the Y-axis margin measurement data group Val_y2[] and store them in the max2[m2] array and the smallest n2 values ​​in the min2[n2] array; the values ​​of m2 and n2 are set according to user needs;

[0059] Step 76, calculate the difference between the m2 values ​​in the max2[m2] array and the Y-axis standard value y_val, obtain m2 third differences, and compare the m2 third differences with the allowable error range. If at least one third difference is greater than the allowable error range, it is determined that the margin detection device has a positive deviation exceeding the allowable error range, and the positive deviation rate of the Y-axis = the number of positive deviations exceeding the allowable error range / m2;

[0060] Step 77, perform difference calculations on the Y-axis standard value y_val and the n2 values ​​in the min2[n2] array to obtain n2 fourth differences, and compare the n2 fourth differences with the allowable error range. If at least one fourth difference is greater than the allowable error range, it is determined that the margin detection device has a negative deviation that exceeds the allowable error range, and the negative deviation rate of the Y-axis = the number of negative deviations that exceed the allowable error range / n2;

[0061] Step 78: if all the first differences and the second differences are not greater than the allowable error range, it is determined that the first margin to be detected does not exceed the allowable error range; if all the third differences and the fourth differences are not greater than the allowable error range, it is determined that the second margin to be detected does not exceed the allowable error range; if both the first margin to be detected and the second margin to be detected do not exceed the allowable error range, it is determined that the area to be detected does not exceed the allowable error range; if at least one of all the first differences and the second differences is greater than the allowable error range, it is determined that the first margin to be detected exceeds the allowable error range; if at least one of all the third differences and the fourth differences is greater than the allowable error range, it is determined that the second margin to be detected exceeds the allowable error range; if the first margin to be detected and / or the second margin to be detected exceeds the allowable error range, it is determined that the area to be detected exceeds the allowable error range;

[0062] Step 79: Send the determined detection result to the user interface program.

[0063] Furthermore, the step 8 specifically includes:

[0064] Step 81, the user interface program receives the test result;

[0065] Step 82: If the test result shows that the area to be tested does not exceed the allowable error range, indicating that the margin detection equipment is qualified, the SN number and test result information of the margin detection equipment are recorded and reported to the production management platform, and then the user interface prompts that the margin detection equipment is qualified and enters the next equipment detection process after confirmation;

[0066] Step 83: If the test result shows that the area to be tested exceeds the allowable error range, indicating that the margin detection equipment is unqualified, the test result will be reported to the production management platform, and then the user interface will display the data and ratio of the out-of-value range, and prompt the equipment to be reworked. After confirming the rework, the SN number of the margin detection equipment and the analyzed information data will be recorded and the next equipment detection process will be entered.

[0067] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the margin detection method based on AI recognition as described above is implemented.

[0068] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art:

[0069] 1. The configuration parameter information (including the actual value of the reference margin, the standard value of the margin to be detected by the margin detection equipment, the allowable error range of the margin detection equipment and the SN number reference format of the margin detection equipment) is associated with the equipment model of the margin detection equipment and stored on the production management platform. The production management platform identifies and issues new configuration parameter information based on the reported equipment model and configuration parameter information, thereby realizing unified and centralized configuration management of parameter configuration information.

[0070] 2. Acquire the image data collected by the camera in real time and call the OCR recognition algorithm to execute the SN number on the margin detection device. After confirming the SN number through the UI prompt, perform margin detection, interactively confirm the SN number and support manual modification of misidentification, which can ensure both the detection execution and the correctness of the SN number record.

[0071] 3. The margin detection service program first detects the first reference margin and the second reference margin to generate the X-axis unit distance and the Y-axis unit distance respectively, and stores them in the corresponding arrays to provide basic data for automatic margin detection. During detection, there is no need for manual entry or manual calibration by personnel, and the operation is simple.

[0072] 4. Identify the area to be detected, calculate and generate the X-axis margin measurement data set and the Y-axis margin measurement data set corresponding to the area to be detected according to the number of pixels in the area to be detected, the X-axis unit distance of each pixel row and the Y-axis unit distance of each pixel column, and perform averaging and compression processing to achieve data anti-shake processing to make the data more accurate.

[0073] 5. After identifying and calculating the difference between the margin data and the preset standard value of the margin to be tested, it is compared with the preset allowable error range and automatically generates a prompt to check whether it is qualified, making the operation simpler and more efficient; the UI prompts the personnel to confirm the rework and automatically records it. The record can be further uploaded to the production management platform for analysis by the quality department and further improvement of the process.

[0074] 6. OCR recognizes SN number and automatically records unqualified products, which is simpler and more efficient without manual recording. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0076] Figure 1 It is an execution flow chart of a margin detection method based on AI recognition provided by an embodiment of the present invention.

[0077] Figure 2 It is a structural schematic diagram of a margin detection device provided in an embodiment of the present invention.

[0078] Figure 3 It is a data interaction diagram of the margin detection device provided in an embodiment of the present invention.

[0079] Figure 4 It is a data interaction diagram of the production management platform provided by an embodiment of the present invention.

[0080] Figure 5 It is a data interaction diagram of the margin detection service program provided by an embodiment of the present invention.

[0081] Figure 6 It is a data interaction diagram of a user interface program provided by an embodiment of the present invention.

[0082] Figure 7 It is a schematic diagram of a computer-readable storage medium provided by an embodiment of the present invention.

[0083] Description of the numbers in the figure:

[0084] 1-margin detection device, 2-display screen, 3-first clamp, 4-second clamp, 5-area to be detected, 51-first area, 52-second area, 53-third area, 54-fourth area, L1-first reference margin, L2-second reference margin, L3-first margin to be detected, L4-second margin to be detected. DETAILED DESCRIPTION

[0085] The present invention will be further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present invention, but are not intended to limit the scope of the present invention. Similarly, the following examples are only partial embodiments of the present invention rather than all embodiments, and all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present invention.

[0086] See also Figure 1-Figure 6 A margin detection method based on AI recognition of the present invention is applied to a margin detection device 1 with a display screen 2 to be detected and a production management platform, and comprises the following steps:

[0087] Step 1: Run the margin detection service program on the margin detection device 1, and the margin detection service program reports the device model and configuration parameter information of the current margin detection device 1 to the production management platform;

[0088] In this embodiment, the step 1 specifically includes:

[0089] Step 11: a margin detection service program is configured on the margin detection device 1; the margin detection service program is an embedded program developed by the user and runs on the margin detection device 1, and is integrated in the margin detection device 1 by default;

[0090] Step 12: Start the margin detection device 1 and establish a network connection with the production management platform through the TCP protocol; through the network connection between the margin detection device 1 and the production management platform, data interaction between the margin detection service program and the production management platform can be achieved;

[0091] Step 13: The margin detection device 1 is pre-stored with a login account and password for registration, so that data can be directly called during registration;

[0092] Step 14: Run the margin detection service program, which calls the http interface and uses the login account and password pre-stored in the margin detection device 1 to register and log in to the production management platform;

[0093] Step 15. After logging in, the margin detection service program reports the device model and configuration parameter information of the current margin detection device 1 to the production management platform; the configuration parameter information includes the actual value of the reference margin, the standard value of the margin to be detected by the margin detection device 1, the allowable error range of the margin detection device 1 and the SN number reference format of the margin detection device 1.

[0094] Step 2, the production management platform determines whether to issue new configuration parameter information according to the equipment model and configuration parameter information, and the margin detection device 1 determines the final configuration parameter information according to the issuance situation;

[0095] In this embodiment, step 2 specifically includes:

[0096] Step 21: A production management database for storing data is configured on the production management platform;

[0097] Step 22, different equipment models and corresponding configuration parameter information are preset in the production management database; each group of equipment models and its corresponding configuration parameter information are associated one by one; the actual margin detection device 1 has multiple equipment models, because the border sizes of the display screens 2 detected by different equipment models will be different, so the equipment models of the corresponding suitable margin detection equipment 1 will be different, and the detection equipment models are integrated by default. Different equipment models correspond to different reference margins, and the margin values ​​and allowable error ranges of the corresponding display screens 2 tested are also different; for example, the equipment models used for testing the margin detection equipment 1 of a 10.1-inch display screen 2 and the equipment models used for testing a 21.5-inch display screen 2 are different. The production management database will pre-enter the equipment model of the corresponding margin detection equipment 1, the margin value to be detected and the allowable error range using this equipment model, and the corresponding SN number reference format, and the allowable error range will be adjusted by the quality department on the production management system according to the actual product quality situation, and the SN format will also be adjusted on the production management system according to product requirements. Therefore, there is a one-to-one correspondence between the equipment model and the actual value of the reference margin, the standard value of the margin to be detected by the margin detection equipment 1, the allowable error range of the margin detection equipment 1 and the SN number reference format of the margin detection equipment 1 on the production management platform.

[0098] Step 23, the production management platform receives the reported equipment model and configuration parameter information;

[0099] Step 24, the production management platform finds matching equipment model and configuration parameter information from the production management database according to the received equipment model;

[0100] Step 25, the production management platform compares the received configuration parameter information with the configuration parameter information found from the production management database; if the comparison result is inconsistent, it is determined that the configuration parameter information of the margin detection device 1 needs to be updated, and the process goes to step 26; if the comparison result is consistent, it is determined that the configuration parameter information of the margin detection device 1 does not need to be updated, and the current configuration parameter information of the margin detection device 1 is used as the final configuration parameter information, and the process goes to step 3;

[0101] Step 26, the production management platform sends the configuration parameter information found in the production management database as new configuration parameter information to the margin detection device 1; the configuration parameter information (including the actual value of the reference margin, the standard value of the margin to be detected by the margin detection device 1, the allowable error range of the margin detection device 1 and the SN number reference format of the margin detection device 1) is associated with the device model of the margin detection device 1 and stored in the production management platform, and the production management platform identifies and sends new configuration parameter information based on the reported device model and configuration parameter information, thereby realizing unified and centralized configuration management of parameter configuration information.

[0102] Step 27, the margin detection device 1 receives the new configuration parameter information as the final configuration parameter information, and stores the final configuration parameter information on the flash, and proceeds to step 3. If the device model, actual value of the reference margin, standard value of the margin to be detected by the margin detection device 1, allowable error range of the margin detection device 1, and reference format of the SN number of the margin detection device 1 reported by the margin detection device 1 match the data in the production management database, there is no need to send an update. If the actual value of the reference margin, standard value of the margin to be detected by the margin detection device 1, allowable error range of the margin detection device 1, and reference format of the SN number of the margin detection device 1 corresponding to the same device model are inconsistent, it means that there are parameter adjustments on the production management platform, and the updated parameters need to be re-issued to the margin detection device 1 and stored in the flash of the margin detection device 1. The parameter adjustment of the production management platform also enables the same margin detection device 1 to adapt to test different display screen 2 products.

[0103] Step 3, the margin detection service program acquires the image data collected by the camera in real time, and identifies whether the image data contains the SN number of the margin detection device 1 according to the final configuration parameter information, and when the SN number is identified, sends a margin detection request carrying the SN number to the user interface program on the margin detection device 1;

[0104] In this embodiment, step 3 specifically includes:

[0105] Step 31: A camera is fixed directly above the margin detection device 1, and a macro camera may be used; the camera may be mounted directly above the margin detection device 1 by a bracket and the position is fixed by default;

[0106] Step 32: Connect the camera to the margin detection device 1 via a USB interface or an Internet port;

[0107] Step 33, the camera collects image data of the margin detection device 1 in real time and sends it to the margin detection device 1, the image data captured by the camera is an image containing the margin detection device 1, the display screen 2, two first fixtures 3 respectively installed on the left and right edges of the margin detection device 1, and two second fixtures 4 respectively installed on the upper and lower edges of the margin detection device 1; wherein the SN number is a QR code and characters posted on a blank position directly below the margin detection device 1 to be detected during production, the camera can capture the SN number and display it in the image data; the SN number has a fixed format, and the SN number reference format is entered in advance into the production management platform according to the production order requirements;

[0108] Step 34, the margin detection service program obtains the image data, and calls the OCR recognition algorithm to identify the SN number in the image data, and compares the character format of the SN number in the image data with the SN number reference format of the margin detection device 1 preset in the final configuration parameter information. If they are consistent, it is determined that the SN number is recognized and the process goes to step 35; if they are inconsistent, it is determined that the SN number is not recognized and the process goes back to step 34; wherein the OCR recognition algorithm uses the NPU hardware unit on the margin detection device 1 in combination with the actually trained NPU algorithm model to implement the OCR image input to SN number character output in the NPU. The format of the SN number is similar to: FFD101NO0001, where the four characters starting from the third character are D101, indicating that the display device is a 10.1-inch size device. If FFD215NO0001 is stored on the flash of the margin detection device 1, it means that the current margin detection device 1 is to detect a 21.5-inch device. The image data collected by the camera is acquired in real time, and the OCR recognition algorithm is called to execute the SN number on the margin detection device 1. After confirming the SN number through the UI prompt, margin detection is performed. The SN number is interactively confirmed and manual modification of misidentification is supported, which can ensure both the detection execution and the correctness of the SN number record.

[0109] Step 35: The margin detection service program sends a margin detection request carrying the SN number to the user interface program configured on the margin detection device 1. Step 4: The user interface program receives the margin detection request, determines whether to perform margin detection according to the SN number carried in the margin detection request, and feeds back the determination result to the margin detection service program;

[0110] In this embodiment, step 4 specifically includes:

[0111] Step 41, the margin detection device 1 starts a user interface (UI) program and creates a message queue, which is used to receive messages from the margin detection service program; the UI display screen 2 of the margin detection device 1 has a touch screen and buttons, which support the margin detection device 1 to perform UI interactive operations on the user interface (UI) program, including UI interactive manual correction of the SN number when the displayed SN number and the SN number data posted on the margin detection device 1 are incorrect, and the configuration parameter information can be modified or reset through the UI program.

[0112] Step 42: the user interface program receives a margin detection request sent by the margin detection service program through a message queue;

[0113] Step 43, parsing the margin detection request, obtaining the SN number of the margin detection device 1, and displaying it on the display screen 2;

[0114] Step 44: compare the SN number displayed on the display screen 2 with the SN number attached to the margin detection device 1. If they are consistent, the user interface program sends feedback information of agreeing to perform the detection to the margin detection service program, and enters step 5; if they are inconsistent, enter step 45.

[0115] Step 45 , manually correct the SN number on the display screen 2 through the user interface, and return to step 44 .

[0116] Step 5, when the margin detection service program receives feedback from the user interface program that it agrees to perform margin detection, the first fixture 3 and the second fixture 4 in the image data are analyzed and identified by the AI ​​recognition algorithm, and the X-axis unit distance of each pixel point in each pixel row of the first fixture 3 and the Y-axis unit distance of each pixel point in each pixel column of the second fixture 4 are calculated and generated according to the final configuration parameter information and the image pixel size;

[0117] In this embodiment, the step 5 analyzes and identifies the first fixture 3 and the second fixture 4 in the image data through the AI ​​recognition algorithm, and calculates and generates the X-axis unit distance of each pixel point in each pixel row in the first fixture 3 and the Y-axis unit distance of each pixel point in each pixel column in the second fixture 4 according to the final configuration parameter information and the image pixel size, specifically including:

[0118] Step 51, the margin detection service program starts the detection task thread to enter the margin detection process;

[0119] Step 52, the margin detection service program analyzes and identifies the first fixture 3 and the second fixture 4 in the image data through the AI ​​recognition algorithm. For example, the process of identifying the first fixture 3 is: the AI ​​first executes the edge detection algorithm of the image to identify the edge of the first fixture 3 and the edge line where the first fixture 3 contacts the edge of the margin detection device 1, and then extracts a separate image of the first fixture 3; the recognition process of the second fixture 4 is the same;

[0120] The known fixed width distance between the left edge of the margin detection device 1 and the edge of the first clamp 3 on the left side and the known fixed width distance between the right edge of the margin detection device 1 and the edge of the first clamp 3 on the right side are both the first reference margin L1, and the known fixed height distance between the upper edge of the margin detection device 1 and the edge of the second clamp 4 on the upper side and the known fixed height distance between the lower edge of the margin detection device 1 and the edge of the second clamp 4 on the lower side are both the second reference margin L2; the values ​​of the first reference margin L1 and the second reference margin L2 are both equal to the actual values ​​of the reference margins;

[0121] Step 53, obtaining the actual value of the reference margin, the number of pixel rows of the first fixture 3 and the number of pixel columns of the second fixture 4 in the final configuration parameter information, and calculating the X-axis unit distance of each pixel point in each pixel row of the first fixture 3 according to the actual value of the reference margin and the number of pixel points in each pixel row of the first fixture 3, and storing them in the corresponding array CKX[]. The calculation formula is: X-axis unit distance of pixel points in the current pixel row = actual value of the reference margin ÷ number of pixel points in the current pixel row;

[0122] For example, if the actual value of the reference margin is 10 mm, AI is used to identify that there are multiple rows of pixels on the first fixture 3 on the left in the image data and the number of pixels on each pixel row. If the number of pixels in the generated first row of pixels is 60, then the X-axis unit distance of the pixels in this row is 10 / 60=0.1667 mm, and the calculation method for other pixel rows on the first fixture 3 on the left is the same; the calculation method for each pixel row on the first fixture 3 on the right is the same as the calculation method for each pixel row on the first fixture 3 on the left;

[0123] Step 54, calculate and generate the Y-axis unit distance of each pixel point in each pixel column of the second fixture 4 according to the actual value of the reference margin and the number of pixels in each pixel column in the second fixture 4, and store it in the corresponding array CKY[]; the calculation formula is: Y-axis unit distance of the pixel points in the current pixel column = actual value of the reference margin ÷ number of pixels in the current pixel column. Similarly, the calculation method for each pixel column on the second fixture 4 located at the top and bottom is similar to the calculation method for each pixel row on the first fixture 3 located on the left. The margin detection service program first detects the first reference margin L1 and the second reference margin L2 to generate the X-axis unit distance and the Y-axis unit distance respectively, and stores them in the corresponding arrays, providing basic data for automatic detection of margins. It is simple to operate without manual entry or manual calibration during detection.

[0124] Step 6, analyzing and identifying the area to be detected 5 in the image data through the AI ​​recognition algorithm, and calculating and generating an X-axis margin measurement data group and a Y-axis margin measurement data group corresponding to the area to be detected 5 according to the number of pixels in the area to be detected 5, the X-axis unit distance of each pixel row, and the Y-axis unit distance of each pixel column;

[0125] In this embodiment, step 6 specifically includes:

[0126] Step 61, analyzing and identifying the area to be detected 5 in the image data by using an AI recognition algorithm, specifically: the AI ​​first executes an edge detection algorithm of the image to identify the inner frame of the display screen 2 and the outer frame edge of the margin detection device 1, and then extracts the area between the edge line where the first clamp 3 and the second clamp 4 contact the margin detection device 1 and the edge of the display screen 2 as the area to be detected 5;

[0127] The area to be detected 5 is an area formed between the edge line where the first clamp 3 and the second clamp 4 contact the margin detection device 1 and the edge of the display screen 2; the area to be detected 5 includes a first area 51, a second area 52, a third area 53 and a fourth area 54, the first area 51 is an area close to the first clamp 3 located on the left, the second area 52 is an area close to the first clamp 3 located on the right, the third area 53 is an area close to the second clamp 4 located on the top, and the fourth area 54 is an area close to the second clamp 4 located on the bottom;

[0128] Step 62, identify the number of pixel rows and the number of pixel points in each pixel row in the first area 51, and obtain the X-axis unit distance of the pixel row at the corresponding position from the array CKX[]. Generate X-axis margin measurement data of the corresponding pixel row in the first area 51 according to the number of pixel points in each pixel row and the X-axis unit distance. The calculation formula is: X-axis margin measurement data corresponding to the current pixel row in the first area 51 = X-axis unit distance of the current pixel row × number of pixel points in the current pixel row;

[0129] For example: AI recognizes that the first pixel row in the first area 51 has 70 pixels. The first pixel row in the first area 51 corresponds to the first pixel row on the first fixture 3 on the left. Therefore, the X-axis unit distance corresponding to this row is 0.1667 mm, and the X-axis margin measurement data corresponding to the first pixel row in the first area 51 is 0.1667x70=11.669 mm. Assuming that the X-axis standard value x_val of production is 11 mm and the allowable error range is ±0.5 mm, the X-axis margin measurement data of the current pixel row has exceeded the range of 11±0.5 mm, indicating that the deviation of the assembled product is too large. Similarly, the calculation method of the X-axis margin measurement data corresponding to other pixel rows in the first area 51 is the same.

[0130] Step 63, identify the number of pixel rows and the number of pixel points in each pixel row in the second area 52, and obtain the X-axis unit distance of the pixel row at the corresponding position from the array CKX[]. Generate the X-axis margin measurement data of the corresponding pixel row in the second area 52 according to the number of pixel points in each pixel row and the X-axis unit distance. The calculation formula is: X-axis margin measurement data corresponding to the current pixel row in the second area 52 = X-axis unit distance of the current pixel row × number of pixels in the current pixel row; all X-axis margin measurement data calculated by the first area 51 and the second area 52 constitute the X-axis margin measurement data group Val_xl[]. Similarly, the calculation method of the X-axis margin measurement data corresponding to each pixel row in the second area 52 is the same as that of the first area 51.

[0131] Step 64, identify the number of pixel columns and the number of pixel points in each pixel column in the third area 53, and obtain the Y-axis unit distance of the pixel column at the corresponding position from the array CKY[]. Generate the Y-axis margin measurement data of the corresponding pixel column in the third area 53 according to the number of pixel points and the Y-axis unit distance of each pixel column; the calculation formula is: Y-axis margin measurement data corresponding to the current pixel column in the third area 53 = Y-axis unit distance of the current pixel column × number of pixel points in the current pixel column; similarly, the calculation method of the Y-axis margin measurement data corresponding to each pixel column in the third area 53 is similar to the calculation method of the first area 51.

[0132] Step 65, identify the number of pixel columns and the number of pixels in each pixel column in the fourth area 54, and obtain the Y-axis unit distance of the pixel column at the corresponding position from the array CKY[]. Generate the Y-axis margin measurement data of the corresponding pixel column in the fourth area 54 according to the number of pixels in each pixel column and the Y-axis unit distance. The calculation formula is: Y-axis margin measurement data corresponding to the current pixel column in the fourth area 54 = Y-axis unit distance of the current pixel column × number of pixels in the current pixel column. All Y-axis margin measurement data calculated in the third area 53 and the fourth area 54 constitute the Y-axis margin measurement data group Val_yl[]. Similarly, the calculation method of the Y-axis margin measurement data corresponding to each pixel column in the fourth area 54 is similar to the calculation method of the first area 51.

[0133] Step 66: Merge the two X-axis margin measurement data calculated by the adjacent pixel rows in the X-axis margin measurement data group Val_x1[] to obtain the average value for data compression, and obtain the compressed X-axis margin measurement data group Val_x2[]. At the same time, merge the two Y-axis margin measurement data calculated by the adjacent pixel columns in the Y-axis margin measurement data group Val_yl[] to obtain the compressed Y-axis margin measurement data group Val_y2[]. The purpose of this step is to prevent data jitter and further compress the array size. Identify the area to be detected 5, calculate and generate the X-axis margin measurement data group and Y-axis margin measurement data group corresponding to the area to be detected 5 according to the number of pixels in the area to be detected 5, the X-axis unit distance of each pixel row and the Y-axis unit distance of each pixel column, and perform averaging and compression processing to achieve data anti-shake processing and make the data more accurate.

[0134] Step 7, respectively extracting the largest multiple values ​​and the smallest multiple values ​​in the X-axis margin measurement data group and the Y-axis margin measurement data group, judging whether the to-be-detected area 5 exceeds the allowable error range according to the configuration parameter information, the largest multiple values ​​and the smallest multiple values, and sending the result to the user interface program;

[0135] In this embodiment, step 7 specifically includes:

[0136] Step 71, the standard value of the margin to be detected in the configuration parameter information is the precise margin value required for the actual production of the margin detection device 1 to be detected, including the X-axis standard value x_val and the Y-axis standard value y_val; the width distance of the first area 51 or the second area 52 is the first margin to be detected L3, and the height distance of the third area 53 or the fourth area 54 is the second margin to be detected L4;

[0137] Step 72, extract the largest m1 values ​​in the X-axis margin measurement data set Val_x2[] and store them in the max1[m1] array and the smallest n1 values ​​in the min1[n1] array; the values ​​of m1 and n1 are set according to user needs, and the values ​​of m1 and n1 can be the same, for example, both are set to 10, then the max1

[10] array contains the values ​​max1[1], max1[2], max1[3], max1[4], max1[5], max1[6], max1[7], max1[8], max1[9], and max1

[10] , and the min11

[10] array contains the values ​​min1[1], min1[2], min1[3], min1[4], min1[5], min1[6], min1[7], min1[8], min1[9], and min1

[10] ;

[0138] Step 73, calculate the difference between the m1 values ​​in the max1[m1] array and the X-axis standard value x_val, obtain m1 first difference values, and compare the m1 first difference values ​​with the allowable error range. If at least one first difference value is greater than the allowable error range, it is determined that the margin detection device 1 has a positive deviation exceeding the allowable error range, and its X-axis positive deviation rate = the number of positive deviations exceeding the allowable error range ÷ m1;

[0139] For example, if the value max1[1] is 11.23mm, and the standard value x_val of the X axis is 11mm, then max1[1]-x_val=11.23-11=0.23mm, which is smaller than the allowable error range of 0.5mm, indicating that the margin deviation is within the allowable error range; the same is true for other numerical values. The 10 groups here are for the convenience of calculating the 0% to 100% ratio of positive (negative) deviations. For example, if two of the 10 groups in the max1

[10] array are beyond the allowable error range, then the positive deviation rate is 20%.

[0140] Step 74, perform difference calculations on the X-axis standard value x_val and the n1 values ​​in the min1[n1] array to obtain n1 second difference values, and compare the n1 second difference values ​​with the allowable error range. If at least one second difference value is greater than the allowable error range, it is determined that the margin detection device 1 has a negative deviation that exceeds the allowable error range, and the negative deviation rate of the X-axis = the number of negative deviations that exceed the allowable error range / n1;

[0141] For example, if the value min1[1] is 10.53mm, and the standard value x_val of the X axis is 11mm, then x_val-min1[1]=11-10.53=0.47mm, which is smaller than the allowable error range of 0.5mm, indicating that the margin deviation is within the allowable error range; the same is true for other numerical judgment methods. The 10 groups here are for the convenience of calculating the 0% to 100% ratio of positive (negative) deviations. If there are 5 groups of min1

[10] arrays that exceed the allowable error range, then the negative deviation rate is 50%.

[0142] Step 75, extract the largest m2 values ​​in the Y-axis margin measurement data group Val_y2[] and store them in the max2[m2] array and the smallest n2 values ​​in the min2[n2] array; the values ​​of m2 and n2 are set according to user needs;

[0143] Step 76, calculate the difference between the m2 values ​​in the max2[m2] array and the Y-axis standard value y_val, obtain m2 third differences, and compare the m2 third differences with the allowable error range. If there is at least one third difference greater than the allowable error range, it is determined that the margin detection device 1 has a positive deviation exceeding the allowable error range, and its Y-axis positive deviation rate = the number of positive deviations exceeding the allowable error range ÷ m2; similarly, the judgment method of the max2[m2] array is the same as that of the max1[m1] array.

[0144] Step 77, calculate the difference between the Y-axis standard value y_val and the n2 values ​​in the min2[n2] array, obtain n2 fourth differences, and compare the n2 fourth differences with the allowable error range. If there is at least one fourth difference greater than the allowable error range, it is determined that the margin detection device 1 has a negative deviation that exceeds the allowable error range, and its Y-axis negative deviation rate = the number of negative deviations that exceed the allowable error range ÷ n2; similarly, the judgment method of the min2[n2] array is the same as that of the min1[n1] array.

[0145] Step 78, if all the first differences and the second differences are not greater than the allowable error range, it is determined that the first margin L3 to be detected does not exceed the allowable error range; if all the third differences and the fourth differences are not greater than the allowable error range, it is determined that the second margin L4 to be detected does not exceed the allowable error range; if both the first margin L3 to be detected and the second margin L4 to be detected do not exceed the allowable error range, it is determined that the area to be detected 5 does not exceed the allowable error range; if at least one of all the first differences and the second differences is greater than the allowable error range, it is determined that the first margin L3 to be detected exceeds the allowable error range; if at least one of all the third differences and the fourth differences is greater than the allowable error range, it is determined that the second margin L4 to be detected exceeds the allowable error range; if the first margin L3 to be detected and / or the second margin L4 to be detected exceeds the allowable error range, it is determined that the area to be detected 5 exceeds the allowable error range;

[0146] Step 79: Send the determined test result to the user interface program. After identifying and calculating the difference between the margin data and the preset standard value of the margin to be tested, it is compared with the preset allowable error range and automatically generates a qualified prompt, which makes the operation simpler and more efficient.

[0147] Step 8: The user interface program reports the results to the production management platform for processing. The UI prompts the personnel to confirm the rework and automatically records it. The records can be further uploaded to the production management platform for analysis by the quality department and further process improvement. OCR recognizes the SN number and automatically records unqualified products, which is simpler and more efficient without the need for manual recording by personnel.

[0148] In this embodiment, step 8 specifically includes:

[0149] Step 81, the user interface program receives the test result;

[0150] Step 82: If the test result shows that the area to be tested 5 does not exceed the allowable error range, indicating that the margin detection device 1 is qualified, the SN number and test result information of the margin detection device 1 are recorded and reported to the production management platform, and then the user interface prompts that the margin detection device 1 is qualified and enters the next equipment detection process after confirmation;

[0151] Step 83: If the test result shows that the area 5 to be tested exceeds the allowable error range, indicating that the margin detection equipment 1 is unqualified, the test result will be reported to the production management platform, and then the user interface will display the data and ratio of the out-of-value range, and prompt the equipment to be reworked. After confirming the rework, the SN number of the margin detection equipment 1 and the analyzed information data will be recorded and the next equipment detection process will be entered.

[0152] like Figure 7As shown, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned margin detection method based on AI recognition is implemented.

[0153] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0154] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0155] The above descriptions are only some embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any equivalent device or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A margin detection method based on AI recognition, It is characterized in that The method is applied to the margin detection equipment and production management platform with display screen to be detected, and includes the following steps: Step 1: running a margin detection service program on the margin detection device, wherein the margin detection service program reports the device model and configuration parameter information of the current margin detection device to the production management platform; Step 2: The production management platform determines whether to issue new configuration parameter information according to the equipment model and configuration parameter information, and the margin detection device determines the final configuration parameter information according to the issuance situation; Step 3, the margin detection service program acquires the image data collected by the camera in real time, and identifies whether there is an SN number of the margin detection device in the image data according to the final configuration parameter information, and when the SN number is identified, sends a margin detection request carrying the SN number to the user interface program on the margin detection device; Step 4, the user interface program receives the margin detection request, determines whether to perform margin detection according to the SN number carried in the margin detection request, and feeds back the determination result to the margin detection service program; Step 5: When the margin detection service program receives feedback from the user interface program that it agrees to perform margin detection, the first fixture and the second fixture in the image data are analyzed and identified by the AI ​​recognition algorithm, and the X-axis unit distance of each pixel point in each pixel row in the first fixture and the Y-axis unit distance of each pixel point in each pixel column in the second fixture are calculated and generated according to the final configuration parameter information and the image pixel size; Step 6: Analyze and identify the area to be detected in the image data through the AI ​​recognition algorithm, and calculate and generate an X-axis margin measurement data group and a Y-axis margin measurement data group corresponding to the area to be detected according to the number of pixels in the area to be detected, the X-axis unit distance of each pixel row, and the Y-axis unit distance of each pixel column; Step 7, respectively extracting the largest multiple values ​​and the smallest multiple values ​​in the X-axis margin measurement data group and the Y-axis margin measurement data group, judging whether the area to be detected exceeds the allowable error range according to the configuration parameter information, the largest multiple values ​​and the smallest multiple values, and sending the result to the user interface program; Step 8: The user interface program reports the result to the production management platform for processing.

2. A margin detection method based on AI recognition as claimed in claim 1, It is characterized in that The step 1 specifically includes: Step 11, configuring a margin detection service program on the margin detection device; Step 12: Start the margin detection device and establish a network connection with the production management platform through the TCP protocol; Step 13: a login account and password for registration are pre-stored in the margin detection device; Step 14: Run the margin detection service program, which calls the http interface and uses the login account and password pre-stored in the margin detection device to register and log in to the production management platform; Step 15. After logging in, the margin detection service program reports the device model and configuration parameter information of the current margin detection device to the production management platform; the configuration parameter information includes the actual value of the reference margin, the standard value of the margin to be detected of the margin detection device, the allowable error range of the margin detection device, and the SN number reference format of the margin detection device.

3. A margin detection method based on AI recognition as claimed in claim 2, It is characterized in that The step 2 specifically includes: Step 21: A production management database for storing data is configured on the production management platform; Step 22: Different equipment models and corresponding configuration parameter information are preset in the production management database; each group of equipment models and their corresponding configuration parameter information are associated one by one; Step 23, the production management platform receives the reported equipment model and configuration parameter information; Step 24, the production management platform finds matching equipment model and configuration parameter information from the production management database according to the received equipment model; Step 25, the production management platform compares the received configuration parameter information with the configuration parameter information found in the production management database; if the comparison result is inconsistent, it is determined that the configuration parameter information of the margin detection device needs to be updated, and the process goes to step 26; if the comparison result is consistent, it is determined that the configuration parameter information of the margin detection device does not need to be updated, and the current configuration parameter information of the margin detection device is used as the final configuration parameter information, and the process goes to step 3; Step 26, the production management platform sends the configuration parameter information found in the production management database as new configuration parameter information to the margin detection device; Step 27: The margin detection device receives the new configuration parameter information as the final configuration parameter information, and stores the final configuration parameter information in the flash, and then proceeds to step 3.

4. A margin detection method based on AI recognition as claimed in claim 3, It is characterized in that The step 3 specifically includes: Step 31, a camera is fixed directly above the margin detection device; Step 32: Connect the camera to the margin detection device via a USB interface or an Ethernet port; Step 33, the camera collects image data of the margin detection device in real time and sends it to the margin detection device, the image data captured by the camera is an image containing the contents of the margin detection device, the display screen, two first fixtures respectively installed on the left and right edges of the margin detection device, and two second fixtures respectively installed on the upper and lower edges of the margin detection device; Step 34, the margin detection service program obtains the image data, and calls the OCR recognition algorithm to recognize the SN number in the image data, and compares the character format of the SN number in the image data with the SN number reference format of the margin detection device preset in the final configuration parameter information. If they are consistent, it is determined that the SN number is recognized, and the process proceeds to step 35; if they are inconsistent, it is determined that the SN number is not recognized, and the process returns to step 34; Step 35: The margin detection service program sends a margin detection request carrying the SN number to the user interface program configured on the margin detection device.

5. A margin detection method based on AI recognition as claimed in claim 4, It is characterized in that The step 4 specifically includes: Step 41, the margin detection device starts the user interface program and creates a message queue, the message list is used to receive messages from the margin detection service program; Step 42: the user interface program receives a margin detection request sent by the margin detection service program through a message queue; Step 43: parse the margin detection request, obtain the SN number of the margin detection device, and display it on the display screen; Step 44: compare the SN number displayed on the display screen with the SN number attached to the margin detection device. If they are consistent, the user interface program sends feedback information of agreeing to perform the detection to the margin detection service program, and enters step 5; if they are inconsistent, enter step 45. Step 45: Manually correct the SN number on the display screen through the user interface and return to step 44.

6. A margin detection method based on AI recognition as claimed in claim 5, It is characterized in that In step 5, the first fixture and the second fixture in the image data are analyzed and identified by the AI ​​recognition algorithm, and the X-axis unit distance of each pixel point in each pixel row in the first fixture and the Y-axis unit distance of each pixel point in each pixel column in the second fixture are calculated and generated according to the final configuration parameter information and the image pixel size, which specifically includes: Step 51, the margin detection service program starts the detection task thread to enter the margin detection process; Step 52, the margin detection service program analyzes and identifies the first fixture and the second fixture in the image data through an AI recognition algorithm, the known fixed width distance between the left edge of the margin detection device and the edge of the first fixture on the left side and the known fixed width distance between the right edge of the margin detection device and the edge of the first fixture on the right side are both first reference margins, the known fixed height distance between the upper edge of the margin detection device and the edge of the second fixture on the upper side and the known fixed height distance between the lower edge of the margin detection device and the edge of the second fixture on the lower side are both second reference margins; the values ​​of the first reference margin and the second reference margin are both equal to the actual values ​​of the reference margins; Step 53, obtaining the actual value of the reference margin, the number of pixel rows of the first fixture, and the number of pixel columns of the second fixture in the final configuration parameter information, and calculating the X-axis unit distance of each pixel point in each pixel row of the first fixture according to the actual value of the reference margin and the number of pixel points in each pixel row of the first fixture, and storing them in the corresponding array CKX[]. The calculation formula is: X-axis unit distance of pixel points in the current pixel row = actual value of the reference margin ÷ number of pixel points in the current pixel row; Step 54, calculate the Y-axis unit distance of each pixel point in each pixel column of the second fixture according to the actual value of the reference margin and the number of pixels in each pixel column in the second fixture, and store it in the corresponding array CKY[]. The calculation formula is: Y-axis unit distance of pixel points in the current pixel column = actual value of the reference margin ÷ number of pixels in the current pixel column.

7. A margin detection method based on AI recognition as claimed in claim 6, It is characterized in that The step 6 specifically includes: Step 61: Analyze and identify the area to be detected in the image data through an AI recognition algorithm, wherein the area to be detected is an area formed between an edge line where the first clamp and the second clamp contact the margin detection device and the edge of the display screen; the area to be detected includes a first area, a second area, a third area, and a fourth area, wherein the first area is an area close to the first clamp located on the left, the second area is an area close to the first clamp located on the right, the third area is an area close to the second clamp located on the top, and the fourth area is an area close to the second clamp located on the bottom; Step 62, identify the number of pixel rows in the first area and the number of pixel points in each pixel row, and obtain the X-axis unit distance of the pixel row at the corresponding position from the array CKX[]. Generate X-axis margin measurement data of the corresponding pixel row in the first area according to the number of pixel points in each pixel row and the X-axis unit distance. The calculation formula is: X-axis margin measurement data corresponding to the current pixel row in the first area = X-axis unit distance of the current pixel row × number of pixel points in the current pixel row; Step 63, identify the number of pixel rows and the number of pixel points in each pixel row in the second area, and obtain the X-axis unit distance of the pixel row at the corresponding position from the array CKX[]. Generate X-axis margin measurement data of the corresponding pixel row in the second area according to the number of pixel points in each pixel row and the X-axis unit distance. The calculation formula is: X-axis margin measurement data corresponding to the current pixel row in the second area = X-axis unit distance of the current pixel row × number of pixel points in the current pixel row; all X-axis margin measurement data calculated for the first area and the second area constitute an X-axis margin measurement data group Val_xl[]. Step 64, identify the number of pixel columns in the third area and the number of pixels in each pixel column, and obtain the Y-axis unit distance of the pixel column at the corresponding position from the array CKY[]. Generate Y-axis margin measurement data of the corresponding pixel column in the third area according to the number of pixels in each pixel column and the Y-axis unit distance. The calculation formula is: Y-axis margin measurement data corresponding to the current pixel column in the third area = Y-axis unit distance of the current pixel column × number of pixels in the current pixel column. Step 65, identify the number of pixel columns and the number of pixels in each pixel column in the fourth area, and obtain the Y-axis unit distance of the pixel column at the corresponding position from the array CKY[]. Generate Y-axis margin measurement data of the corresponding pixel column in the fourth area according to the number of pixels in each pixel column and the Y-axis unit distance. The calculation formula is: Y-axis margin measurement data corresponding to the current pixel column in the fourth area = Y-axis unit distance of the current pixel column × number of pixels in the current pixel column; all Y-axis margin measurement data calculated in the third area and the fourth area constitute a Y-axis margin measurement data group Val_yl[]. Step 66: Merge the two X-axis margin measurement data calculated from adjacent pixel rows in the X-axis margin measurement data group Val_xl[] to obtain an average value for data compression, and obtain a compressed X-axis margin measurement data group Val_x2[]. At the same time, merge the two Y-axis margin measurement data calculated from adjacent pixel columns in the Y-axis margin measurement data group Val_yl[] to obtain an average value for data compression, and obtain a compressed Y-axis margin measurement data group Val_y2[].

8. A margin detection method based on AI recognition as claimed in claim 7, It is characterized in that The step 7 specifically includes: Step 71: the standard values ​​of the margins to be detected in the configuration parameter information include an X-axis standard value x_val and a Y-axis standard value y_val; the width distance of the first area or the second area is the first margin to be detected, and the height distance of the third area or the fourth area is the second margin to be detected; Step 72, extract the largest m1 values ​​in the X-axis margin measurement data group Val_x2[] and store them in the max1[m1] array and the smallest n1 values ​​in the min1[n1] array; the values ​​of m1 and n1 are set according to user needs; Step 73, calculate the difference between the m1 values ​​in the max1[m1] array and the X-axis standard value x_val, obtain m1 first difference values, and compare the m1 first difference values ​​with the allowable error range. If at least one first difference value is greater than the allowable error range, it is determined that the margin detection device has a positive deviation exceeding the allowable error range, and the positive deviation rate of the X-axis = the number of positive deviations exceeding the allowable error range / m1; Step 74, perform difference calculations on the X-axis standard value x_val and the n1 values ​​in the min1[n1] array to obtain n1 second difference values, and compare the n1 second difference values ​​with the allowable error range. If at least one second difference value is greater than the allowable error range, it is determined that the margin detection device has a negative deviation that exceeds the allowable error range, and the negative deviation rate of the X-axis = the number of negative deviations that exceed the allowable error range / n1; Step 75, extract the largest m2 values ​​in the Y-axis margin measurement data group Val_y2[] and store them in the max2[m2] array and the smallest n2 values ​​in the min2[n2] array; the values ​​of m2 and n2 are set according to user needs; Step 76, calculate the difference between the m2 values ​​in the max2[m2] array and the Y-axis standard value y_val, obtain m2 third differences, and compare the m2 third differences with the allowable error range. If at least one third difference is greater than the allowable error range, it is determined that the margin detection device has a positive deviation exceeding the allowable error range, and the positive deviation rate of the Y-axis = the number of positive deviations exceeding the allowable error range / m2; Step 77, perform difference calculations on the Y-axis standard value y_val and the n2 values ​​in the min2[n2] array to obtain n2 fourth differences, and compare the n2 fourth differences with the allowable error range. If at least one fourth difference is greater than the allowable error range, it is determined that the margin detection device has a negative deviation that exceeds the allowable error range, and the negative deviation rate of the Y-axis = the number of negative deviations that exceed the allowable error range / n2; Step 78: if all the first differences and the second differences are not greater than the allowable error range, it is determined that the first margin to be detected does not exceed the allowable error range; if all the third differences and the fourth differences are not greater than the allowable error range, it is determined that the second margin to be detected does not exceed the allowable error range; if both the first margin to be detected and the second margin to be detected do not exceed the allowable error range, it is determined that the area to be detected does not exceed the allowable error range; if at least one of all the first differences and the second differences is greater than the allowable error range, it is determined that the first margin to be detected exceeds the allowable error range; if at least one of all the third differences and the fourth differences is greater than the allowable error range, it is determined that the second margin to be detected exceeds the allowable error range; if the first margin to be detected and / or the second margin to be detected exceeds the allowable error range, it is determined that the area to be detected exceeds the allowable error range; Step 79: Send the determined detection result to the user interface program.

9. A margin detection method based on AI recognition as claimed in claim 8, It is characterized in that The step 8 specifically includes: Step 81, the user interface program receives the test result; Step 82: If the test result shows that the area to be tested does not exceed the allowable error range, indicating that the margin detection equipment is qualified, the SN number and test result information of the margin detection equipment are recorded and reported to the production management platform, and then the user interface prompts that the margin detection equipment is qualified and enters the next equipment detection process after confirmation; Step 83: If the test result shows that the area to be tested exceeds the allowable error range, indicating that the margin detection equipment is unqualified, the test result will be reported to the production management platform, and then the user interface will display the data and ratio of the out-of-value range, and prompt the equipment to be reworked. After confirming the rework, the SN number of the margin detection equipment and the analyzed information data will be recorded and the next equipment detection process will be entered.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, a margin detection method based on AI recognition as described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Steel strip punching processing detection system and method based on vision measurement

    CN107907063A

  • A workpiece edge width detection method

    CN109685779A

  • Distance measuring method based on monocular camera and electronic equipment

    CN112033351A

  • Abnormal vein image detection method based on edge morphology

    CN116884048A

  • Method for calibrating a 3D camera for patient thickness measurements

    EP3671111A1