Intelligent industrial quality inspection method and system based on lightweight edge computing
By acquiring and correcting image frame evidence fragments on edge computing devices and combining them with product motion synchronization data, the problem of misjudging the attribution of adjacent products in high-speed quality inspection is solved. This enables accurate diversion of quality inspection results and reliable control of sample rewriting, thereby improving the accuracy and reliability of industrial quality inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN YUANHANG SOFTWARE TECH CO LTD
- Filing Date
- 2026-06-16
- Publication Date
- 2026-07-14
AI Technical Summary
In high-speed discrete component industrial quality inspection scenarios, existing edge inspection systems suffer from unstable image frame enqueue times, actual inference paths, and dequeue times when the equipment experiences thermal throttling, multiple camera concurrency, inference queue backlog, dynamic frame skipping, or early branch switching. This leads to mismatches between inspection results and the products to be inspected, affecting the rejection of defective products and the release of normal products. Furthermore, issues arise with the generation of re-inspection tasks and quality traceability.
By acquiring imaging records, inference queuing records, result return records, inference path markers, and product motion synchronization records at the edge, image frame evidence fragments are formed. Combined with the result return lag state and product motion position, the imaging anchor point is corrected, the candidate product affiliation boundary is defined, and candidate products are screened through local affiliation cost comparison and same product closure verification. Quality inspection result diversion and sample write-back permission are then implemented.
It enables accurate attribution judgment of image recognition results on high-speed production lines, avoids misjudgment of adjacent products, ensures reliable control of quality inspection execution and sample rewriting, solves the problems of rejection of misattributed results and wrong release in the existing system, and improves the accuracy and reliability of quality inspection.
Smart Images

Figure CN122390580A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of edge computing and industrial visual quality inspection technology, and in particular to intelligent industrial quality inspection methods and systems based on lightweight edge computing. Background Technology
[0002] In high-speed discrete component industrial quality inspection scenarios, products to be inspected are typically continuously fed into the image acquisition area by a conveyor mechanism. An industrial camera captures surface images after the product enters the predetermined shooting position. Edge computing devices locally identify defect areas and transmit the inspection results to backend air blowing, lever, or diversion mechanisms for rejection. This type of application is common in online inspection of electronic connectors, small stamped parts, injection molded shells, pharmaceutical packaging, lithium electrode sheet slitting, and precision hardware parts. The product spacing is short, and the appearance differences between adjacent products are small. Some defects only manifest as localized chipping, shallow scratches, missing inkjet printing, or edge burrs in a single frame image. To meet production line efficiency requirements… In practice, existing edge computing systems typically employ lightweight detection models and combine them with image scaling, block inference, model pruning, knowledge distillation, early termination inference, frame skipping, or cloud-edge collaborative verification to reduce computational load. Under stable temperature, fixed camera trigger frequency, and stable inference load conditions, these solutions can effectively output image detection results. In actual deployment, edge computing devices are often installed in enclosed electrical cabinets or near workstations close to heat sources, and may simultaneously connect to top-view cameras, side-view cameras, encoder signals, and rejection control interfaces. After continuous operation, the device temperature, inference queue length, and result return latency will change with the operating conditions.
[0003] Under the aforementioned operating conditions, some existing edge inspection processes still primarily rely on image acquisition time, product arrival signals, encoder displacement, or preset fixed delays to bind image detection results to corresponding products to be inspected. This method is usable under stable cycle times, but when there is equipment thermal throttling, multi-camera concurrency, inference queue backlog, dynamic frame skipping, or early termination branch switching, the enqueue time, actual inference path, and dequeue time of a certain image frame may undergo unstable changes. This can lead to a mismatch risk between the detection results and the products currently in the rejection window. For example, a side-view camera image may enter the complete inference process due to a large number of suspected defective areas. However, delayed output, with top-down camera images being output faster due to shallower, earlier retraction, means that if the system merges results only in the output order, it may combine image evidence from different perspectives of adjacent products into a quality inspection conclusion for the same product. Such mismatches not only affect the rejection of defective products and the release of normal products, but may also affect the generation of re-inspection tasks, quality traceability, normal sample caching, and the updating of the defect sample library. Therefore, an industrial image quality inspection method is needed that can record the inference path of image frames, verify the attribution relationship of detection results by combining product motion synchronous data, and provide trusted permission control for rejection execution, re-inspection triggering, and sample write-back. Summary of the Invention
[0004] This application proposes an intelligent industrial quality inspection method and system based on lightweight edge computing to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, this application adopts the following technical solution: an intelligent industrial quality inspection method based on lightweight edge computing, comprising: S1, after the product to be inspected passes through the image acquisition area and obtains the corresponding edge inference result return record, the edge end obtains the edge quality inspection status record corresponding to the current shooting beat. The edge quality inspection status record includes imaging record, inference queuing record, inference queuing record, result return record, inference path mark and product motion synchronization record; the image area to be permitted is determined by the image area permission recognition method, and the image area to be permitted is used as the evidence object. Through beat evidence association processing, an image frame evidence fragment containing imaging time, result return time, product motion position and inference path mark is formed. S2, based on the image frame evidence fragment formation result, return to the lag state, determine the imaging anchor point corresponding to the image area to be licensed based on the returned lag state, and combine the product movement position in the image frame evidence fragment corresponding to the imaging anchor point to form the candidate product ownership boundary; when the candidate product ownership boundary overlaps with the ownership boundary of adjacent products, an adjacent product ownership conflict boundary is formed. S3, within the candidate product attribution boundary, filter candidate products, perform conflict elimination on the attribution relationship between image frame evidence fragments and candidate products based on the adjacent product attribution conflict boundary, and form an attribution closure result based on local attribution cost comparison and same product closure verification. S4. Based on the attribution closure result and the abnormal state of the image frame evidence fragments, the quality inspection result is diverted. The abnormal state includes at least one of the following: source restriction state, insufficient lagging sample state, time sequence abnormal state, incomplete product movement position state, incomplete path state, uncalibrated execution response state, and initial calibration mark. Image frame evidence fragments that form a unique attribution closure, do not trigger an abnormal state, and are within the rejection execution window are converted into quality inspection execution permits. Image frame evidence fragments that do not form a unique attribution closure, trigger an abnormal state, or are not within the rejection execution window are written into the isolation evidence pool. After the re-inspection result and the image area to be permitted form an area acceptance and a product-level confirmation result is obtained, the sample write-back permit is determined.
[0006] Intelligent industrial quality inspection systems based on lightweight edge computing include: The edge evidence fragment construction module, after the product under inspection passes through the image acquisition area and obtains the corresponding edge inference result return record, acquires the edge quality inspection status record corresponding to the current shooting beat at the edge end. The edge quality inspection status record includes imaging record, inference queuing record, inference queuing record, result return record, inference path mark, and product motion synchronization record. The module determines the image area to be permitted through image area permission recognition, and uses the image area to be permitted as the evidence object. Through beat evidence association processing, it forms an image frame evidence fragment containing imaging time, result return time, product motion position, and inference path mark. The hysteresis correction and attribution boundary formation module returns a hysteresis state based on the image frame evidence fragment formation result. Based on the hysteresis state, it determines the imaging anchor point corresponding to the image region to be licensed and forms a candidate product attribution boundary by combining the product motion position in the image frame evidence fragment corresponding to the imaging anchor point. When the candidate product attribution boundary overlaps with the attribution boundary of an adjacent product, an adjacent product attribution conflict boundary is formed. The product attribution closure verification module filters candidate products within the candidate product attribution boundary, performs conflict elimination on the attribution relationship between image frame evidence fragments and candidate products based on the adjacent product attribution conflict boundary, and forms an attribution closure result based on local attribution cost comparison and same product closure verification. The quality inspection approval routing and write-back gating module performs quality inspection result routing based on the attribution closure result and the abnormal state of the image frame evidence fragments. The abnormal state includes at least one of the following: source restriction state, insufficient lagging sample state, timing abnormal state, incomplete product movement position state, incomplete path state, uncalibrated execution response state, and initial calibration mark. Image frame evidence fragments that form a unique attribution closure, do not trigger an abnormal state, and are within the rejection execution window are converted into quality inspection execution approvals. Image frame evidence fragments that do not form a unique attribution closure, trigger an abnormal state, or are not within the rejection execution window are written into the isolation evidence pool. After the re-inspection result and the image area to be approved form an area acceptance and a product-level confirmation result is obtained, the sample write-back approval is determined.
[0007] The beneficial effects of this invention are as follows: 1. This invention uses image frame evidence fragments formed by the image region to be licensed as the through object. First, it binds the imaging record, edge inference log, product motion synchronization record, and inference path marker under the current shooting rhythm to the same evidence object. Then, it traces back the imaging anchor point based on the result return lag state, and forms the candidate product attribution boundary by the product motion position corresponding to the imaging anchor point. Through this processing, multiple sources that are originally easily confused by result return time, frame skipping substitution, early termination inference, queue backlog, and hot frequency reduction state are limited to the same image frame evidence fragment and its motion constraint record for admission and timing correction. This avoids directly corresponding the recognition result returned later at the edge to the adjacent product near the current rejection position, realizing the transformation of the image recognition result from a simple defect response to attributable quality inspection evidence. This gives subsequent candidate product screening, adjacent product conflict identification, and rejection execution window judgment a clear imaging time base and product motion constraints.
[0008] 2. This invention continues to perform candidate product screening, adjacent product classification conflict elimination, local classification cost comparison, and multi-camera same product closure verification within the candidate product classification boundary. This ensures that the image frame evidence fragments formed by the current product, the previous adjacent product, the next adjacent product, and different camera channels are no longer independently determined based on model confidence, result return order, or current rejection position order. Instead, they are screened, competed for, and closed within the same candidate classification range. This solves the problem of product classification misjudgment caused by the close proximity of adjacent products, the lag in result return, and the different observation times of multiple cameras in the edge quality inspection of high-speed production lines. Only image frame evidence fragments supported by candidate boundary admission, conflict elimination, and same product closure can form a unique classification closure, thereby providing stronger product entity constraints for subsequent rejection, alarm, defect marking, or normal release.
[0009] 3. This invention further uses the attribution closure result as the gating basis between quality inspection execution permission and sample write-back permission. It isolates, re-inspects, or restricts permission for situations such as limited sources, insufficient lagging samples, abnormal timing, incomplete motion boundaries, uncalibrated execution responses, unaccepted regions, and initial calibration, instead of directly writing defective responses, re-inspection records, or low-confidence attribution results into execution control and the sample pool. Through this processing, easily confused execution confidence sources, re-inspection confirmation sources, and sample write-back sources are uniformly limited to the same image frame evidence fragment and its attribution closure result for permission judgment. This solves the problem in the existing quality inspection system where misattribution results directly trigger rejection, wrong release, or contamination of training samples. It realizes the separate control of quality inspection execution permission and sample write-back permission, making subsequent isolation evidence review, sample pool update, and model iteration have stronger anti-misexecution and anti-miswrite constraints. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort: Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a system framework diagram of the present invention. Detailed Implementation
[0011] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Example 1
[0012] like Figure 1 As shown, this invention discloses an intelligent industrial quality inspection method based on lightweight edge computing, including the following specific steps: First, it should be noted that in this embodiment, the source-restricted state, the state of insufficient lagging samples, the state of abnormal timing, the state of incomplete product movement position, the state of incomplete path, the state of conflicting ownership of adjacent products, the state of failure of closure of the same product by multiple cameras, the state of uncalibrated execution response, and the initial calibration mark formed at the edge end are all used as control conditions for subsequent quality inspection execution permission, isolation evidence pool update, re-inspection trigger, and sample write-back permission. Image frame evidence fragments with states or marks do not directly form high-confidence quality inspection execution permission or sample write-back permission due to a single defect response, a single candidate ownership result, or a single re-inspection record. Instead, they enter the candidate competition, isolation, re-inspection, manual confirmation, or parameter update process according to the corresponding steps.
[0013] In this implementation, the shooting rhythm, time base alignment boundary, defect candidate response limit, normal candidate admission level, result return lag state, candidate product affiliation boundary, affiliation cost difference limit, elimination execution window, regional acceptance requirements, and sample write-back permission conditions are primarily formed from the local calibration records of this production line, stable operation window, equipment response records, historical re-inspection samples, and manually confirmed samples. When historical samples are insufficient, the edge end obtains initial values through read-only configuration packages, production line controller interfaces, equipment factory response files, or authorized imported calibration files of the same model of equipment. The stable operation records of neighboring production lines of the same type are only used as an initialization reference that has been de-identified, authorized, and has a consistent field structure. The original industrial images, product production batch details, or customer business data are not directly transmitted. When the on-site data isolation strategy does not allow the import of neighboring stable operation records, the initial values are formed using the factory response range of the same model of equipment and manually confirmed samples, and initial calibration marks are added to the corresponding results. Once the subsequent re-examination samples meet the minimum valid sample requirements, the corresponding values will be updated. The updated values will only be used for subsequent shooting cycles after the update is completed, and will not retroactively change the already formed image frame evidence fragments, motion constraint records, attribution closure results, or sample write-back permission results.
[0014] Specifically in S1, when the product to be inspected passes through the image acquisition area, the edge end acquires the edge quality inspection status record according to the current shooting rhythm, and determines the image area to be permitted through the image area permission recognition method. Then, using the image area to be permitted as the evidence object, the image frame evidence fragment is formed through rhythm evidence association processing. The edge quality inspection status record is used to limit the image acquisition status, edge reasoning status and product motion synchronization status to the same shooting rhythm, so that subsequent steps can determine whether the image recognition result can be used as the ownership evidence of the corresponding product to be inspected.
[0015] The edge quality inspection status record includes at least camera imaging records, edge inference logs, product motion synchronization records, and shooting cycle records. Camera imaging records are used to determine the source frame and imaging time of the industrial image; edge inference logs are used to determine whether the corresponding image frame is directly inferred from the original frame, whether frame skipping occurs, whether early termination inference is triggered, and whether the inference path is complete; product motion synchronization records are used to determine the product's movement position in the conveying direction under the current shooting cycle; shooting cycle records are used to unify the records of the camera, encoder, inference process, and rejection controller to the same edge control time base. If any record cannot establish a correspondence with the current shooting cycle, the edge end will not directly use the corresponding image area as a valid pending image area, but will mark it as a source-restricted state when forming image frame evidence fragments.
[0016] The same edge control time base is formed by the local clock of the edge controller or the clock synchronized with the production line controller. The edge end maps each record to the current shooting cycle according to the timestamps of the camera trigger signal, inference enqueue record, inference dequeue record and encoder sampling record. When the time deviation between any record and the current shooting cycle exceeds the time base alignment boundary formed by the camera trigger jitter, encoder sampling period and edge clock synchronization error, it is determined that the record cannot establish a correspondence with the current shooting cycle.
[0017] In one specific embodiment, the edge device acquires industrial images at 80ms intervals, and converts the camera exposure time, inference enqueue time, inference dequeue time, and encoder count to the same edge control time base. At a given shooting interval, camera channel C1 acquires the original image frame F3852, with an exposure time of 120.000s; the corresponding inference enqueue time is 120.006s, and the inference dequeue time is 120.045s; the encoder count at the exposure time is 218600, and the encoder pulse equivalent is 0.02mm. / pulse, if the reference count when the product occupancy record enters the shooting area corresponding to the current shooting cycle is 218350, then the product movement position of the product occupancy record relative to the reference position of the shooting area at the exposure time is: 218600-218350=250 pulses, 250×0.02mm=5.0mm. The product occupancy record is formed by the upstream positioning sensor, camera trigger record or production line cycle record, and is only used to calculate the relative movement position under the current shooting cycle, and does not indicate that the unique ownership confirmation of the product to be inspected has been completed.
[0018] Before performing image region permission recognition, the edge device reads the camera installation calibration record, the product contour positioning result under the current shooting cycle, the process inspection area configuration, and the occlusion area record. It maps the product contour positioning result to the current industrial image coordinate system and intersects the mapped product contour area with the process inspection area configuration to obtain candidate detection areas. Then, it excludes background areas, fixture occlusion areas, exposed conveyor belt areas, and image areas that have not entered the process inspection range from the candidate detection areas to form the effective detection area of the product to be inspected. Image region permission recognition is only performed within the effective detection area of the product to be inspected. If the product contour positioning result is missing under the current shooting cycle, the camera calibration record is unavailable, or the candidate detection area and the process inspection area cannot form an effective intersection, the edge device will not regard the image area under that shooting cycle as a valid image area to be permitted. If a regional defect response has been generated in the edge inference log, but the region cannot complete the inclusion relationship verification with the effective detection area of the product to be inspected, only a source-restricted image frame evidence fragment to be reviewed is formed.
[0019] During the image region permission recognition process, the edge device performs lightweight defect recognition on the industrial image under the current shooting frame to obtain the defect response at the image region level. The lightweight defect recognition is implemented by an image recognition model deployed on the edge device. Its input is the industrial image under the current shooting frame, and the output is the defect response location and defect response intensity of the image region. The defect response intensity is a dimensionless normalized result with a value range of 0 to 1. For image regions where the defect response location falls within the effective detection area of the product to be inspected and the defect response intensity reaches the defect candidate response limit, the edge device converts the image region into a candidate region for permission under the defect candidate state. For image regions where the defect response location does not fall within the effective detection area of the product to be inspected, or where the defect response intensity does not reach the defect candidate response limit, they are not considered as candidate regions for permission under the defect candidate state. This output is only used as a candidate admission basis and does not directly determine the quality inspection execution permission, rejection action, or sample write-back permission.
[0020] In a preferred implementation, the image recognition model employs a lightweight convolutional detection network or an equivalent region defect recognition network that can run in real-time at the edge. The network input is a current industrial image that has been normalized in size and standardized in grayscale or color channels. The main body of the network is used to extract local texture, edge contours, and regional grayscale difference features. The output layer forms candidate region locations and corresponding defect response intensities. The defect response intensities are normalized and limited to the range of 0 to 1. The output of the image recognition model is only used to form candidate regions to be approved in the defect candidate state, and does not directly form quality inspection execution approval, rejection action, or sample write-back approval. When the model output region cannot fall into the effective detection area of the product to be inspected, or when the corresponding imaging record, product movement position, and inference path marker cannot form a corresponding relationship in the same beat, the corresponding output only forms a source-limited image frame evidence fragment to be reviewed.
[0021] The defect candidate response boundary is formed by the defect sample response distribution confirmed by manual re-inspection and the stable normal sample response distribution. The edge is determined by the upper quantile record of the stable normal sample response distribution and the lower quantile record of the defect sample response distribution. When the response intensity ranges of the stable normal sample response distribution and the defect sample response distribution overlap, the image area where the defect response intensity falls into the overlapping range is regarded as a candidate area to be permitted and enters the beat evidence association processing. It is prohibited to directly form quality inspection execution permission, rejection action or sample write-back permission based solely on the defect response intensity. If the defect candidate response boundary formed within a certain stable operating window is 0.60 and the defect response intensity of the current image area is 0.81, then the area enters the candidate area to be permitted in the defect candidate state. In other embodiments, the defect candidate response boundary is re-formed according to the stable operating window of the corresponding production line, the manually re-inspected samples and the defect sample response distribution.
[0022] For regions that do not trigger a defect response, the edge processing unit does not directly treat them as normal sample candidates, but instead performs normal candidate admission verification. Early departure levels are derived from the edge inference log. The complete inference level is denoted as N, where N represents the total number of levels in the current lightweight defect recognition model that can form effective output branches from the input side to the final output side. The current early departure level is denoted as n, which is numbered sequentially from shallow to deep according to the inference direction. The closer n is to N, the more deep semantic and local texture fusion processing the image region has undergone. The normal candidate admission level is formed by the distribution of early departure levels in manually confirmed normal regions within the stable operating window. When manually confirmed normal regions within the stable operating window mainly form stable normal outputs at level 5 or deeper, and the complete inference level N of the current model is not less than 5, the edge processing unit uses level 5 as the normal candidate admission level boundary for the current embodiment. If the complete inference level N of the current model is less than 5, the lowest stable output level corresponding to the manually confirmed normal region within the stable operating window is used as the normal candidate admission level boundary. If the early termination level is lower than the boundary, the result comes from a frame skipping replacement frame, or the early termination level record is missing, the corresponding region will not be regarded as a candidate region to be permitted in the normal candidate state; when the edge end does not use the early termination inference structure, the complete inference path record will be used to replace the early termination level verification.
[0023] In S1, the defect candidate response limit is used to determine whether an image region enters the defect candidate state, the normal candidate admission level is used to limit whether a region that has not triggered a defect response can be used as a normal candidate state, the shooting beat is used to bind the imaging record, edge inference log and product motion synchronization record under the same shooting beat, and the product motion position conversion parameter is used to form the input of the subsequent candidate product belonging boundary. The above parameters are determined and updated according to the general parameter formation rules of this embodiment.
[0024] After determining the image region to be licensed, the edge device performs beat evidence association processing. This processing uses each image region to be licensed as the smallest evidence object, associating the image region to be licensed with the imaging record under the current shooting beat, and making it correspond to the product movement position and inference path marker under the current shooting beat. The process of forming image frame evidence fragments is as follows: the edge device writes the original image frame reference, region position, imaging time, product movement position, inference path marker and candidate state of the image region to be licensed into the same evidence object, and configures fragment integrity markers for the evidence object; candidate states include defect candidate states and normal candidate states; fragment integrity markers are used to characterize whether the image region to be licensed can form a complete correspondence with the imaging record, product movement position and inference path marker under the current shooting beat. The image frame evidence fragments formed in this way simultaneously contain the image source, inference source and product movement correspondence, which are used for the formation of subsequent result return lag state, imaging anchor point and candidate product belonging boundary.
[0025] In one specific embodiment, the defect response intensity of region A in image frame F3852 is 0.81, and the region coordinates are x=420, y=180, w=36, h=28. This region originates from direct inference from the original frame, has an early regression level of 6, does not trigger frame skipping replacement, and can form a beat-corresponding relationship with the exposure time of 120.000s and the product movement position of 5.0mm. Then, the edge end encapsulates region A into an image frame evidence fragment E3852-A. This fragment at least records the original image frame reference, region coordinates, imaging time, product movement position, inference path marker, defect candidate state, and fragment integrity marker of region A. Fragment E3852-A subsequently enters S2 to form a result return lag state and further determine the imaging anchor point and the candidate product belonging boundary.
[0026] When the image area to be licensed cannot form a corresponding relationship with the imaging record, product movement position, and inference path marker under the current shooting beat, the edge end marks the corresponding image frame evidence fragment as source-restricted. The triggering conditions for the source-restricted state include: missing camera exposure time, image frame sequence number not corresponding to the inference log, missing product arrival signal, abnormal encoder counting, missing inference queuing record, missing inference queuing record, untraceable source of skipped frame replacement, or failure to form a complete inference path record under hot frequency reduction. The source-restricted state does not mean that the corresponding image area is deleted, but means that the image frame evidence fragment is only used as evidence to be reviewed and enters the subsequent attribution closure, isolation, or re-inspection confirmation process, and is restricted from directly forming quality inspection execution license or sample write-back license in accordance with the general anomaly control rules of this implementation method.
[0027] For regions that have not triggered a defect response, if the early termination level does not meet the normal candidate admission conditions, then the region will not be considered as a candidate region to be permitted under the normal candidate state. If the early termination level record is missing, the inference path level is unavailable, or the result comes from an untraceable skipped frame replacement frame, then the region will not be considered as a candidate region to be permitted under the normal candidate state, and the corresponding fragment will be marked as source-restricted if an image frame evidence fragment has already been formed. For regions that have entered the defect candidate state due to a defect response, if their inference path record is missing, the skipped frame replacement source is untraceable, or a complete inference path record cannot be formed under the hot-down frequency state, then the corresponding image frame evidence fragment will be marked as source-restricted.
[0028] Through the above processing, S1 outputs a set of image frame evidence fragments. Each image frame evidence fragment in this set has a clear image region to be licensed, imaging record, product movement position, inference path marker and source status. This output result serves as the input for the subsequent S2 to form the result return lag state and further determine the imaging anchor point corresponding to the image region to be licensed and the candidate product ownership boundary.
[0029] S2, the edge receives the set of image frame evidence fragments output by S1, returns a hysteresis state based on the image frame evidence fragment formation result, determines the imaging anchor point corresponding to the image region to be licensed based on the returned hysteresis state, and forms the candidate product ownership boundary by combining the product movement position corresponding to the imaging anchor point in the image frame evidence fragment. The returned hysteresis state is used to correct the deviation between the edge inference result return time and the image imaging time. The candidate product ownership boundary is used to limit the range of candidate products that can participate in the ownership judgment in the subsequent S3, and is used to identify adjacent product ownership conflicts.
[0030] The edge reads the original image frame reference, imaging time, result return time, camera channel, inference path marker, product motion position, and source status from the image frame evidence fragment set. For multiple image frame evidence fragments formed under the same camera channel and the same original image frame, the edge merges them into a frame-level inference observation record. The frame-level inference observation record is used to count the actual lag from imaging to result return of the original image frame, avoiding repeated amplification of lag statistical weights for multiple unlicensed image regions within the same original image frame. If an image frame evidence fragment has been marked as source-restricted, the fragment is still retained in the record set of S2, but is not used as a valid statistical sample for forming the result return lag status.
[0031] When forming a result return lag state, the edge end determines the actual lag from exposure to output based on the imaging time and result return time in the frame-level inference observation record. The actual lag is a time quantity in milliseconds, used to characterize the return delay of the current edge inference result relative to the image imaging time. The edge end classifies the inference path into categories according to the original frame direct inference state, frame skipping replacement state, early retreat inference state, and hot frequency reduction state. Under the same camera channel and the same inference path category, the frame-level inference observation records that have completed result return and whose record version has been locked before the current processing time are statistically analyzed. Frame-level inference observation records that have not completed result return, are being written, or have not yet completed version locking are not included in the current statistics.
[0032] In one specific embodiment, the imaging time of image frame F3852 is 120.000s, and the result return time is 120.045s. Therefore, the actual lag corresponding to the frame-level inference observation record is 45ms. If the actual lag of consecutive effective frames is concentrated between 36ms and 40ms within the stable operation window of the same camera channel, direct inference of the original frame and no thermal downclocking is triggered, then the edge end uses this range as the basis for the stable lag of the corresponding inference path category, and takes the median record of 38ms as the stable lag reference in the current example.
[0033] First, a stable lag reference is formed at the edge based on the same camera channel and the same inference path category. Then, the portion of the current inference queue length that exceeds the upper quantile record of the queue length in the stable operating window is converted into queue backlog correction, and the inference time increment caused by the thermal throttling state relative to the stable operating window is converted into thermal throttling correction. Subsequently, the stable lag reference, queue backlog correction, and thermal throttling correction are added to form the lag estimate of the current inference path category. The lag estimate and the actual lag of a single frame are written together into the result and returned to the lag status for subsequent imaging anchor point backtracking verification. In a specific embodiment, the stable lag reference is 38ms, the current inference queue length exceeds the upper quantile record of the queue length in the stable operating window by 2, and the single frame service time of the same path is 2ms, so the queue backlog correction is 2×2ms=4ms. When the edge is in thermal throttling state, the thermal throttling correction is 2ms, so the lag estimate formed by the current inference path category is 38ms+4ms+2ms=44ms.
[0034] The effective statistical sample requirement for returning the result in a lag state is jointly determined by the shooting beat and the thermal state sampling period. The shooting beat is used to determine the number of frame-level inference observation records that can be obtained per unit time, and the thermal state sampling period is used to determine the minimum observation period for thermal downsampling state changes. In a specific embodiment, the shooting beat is 80ms and the thermal state sampling period is 1s. Then, the number of shooting beats corresponding to one thermal state sampling period is 1000ms ÷ 80ms = 12.5. The edge end determines the minimum effective sample requirement as 13 effective frame-level inference observation records by rounding up, so that the statistical sample covers no less than one thermal state sampling period. If the number of effective frame-level inference observation records in the current sliding time window does not reach the minimum effective sample requirement, or the proportion of effective frame-level inference observation records to the total number of frame-level inference observation records is lower than the available sample proportion boundary formed by the stable operation window, then the edge end will not return the corresponding result in a lag state for imaging anchor point verification, and will mark the corresponding image frame evidence fragment as a state of insufficient lag samples.
[0035] In S2, the stable lag basis is used to provide a lag reference under the same inference path, the queue backlog correction is used to reflect the return delay caused by the accumulation of the inference queue, the thermal throttling correction is used to reflect the change in inference time caused by the device throttling, the minimum effective sample requirement is used to prevent the formation of a result return lag state that can be used for imaging anchor point verification when the number of samples is insufficient, and the available sample ratio boundary is used to prevent the formation of a result return lag state that can be used for imaging anchor point verification when the proportion of invalid samples is too high. The above parameters are determined and updated according to the general parameter formation rules of this embodiment.
[0036] After determining the result return lag state, the edge end determines the imaging anchor point corresponding to the image area to be licensed based on the result return lag state. The imaging anchor point includes the imaging time corresponding to the image area to be licensed and the product movement position at that imaging time. For image frame evidence fragments with complete imaging records, the edge end uses the imaging time formed in S1 as the time basis of the imaging anchor point and uses the result return lag state to verify whether the result return time can be traced back to the imaging time. When the deviation between the traced time and the imaging time in the imaging record is within the time base alignment boundary formed by the camera trigger jitter, encoder sampling period and edge end clock synchronization error, the imaging anchor point is confirmed to be valid. If the traced deviation exceeds the time base alignment boundary, the edge end marks the corresponding image frame evidence fragment as a timing abnormal state and does not form a candidate product belonging boundary based on the fragment alone.
[0037] In one specific embodiment, the result return time of image frame F3852 is 120.045s. The hysteresis estimate formed by the current inference path category in the continuous valid frame-level inference observation record is 44ms. The imaging reference time obtained by backtracking from the result return time is 120.045s-0.044s=120.001s. If the time base alignment boundary is ±2ms, then the difference between 120.001s and 120.000s in the imaging record is 1ms, which is within the time base alignment boundary. The edge end confirms that the imaging anchor point of the image frame evidence fragment is valid, and continues to use the product movement position of 5.0mm written in S1 as the product movement position corresponding to the imaging anchor point. If the difference exceeds the time base alignment boundary, the result return time is not directly used as the imaging time, but the corresponding image frame evidence fragment is marked as a timing abnormal state.
[0038] When forming the candidate product ownership boundary, the edge end calculates the motion time range of the product corresponding to the image area to be permitted to reach the rejection execution position based on the product motion position corresponding to the imaging anchor point. The edge end corrects the motion time range based on the production line cycle deviation, product motion measurement error and result return lag uncertainty to form the candidate product ownership boundary. The above correction quantities are all time quantities, or engineering quantities that can be converted into time quantities. They are not directly added to dimensionless results such as defect response intensity and confidence level. The rejection mechanism response error does not change the candidate product identity judgment, but is used as a conservative amount of executable time for subsequent quality inspection execution permission. It is recorded and output with motion constraints and used by S4 to form the rejection execution window.
[0039] In one specific embodiment, the conveying distance from the imaging position to the rejection execution position is 400mm, the product movement position corresponding to the imaging anchor point is 5.0mm, and the conveying speed is 1000mm / s. Therefore, the remaining conveying distance for the product from the position corresponding to the imaging anchor point to the rejection execution position is 400mm - 5.0mm = 395mm, and the corresponding ideal arrival time interval is 395mm ÷ 1000mm / s = 0.395s. If the imaging time is 120.000s, then the ideal arrival time is 120.395s. If the product motion measurement error is converted to ±3ms, the production line cycle time deviation is ±2ms, and the result return hysteresis uncertainty is ±4ms, then the edge end is based on stability... The system uses the operating window and historical re-inspection samples to determine whether there is a unidirectional drift relationship among various error sources. When product motion measurement errors, production line cycle deviations, and result return lag uncertainties do not accumulate in the same direction within the stable operating window, the boundary extension is formed using the sum of squares and the square root method, i.e., √(3²+2²+4²) ms, yielding approximately 5.4 ms. When historical samples are insufficient, there is continuous unidirectional lag due to thermal throttling, or when camera triggering and encoder sampling synchronization drift occur under the same control time base, a conservative boundary extension is formed by merging the absolute values of errors in the same direction, i.e., 3ms+2ms+4ms=9ms. An initial calibration mark or conservative boundary mark is added to the corresponding motion constraint record. The conservative boundary mark only restricts the automatic formation of quality inspection execution permission and sample write-back permission, and does not unconditionally expand the candidate product's belonging boundary to long-term operating parameters.
[0040] When the product motion measurement error is recorded in the form of distance, the edge end first converts the product motion measurement error into a time quantity based on the current conveying speed, and then participates in the boundary expansion calculation of the candidate product's belonging boundary. For example, when the product motion measurement error is 3mm and the conveying speed is 1000mm / s, the corresponding time error is 3mm÷1000mm / s=0.003s, or 3ms. Through this conversion, each correction quantity in the candidate product's belonging boundary has a consistent time dimension when participating in the boundary expansion.
[0041] The candidate product attribution boundary of adjacent products is obtained according to the same boundary formation rule as the evidence fragment of the current image frame. The edge end takes the imaging anchor point, product movement position, conveying speed, production line cycle deviation, product movement measurement error and result return lag uncertainty corresponding to the adjacent product as input to form the candidate product attribution boundary of adjacent products. When the corrected candidate product attribution boundary overlaps with the attribution boundary of the adjacent product, the edge end generates the adjacent product attribution conflict boundary. In a specific embodiment, the candidate product attribution boundary of the current product is from 120.386s to 120.404s, and the candidate product attribution boundary of the adjacent next product is from 120.400s to 120.430s. The two overlap from 120.400s to 120.404s. Then the edge end determines the overlapping area as the adjacent product attribution conflict boundary and marks the corresponding image frame evidence fragment as the adjacent product attribution conflict state.
[0042] If encoder sampling is missing, product arrival signal is abnormal, or conveying speed is lower than the minimum effective operating speed formed by production line calibration records, the edge end will not form a candidate product ownership boundary that can be used for candidate product ownership judgment based on the corresponding image frame evidence fragment, but will mark it as an incomplete product movement position state. If the rejection mechanism response time has not been calibrated, the edge end will mark the corresponding image frame evidence fragment as an uncalibrated execution response state. Image frame evidence fragments in the incomplete product movement position state or uncalibrated execution response state will enter the pending review, isolation, or re-inspection confirmation process according to the general anomaly control rules of this embodiment. If the candidate product ownership boundary can be formed but overlaps with the adjacent product ownership boundary, it will not be marked as an incomplete product movement position state, but as an adjacent product ownership conflict state, so that the conflict can be eliminated in the subsequent S3 execution.
[0043] Through the above processing, S2 outputs a set of motion constraint records. Each motion constraint record includes an image frame evidence fragment, a result return lag state, an imaging anchor point, a candidate product affiliation boundary, an adjacent product affiliation conflict boundary, and a constraint state marker. The motion constraint record also includes a conservative execution time value corresponding to the response error of the elimination mechanism. This conservative execution time value does not participate in the candidate product identity judgment and is used in S4 to form an elimination execution window. The set of motion constraint records output by S2 enters S3, which is used to filter candidate products within the candidate product affiliation boundary and to perform conflict elimination and same product closure verification on the affiliation relationship between the image frame evidence fragment and the candidate product.
[0044] S3, the edge end receives the set of motion constraint records output by S2. Within the candidate product ownership boundary, it performs conflict elimination and same product closure verification on the ownership relationship between image frame evidence fragments and candidate products to form ownership closure results. This step, based on the completed result return timing correction and product motion boundary correction, determines whether the image frame evidence fragment can uniquely belong to a product entity; image frame evidence fragments that do not form a unique ownership closure do not directly enter the quality inspection execution permission.
[0045] At the edge, image frame evidence fragments are used as nodes to be assigned, products that can enter the candidate product assignment boundary are used as candidate product nodes, the candidate product assignment boundary is used as the assignment admission boundary, the adjacent product assignment conflict boundary is used as the assignment exclusion boundary, and valid image frame evidence fragments formed by different camera channels are used as the same product closure verification object. In this way, the image evidence assignment closure relationship is constructed. The candidate products only include the current product occupancy record, the previous adjacent product occupancy record, and the next adjacent product occupancy record that the current image frame evidence fragment may be assigned to. It does not include historical product occupancy records that have crossed the elimination execution position and cannot be executed, nor does it include future product occupancy records that have not yet entered the image acquisition area. The product occupancy records are formed by production line cycle records, upstream arrival signals, or encoder trigger records. They are only used to limit the range of candidate products and do not indicate that the unique assignment confirmation between the image frame evidence fragment and the product entity has been completed.
[0046] During the candidate product screening process, the edge reads the expected arrival time of the candidate product to be removed and determines whether the expected arrival time of removal falls within the candidate product ownership boundary of the corresponding image frame evidence fragment. If the expected arrival time of removal falls within the candidate product ownership boundary, the product is identified as a candidate product that can participate in the ownership judgment; if it does not fall within the boundary, the product is excluded from the candidate product set. The expected arrival time of removal is jointly determined by the product movement position, conveying speed, distance from the shooting position to the removal execution position, and production line cycle record corresponding to the imaging anchor point in S2. Its value is a time quantity. The candidate product screening does not directly determine the product ownership based on the defect response intensity or model confidence.
[0047] In one specific embodiment, the candidate product attribution boundary corresponding to image frame evidence fragment E3852-A is from 120.386s to 120.404s. If the expected arrival time for the elimination of product P50 is 120.395s, then P50 falls into the candidate product attribution boundary and becomes a candidate product that can participate in the attribution judgment. If the expected arrival time for the elimination of product P49 is 120.330s, then P49 does not fall into the candidate product attribution boundary and is excluded. If the expected arrival time for the elimination of product P51 is 120.402s, and this time is within the adjacent product attribution conflict boundary, then although P51 enters the candidate product set, its attribution relationship with image frame evidence fragment E3852-A is marked as an adjacent product attribution conflict relationship, and the unique attribution cannot be directly determined solely based on the result return order.
[0048] For candidate products that enter the candidate product attribution boundary, the edge first determines whether the candidate product falls into the adjacent product attribution conflict boundary. If it does, the unique attribution is not determined according to the result return order, the current elimination position order, or the single defect response intensity. Instead, the attribution relationship between the candidate product and the corresponding image frame evidence fragment is marked as a conflict attribution relationship, and this conflict attribution relationship is used as a conflict candidate relationship for subsequent attribution cost comparison and same product closure verification. If the candidate product does not fall into the adjacent product attribution conflict boundary, the candidate product is used as a non-conflict candidate relationship for subsequent attribution cost comparison and same product closure verification. If the corresponding image frame evidence fragment has a source-limited state, a state of insufficient lagging samples, a state of temporal abnormality, or a state of incomplete product movement position, then the image frame evidence fragment is not used as valid evidence to form a unique attribution closure.
[0049] In one implementation, the edge performs a local attribution cost comparison on the attribution relationship between image frame evidence fragments and candidate products. The attribution cost includes motion offset cost, inference lag residual cost, path integrity cost, adjacent product mutual exclusion cost, and same product closure cost. The above individual costs are converted into dimensionless normalized values in the range of 0 to 1 using boundary normalization before being compared. Among them, time deviation costs are formed according to the ratio between the absolute value of the corresponding time deviation and the candidate product attribution boundary half-width, the result return lag uncertainty, or the residual boundary within the stable operating window. Path state costs are formed according to the inference... The cost is determined by factors such as path integrity, frame skipping replacement status, or the proportion of historical misattribution re-examinations. Conflict costs are determined based on whether the product falls within the boundary of conflicting adjacent product attributions. For candidate products that have passed the candidate product attribution boundary screening and entered the candidate product set, the motion offset cost is calculated as the ratio of the absolute value of the time deviation of the candidate product's expected arrival time relative to the center of the candidate product's attribution boundary to the half-width of the candidate product's attribution boundary, with a value between 0 and 1. If the expected arrival time is outside the candidate product's attribution boundary, the product does not enter the candidate product set, and its motion offset cost and single-fragment attribution cost are not calculated. For inference lag residual cost, path integrity cost, and adjacent product mutual exclusion cost, if the normalized boundary is missing or zero, the corresponding single cost is not calculated, and the corresponding image frame evidence fragment is marked as lag anomaly, incomplete path, or source restricted state.
[0050] Before performing local attribution solving, the edge end constructs a local attribution solving window centered on the candidate product attribution boundary corresponding to the current image frame evidence fragment. The local attribution solving window includes the current image frame evidence fragment, other image frame evidence fragments that are within the same candidate product attribution boundary or adjacent product attribution conflict boundary, as well as the current product, the previous adjacent product, and the next adjacent product. Products that do not pass the candidate product attribution boundary admission are not included in the candidate product set. Image frame evidence fragments with an empty candidate product set are not included in the set of valid image frame evidence fragments in the local attribution solving. Image frame evidence fragments marked as having a limited source, an abnormal time sequence, insufficient lagging samples, or an incomplete product movement position are not considered as valid evidence to form a unique attribution closure.
[0051] For an image frame evidence fragment e that enters the local attribution solution window, its candidate product set Pe is formed by filtering the candidate product attribution boundary corresponding to the image frame evidence fragment. For a candidate product p∈Pe, motion offset cost De,p, inference lag residual cost Le, path integrity cost Re, and adjacent product mutual exclusion cost Me,p are formed at the edge. De,p comes from the time deviation between the expected arrival time of the candidate product p and the center of the candidate product attribution boundary of the image frame evidence fragment e, and is formed by normalizing according to the half-width of the candidate product attribution boundary. Le comes from the deviation between the actual lag of a single frame of the image frame evidence fragment e and the lag state returned by the result formed in S2, and is formed by normalizing according to the uncertainty of the lag returned by the result or the lag residual boundary within the stable operating window. Re comes from the inference path marker and source state formed in S1, and is used to characterize the path integrity difference when the hard exclusion state is not triggered. Me,p comes from the adjacent product attribution conflict boundary formed in S2. It is 1 when the attribution relationship between the candidate product p and the image frame evidence fragment e falls into the adjacent product attribution conflict boundary, and 0 when it does not fall into the boundary.
[0052] For the path integrity cost Re, when the image frame evidence fragment is directly inferred from the original frame and the inference path record is complete, Re=0; when the early withdrawal level meets the normal candidate admission conditions but is lower than the complete inference level, the complete inference level N represents the last inference level of the current model that can form a valid output, and the current early withdrawal level n represents the inference level that the image frame evidence fragment actually triggers the output, and 1≤n≤N; if N>1 and n can be read from the edge inference log, then the edge end forms Re according to (N−n) / (N−1). If N≤1, the early withdrawal level record is missing, the inference path record cannot correspond to the image frame evidence fragment, or the skip frame substitution source cannot be traced, then Re is not calculated, and the corresponding image frame evidence fragment is marked as having an incomplete path or a restricted source state. This image frame evidence fragment is not used as valid evidence to form a unique attribution closure, and its single fragment attribution cost Ce,p is no longer calculated. When the skip frame substitution source is traceable and the restricted source state is not triggered, the edge end forms Re according to the historical misattribution review ratio of the corresponding inference path category within the stable operation window.
[0053] For image frame evidence fragment e and candidate product p, the edge-end forms a single fragment attribution cost: Ce,p = De,p + Le + Re + Me,p, where Ce,p represents the single fragment attribution cost of image frame evidence fragment e belonging to candidate product p; De,p represents the motion offset cost; Le represents the inference lag residual cost; Re represents the path integrity cost; and Me,p represents the adjacent product mutual exclusion cost. The single fragment attribution cost is used to compare the relative attribution probability of the same image frame evidence fragment to different candidate products. The same product closure cost is used to verify whether different image frame evidence fragments can form the same product closure, and is not used to replace the candidate product attribution boundary admission. The above formula is only applicable when De,p, Le, Re and Me,p have all been formed, and the image frame evidence fragment has not triggered the source-restricted state, the timing abnormal state, the lag sample insufficient state, the product motion position incomplete state or the path incomplete state. If any single cost cannot be formed, the three costs or the missing cost are not used to replace the calculation of Ce,p. Instead, the corresponding image frame evidence fragment is directed to the isolation, re-examination or manual confirmation process.
[0054] For image frame evidence fragments that do not trigger source-restricted states, timing-abnormal states, lagging sample-insufficient states, or incomplete product motion positions, and whose candidate product set is not empty, the edge computes the single-fragment attribution cost Ce,p for each candidate product, forming the lowest single-fragment attribution cost candidate product and the second-lowest single-fragment attribution cost candidate product. The edge first forms the lowest single-fragment attribution cost candidate relationship within the candidate product set, and then combines the attribution cost difference boundary, adjacent product attribution conflict state, and multi-camera same product closure result to determine whether the candidate relationship can be transformed into a unique attribution closure output. If the attribution cost difference boundary is not met, or the adjacent product attribution conflict is not proven by valid image frames from at least two different camera channels, the edge will proceed with the process. If fragments form a consistent direction, or if the closure of the same product by multiple cameras fails, the candidate relationship will not be converted into a unique attribution closure output. Since the inference lag residual cost and path integrity cost have a common impact on the candidate products of the same image frame evidence fragments, in addition to comparing the cost difference between the candidate product with the lowest single fragment attribution cost and the candidate product with the second lowest single fragment attribution cost, the edge end also performs fragment quality gating based on whether the lowest single fragment attribution cost exceeds the attribution quality upper limit formed by the stable operation window and historical re-examination samples. When the lowest single fragment attribution cost exceeds the attribution quality upper limit, even if there is a cost difference between the candidate products, a unique attribution closure will not be output, but the corresponding attribution closure state will be marked as unclosed or attribution low confidence.
[0055] The input to the same product closure cost Ke,e′(Y) includes the candidate product pointing results of image frame evidence fragments e and e′, camera channel identifiers, multi-camera calibration relationships, and the current attribution decision variable Y. Based on the multi-camera calibration relationship, the edge first maps the image frame evidence fragments formed by different camera channels to the same product observation window according to the camera trigger time difference, product motion speed, and camera calibration error boundary. Then, it compares the candidate product pointing results and imaging anchor point differences of each image frame evidence fragment. When the candidate product pointing results of two image frame evidence fragments are consistent, and the difference between their imaging anchor points falls within the same product observation window, the edge marks the image frame evidence fragment pair as the same product closure support relationship. If the camera channel identifier is missing, the multi-camera calibration relationship is missing, or the difference between the imaging anchor points exceeds the same product observation window, the corresponding same product closure cost is not calculated, and the attribution closure result of the multi-camera same product closure failure is generated.
[0056] In one implementation, Ke,e′(Y) takes the value of 0 or 1; when image frame evidence fragments e and e′ point to the same candidate product under the current attribution decision, and the multi-camera calibration relationship indicates that they belong to the same product observation window, Ke,e′(Y)=0; when they point to different candidate products, Ke,e′(Y)=1; when the multi-camera calibration relationship is missing or any image frame evidence fragment does not meet the valid evidence conditions, the closure cost of the same product is not calculated, and an attribution closure result of the failure of closure of the same product by multiple cameras is generated.
[0057] In S3, the normalized boundary of motion offset cost is formed by the width of the candidate product attribution boundary and the arrival deviation of historical correctly attributed samples. The normalized boundary of inference lag residual cost is formed by the result return lag state and its uncertainty in S2. The path integrity cost is formed by the source state, inference path marker and normal candidate admission condition in S1. The adjacent product mutual exclusion cost is formed by the adjacent product attribution conflict boundary in S2. The same product closure cost is formed by the multi-camera calibration relationship, the candidate product pointing result of the valid image frame evidence fragment and the historical re-examination confirmation sample. The above normalized boundaries and cost conditions are determined and updated according to the general parameter formation rules of this embodiment. When the initial value is used, the initial calibration mark is added to the corresponding attribution closure result.
[0058] In one specific embodiment, the candidate product attribution boundary of image frame evidence fragment E3852-A is from 120.386s to 120.404s, the boundary center is 120.395s, the half-width is 9ms, the expected arrival time for product P50 to be removed is 120.395s, and the expected arrival time for product P51 to be removed is 120.402s. If the motion offset cost is calculated based on the offset of the candidate product arrival time relative to the boundary center, the motion offset corresponding to P50 is 0ms, and the motion offset corresponding to P51 is 7ms. Dividing both by the boundary half-width of 9ms and limiting them to the range of 0 to 1, we can obtain that the motion offset cost of P50 is 0 and the motion offset cost of P51 is 0.78. If the actual lag of a single frame of E3852-A is different from the result return lag... If the deviation between states is 1ms and the normalized boundary of the inference lag residual cost is 10ms, then the inference lag residual cost of E3852-A is 1ms ÷ 10ms = 0.10. If the path integrity cost of E3852-A is 0, and P51 falls into the adjacent product attribution conflict boundary while P50 does not, then the single-fragment attribution cost of P50 is 0 + 0.10 + 0 + 0 = 0.10, and the single-fragment attribution cost of P51 is 0.78 + 0.10 + 0 + 1 = 1.88. If the valid image frame evidence fragment E3852-B from the side-view camera also points to P50 and does not trigger an adjacent product attribution conflict, then the edge end will determine E3852-A and E3852-B as evidence pairs supporting the closure of the same product, and will regard P50 as the unique attribution product entity.
[0059] During the same product closure verification process, the edge end will determine the candidate products based on the candidate product ownership boundary, using the valid image frame evidence fragments formed by different camera channels participating in this closure verification as the mapping benchmark. If the valid image frame evidence fragments of different camera channels all point to the same candidate product, and the corresponding candidate product does not trigger the adjacent product ownership conflict, then the edge end determines a unique ownership closure. If the image frame evidence fragments to be involved in the closure have a source-restricted state, a timing abnormal state, a state of insufficient lagging samples, or a state of incomplete product motion position, or if the candidate products corresponding to different camera channels are inconsistent, then the ownership closure result of the same product closure failure of multiple cameras will be generated. If the image frame evidence fragment is in the execution response unlabeled state, this state does not negate the product ownership judgment alone, but restricts the formation of the elimination execution window in S4.
[0060] When the difference in the unit attribution cost between candidate products is insufficient to form a unique attribution, the edge end is uncertain about the unique attribution product entity. The attribution cost difference boundary is a dimensionless difference boundary, used to compare the unit attribution cost Ce,p formed by the same image frame evidence fragment for different candidate products. It is not used to compare the overall objective function value containing the closure cost Ke,e′(Y) of the same product. In the implementation using the sum of four individual costs, with each individual cost ranging from 0 to 1, the theoretical range of the unit attribution cost Ce,p is 0 to 4. The attribution cost difference boundary is formed based on the distribution of the unit attribution cost difference between the correct attribution product and the second-lowest candidate product that has been confirmed by the re-examination in the stable operation window and historical re-examination samples. If the cost difference between the candidate product with the lowest unit attribution cost and the candidate product with the second lowest unit attribution cost does not reach the difference boundary, or if there is an adjacent product attribution conflict boundary and the same product closure support is lacking, then the corresponding image frame evidence fragment is marked as an attribution conflict state.
[0061] When the attribution cost difference limit formed by historical re-inspection samples is lower than the minimum identifiable difference formed by the product motion measurement error, the result return hysteresis residual boundary, and the camera calibration error, the minimum identifiable difference is used as the attribution cost difference limit; if the minimum identifiable difference cannot be formed, a unique attribution closure is not output.
[0062] For image frame evidence fragments that cannot form a unique attribution closure, the edge end performs abnormal diversion according to the constraint state marking. If there is a source-restricted state, early termination level record missing, inference path level unavailable, or inference path record incomplete, the attribution closure state is marked as path incomplete. If there is a state of insufficient lagging samples or temporal abnormality, the attribution closure state is marked as lagging abnormality. If there is a state of incomplete product motion position, the attribution closure state is marked as motion boundary incomplete. If there is a state of uncalibrated execution response, the state is output to S4 along with the attribution closure result to restrict subsequent removal of execution permission. If there is an adjacent product attribution conflict state or multiple cameras failing to close the same product, the unique attribution product entity is not output, but attribution conflict or unclosed state is output. The above abnormal states enter the isolation, re-inspection, or permission restriction process of S4 according to the general abnormality control rules of this embodiment.
[0063] S3 then outputs a set of attribution closure results. Each attribution closure result includes at least an image frame evidence fragment, a set of candidate products, a unique attribution product entity, an attribution closure status, a conflict cause record, and an initial calibration mark. When a unique attribution closure is not formed, the unique attribution product entity is set to empty or marked as undetermined. The attribution closure status includes at least unique attribution closure, adjacent product attribution conflict, failure of closure of the same product by multiple cameras, incomplete path, hysteresis anomaly, incomplete motion boundary, and no closure. For results that form a unique attribution closure, the unique attribution product entity is entered into S4 to determine the quality inspection execution permission. For results that do not form a unique attribution closure, have a conflict cause record, or have an initial calibration mark, S4 uses them as the input basis for isolation, re-inspection, or prohibition of sample write-back.
[0064] S4, the edge receives the set of attribution closure results output by S3, and performs quality inspection result diversion based on the attribution closure results and the abnormal state of the image frame evidence fragments. The abnormal state includes at least one of the following: source-restricted state, insufficient lagging sample state, timing abnormal state, incomplete product movement position state, incomplete path state, uncalibrated execution response state, and initial calibration mark. Image frame evidence fragments that form a unique attribution closure, do not trigger an abnormal state, and are within the rejection execution window are converted into quality inspection execution permits. Image frame evidence fragments that do not form a unique attribution closure, trigger an abnormal state, or are not within the rejection execution window are written into the isolation evidence pool. After the re-inspection result and the image area to be permitted form an area acceptance and a product-level confirmation result is obtained, the sample write-back permit is determined.
[0065] The edge reads the image frame evidence fragments, candidate product set, unique attribution product entity, attribution closure status, conflict cause record, initial calibration mark, and the source-restricted status, lagging sample insufficiency status, timing abnormality status, incomplete product movement position status, and execution response uncalibrated status of each attribution closure result. The image frame evidence fragments serve as the evidence object for quality inspection judgment, the unique attribution product entity serves as the object of quality inspection execution control, the attribution closure status serves as the gating condition for whether to allow the output of quality inspection execution permission, the conflict cause record serves as the basis for generating re-inspection tasks, and the initial calibration mark is used to restrict sample write-back permission and participates in execution permission gating in scenarios where rejection actions require re-inspection confirmation or manual confirmation.
[0066] When performing quality inspection result routing, the edge device first determines whether the image frame evidence fragment forms a unique attribution closure, and then determines whether the image frame evidence fragment is in a state of source restriction, insufficient lagging samples, abnormal timing, incomplete product movement position, incomplete path, or multiple cameras failing to close the same product. If the attribution closure is a unique attribution closure and none of the above states are triggered, the edge device continues to determine whether the current control time is still within the corresponding product's removal execution window. If a unique attribution closure is not formed, or any of the above states exist, the edge device does not generate a quality inspection execution permission, but writes the corresponding image frame evidence fragment into the isolated evidence pool.
[0067] The elimination execution window is jointly determined by the motion timing range corresponding to the candidate product affiliation boundary formed in S2 and the elimination mechanism response conditions. The elimination mechanism response conditions include at least the elimination mechanism response delay, response delay error boundary, elimination action holding time and elimination mechanism action status. The elimination mechanism response error does not participate in the candidate product affiliation judgment in S2, but is used in S4 to limit whether the quality inspection execution permit still has an executable time condition.
[0068] When forming the rejection execution window, the edge terminal uses the earliest and latest possible arrival times of the candidate product's belonging boundary as the time boundary for the product to arrive at the rejection execution position. The minimum response delay, maximum response delay, and rejection action holding time of the rejection mechanism are used as execution constraints. The lower boundary of the control instruction issuance window is formed by subtracting the minimum response delay from the latest possible arrival time of the product and further subtracting the rejection action holding time. The upper boundary of the control instruction issuance window is formed by subtracting the maximum response delay from the earliest possible arrival time of the product. If the lower boundary is later than the upper boundary, it means that an executable rejection execution window cannot be formed under the current response conditions. The edge terminal does not generate rejection-type quality inspection execution permission, but writes the corresponding image frame evidence fragment into the isolated evidence pool.
[0069] In one specific embodiment, the candidate product attribution boundary of image frame evidence fragment E3852-A corresponding to product P50 is from 120.386s to 120.404s. The response delay of the rejection mechanism is 20ms, and the response delay error boundary is ±6ms. Therefore, the actual response delay range of the rejection mechanism is from 14ms to 26ms. If the rejection action holding time formed by the rejection mechanism's calibration record is 40ms, then the edge end is calculated by subtracting the minimum response delay and the rejection action holding time from the latest possible arrival time of the product, and subtracting the maximum response delay from the earliest possible arrival time of the product. The control command issuance window is formed by a delay, namely 120.404s-0.014s-0.040s to 120.386s-0.026s, corresponding to 120.350s to 120.360s. If the current control time is 120.356s, it is within the control command issuance window; if the current control time is 120.372s or 120.398s, it has exceeded the control command issuance window. The edge end does not generate a reissue removal action command, but writes the corresponding image frame evidence fragment into the isolated evidence pool and generates a re-inspection trigger result.
[0070] If the current control time is 120.356s, then based on the elimination mechanism's response delay range of 14ms to 26ms, the expected effective time range of the elimination action is 120.356s + 0.014s to 120.356s + 0.026s, or 120.370s to 120.382s. With a minimum response delay of 14ms, the elimination action's effective range is 120.370s to 120.410s; with a maximum response delay of 26ms, the elimination action's effective range is 120.382s to 120.422s. Both effective ranges cover the candidate product ownership boundary of product P50 from 120.386s to 120.356s. If the minimum action holding requirement formed by product length, conveying speed and rejection action area size is 18ms, then the rejection action holding time of 40ms is not less than the minimum action holding requirement. When the home closure state is the only home closure and no abnormal state is triggered, the edge end generates rejection-type quality inspection execution permission. If the current control time is 120.372s, then the expected effective time of the rejection action under the maximum response delay is 120.398s, which is later than the earliest possible arrival time of product P50 of 120.386s. The edge end does not generate a reissue rejection action instruction, but writes the corresponding image frame evidence fragment into the isolated evidence pool and generates a re-inspection trigger result.
[0071] The quality inspection execution permit must include at least the uniquely belonging product entity, the image frame evidence fragment, the image area to be permitted, the permit type, the rejection execution window, the execution action marker, and the execution time. The permit type is determined based on the candidate state corresponding to the image frame evidence fragment. For image frame evidence fragments in the defect candidate state, the quality inspection execution permit is used to allow rejection, alarm, or defect marker output. For image frame evidence fragments in the normal candidate state, the quality inspection execution permit is used to allow the formation of a normal release record, but is not directly used as a sample write-back permit. If the image frame evidence fragment is in the execution response unmarked state, the edge end will not form a rejection-type quality inspection execution permit, but will output the state along with the isolation evidence record and transfer it to the rejection agency response marking or manual confirmation process.
[0072] If an image frame evidence fragment has an initial calibration mark, the edge terminal does not directly generate a quality inspection execution permit or a sample write-back permit based on that image frame evidence fragment. Instead, it generates an alarm, a re-inspection trigger result, or an isolation evidence pool update result based on the attribution closure result. When subsequent re-inspection confirmation or manual confirmation has formed a unique product attribution, and the corresponding calibration value has been updated by the stable operation window of this production line or the manually confirmed sample, the edge terminal removes the initial calibration restriction corresponding to that image frame evidence fragment, and then determines whether to allow the formation of a quality inspection execution permit or a sample write-back permit according to the elimination execution window, the regional acceptance result, and the product-level confirmation result.
[0073] In one implementation, the edge end writes image frame evidence fragments that have not formed a unique attribution closure, have a source-restricted state, have a lagging sample shortage state, have a timing anomaly state, have an incomplete product movement position state, have an incomplete path state, have an uncalibrated execution response state, have missed the elimination execution window at the current control moment, or have an initial calibration mark and whose elimination action has not obtained re-inspection confirmation or manual confirmation into an isolated evidence pool. The records in the isolated evidence pool include at least image frame evidence fragments, image regions to be licensed, candidate product sets, attribution closure state, unique attribution product entity field, conflict reason record, constraint state mark, elimination execution window state, re-inspection task state, initial calibration mark, and sample write-back restriction mark.
[0074] The edge generates re-inspection trigger results based on the conflict cause record. When the conflict cause is a conflict in the ownership of adjacent products, the re-inspection trigger results include slowing down the re-shooting, tracking the re-shooting, or increasing the product interval for confirmation. When the conflict cause is the failure of multiple cameras to close the same product, the re-inspection trigger results include calling the supplementary camera channel, verifying the calibration relationship of multiple cameras, or manually confirming the product ownership. When the conflict cause is an incomplete path, the re-inspection trigger results include reading the edge inference log, performing original image frame verification, or re-forming the inference path record. When the conflict cause is a hysteresis anomaly, the re-inspection trigger results include extending the effective statistical sample window, verifying the result to return to the hysteresis state, or re-acquiring the locked frame-level inference observation record. When the conflict cause is an incomplete motion boundary, the re-inspection trigger results include verifying the encoder record, product arrival signal, and transport speed record. Image frame evidence fragments in the isolated evidence pool must not be directly entered into the sample pool as normal samples, defective samples, or training samples, nor can they trigger a rejection action or sample write-back permission alone. The re-inspection trigger results do not reverse the already formed quality inspection execution permission, but are only used to confirm whether the isolated evidence can be subsequently released from isolation or form a sample write-back permission.
[0075] In one implementation, the edge device reads re-shot images, slowed-down re-inspection images, rejected re-inspection images, product-level confirmation records, or manual confirmation records, and extracts re-inspection image regions from these images. The re-inspection image regions are then bound to the product entity, re-inspection time, re-inspection source, and re-inspection confirmation status to form a re-inspection result. For manual confirmation records or product-level confirmation records, the edge device writes the corresponding product entity, confirmation time, and confirmation source into the re-inspection result, and uses the locatable confirmation area as the re-inspection image region. When the confirmation area cannot be located, no separate region acceptance verification is performed based on that record; instead, the edge device performs region acceptance verification between the re-inspection image region in the re-inspection result and the original pending-permission image region.
[0076] The regional acceptance verification is used to determine whether the re-inspection result continues the same evidence object in the original image frame evidence fragment, so as to avoid mistaking adjacent products, adjacent areas or other new defects that appear in the re-inspection as the original evidence object. The regional acceptance verification includes at least regional overlap verification, center offset verification and defect morphology consistency verification. Regional overlap verification is used to determine whether the overlap ratio between the image area corresponding to the re-inspection result and the original image area to be licensed meets the acceptance requirements. Center offset verification is used to determine whether the offset of the center position of the image area corresponding to the re-inspection result relative to the center position of the original image area to be licensed is within the allowable range formed by the camera calibration error, product motion error and re-inspection sampling error.
[0077] The regional acceptance verification is only used to determine whether the re-inspection result can remove the sample write-back restriction of the corresponding image frame evidence fragment, and does not reverse the already formed quality inspection execution permission, attribution closure result or isolation evidence pool write result.
[0078] The defect morphology consistency check is used to calculate the difference in area ratio, aspect ratio, directional feature, or grayscale distribution between the image region corresponding to the re-inspection result and the original image region to be licensed. The above differences are compared with the allowable range of morphology consistency formed by historical re-inspection samples and manually confirmed samples. When each difference is within the corresponding allowable range, the edge end is determined to have passed the defect morphology consistency check. For image frame evidence fragments in the normal candidate state, the region acceptance check takes the detection area or product outline position corresponding to the original image region to be licensed as the acceptance object. The defect morphology consistency check can be replaced by the normal region consistency check.
[0079] The region overlap requirement is used to confirm whether the re-inspection area continues the original evidence object. The center offset range is used to exclude mismatches caused by adjacent areas or adjacent products. The defect morphology consistency requirement is used to exclude other defect areas that newly appear in the re-inspection. The above conditions are determined and updated according to the general parameter formation rules of this implementation method. If the coordinates of the original image area to be licensed are missing, the area is 0, or the coordinates of the image area corresponding to the re-inspection result are missing, the region overlap ratio calculation is not performed at the edge end, and the region acceptance verification result is determined as not accepted.
[0080] In this embodiment, the image region coordinates adopt the original industrial image pixel coordinate system, with the origin at the top left corner of the image. The horizontal coordinates increase to the right along the image width direction, and the vertical coordinates increase downwards along the image height direction. If the re-inspection image originates from different camera channels, reshoot magnifications, or cropped areas, the edge end first maps the image region corresponding to the re-inspection result to the original industrial image pixel coordinate system where the original image region to be permitted is located, based on camera calibration records, image cropping offsets, and scale conversion relationships. Then, region overlap, center offset, and defect morphology consistency checks are performed. If coordinate system mapping cannot be completed, the region acceptance check result is determined to be unaccepted.
[0081] In one specific embodiment, the original image region to be licensed is a rectangular region R0, with pixel coordinates ranging from 100 to 140 horizontally and 80 to 100 vertically. Its area is determined by subtracting the left and right boundaries from the right boundary and the top boundary from the bottom boundary, resulting in 40 × 20 = 800 pixels. The center coordinates are (120, 90). The image region R1 corresponding to the re-inspection result has pixel coordinates ranging from 102 to 142 horizontally and 81 to 101 vertically, with an area of 40 × 20 = 800 pixels and a center coordinate of (122, 91). The overlapping area of R0 and R1 is from 102 to 140 horizontally and from 81 to 100 vertically, with an overlapping area of 38 × 19 = 722 pixels. Based on the area of the original image region to be licensed, the region overlap ratio is 722 ÷ 800 = 0.9025. The center offset between R0 and R1 is calculated using pixel Euclidean distance. That is, approximately 2.24 pixels. If the region overlap requirement in this embodiment is not less than 0.70 and the center offset range is not more than 5 pixels, then both the region overlap and the center offset meet the acceptance requirements. If the area ratio, length-width ratio and directional features of R1 are within the morphological consistency range relative to R0, then the edge end determination re-inspection result forms a region acceptance with the original image region to be licensed.
[0082] If the image area corresponding to the re-inspection result cannot form a region connection with the original image area to be licensed, the edge end will maintain the isolation state of the corresponding image frame evidence fragment and prohibit the formation of sample write-back permission. If the re-inspection result forms a unique product attribution, but the region overlap ratio between the re-inspection area and the original image area to be licensed is insufficient, the center offset exceeds the range, or the defect morphology consistency verification fails, the edge end will not use the re-inspection result to remove the sample write-back restriction. If the product entity corresponding to the re-inspection result is inconsistent with the unique attribution product entity in S3, the edge end will mark the corresponding image frame evidence fragment as attribution verification failure and maintain the isolation state.
[0083] For image frame evidence fragments in a normal candidate state, the product-level confirmation result is formed by downstream sampling inspection records after normal release, periodic re-shooting records, manual sampling confirmation records, or backend product arrival records. At the edge, within the stable operation window, normal sample sampling trigger conditions are set according to the production line quality control procedures. When a normal candidate area originates from the initial calibration stage, the early rejection level has just reached the normal candidate admission level, the number of normal samples in the same batch is insufficient, there are recent records of erroneous rejection or release review, or the normal candidate area is about to enter the model update sample pool, re-shooting, slow-down re-inspection, or manual sampling confirmation is triggered. Image frame evidence fragments in a normal candidate state that have not obtained a product-level confirmation result can be used for the normal release record of the current quality inspection process, but they must not form a sample write-back permission, nor can they be directly entered into the model update sample pool as stable normal samples.
[0084] When determining the sample write-back permission, the edge terminal simultaneously checks the quality inspection execution permission, product-level confirmation result, isolation status, and regional acceptance result. If the image frame evidence fragment has formed a unique ownership closure, the re-inspection result or manual confirmation result confirms the same product entity, the image area corresponding to the re-inspection result forms a regional acceptance with the original image area to be licensed, and there are no source restrictions, insufficient lagging samples, abnormal timing, incomplete product movement position, incomplete path, uncalibrated execution response, or initial calibration mark, then the edge terminal determines the sample write-back permission. The sample write-back permission is used to allow the corresponding image frame evidence fragment and its confirmation result to enter the normal sample cache, defective sample library, or subsequent model update sample pool.
[0085] In one specific embodiment, image frame evidence fragment E3852-A has formed a unique attribution closure, uniquely attributing the product entity to product P50, and the re-inspection result confirms that the product entity is still product P50. If the regional overlap ratio between the re-inspected image area R1 and the original image area to be licensed R0 is 0.9025, which is higher than the regional overlap requirement of 0.70; the center offset is 2.24 pixels, which is less than the center offset range of 5 pixels; the defect morphology consistency verification is passed, and E3852-A does not have a source restriction state, a lag sample insufficiency state, a timing abnormal state, a product movement position incomplete state, a path incomplete state, an execution response uncalibrated state, or an initial calibration mark, then the edge end determines that the sample write-back permission is granted. If the regional overlap ratio of the same image frame evidence fragment is only 0.55, or the initial calibration mark has not yet been removed by the re-inspection result, then the edge end does not determine the sample write-back permission, and continues to retain the isolated evidence record.
[0086] If the corresponding image frame evidence fragment has formed a quality inspection execution permit, but the product-level confirmation result is missing, the re-inspection result has not formed a regional acceptance, the isolation status has not been lifted, the initial calibration mark has not been lifted, or the current sample comes from the online isolation confirmation after missing the elimination execution window, then the edge end is uncertain about the sample write-back permit. For image frame evidence fragments that have not formed a sample write-back permit, the edge end retains its isolation evidence record, re-inspection record, and conflict reason record for subsequent manual review, equipment calibration, or parameter update, but does not use it as a training sample or a stable operation window sample for direct write-back.
[0087] Through the above processing, S4 outputs quality inspection execution permission, re-inspection trigger result, isolation evidence pool update result, and sample write-back permission result. The quality inspection execution permission is used to control the rejection, alarm, defect marking, or normal release record of the corresponding product; the re-inspection trigger result is used to perform re-inspection on evidence that has not formed a unique attribution closure, has an abnormal timing, or is not accepted by the region; the isolation evidence pool update result is used to save image frame evidence fragments that cannot be directly executed or directly written back; the sample write-back permission result is used to restrict subsequent sample pool updates. Thus, the edge terminal transforms the attribution closure result output by S3 into the diversion results of execution permission, isolation, re-inspection, and write-back permission. Example 2
[0088] like Figure 2 As shown, this invention also discloses an intelligent industrial quality inspection system based on lightweight edge computing, including: an edge evidence fragment construction module; after the product to be inspected passes through the image acquisition area and obtains the corresponding edge inference result return record, the edge end obtains the edge quality inspection status record corresponding to the current shooting beat; the edge quality inspection status record includes imaging record, inference queuing record, inference dequeuing record, result return record, inference path mark, and product motion synchronization record; the image area to be permitted is determined by the image area permission recognition method, and the image area to be permitted is used as the evidence object; the image frame evidence fragment containing the imaging time, result return time, product motion position, and inference path mark is formed through beat evidence association processing; The hysteresis correction and attribution boundary formation module returns a hysteresis state based on the image frame evidence fragment formation result. Based on the hysteresis state, it determines the imaging anchor point corresponding to the image region to be licensed and forms a candidate product attribution boundary by combining the product motion position in the image frame evidence fragment corresponding to the imaging anchor point. When the candidate product attribution boundary overlaps with the attribution boundary of an adjacent product, an adjacent product attribution conflict boundary is formed. The product attribution closure verification module filters candidate products within the candidate product attribution boundary, performs conflict elimination on the attribution relationship between image frame evidence fragments and candidate products based on the adjacent product attribution conflict boundary, and forms an attribution closure result based on local attribution cost comparison and same product closure verification. The quality inspection approval routing and write-back gating module performs quality inspection result routing based on the attribution closure result and the abnormal state of the image frame evidence fragments. The abnormal state includes at least one of the following: source restriction state, insufficient lagging sample state, timing abnormal state, incomplete product movement position state, incomplete path state, uncalibrated execution response state, and initial calibration mark. Image frame evidence fragments that form a unique attribution closure, do not trigger an abnormal state, and are within the rejection execution window are converted into quality inspection execution approvals. Image frame evidence fragments that do not form a unique attribution closure, trigger an abnormal state, or are not within the rejection execution window are written into the isolation evidence pool. After the re-inspection result and the image area to be approved form an area acceptance and a product-level confirmation result is obtained, the sample write-back approval is determined.
[0089] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An intelligent industrial quality inspection method based on lightweight edge computing, characterized in that, include: After the product to be inspected passes through the image acquisition area and obtains the corresponding edge inference result return record, the edge end acquires the edge quality inspection status record corresponding to the current shooting beat. The edge quality inspection status record includes imaging record, inference queuing record, inference queuing record, result return record, inference path mark, and product motion synchronization record. The image area to be permitted is determined by the image area permission recognition method, and the image area to be permitted is used as the evidence object. Through beat evidence association processing, an image frame evidence fragment containing imaging time, result return time, product motion position, and inference path mark is formed. The image frame evidence fragment formation result returns a lag state. Based on the lag state, the imaging anchor point corresponding to the image region to be licensed is determined. The product movement position corresponding to the imaging anchor point in the image frame evidence fragment is combined to form the candidate product ownership boundary. When the candidate product ownership boundary overlaps with the ownership boundary of adjacent products, an adjacent product ownership conflict boundary is formed. Candidate products are selected within the candidate product attribution boundary. Conflict elimination is performed on the attribution relationship between image frame evidence fragments and candidate products based on the attribution conflict boundary of adjacent products. Attribution closure results are formed based on local attribution cost comparison and same product closure verification. Based on the attribution closure result and the abnormal state of the image frame evidence fragments, the quality inspection result is diverted. The abnormal state includes at least one of the following: source restriction state, insufficient lagging sample state, time sequence abnormal state, incomplete product movement position state, incomplete path state, uncalibrated execution response state, and initial calibration mark. Image frame evidence fragments that form a unique attribution closure, do not trigger an abnormal state, and are within the rejection execution window are converted into quality inspection execution permits. Image frame evidence fragments that do not form a unique attribution closure, trigger an abnormal state, or are not within the rejection execution window are written into the isolation evidence pool. After the re-inspection result and the image area to be permitted form an area acceptance and a product-level confirmation result is obtained, the sample write-back permit is determined.
2. The intelligent industrial quality inspection method based on lightweight edge computing according to claim 1, characterized in that, The specific operation of the image region licensing recognition method is as follows: read the image acquisition status, edge inference status and product motion synchronization status under the current shooting cycle from the edge quality inspection status record, perform lightweight defect recognition on the industrial image under the current shooting cycle, and take the area that triggers the defect response as the licensing candidate area under the defect candidate status; For regions that do not trigger defect responses, verify whether they are directly inferred from the original frame, and verify whether they do not trigger frame skipping replacement and whether the early termination level meets the normal candidate admission conditions formed by the stable running window. If the verification is passed, they are regarded as candidate regions to be licensed in the normal candidate state; the candidate regions to be licensed are determined as image regions to be licensed.
3. The intelligent industrial quality inspection method based on lightweight edge computing according to claim 1, characterized in that, The specific operation of the beat evidence association processing is as follows: taking the image area to be licensed as the evidence object, the image area to be licensed is associated with the imaging record and result return record under the current shooting beat, and the image area to be licensed is made to form a beat-corresponding relationship with the product movement position and reasoning path mark under the current shooting beat. The imaging time, result return time, product movement position and reasoning path mark of the image area to be licensed are written into the same evidence object, thereby forming an image frame evidence fragment; when the image area to be licensed cannot form a beat-corresponding relationship, the corresponding image frame evidence fragment is marked as source restricted, and it is prohibited to directly determine the quality inspection execution license or sample write-back license based on the image frame evidence fragment.
4. The intelligent industrial quality inspection method based on lightweight edge computing according to claim 1, characterized in that, The specific operation for returning the lag state is as follows: merge the image frame evidence fragments corresponding to the same original image frame into frame-level inference observation records, determine the actual lag from exposure to output based on the imaging time and result return time in the frame-level inference observation records, classify the inference path categories according to the original frame direct inference state, frame skipping replacement state, early retreat inference state and hot frequency reduction state, and statistically analyze the actual lag of continuous shooting beats within the stable operation window. The statistical results are corrected based on the backlog status of the inference queue and the hot frequency reduction status, and the result is returned in a lag state. When the effective statistical sample does not meet the minimum sample requirement determined by the shooting rhythm and thermal state sampling period, the corresponding image frame evidence fragment is marked as insufficient lagging sample.
5. The intelligent industrial quality inspection method based on lightweight edge computing according to claim 1, characterized in that, The specific operation of the candidate product attribution boundary is as follows: based on the product movement position corresponding to the imaging anchor point, the movement time range of the product corresponding to the image area to be permitted to reach the rejection execution position is calculated; based on the production line cycle deviation, product motion measurement error and result return lag uncertainty formed by the same production line calibration record, stable operation window and historical re-inspection sample, the movement time range is boundary corrected to form the candidate product attribution boundary, and the rejection mechanism response error is used as the response conservative amount of the subsequent rejection execution window; when the corrected boundary overlaps with the attribution boundary of adjacent products, the adjacent product attribution conflict boundary is generated.
6. The intelligent industrial quality inspection method based on lightweight edge computing according to claim 5, characterized in that, The specific operation of conflict elimination is as follows: within the candidate product ownership boundary, candidate products are screened, and products that fall into the candidate product ownership boundary at the expected arrival time are identified as candidate products that can participate in the ownership judgment; if a candidate product falls into the ownership conflict boundary of an adjacent product, the unique ownership is not determined according to the order of result return, but the ownership relationship between the candidate product and the image frame evidence fragment is marked as a conflict ownership relationship, and the conflict ownership relationship is used for the same product closure verification.
7. The intelligent industrial quality inspection method based on lightweight edge computing according to claim 1, characterized in that, The specific operation of the same product closure verification is as follows: the valid image frame evidence fragments formed by different camera channels participating in this closure verification are used as the mapping benchmark to determine the candidate products respectively; when each valid image frame evidence fragment points to the same candidate product and no adjacent product closure conflict is triggered, a unique closure is determined; when the candidate products corresponding to different camera channels are inconsistent, or when any valid image frame evidence fragment is in a source-restricted state, the closure result of the same product closure failure of multiple cameras is generated.
8. The intelligent industrial quality inspection method based on lightweight edge computing according to claim 1, characterized in that, The specific operation of quality inspection result diversion is as follows: read the attribution status and conflict cause in the attribution closure result, determine whether the image frame evidence fragment forms a unique attribution closure, and determine whether the current control time is still within the corresponding product's elimination execution window. The elimination execution window is determined by the motion timing range corresponding to the candidate product's attribution boundary and the elimination mechanism's response conditions. If both the unique attribution closure and the elimination execution window meet the requirements, the corresponding image frame evidence fragment is converted into a quality inspection execution permit. If a unique attribution closure is not formed, there is a source restriction status, there is a lag sample insufficiency status, or the elimination execution window has been missed, the corresponding image frame evidence fragment is written into the isolated evidence pool.
9. The intelligent industrial quality inspection method based on lightweight edge computing according to claim 1, characterized in that, The specific operation of sample write-back authorization is as follows: Re-inspection and confirmation are performed on the image frame evidence fragments in the isolated evidence pool. The image area corresponding to the re-inspection result is then compared with the original image area to be authorized for regional acceptance verification. When the re-inspection confirmation forms a unique product attribution, and the image area corresponding to the re-inspection result meets the acceptance requirements for regional overlap, center offset, and defect morphology with the original image area to be authorized, the sample write-back authorization is determined based on the product-level confirmation results formed after re-shooting, slow-down re-inspection, manual confirmation, or re-inspection after rejection. When the re-inspection confirmation does not form a unique product attribution, regional acceptance verification fails, or product-level confirmation results are missing, the isolation state is maintained, and determining sample write-back authorization based on the corresponding image frame evidence fragment is prohibited.
10. An intelligent industrial quality inspection system based on lightweight edge computing, employing the intelligent industrial quality inspection method based on lightweight edge computing as described in any one of claims 1-9, characterized in that, include: The edge evidence fragment construction module, after the product under inspection passes through the image acquisition area and obtains the corresponding edge inference result return record, acquires the edge quality inspection status record corresponding to the current shooting beat at the edge end. The edge quality inspection status record includes imaging record, inference queuing record, inference queuing record, result return record, inference path mark, and product motion synchronization record. The module determines the image area to be permitted through image area permission recognition, and uses the image area to be permitted as the evidence object. Through beat evidence association processing, it forms an image frame evidence fragment containing imaging time, result return time, product motion position, and inference path mark. The hysteresis correction and attribution boundary formation module returns a hysteresis state based on the image frame evidence fragment formation result. Based on the hysteresis state, it determines the imaging anchor point corresponding to the image region to be licensed and forms a candidate product attribution boundary by combining the product motion position in the image frame evidence fragment corresponding to the imaging anchor point. When the candidate product attribution boundary overlaps with the attribution boundary of an adjacent product, an adjacent product attribution conflict boundary is formed. The product attribution closure verification module filters candidate products within the candidate product attribution boundary, performs conflict elimination on the attribution relationship between image frame evidence fragments and candidate products based on the adjacent product attribution conflict boundary, and forms an attribution closure result based on local attribution cost comparison and same product closure verification. The quality inspection approval routing and write-back gating module performs quality inspection result routing based on the attribution closure result and the abnormal state of the image frame evidence fragments. The abnormal state includes at least one of the following: source restriction state, insufficient lagging sample state, timing abnormal state, incomplete product movement position state, incomplete path state, uncalibrated execution response state, and initial calibration mark. Image frame evidence fragments that form a unique attribution closure, do not trigger an abnormal state, and are within the rejection execution window are converted into quality inspection execution approvals. Image frame evidence fragments that do not form a unique attribution closure, trigger an abnormal state, or are not within the rejection execution window are written into the isolation evidence pool. After the re-inspection result and the image area to be approved form an area acceptance and a product-level confirmation result is obtained, the sample write-back approval is determined.