A system for determining failure of cleaning of a liquid preparation line for eye drops
By using image acquisition and particle swarm optimization (PSO) image registration technology, the interlayer residue in the eye drop preparation pipeline can be accurately identified, which solves the problem of inaccurate cleaning failure judgment in the existing technology and improves the reliability of the cleaning effect.
Patent Information
- Application Number
- CN202611400207.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-10
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies make it difficult to reliably determine whether the eye drop preparation pipeline has failed to be cleaned. It is easy to be misjudged as qualified due to obstruction by residual material in the interlayer, which poses a risk of backflow.
An image acquisition module is used to acquire images of the PTFE ingress surface and the diaphragm. A particle swarm is constructed for image registration. The folded-back connection edge and folded-back free edge of the crack edge are extracted. The interlayer release trajectory is tracked. The cleaning effect is determined by a failure judgment module.
By using image registration and particle swarm optimization, residual interlayers can be accurately identified, reducing the risk of false positives and improving the reliability of cleaning failure determination.
Smart Images

Figure CN123181373A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of particle swarm optimization technology, and in particular to a system for determining the failure of cleaning pipelines for eye drops. Background Technology
[0002] Eye drops are typically prepared and transported through closed mixing pipelines. Diaphragm valves in these pipelines need to be repeatedly opened and closed to control the flow of liquid. After a production batch is completed, cleaning media flows along the pipeline, carrying away any residual eye drops on the contact surface. Then, inspection personnel confirm whether the cleaning has met the requirements. After long-term bending and compression, the PTFE contact surface of a double-layer diaphragm valve may develop cracks at the edges, forming a thin sheet that can be flipped. A small amount of eye drops can easily enter between the thin sheet and the contact surface, becoming a layer of residue that is difficult to see directly with ordinary visual inspection.
[0003] Current cleaning inspection methods typically involve observing the fluid inlet surface at a specific location on the valve, or only checking for residues on the visible surface at that moment. When the thin sheet at the crack is still covering the interlayer, the eye drop residue within the interlayer will be obscured. After the valve is moved, the sheet flips open, and the previously obscured residue may re-enter the pipeline. Existing methods struggle to identify interlayer residues that become visible as the valve position changes, easily leading to the misjudgment of pipelines with a risk of backflow as if they have passed cleaning, and failing to reliably determine whether the eye drop dispensing pipeline has experienced cleaning failure. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies that easily misjudge pipelines with a risk of backflow as having passed cleaning, and to propose a system for determining the failure of cleaning of eye drop preparation pipelines.
[0005] To address the problems existing in the prior art, the present invention adopts the following technical solution: A system for determining the failure of an eye drop preparation pipeline cleaning process includes: The image acquisition module acquires residual detection images of the PTFE ingress surface and images of the diaphragm; based on the diaphragm images, an initial particle swarm is constructed; the initial particle swarm is iteratively updated to obtain the particle swarm after the iteration. The image registration module obtains the registered residual detection image based on the particle swarm after the iteration. The flipping and extraction module obtains the free edge position based on the registered diaphragm image; it connects the free edge positions corresponding to the same connection position to obtain the folding and flipping area. The back-release tracking module determines the fold-over side and the tear exposure side based on the fold-over and tear exposure area, and connects the continuous eye drop residue positions corresponding to the fold-over side and the tear exposure side to obtain the back-release trajectory of the tear edge fold-over interlayer. The failure determination module determines the cleaning failure of the target eye drop preparation pipeline based on the back-release trajectory of the crack edge folding interlayer, and obtains the cleaning failure determination result of the eye drop preparation pipeline.
[0006] Compared with the prior art, the beneficial effects of the present invention are: 1. By controlling the target double-layer diaphragm valve to reach multiple valve positions in sequence, and acquiring diaphragm images and residual detection images at each valve position, the images are then registered using a fixed structural position to ensure that the PTFE liquid contact surface before and after valve movement is on the same coordinate reference. This allows for clear observation of the positional changes of the cracked edge folding plate at different valve positions, reducing the chance of missing interlayer residue due to image position offset.
[0007] 2. By extracting the folded connecting edge and folded free edge of the crack edge folding piece, connecting the folded free edge positions under multiple valve positions, determining the overlap range between the area through which the folded free edge moves and the exposed crack, and then screening out the continuous eye drop residue positions that cross the folded free edge, it is possible to distinguish the residue trajectory formed by interlayer back-release from ordinary surface residue.
[0008] 3. By mapping the back-release trajectory of the crack edge folding interlayer to the registered residual detection image, the residual response values of the eye drops at the corresponding positions are extracted and accumulated one by one, and then compared with the cleaning verification limit corresponding to the target eye drops. This can directly form the judgment result of cleaning failure or no cleaning failure, reducing the risk of misjudging the qualification due to the obscuring of interlayer residue. Attached Figure Description
[0009] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a functional block diagram of an eye drop preparation pipeline cleaning failure determination system provided in an embodiment of the present invention. Detailed Implementation
[0010] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0011] This embodiment provides a system for determining the failure of an eye drop preparation pipeline cleaning process. (See also...) Figure 1 ,include: In an embodiment of the present invention, the acquisition of residual detection images of the PTFE wetted surface and the diaphragm image includes: The PTFE wetted surface is the diaphragm surface of the target double-layer diaphragm valve, made of polytetrafluoroethylene material, that directly contacts the eye drops. Its range covers the area of the target double-layer diaphragm valve that comes into contact with the eye drops during opening and closing and may have residual eye drops adhering to it. It is the object of acquisition for forming diaphragm images and residue detection images. The residue detection image is two-dimensional detection data generated by the residue detection unit for the PTFE wetted surface of each valve position after the eye drop dispensing pipeline has been cleaned. The spatial position in the data corresponds to the residual eye drop response value, used to identify eye drop residue that still exists after cleaning. The diaphragm image is two-dimensional pixel data generated by the image acquisition unit for the PTFE wetted surface of each valve position during the acquisition stage before the eye drop dispensing pipeline is cleaned. The pixels are arranged according to the valve position and maintain a correspondence between the pixel position and the PTFE wetted surface position, used for subsequent image registration and extraction of the crack retraction position.
[0012] Obtain the target double-layer diaphragm valve in the eye drop preparation pipeline; wherein, the target double-layer diaphragm valve includes a PTFE liquid contact surface and an EPDM back layer, and the PTFE liquid contact surface has a cracked edge fold; The eye drop preparation pipeline is a closed delivery channel that supplies liquid flow during the eye drop preparation process and allows the liquid to pass sequentially through the connected valves. Its interior is in contact with the eye drops and is used as a cleaning medium during cleaning. The target double-diaphragm valve is a valve in the eye drop preparation pipeline that uses the displacement of the double-diaphragm to change the pipeline's on / off state. The layer facing inwards is the PTFE inlet surface, and the layer facing away from the pipeline is the EPDM back layer, which is the object of image acquisition and residue detection in this solution. The EPDM back layer is an elastic support layer made of EPDM rubber and attached to the back of the PTFE inlet surface. It is used to withstand the opening and closing action applied by the valve actuator and to drive the PTFE inlet surface to change position. The cracked edge flap is a flap-shaped part of the PTFE inlet surface that is close to the crack edge and continuously connected to the PTFE inlet surface. Its position changes at different valve positions of the target double-diaphragm valve, forming an interlayer space that may trap eye drop residue.
[0013] According to the actual contact path of the eye drops in the eye drop preparation pipeline, each valve installed in the eye drop preparation pipeline is checked. The side of the valve that contacts the eye drops is checked against the PTFE contact surface and the EPDM back layer on the back side of the valve, respectively. The edge of the PTFE contact surface is checked to confirm the presence of a cracked edge flap that folds back with the valve opening and closing and is continuously connected to the PTFE contact surface. Only double-layer diaphragm valves that have a PTFE contact surface, an EPDM back layer and a cracked edge flap are included in the subsequent data collection, thereby obtaining the target double-layer diaphragm valve in the eye drop preparation pipeline.
[0014] A smart sensor is installed at the corresponding position of the target double-layer diaphragm valve. The smart sensor includes an image acquisition unit and a residue detection unit. The corresponding position of the target double-layer diaphragm valve is a position fixed relative to the target double-layer diaphragm valve, ensuring that the PTFE contact surface and the cracked edge fold are within the acquisition range at each valve position of the target double-layer diaphragm valve. This position is used to maintain consistency between the image acquisition direction and the residual detection direction at different valve positions. The intelligent sensor is a detection component set at the corresponding position of the target double-layer diaphragm valve to perform image acquisition and eye drop residue detection on the PTFE contact surface. It consists of an image acquisition unit and a residue detection unit. The image acquisition unit is arranged facing the PTFE contact surface and converts the spatial appearance of the PTFE contact surface and the cracked edge fold into two-dimensional pixel data, used to form the diaphragm image at each valve position. The residue detection unit is arranged facing the same PTFE contact surface and converts the spatial position and corresponding response intensity of the eye drop residue after cleaning into two-dimensional detection data, used to form the residue detection image at each valve position.
[0015] The setting condition is that the PTFE contact surface and the cracked edge folding plate are always within the acquisition range when the target double-layer diaphragm valve moves from the closed position to the open position. The acquisition direction of the image acquisition unit is oriented towards the PTFE contact surface, and the detection direction of the residue detection unit is oriented towards the same PTFE contact surface. The image acquisition unit and the residue detection unit are fixed in a position relative to the target double-layer diaphragm valve that does not change with the valve position, so that the spatial acquisition range of the image acquisition unit and the residue detection unit covers the same PTFE contact surface area, thus completing the setting of intelligent sensors at the corresponding positions of the target double-layer diaphragm valve.
[0016] The control target double-diaphragm valve is moved sequentially from the closed position to the open position to multiple valve positions; The closed position is the endpoint of the stroke where the PTFE contact surface is located when the target double-layer diaphragm valve blocks the eye drop dispensing line, and serves as the starting position for multiple valve positions. The open position is the other endpoint of the stroke where the PTFE contact surface is located when the target double-layer diaphragm valve releases the blockage of the eye drop dispensing line, and serves as the ending position for multiple valve positions. The multiple valve positions are the multiple stroke positions that the actuator of the target double-layer diaphragm valve can reach and maintain in the closed position, the open position, and in between. The valve positions are arranged in order from the closed position to the open position, which is used to establish the correspondence between the PTFE contact surface morphology and the diaphragm image and the residual detection image.
[0017] The actuator of the target double-layer diaphragm valve provides a valve position control sequence corresponding to the valve stroke. The valve position control sequence starts from the closed position and ends at the open position, and includes intermediate valve positions that the actuator can reach and maintain respectively. The controller sends valve position control commands to the actuator item by item according to the valve position control sequence. The actuator drives the target double-layer diaphragm valve to move in the opening direction, and maintains the target double-layer diaphragm valve when the valve position feedback is consistent with the current valve position control command, until the target double-layer diaphragm valve moves from the closed position to the open position to multiple valve positions in sequence.
[0018] The image acquisition unit of the intelligent sensor acquires an image of the PTFE liquid contact surface at each valve position, and uses the acquired image of the PTFE liquid contact surface as the diaphragm image of the corresponding valve position. The image acquisition unit uses its acquisition direction and acquisition range after being fixed in the corresponding position. When the valve position feedback of the target double-layer diaphragm valve is consistent with the current valve position and the PTFE liquid surface stops moving, it acquires two-dimensional pixel data covering the PTFE liquid surface and the crack fold. It establishes a correspondence between the two-dimensional pixel data and the current valve position, so that the same pixel coordinate adopts the same image coordinate direction and arrangement in each acquisition. The acquired image of the PTFE liquid surface is used as the diaphragm image of the corresponding valve position.
[0019] After cleaning the eye drop preparation pipeline, the target double-diaphragm valve is controlled to move sequentially to the corresponding valve position through the residual detection unit of the intelligent sensor, according to the arrangement of multiple valve positions, and residual detection images of the PTFE contact surface are collected at each valve position.
[0020] Cleaning the eye drop preparation pipeline is a process in which the cleaning medium flows along the liquid contact path of the eye drop preparation pipeline and carries away the eye drop residue. The completion status is issued by the cleaning control process of the eye drop preparation pipeline at the end of the predetermined cleaning process, which triggers the residue detection unit to start collecting residue detection images in the order of multiple valve positions.
[0021] After the cleaning control process of the eye drop preparation pipeline issues a cleaning completion status, the residual detection unit uses the spatial acquisition range determined by the image acquisition unit. The controller sends valve position control commands to the actuator of the target double-layer diaphragm valve one by one according to the arrangement of multiple valve positions. When the feedback position of each valve position is consistent with the corresponding valve position and the PTFE contact surface stops moving, the residual detection unit acquires the spatial position covering the PTFE contact surface and the cracked edge fold and the residual response value of the eye drop, and keeps the spatial position corresponding to the pixel position of the residual detection image. The residual detection image of the PTFE contact surface is acquired at each valve position.
[0022] In an embodiment of the present invention, constructing an initial particle swarm includes: The initial particle swarm is a collection of multiple particles established for the diaphragm image to be registered. Each particle contains a set of coordinate transformation parameters and the initial velocity and initial position corresponding to each coordinate transformation parameter field. Different particles represent different candidate coordinate transformation relationships between the diaphragm image to be registered and the reference diaphragm image. These are used to determine the coordinate transformation parameters that minimize the cumulative distance between the fixed structure positions through subsequent iterations. A particle is a single candidate data object in the initial particle swarm. Its fields record the coordinate transformation parameters, initial velocity, and initial position in a unified order, and the position and velocity are updated during the iteration process.
[0023] One diaphragm image is selected from multiple diaphragm images as the reference diaphragm image, and the remaining diaphragm images are used as diaphragm images to be registered. The reference diaphragm image is selected from multiple diaphragm images and used to establish a unified image coordinate reference. Its pixel coordinate direction and the range of the PTFE liquid contact surface serve as a reference for the position registration of the other diaphragm images. The diaphragm images to be registered are the diaphragm images other than the reference diaphragm image from the multiple diaphragm images. They correspond to different valve positions, and coordinate transformation is used to align the same structural parts in the target double-layer diaphragm valve with the same structural parts in the reference diaphragm image.
[0024] Based on the valve position associated with each of the multiple diaphragm images, the diaphragm image acquired when the target double-layer diaphragm valve is in the closed position and the PTFE contact surface is completely within the acquisition range is selected as the reference diaphragm image. Diaphragm images other than the reference diaphragm image that have the PTFE contact surface completely within the same acquisition range are included in the registration process one by one. When the PTFE contact surface in any diaphragm image is not completely within the acquisition range, the corresponding valve position is returned to re-acquire the image, and the remaining diaphragm images are used as diaphragm images to be registered.
[0025] The coordinate transformation parameters of the diaphragm image to be registered relative to the reference diaphragm image are used as particles; The coordinate transformation parameters of the diaphragm image to be registered relative to the reference diaphragm image are a set of numerical fields that map the pixel coordinates of the diaphragm image to the coordinate system of the reference diaphragm image. These fields include linear transformation coefficients, cross transformation coefficients, and horizontal and vertical translations acting on the horizontal and vertical coordinates. The fields are arranged in a fixed order and together define the position, orientation, and scale transformation of the diaphragm image to be registered.
[0026] For each diaphragm image to be registered, multiple sets of candidate coordinate transformation relationships are established. Each set of candidate coordinate transformation relationships uses the linear transformation coefficients of the horizontal coordinate, the linear transformation coefficients of the vertical coordinate, the cross transformation coefficients of the horizontal coordinate, the cross transformation coefficients of the vertical coordinate, the horizontal translation amount, and the vertical translation amount to represent the mapping from the coordinates of the diaphragm image to the coordinates of the reference diaphragm image. All the values that make up each set of candidate coordinate transformation relationships are combined in a fixed field order to form the coordinate transformation parameters of the diaphragm image to be registered relative to the reference diaphragm image. The coordinate transformation parameters of the diaphragm image to be registered relative to the reference diaphragm image are used as particles.
[0027] The initial velocity of the particle is determined based on the search range of the coordinate transformation parameters; The search range of the coordinate transformation parameters is defined by the lower and upper limits of each coordinate transformation parameter field, which are jointly limited by the size of the diaphragm image to be registered, the size of the reference diaphragm image, and the spatial range that the PTFE contact surface in the two images can correspond to. This limit is used to constrain the initial position and iterative update position of the particles. The initial velocity of the particles is the initial change of each coordinate transformation parameter field in one iteration when the particles enter the initial particle swarm. The field order is consistent with the coordinate transformation parameters and is constrained by the search range of the corresponding fields.
[0028] Obtain the lower and upper limits of the search range for each coordinate transformation parameter field. Set the initial velocity of each field of the particle to 0. Use the search span formed by subtracting the lower limit from the upper limit of the search range to limit the absolute value of the velocity of the corresponding field in subsequent iterations. Keep the velocity of the corresponding field at 0 when the upper limit of the search range is equal to the lower limit of the search range. Stop the construction and recheck the search range of the field when the upper limit of the search range is less than the lower limit of the search range. This determines the initial velocity of the particle.
[0029] The difference between the upper and lower limits of the search range defines the range of values that the coordinate transformation parameters can vary in the corresponding fields. Using 0 as the initial velocity of the particle ensures that the initial position of the particle does not exceed the search range due to velocity changes before entering the iteration, and the subsequent velocity is constrained by the search span. Therefore, the determined values of each field together constitute the initial velocity of the particle.
[0030] The initial position of the particle is determined based on the initial values of the coordinate transformation parameters within the search range; The initial values of the coordinate transformation parameters within the search range are assigned based on the order of the particles in the initial particle swarm, from the lower limit to the upper limit of the search range of each coordinate transformation parameter field. This is used to enable different particles to cover different candidate coordinate transformation relationships. The initial position of the particle is the position data formed by combining all the initial values according to the order of the coordinate transformation parameter fields. This serves as the starting point for the particle to perform fixed structure position coordinate transformation and subsequent iterative updates.
[0031] Obtain the total number of particles from the task parameters for constructing the initial particle swarm. Assign each particle a sequentially increasing particle number starting from 1, according to the order in which they joined the initial particle swarm. When the total number of particles is less than 1, stop construction and obtain the total number of particles again. For each coordinate transformation parameter field, subtract the lower limit of the search range from the upper limit of the search range to form the search span. When the total number of particles is equal to 1, divide the lower limit of the search range plus the search span by 2 to form the initial value of the field. When the total number of particles is greater than 1, subtract 1 from the particle number and divide by the total number of particles minus 1 to form the allocation ratio. Then, multiply the lower limit of the search range plus the search span by the allocation ratio to form the initial value of the field. Combine the initial values of each field according to the order of the coordinate transformation parameter fields to determine the initial position of the particles.
[0032] The search span formed by subtracting the lower limit from the upper limit of the search range represents the complete range that the coordinate transformation parameter field can be allocated to. The initial values are distributed between the lower and upper limits of the search range according to the allocation ratio formed by the particle number. This ensures that each initial value does not exceed the search range and that different particles correspond to different candidate coordinate transformation relationships. Therefore, the initial position of the particle can be determined by combining the initial values of each field.
[0033] Construct an initial particle swarm based on the initial velocity and initial position of the particles.
[0034] Following the order of particle number increasing from 1 to the total number of particles, a field correspondence is established between the initial velocity of each particle and the initial position of the same particle. All particles with complete coordinate transformation parameter fields, initial velocity, and initial position are collected in the same data set corresponding to the diaphragm image to be registered. If a particle is missing any field, the corresponding step is returned to complete the field. An initial particle swarm is constructed based on the initial velocity and initial position of the particles.
[0035] In an embodiment of the present invention, obtaining the particle swarm after the iteration includes: The particle swarm after the iteration is the set of particles after the initial particle swarm has undergone fixed structure position coordinate transformation, distance accumulation, optimal position selection, and particle velocity and position update to reach the iteration termination condition. It retains the updated position, update velocity, individual optimal position and global optimal position of each particle, which are used to determine the coordinate transformation parameters corresponding to the diaphragm image to be registered.
[0036] Extract multiple fixed structural positions of the same structural part in the target double-layer diaphragm valve from the reference diaphragm image and each diaphragm image to be registered; The identical structural parts in the target double-layer diaphragm valve are the same valve parts that are visible in both the reference diaphragm image and each diaphragm image to be registered, and whose structural morphology does not change with the valve position. These parts are used to establish positional correspondence between different diaphragm images. Multiple fixed structural positions are multiple pixel coordinates extracted from the boundary turning points or boundary intersections of the identical structural parts. Each pixel coordinate corresponds to the same location and the same sequence number in both the reference diaphragm image and each diaphragm image to be registered. These coordinates are used to evaluate the degree of registration of the coordinate transformation parameters with the image position.
[0037] It should be noted that the aforementioned fixed structural positions are not located on the PTFE contact surface body that stretches, bends, and deforms with the opening and closing of the valve. Instead, they are selected from structural parts of the target double-layer diaphragm valve that remain stationary relative to the image acquisition position and do not move with diaphragm deformation. These include, for example, the inner edge of the valve body, the diaphragm clamping boundary, the valve seat outline, or rigid boundary positions outside the connection with the diaphragm. The corresponding positions of these structural parts in the reference diaphragm image and the diaphragm image to be registered are used as the fixed structural positions. Since these structural parts are rigid installation structures of the target double-layer diaphragm valve, their spatial positions do not change with the local bending of the PTFE contact surface. Therefore, they can be used as a reference for coordinate registration between diaphragm images of different valve positions. By comparing the positional relationship between the fixed structural positions in the diaphragm image to be registered after coordinate transformation and the fixed structural positions of the same structural parts in the reference diaphragm image, the coordinate transformation parameters corresponding to the diaphragm image to be registered are determined, thereby avoiding the mistaken use of the deformed part of the PTFE contact surface as the registration reference.
[0038] Using the image coordinate direction and pixel arrangement of the reference diaphragm image as a unified coordinate reference, the pixel positions where the boundary direction changes or multiple boundaries intersect are extracted along the structural boundary of the target double-layer diaphragm valve that does not change with the valve position in the reference diaphragm image. Then, in each diaphragm image to be registered, the structural positions corresponding to each pixel position are found according to the same structural contour and the same boundary connection order. Only the positions that can be found in both the reference diaphragm image and all the diaphragm images to be registered are retained. Finally, multiple fixed structural positions of the same structural part in the target double-layer diaphragm valve are extracted from the reference diaphragm image and each diaphragm image to be registered.
[0039] Based on the coordinate transformation parameters corresponding to the particles, the coordinate transformation is performed on the fixed structure position in the diaphragm image to be registered to obtain the transformed fixed structure position. The transformed fixed structure position is the pixel coordinate formed by mapping the fixed structure position in the diaphragm image to the coordinate system of the reference diaphragm image according to the coordinate transformation parameters corresponding to the current particle. It maintains the same position and the same sequence number correspondence with the original fixed structure position and is used to calculate the distance with the fixed structure position of the same structural part in the reference diaphragm image.
[0040] For each fixed structural position in the image to be registered, obtain the x-coordinate and y-coordinate sequentially. From the coordinate transformation parameters corresponding to the current particle, obtain the x-coordinate linear transformation coefficient, y-coordinate linear transformation coefficient, x-coordinate cross transformation coefficient, y-coordinate cross transformation coefficient, lateral translation amount, and longitudinal translation amount in the field order. Multiply the x-coordinate of the fixed structural position by the x-coordinate linear transformation coefficient, multiply the y-coordinate of the fixed structural position by the x-coordinate cross transformation coefficient, and add the two products to the lateral translation amount to form the transformed x-coordinate. Multiply the y-coordinate of the fixed structural position by the y-coordinate linear transformation coefficient, multiply the x-coordinate of the fixed structural position by the y-coordinate cross transformation coefficient, and add the two products to the longitudinal translation amount to form the transformed y-coordinate. Combine the transformed x-coordinate and transformed y-coordinate according to the corresponding order of the original fixed structural positions to obtain the transformed fixed structural position.
[0041] The linear transformation coefficients of the horizontal and vertical axes, along with the two cross transformation coefficients, together map the position of the fixed structure in the diaphragm image to be registered to the coordinate direction and scale of the reference diaphragm image. The horizontal and vertical translations further correspond to the spatial offset between the two images. Therefore, the position formed by the combined transformation of the horizontal and vertical axes is the position of the fixed structure after the transformation.
[0042] Calculate the distance between the fixed structure position after transformation and the fixed structure position of the same structural part in the reference diaphragm image, and accumulate multiple distances to obtain the fitness of each particle; The distance between the transformed fixed structure position and the fixed structure position of the same structural part in the reference diaphragm image is the linear interval of their pixel coordinates in the coordinate system of the reference diaphragm image. It is used to represent the degree of deviation of a single corresponding position after coordinate transformation. The fitness of a particle is the cumulative value of the distance between all the transformed fixed structure positions corresponding to the current particle and the fixed structure positions of the same structural parts in the reference diaphragm image. The closer the value is to 0, the closer the coordinate transformation parameters of the current particle make the positions of the same structural parts closer. It is used to determine the individual optimal position and the global optimal position.
[0043] Based on the same structural location and the same sequence number, each transformed fixed structural position is paired with the fixed structural position of the same structural location in the reference diaphragm image to form a corresponding position. For each corresponding position, the x-coordinate difference is obtained by subtracting the x-coordinate of the transformed fixed structural position from the x-coordinate of the fixed structural position in the reference diaphragm image, and the y-coordinate difference is obtained by subtracting the y-coordinate of the transformed fixed structural position from the y-coordinate of the fixed structural position in the reference diaphragm image. The product of multiplying the x-coordinate difference by itself and the product of multiplying the y-coordinate difference by itself are added together, and the square root of the sum is taken to obtain the distance between the transformed fixed structural position and the fixed structural position of the same structural location in the reference diaphragm image. Then, starting from 0, multiple distances are added one by one according to the sequence number of the corresponding positions. When any fixed structural position is missing, the fixed structural position extraction step is returned to fill in the corresponding position. When the number of multiple distances is 0, the current iteration is stopped and the fixed structural positions are extracted again. The multiple distances are accumulated to obtain the fitness of each particle.
[0044] The difference between the horizontal and vertical coordinates represents the offset of the corresponding position in the two coordinate directions. The square root of the sum of the squares of the two differences can form the straight-line distance under the same coordinate reference. The cumulative distance of all corresponding positions of the same structural parts can simultaneously reflect the registration deviation of the current particle to each fixed structural position. Therefore, the cumulative value can be used as the fitness of each particle.
[0045] Based on the fitness of each particle, determine the optimal position of the individual particle and the optimal position of the global particle; The individual optimal position is the position with the smallest fitness value among all positions experienced by the same particle from the initial iteration to the current iteration, and is used to guide the subsequent updates of that particle; the global optimal position is the position with the smallest fitness value among the individual optimal positions of all particles, and is used to guide the subsequent updates of all particles with the candidate coordinate transformation relationship with the smallest current registration deviation of the particle swarm.
[0046] Using the fitness of each particle as unified comparison data, for each particle, the fitness of the particle in the current iteration is compared item by item with the fitness of each particle in each iteration from the initial iteration to the current iteration. The initial position or the position after iteration update corresponding to the fitness of the particle with the smallest value is selected as the individual optimal position of that particle. When the values are equal, the position with the earlier iteration order is retained. Then, the fitness of the particles corresponding to the individual optimal positions of all particles is compared item by item. The individual optimal position corresponding to the fitness of the particle with the smallest value is selected as the global optimal position. When the values are equal, the individual optimal position with the earlier particle number is retained. Based on the fitness of each particle, the individual optimal position and the global optimal position are determined.
[0047] The fitness of a particle is the cumulative value of the distances to all corresponding fixed structural positions. The position with the smallest fitness value corresponds to the smallest cumulative deviation of the same structural part. Selecting the optimal position of an individual particle based on the fitness of all particles in previous tests can determine the optimal position of the entire particle. Then, selecting the optimal position of the global particle based on the fitness of the particles corresponding to the optimal positions of all individual particles can determine the optimal position of the entire particle.
[0048] The initial particle swarm is iteratively updated based on the individual optimal position and the global optimal position to obtain the particle swarm after the iteration.
[0049] The iterative update of the initial particle swarm involves repeatedly adjusting the velocity and position of each particle according to the iteration sequence, and then using the adjusted positions to perform fixed structure position coordinate transformation, distance accumulation, and selection of individual optimal positions and global optimal positions. The termination condition is that the current iteration sequence reaches the maximum number of iterations recorded in the iteration task parameters.
[0050] The system retrieves the current position and velocity of each particle in the initial particle swarm according to its particle number. It also retrieves the current iteration number and maximum iteration count from the iteration task parameters. When the maximum iteration count is less than 1, iteration stops and the maximum iteration count is retrieved again. The inertia ratio is calculated by subtracting the current iteration number from the maximum iteration count and then dividing by the maximum iteration count. For each coordinate transformation parameter field, the individual position difference is calculated by subtracting the particle's current position from the individual optimal position, and the global position difference is calculated by subtracting the particle's current position from the global optimal position. The update velocity is then calculated by multiplying the current velocity by the inertia ratio, summing the individual position difference, and the global position difference. When the absolute value of the update velocity exceeds the search span of the corresponding field, the update velocity is adjusted according to its positive or negative direction. The search span of each field is used to determine the updated position. The current position of the particle is then added to the update speed to form the updated position. If the updated position is less than the lower limit of the search range, the lower limit of the search range is used; if the updated position is greater than the upper limit of the search range, the upper limit of the search range is used. The coordinate transformation, distance accumulation, and determination of individual optimal position and global optimal position of the fixed structure position are re-executed using the updated positions of each field. When the current iteration number is less than the maximum number of iterations, the updated positions and update speeds of each field are used for the next iteration. When the current iteration number is equal to the maximum number of iterations, the updated positions, update speeds, individual optimal positions, and global optimal positions of all particles are collected. Based on the individual optimal positions and global optimal positions, the initial particle swarm is iteratively updated to obtain the particle swarm after the iteration ends.
[0051] The product of the current velocity and the inertia ratio preserves the particle's existing search direction. The individual position difference brings the particle's position closer to the position with the smallest cumulative deviation over all iterations. The global position difference brings the particle's position closer to the position with the smallest cumulative deviation of all particles. The search span and search range work together to prevent the update velocity and update position from going out of bounds. The update position is repeatedly used to evaluate the particle's fitness until the maximum number of iterations is reached, which can form a particle swarm after the iteration ends.
[0052] In an embodiment of the present invention, obtaining a registered residual detection image includes: The registered residual detection image is a two-dimensional detection data formed by mapping the residual detection images collected at each valve position to the coordinate system of the reference diaphragm image according to the coordinate transformation parameters corresponding to the diaphragm image of the same valve position. Its number of rows and columns, pixel coordinate direction and the location of the PTFE liquid contact surface are all corresponding to the reference diaphragm image. Each pixel retains the residual response value of the eye drops collected by the residual detection unit and is used to extract the location of residual eye drops in the folded-back area.
[0053] Based on the particle swarm after the iteration, determine the coordinate transformation parameters corresponding to the diaphragm image to be registered; For each diaphragm image to be registered, the particles in the particle swarm corresponding to that image after iteration are arranged in ascending order of fitness. If the fitness is equal, they are arranged in ascending order of particle number. Starting with the first particle, the linear transformation coefficients of the horizontal and vertical coordinates, the cross transformation coefficients of the horizontal and vertical coordinates, the horizontal translation, and the vertical translation are obtained sequentially. The linear transformation coefficients of the horizontal and vertical coordinates are multiplied to form the first coefficient product, and the cross transformation coefficients of the horizontal and vertical coordinates are multiplied to form the second coefficient product. The second coefficient product is then subtracted from the first coefficient product. The product of the numbers forms the coordinate transformation determinant. When the coordinate transformation determinant is equal to 0, the current particle is discarded and the next particle in the arrangement is processed. When the coordinate transformation determinant is not equal to 0, each field is checked to ensure that it is between the lower limit and the upper limit of the search range of the corresponding field. When any field is missing or exceeds the search range of the corresponding field, the current particle is discarded and the next particle in the arrangement is processed. The positions of the particles whose first coordinate transformation determinant is not equal to 0 and whose fields are all within the search range of the corresponding fields are combined according to a fixed field order. When no corresponding particle is found, the initial particle swarm iteration update step is returned. Based on the particle swarm after the iteration, the coordinate transformation parameters corresponding to the diaphragm image to be registered are determined.
[0054] The fitness of a particle is the cumulative distance between multiple fixed structural positions in the same structural part after coordinate transformation. Processing particles according to their fitness from small to large can preferentially retain the particle position with the smallest cumulative deviation value. The coordinate transformation determinant is not equal to 0, so the coordinate transformation relationship can be reversed to obtain the pixel coordinates in the diaphragm image to be registered. The search range check excludes particle positions that exceed the allowed value range of the coordinate transformation parameters. Therefore, the first particle position that passes all checks can determine the coordinate transformation parameters corresponding to the diaphragm image to be registered.
[0055] Based on the coordinate transformation parameters corresponding to the diaphragm image to be registered, position registration is performed on the diaphragm image to be registered to obtain the registered diaphragm image. Position registration is a process of establishing a target pixel grid based on the number of rows and columns and the direction of pixel coordinates of the reference diaphragm image, and using the coordinate transformation parameters corresponding to the diaphragm image to be registered to determine the pixel position of the diaphragm image to be registered in reverse for each pixel position in the target pixel grid. The registered diaphragm image is two-dimensional pixel data formed according to position registration. The fixed structure position of the same structural part in the target double-layer diaphragm valve and the corresponding fixed structure position in the reference diaphragm image use the same pixel coordinate reference, which is used for subsequent extraction of the crack fold back piece, fold back connecting edge and fold back free edge.
[0056] A target diaphragm pixel grid is established based on the row, column, and pixel coordinate orientation of the reference diaphragm image. For each target pixel position in the target diaphragm pixel grid, the target x-coordinate and target y-coordinate are obtained. The x-coordinate is subtracted from the lateral translation amount to form the lateral de-translation coordinate, and the y-coordinate is subtracted from the longitudinal translation amount to form the longitudinal de-translation coordinate. The product of the y-coordinate linear transformation coefficient and the lateral de-translation coordinate is subtracted from the product of the x-coordinate cross-transform coefficient and the longitudinal de-translation coordinate to form the source x-coordinate numerator. The product of the x-coordinate linear transformation coefficient and the longitudinal de-translation coordinate is subtracted from the product of the y-coordinate cross-transform coefficient and the lateral de-translation coordinate to form the source y-coordinate numerator. The source x-coordinate... The source x-coordinate is formed by dividing the numerator of the target x-coordinate by the coordinate transformation determinant. The source y-coordinate is formed by dividing the numerator of the source y-coordinate by the coordinate transformation determinant. The source x-coordinate and source y-coordinate are respectively taken as the integers with the smallest distance from the corresponding coordinate values to form the source pixel positions. When the source pixel position is within the row and column range of the diaphragm image to be registered, the pixel data of the source pixel position is written to the current target pixel position. When the source pixel position is outside the row and column range of the diaphragm image to be registered, a no-valid-pixel marker is written to the current target pixel position. All pixel data and the no-valid-pixel marker are combined according to the row and column order of the target pixel position. Based on the coordinate transformation parameters corresponding to the diaphragm image to be registered, the position of the diaphragm image to be registered is performed to obtain the registered diaphragm image.
[0057] Subtracting the corresponding translation amount from the target x-coordinate and target y-coordinate can eliminate the translation part in the coordinate transformation. Dividing the source x-coordinate numerator and source y-coordinate numerator by the coordinate transformation determinant that is not equal to 0 can reversely determine the source position of the target pixel in the diaphragm image to be registered. Integer values make the source position correspond to the actual pixel and exclude data outside the image by judging the row and column range. The pixel data obtained by combining the target pixel position and the no valid pixel marker can obtain the registered diaphragm image.
[0058] Based on the registered diaphragm image, the registered residual detection image is obtained.
[0059] Based on the valve position corresponding to each registered diaphragm image, the residual detection images acquired at the same valve position are located. The residual detection images for the valve position where the reference diaphragm image is located are arranged according to the row and column order of the reference diaphragm image. For the residual detection images of other valve positions, the coordinate transformation parameters used when forming the registered diaphragm image for the same valve position are applied to establish a target residual detection pixel grid with the same number of rows, columns, and pixel coordinate directions as the reference diaphragm image. For each target pixel position in the target residual detection pixel grid, the target abscissa and target ordinate are obtained. The abscissa is subtracted from the lateral translation amount to form the residual detection lateral de-translation coordinate, and the ordinate is subtracted from the ordinate from the longitudinal translation amount to form the residual detection longitudinal de-translation coordinate. The product of the ordinate linear transformation coefficient and the residual detection lateral de-translation coordinate is subtracted from the product of the abscissa cross transformation coefficient and the residual detection longitudinal de-translation coordinate to form the residual detection source abscissa numerator. The abscissa linear transformation coefficient and the residual detection longitudinal de-translation coordinate are then multiplied. The product of multiplying the translation coordinates minus the product of multiplying the ordinate cross-transformation coefficient and the product of multiplying the lateral translation coordinate of the residual detection source forms the ordinate numerator of the residual detection source. The lateral numerator of the residual detection source is divided by the coordinate transformation determinant to form the lateral coordinate of the residual detection source. The ordinate numerator of the residual detection source is divided by the coordinate transformation determinant to form the lateral coordinate of the residual detection source. The residual detection source pixel position is formed by taking the integer with the smallest distance from the corresponding coordinate value for both the lateral and lateral coordinates of the residual detection source. When the residual detection source pixel position is within the row and column range of the residual detection image of the same valve position, the residual response value of the eye drops at the residual detection source pixel position is written to the current target pixel position. When the residual detection source pixel position is outside the row and column range of the residual detection image of the same valve position, a no valid residual response mark is written to the current target pixel position. The residual response value of the eye drops is kept to correspond with the registered diaphragm image pixel at the same target pixel position. Based on the registered diaphragm image, the registered residual detection image is obtained.
[0060] The diaphragm image and residual detection image of the same valve position are collected by a smart sensor fixed at the corresponding position of the target double-layer diaphragm valve for the same PTFE liquid contact surface spatial state. By using the reverse coordinate relationship when the diaphragm image after registration of the valve position is formed, the same spatial position of the eye drop residual response value can be obtained for each target pixel position in the target residual detection pixel grid. Without adding, subtracting or proportionally transforming the eye drop residual response value, the target residual detection pixel grid can form a registered residual detection image.
[0061] In embodiments of the present invention, obtaining the free edge position includes: The free edge position is the boundary pixel coordinate with the smallest straight-line distance between the corresponding free edge and the connection position, determined from the corresponding folded free edge for each registered diaphragm image and each connection position on the folded connection edge. It adopts the reference diaphragm image coordinate system and is associated with the connection position number and valve position at the same time. It is used to connect the corresponding free edge positions under multiple valve positions according to the connection position number.
[0062] Define the crack edge fold corresponding to the PTFE inlet surface; Using the registered diaphragm images corresponding to multiple valve positions as the processing object, in each registered diaphragm image, a sheet-like region that maintains continuous material connection with the PTFE inlet surface is identified along the crack boundary of the PTFE inlet surface. The sheet-like regions of multiple valve positions are positioned according to the coordinate system of the reference diaphragm image. The sheet-like regions that maintain continuous material connection with the PTFE inlet surface at each valve position and whose boundary away from the continuous material connection changes pixel coordinates with the valve position are retained. The part of the retained sheet-like region that is continuously connected to the PTFE inlet surface is taken as the connecting part of the crack edge folding plate. The part enclosed by the boundary that changes pixel coordinates with the valve position is taken as the folding part of the crack edge folding plate. The connecting part and the folding part of the crack edge folding plate are combined to define the crack edge folding plate corresponding to the PTFE inlet surface.
[0063] Extract the crack edge fold from the registered diaphragm image; For each registered diaphragm image, starting from the connection point between the cracked edge fold and the continuous material of the PTFE contact surface, the process traces pixel by pixel along the outer boundary of the cracked edge fold to the boundary adjacent to the crack on the PTFE contact surface. Then, it traces pixel by pixel back to the continuous material connection point along the boundary adjacent to the crack on the PTFE contact surface and the outer boundary on the other side to form the closed boundary of the cracked edge fold. The process traverses each row covered by the closed boundary of the cracked edge fold according to the pixel row number. The pixels between the leftmost and rightmost boundary pixels of the closed boundary of the cracked edge fold in the same pixel row are merged with the pixels of the closed boundary of the cracked edge fold to form a set of cracked edge fold pixels. If the closed boundary of the cracked edge fold is not closed or there are no paired boundary pixels in the same pixel row, the process returns to the cracked edge fold definition step corresponding to the PTFE contact surface, retains the set of cracked edge fold pixels, and extracts the cracked edge fold from the registered diaphragm image.
[0064] The closed boundary of the crack-edge fold defines the outer contour of the crack-edge fold in the registered diaphragm image. Filling the pixel row from the leftmost boundary pixel to the rightmost boundary pixel can convert the sheet-like region inside the closed boundary into a continuous set of pixels. The closed state and paired boundary pixels are checked to exclude the boundary where the internal range cannot be determined. Therefore, the reserved set of crack-edge fold pixels can be used to extract the crack-edge fold from the registered diaphragm image.
[0065] The edge of the cracked edge that is continuously connected to the PTFE liquid contact surface is defined as the folded connection edge; The folded-back connection edge is a continuous edge in the boundary of the crack edge fold that maintains a continuous material connection with the PTFE wetted surface. Its two ends are located at the junction of the continuous material connection and the crack boundary, and it maintains a connection with the PTFE wetted surface in multiple valve positions. It is used to select multiple connection positions according to the boundary arrangement order.
[0066] Along each registered diaphragm image, the adjacent pixels of the folded edge are checked pixel by pixel. The boundary pixels whose adjacent pixels belong to the PTFE liquid contact surface and there are no crack pixels between the boundary pixels and the PTFE liquid contact surface are included in the candidate pixel set of the connecting edge. The adjacent boundary pixels in the candidate pixel set of the connecting edge are arranged continuously according to the boundary tracking order. When the adjacent pixel changes from the PTFE liquid contact surface pixel to the crack pixel, the current continuous arrangement ends. The edge in the folded edge that is continuously connected to the PTFE liquid contact surface is determined as the folded connecting edge.
[0067] The edge of the folded edge that is adjacent to the crack on the PTFE in-liquid surface but is not connected to the PTFE in-liquid surface is defined as the folded free edge. The crack in the PTFE inlet surface is an open area where the edge of the PTFE inlet surface is interrupted and the crack edge fold can be folded back relative to the PTFE inlet surface. Its boundary is adjacent to the fold-back connecting edge and the fold-back free edge, respectively. The fold-back free edge is a continuous edge in the closed boundary of the crack edge fold facing the PTFE inlet surface that does not maintain a continuous material connection with the PTFE inlet surface. Its pixel coordinates change with the valve position and serve as a candidate boundary for the free edge position.
[0068] In each registered diaphragm image, the boundary pixels included in the folded-back connection edge are excluded from the closed boundary of the crack edge folded-back piece. For the remaining boundary pixels, the adjacent pixels of the boundary pixels are checked one by one. The boundary pixels whose adjacent pixels are located in the crack of the PTFE liquid surface and whose boundary pixels do not have a continuous material connection with the PTFE liquid surface are included in the free edge candidate pixel set. The adjacent boundary pixels in the free edge candidate pixel set are arranged continuously according to the boundary tracking order. The current continuous arrangement ends when the boundary pixel re-forms a continuous material connection with the PTFE liquid surface. The edge of the crack edge folded-back piece that is adjacent to the crack of the PTFE liquid surface and is not connected to the PTFE liquid surface is determined as the folded-back free edge.
[0069] Select multiple connection positions along the folded-back connection edge, and make the shortest connection from each connection position to the corresponding folded-back free edge to obtain the free edge position.
[0070] Multiple connection positions are based on the folded connection edge pixels in the reference diaphragm image and mapped to multiple boundary pixel positions of the folded connection edge in each registered diaphragm image according to the length ratio of the folded connection edge. Each connection position uses the same connection position number to establish a cross-valve position correspondence. The shortest connection is the connection relationship with the smallest linear pixel distance between a single connection position and each boundary pixel position of the folded free edge in the same registered diaphragm image.
[0071] For the reference diaphragm image and each registered diaphragm image, the endpoint with the smallest pixel row number among the two endpoints of the folded-back connecting edge is used as the starting point for arrangement. When the pixel row numbers are equal, the endpoint with the smallest pixel column number is used as the starting point. From the starting point, the folded-back connecting edge pixels are arranged sequentially along the adjacent boundary pixels to the other endpoint, and the total number of folded-back connecting edge pixels in each image is recorded. Each folded-back connecting edge pixel arranged sequentially in the reference diaphragm image is taken as a connecting position and assigned a connecting position number that increases continuously starting from 1. If the total number of folded-back connecting edge pixels in the reference diaphragm image or any registered diaphragm image is less than 2, the process returns to the folded-back connecting edge determination step. For each connecting position number, the product of subtracting 1 from the connecting position number and multiplying it by the total number of folded-back connecting edge pixels in the current registered diaphragm image minus 1 is divided by the total number of folded-back connecting edge pixels in the reference diaphragm image minus 1 to form the connecting edge ratio number. The connecting edge ratio is then calculated. Example sequence number is taken as the smallest integer corresponding to the distance and incremented by 1 to form the current image connection position index. According to the current image connection position index, the connection position of the currently registered diaphragm image is obtained. For each connection position in the currently registered diaphragm image, all boundary pixels of the folded free edge are obtained item by item. The horizontal coordinate difference is formed by subtracting the horizontal coordinate of the folded free edge boundary pixel from the horizontal coordinate of the connection position. The vertical coordinate difference is formed by subtracting the vertical coordinate of the folded free edge boundary pixel from the vertical coordinate of the connection position. The product obtained by multiplying the horizontal coordinate difference by itself and the product obtained by multiplying the vertical coordinate difference by itself are added to form the distance sum of squares. The folded free edge boundary pixel with the smallest distance sum of squares is selected. When the distance sums of squares are equal, the folded free edge boundary pixel with the earlier folded free edge boundary tracking order is selected. The coordinates of the selected folded free edge boundary pixel are combined with the corresponding connection position sequence number and valve position. The shortest connection is made from each connection position to the corresponding folded free edge to obtain the free edge position.
[0072] The ratio of the connection position number to the total number of pixels on the folded connection edge of the reference diaphragm image represents the relative position of the connection position along the length of the folded connection edge. Mapping this ratio to the folded connection edges of each registered diaphragm image allows the same connection position number to be connected across the same relative connection location of the valve position corresponding to the folded edge flap. The sum of the squared difference of the horizontal coordinate and the squared difference of the vertical coordinate changes synchronously with the straight-line distance from the connection position to the pixel of the folded free edge boundary. By selecting the pixel of the folded free edge boundary with the smallest sum of squared distances and associating it with the connection position number and the valve position, the free edge position can be obtained.
[0073] In an embodiment of the present invention, a folded-back and unfolded area is obtained, including: The folded-back area is the set of overlapping pixels between the pixel area swept by the folded-back free edge as it passes through multiple valve positions from the closed position to the open position and the crack exposure corresponding to the PTFE liquid contact surface. It adopts the reference diaphragm image coordinate system and is used to define the area that can be exposed as the folded-back free edge moves within the crack edge folded-back cover space.
[0074] Connect the free edge positions corresponding to the same connection position to obtain the free edge movement trajectory; The free edge movement trajectory is a continuous pixel path formed by connecting free edge positions with the same connection position number according to the arrangement order of multiple valve positions from the closed position to the open position. It records the movement direction and position of the corresponding folded free edge boundary pixel between adjacent valve positions.
[0075] For each connection position number, the free edge positions corresponding to that connection position number are arranged in order from the closed position to the open position among multiple valve positions. For every two adjacent valve positions, the x-coordinate difference of the trajectory is obtained by subtracting the x-coordinate of the preceding free edge position from the x-coordinate of the following free edge position, and the y-coordinate difference of the trajectory is obtained by subtracting the y-coordinate of the preceding free edge position from the y-coordinate of the following free edge position. The absolute values of the trajectory x-coordinate difference and trajectory y-coordinate difference are taken, and the maximum of the two absolute values is determined as the trajectory connection step number. When the trajectory connection step number is equal to 0, the preceding free edge position is retained. When the number of connection steps is greater than 0, the trajectory step number is incremented from 0 to the number of trajectory connection steps. The trajectory x-coordinate is formed by multiplying the difference between the x-coordinates of the first free edge position and the trajectory x-coordinate by the trajectory step number and then dividing by the number of trajectory connection steps. The trajectory y-coordinate is formed by multiplying the difference between the y-coordinates of the first free edge position and the trajectory y-coordinate by the trajectory step number and then dividing by the number of trajectory connection steps. The trajectory x-coordinate and trajectory y-coordinate are then combined to form the trajectory pixel coordinates by taking the smallest integer distance between the corresponding values. All trajectory pixel coordinates are merged according to the valve position order and trajectory step number, and adjacent duplicate coordinates are deleted. The free edge positions corresponding to the same connection position are connected to obtain the free edge movement trajectory.
[0076] The difference between the horizontal and vertical coordinates of the trajectory represents the displacement of the free edge position of adjacent valve positions in two coordinate directions. Taking the maximum value of the two absolute displacements as the trajectory connection step number ensures that the trajectory pixel coordinates of each increment do not cross more than 1 pixel in any coordinate direction. Generating and merging the trajectory pixel coordinates according to the trajectory step number can fill the pixel gap between the free edge positions of discrete valve positions, thus obtaining the free edge movement trajectory.
[0077] Based on the free edge movement trajectory, determine the area traversed by the folded-back free edge as it moves between multiple valve positions; The area traversed by the folded free edge as it moves between multiple valve positions is a pixel set formed by merging the local swept pixel area defined by the positions of the four free edges corresponding to the adjacent valve positions and the adjacent connection position numbers with the entire free edge movement trajectory. It covers the spatial positions traversed by the folded free edge as it moves continuously between discrete valve positions.
[0078] Select every two adjacent valve positions according to valve position order, and then select every two adjacent connection position numbers according to connection position sequence. Connect the free edge positions corresponding to the preceding valve position and the preceding connection position number, the preceding valve position and the following connection position numbers, the following valve positions and the following connection position numbers, and the following valve positions and the preceding connection position numbers to form a local sweep boundary. Obtain the minimum pixel row number within the local sweep boundary. And the maximum value, process each edge of the local sweep boundary row by row from minimum to maximum value according to the pixel row number. For each edge, obtain the edge starting pixel row number, edge starting pixel column number, edge ending pixel row number, and edge ending pixel column number. When the edge starting pixel row number is equal to the edge ending pixel row number and equal to the current pixel row number, add the boundary pixel column number between the edge starting pixel column number and the edge ending pixel column number to the current row boundary column set. When the edge starting pixel row number is not equal to the edge ending pixel row number and the current pixel row number is between the two values, add the boundary pixel column number between the edge starting pixel column number and the edge ending pixel column number to the current row boundary column set. When dealing with the pixel row numbers of each endpoint, the difference between the current pixel row number and the edge starting pixel row number is multiplied by the difference between the edge ending pixel column number and the edge starting pixel column number, and then divided by the difference between the edge ending pixel row number and the edge starting pixel row number. The quotient is then added to the edge starting pixel column number to form the boundary intersection pixel column number. The boundary intersection pixel column number is then added to the current row boundary column set after taking the integer with the smallest distance from the corresponding value. Duplicate values are removed from the pixel column numbers in the current row boundary column set and they are arranged in ascending order. Starting from the first pixel column number, two adjacent pixel column numbers are selected as a group each time, and all pixels between the two pixel column numbers are retained. Pixel column numbers that are not grouped only retain the corresponding boundary pixels. The pixels retained in each pixel row are combined into a local swept pixel region. Then, the local swept pixel regions corresponding to all adjacent valve positions and adjacent connection position numbers are merged with all free edge movement trajectories, and duplicate pixel coordinates are removed. Based on the free edge movement trajectory, the area through which the folded free edge moves between multiple valve positions is determined.
[0079] The four free edge positions corresponding to the adjacent valve positions and adjacent connection position numbers respectively define the two ends of the local folded free edge before and after movement. The local sweep boundary formed by connecting the four free edge positions covers the outer range of the local folded free edge moving between the two valve positions. Retaining the pixels between the intersections of the local sweep boundaries line by line can fill the inner area of the local sweep boundary. Merging all local sweep pixel areas and the free edge movement trajectory can determine the area through which the folded free edge moves between multiple valve positions.
[0080] Define the exposed crack corresponding to the PTFE ingress surface; The exposed crack corresponding to the PTFE ingress surface is the pixel area in each registered diaphragm image that is located within the crack boundary of the PTFE ingress surface and is not covered by the crack edge folding pixel set. It adopts the reference diaphragm image coordinate system and represents the crack space that changes from the covered state to the exposed state when the crack edge folding occurs at different valve positions.
[0081] For each registered diaphragm image, the continuous boundaries and folded free edges on both sides of the interruption point of the PTFE inlet surface are connected pixel by pixel to form the PTFE inlet surface crack closure boundary. According to the pixel row number, each row covered by the PTFE inlet surface crack closure boundary is traversed. The pixels between the leftmost and rightmost boundary pixels of the PTFE inlet surface crack closure boundary in the same pixel row are merged with the PTFE inlet surface crack closure boundary pixels to form the PTFE inlet surface crack pixel set. Pixels that also exist in the same valve position crack edge folded plate pixel set are removed from the PTFE inlet surface crack pixel set. The pixels retained after removing each valve position are merged according to the coordinate system of the reference diaphragm image and duplicate pixels are deleted to define the crack exposure corresponding to the PTFE inlet surface.
[0082] The closed boundary of the PTFE ingress crack defines the pixel range of the crack in the registered diaphragm image. Filling the pixels between the leftmost and rightmost boundary pixels row by row can form the PTFE ingress crack pixel set. Removing the crack edge fold pixel set from the PTFE ingress crack pixel set can exclude the positions still covered by the crack edge fold. Merging the pixels retained by each valve position can define the crack exposure corresponding to the PTFE ingress surface.
[0083] Based on the exposed crack, the overlapping areas of the free edge that moves between multiple valve positions are extracted to obtain the folded-back area.
[0084] Overlap extraction is a set of pixel coordinates in the same reference diaphragm image coordinate system that converts the exposed crack and the folded free edge of the PTFE liquid contact surface into the area that moves between multiple valve positions. It also retains only the pixel coordinates that exist in two pixel coordinate sets at the same time.
[0085] The pixel coordinates of the cracks exposed at the PTFE inlet surface are used to create a crack exposure coordinate set based on the pixel row and column numbers. The pixel coordinates of the areas through which the folded free edge moves between multiple valve positions are used to create a movement area coordinate set based on the same pixel row and column numbers. The pixel coordinates in the movement area coordinate set are traversed item by item. If the current pixel coordinate exists in the crack exposure coordinate set, it is added to the overlapping pixel coordinate set. If the current pixel coordinate does not exist in the crack exposure coordinate set, it is not added to the overlapping pixel coordinate set. After the traversal, all pixel coordinates in the overlapping pixel coordinate set are arranged according to the pixel row and column numbers. Based on the crack exposure, the overlapping areas through which the folded free edge moves between multiple valve positions are extracted to obtain the folded overturned area.
[0086] The set of coordinates of the moving area defines the pixel positions that the folded free edge actually sweeps. The set of coordinates of the crack exposure defines the pixel positions of the crack on the PTFE liquid surface that are not covered by the crack edge folding plate at at least one valve position. Only adding the pixel coordinates that exist in both sets to the overlapping pixel coordinate set can exclude positions that have not been swept by the folded free edge or where the crack has not been exposed. Therefore, the overlapping pixel coordinate set can form a folded overturning area.
[0087] In an embodiment of the present invention, the back-release trajectory of the crack edge reversal interlayer is obtained, including: The back-release trajectory of the crack edge folded interlayer is the path data formed by connecting the residual positions of eye drops in the folded-back peeling area in the residual detection images after registration of multiple valve positions, which continuously cross the folded free edge from the folded-back covered side to enter the crack exposed side. It adopts the reference diaphragm image coordinate system and records the correspondence of the eye drops residual extending from the crack edge folded-back covered space to the crack exposed space with valve position, pixel row number, pixel column number and connection order. It is used to map and extract the corresponding eye drops residual response value.
[0088] Extract the location of residual eye drops within the folded-back area from the registered residual detection image; The location of residual eye drops is the pixel coordinate in the registered residual detection image that is located within the folded-back area, has a residual eye drop response value within the residual eye drop response encoding range of the residual detection unit, is not equal to the zero response code, and has no valid residual response marker. It is associated with the corresponding valve position and the residual eye drop response value, and is used to determine whether the residual eye drops have crossed the folded free edge from the folded-back cover side and entered the exposed side of the crack.
[0089] Using the registered residual detection images of each valve position, the folded-back area represented by the reference diaphragm image coordinate system, and the residual response code range, zero response code, and no valid residual response marker provided by the residual detection unit along with the detection data as input, the registered residual detection images are processed frame by frame according to the arrangement order of multiple valve positions from the closed position to the open position. Each pixel coordinate of the folded-back area is mapped to a pixel position in the currently registered residual detection image that has the same pixel row number and pixel column number. The pixel coordinate must be within the row and column range of the currently registered residual detection image, and the corresponding residual response value of the eye drop must be within the residual response code range of the eye drop and not equal to the zero response code or no valid residual response marker. When marking effective residual response, add pixel coordinates, corresponding valve position, and eye drop residual response value to the residual location candidate set. If the pixel coordinates are outside the row and column range of the currently registered residual detection image, return to the fold-back and peel-off area determination step to check the coordinate reference. If the eye drop residual response value is not within the eye drop residual response coding range, is equal to zero response coding, or has no effective residual response mark, do not add it to the residual location candidate set. Arrange the residual location candidate set according to valve position, pixel row number, and pixel column number, and delete duplicate items where both valve position and pixel coordinates are the same. If the residual location candidate set does not contain any items, keep the empty set. Extract the eye drop residual location located in the fold-back and peel-off area from the registered residual detection image.
[0090] Using the free edge of the fold as the boundary, the area on the side of the folded edge of the crack in the folded and overturned area is defined as the folded-cover side, and the area on the side of the crack exposure in the folded and overturned area is defined as the crack exposure side. The folded-back covered side is the folded-back peeling area bounded by the folded-back free edge of the current valve position and connected to the crack edge folded-back pixel set of the same valve position. It is used to indicate the side still covered by the crack edge folded-back. The crack exposed side is the folded-back peeling area bounded by the folded-back free edge of the current valve position and connected to the crack exposed area corresponding to the PTFE liquid contact surface. It is not covered by the crack edge folded-back pixel set of the same valve position. It is used to indicate the side exposed after the crack edge folded-back is removed.
[0091] For each valve position, the folded-back area, the folded-back free edge of the same valve position, the set of cracked edge folded-back pixels of the same valve position, and the crack exposure corresponding to the PTFE ingress surface are all uniformly adopted using the reference diaphragm image coordinate system. Pixels coinciding with the folded-back free edge of the same valve position are excluded from the folded-back area. Pixels coinciding with the set of cracked edge folded-back pixels of the same valve position are determined as the starting pixels on the covered side. Pixels coinciding with the crack exposure corresponding to the PTFE ingress surface but not coinciding with the set of cracked edge folded-back pixels of the same valve position are determined as the starting pixels on the exposed side. Using shared pixel edges or pixel vertices as adjacency relationships, starting from the ungrouped remaining pixels after excluding the starting pixels on the covered side and the starting pixels on the exposed side, continuously add remaining pixels that can be reached through adjacency relationships and do not cross the folded-back free edge to form a region connectivity group. The region connectivity group is only adjacent to the starting pixel on the covered side. The region connectivity group is assigned to the region where the starting pixel of the covered side is located. When the region connectivity group is only adjacent to the starting pixel of the exposed side, the region connectivity group is assigned to the region where the starting pixel of the exposed side is located. When the region connectivity group is adjacent to both types of starting pixels or is not adjacent to either type of starting pixel, the process of determining the folded free edge and the folded overturned area is returned to check the boundary continuity. The region connectivity group of the starting pixel of the covered side and the region where the starting pixel of the covered side is located is combined to form the covered side pixel region. The region connectivity group of the starting pixel of the exposed side and the region where the starting pixel of the exposed side is located is combined to form the exposed side pixel region. According to the covered side pixel region and the exposed side pixel region, with the folded free edge as the boundary, the region located on the side of the folded overturned area of the crack edge is determined as the folded covered side. The region located on the exposed side of the crack in the folded overturned area is determined as the exposed side of the crack.
[0092] The folded free edge is a continuous edge in the crack edge fold that faces the PTFE liquid-contacting surface and is not connected to the PTFE liquid-contacting surface. After excluding the folded free edge from the folded overturning area, the crack edge fold pixel set and the crack exposure corresponding to the PTFE liquid-contacting surface provide the starting pixels on both sides of the boundary. The adjacency relationship expansion causes the pixels in the area that do not fall into the starting pixel to be assigned to the connected side only along the path that does not cross the folded free edge. The boundary continuity check excludes the connected groups of areas that cannot be uniquely assigned to the side. Therefore, the folded covered side and the crack exposed side can be determined.
[0093] Extract the continuous eye drop residue from the folded-over side across the folded-over free edge and into the exposed side of the tear; The continuous eye drop residue position is a set of pixel coordinates that can continuously extend from the folded-over side, cross the folded-over free edge, and reach the exposed side of the crack in the eye drop residue position of the same valve position according to the pixel adjacency relationship. It retains the valve position, the side it is located on, and the pixel connection relationship, and is used to connect and form the crack edge folded interlayer return release trajectory.
[0094] According to the valve position, the residual eye drops positions are added to the set of positions to be connected. In each set of positions to be connected, starting from an ungrouped residual eye drops position, other residual eye drops positions that share a pixel edge or pixel vertex with the current residual eye drops position are continuously added to the same residual connected group until there are no unjoined adjacent residual eye drops positions in the same residual connected group. Then, the residual connected group is formed again from another ungrouped residual eye drops position. For each residual connected group, the residual eye drops positions located on the folded-overside, the residual eye drops positions located on the exposed side of the crack, and the boundary residual positions that coincide with the folded-overside free edge pixels of the same valve position are obtained. Starting from each residual eye drops position located on the folded-overside, the group is expanded layer by layer along the adjacent relationships in the residual connected group. Each expansion layer is processed according to the pixel row number and pixel column number from small to large, and the same connection path is used. The path does not repeatedly pass through the same eye drop residue position. Each time an eye drop residue position located on the exposed side of the crack is reached, the connection sequence from the starting point to the current eye drop residue position is recorded until all reachable eye drop residue positions are processed. If the connection sequence contains a boundary residue position or there is an eye drop residue position on the exposed side of the crack that is directly adjacent to the eye drop residue position on the folded-over side, the connection sequence is retained. If the residual connected group does not contain eye drop residue positions on both the folded-over side and the exposed side of the crack, or if the connection sequence does not pass through a boundary residue position and there is no direct adjacency on both sides, the residual connected group is removed. All retained connection sequences are merged and duplicate eye drop residue positions with the same valve position and pixel coordinates are deleted. If there is no retained connection sequence, an empty set is retained. Continuous eye drop residue positions that cross the folded-over side free edge and enter the exposed side of the crack are extracted.
[0095] The adjacency of shared pixel edges or pixel vertices makes the residual eye drops positions within the same residual connected group continuous in the image space. The residual connected group contains the residual eye drops positions on both the folded-overside and the exposed-outside side, which can define the two directional ends of the connected sequence. The connection sequence passing through the boundary residual position or being directly adjacent to the two sides of the residual eye drops position can prove that the connected sequence crosses the folded-overside free edge. After removing the residual connected groups that do not have two sides or do not cross the folded-overside free edge, continuous residual eye drops positions can be extracted.
[0096] By connecting the locations of continuous eye drop residue, the back-release trajectory of the crack edge folding interlayer is obtained.
[0097] The processing objects are the connection sequences, valve positions, side locations, pixel row numbers, and pixel column numbers retained during the extraction of continuous eye drop residue locations. The starting point of each connection sequence is set on the folded-overside side, and the connection direction is set to point towards the exposed side of the crack. According to the pixel adjacency relationship in the connection sequence, the pixel centers of adjacent continuous eye drop residue locations are connected sequentially from the starting point. When the same continuous eye drop residue location belongs to multiple connection sequences, the connection relationship of each connection sequence is maintained, and duplicate connections with the same starting and ending pixel coordinates are deleted. Connections are not established between different valve positions or between continuous eye drop residue locations that do not have pixel adjacency relationships. The connection sequences are arranged in the order of valve position from closed to open. When the valve positions are the same, they are arranged in ascending order of pixel row number and pixel column number of the starting point of the connection sequence. The arranged connection sequences, connection directions, and corresponding valve positions are combined. When there are no continuous eye drop residue locations, empty path data is combined. The continuous eye drop residue locations are connected to obtain the crack edge folded interlayer release trajectory.
[0098] In embodiments of the present invention, obtaining the cleaning failure determination result of the eye drop preparation pipeline includes: The result of the cleaning failure judgment of the eye drop preparation pipeline is the judgment data formed by comparing the cumulative value of the residual response of the eye drop in the registered residual detection image after the crack edge folding back interlayer release trajectory with the cleaning verification limit corresponding to the target eye drop. It is associated with the target eye drop and the current cleaning task, and the cleaning failure or no cleaning failure indicates whether the current cleaning process exceeds the allowable residual level of eye drops.
[0099] The release trajectory of the crack edge reversal interlayer is mapped to the registered residual detection image to obtain the target mapping position of the release trajectory of the crack edge reversal interlayer in the registered residual detection image; The target mapping position is the image pixel position formed by registering the residual detection image of each trajectory pixel coordinate in the crack edge folded interlayer return trajectory according to the associated valve position. It includes the valve position, pixel row number and pixel column number, and is used to obtain the corresponding eye drop residual response value item by item.
[0100] Using the valve position, pixel row number, pixel column number, and connection order recorded in the back-release trajectory of the fractured edge fold as input, along with the registered residual detection images of each valve position, the registered residual detection images are selected item by item according to the connection order of the back-release trajectory, each matching the valve position associated with the current trajectory pixel coordinates. Since both the back-release trajectory of the fractured edge fold and the registered residual detection images use the reference diaphragm image coordinate system, the pixel row number and pixel column number of the current trajectory pixel coordinates are directly mapped to the same row and column positions in the selected registered residual detection images. However, registered residual detection images matching the valve positions are sometimes missing. When the image or the same row and column position is outside the range of the image row and column, return to the step of forming the back-release trajectory of the crack edge fold and sandwich layer. Check the valve position and coordinates, add the selected registered residual detection image identifier, valve position, pixel row number and pixel column number to the mapping position set, arrange the mapping position set according to the connection order and delete duplicate items with the same image identifier and pixel coordinates. When the back-release trajectory of the crack edge fold and sandwich layer is empty path data, keep the empty mapping position set. Map the back-release trajectory of the crack edge fold and sandwich layer to the registered residual detection image to obtain the target mapping position of the back-release trajectory of the crack edge fold and sandwich layer in the registered residual detection image.
[0101] Each pixel coordinate of the back-release trajectory of the folded edge retains the corresponding valve position and adopts the reference diaphragm image coordinate system. The registered residual detection images of each valve position adopt the same coordinate system. Selecting images according to the valve position and directly corresponding to the same pixel row number and pixel column number can maintain the spatial consistency between the trajectory position and the residual response position of the eye drops. Image range verification and duplicate item deletion exclude positions without corresponding images and positions that are counted repeatedly. Therefore, the target mapping position can be obtained.
[0102] Extract the residual response value of eye drops at the target mapping location from the registered residual detection image; According to the connection order of the target mapping position, the registered residual detection image identifier, valve position, pixel row number and pixel column number are obtained item by item. The registered residual detection image that is consistent with the registered residual detection image identifier and valve position is selected and located to the corresponding pixel row number and pixel column number. The residual response value of eye drops formed by the residual detection unit in the located pixel position and which remains unchanged during the image registration process is obtained. When the residual response value of eye drops is equal to zero response code, or there is no valid residual response mark, or it is not within the range of residual response code of eye drops, the target mapping position determination step is returned to check the mapping position. The target mapping position is kept in correspondence with the obtained residual response value of eye drops and arranged according to the connection order. When the target mapping position is an empty set, the empty set of residual response values of eye drops is retained. The residual response value of eye drops at the target mapping position is extracted from the registered residual detection image.
[0103] Obtain the cleaning validation limit corresponding to the target eye drops; The target eye drops are those that were prepared or delivered in the current eye drop preparation pipeline before this cleaning and are the object of cleaning residue control. Their identification information comes from the current production batch record and is used to match the corresponding cleaning validation data. The cleaning validation limit is the upper limit of the allowable eye drop residue response specified in the approved cleaning validation data for the target eye drops, the current residue detection method, and the cumulative caliber. Its unit and numerical form are consistent with the eye drop residue response value at the target mapping location and are used to determine whether the cumulative result exceeds the allowable upper limit.
[0104] The identification information of eye drops prepared or transported in the current eye drop preparation pipeline before cleaning is obtained from the production batch records associated with this cleaning task. The target eye drop is then identified based on this identification information. In approved cleaning validation data that is valid during this cleaning, the eye drop identification information, the current eye drop preparation pipeline, the detection method of the residual detection unit, and the unit and cumulative caliber of the residual response value of the eye drop at the target mapping location are used as matching fields. Limit records with consistent matching fields are grouped into a candidate limit record set. When the number of limit records in the candidate limit record set is equal to 1, the unique limit record is determined as the applicable limit record. When the number of limit records in the candidate limit record set is equal to 0, the cleaning failure determination is stopped and cleaning validation data applicable to the target eye drops is supplemented. When the number of limit records in the candidate limit record set is greater than 1, the limit records are arranged from latest to earliest according to the approval time. When the first item in the arrangement has the same approval time as other limit records but different upper limits for residual response of eye drops, the cleaning failure determination is stopped and the cleaning validation data version is checked. When there are no limit records with the same approval time but different upper limits for residual response of eye drops, the first item in the arrangement is determined as the applicable limit record. The upper limit for residual response of eye drops, the unit and the cumulative caliber are obtained from the applicable limit record to obtain the cleaning validation limit corresponding to the target eye drops.
[0105] The residual response values of eye drops at the target mapping location are accumulated to obtain the cumulative result; The cumulative result is the sum of the residual eye drop response values at all target mapping locations after removing duplicate pixel positions, using a uniform unit and cumulative caliber. It represents the total residual eye drop response corresponding to the back-release trajectory of the crack edge fold and is used for comparison with the cleaning validation limit.
[0106] Using the residual eye drop response value at the target mapping location and the unit and cumulative caliber of the cleaning verification limit as input, each residual eye drop response value at the target mapping location is checked to ensure that all values are numerical and have the same unit and cumulative caliber as the cleaning verification limit. If any residual eye drop response value is missing or not numerical, the process returns to the residual eye drop response value extraction step. If any residual eye drop response value is inconsistent with the unit or cumulative caliber of the cleaning verification limit, the process returns to the cleaning verification limit acquisition step to rematch the limit record. The residual eye drop response values at the target mapping location are arranged according to valve position order, connection order, pixel row number, and pixel column number. Both image identifiers and pixel coordinates are present. When there are duplicate items, return to the target mapping location determination step to delete duplicate items, set the current cumulative value to 0, replace the current cumulative value with the sum of the current cumulative value and the current residual response value of the eye drops in the sorted order, and use the replaced current cumulative value to add the next residual response value of the eye drops. When all residual response values of the eye drops have been processed, retain the current cumulative value. When the residual response value of the eye drops at the target mapping location is an empty set, keep the current cumulative value as 0. The current cumulative value at the time of processing represents the sum of the residual response values of the eye drops at all target mapping locations. Accumulate the residual response values of the eye drops at the target mapping locations to obtain the cumulative result.
[0107] The target mapping positions have been deduplicated according to the registered residual detection image identifier and pixel coordinates. By adding the residual eye drop response values of each target mapping position sequentially from 0 under the same unit and cumulative caliber, the residual eye drop response of each trajectory position is counted only once. The empty set is kept at 0, indicating that there is no residual eye drop response that can be accumulated in the crack edge folding interlayer return trajectory. Therefore, the current cumulative value after adding all values can form the cumulative result.
[0108] The cumulative results are compared with the cleaning validation limit to obtain the comparison results; The comparison result is the relationship between the cumulative result and the cleaning validation limit under the same unit and cumulative caliber. It includes the cumulative result being less than the cleaning validation limit, the cumulative result being equal to the cleaning validation limit, and the cumulative result being greater than the cleaning validation limit. It is used to control the cleaning failure judgment of the target eye drop preparation pipeline.
[0109] Using the cumulative result and the cleaning verification limit as comparison inputs, the process verifies that both the cumulative result and the cleaning verification limit are numerical values with the same unit and cumulative scope. If the cumulative result is missing or not numerical, the process returns to the cumulative result generation step. If the cleaning verification limit is missing or not numerical, the process returns to the cleaning verification limit acquisition step. If the units or cumulative scopes of the cumulative result and the cleaning verification limit are inconsistent, the process returns to the cleaning verification limit acquisition step to rematch the limit records. If the cumulative result is less than the cleaning verification limit, a cumulative limit relationship state is formed where the cumulative result is less than the cleaning verification limit. If the cumulative result is equal to the cleaning verification limit, a cumulative limit relationship state is formed where the cumulative result is equal to the cleaning verification limit. If the cumulative result is greater than the cleaning verification limit, a cumulative limit relationship state is formed where the cumulative result is greater than the cleaning verification limit. The cumulative limit relationship state is then combined with the cumulative result, the cleaning verification limit, and the current cleaning task identifier. The cumulative result is then compared with the cleaning verification limit to obtain the comparison result.
[0110] The cumulative result represents the total amount of residual response of eye drops corresponding to the back-release trajectory of the crack edge folding interlayer. The cleaning verification limit represents the upper limit of the residual response of eye drops allowed under the same target eye drops, detection method, unit and cumulative caliber. Comparing the less than, equal to and greater than relationships between the two can completely cover all numerical relationships and directly distinguish whether the cumulative result exceeds the allowable upper limit. Therefore, the cumulative limit relationship can form a comparison result.
[0111] Based on the comparison results, the cleaning failure of the target eye drop preparation pipeline was determined, and the cleaning failure result of the eye drop preparation pipeline was obtained.
[0112] The target eye drop preparation pipeline refers to the eye drop preparation pipeline used for preparing or transporting the target eye drop in this production batch and which has undergone this cleaning. Its scope is jointly determined by the cleaning task identifier and the production batch record, and it is the object of the cleaning failure judgment.
[0113] The process takes the cumulative limit relationship status, cumulative result, cleaning verification limit, current cleaning task identifier, and target eye drop identity information from the comparison results as input. When the cumulative limit relationship status is that the cumulative result is greater than the cleaning verification limit, the cleaning judgment status is determined to be cleaning failure. When the cumulative limit relationship status is that the cumulative result is less than the cleaning verification limit or the cumulative result is equal to the cleaning verification limit, the cleaning judgment status is determined to be cleaning failure. If the comparison results lack a cumulative limit relationship status or the cumulative limit relationship status does not belong to any of the three numerical relationships, the cleaning failure judgment is stopped and the comparison step between the cumulative result and the cleaning verification limit is returned. The cleaning judgment status, cumulative result, cleaning verification limit, current cleaning task identifier, and target eye drop identity information are associated with the target eye drop preparation pipeline. Based on the comparison results, the cleaning failure judgment of the target eye drop preparation pipeline is performed to obtain the cleaning failure judgment result of the eye drop preparation pipeline.
[0114] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A system for determining the failure of cleaning in an eye drop preparation pipeline, characterized in that, include: The image acquisition module acquires residual detection images of the PTFE ingress surface and images of the diaphragm. An initial particle swarm is constructed based on the diaphragm image; The initial particle swarm is iteratively updated to obtain the particle swarm after the iteration. The image registration module obtains the registered residual detection image based on the particle swarm after the iteration. The flipping and extraction module obtains the free edge position based on the registered diaphragm image; it connects the free edge positions corresponding to the same connection position to obtain the folding and flipping area. The back-release tracking module determines the fold-over side and the tear exposure side based on the fold-over and tear exposure area, and connects the continuous eye drop residue positions corresponding to the fold-over side and the tear exposure side to obtain the back-release trajectory of the tear edge fold-over interlayer. The failure determination module determines the cleaning failure of the target eye drop preparation pipeline based on the back-release trajectory of the crack edge folding interlayer, and obtains the cleaning failure determination result of the eye drop preparation pipeline.
2. The eye drop preparation pipeline cleaning failure determination system according to claim 1, characterized in that, Acquire residual detection images of the PTFE ingress surface and images of the diaphragm, including: Obtain the target double-layer diaphragm valve in the eye drop preparation pipeline; wherein, the target double-layer diaphragm valve includes a PTFE liquid contact surface and an EPDM back layer, and the PTFE liquid contact surface has a cracked edge fold; A smart sensor is installed at the corresponding position of the target double-layer diaphragm valve. The smart sensor includes an image acquisition unit and a residue detection unit. The control target double-diaphragm valve is moved sequentially from the closed position to the open position to multiple valve positions; The image acquisition unit of the intelligent sensor acquires an image of the PTFE liquid contact surface at each valve position, and uses the acquired image of the PTFE liquid contact surface as the diaphragm image of the corresponding valve position. After cleaning the eye drop preparation pipeline, the target double-diaphragm valve is controlled to move sequentially to the corresponding valve position through the residual detection unit of the intelligent sensor, according to the arrangement of multiple valve positions, and residual detection images of the PTFE contact surface are collected at each valve position.
3. The eye drop preparation pipeline cleaning failure determination system according to claim 2, characterized in that, Constructing the initial particle swarm includes: One diaphragm image is selected from multiple diaphragm images as the reference diaphragm image, and the remaining diaphragm images are used as diaphragm images to be registered. The coordinate transformation parameters of the diaphragm image to be registered relative to the reference diaphragm image are used as particles; The initial velocity of the particle is determined based on the search range of the coordinate transformation parameters; The initial position of the particle is determined based on the initial values of the coordinate transformation parameters within the search range; Construct an initial particle swarm based on the initial velocity and initial position of the particles.
4. The eye drop preparation pipeline cleaning failure determination system according to claim 3, characterized in that, The particle swarm obtained after the iteration is complete includes: Extract multiple fixed structural positions of the same structural part in the target double-layer diaphragm valve from the reference diaphragm image and each diaphragm image to be registered; Based on the coordinate transformation parameters corresponding to the particles, the coordinate transformation is performed on the fixed structure position in the diaphragm image to be registered to obtain the transformed fixed structure position. Calculate the distance between the fixed structure position after transformation and the fixed structure position of the same structural part in the reference diaphragm image, and accumulate multiple distances to obtain the fitness of each particle; Based on the fitness of each particle, determine the optimal position of the individual particle and the optimal position of the global particle; The initial particle swarm is iteratively updated based on the individual optimal position and the global optimal position to obtain the particle swarm after the iteration.
5. The eye drop preparation pipeline cleaning failure determination system according to claim 3, characterized in that, The registered residual detection image is obtained, including: Based on the particle swarm after the iteration, determine the coordinate transformation parameters corresponding to the diaphragm image to be registered; Based on the coordinate transformation parameters corresponding to the diaphragm image to be registered, position registration is performed on the diaphragm image to be registered to obtain the registered diaphragm image. Based on the registered diaphragm image, the registered residual detection image is obtained.
6. The eye drop preparation pipeline cleaning failure determination system according to claim 2, characterized in that, The positions of the free edges are obtained, including: Define the crack edge retraction tab corresponding to the PTFE inlet surface; Extract the crack edge fold from the registered diaphragm image; The edge of the cracked edge that is continuously connected to the PTFE liquid contact surface is defined as the folded connection edge; The edge of the folded edge that is adjacent to the crack on the PTFE in-liquid surface but is not connected to the PTFE in-liquid surface is defined as the folded free edge. Select multiple connection positions along the folded-back connection edge, and make the shortest connection from each connection position to the corresponding folded-back free edge to obtain the free edge position.
7. The eye drop preparation pipeline cleaning failure determination system according to claim 6, characterized in that, The area to be folded back and unfolded includes: Connect the free edge positions corresponding to the same connection position to obtain the free edge movement trajectory; Based on the free edge movement trajectory, determine the area traversed by the folded-back free edge as it moves between multiple valve positions; Define the exposed crack corresponding to the PTFE ingress surface; Based on the exposed crack, the overlapping areas of the free edge that moves between multiple valve positions are extracted to obtain the folded-back area.
8. The eye drop preparation pipeline cleaning failure determination system according to claim 7, characterized in that, The release trajectory of the fracture edge reversal interlayer was obtained, including: Extract the location of residual eye drops within the folded-back area from the registered residual detection image; Using the free edge of the fold as the boundary, the area on the side of the folded edge of the crack in the folded and overturned area is defined as the folded-cover side, and the area on the side of the crack exposure in the folded and overturned area is defined as the crack exposure side. Extract the continuous eye drop residue from the folded-over side across the folded-over free edge and into the exposed side of the tear; By connecting the locations of continuous eye drop residue, the back-release trajectory of the crack edge folding interlayer is obtained.
9. The eye drop preparation pipeline cleaning failure determination system according to claim 1, characterized in that, The results of the cleaning failure assessment of the eye drop preparation pipeline were obtained, including: The back-release trajectory of the crack edge reversal interlayer is mapped to the registered residual detection image to obtain the target mapping position of the back-release trajectory of the crack edge reversal interlayer in the registered residual detection image; Extract the residual response value of eye drops at the target mapping location from the registered residual detection image; Obtain the cleaning validation limit corresponding to the target eye drops; The residual response values of eye drops at the target mapping location are accumulated to obtain the cumulative result; The cumulative results are compared with the cleaning validation limit to obtain the comparison results; Based on the comparison results, the cleaning failure of the target eye drop preparation pipeline was determined, and the cleaning failure result of the eye drop preparation pipeline was obtained.
