A self-optimized optical detection method, device, system and storage medium

Through the combination of reinforcement learning and Bellman algorithm, the detection parameters and strategies of the AOI detection system are independently optimized, which solves the problems of low adaptability and efficiency of the traditional AOI system and achieves more efficient curved display screen detection.

CN118464935BActive Publication Date: 2024-10-15SHENZHEN SEICHITECH TECHN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410910561.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-15
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

The traditional AOI system has low adaptability and low efficiency in the detection system during the panel manufacturing process. It cannot adapt to different product types and changes in environmental lighting, resulting in low detection accuracy and efficiency of curved display screens.

Method used

The reinforcement learning method is used to initialize the optical detection parameters of the AOI detection system, use the sample display screen for independent optimization, and combine the Bellman algorithm and adjustment incentives to dynamically adjust the detection parameters and strategies to improve the adaptability and efficiency of the detection system.

Benefits of technology

It realizes the independent optimization of the AOI detection system under different production tasks and environmental changes, reduces human intervention, improves detection accuracy and efficiency, and improves the adaptability and automation level of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118464935B_ABST
    Figure CN118464935B_ABST
Patent Text Reader

Abstract

The present application discloses an autonomously optimized optical detection method, device, system and storage medium for improving the efficiency and adaptability of the detection system. The present application includes: initializing the optical detection parameters of the AOI detection system, crimping and lighting the sample display screen; using the sample display screen to determine the first optical detection state of the current AOI detection system; selecting and executing parameter adjustment actions; using the AOI detection system to shoot the sample display screen, and using the AOI detection system to perform defect detection on the shot image, generating the second optical detection state of the AOI detection system; generating adjustment incentives for the parameter adjustment action according to the first optical detection state and the second optical detection state; using the Bellman algorithm combined with the adjustment incentives to adjust the initialization expectation of the parameter adjustment action; reshooting the sample display screen, defect detection, optical detection state generation and adjustment expectation until the termination condition is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of AOI detection, and in particular to an autonomously optimized optical detection method, device, system and storage medium. Background Art

[0002] With the rapid development of Industry 4.0 and Internet technology, the requirements for industrial product quality are becoming more and more refined and standardized. As far as the display panel industry is concerned, the quality of products directly affects their competitiveness. Among them, the accuracy of product shape, size and specifications is the most basic process indicator of product quality.

[0003] As one of the display components of the device, the display screen is used in various high-end devices, such as mobile phones, TVs, tablets, etc. As people's requirements for screen display continue to increase, the display screen has gradually become a product with sophisticated technology. Secondly, the display panel is an important part of electronic products such as TVs, mobile phones, and computers. During the production process of the production line, the display panel needs to be precisely bonded with other parts and assembled into terminal products for delivery to customers. Due to the fine shape of the product and limited spatial design tolerance, the tolerance accuracy requirements of production are all at the micron level. With the large-scale use of 3D curved mobile phones, users have higher and higher requirements for curved OLED displays, especially the curved part. In the original production process, most panel factories, considering the particularity of the curved screen, greatly weakened the inspection specifications and requirements of the curved part. Point and line defects and uneven color brightness cannot be discovered and handled in a timely and accurate manner. Therefore, the quality of the curved part of the 3D curved screen mobile phones circulating on the market is much different from that of the flat part. In order to solve the above problems, it is necessary to use an automatic optical inspection (AOI) system for accurate defect detection.

[0004] Automatic optical inspection systems are widely used in electronic manufacturing, automotive industry and other fields to detect surface defects and quality problems of products. The application of AOI systems in panel manufacturing has become one of the industry standards. It can improve the accuracy and efficiency of quality inspection, reduce labor costs, ensure product quality, and promote the intelligent and automated development of manufacturing.

[0005] However, traditional AOI systems usually include a series of image processing steps, and most of the display image processing steps require manual adjustment of parameters and algorithms according to the actual application scenarios. They cannot adapt to different production tasks and environmental changes, such as changes in different product types, changes in different models of the same product, and changes in ambient light sources, resulting in low adaptability and efficiency of the inspection system. Summary of the invention

[0006] The present application discloses an autonomously optimized optical detection method, device, system and storage medium for improving the efficiency and adaptability of the detection system.

[0007] Reinforcement Learning (RL) is a machine learning method that aims to learn how to take actions in a specific environment to maximize the cumulative reward through interaction with the environment. The core idea of ​​reinforcement learning is that the agent learns from the environment through trial and error, and continuously adjusts its behavior strategy by observing the feedback from the environment to maximize the rewards obtained in the future.

[0008] The first aspect of the present application discloses an autonomously optimized optical detection method, comprising:

[0009] Initialize the optical inspection parameters of the AOI inspection system, and press-connect and light up the sample display screen on the AOI inspection system;

[0010] Determine a first optical inspection state of the current AOI inspection system using a sample display screen;

[0011] Selecting a parameter adjustment action from an adjustment operation library, the adjustment operation library including a plurality of groups of parameter adjustment actions, each group of parameter adjustment actions being set with an initialization expectation;

[0012] Perform parameter adjustment actions on the AOI inspection system;

[0013] Using the AOI inspection system to photograph the sample display screen, and using the AOI inspection system to perform defect inspection on the photographed image to generate a second optical inspection state of the AOI inspection system;

[0014] generating an adjustment stimulus for a parameter adjustment action according to the first optical detection state and the second optical detection state;

[0015] Use the Bellman algorithm combined with the adjustment incentive to adjust the initialization expectation of the parameter adjustment action;

[0016] The AOI inspection system is reused to select, execute, capture images, detect defects, generate optical inspection states, and adjust expectations for parameter adjustment actions on the sample display screen until the termination condition is met.

[0017] Optionally, a parameter adjustment action is selected from an adjustment operation library and the parameter adjustment action is performed on the AOI inspection system, including:

[0018] There is a probability of ε to select the parameter adjustment action with the highest expectation from the adjustment operation library, where ε is a decimal greater than 0 and less than 1;

[0019] There is a 1-ε probability of randomly selecting a parameter adjustment action from the adjustment operation library.

[0020] Optionally, the optical detection state includes detection accuracy and detection speed;

[0021] Use the sample display screen to determine the first optical inspection state of the current AOI inspection system, specifically:

[0022] Photograph the sample display screen through the AOI inspection system;

[0023] Use the full defect recognition network in the AOI inspection system to perform full defect detection on the captured images, generate a full defect distribution probability and a full defect detection rate, and the full defect distribution probability includes the recognition probability of at least two mura defects;

[0024] The first optical inspection state of the current AOI inspection system is determined according to the total defect distribution probability and the total defect inspection rate.

[0025] Optionally, generating an adjustment stimulus for the parameter adjustment action according to the first optical detection state and the second optical detection state is specifically:

[0026] Determine the precision excitation direction according to the real defect of the sample display screen, the sample display screen has a real defect;

[0027] Generate precision incentive weights for real defects;

[0028] generating rate incentive weights according to the full defect recognition network;

[0029] generating a probability variation degree of a real defect according to the probability of the full defect distribution in the first optical detection state and the second optical detection state;

[0030] Generate precision incentive parameters of real defects according to the probability variation degree of real defects, precision incentive direction and precision incentive weight;

[0031] generating a rate change degree and a rate excitation direction according to the full defect detection rate in the first optical detection state and the second optical detection state;

[0032] Generate rate excitation parameters according to the rate change degree, the rate excitation weight and the rate excitation direction;

[0033] An adjustment stimulus is generated according to the precision stimulus parameter and the rate stimulus parameter.

[0034] Optionally, the optical detection state includes detection accuracy and detection speed;

[0035] Use the sample display screen to determine the first optical inspection state of the current AOI inspection system, specifically:

[0036] Photograph the sample display screen through the AOI inspection system;

[0037] Using a single defect recognition network corresponding to a real defect set of a sample display screen in an AOI inspection system to perform single defect detection on the captured image, generating single defect detection data, the single defect detection data including at least one single defect recognition probability and at least one single defect detection rate, the real defect set including at least one real defect;

[0038] A first optical inspection state of the current AOI inspection system is determined according to the single defect inspection data.

[0039] Optionally, generating an adjustment stimulus for the parameter adjustment action according to the first optical detection state and the second optical detection state is specifically:

[0040] Determine the precision excitation direction according to a real defect set of the sample display screen, wherein the real defect set includes at least one real defect;

[0041] Generate precision incentive weights for real defects in the real defect set;

[0042] Generate rate incentive weights based on a single defect recognition network;

[0043] generating a probability change degree of at least one real defect according to the single defect recognition probability in the first optical detection state and the second optical detection state;

[0044] Generate a precision excitation parameter of at least one real defect according to a probability variation degree of at least one real defect, a precision excitation direction, and a precision excitation weight;

[0045] generating a rate change degree and a rate excitation direction of at least one real defect according to the single defect detection rate in the first optical detection state and the second optical detection state;

[0046] generating a rate excitation parameter of at least one real defect according to a rate change degree, a rate excitation direction, and a rate excitation weight of at least one real defect;

[0047] An adjustment stimulus is generated according to the precision stimulus parameter and the rate stimulus parameter.

[0048] The second aspect of the present application discloses an autonomously optimized optical detection device, comprising:

[0049] An initialization unit, used to initialize the optical detection parameters of the AOI detection system, and to press-connect and light up the sample display screen on the AOI detection system;

[0050] A determination unit, configured to determine a first optical inspection state of a current AOI inspection system using a sample display screen;

[0051] A selection unit, used for selecting a parameter adjustment action from an adjustment operation library, wherein the adjustment operation library includes a plurality of groups of parameter adjustment actions, and each group of parameter adjustment actions is provided with an initialization expectation;

[0052] An execution unit, used for executing parameter adjustment actions on the AOI inspection system;

[0053] An inspection unit, used to use the AOI inspection system to photograph the sample display screen, and use the AOI inspection system to perform defect inspection on the photographed image, and generate a second optical inspection state of the AOI inspection system;

[0054] A generating unit, configured to generate an adjustment stimulus for a parameter adjustment action according to the first optical detection state and the second optical detection state;

[0055] An adjustment unit, used for adjusting the initialization expectation of the parameter adjustment action by using the Bellman algorithm in combination with the adjustment incentive;

[0056] A reinforcement learning unit is used to reuse the AOI inspection system to photograph the sample display screen, detect defects, generate optical inspection states, and adjust expectations until the termination condition is met.

[0057] Optional, select units, including:

[0058] There is a probability of ε to select the parameter adjustment action with the highest expectation from the adjustment operation library, where ε is a decimal greater than 0 and less than 1;

[0059] There is a 1-ε probability of randomly selecting a parameter adjustment action from the adjustment operation library.

[0060] Optionally, the optical detection state includes detection accuracy and detection speed;

[0061] Determine the unit, specifically:

[0062] Photograph the sample display screen through the AOI inspection system;

[0063] Use the full defect recognition network in the AOI inspection system to perform full defect detection on the captured images, generate a full defect distribution probability and a full defect detection rate, and the full defect distribution probability includes the recognition probability of at least two mura defects;

[0064] The first optical inspection state of the current AOI inspection system is determined according to the total defect distribution probability and the total defect inspection rate.

[0065] Optionally, generate units, specifically:

[0066] Determine the precision excitation direction according to the real defect of the sample display screen, the sample display screen has a real defect;

[0067] Generate precision incentive weights for real defects;

[0068] generating rate incentive weights according to the full defect recognition network;

[0069] generating a probability variation degree of a real defect according to the probability of the full defect distribution in the first optical detection state and the second optical detection state;

[0070] Generate precision incentive parameters of real defects according to the probability variation degree of real defects, precision incentive direction and precision incentive weight;

[0071] generating a rate change degree and a rate excitation direction according to the full defect detection rate in the first optical detection state and the second optical detection state;

[0072] Generate rate excitation parameters according to the rate change degree, the rate excitation weight and the rate excitation direction;

[0073] An adjustment stimulus is generated according to the precision stimulus parameter and the rate stimulus parameter.

[0074] Optionally, the optical detection state includes detection accuracy and detection speed;

[0075] Determine the unit, specifically:

[0076] Photograph the sample display screen through the AOI inspection system;

[0077] Using a single defect recognition network corresponding to a real defect set of a sample display screen in an AOI inspection system to perform single defect detection on the captured image, generating single defect detection data, the single defect detection data including at least one single defect recognition probability and at least one single defect detection rate, the real defect set including at least one real defect;

[0078] A first optical inspection state of the current AOI inspection system is determined according to the single defect inspection data.

[0079] Optionally, generate units, specifically:

[0080] Determine the precision excitation direction according to a real defect set of the sample display screen, wherein the real defect set includes at least one real defect;

[0081] Generate precision incentive weights for real defects in the real defect set;

[0082] Generate rate incentive weights based on a single defect recognition network;

[0083] generating a probability change degree of at least one real defect according to the single defect recognition probability in the first optical detection state and the second optical detection state;

[0084] Generate a precision excitation parameter of at least one real defect according to a probability variation degree of at least one real defect, a precision excitation direction, and a precision excitation weight;

[0085] generating a rate change degree and a rate excitation direction of at least one real defect according to the single defect detection rate in the first optical detection state and the second optical detection state;

[0086] generating a rate excitation parameter of at least one real defect according to a rate change degree, a rate excitation direction, and a rate excitation weight of at least one real defect;

[0087] An adjustment stimulus is generated according to the precision stimulus parameter and the rate stimulus parameter.

[0088] The third aspect of the present application provides an autonomously optimized optical detection system, comprising:

[0089] Processor, memory, input-output unit, and bus;

[0090] The processor is connected to the memory, the input and output unit, and the bus;

[0091] The memory stores a program, and the processor calls the program to execute the first aspect and any optional optical detection method of the first aspect.

[0092] A fifth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the program executes the first aspect and any optional optical detection method of the first aspect.

[0093] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0094] In the present application, the optical detection parameters of the AOI detection system are first initialized, and the sample display screen is crimped and lit on the AOI detection system, that is, the AOI detection system is initially laid out. The sample display screen is used to determine the first optical detection state of the current AOI detection system, that is, to determine the current defect detection capability of the AOI detection system. A parameter adjustment action is selected from the adjustment operation library, and the adjustment operation library includes several groups of parameter adjustment actions, each group of parameter adjustment actions is set with an initialization expectation. The adjustment operation library includes a variety of parameter adjustment actions, which can affect the defect detection performance of the AOI detection system. Parameter adjustment actions are performed on the AOI detection system. Then the sample display screen is photographed using the AOI detection system, and the photographed image is defect-detected using the AOI detection system to generate a second optical detection state of the AOI detection system. At this time, an adjustment excitation is generated for the parameter adjustment action according to the first optical detection state and the second optical detection state. That is, the influence of the parameter adjustment action under the first optical detection state is evaluated according to the change of the detection state. Next, the initialization expectation of the parameter adjustment action is adjusted using the Bellman algorithm combined with the adjustment excitation. The expectation of the parameter adjustment action in the first optical detection state is evaluated. Next, in the second optical inspection state, the AOI inspection system is used again to select, execute, capture images, detect defects, generate optical inspection states, and adjust expectations for the sample display screen until the termination condition is met. When the termination condition is met, the strategies for parameter adjustment actions for the sample display screen have been fully recorded, that is, through this series of strategies, the AOI inspection system can autonomously adjust the inspection parameters for the display screen according to the actual production tasks and changes in the inspection environment, reducing human intervention, optimizing the efficiency of the AOI inspection system, and improving the adaptability of the AOI inspection system. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0096] Figure 1 A schematic diagram of an embodiment of the autonomously optimized optical detection method in the embodiments of the present application;

[0097] Figure 2 A schematic diagram of the reinforcement learning process in an embodiment of the present application;

[0098] Figure 3 Schematic diagram of the Q value update process in an embodiment of the present application;

[0099] Figure 4 This is a schematic diagram of the first stage of another embodiment of the autonomously optimized optical detection method in the embodiments of the present application;

[0100] Figure 5 This is a schematic diagram of the second stage of another embodiment of the autonomously optimized optical detection method in the embodiments of the present application;

[0101] Figure 6 This is a schematic diagram of the first stage of another embodiment of the autonomously optimized optical detection method in the embodiments of the present application;

[0102] Figure 7 This is a schematic diagram of the second stage of another embodiment of the autonomously optimized optical detection method in the embodiments of the present application;

[0103] Figure 8 A schematic diagram of an embodiment of an optical detection device that is autonomously optimized in an embodiment of the present application;

[0104] Fig. 9 A schematic diagram of an embodiment of an autonomously optimized optical detection system in an embodiment of the present application. DETAILED DESCRIPTION

[0105] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0106] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0107] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0108] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0109] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0110] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0111] In the prior art, traditional AOI systems usually include a series of image processing steps, and most of the display screen image processing steps require manual adjustment of parameters and algorithms according to the actual application scenarios. They cannot adapt to different production tasks and environmental changes, such as changes in different product types, changes in different models of the same product, and changes in ambient light sources, resulting in low adaptability and efficiency of the detection system.

[0112] Based on this, the present application discloses an autonomously optimized optical detection method, device, system and storage medium for improving the efficiency and adaptability of the detection system.

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

[0114] The method of the present application can be applied to a server, a device, a terminal or other devices with logic processing capabilities, and the present application does not limit this. For the convenience of description, the following description is made by taking the execution subject as an example of a terminal.

[0115] See also Figure 1 , the present application provides an embodiment of an autonomously optimized optical detection method, comprising:

[0116] 101. Initialize the optical detection parameters of the AOI detection system, and press-connect and light up the sample display screen on the AOI detection system;

[0117] In this application, the optical detection parameters of the AOI detection system are first initialized. They can be set directly according to the default parameters or manually. There is no limitation here. The AOI detection system needs to have certain defect detection performance to further detect the sample display screen. Then, the sample display screen is crimped and lit on the AOI detection system to achieve an initial self-optimization and reinforcement learning environment.

[0118] The basic principles of reinforcement learning used in the AOI inspection system in this application are as follows:

[0119] Environment: The environment in reinforcement learning refers to the external environment in which the agent is located. It can be a physical environment in the real world, a simulated environment, or a virtual environment. The environment will give corresponding feedback based on the agent's actions, including rewards and state changes.

[0120] Agent: The agent in reinforcement learning refers to the learner, which is responsible for observing the state of the environment and choosing appropriate actions based on the state to maximize the reward. The agent usually has a policy to guide its behavior selection. In this embodiment, it mainly refers to the intelligent control agent in the AOI detection system.

[0121] State: State is a feature that describes the environment and contains information that the agent can observe. In reinforcement learning, the agent selects actions based on the current state and obtains feedback from the environment through the actions. In this embodiment, the state mainly refers to the effect of the AOI inspection system in display screen inspection.

[0122] Action: An action is an action that an agent can take in a specific state, which affects the state of the environment and the reward obtained by the agent. The goal of the agent is to choose actions to maximize the future cumulative reward. In this embodiment, it mainly refers to the parameter adjustment for the AOI detection system.

[0123] Reward: Reward is a feedback signal provided by the environment to the agent to evaluate the agent's behavior. Reward is usually a numerical value that represents the benefit or penalty obtained by the agent in a specific state by performing a specific action.

[0124] Policy: A policy defines the rules for an agent to choose actions in a specific state. The goal of reinforcement learning is to learn the optimal policy to maximize the expected cumulative reward of choosing actions in any state.

[0125] Please refer to Figure 2 The basic principle of reinforcement learning can be simply summarized as the interaction process between the agent and the environment: the agent observes the state of the current environment, selects actions based on the current state, and the environment will generate feedback after the action is executed, including rewards and new states. The agent adjusts its behavior strategy based on the feedback from the environment, and continuously learns and optimizes to achieve the optimal decision-making strategy.

[0126] 102. Determine a first optical inspection state of a current AOI inspection system using a sample display screen;

[0127] The terminal evaluates the detection capability of the AOI detection system through a sample display screen to generate a first optical detection state. The sample display screen may be a display screen with multiple mura defects, or a defect-free sample display screen may be added for reinforcement learning.

[0128] 103. Select a parameter adjustment action from an adjustment operation library, where the adjustment operation library includes a plurality of groups of parameter adjustment actions, and each group of parameter adjustment actions is set with an initialization expectation;

[0129] The terminal selects parameter adjustment actions from the adjustment operation library according to the preset expectation rules. The core of the expectation rule is that the higher the expected value of a parameter adjustment action, the more priority the intelligent agent will give to the action when selecting an action. However, the intelligent agent may also choose an action with a low expected value, so that each action has the possibility of being selected, increasing the probability of selecting actions with high expectations. Parameter adjustment actions include a variety of actions that affect the detection performance of the AOI detection system, including not only parameter actions that directly affect the AOI detection system, but also some strategy adjustment actions of reinforcement learning, such as adjusting detection parameters and algorithm strategies such as detection thresholds, preprocessing parameters, exposure time, and focal length.

[0130] 104. Perform parameter adjustment on the AOI detection system;

[0131] 105. Use the AOI detection system to photograph the sample display screen, and use the AOI detection system to perform defect detection on the photographed image to generate a second optical detection state of the AOI detection system;

[0132] The terminal performs parameter adjustment on the AOI detection system to adjust the detection performance of the AOI detection system, and evaluates the detection performance by detecting the image of the sample display screen taken.

[0133] 106. Generate an adjustment stimulus for a parameter adjustment action according to the first optical detection state and the second optical detection state;

[0134] The terminal evaluates the parameter adjustment action based on the two performance test results (the first optical detection state and the second optical detection state). The evaluation can be positive or negative. If the detection accuracy of the AOI system for the sample display screen is improved, it is positive and the adjustment incentive is positive.

[0135] 107. Use the Bellman algorithm combined with the adjustment incentive to adjust the initialization expectation of the parameter adjustment action;

[0136] After obtaining the stimulus for the parameter adjustment action, the terminal can use the Bellman algorithm in combination with the adjustment stimulus to adjust the initialization expectation of the parameter adjustment action, that is, adjust the current expectation of the action according to the stimulus, so that when entering the state (first optical detection state) again, the terminal will more or less select the parameter adjustment action.

[0137] The reinforcement learning algorithm builds an intelligent decision engine. In this embodiment, the intelligent decision engine is built based on Q-Learning. Q-Learning is an important algorithm in the field of reinforcement learning. It belongs to the value iteration method and is mainly used for problems in discrete states and action spaces. Its core is to estimate the long-term returns that can be brought by performing each parameter adjustment action under each optical detection state by learning a Q-table. The following is a detailed description of the implementation principle and process steps of Q-Learning:

[0138] Q-Function: Q-Function (or Q-value function) Q(s,a) represents the maximum expected value of the cumulative discounted reward that can be obtained in the future after taking parameter adjustment action a in optical detection state s. The purpose of Q-Learning is to learn an optimal Q function so that the agent can choose the action with the highest Q value in each optical detection state.

[0139] Bellman Optimal Equation: The core update principle of Q-Learning comes from the Bellman Optimal Equation. The agent gradually approaches the solution of the Bellman Optimal Equation by continuously interacting with the environment. The equation is expressed as:

[0140]

[0141] Where Q*(s,a) is the optimal Q value of performing parameter adjustment action a in optical detection state s. r is the adjustment reward immediately after performing the action. γ is the discount factor that determines the importance of future rewards. s′ is the new optical detection state to which we transfer after performing the action. a′ is the action with the maximum Q value among the possible actions in the new optical detection state.

[0142] Regarding the calculation of adjustment incentive r: r represents the immediate reward given to the agent by the environment when the agent performs parameter adjustment action a in the optical detection state s and then transfers to the new optical detection state s' at time step t. Its value can be positive, negative, or zero, representing positive feedback (encouraging the agent to continue such behavior), negative feedback (inhibiting such behavior of the agent), and neutral feedback (no obvious reward or punishment for the agent's behavior).

[0143] 108. Reuse the AOI inspection system to select, execute, capture images, detect defects, generate optical inspection states, and adjust expectations for parameter adjustment actions on the sample display screen until the termination condition is met.

[0144] After the AOI inspection system enters the second optical inspection state, a parameter adjustment action can be selected from the adjustment operation library in the second optical inspection state and the action can be repeated.

[0145] This embodiment provides an automatic optical AOI inspection system that uses a reinforcement learning algorithm for self-learning and optimization. It can dynamically adjust the inspection parameters and optimize the inspection strategy according to the feedback information in actual work to adapt to different inspection tasks and environmental changes, effectively improving the efficiency and adaptability of the inspection system. The structure and operation mechanism of the AOI inspection system of this embodiment are as follows:

[0146] 1. Light source module: provides a stable light source to ensure clear imaging of the object being measured.

[0147] 2. Optical imaging module: captures the image information of the object being measured and forms the original data input.

[0148] 3. Image processing module: pre-processes and analyzes the captured images, identifies possible defect features, and passes the detection results and corresponding status information to the reinforcement learning decision module.

[0149] 4. Reinforcement learning decision module: This is the core part of the system, which uses reinforcement learning algorithms to build an intelligent decision engine. According to the received state s (optical detection state), the appropriate action a (parameter adjustment action, for example, adjusting detection threshold, preprocessing parameters, exposure time, focal length and other detection parameters and algorithm strategies) is selected through the learned strategy π. At the same time, according to the subsequent reward signal r (adjustment incentive, for example: reflecting detection accuracy, speed and other indicators) and the new state s', reinforcement learning is used to update the strategy to achieve dynamic optimization.

[0150] 5. Execution module: Execute corresponding detection operations according to the optimized detection parameters and strategies output by the reinforcement learning decision module.

[0151] The simplified process in this embodiment is as follows:

[0152] 1. Start → Initialize AOI inspection system

[0153] 2. Initialize the AOI detection system → Observe the state of the AOI detection system (obtain the current optical detection state s_t, that is, the detection performance of the AOI system)

[0154] 3. State observation → reinforcement learning decision (based on Q-table, select parameters to adjust action a_t according to the current optical detection state s_t)

[0155] 4. Reinforcement learning decision → execution action (adjusting relevant parameters or strategies through parameter adjustment actions in automatic optical inspection systems)

[0156] 5. Execute action → Environmental feedback (after the system executes the parameter adjustment action, it obtains the new optical detection state s_{t+1} and reward signal r_t)

[0157] 6. Environmental feedback → Update Q-value (update Q-table according to Q-learning update formula)

[0158] 7. Update Q-value → Determine whether the termination condition is met (such as reaching the maximum number of training steps or the detection accuracy meets the requirements)

[0159] 8. Determine whether the termination condition is met → If not, return to state observation, if satisfied, end.

[0160] The following is a detailed description of the specific implementation process steps:

[0161] 1. Initialize Q-Table: The agent will create a two-dimensional table, with rows representing all possible optical detection states and columns representing all possible parameter adjustment actions. Initially, all Q values ​​in the Q-Table are initialized to zero or arbitrarily small random values. It should be noted that if new optical detection states appear during the information reinforcement process, they can be added to the Q-Table, i.e. self-supplementing learning.

[0162] 2. Environmental interaction: The agent is in the current optical detection state s and selects a parameter adjustment action a to execute according to the ε-greedy strategy. The ε-greedy strategy means that most of the time (1-ε) the optimal parameter adjustment action is selected according to the current Q-Table, and a parameter adjustment action is randomly selected with probability ε to maintain a certain degree of exploration.

[0163] 3. Perform actions and receive feedback: Perform action a, and the environment gives a new optical detection state s' and corresponding reward r (adjust incentive) based on the agent's action.

[0164] 4. Update Q-Table: Use the Q-Learning update formula to update the Q value in the Q-Table:

[0165]

[0166] Among them, Q(s,a) is the current Q-value estimate of performing parameter adjustment action a in optical detection state s; r is the immediate reward (immediate return, adjustment incentive) obtained immediately after performing action a; γ is the discount factor, whose value is between 0 and 1, which determines the importance of future rewards. A larger γ means that the agent attaches more importance to long-term rewards; s′ is the new optical detection state transferred after performing parameter adjustment action a; a′ is the parameter adjustment action with the maximum Q value that can be obtained among all possible parameter adjustment actions in the new optical detection state s′; is the maximum Q value of all parameter adjustment actions under the new optical detection state s′, which represents the expected reward that the agent believes can be obtained by taking the optimal parameter adjustment action under the new optical detection state; α is the learning rate, which determines the trade-off between new information and existing Q values ​​when updating the Q value. A smaller α will make the learning process slower, while a larger α will give new experience a greater impact.

[0167] 5. State transfer: The optical detection state is transferred from s to s', and then enters the next time step t. The above process is repeated until the stopping condition is met (such as reaching the preset number of training steps, reaching a certain performance standard, etc.).

[0168] 6. Through continuous iteration of this process, the Q-Table will gradually approach the optimal Q-value function, and the agent will learn to choose the optimal parameter adjustment action in each state. Finally, an optimal strategy can be derived based on the Q-Table, that is, always choose the parameter adjustment action with the highest Q value in each optical detection state. Please refer to Figure 3 , Figure 3 This is a schematic diagram of the Q value update process.

[0169] In the AOI inspection system, assuming there are M models in various states, there are M 2 In this embodiment, the steps of building an intelligent decision engine based on the reinforcement learning algorithm are as follows:

[0170] (1) Initialization phase: define the state space S (optical detection state, including factors such as lighting conditions, product type, machine model, product size, etc.), action space A (parameter adjustment electronics, including adjustable detection parameter sets and detection strategies), build a Q-Table, and store the expected return of each state-action pair by maintaining the Q-table;

[0171] (2) Define the reward function R: It is used to quantify the benefits brought by the system after performing a specific action in a certain state, that is, after adjusting the detection parameter set and detection strategy for different production tasks and environmental changes, calculate the change in AOI detection performance (including detection accuracy and speed). The specific definition of the reward function R is described in the subsequent embodiments.

[0172] (3) New action execution: Through the ε-greedy strategy, a parameter adjustment action is selected in the current optical detection state and transferred to the new optical detection state.

[0173] (4) Calculate the immediate reward r obtained from the old state s to the new state s' after the parameter adjustment action a, and use it to update the Q-table. If the accuracy increases, r is a positive reward; if the accuracy decreases, r is a negative reward; if the accuracy does not change, r is a zero reward.

[0174] By iterating this process, the system will gradually learn the optimal action selection under various states, that is, the optimal detection strategy and parameter configuration.

[0175] In this embodiment, the optical detection parameters of the AOI detection system are first initialized, and the sample display screen is crimped and lit on the AOI detection system, that is, the AOI detection system is initially laid out. The sample display screen is used to determine the first optical detection state of the current AOI detection system, that is, to determine the current defect detection capability of the AOI detection system. A parameter adjustment action is selected from the adjustment operation library, and the adjustment operation library includes several groups of parameter adjustment actions, each group of parameter adjustment actions is set with an initialization expectation. The adjustment operation library includes a variety of parameter adjustment actions, which can affect the defect detection performance of the AOI detection system. The parameter adjustment action is performed on the AOI detection system. Then the AOI detection system is used to shoot the sample display screen, and the AOI detection system is used to perform defect detection on the shot image to generate the second optical detection state of the AOI detection system. At this time, an adjustment excitation is generated for the parameter adjustment action according to the first optical detection state and the second optical detection state. That is, the influence of the parameter adjustment action in the first optical detection state is evaluated according to the change of the detection state. Next, the Bellman algorithm is used in combination with the adjustment excitation to adjust the initialization expectation of the parameter adjustment action. The expectation of the parameter adjustment action in the first optical detection state is evaluated. Next, in the second optical inspection state, the AOI inspection system is used again to select, execute, capture images, detect defects, generate optical inspection states, and adjust expectations for the sample display screen until the termination condition is met. When the termination condition is met, the strategies for parameter adjustment actions for the sample display screen have been fully recorded, that is, through this series of strategies, the AOI inspection system can autonomously adjust the inspection parameters for the display screen according to the actual production tasks and changes in the inspection environment, reducing human intervention, optimizing the efficiency of the AOI inspection system, and improving the adaptability of the AOI inspection system.

[0176] See also Figure 4 and Figure 5 , the present application provides another embodiment of an autonomously optimized optical detection method, comprising:

[0177] 401. Initialize the optical detection parameters of the AOI detection system, and press-connect and light up the sample display screen on the AOI detection system;

[0178] Step 401 in this embodiment is similar to step 101 in the above embodiment and will not be described again here.

[0179] 402. Photograph the sample display screen through the AOI detection system;

[0180] 403. Perform full defect detection on the captured image using a full defect recognition network in the AOI detection system to generate a full defect distribution probability and a full defect detection rate, wherein the full defect distribution probability includes recognition probabilities of at least two mura defects;

[0181] 404. Determine a first optical inspection state of the current AOI inspection system according to the total defect distribution probability and the total defect inspection rate;

[0182] In this embodiment, the optical detection state mainly includes defect detection accuracy and defect detection rate, and the detection accuracy and efficiency of the current sample display screen by the current AOI detection system are evaluated.

[0183] The terminal first takes an initial shot of the sample display screen through the AOI detection system, and then uses the full defect recognition network in the AOI detection system to perform full defect detection on the captured image, generating a full defect distribution probability and a full defect detection rate, wherein the full defect distribution probability includes the recognition probability of at least two mura defects. The full defect recognition network is a convolutional neural network model used to identify mura defects in display screens. By training on a variety of mura defects, it is possible to detect defect features in display screen images. During the shooting process of the AOI detection device, there are many parameters that can affect the quality of the generated image, so the accuracy and rate of detecting the image are largely affected by the parameters of the AOI detection device. A convolutional neural network model for comprehensive defect detection is used in this embodiment, which can detect a variety of defects. The full defect detection rate represents the time rate used by the convolutional neural network model to analyze the defect results from the images obtained by the AOI detection system.

[0184] For example: In the total defect distribution probability, defect A is 10%, defect B is 22%, defect C is 60%, defect E is 5%, and other defects are 3%.

[0185] After the convolutional neural network model of full defect detection obtains the full defect distribution probability and the full defect detection rate, the terminal determines the first optical detection state of the current AOI detection system according to the full defect distribution probability and the full defect detection rate.

[0186] 405. There is a probability of ε to select the parameter adjustment action with the highest expectation from the adjustment operation library, where ε is a decimal greater than 0 and less than 1;

[0187] 406. There is a probability of 1-ε to randomly select a parameter adjustment action from the adjustment operation library;

[0188] In this embodiment, the agent is in the current optical detection state s and selects a parameter adjustment action a to execute according to the ε-greedy strategy, where the ε-greedy strategy means that most of the time (1-ε) the optimal parameter adjustment action is selected according to the current Q-Table, and a parameter adjustment action is randomly selected with probability ε to maintain a certain degree of exploration.

[0189] 407. Execute parameter adjustment action on the AOI detection system;

[0190] 408. Use the AOI inspection system to photograph the sample display screen, and use the AOI inspection system to perform defect inspection on the photographed image to generate a second optical inspection state of the AOI inspection system;

[0191] Step 407 and step 408 in this embodiment are similar to steps 104 and 105 in the above-mentioned embodiment, and are not described again here.

[0192] 409. Determine the precision excitation direction according to the real defect of the sample display screen, the sample display screen has a real defect;

[0193] 410. Generate precision incentive weights for real defects;

[0194] 411. Generate rate incentive weights based on the full defect recognition network;

[0195] 412. Generate a probability change degree of a real defect according to the total defect distribution probability in the first optical detection state and the second optical detection state;

[0196] 413. Generate precision incentive parameters of real defects according to the probability change degree of real defects, precision incentive direction and precision incentive weight;

[0197] 414. Generate a rate change degree and a rate excitation direction according to the full defect detection rate in the first optical detection state and the second optical detection state;

[0198] 415. Generate rate excitation parameters according to the rate change degree, the rate excitation weight, and the rate excitation direction;

[0199] 416. Generate an adjustment incentive according to the precision incentive parameter and the rate incentive parameter;

[0200] In this embodiment, the full defect recognition network in the AOI inspection system is used to perform full defect detection on the captured images, and only one convolutional neural network model for full defect recognition is used to analyze the images, which reduces the cost, but the quality of reinforcement learning will be slightly weaker, that is, the construction cost of the AOI inspection system is reduced, and the state-action link in the single construction process requires more time to achieve the preset goal.

[0201] In this embodiment, the terminal determines the precision excitation direction based on the real defect set of the sample display screen. The real defect set only includes one real defect, that is, the defect of the sample display screen is known, and the ability to detect the defect to a certain percentage can indicate the precision of the AOI detection system. If the probability distribution of the real defect increases in two detection states, it is a positive excitation, and other defects, whether rising or falling, are not used as precision excitation directions.

[0202] In this embodiment, the selected sample display screens all have one real defect. After the current sample display screen is trained, a sample display screen with another defect of the same type may be selected as the next training sample to continue training.

[0203] The terminal generates precision incentive weights for real defects in the real defect set. Because the difficulty of detecting different defects for the full defect recognition network is not the same, for different real defects, in this embodiment, it is necessary to select different precision incentive weights according to the recognition ability of the full defect recognition network. The more difficult the defect is to detect, the greater the precision incentive weight, and vice versa.

[0204] Generate rate incentive weights based on the full defect recognition network Specifically, the more difficult it is to detect the real defect, the higher the rate incentive weight The bigger it is, the smaller it is.

[0205] The terminal generates the probability change degree of the real defect according to the total defect distribution probability in the first optical inspection state and the second optical inspection state. For example, the probability of defect A (real defect) in the first optical inspection state is 33%, and that in the second optical inspection state is 30%. The probability change degree at this time is 3%.

[0206] The precision incentive parameters of real defects are generated according to the probability change degree of real defects, precision incentive direction and precision incentive weight. The formula is as follows:

[0207]

[0208] With the above probability change Taking 3% as an example, the precision excitation direction At this time, it is negative. In this embodiment, -1 is used to represent the value of the precision incentive direction. The precision incentive weight is 0.03, at this time the precision incentive parameter of defect A =-0.03*(3%*100)=-0.09. The 100 in (3%*100) is the compensation parameter for the probability change degree. , the value used to balance the adjustment of incentives will not be too high or too low.

[0209] The rate change degree and rate excitation direction are generated according to the full defect detection rate in the first optical detection state and the second optical detection state, that is, the comparison of the detection speed. The detection rate of all defects in the first optical detection state is t1, and the detection rate of all defects in the second optical detection state is t2. The rate excitation direction is determined according to the size of t1 and t2. The larger t1 is, the positive one, and the larger t2 is, the negative one. At this time, the rate change degree can be calculated by the following formula:

[0210]

[0211] is the rate change degree, is the unit duration, The absolute value of the difference in detection rate. For example, 100s is used as the unit time length. , the detection rate of all defects in the first optical detection state is t1=40s, and the detection rate of all defects in the second optical detection state is t2=30s, then the rate change degree :

[0212]

[0213] It should be noted that the unit time length and the detection rate of all defects in the above examples are measured in seconds. In practice, different time measurements can also be used, which is not limited here.

[0214] According to the degree of change of rate , rate incentive weight and rate incentive direction Generate rate incentive parameters :

[0215]

[0216] Finally, the terminal generates an adjustment incentive based on the precision incentive parameter and the rate incentive parameter, that is, the precision incentive parameter of defect A is and rate excitation parameters Just add them together. It should be noted that the rate incentive weight and precision incentive weight are the weights of the two dimensions. The size of the two dimensions needs to be determined not only according to the detection difficulty of defect A, but also according to the reinforcement learning direction of the current AOI detection system. If high accuracy is pursued, the accuracy incentive weight Set it larger, otherwise the rate incentive weight Bigger.

[0217] 417. Use Bellman algorithm combined with adjustment incentives to adjust the initialization expectation of parameter adjustment actions;

[0218] 418. Re-use the AOI inspection system to select, execute, capture images, detect defects, generate optical inspection states, and adjust expectations for parameter adjustment actions on the sample display screen until the termination condition is met.

[0219] Step 417 and step 418 in this embodiment are similar to steps 107 and 108 in the above-mentioned embodiment, and are not described again here.

[0220] In this embodiment, the optical detection parameters of the AOI detection system are first initialized, and the sample display screen is crimped and lit on the AOI detection system, that is, the AOI detection system is initially laid out. The sample display screen is photographed by the AOI detection system. The full defect recognition network in the AOI detection system is used to perform full defect detection on the captured image, and a full defect distribution probability and a full defect detection rate are generated. The full defect distribution probability includes the recognition probability of at least two mura defects. The first optical detection state of the current AOI detection system is determined according to the full defect distribution probability and the full defect detection rate. There is a probability of ε to select the most expected parameter adjustment action from the adjustment operation library, where ε is a decimal greater than 0 and less than 1. There is a probability of 1-ε to randomly select a parameter adjustment action from the adjustment operation library. The adjustment operation library includes a variety of parameter adjustment actions, which can affect the defect detection performance of the AOI detection system. Parameter adjustment actions are performed on the AOI detection system. Then the sample display screen is photographed using the AOI detection system, and the captured image is subjected to defect detection using the AOI detection system to generate a second optical detection state of the AOI detection system.

[0221] At this time, the precision excitation direction is determined according to the real defect of the sample display screen, and the sample display screen has a real defect. The precision excitation weight is generated for the real defect. The rate excitation weight is generated according to the full defect recognition network. The probability change degree of the real defect is generated according to the probability of the full defect distribution in the first optical detection state and the second optical detection state. The precision excitation parameter of the real defect is generated according to the probability change degree of the real defect, the precision excitation direction and the precision excitation weight. The rate change degree and the rate excitation direction are generated according to the full defect detection rate in the first optical detection state and the second optical detection state. The rate excitation parameter is generated according to the rate change degree, the rate excitation weight and the rate excitation direction. The adjustment excitation is generated according to the precision excitation parameter and the rate excitation parameter.

[0222] That is, the influence of the parameter adjustment action in the first optical detection state is evaluated according to the change of the detection state. Next, the Bellman algorithm is used in combination with the adjustment stimulus to adjust the initialization expectation of the parameter adjustment action. The expectation of the parameter adjustment action in the first optical detection state is evaluated. Next, in the second optical detection state, the AOI detection system is used again to select, execute, capture images, detect defects, generate optical detection states, and adjust expectations for the parameter adjustment action of the sample display screen until the termination condition is met. When the termination condition is met, the strategies for the parameter adjustment actions of the sample display screen have been fully recorded, that is, this series of strategies can be used to enable the AOI detection system to autonomously adjust the detection parameters for the display screen according to the actual production tasks and changes in the detection environment, reducing human intervention, optimizing the efficiency of the AOI detection system, and improving the adaptability of the AOI detection system.

[0223] Secondly, by providing an optical inspection state determination method and an excitation calculation method using a convolutional neural network model with different defects, the AOI inspection system can be constructed while reducing costs.

[0224] See also Figure 6 and Figure 7 , the present application provides another embodiment of an autonomously optimized optical detection method, comprising:

[0225] 601. Initialize the optical detection parameters of the AOI detection system, and press-connect and light up the sample display screen on the AOI detection system;

[0226] Step 601 in this embodiment is similar to step 101 in the above embodiment and will not be described again here.

[0227] 602. Photograph the sample display screen through the AOI detection system;

[0228] 603. Perform single defect detection on the captured image using a single defect recognition network corresponding to a real defect set of a sample display screen in the AOI detection system to generate single defect detection data, where the single defect detection data includes at least one single defect recognition probability and at least one single defect detection rate, and the real defect set includes at least one real defect;

[0229] 604. Determine a first optical inspection state of the current AOI inspection system according to the single defect inspection data;

[0230] In this embodiment, the terminal photographs the sample display screen through the AOI detection system, uses the full defect recognition network in the AOI detection system to perform full defect detection on the photographed image, and generates a full defect distribution probability, which includes the recognition probability of at least two mura defects. These two steps are the same as in Example 2 and are not repeated here.

[0231] The terminal uses the single defect recognition network corresponding to the real defect set of the sample display screen in the AOI detection system to perform single defect detection on the captured image and generate single defect detection data. The single defect detection data includes at least one single defect recognition probability and at least one single defect detection rate. The real defect set includes at least one real defect. The first optical detection state of the current AOI detection system is determined based on the total defect distribution probability and the single defect detection data. That is, the single defect recognition network is used for detection to obtain the single defect detection data of the corresponding defect.

[0232] 605. There is a probability of ε to select the parameter adjustment action with the highest expectation from the adjustment operation library, where ε is a decimal greater than 0 and less than 1;

[0233] 606. There is a probability of 1-ε to randomly select a parameter adjustment action from the adjustment operation library;

[0234] Steps 605 to 606 in this embodiment are similar to steps 405 to 406 in the above-mentioned embodiment, and are not described again here.

[0235] 607. Execute parameter adjustment action on the AOI detection system;

[0236] 608. Use the AOI inspection system to photograph the sample display screen, and use the AOI inspection system to perform defect inspection on the photographed image to generate a second optical inspection state of the AOI inspection system;

[0237] 609. Determine a precision excitation direction according to a real defect set of the sample display screen, where the real defect set includes at least one real defect;

[0238] 610. Generate precision incentive weights for real defects in the real defect set;

[0239] 611. Generate a rate incentive weight according to a single defect recognition network;

[0240] 612. Generate a probability change degree of at least one real defect according to the single defect recognition probability in the first optical detection state and the second optical detection state;

[0241] 613. Generate a precision incentive parameter of at least one real defect according to a probability change degree of at least one real defect, a precision incentive direction, and a precision incentive weight;

[0242] 614. Generate a rate change degree and a rate excitation direction of at least one real defect according to the single defect detection rates in the first optical detection state and the second optical detection state;

[0243] 615. Generate a rate excitation parameter of at least one real defect according to a rate change degree, a rate excitation direction, and a rate excitation weight of at least one real defect;

[0244] 616. Generate an adjustment incentive according to the precision incentive parameter and the rate incentive parameter;

[0245] The terminal uses both the full defect recognition network and the single defect recognition network, which increases the construction cost. However, the integration of the single defect recognition network can better judge the direction and degree of change of the optical detection state of the real defect by the AOI detection system, and the generation of adjustment incentives for parameter adjustment actions is more accurate, which can improve the construction speed. In addition, the integration of the single defect recognition network is mainly used for the detection of sample display screens with multiple defects, and can simultaneously perform synchronous detection and adjustment incentive generation for multiple defects. The effect of using only the full defect recognition network for sample display screens with single defects is good, but for sample display screens with multiple defects, parameter adjustment errors are prone to occur, because the full defect recognition network detects each defect and obtains the defect distribution probability. The probability of each defect adds up to 1. If it is applied to sample display screens with two defects, after one adjustment, the increase in the probability of the two real defects is likely to affect each other, so there are inevitable errors in parameter calculation.

[0246] In this embodiment, the terminal determines the precision excitation direction according to the real defect set of the sample display screen, where the real defect set includes at least one real defect. The determination method is similar to step 409 and will not be described in detail here.

[0247] The terminal generates precision incentive weights for the real defects in the real defect set, and the method is somewhat different from step 410. In step 410, different precision incentive weights are selected based on the recognition capability of the full defect recognition network, while in step 610, different precision incentive weights are selected for each real defect based on the recognition capability of the single defect recognition network corresponding to each real defect. Compared with the use of the full defect recognition network, the use of a single defect recognition network can better control the weight parameters, and thus control the adjustment incentive well, which can reduce the total number of parameter adjustments and reduce the construction time.

[0248] The terminal generates a rate incentive weight according to the single defect recognition network, that is, when there are multiple defects in the sample display screen, the corresponding rate incentive weight is generated according to the average detection rate of the defect recognized by the single defect recognition network.

[0249] The terminal generates a probability change degree of at least one real defect according to the single defect recognition probability in the first optical detection state and the second optical detection state, and generates a precision incentive parameter of at least one real defect according to the probability change degree of at least one real defect, the precision incentive direction and the precision incentive weight.

[0250] Specifically, assuming there are real defects B and C, we have:

[0251]

[0252]

[0253] and are the probability changes of the real defect B and the real defect C, respectively. and are the precision excitation directions of the real defect B and the real defect C respectively, and are the precision incentive weights of the real defect B and the real defect C respectively, and are the compensation parameters of the real defect B and the real defect C respectively, and are the accuracy incentive parameters of the real defect B and the real defect C respectively.

[0254] Next, the terminal generates the rate change degree and rate excitation direction of at least one real defect according to the single defect detection rate in the first optical detection state and the second optical detection state. Generate the rate excitation parameter of at least one real defect according to the rate change degree, rate excitation direction and rate excitation weight of at least one real defect. Generate the adjustment excitation according to the accuracy excitation parameter and the rate excitation parameter. Taking real defects B and C as examples, there are:

[0255]

[0256]

[0257] and are the rate change degrees of the real defect B and the real defect C, respectively. and are the rate excitation directions of the real defect B and the real defect C, respectively. and are the rate incentive weights of the real defect B and the real defect C, respectively. and are the rate excitation parameters of the real defect B and the real defect C respectively. and The calculation method of is the same as that in the second embodiment and will not be described in detail here.

[0258] 617. Use Bellman algorithm combined with adjustment incentives to adjust the initialization expectation of parameter adjustment actions;

[0259] 618. Re-use the AOI inspection system to select, execute, capture images, detect defects, generate optical inspection states, and adjust expectations for parameter adjustment actions on the sample display screen until the termination condition is met.

[0260] Step 617 and step 618 in this embodiment are similar to steps 107 and 108 in the aforementioned embodiment, and are not described again here.

[0261] In this embodiment, the optical detection parameters of the AOI detection system are first initialized, and the sample display screen is crimped and lit on the AOI detection system, that is, the AOI detection system is initially laid out. The sample display screen is photographed by the AOI detection system. The full defect recognition network in the AOI detection system is used to perform full defect detection on the captured image, and a full defect distribution probability is generated. The full defect distribution probability includes the recognition probability of at least two mura defects. The single defect recognition network corresponding to the real defect set of the sample display screen in the AOI detection system is used to perform single defect detection on the captured image, and single defect detection data is generated. The single defect detection data includes at least one single defect recognition probability and at least one single defect detection rate, and the real defect set includes at least one real defect. The first optical detection state of the current AOI detection system is determined based on the full defect distribution probability and the single defect detection data.

[0262] The parameter adjustment action with the highest expectation is selected from the adjustment operation library with probability ε, where ε is a decimal greater than 0 and less than 1. A parameter adjustment action is randomly selected from the adjustment operation library with probability 1-ε. The adjustment operation library includes a variety of parameter adjustment actions that can affect the defect detection performance of the AOI inspection system. The parameter adjustment action is performed on the AOI inspection system. Then, the sample display screen is photographed using the AOI inspection system, and the photographed image is subjected to defect detection using the AOI inspection system to generate a second optical inspection state of the AOI inspection system.

[0263] At this time, the precision excitation direction is determined according to the real defect set of the sample display screen, and the real defect set includes at least one real defect. The precision excitation weight is generated for the real defects in the real defect set. The rate excitation weight is generated according to the single defect recognition network. When the probability of the real defect in the total defect distribution probability is greater than the preset probability, the precision excitation weight of the real probability is increased. The probability change degree of at least one real defect is generated according to the single defect recognition probability in the first optical detection state and the second optical detection state. The precision excitation parameter of at least one real defect is generated according to the probability change degree of at least one real defect, the precision excitation direction and the precision excitation weight. The rate change degree and rate excitation direction of at least one real defect are generated according to the single defect detection rate in the first optical detection state and the second optical detection state. The rate excitation parameter of at least one real defect is generated according to the rate change degree of at least one real defect, the rate excitation direction and the rate excitation weight. The adjustment excitation is generated according to the precision excitation parameter and the rate excitation parameter.

[0264] That is, the influence of the parameter adjustment action in the first optical detection state is evaluated according to the change of the detection state. Next, the Bellman algorithm is used in combination with the adjustment stimulus to adjust the initialization expectation of the parameter adjustment action. The expectation of the parameter adjustment action in the first optical detection state is evaluated. Next, in the second optical detection state, the AOI detection system is used again to select, execute, capture images, detect defects, generate optical detection states, and adjust expectations for the parameter adjustment action of the sample display screen until the termination condition is met. When the termination condition is met, the strategies for the parameter adjustment actions of the sample display screen have been fully recorded, that is, this series of strategies can be used to enable the AOI detection system to autonomously adjust the detection parameters for the display screen according to the actual production tasks and changes in the detection environment, reducing human intervention, optimizing the efficiency of the AOI detection system, and improving the adaptability of the AOI detection system.

[0265] Secondly, the terminal uses both the full defect recognition network and the single defect recognition network, which increases the construction cost. However, the integration of the single defect recognition network can better determine the direction and degree of change in the optical detection state of the AOI inspection system for real defects, and the generation of adjustment incentives for parameter adjustment actions is more accurate, which can improve the construction speed. In addition, the integration of the single defect recognition network is mainly used for the detection of sample display screens with multiple defects, and can simultaneously perform synchronous detection of multiple defects and generate adjustment incentives.

[0266] See also Figure 8 , the present application provides an embodiment of an autonomously optimized optical detection device, comprising:

[0267] An initialization unit 801 is used to initialize the optical detection parameters of the AOI detection system and to press-connect and light up the sample display screen on the AOI detection system;

[0268] A determining unit 802 is used to determine a first optical detection state of a current AOI detection system using a sample display screen;

[0269] Optionally, the optical detection state includes detection accuracy and detection speed;

[0270] The determining unit 802 is specifically:

[0271] Photograph the sample display screen through the AOI inspection system;

[0272] Use the full defect recognition network in the AOI inspection system to perform full defect detection on the captured images, generate a full defect distribution probability and a full defect detection rate, and the full defect distribution probability includes the recognition probability of at least two mura defects;

[0273] The first optical inspection state of the current AOI inspection system is determined according to the total defect distribution probability and the total defect inspection rate.

[0274] The determining unit 802 is specifically:

[0275] Photograph the sample display screen through the AOI inspection system;

[0276] Use the full defect recognition network in the AOI inspection system to perform full defect detection on the captured images and generate a full defect distribution probability, which includes the recognition probability of at least two mura defects;

[0277] Using a single defect recognition network corresponding to a real defect set of a sample display screen in an AOI inspection system to perform single defect detection on the captured image, generating single defect detection data, the single defect detection data including at least one single defect recognition probability and at least one single defect detection rate, the real defect set including at least one real defect;

[0278] The first optical inspection state of the current AOI inspection system is determined according to the total defect distribution probability and the single defect inspection data.

[0279] A selection unit 803 is used to select a parameter adjustment action from an adjustment operation library, where the adjustment operation library includes several groups of parameter adjustment actions, and each group of parameter adjustment actions is set with an initialization expectation;

[0280] Optionally, the selection unit 803 includes:

[0281] There is a probability of ε to select the parameter adjustment action with the highest expectation from the adjustment operation library, where ε is a decimal greater than 0 and less than 1;

[0282] There is a 1-ε probability of randomly selecting a parameter adjustment action from the adjustment operation library.

[0283] An execution unit 804 is used to perform a parameter adjustment action on the AOI inspection system;

[0284] The detection unit 805 is used to use the AOI detection system to shoot the sample display screen, and use the AOI detection system to perform defect detection on the shot image to generate a second optical detection state of the AOI detection system;

[0285] A generating unit 806, configured to generate an adjustment stimulus for a parameter adjustment action according to the first optical detection state and the second optical detection state;

[0286] Optionally, the generating unit 806 is specifically:

[0287] Determine the precision excitation direction according to the real defect of the sample display screen, the sample display screen has a real defect;

[0288] Generate precision incentive weights for real defects;

[0289] generating rate incentive weights according to the full defect recognition network;

[0290] generating a probability variation degree of a real defect according to the probability of the full defect distribution in the first optical detection state and the second optical detection state;

[0291] Generate precision incentive parameters of real defects according to the probability variation degree of real defects, precision incentive direction and precision incentive weight;

[0292] generating a rate change degree and a rate excitation direction according to the full defect detection rate in the first optical detection state and the second optical detection state;

[0293] Generate rate excitation parameters according to the rate change degree, the rate excitation weight and the rate excitation direction;

[0294] An adjustment stimulus is generated according to the precision stimulus parameter and the rate stimulus parameter.

[0295] Optionally, the generating unit 806 is specifically:

[0296] Determine the precision excitation direction according to a real defect set of the sample display screen, wherein the real defect set includes at least one real defect;

[0297] Generate precision incentive weights for real defects in the real defect set;

[0298] Generate rate incentive weights based on a single defect recognition network;

[0299] When the probability of a true defect in the total defect distribution probability is greater than the preset probability, the precision incentive weight of the true probability is increased;

[0300] generating a probability change degree of at least one real defect according to the single defect recognition probability in the first optical detection state and the second optical detection state;

[0301] Generate a precision excitation parameter of at least one real defect according to a probability variation degree of at least one real defect, a precision excitation direction, and a precision excitation weight;

[0302] generating a rate change degree and a rate excitation direction of at least one real defect according to the single defect detection rate in the first optical detection state and the second optical detection state;

[0303] generating a rate excitation parameter of at least one real defect according to a rate change degree, a rate excitation direction, and a rate excitation weight of at least one real defect;

[0304] An adjustment stimulus is generated according to the precision stimulus parameter and the rate stimulus parameter.

[0305] An adjustment unit 807, configured to adjust the initialization expectation of the parameter adjustment action by using the Bellman algorithm in combination with the adjustment incentive;

[0306] The reinforcement learning unit 808 is used to reuse the AOI inspection system to photograph the sample display screen, detect defects, generate optical inspection states, and adjust expectations until a termination condition is met.

[0307] See also Fig. 9 , the present application provides an autonomously optimized optical detection system, comprising:

[0308] Processor 901 , memory 902 , input-output unit 903 , and bus 904 .

[0309] The processor 901 is connected to the memory 902 , the input and output unit 903 , and the bus 904 .

[0310] The memory 902 stores a program, and the processor 901 calls the program to execute the following steps: Figure 1 , Figure 4 , Figure 5 , Figure 6 and Figure 7 Autonomously optimized optical detection method in.

[0311] The present application provides a computer-readable storage medium, on which a program is stored, and when the program is executed on a computer, the program performs the following steps: Figure 1 , Figure 4 , Figure 5 , Figure 6 and Figure 7 Autonomously optimized optical detection method in.

[0312] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0313] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0314] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0315] In addition, each functional unit in each embodiment of the present application 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.

[0316] 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 application is essentially 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. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. 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 code.

Claims

1. An autonomously optimized optical detection method, characterized in that: include: Initializing optical inspection parameters of the AOI inspection system, and pressing and lighting up the sample display screen on the AOI inspection system; Determine a first optical detection state of the current AOI detection system using the sample display screen, where the optical detection state includes detection accuracy and detection speed; Determining the first optical inspection state of the current AOI inspection system using the sample display screen, specifically: photographing the sample display screen through the AOI inspection system; performing full defect inspection on the photographed image using the full defect recognition network in the AOI inspection system to generate a full defect distribution probability and a full defect detection rate, wherein the full defect distribution probability includes recognition probabilities of at least two types of mura defects; determining the first optical inspection state of the current AOI inspection system according to the full defect distribution probability and the full defect detection rate; Selecting a parameter adjustment action from an adjustment operation library, wherein the adjustment operation library includes a plurality of groups of parameter adjustment actions, each group of parameter adjustment actions being provided with an initialization expectation; Executing the parameter adjustment action on the AOI inspection system; Using the AOI inspection system to photograph the sample display screen, and using the AOI inspection system to perform defect inspection on the photographed image to generate a second optical inspection state of the AOI inspection system; generating an adjustment stimulus for the parameter adjustment action according to the first optical detection state and the second optical detection state; Generate an adjustment excitation for the parameter adjustment action according to the first optical detection state and the second optical detection state, specifically: determine the precision excitation direction according to the real defect of the sample display screen, the sample display screen has a real defect; generate a precision excitation weight for the real defect; generate a rate excitation weight according to the full defect recognition network; generate the probability change degree of the real defect according to the full defect distribution probability in the first optical detection state and the second optical detection state; generate the precision excitation parameter of the real defect according to the probability change degree of the real defect, the precision excitation direction and the precision excitation weight; generate the rate change degree and the rate excitation direction according to the full defect detection rate in the first optical detection state and the second optical detection state; generate the rate excitation parameter according to the rate change degree, the rate excitation weight and the rate excitation direction; generate the adjustment excitation according to the precision excitation parameter and the rate excitation parameter; Using the Bellman algorithm in combination with the adjustment stimulus to adjust the initialization expectation of the parameter adjustment action; The AOI inspection system is reused to select, execute, capture images, detect defects, generate optical inspection states, and adjust expectations for parameter adjustment actions on the sample display screen until a termination condition is met.

2. The optical detection method according to claim 1, characterized in that: Selecting a parameter adjustment action from an adjustment operation library and executing the parameter adjustment action on the AOI detection system includes: There is a probability of ε to select the parameter adjustment action with the highest expectation from the adjustment operation library, where ε is a decimal greater than 0 and less than 1; There is a probability of 1-ε that a parameter adjustment action is randomly selected from the adjustment operation library.

3. An autonomously optimized optical detection method, characterized in that: include: Initializing optical inspection parameters of the AOI inspection system, and pressing and lighting up the sample display screen on the AOI inspection system; Determine a first optical detection state of the current AOI detection system using the sample display screen, where the optical detection state includes detection accuracy and detection speed; Determining the first optical inspection state of the current AOI inspection system using the sample display screen is specifically as follows: photographing the sample display screen through the AOI inspection system; performing single defect detection on the photographed image using a single defect recognition network corresponding to a real defect set of the sample display screen in the AOI inspection system to generate single defect detection data, wherein the single defect detection data includes at least one single defect recognition probability and at least one single defect detection rate, and the real defect set includes at least one real defect; Determine a first optical inspection state of the current AOI inspection system according to the single defect inspection data; Selecting a parameter adjustment action from an adjustment operation library, wherein the adjustment operation library includes a plurality of groups of parameter adjustment actions, each group of parameter adjustment actions being provided with an initialization expectation; Executing the parameter adjustment action on the AOI inspection system; Using the AOI inspection system to photograph the sample display screen, and using the AOI inspection system to perform defect inspection on the photographed image to generate a second optical inspection state of the AOI inspection system; generating an adjustment stimulus for the parameter adjustment action according to the first optical detection state and the second optical detection state; Generating an adjustment stimulus for the parameter adjustment action according to the first optical detection state and the second optical detection state, specifically: determining a precision stimulus direction according to a real defect set of the sample display screen, the real defect set including at least one real defect; generating a precision stimulus weight for the real defects in the real defect set; Generate a rate incentive weight according to the single defect recognition network; generate a probability change degree of at least one real defect according to the single defect recognition probability in the first optical detection state and the second optical detection state; generate a precision incentive parameter of at least one real defect according to the probability change degree of at least one real defect, the precision incentive direction and the precision incentive weight; generate a rate change degree and a rate incentive direction of at least one real defect according to the single defect detection rate in the first optical detection state and the second optical detection state; generate a rate incentive parameter of at least one real defect according to the rate change degree of at least one real defect, the rate incentive direction and the rate incentive weight; generate an adjustment incentive according to the precision incentive parameter and the rate incentive parameter; Using the Bellman algorithm in combination with the adjustment stimulus to adjust the initialization expectation of the parameter adjustment action; The AOI inspection system is reused to select, execute, capture images, detect defects, generate optical inspection states, and adjust expectations for parameter adjustment actions on the sample display screen until a termination condition is met.

4. The optical detection method according to claim 3, characterized in that: Selecting a parameter adjustment action from an adjustment operation library and executing the parameter adjustment action on the AOI detection system includes: There is a probability of ε to select the parameter adjustment action with the highest expectation from the adjustment operation library, where ε is a decimal greater than 0 and less than 1; There is a probability of 1-ε that a parameter adjustment action is randomly selected from the adjustment operation library.

5. An autonomously optimized optical detection device, characterized in that: include: An initialization unit, used to initialize optical detection parameters of the AOI detection system, and to press-connect and light up a sample display screen on the AOI detection system; A determination unit, configured to determine a first optical detection state of the current AOI detection system using the sample display screen, where the optical detection state includes detection accuracy and detection speed; Determine the unit, specifically: The sample display screen is photographed by the AOI inspection system; the full defect recognition network in the AOI inspection system is used to perform full defect detection on the photographed image, and a full defect distribution probability and a full defect detection rate are generated, where the full defect distribution probability includes the recognition probability of at least two mura defects; Determine the first optical inspection state of the current AOI inspection system according to the total defect distribution probability and the total defect inspection rate; A selection unit, used for selecting a parameter adjustment action from an adjustment operation library, wherein the adjustment operation library includes a plurality of groups of parameter adjustment actions, each group of parameter adjustment actions is provided with an initialization expectation; An execution unit, configured to execute the parameter adjustment action on the AOI inspection system; A detection unit, configured to use the AOI detection system to photograph the sample display screen, and use the AOI detection system to perform defect detection on the photographed image, and generate a second optical detection state of the AOI detection system; a generating unit, configured to generate an adjustment stimulus for the parameter adjustment action according to the first optical detection state and the second optical detection state; Generate units, specifically: Determine the precision excitation direction according to the real defect of the sample display screen, the sample display screen has a real defect; generate the precision excitation weight for the real defect; Generate rate incentive weights according to the full defect recognition network; generate the probability change degree of real defects according to the full defect distribution probability in the first optical detection state and the second optical detection state; generate precision incentive parameters of real defects according to the probability change degree of real defects, precision incentive direction and precision incentive weights; generate rate change degree and rate incentive direction according to the full defect detection rate in the first optical detection state and the second optical detection state; generate rate incentive parameters according to the rate change degree, rate incentive weight and rate incentive direction; generate adjustment incentives according to the precision incentive parameters and rate incentive parameters; An adjustment unit, configured to adjust the initialization expectation of the parameter adjustment action by using a Bellman algorithm in combination with the adjustment stimulus; A reinforcement learning unit is used to reuse the AOI inspection system to select, execute, capture images, detect defects, generate optical inspection states, and adjust expectations for parameter adjustment actions on the sample display screen until a termination condition is met.

6. The optical detection device according to claim 5, characterized in that: Select units, including: With probability ε, select one of the parameter adjustment actions with the highest expectation from the adjustment operation library as the parameter adjustment action; With probability ε, a parameter adjustment action is randomly selected from the adjustment operation library as the parameter adjustment action.

7. An autonomously optimized optical detection device, characterized in that: include: An initialization unit, used to initialize optical detection parameters of the AOI detection system, and to press-connect and light up a sample display screen on the AOI detection system; A determination unit, configured to determine a first optical detection state of the current AOI detection system using the sample display screen, where the optical detection state includes detection accuracy and detection speed; Determine the unit, specifically: The sample display screen is photographed by an AOI inspection system; a single defect detection is performed on the photographed image using a single defect recognition network corresponding to a real defect set of the sample display screen in the AOI inspection system to generate single defect detection data, wherein the single defect detection data includes at least one single defect recognition probability and at least one single defect detection rate, and the real defect set includes at least one real defect; Determine a first optical inspection state of the current AOI inspection system according to the single defect inspection data; A selection unit, used for selecting a parameter adjustment action from an adjustment operation library, wherein the adjustment operation library includes a plurality of groups of parameter adjustment actions, each group of parameter adjustment actions is provided with an initialization expectation; An execution unit, configured to execute the parameter adjustment action on the AOI inspection system; A detection unit, configured to use the AOI detection system to photograph the sample display screen, and use the AOI detection system to perform defect detection on the photographed image, and generate a second optical detection state of the AOI detection system; a generating unit, configured to generate an adjustment stimulus for the parameter adjustment action according to the first optical detection state and the second optical detection state; Generate units, specifically: Determine the precision excitation direction according to the real defect set of the sample display screen, the real defect set including at least one real defect; generate precision excitation weights for the real defects in the real defect set; Generate a rate incentive weight according to a single defect recognition network; generate a probability change degree of at least one real defect according to the single defect recognition probability in the first optical detection state and the second optical detection state; generate a precision incentive parameter of at least one real defect according to the probability change degree of at least one real defect, the precision incentive direction and the precision incentive weight; generate a rate change degree and a rate incentive direction of at least one real defect according to the single defect detection rate in the first optical detection state and the second optical detection state; generate a rate incentive parameter of at least one real defect according to the rate change degree, the rate incentive direction and the rate incentive weight of at least one real defect; generate an adjustment incentive according to the precision incentive parameter and the rate incentive parameter; An adjustment unit, configured to adjust the initialization expectation of the parameter adjustment action by using a Bellman algorithm in combination with the adjustment stimulus; A reinforcement learning unit is used to reuse the AOI inspection system to select, execute, capture images, detect defects, generate optical inspection states, and adjust expectations for parameter adjustment actions on the sample display screen until a termination condition is met.

8. The optical detection device according to claim 7, characterized in that: Select units, including: With probability ε, select one of the parameter adjustment actions with the highest expectation from the adjustment operation library as the parameter adjustment action; With probability ε, a parameter adjustment action is randomly selected from the adjustment operation library as the parameter adjustment action.

9. An autonomously optimized optical detection system, characterized in that: include: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the autonomously optimized optical detection method according to any one of claims 1 to 2.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and when the program is executed on a computer, the autonomously optimized optical detection method according to any one of claims 1 to 2 is executed.