A multi-faceted three-dimensional re-judgment scheduling method and system based on the incoming material window and buffer bit status
By introducing a dynamic scheduling method for the incoming material window and buffer bit status, and a closed-loop verification of physical status words, the problems of production line congestion and equipment idling in multi-faceted re-judgment scheduling are solved, achieving efficient production line operation and system robustness.
Patent Information
- Application Number
- CN202611284109.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-11-10
AI Technical Summary
Traditional multi-faceted review and scheduling methods lead to production line congestion, equipment idling, and state mismatch problems. Especially when inspecting complex products, the inspection equipment is occupied for a long time and subsequent products wait, resulting in poor system robustness.
A multi-faceted three-dimensional re-judgment scheduling method based on the incoming material window and buffer bit status is adopted. By dynamically sensing the production line status, intelligent decision-making scheduling path is made, and a closed-loop verification mechanism of physical status words is introduced to ensure the synchronization of software and hardware status.
It enables staggered execution of complex and simple tasks, maximizes the utilization of testing equipment, avoids production line congestion and equipment idling, improves the overall throughput and production efficiency of the production line, and enhances the robustness and operational reliability of the system.
Smart Images

Figure CN123070588A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of multi-faceted three-dimensional re-judgment scheduling technology, and particularly relates to a multi-faceted three-dimensional re-judgment scheduling method and system based on the incoming material window and the state of the buffer bit. Background Technology
[0002] In the field of automated visual inspection, especially for products that require multi-faceted inspection (such as industrial aluminum boxes), production line scheduling efficiency is the key to determining overall capacity. Traditional scheduling methods typically employ a simple first-in, first-out (FIFO) strategy, meaning that once a product arrives at the inspection station, regardless of the number of faces that need to be scanned subsequently, it must complete scanning of all faces at the current station before it can be released.
[0003] However, this static scheduling method has obvious drawbacks: Production line congestion: When a complex product that requires scanning multiple faces arrives, it occupies the only inspection equipment (such as a 3D camera) for a long time, causing all subsequent products (even simple products that only need to scan one face) to wait, forming a "head-of-line blockage" effect, which seriously reduces the overall cycle time of the production line.
[0004] Equipment idle time: After complex products are removed, if there are no suitable products to be inspected later, the testing equipment may be idle due to lack of tasks, resulting in wasted resources.
[0005] State mismatch risk: Existing systems typically rely on software records to track product positions when managing the buffer area. If a power outage, communication failure, or robot arm misoperation causes a discrepancy between the physical position and the software record, it can easily lead to serious problems such as missed product inspections, duplicate inspections, or even equipment collisions, resulting in poor system robustness.
[0006] Therefore, there is an urgent need for a re-judgment scheduling method that can dynamically sense the production line status, intelligently decide on scheduling paths, and ensure real-time synchronization of software and hardware status, in order to solve the above-mentioned technical problems. Summary of the Invention
[0007] The purpose of this invention is to address the aforementioned technical problems by providing a multi-faceted three-dimensional re-judgment scheduling method and system based on the incoming material window and buffer bit status.
[0008] In view of this, the present invention provides a multi-faceted three-dimensional re-judgment scheduling method based on the incoming material window and buffer bit status, applied to a vision inspection production line including a 3D camera, a robotic arm, a PLC controller, and a buffer area. The method includes the following steps: S1: When the product to be inspected arrives at the 3D inspection station, obtain the set of surfaces to be re-inspected for the product to be inspected; if the set of surfaces to be re-inspected is empty, proceed directly to step S6; if the set of surfaces to be re-inspected is not empty, count the number of remaining surfaces to be re-inspected and proceed to step S2. S2: Determine the incoming material observation window based on the number of remaining surfaces to be re-judged, and obtain the re-judgment status information of subsequent products within the incoming material observation window; S3: Determine whether there are other products with surfaces awaiting re-inspection within the incoming material observation window: If not, the robotic arm is controlled to fix the product to be inspected at the inspection position, and the 3D camera is controlled to continuously scan the faces in the set of faces to be re-judged. If it exists, read the physical status word of the cache area and determine the free cache bit based on the physical status word; S4: If the free cache slot exists, generate a cache scheduling instruction to control the robot to move the product to be inspected to the free cache slot, and update the task status after detecting that the physical state of the free cache slot changes from free to occupied; S5: If there is no free buffer slot, generate a manual diversion instruction to control the robot to transfer the product to be inspected to the manual re-judgment station; S6: When there are no other products with surfaces to be re-judged in the incoming material observation window, select a product to be retrieved from the buffer area. After confirming that the physical state of the buffer position corresponding to the retrieved product is occupied, control the robot arm to retrieve it to the detection position for re-judgment.
[0009] Furthermore, in step S2, determining the incoming material observation window based on the number of remaining surfaces to be re-judged includes: Get the preset maximum viewing width Lmax; The number of remaining surfaces to be re-judged is compared with the maximum observation width, and the smaller of the two values is taken as the actual width L of the incoming material observation window. Alternatively, based on the number of remaining surfaces to be reviewed and the estimated scanning time for each surface, the estimated machine time can be calculated, and the number of workstations in the incoming material observation window can be mapped based on the estimated machine time.
[0010] Furthermore, in step S4, after detecting that the physical state of the free cache bit changes from free to occupied, the task status is updated, specifically including: Send a read command to the PLC controller to periodically obtain the value of the buffer status register; The value of the buffer status register is parsed into a binary bitmap, where each bit corresponds to the physical sensor status of a buffer bit; Monitor the target bit corresponding to the free cache bit. When the value of the target bit changes from 0 to 1 within a preset time, confirm that the entry into the database is successful and bind the task record of the product to be detected to the current cache bit. In step S6, after the robotic arm moves the retrieved product out of the cache position, the value of the corresponding cache position changes from 1 to 0, confirming successful outbound delivery, and the cache position binding information in the task record is cleared.
[0011] Furthermore, in step S6, selecting the retrieved product from the cache includes: Iterate through all currently bound cached task records that still have pending review. The retrieved products are selected according to preset priority rules, which include: the smallest cache bit number, the earliest entry time, or the largest number of remaining surfaces to be reviewed.
[0012] Furthermore, the method also includes an asynchronous result binding step: Before controlling the 3D camera to perform scanning, a detection context containing product number, task number, and face number is generated; When the detection result returned by the 3D camera is received, the product number and face number are extracted from the signal; The detection result is updated to the corresponding face of the corresponding product only when the extracted product number and face number match the record in the detection context, and the scanning or scheduling logic of the next face is triggered.
[0013] Furthermore, the method also includes a state recovery step: Periodically scan the task database to identify target tasks whose status is "in progress" and whose update time exceeds a preset threshold; Reset the facet status of the target task to "pending"; Reread the physical status of the cache bit bound to the target task. If the physical status is empty or does not match the binding information, clear the cache bit binding information of the target task and re-execute step S1.
[0014] Furthermore, in step S3, if the physical status word of the buffer exists, after reading it, the method further includes: If the physical status word shows that all cache bits are occupied, then directly execute step S5 to generate a manual diversion instruction.
[0015] A multi-faceted three-dimensional re-judgment scheduling system based on the incoming material window and buffer bit status includes: The data acquisition module is used to acquire workstation cycle snapshots, PLC buffer status words, and camera / robotic arm feedback signals; The task management module is used to maintain the set of product review surfaces and task status; The scheduling decision module is used to execute the steps of the method as described in any one of claims 1 to 7, and generate scheduling instructions; The equipment coordination module is used to convert the scheduling instructions into task codes and PLC control signals that can be executed by the robot arm, and send them to the corresponding actuators.
[0016] The beneficial effects of this invention are: This application introduces an "incoming material observation window" mechanism to dynamically predict future tasks. When the system detects that the current product is a multi-faceted re-judgment task and there are waiting products, it can intelligently decide to temporarily store it in the cache and prioritize the processing of subsequent simpler tasks. This dynamic scheduling strategy effectively avoids "head-of-line blocking," achieves staggered execution of complex and simple tasks, maximizes the utilization rate of the inspection equipment, and thus significantly improves the overall throughput and production efficiency of the production line.
[0017] The core innovation of this application lies in establishing a "closed-loop verification" mechanism based on PLC physical status words. Whether a product is entering or leaving the warehouse, the system confirms the final completion of the action by real-time monitoring of the physical sensor status in the buffer bit (such as a register bit transitioning from 0 to 1 or from 1 to 0), rather than simply relying on software instruction acknowledgments. This mechanism fundamentally eliminates the state mismatch problem caused by inconsistencies between software records and physical reality, greatly enhancing the system's robustness and operational reliability, and preventing production accidents caused by state confusion.
[0018] This application incorporates a robust anomaly handling and state recovery mechanism. Strict context matching of asynchronous results effectively prevents data corruption caused by out-of-order device responses. Simultaneously, through periodic scanning of "zombie" tasks and secondary physical state verification, the system can automatically detect and repair task suspensions or state anomalies caused by unexpected interruptions, achieving system self-recovery, reducing manual intervention and maintenance costs, and ensuring long-term stable, unmanned operation of the production line. Attached Figure Description
[0019] Figure 1 This is a flowchart of a multi-faceted three-dimensional re-judgment scheduling process driven by the incoming material window; Figure 2 This is a flowchart of the closed-loop verification and retrieval process for the physical state of the cache bit. Detailed Implementation
[0020] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0021] In the description of this application, it should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. For ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters in the following drawings denote similar items; therefore, once an item is defined in one drawing, it need not be further discussed in subsequent drawings.
[0022] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and are not limited in number; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0023] It should be noted that in the description of this application, the directional terms such as "front, back, up, down, left, right", "horizontal, vertical, horizontal" and "top, bottom" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description. Unless otherwise stated, these directional terms do not indicate or imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the scope of protection of this application. The directional terms "inner" and "outer" refer to the inner and outer contours relative to the outline of each component itself.
[0024] It should be noted that, in this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0025] like Figure 1 and Figure 2 As shown in the figure, this application provides a multi-faceted three-dimensional re-judgment scheduling method based on the incoming material window and buffer bit status. This method is applied to a vision inspection production line including a three-dimensional camera, a robot arm, a PLC controller and a buffer area, and aims to solve the problems of production line congestion, equipment idling and task status mismatch caused by rigid scheduling logic in the prior art.
[0026] Example 1: Continuous multi-faceted re-judgment when there is no subsequent re-judgment of incoming materials: This embodiment describes the process by which the system continuously scans the current product when there are no subsequent products to be re-evaluated at the inspection station, in order to maximize equipment utilization.
[0027] Task initialization and window determination: When the product P001 arrives at the 3D inspection station, the system responds to the product arrival event, queries its master record from the task database, and obtains its set of faces to be re-inspected, Fp. Assuming that after filtering, Fp = {face 1, face 2, face 5}, then the remaining number of faces to be re-inspected, Rp = 3.
[0028] The system determines the actual width L of the incoming material observation window based on Rp. In a preferred embodiment, L is calculated using the formula L = min(max(Rp, 1), Lmax), where Lmax is the preset maximum observation width (e.g., Lmax = 5). Therefore, in this example, L = 3. Subsequently, the system queries the workstation cycle mapping module to obtain the pending review status information of all products within the next L workstations. The query reveals that there are no other products with pending review surfaces within this window.
[0029] Perform a continuous scan: Since there are no subsequent tasks in the incoming material observation window, the system determines that this is the best time for continuous scanning to avoid cycle time loss caused by the robot frequently loading and unloading products.
[0030] The system first generates a unique detection context K1=(Product No.:P001, Task No.:Q001, Face No.:1) for face 1.
[0031] Send a preparation command to the 3D camera, which includes parameters such as product number and face number.
[0032] Upon receiving the camera's readiness response, the system verifies whether the product number and face number in the response match K1. If the match is successful, the system sends a "first face scan" task command to the robotic arm.
[0033] The robotic arm performs grasping and positioning actions, while the 3D camera completes the scanning of surface 1.
[0034] Result processing and looping: The system receives the detection results returned by the 3D camera, matches it to face 1 of task P001 based on the product number and face number, and updates its status to "completed".
[0035] After completing one side, the system does not directly scan the next side, but instead re-executes the window determination step.
[0036] If there are still no new products awaiting re-evaluation in the window, the system will continue to use the "continuous surface scanning" mode to efficiently complete the inspection of surfaces 2 and 5 sequentially. This process forms a dynamic decision-making closed loop, ensuring that complex tasks can be completed with maximum efficiency when the production line is idle.
[0037] Example 2: Buffering and Retrieval When Subsequent Incoming Materials Exist: This embodiment describes the process by which the system temporarily stores the current product in the cache when a subsequent product to be re-evaluated is detected, and retrieves it at an appropriate time, so as to achieve dynamic balance of production line cycle time.
[0038] Caching decisions: Product P002 arrives at the workstation, and the system detects that it has 5 surfaces awaiting re-inspection (Rp=5). Within the incoming material observation window (L=5), the system finds that product P003 at the subsequent workstation also has surfaces awaiting re-inspection. To prevent P002 from occupying the only 3D camera for an extended period, causing P003 to wait and thus leading to production line congestion, the system decides to move P002 into the buffer area.
[0039] Cache insertion and closed-loop verification: The system sends a read command to the PLC controller to periodically (e.g., every 200ms) retrieve the value of the buffer status register (e.g., D926). Assuming the return value is binary 00101, it indicates that buffer bits 1 and 3 are occupied.
[0040] The system parses the values in the buffer status register into a binary bitmap, where each bit corresponds to the physical sensor status of a buffer bit. Following the rule of "lowest free bit first," the system selects buffer bit 2 as the target location.
[0041] The system sends a task instruction to the robotic arm to "place in buffer bit 2".
[0042] Key Step (Inbound Verification): Upon receiving the "task completed" receipt from the robotic arm, the system does not immediately consider the inbound process successful. Instead, it initiates a verification loop, continuously monitoring the status of bit 2 (bit 1) of the D926 register. Only when this bit changes from 0 (free) to 1 (occupied) does the system finally confirm that product P002 has been successfully inbound and persist the "P002 - cache bit 2" binding relationship to the task master record. If no status change is detected within a timeout, it is judged as a cache anomaly, triggering an alarm. This closed-loop verification of the physical status fundamentally eliminates the risk of inconsistency between software records and physical reality.
[0043] Cache retrieval and closed-loop verification: After P002 is temporarily stored, the system continues to process other products on the main line. When there are no more new products awaiting re-judgment in the incoming material observation window, the system begins to retrieve products from the buffer.
[0044] The system iterates through all task records that have been bound to cache bits and still have surfaces to be reviewed, and selects P002 according to preset rules (such as the smallest cache bit number).
[0045] Key step (pre-outbound verification): Before sending the retrieval command, the system will read the D926 register again to confirm that the status of cache bit 2 is still 1 (occupied) to prevent the product from being moved away accidentally.
[0046] After confirmation, the system sends a combined task to the robotic arm: "Retrieve from cache bit 2 and scan".
[0047] Key step (post-outbound verification): After the robotic arm completes the retrieval action, the system re-enters the verification loop, monitoring whether bit 1 of register D926 changes from 1 (occupied) back to 0 (idle). After confirming the status change, the system clears the cache bit binding information in task record P002 and continues to complete the remaining verification process.
[0048] Example 3: Anomaly Handling and State Recovery This embodiment describes how the system responds to situations such as device communication anomalies and process restarts to ensure that tasks are not lost or duplicated, thus guaranteeing the robustness of the system.
[0049] Asynchronous result binding: Before each scan, the system generates a detection context for the current task, which includes the product number, task number, and face number.
[0050] When the 3D camera or robot returns asynchronous signals (such as detection results or task completion receipts), the system first extracts the product number and face number from the signal.
[0051] The system will only process a signal and update the status of the corresponding product's surface if the extracted information matches the record in the currently executing detection context. Any mismatched or delayed signal will be treated as an invalid or abnormal signal, thus eliminating the risk of incorrect results due to out-of-order device responses.
[0052] State recovery mechanism: The system runs a scheduled recovery task in the background, which periodically (e.g., every 5 minutes) scans the task database to find all "zombie" tasks whose status is "running" but whose update time exceeds a preset threshold (e.g., 10 minutes).
[0053] Once such a task is detected (e.g., due to an unexpected process restart), the system will reset its status to "pending".
[0054] Subsequently, the system will read the corresponding physical status word in the PLC for secondary verification based on the cache bit information saved in the task record. If it is found that the software records the product in cache bit 2, but the physical status word shows bit 2 as 0 (empty), the data is determined to be inconsistent. The system will automatically clear the cache bit binding information of the task and reschedule it as a newly arrived product, or transfer it to manual processing, thereby avoiding duplicate scanning or missed scanning caused by status mismatch.
[0055] In summary, the embodiments of this application achieve forward-looking dynamic scheduling through the "material inlet window," ensure a high degree of consistency between hardware and software states through "physical state closed-loop verification," and guarantee the stable operation of the system through a sound anomaly recovery mechanism, effectively improving the overall efficiency and reliability of the visual inspection production line.
[0056] The embodiments of this application have been described above with reference to the accompanying drawings. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. This application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A multi-faceted three-dimensional re-judgment scheduling method based on the incoming material window and buffer bit status, characterized in that, Applied to a vision inspection production line including a 3D camera, robotic arm, PLC controller, and buffer area, the method includes the following steps: S1: When the product to be inspected arrives at the 3D inspection station, obtain the set of surfaces to be re-inspected for the product to be inspected; if the set of surfaces to be re-inspected is empty, proceed directly to step S6; if the set of surfaces to be re-inspected is not empty, count the number of remaining surfaces to be re-inspected and proceed to step S2. S2: Determine the incoming material observation window based on the number of remaining surfaces to be re-judged, and obtain the re-judgment status information of subsequent products within the incoming material observation window; S3: Determine whether there are other products with surfaces awaiting re-inspection within the incoming material observation window: If not, the robotic arm is controlled to fix the product to be inspected at the inspection position, and the 3D camera is controlled to continuously scan the faces in the set of faces to be re-judged. If it exists, read the physical status word of the cache area and determine the free cache bit based on the physical status word; S4: If there is an idle cache slot, generate a cache scheduling instruction to control the robot to move the product to be inspected to the idle cache slot, and update the task status after detecting that the physical state of the idle cache slot has changed from idle to occupied. S5: If there is no free buffer space, generate a manual diversion instruction to control the robot to transfer the product to be inspected to the manual re-judgment station; S6: When there are no other products with surfaces to be re-judged in the incoming material observation window, select a product to be retrieved from the buffer area. After confirming that the physical state of the buffer position corresponding to the retrieved product is occupied, control the robot arm to retrieve it to the detection position for re-judgment.
2. The method according to claim 1, characterized in that, In step S2, determining the incoming material observation window based on the number of remaining surfaces to be re-judged includes: Get the preset maximum viewing width Lmax; The number of remaining surfaces to be re-judged is compared with the maximum observation width, and the smaller of the two values is taken as the actual width L of the incoming material observation window. Alternatively, based on the number of remaining surfaces to be reviewed and the estimated scanning time for each surface, the estimated machine time can be calculated, and the number of workstations in the incoming material observation window can be mapped based on the estimated machine time.
3. The method according to claim 1, characterized in that, In step S4, after detecting that the physical state of the free cache bit has changed from free to occupied, the task status is updated, specifically including: Send a read command to the PLC controller to periodically obtain the value of the buffer status register; The value of the buffer status register is parsed into a binary bitmap, where each bit corresponds to the physical sensor status of a buffer bit; Monitor the target bit corresponding to the free cache bit. When the value of the target bit changes from 0 to 1 within a preset time, confirm that the entry into the database is successful and bind the task record of the product to be detected to the current cache bit. In step S6, after the robotic arm moves the retrieved product out of the cache position, the value of the corresponding cache position changes from 1 to 0, confirming successful outbound delivery, and the cache position binding information in the task record is cleared.
4. The method according to claim 1, characterized in that, In step S6, selecting the retrieved product from the cache includes: Iterate through all currently bound cached task records that still have pending review. The retrieved products are selected according to preset priority rules, which include: the smallest cache bit number, the earliest entry time, or the largest number of remaining surfaces to be reviewed.
5. The method according to claim 1, characterized in that, The method also includes an asynchronous result binding step: Before controlling the 3D camera to perform scanning, a detection context containing product number, task number, and face number is generated; When the detection result returned by the 3D camera is received, the product number and face number are extracted from the signal; The detection result is updated to the corresponding face of the corresponding product only when the extracted product number and face number match the record in the detection context, and the scanning or scheduling logic of the next face is triggered.
6. The method according to claim 1, characterized in that, The method further includes a state recovery step: Periodically scan the task database to identify target tasks whose status is "in progress" and whose update time exceeds a preset threshold; Reset the facet status of the target task to "pending"; Reread the physical status of the cache bit bound to the target task. If the physical status is empty or does not match the binding information, clear the cache bit binding information of the target task and re-execute step S1.
7. The method according to claim 1, characterized in that, In step S3, if the physical status word of the cache exists, after reading it, the method further includes: If the physical status word shows that all cache bits are occupied, then directly execute step S5 to generate a manual diversion instruction.
8. A multi-faceted three-dimensional re-judgment scheduling system based on the incoming material window and buffer bit status, characterized in that, include: The data acquisition module is used to acquire workstation cycle snapshots, PLC buffer status words, and camera / robotic arm feedback signals; The task management module is used to maintain the set of product review surfaces and task status; The scheduling decision module is used to execute the steps of the method as described in any one of claims 1 to 7 to generate scheduling instructions; The equipment coordination module is used to convert the scheduling instructions into task codes and PLC control signals that can be executed by the robot arm, and send them to the corresponding actuators.
