A method and system for controlling multi-specification singulation of RFID tags
By calculating the relationship between the execution time of the action record and the arrival of the tag in the RFID tag production process, the problem of determining the target tag of the action record in the process of changing orders for multiple specifications is solved, and the accurate execution and continuous processing of the action are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI FANDIAN INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2026-03-31
- Publication Date
- 2026-06-30
AI Technical Summary
In RFID tag production, during the process of changing orders for multiple specifications, existing technology cannot effectively determine whether the target tag with action records that have been generated but not yet executed before the order change is still within the valid range of allowed actions. This may result in residual actions from the previous order affecting the tags of the next order, or the omission of processing that should have been performed at the end of the previous order due to premature clearing of action records.
By acquiring order information, workstation spacing, and conveyor speed from edge computing nodes, the execution time of action records is calculated. Combined with the detection time of the label after order change and the workstation trigger time, the correspondence between the target label of the action record and the actual label in place is determined. Consistent action records are retained, and inconsistent action records are deleted to ensure accurate execution of actions.
This avoids the impact of residual actions from the previous order on the next order, improves the accuracy of action judgment, reduces the probability of misaligned actions, and ensures the continuity and integrity of the order change process.
Smart Images

Figure CN122308193A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of RFID tag production control technology, and more specifically, to a method and system for switching control of multiple specifications of RFID tags. Background Technology
[0002] In RFID tag production control, the existing processing mainly revolves around whether each process can continue to be stably connected according to the new production requirements after the order is switched. The common approach is to switch the order parameters by the edge computing node or the field control unit after receiving the order change instruction, and retain, clear or postpone the cache records, abnormal queues or instructions to be executed. Combined with fixed delay, preset clearing quantity, first piece verification and other means, the coding, review and rejection links are gradually transferred to the next order. Taking a continuously conveying RFID tag production line as an example, after the front end completes the coding and anomaly judgment, the rejection action often needs to travel a certain conveying distance before being executed in the back end. However, when changing orders without stopping the line, when changes in tag specifications lead to changes in cycle time, when there are fixed physical intervals between front and back workstations, and when the processing results of each workstation need to be aggregated and sent down for execution in real time by edge computing nodes, the rejection, rewriting, or rework actions corresponding to the last tag of the previous order may not have been completed before the next order's tag has already entered the corresponding execution area. In this case, the existing method of processing according to the order switching time, whether the cache is cleared, or whether the instruction is still retained is prone to two types of results that can be directly observed and verified: one is that the subsequent actions formed by the previous order continue to fall on the next order's tag, and the other is that after clearing the pending actions in advance to avoid misoperation, the processing that should have been completed at the end of the previous order is missing. The reason for the above problem is that the existing edge computing control logic can identify whether there are still historical action records in the system, but it cannot further confirm whether the target label corresponding to the historical action is still within the effective range that allows the action to actually take effect. Therefore, how to use edge computing to determine the target validity of subsequent actions that have been generated but not yet executed before the order is changed during the process of changing multiple specifications of RFID tags, so as to avoid the residual actions of the previous order affecting the tags of the next order, or to avoid missing the processing that should be performed at the end of the previous order when clearing residual actions. Summary of the Invention
[0003] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a method and system for controlling the switching of multiple specifications of RFID tags. The method calculates the target tag by analyzing the action records generated but not yet executed before the switch, and combines the actual tags that have been delivered after the switch to determine the validity of each action record and continuously update it, thereby solving the problems mentioned in the background art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a method for switching control of multiple specifications of RFID tags, comprising: S1. Obtain the current order, next order, distance between workstations, conveying speed, detection time of each tag passing the detection position, and action records generated before the order change but not yet executed from the edge computing node. Calculate the execution time of the target tag corresponding to each action record arriving at the execution workstation according to the distance between workstations and the conveying speed. Bind each action record to the corresponding target tag and output the set of actions to be executed. S2. Obtain the detection time of each tag after the order change, the trigger time of each workstation, and the set of actions to be executed. For each action record in the set of actions to be executed, calculate the corresponding label when the action arrives at the workstation according to the detection time of the target tag bound to it, the execution time of the corresponding workstation, and the actual passing order of each tag after the order change, and output the label result corresponding to the action. S3. Obtain the label results corresponding to the action. Compare the target label bound to each action record with its calculated position label. If the two are the same, retain the action record. If the two are different, delete the action record. Output the retained action set and the deleted action set. S4. Obtain the set of reserved actions, the real-time arrival tags of the execution station, and the station execution feedback. Compare the real-time arrival tags with the target tags in the set of reserved actions one by one. When the comparison is consistent, send the execution instruction corresponding to the action record to the corresponding execution station, record the executed actions and the non-executed actions, and output the execution result set. S5. Obtain the deletion action set and execution result set, delete the action records in the deletion action set, retain the action records in the execution result set corresponding to the unexecuted actions and whose target labels have not yet reached the execution station, clear the action records corresponding to the executed actions in the execution result set, and output the action processing results after the change of order.
[0005] In a preferred embodiment, S1 includes: S1-1. Extract the action generation station, execution station, action type, generation time and source tag identifier from the action record, and read the detection time of the detection position corresponding to the source tag identifier, and generate the action source table according to the correspondence between the source tag identifier and the detection time. S1-2. Based on the action generation station and execution station in the action source table, and combined with the distance between each station and the conveying speed, the conveying time of the action record is calculated by dividing the distance between the action generation station and the execution station by the conveying speed. Then, the conveying time is added to the generation time to obtain the execution time of each action record, and the action time table is output. S1-3. For each action record in the action timetable, read the detection time corresponding to its source label identifier, multiply the time difference between the detection time and the execution time by the conveying speed to obtain the target conveying distance, divide the target conveying distance by the label pitch corresponding to the current label specification and take the integer result as the forward label number, forward the source label identifier according to the forward label number to obtain the target label identifier, and write each action record and the corresponding target label identifier into the action set to be executed.
[0006] In a preferred embodiment, S2 includes: S2-1. Read the detection time of each label after the order change, the trigger time of each workstation, and the action records of each action set to be executed. For each action record, extract the detection time of the target label bound to it at the detection position and the execution time of the corresponding execution workstation. Multiply the time difference between the execution time and the detection time by the conveying speed to obtain the forward pushing distance. Then, divide the forward pushing distance by the label pitch of the current label specification to determine the benchmark order. The labels corresponding to the benchmark order and their adjacent labels before and after them form a candidate in-place label sequence. S2-2. For each candidate positioning label in the candidate positioning label sequence of each action record, calculate the time difference between the trigger time and the execution time of the candidate positioning label at the execution station, calculate the order difference of the candidate positioning label relative to the bound target label, calculate the corresponding difference between the trigger time intervals on both sides of the candidate positioning label and the detection time intervals on both sides of the bound target label, and add the time amount corresponding to the time difference, the order difference and the corresponding difference to obtain the corresponding cost of each candidate positioning label, and output the action candidate table.
[0007] In a preferred embodiment, S2 includes: S2-3. Read the action candidate table in the order of execution time of each action record. For candidate combinations that maintain an increasing order of arrival labels between adjacent action records and do not repeat, accumulate the corresponding cost and the difference between the execution time difference of adjacent action records and the trigger time difference of adjacent candidate arrival labels. Take the candidate combination with the smallest cumulative result as the arrival label combination of each action record and output the initial action corresponding label result. S2-4. Substitute each position tag in the initial action corresponding tag result back to the trigger time of each workstation, recalculate the remaining time difference between the execution time of each action record and the trigger time of the corresponding position tag, and use the remaining time difference to correct the forward push distance before executing S2-1 to S2-3 again until the position tag combination obtained in the previous two times is exactly the same, and output the action corresponding tag result.
[0008] In a preferred embodiment, S3 includes: S3-1. Read the action record, target label and position label in the action corresponding label result according to the execution time of each action record. Sequentially form the target label corresponding to each action record into a target sequence, sequentially form the position label corresponding to each action record into a position sequence, and output the sequence lookup table. S3-2. Based on the sequence lookup table, perform sequential alignment of the target sequence and the position sequence. Under the constraints of keeping the order of the labels unchanged and each position label corresponding to only one action record, calculate the retention value obtained when the target label and the position label are the same, the deletion value obtained when the target label is deleted, and the skip value obtained when the position label is skipped for each position. Determine the optimal alignment path based on the result of the maximum cumulative retention value and the minimum cumulative deletion value when the cumulative retention values are the same, and output the action judgment table.
[0009] In a preferred embodiment, S3 further includes: S3-3. Backtrack each action record along the optimal alignment path, write the action records in the path whose target label is the same as the position label into the retained action set, and write the action records in the path whose target label is different from the position label and those that have not entered the alignment result into the deleted action set. Output the retained action set and the deleted action set.
[0010] In a preferred embodiment, S4 includes: S4-1. Read the action record identifier, target label, execution station, execution time, and action type from the retained action set, as well as the real-time arrival label, arrival time, and feedback time in the station execution feedback of the execution station. Sort each action record in the same execution station in ascending order of execution time to form an action sequence. Sort each real-time arrival label in the same execution station in ascending order of arrival time to form an arrival sequence. Pair each action record with the real-time arrival label that is the same as the target label one by one, calculate the absolute value of the time difference between the execution time and the arrival time, and output the candidate correspondence table.
[0011] In a preferred embodiment, S4 further includes: S4-2. For each candidate correspondence in the same execution station in the candidate correspondence table, the absolute value of the time difference of each candidate correspondence is accumulated item by item in the order of the action sequence. Only candidate combinations that satisfy the condition that the position of the real-time arrival tag corresponding to the previous action record in the arrival sequence is less than the position of the real-time arrival tag corresponding to the next action record in the arrival sequence are retained. The candidate combination with the smallest cumulative absolute value of time difference is selected from all candidate combinations as the correspondence result between the action record and the real-time arrival tag. The matched action record and the unmatched action record are output. S4-3. Send execution instructions to the corresponding execution station according to the matching action records, and record the matching action records that have received completion feedback as executed actions based on the action record identifier and feedback results in the station execution feedback. Record the matching action records that have not received completion feedback and the unmatched action records as unexecuted actions, and output the execution result set.
[0012] In a preferred embodiment, S5 includes: S5-1: Read the action records in the deletion action set and the executed actions, unexecuted actions, target tags, and execution stations in the execution result set; delete the action records in the deletion action set; delete the action records corresponding to the executed actions; and output the remaining action table. S5-2. For each unexecuted action in the remaining action list, read the latest detection record of its target label at the detection position, and calculate the remaining arrival time by dividing the distance between the target label's most recent detection time and the corresponding execution position by the conveying speed. Unexecuted actions with a remaining arrival time greater than zero are retained in the remaining action list, and unexecuted actions with a remaining arrival time less than or equal to zero are deleted. Output the retained action list. S5-3. Reorder each action record in the retained action table according to the execution position and execution time, write it back to the action set to be executed, and output the action processing result after the change of order.
[0013] A multi-specification RFID tag changeover control system includes: The binding calculation module is used to obtain the current order, the next order, the distance between each workstation, the conveying speed, the detection time of each tag passing the detection position, and the action records generated before the order change but not yet executed, received by the edge computing node. It calculates the execution time of the target tag corresponding to each action record arriving at the execution workstation according to the distance between each workstation and the conveying speed, binds each action record to the corresponding target tag, and outputs the set of actions to be executed. The arrival determination module is used to obtain the detection time of each tag after the order change, the trigger time of each workstation, and the set of actions to be executed. For each action record in the set of actions to be executed, according to the detection time of the target tag bound to it at the detection position, the execution time of the corresponding workstation of the action, and the actual passing order of each tag after the order change, the module calculates the arrival tag corresponding to the action when the action arrives at the execution workstation and outputs the tag result corresponding to the action. The consistent filtering module is used to obtain the tag results corresponding to the action. It compares the target tag bound to each action record with its calculated local tag. If the two are the same, the action record is retained; if they are different, the action record is deleted. The module outputs the set of retained actions and the set of deleted actions. The matching execution module is used to obtain the set of retained actions, the real-time arrival tags of the execution station, and the station execution feedback. It compares the real-time arrival tags with the target tags in the set of retained actions one by one. When the comparison matches, it sends the execution instruction corresponding to the action record to the corresponding execution station, records the executed actions and the non-executed actions, and outputs the execution result set. The results processing module is used to obtain the deletion action set and the execution result set, delete the action records in the deletion action set, retain the action records in the execution result set corresponding to the unexecuted actions and whose target tags have not yet reached the execution station, clear the action records corresponding to the executed actions in the execution result set, and output the action processing results after the change of order.
[0014] The technical effects and advantages of this invention are as follows: 1. By calculating the execution time, target label, and actual arrival label of the action records generated but not yet executed before the order is changed, and determining whether the target label is still within the scope of action, it can relatively avoid the residual actions of the previous order from continuing to affect the label of the next order, or the absence of the processing that should be performed at the end of the previous order due to the early clearing of action records; 2. By combining the source label detection time, workstation spacing, conveying speed and label pitch to calculate the target label, and then using the post-change detection record and workstation trigger record to determine the actual label in place, subsequent actions can form a continuous correspondence with specific label objects, thereby relatively improving the problem of misaligned action objects caused by processing only according to the change time or cache state. 3. By aligning the execution order of the target label and the location label, and retaining consistent actions while deleting inconsistent actions, effective filtering can be achieved while maintaining the overall order of action records. This reduces the probability of misaligned actions continuing to enter the execution chain and improves the accuracy of action judgment during the order change process. 4. By performing workstation matching and instruction issuance only on the retained action set, and processing and writing back the records of executed actions, unexecuted actions, and actions that have not yet reached the execution workstation, the action set to be executed can be continuously updated, thereby improving the continuity of subsequent processing of change orders to a certain extent and relatively alleviating the problems of action residue, duplicate execution, and missed execution. Attached Figure Description
[0015] Figure 1 This is a flowchart of the method steps of the present invention.
[0016] Figure 2 This is a schematic diagram of the system modules of the present invention. Detailed Implementation
[0017] 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.
[0018] Refer to the instruction manual appendix Figure 1-2 The present invention provides a method for switching control of multiple specifications of RFID tags, comprising: S1. Obtain the current order, next order, distance between workstations, conveying speed, detection time of each tag passing the detection position, and action records generated before the order change but not yet executed from the edge computing node. Calculate the execution time of the target tag corresponding to each action record arriving at the execution workstation according to the distance between workstations and the conveying speed. Bind each action record to the corresponding target tag and output the set of actions to be executed. In this implementation, S1 is used to establish a clear correspondence between action records that have been formed but not yet executed before the order change and tags that may actually arrive at the execution station later. This ensures that subsequent calculations of arrival tags, filtering of action records, and issuance of execution instructions are all based on a unified data object and a unified time and distance caliber. In specific processing, action records are not directly sent to subsequent steps. Instead, source expansion, execution time calculation, and target tag determination are completed sequentially. This ensures that each action record simultaneously has a source tag identifier, execution station, execution time, and target tag identifier, thereby avoiding situations where the action object is unclear, the time caliber is inconsistent, or the tag sequential basis is missing. This implementation process includes the following steps: First, source expansion is performed on action records generated before the order change but not yet executed. This establishes a one-to-one correspondence between each action record and the detection time of the corresponding source tag at the detection position, providing a unified input for subsequent time calculations. The edge computing node reads the action record identifier, action generation station, execution station, action type, generation time, and source tag identifier from the action record table one by one. The action record is generated by the front-end station when it detects a need for removal, addition, rework, or other subsequent processing, and uses the action record identifier as a unique identifier throughout the entire process. Then, using the source tag identifier as the search key, the node retrieves the action record from the tag's location. The record table reads the detection time of the corresponding tag passing the detection position. The detection time is written using the unified time base of the edge computing node. If the detection device uploads the local time of the workstation, it is first converted according to the unified clock of the edge computing node before being written into the tag passing record table. After obtaining the source tag identifier and the detection time, the action record identifier, action generation workstation, execution workstation, action type, generation time, source tag identifier and detection time are written into the action source table in a fixed field order. The action source table is established with action records as the row unit. When the same source tag identifier corresponds to multiple action records, they are retained separately and not merged. When an action record has a source tag but the tag has not yet been retrieved in the record table, the action record is written to the pending area of the action source table. After the corresponding tag passes the detection position, the detection time is written and then read by subsequent steps. Secondly, the execution time of each action record in the action source table is calculated. This is to determine the time position when the action record should arrive at the execution station based on the actual path relationship between the action generation station and the execution station along the conveying direction. The edge computing node reads the action record identifier, action generation station, execution station and generation time from the action source table one by one. Then it reads the station spacing between the action generation station and the execution station along the label conveying direction from the station path table. The station spacing is obtained by accumulating the path length between the action points of adjacent stations. At the same time, the conveying speed in the corresponding time period is read. The conveying speed is taken as the statistical value of the conveying speed in the time window where the generation time is located. In this embodiment, the average value of the encoder sampling speed sequence is used as the calculated value. If the production line runs at a constant speed, the current conveying speed saved by the edge computing node is read directly. Next, the conveying time is obtained by dividing the workstation spacing by the conveying speed. Then, the conveying time is added to the generation time to obtain the execution time of the action record. The action record identifier, action generation workstation, execution workstation, generation time, conveying time, and execution time are written into the action time table. When the conveying speed record in the corresponding time window is missing, the average conveying speed of the adjacent consecutive valid sampling segments is read first for supplementation. If a valid conveying speed still cannot be formed, the action record is written into the supplementation area of the action time table. The execution time is recalculated after the speed data is recovered. Finally, a target label identifier is determined for each action record in the action timetable. This is to convert the action record, which was originally only associated with the source label, into an action record to be executed that can directly point to the subsequent execution object. The edge computing node reads the action record identifier, source label identifier, execution time, and detection time corresponding to the source label identifier in the action timetable one by one. The time difference is obtained by subtracting the detection time from the execution time. The time difference is then multiplied by the conveying speed to obtain the target conveying distance. The conveying speed maintains the same value as in the previous step. Then, the label pitch corresponding to the current label specification is read. The label pitch is defined as the conveying distance between the leading edges of two adjacent labels of the same specification and the corresponding detection position. In this embodiment, it is obtained by statistically analyzing the continuous detection records of the label of this specification, or it can be directly read from the specification configuration table. Next, the target conveying distance is divided by the tag pitch and rounded down to obtain the number of forward-push tags. The edge computing node then locates the position of the source tag identifier from the tag sequence table arranged in ascending order of detection time, shifts the position backward by the number of forward-push tags, obtains the tag identifier corresponding to the shifted position as the target tag identifier, and writes the action record identifier, action type, execution station, execution time, source tag identifier, and target tag identifier into the action set to be executed. When the forward-push position exceeds the range already recorded in the current tag sequence table, the action record is written to the area to be filled in the action set to be executed, and the required forward-push position is recorded. After subsequent tags continue to pass the detection position and enter the tag sequence table, the target tag identifier is written in. Through the above processing, the action records generated before the order change but not yet executed are organized into action records to be executed that simultaneously have source label basis, execution time basis, and target label basis. Subsequent determination of the arrival label, retention and deletion of action records, and issuance of instructions to the execution station can all be carried out continuously around the same action record identifier and target label identifier, thereby reducing subsequent processing deviations caused by inconsistent time bases, inconsistent label progression, or unclear action objects. In practical applications: When the coding detection station detects that tag T105 needs to be removed, an action record is first generated, including the action record identifier, the action generation station, the execution station, the action type, the generation time, and the source tag identifier. The edge computing node reads the detection time when tag T105 passes through the detection station, and then calculates the conveying time based on the station spacing between the coding detection station and the removal station and the conveying speed within the corresponding time period. This time is then added to the generation time to obtain the execution time. Subsequently, based on the time difference between the detection time and the execution time, the tag pitch of the current specification tag, and the arrangement position in the tag sequence table, tag T105 is pushed forward to obtain the target tag identifier, such as tag T109. This removal action record and tag T109 are written together into the action set to be executed, so that the action record should still be executed when tag T109 arrives at the removal station.
[0019] S2. Obtain the detection time of each tag after the order change, the trigger time of each workstation, and the set of actions to be executed. For each action record in the set of actions to be executed, calculate the corresponding label when the action arrives at the workstation according to the detection time of the target tag bound to it, the execution time of the corresponding workstation, and the actual passing order of each tag after the order change, and output the label result corresponding to the action. In this embodiment, S2 is used to determine the actual location tag corresponding to each action record at the execution station after the order is changed, based on the actual record of the tag passing the detection position, the actual trigger record of the execution station, and the target tag identifier in the action set to be executed. This provides a direct basis for the subsequent division of action sets to be retained and deleted. This process is not just static matching based on the target tag identifier, but first forming a baseline order based on the time relationship between the execution time and the detection time, then generating a candidate location tag sequence around the baseline order, then calculating the corresponding cost for each candidate location tag, and finding the location tag combination with the smallest cumulative result without destroying the overall sequential relationship of the action records. Finally, the initial result is back-substituted and corrected using the execution station trigger time, so that the correspondence between the action record and the location tag simultaneously satisfies the local temporal consistency of a single action record and the overall sequential consistency of all action records. This implementation process includes the following steps: First, a candidate arrival tag sequence is established for each action record in the action set to be executed. The purpose is to narrow down the range of arrival tags that the action record may correspond to at the execution station based on the target tag and execution time bound to the action record, so as to avoid comparing each tag item in the entire tag range later. The edge computing node reads the detection time of each tag after the order change, the trigger time of each station, and each action record in the action set to be executed. The detection time of each tag after the order change is written into the tag passage record table according to a unified time base when the tag passes the detection position. The trigger time of each station is written into the station trigger record table when the corresponding execution station reaches its position. Subsequently, for each action record, the target tag identifier bound to it, the detection time of the target tag at the detection position, and the execution time of the corresponding execution position of the action record are extracted. The time difference is obtained by subtracting the detection time from the execution time, and then the time difference is multiplied by the conveying speed to obtain the forward push distance. The conveying speed adopts the same value caliber as S1, that is, the average conveying speed within the corresponding time window is taken. Next, the label pitch corresponding to the current label specification is read. The label pitch is the conveying distance between the leading edges of two adjacent labels of the same specification and the corresponding detection position. The reference order is determined by dividing the forward distance by the label pitch. The reference order corresponds to the theoretical forward position of the target label in the label passing sequence list after the order change. The edge computing node then reads the label corresponding to the reference order from the label passing sequence list arranged in ascending order of detection time, and takes the labels before and after the label to form a candidate in-place label sequence. In this embodiment, it is preferred to take the label corresponding to the reference order, the previous label, and the next label to form a candidate in-place label sequence with a length of three. If the reference order is located at the beginning or end of the sequence list, only the actual adjacent labels are taken. Finally, the action record identifier, target label identifier, execution position, execution time, and candidate in-place label sequence are written into the candidate label table for subsequent steps to read. When the reference order exceeds the recorded range of the current label passing sequence list, the action record is written into the waiting area of the candidate label table. After the subsequent labels pass the detection position and the sequence list is filled, the candidate in-place label sequence is regenerated. Secondly, the cost is calculated for each candidate label in the candidate arrival label sequence. This quantifies the proximity between the target label and the actual trigger record of the execution station into a unified value, facilitating subsequent comparable combination selection. The edge computing node reads the action record identifier, target label identifier, execution station, execution time, and candidate arrival label sequence from the candidate label table. For each candidate arrival label, it first reads the trigger time of the candidate arrival label at the execution station from the station trigger record table and calculates the time difference between the trigger time and the execution time. Then, it reads the sequence position difference of the candidate arrival label relative to the target label from the label passage sequence table, multiplies this sequence difference by the label pitch and divides it by the conveyor speed to convert it into the time amount corresponding to the sequence difference. Next, it reads the trigger times of the adjacent labels on both sides of the candidate arrival label at the execution station, calculates the forward trigger time distance and backward trigger time distance between the candidate arrival label and the previous and subsequent labels at the execution station, and so on. The system reads the detection times of adjacent tags on both sides of the target tag at the detection position, calculates the forward and backward detection time distances between the target tag and the previous and next tags at the detection position, and then calculates the difference between the time distances in the same direction and takes the absolute value. The forward difference and the backward difference are then added together to obtain the corresponding difference. Subsequently, the absolute value of the time difference, the time amount corresponding to the order difference, and the corresponding difference are added together to obtain the corresponding cost for the candidate tag in place. After calculating the corresponding cost for all candidate tags in place for the same action record, the action record identifier, the identifier of each candidate tag in place, and their corresponding cost are written into the action candidate table. When a candidate tag in place lacks a trigger time at the execution position, the action record is not deleted, but only the corresponding item of the candidate tag in place is deleted. When the target tag lacks the detection time of the adjacent tags in the forward or backward direction at the detection position, the corresponding difference is calculated only for the time distance on the actually obtainable side, and the time distance difference on the unobtained side is recorded as zero and added to the summation to ensure that the corresponding cost can still be calculated. Then, a comprehensive combination selection is performed on the candidate results in the action candidate table. This aims to maintain the continuous and non-repeating order of the arrival labels at the level of all action records, and to minimize the cumulative deviation of all action records. Edge computing nodes read the action candidate table in the chronological order of the execution times of each action record, forming an action record sequence from the action records belonging to the same execution station and arranged consecutively in execution time. For the first action record in the action record sequence, each of its candidate arrival labels is taken as the starting combination. For the subsequent action record, only candidates that meet two conditions are retained from its candidate arrival labels to participate in the combination expansion: the first condition is that the label order of the candidate arrival label at the execution station is greater than the label order of the already selected arrival labels in the previous action record; the second condition is that the candidate arrival label is not related to the previously selected arrival labels. Label duplication; Under the premise of satisfying the above conditions, for each expanded candidate combination, the corresponding cost corresponding to each action record in the combination is accumulated one by one, and the absolute value of the difference between the execution time difference of adjacent action records and the trigger time difference of adjacent candidate landing labels is further calculated. The absolute value of the difference is added to the cumulative result to obtain the cumulative result of the candidate combination; After the edge computing node completes the accumulation of all legal candidate combinations, it selects the candidate combination with the smallest cumulative result as the landing label combination of the action records, and writes the action record identifier and the corresponding landing label identifier into the initial action corresponding label result table; When there is no candidate landing label that satisfies the condition of increasing order and no repetition for a certain action record, the action record identifier is written into the undetermined area of the initial action corresponding label result table and participates in the calculation again in the subsequent correction; Finally, a back-substitution correction is performed on the initial action-corresponding label results. This corrects the forward push distance using the actual trigger time of the execution station, eliminating deviations obtained solely from the initial forward push relationship, and ensuring the action-corresponding label results converge to a stable result after continuous iteration. The edge computing node reads the action record identifier, execution time, and arrival label identifier from the initial action-corresponding label result table, and substitutes each arrival label identifier back into the corresponding execution station's trigger record table. It then reads the trigger time of each arrival label at the execution station and calculates the remaining time difference between the execution time and the corresponding arrival label trigger time for each entry. Subsequently, the remaining time difference is multiplied by the conveyor speed to obtain the forward push distance correction amount, and the original forward push distance is added to the forward push distance to obtain the corrected forward push distance. The edge computing node then re-executes the candidate arrival label sequence using the corrected forward push distance. The process involves generating, calculating corresponding costs, and selecting candidate combinations to obtain a new round of position tag combinations. Then, the current round's position tag combinations are compared one by one with the previous round's. If all position tag identifiers corresponding to all action records are the same, the result is considered stable, and the result of that round is written into the action-corresponding tag result table. If there are different action records, the result of that round is used as the new initial result to continue the above correction process. If an action record is in the undetermined region for two consecutive rounds, the undetermined mark of that action record in the action-corresponding tag result table is retained and used by subsequent steps to handle cases where the target tag and position tag are different. Through this correction process, a closed-loop update relationship is formed between the forward push distance, candidate position tag sequence, and position tag combination, avoiding direct mismatches caused by speed fluctuations or local deviations in tag pitch during a single forward push calculation. Through the above processing, each action record to be executed can obtain a corresponding arrival label under the joint constraints of the label passing record after the order change and the execution station trigger record. The arrival label satisfies both the execution time of the action record itself and the timing relationship of the target label, as well as the sequential relationship of the arrival label order between adjacent action records. This provides a stable input for the subsequent division of retained action sets and deleted action sets according to whether the target label and the arrival label are the same. In practical applications: When there are three consecutive action records in the action set to be executed, respectively bound to target labels T109, T110, and T111, the edge computing node first calculates the forward distance based on the execution time of each action record and the detection time of the corresponding target label, and generates a candidate in-place label sequence centered on the baseline order for each action record in the label traversal sequence list, for example, T108 to T110, T109 to T111, and T110 to T112; then, it calculates the corresponding cost for each candidate in-place label one by one. Then, while maintaining the incremental order of the arrival labels and ensuring they are not repeated, calculate the cumulative result for all legal candidate combinations. If the arrival label combination obtained initially is T109, T111, and T112, then substitute T109, T111, and T112 back to the trigger time of the corresponding execution station, calculate the remaining time difference, correct the forward push distance, and repeat the above process. When the same arrival label combination is obtained in two consecutive rounds after correction, the result is written into the action corresponding label result table for subsequent steps to continue comparing whether the target label and the arrival label are consistent.
[0020] S3. Obtain the label results corresponding to the action. Compare the target label bound to each action record with its calculated position label. If the two are the same, retain the action record. If the two are different, delete the action record. Output the retained action set and the deleted action set. In this implementation, S3 is used to further determine whether each action record should continue to participate in subsequent execution based on the already formed action-corresponding label results. This retains action records where the target label and the position label are consistent, and removes action records where the target label and the position label are inconsistent or the correspondence is not established. This process does not involve directly deleting or retaining individual action records after independent comparison. Instead, it first organizes all action records into a continuously comparable target sequence and position sequence according to the execution time. Then, under the condition that the order of the labels remains unchanged and the same position label is not repeatedly assigned, the execution sequence is aligned. Finally, the action records are classified and written according to the optimal alignment path, so that the retained action set and the deleted action set simultaneously reflect the consistency of individual action records and the overall sequential relationship of the entire group of action records. This implementation process includes the following steps: First, the action-to-label results are sequentially expanded. This transforms the target labels and position labels to be compared into a sequence of data arranged in a uniform order, facilitating overall alignment. The edge computing node reads the action record identifier, execution time, target label identifier, and position label identifier from the action-to-label result table, and sorts all action records in ascending order of execution time. When multiple action records have the same execution time, the ascending order of the action record identifier is used as the adjudication order to ensure uniqueness of the sorting result. After sorting, the edge computing node extracts the target label identifier corresponding to each action record according to the sorting result, writes it sequentially into the target sequence, and simultaneously extracts the corresponding... The positioning labels are sequentially written into the positioning sequence, and the action record identifier, sequence position, target label identifier, and positioning label identifier are written into the sequence lookup table according to the same sequence position to maintain a one-to-one correspondence between the sequence position and the action record for subsequent steps to read. If an action record in the action corresponding label result table is missing a positioning label identifier, the sequence position of the action record in the sequence lookup table is still retained, and its positioning label identifier is written as null, so that it is treated as not having a valid correspondence in the subsequent sequence alignment. If the target label identifier is missing, the action record is directly written into the abnormal area of the sequence lookup table and, in this embodiment, is treated as a deleted action candidate and no longer participates in normal alignment. Secondly, sequence alignment is performed on the target sequence and the position sequence. This aims to find the alignment result that retains the most consistent action records and minimizes deletion costs without disrupting the overall order. Edge computing nodes read the target sequence and position sequence from the sequence lookup table, using the position of the target sequence as the vertical index and the position sequence as the horizontal index to build an alignment table, and recursively calculate position by position starting from the starting position. At each position, if the target label and the position label are the same, the retention value for that position is recorded as one, indicating that a retention action record can be generated at that position. If the target label and the position label are different, no retention value is generated for that position. Simultaneously, to reflect unmatched action records and unused position labels, the edge computing nodes... For each target label deletion, a deletion value of 1 is generated; for each position label skipping, a skip value of 1 is generated. Then, while maintaining the label order and ensuring each position label corresponds to only one action record, each position in the alignment table is compared using three sources: a deletion path formed by moving from the previous target sequence position to the current position, a skipping path formed by moving from the previous position to the current position, and a retention path formed by moving from the previous alignment position to the current position where the target label identifier and the position label identifier are the same. For each path, the retention value and deletion value are accumulated, prioritizing the path with the larger accumulated retention value. If the accumulated retention values are the same, the path with the smaller accumulated deletion value is selected. If the accumulated deletion values are still the same, the path with the smaller accumulated skip value is selected to ensure the alignment result is unique. After completing all position recursion, the edge computing node records the optimal source direction and corresponding cumulative value at the end position of the alignment table, and writes the sequence position, the target label identifier of the current position, the destination label identifier of the current position, the cumulative retained value, the cumulative deleted value, and the optimal source direction into the action judgment table. If a destination label identifier is null, the current position is only allowed to participate in the recursion by deleting or skipping paths, and is not allowed to form a retained path. If the same destination label identifier appears repeatedly in the destination sequence, it participates in the recursion according to the actual position in the destination sequence, but the position traversed by the optimal alignment path is still used as the standard during subsequent backtracking, and no duplicate retention is made. Finally, action records are classified based on the optimal alignment path. This process restores the overall optimal result obtained from sequential alignment to the specific action record level, forming a set of retained actions and a set of deleted actions that can be directly read by subsequent execution steps. Edge computing nodes start from the end position of the action decision table and backtrack position by position according to the optimal source direction of the record until the starting position. When backtracking to the current position entered through the retained path, the action record identifier, target label identifier, and position label identifier corresponding to that position are read, and the action record is written to the retained action set. When backtracking to the current position entered through the deleted path, the action record identifier corresponding to that position is read, and the action record is written to the deleted action set. When backtracking to the current position entered through the skipped path, the label corresponding to the current position of the position is not written to the retained action set, but... The process continues backtracking along the source direction. After backtracking, the edge computing node checks the sequence lookup table for action records not covered by the optimal alignment path. If such records exist, they are written into the deletion action set to ensure that all action records are included in either the retained action set or the deletion action set. Subsequently, the action record identifier, target label identifier, position label identifier, and execution time in the retained action set are written into the retained action record table, and the action record identifier, target label identifier, position label identifier, and execution time in the deletion action set are written into the deletion action record table for subsequent steps to read. If an action record is found to exist in the sequence lookup table but has no corresponding position in the action judgment table during backtracking, it is directly treated as not entering the alignment result and written into the deletion action set without being recalculated separately. Through the above processing, the action-corresponding label results are further transformed into retained action sets and deleted action sets, so that subsequent execution stations only issue execution instructions to action records that are still consistent with the target label and the in-place label in the overall sequence relationship, while removing action records that have been misaligned, lack effective correspondence, or have failed to enter the optimal alignment result from the execution chain, thereby reducing the situation where residual actions of old orders continue to act on subsequent labels during the order change process. In practical applications: When the four action records in the action-corresponding label result table, arranged chronologically by execution time, correspond to the target label sequences T109, T110, T111, and T112 respectively, and the position label sequences are T109, T111, T112, and null, the edge computing node first generates a sequence comparison table, and then establishes an alignment table to compare the retained path, deleted path, and skipped path position by position. If the recursive result shows that deleting the target label T110 corresponding to the second action record can obtain the alignment result with the largest cumulative retained value, then when backtracking the optimal alignment path, the action records that meet the path retention conditions in the first, third, and fourth steps are written into the retained action set, and the second action record and the action records that have not entered the effective alignment are written into the deleted action set. Subsequently, only the action records in the retained action set are sent to the execution station for matching and execution processing.
[0021] S4. Obtain the set of reserved actions, the real-time arrival tags of the execution station, and the station execution feedback. Compare the real-time arrival tags with the target tags in the set of reserved actions one by one. When the comparison is consistent, send the execution instruction corresponding to the action record to the corresponding execution station, record the executed actions and the non-executed actions, and output the execution result set. In this implementation, S4 is used to, based on the already formed action set, match the action records that should still be executed with the actual labels of the execution station, and after the correspondence is established, issue an execution instruction to the corresponding execution station. Then, based on the execution feedback from the station, a distinction is formed between executed and unexecuted actions. This process first establishes an action sequence and a arrival sequence within the same execution station, then forms candidate correspondences based on the consistency of target labels and the proximity of times. Subsequently, while maintaining the consistency between the action order and the arrival order, the corresponding combination with the smallest cumulative deviation is selected. Finally, the execution instruction is sent according to the corresponding combination, and the action status is written back based on the feedback results. This implementation process includes the following steps: First, the retained action sets and execution station field records are merged and candidate-matched within the same workstation. This provides a unified input for subsequent selection of unique correspondences. Edge computing nodes read the action record identifier, target tag identifier, execution station, execution time, and action type from the retained action sets. Simultaneously, they read the real-time arrival tag identifier, arrival time, and feedback time from the execution station's uploaded data. The real-time arrival tag identifier and arrival time are written to the workstation arrival record table by the workstation's reader, photoelectric sensor, or tag detection mechanism when the tag enters the execution position. The feedback time is written to the workstation feedback record table when the execution station returns the execution result. Then, using the execution station as the grouping key, action records within the same workstation are arranged in ascending order of execution time to form an action sequence. Similarly, real-time arrival tags within the same workstation are arranged in ascending order of arrival time to form an arrival sequence. When execution times or arrival times are the same, the ascending order of action record identifier and real-time arrival tag identifier is used as the decision-making order. Within the same execution workstation, edge computing nodes read action records from the action sequence one by one, and retrieve real-time arrival tags from the arrival sequence whose target tag identifiers match the target tag identifier of the action record. For each group of action records with the same tag identifier, a candidate correspondence is established with the real-time arrival tag. The absolute value of the time difference between the execution time of the action record and the arrival time of the real-time arrival tag is calculated. The action record identifier, target tag identifier, execution workstation, execution time, real-time arrival tag identifier, arrival time, absolute value of time difference, and the position of the real-time arrival tag in the arrival sequence are written into the candidate correspondence table. If no real-time arrival tag with the same target tag identifier is found in the corresponding execution workstation, no candidate correspondence is generated for the action record, and the action record is marked as a candidate missing record, to be processed as an unmatched action record later. If no real-time arrival tags have been uploaded to the execution workstation, all action records of the execution workstation are retained, and a candidate correspondence table is generated after the arrival records are completed. Secondly, a combination screening is performed on the candidate correspondences in the candidate correspondence table. This aims to select a unique correspondence within the same execution station that minimizes the total time difference without disrupting the order of action records. Edge computing nodes read the candidate correspondences from the candidate correspondence table for each execution station and expand the candidate combinations item by item according to the action sequence. For the first action record in the action sequence, all its candidate correspondences are taken as the starting point for combination. For subsequent action records, only candidate correspondences that satisfy the condition that the position of the real-time arrival tag corresponding to the previous action record in the arrival sequence is less than the position of the real-time arrival tag corresponding to the subsequent action record are retained for combination expansion. This ensures that the action order is consistent with the arrival order and that the same real-time arrival tag is not repeatedly used. After forming each valid candidate combination, item by item... The absolute values of the time differences of each candidate correspondence within the combination are summed to obtain the cumulative absolute value of the time difference for that candidate combination. The edge computing node traverses all legal candidate combinations and selects the candidate combination with the smallest cumulative absolute value of time difference as the correspondence between the action record and the real-time arrival tag under that execution station. The action records in this candidate combination are written into the matching action record table, and the action records that do not enter the candidate combination are written into the unmatched action record table. If multiple candidate combinations have the same cumulative absolute value of time difference, the candidate combination with the earlier position of the real-time arrival tag in the arrival sequence is selected. If they are still the same, the final result is determined by the combination corresponding to the action record identifier in ascending order. If none of the action records of an execution station form a legal candidate combination, all action records of that execution station are written into the unmatched action record table and are not entered into the execution instruction issuance process. Finally, execution instructions are sent to the execution workstations based on the matched action records, and execution results are generated based on the workstation execution feedback. This process transforms the corresponding results obtained in the previous step into executed and unexecuted actions. The edge computing node reads the action record identifier, execution workstation, action type, and target tag identifier from the matched action record table, and generates execution instructions for each execution workstation. Each execution instruction carries at least the action record identifier, action type, target tag identifier, and execution workstation identifier, so that the execution workstation can complete the assignment according to the action record identifier when returning feedback results. After the execution instructions are sent, the edge computing node continues to read the action record identifier, feedback result, and feedback time from the workstation feedback record table. The feedback result includes at least completed feedback and incomplete feedback. In this embodiment, the execution... The return of completion feedback from the workstation indicates that the corresponding action record has been completed at that workstation. The edge computing node writes the matching action record that has received completion feedback into the executed action table, and writes the matching action record that has not received completion feedback and the unmatched action record into the unexecuted action table. It also writes the action record identifier, target label identifier, execution workstation, feedback result, and feedback time into the execution result set for subsequent steps to read. If the feedback result returned by the execution workstation contains an action record identifier, but the action record identifier does not appear in the matching action record table of this round, the feedback result is written into the feedback exception area and does not participate in the generation of the execution result set of this round. If the execution instruction has been issued but the execution workstation has not returned completion feedback before the corresponding label leaves the execution position, the action record is treated as an unexecuted action. Through the above processing, the action records in the retained action set are further refined into executed actions and unexecuted actions. This distinction is based on the consistency of the real-time arrival label at the execution station, the target label of the action record, and the workstation execution feedback. This enables subsequent steps to clear completed actions, retain unexecuted actions that may still be executed, and reduce the situation where mismatched labels are mistakenly executed. In practical applications: When the set of retained actions corresponding to the rejection station contains three action records with target labels T109, T110, and T111, and the actual delivery sequence transmitted by the rejection station is labeled T109, T111, and T112, the edge computing node first forms the action sequence and delivery sequence within the rejection station, then establishes a candidate correspondence with the same target label and calculates their respective absolute time difference values; subsequently, while maintaining the increasing position of the delivery sequence, the combination with the smallest cumulative absolute time difference is selected from all legal candidate combinations. To match the results, for example, action records T109 and T111 are matched with real-time arrival tags T109 and T111 respectively, while T110 is written into the unmatched action record table because no valid candidate correspondence is formed. Then, the edge computing node only sends the execution instructions corresponding to T109 and T111 to the rejection station, and writes the completed action records into the executed action table according to the completion feedback returned by the rejection station, and writes the action records that did not return completion feedback and the action record corresponding to T110 into the unexecuted action table, thus forming the execution result set of this round.
[0022] S5. Obtain the deletion action set and execution result set, delete the action records in the deletion action set, retain the action records in the execution result set corresponding to the unexecuted actions and whose target tags have not yet reached the execution station, clear the action records corresponding to the executed actions in the execution result set, and output the action processing results after the change of order. In this implementation, S5 is used to clean up, retain, and write back the action records after the current round of order processing has been formed, after the deletion action set and execution result set have been formed. This ensures that action records that may still be executed are retained in the action set to be executed, while action records that have failed, been completed, or missed their execution positions are removed from the pending processing chain. This process first cleans up the action records based on the deletion action set and execution result set, then checks whether the target tag for each unexecuted action has not yet reached the corresponding execution position, and finally writes the action records that still need to be tracked back to the action set to be executed in a unified order to ensure that the next round of calculation reads the action data after invalid records have been removed. This implementation process includes the following steps: First, the action records in the deletion action set and execution result set are cleaned up. This removes action records that have been determined to be invalid or completed from the current action record set, forming a table of remaining actions that can be further evaluated. The edge computing node reads the action record identifiers in the deletion action set and reads the executed actions, unexecuted actions, target label identifiers, and execution positions in the execution result set. Both executed and unexecuted actions use the action record identifier as a unique key. Then, using the current pending action record table as the cleanup target, the action records in the deletion action set are deleted first by their action record identifiers, and then the action records corresponding to the executed actions are deleted by their action record identifiers. After deletion, the remaining unexecuted actions are retained. Deleted action records are added to the remaining action table, and the action record identifier, target label identifier, execution station, execution time, and action type are written to the remaining action table for subsequent reading. If the same action record identifier appears in both the deleted action set and the executed action, deletion is performed only once. If an action record identifier exists in the deleted action set or the executed action but there is no corresponding record in the current pending action record table, the action record identifier is written to the cleanup exception table, without affecting the generation of the remaining action table. If there are unexecuted actions in the execution result set but the current pending action record table lacks a corresponding action record, the unexecuted action is not written to the remaining action table but to the missing record table for subsequent verification. Secondly, the remaining actions in the action list are assessed to determine if they still meet the conditions for continued execution. This distinguishes between action records that have not yet reached the execution station and should be retained, and action records that have lost their execution opportunity. The edge computing node reads the action record identifier, target tag identifier, and execution station corresponding to each unexecuted action in the remaining action list. Using the target tag identifier as the search key, it reads the latest detection record of the target tag at the detection station from the tag passage record table. The latest detection record is the detection time when the target tag was last written under a unified time reference. Subsequently, the station distance along the conveying direction between the detection station corresponding to the latest detection record and the execution station is read from the station path table, and the conveying speed within the corresponding time window is read. The conveying speed uses the same value caliber as the previous steps, i.e., the average conveying speed within the time window where the target tag's most recent detection time occurs. Finally, the station distance is divided by the conveying speed to obtain the remaining action record. Arrival time is determined, and the remaining arrival time is categorized based on its magnitude: when the remaining arrival time is greater than zero, it indicates that the target tag has not yet reached the corresponding execution station, and the unexecuted action is retained in the remaining action table; when the remaining arrival time is less than or equal to zero, it indicates that the target tag has reached or passed the corresponding execution station, and the unexecuted action is deleted from the remaining action table; after all unexecuted actions are judged, the retained unexecuted actions are written into the retained action table; if there is no latest detection record for the target tag at the detection station, the unexecuted action is first written into the pending confirmation area of the retained action table, waiting for subsequent detection records to be supplemented; if the station path table lacks the station distance from the corresponding detection station to the execution station, the unexecuted action is written into the path supplement area of the retained action table, and is not directly deleted; if the conveying speed is missing, it is calculated based on the average conveying speed of the most recent continuous effective sampling segment, and if it still cannot be calculated, the unexecuted action is retained and marked as speed supplementation pending. Finally, the action records in the retained action table are reorganized and written back to the action set to be executed. This ensures that the next round of order processing continues to start from valid action records that are still executable. The edge computing node reads the action record identifier, execution position, execution time, target label identifier, and action type from the retained action table. It first groups the records by execution position, and then re-sorts them by execution time in ascending order within the same execution position. When multiple action records with the same execution time exist in the same execution position, the ascending order of the action record identifier is used as the decision order to ensure the uniqueness of the sorting result. After sorting, the edge computing node re-sorts each action record according to the sorting result. A new set of actions to be executed is written, and the action record identifier, target label identifier, execution station, execution time, and action type are written to the action processing result table after the order is changed. The action processing result table after the order is changed must include at least the identifiers of deleted action records, executed action records, retained action records, and the identifiers of action records to be executed after being written back, for use in the next round of step reading and tracking. If the retained action table is empty, the set of actions to be executed is cleared, and an empty set mark is written to the action processing result table after the order is changed. If an action record is missing an execution station or execution time when it is reordered, it is not written back to the set of actions to be executed, but is written to the write-back exception table. Through the above processing, invalid action records in the action set, completed action records in the execution result set, and unexecuted action records that have lost their execution opportunity are removed from the pending processing link. Action records whose target tags have not yet reached the execution station and still have the possibility of continued execution are rewritten back into the pending action set, so that subsequent order change processing can continue to unfold around the valid remaining actions, reducing the situation of old action residue, repeated execution, or out-of-bounds execution. In practical applications: When a certain round of processing is completed, and the action set contains action records A1 and A2, and the execution result set contains executed actions A3 and A4 and unexecuted actions A5 and A6, the edge computing node first deletes A1, A2, A3, and A4 from the current action record table to be processed. Then, it reads the latest detection record of the target tag at the detection position for A5 and A6 respectively, and calculates the remaining arrival time based on the distance between the detection position and the corresponding execution position and the average conveying speed within the current time window. If the remaining arrival time corresponding to A5 is greater than zero, A5 is retained in the retained action table. If the remaining arrival time corresponding to A6 is less than or equal to zero, A6 is deleted from the remaining action table. Finally, the retained A5 is reordered according to the execution position and execution time and written back to the action set to be executed, so that the next round of processing can continue directly from A5 without processing the action records that have failed or been completed again.
[0023] Furthermore, it also includes an RFID tag multi-specification order change switching control system, the system comprising: The binding calculation module is used to obtain the current order, the next order, the distance between each workstation, the conveying speed, the detection time of each tag passing the detection position, and the action records generated before the order change but not yet executed, received by the edge computing node. It calculates the execution time of the target tag corresponding to each action record arriving at the execution workstation according to the distance between each workstation and the conveying speed, binds each action record to the corresponding target tag, and outputs the set of actions to be executed. The arrival determination module is used to obtain the detection time of each tag after the order change, the trigger time of each workstation, and the set of actions to be executed. For each action record in the set of actions to be executed, according to the detection time of the target tag bound to it at the detection position, the execution time of the corresponding workstation of the action, and the actual passing order of each tag after the order change, the module calculates the arrival tag corresponding to the action when the action arrives at the execution workstation and outputs the tag result corresponding to the action. The consistent filtering module is used to obtain the tag results corresponding to the action. It compares the target tag bound to each action record with its calculated local tag. If the two are the same, the action record is retained; if they are different, the action record is deleted. The module outputs the set of retained actions and the set of deleted actions. The matching execution module is used to obtain the set of retained actions, the real-time arrival tags of the execution station, and the station execution feedback. It compares the real-time arrival tags with the target tags in the set of retained actions one by one. When the comparison matches, it sends the execution instruction corresponding to the action record to the corresponding execution station, records the executed actions and the non-executed actions, and outputs the execution result set. The results processing module is used to obtain the deletion action set and the execution result set, delete the action records in the deletion action set, retain the action records in the execution result set corresponding to the unexecuted actions and whose target tags have not yet reached the execution station, clear the action records corresponding to the executed actions in the execution result set, and output the action processing results after the change of order.
[0024] Working Principle: After a changeover, this solution first organizes the action records generated before the changeover but not yet executed. Combining the time the source tag passes the detection station, the station spacing, and the conveyor speed, it calculates the execution time and target tag for each action record, forming a set of actions to be executed. Then, based on the detection records of each tag after the changeover and the trigger records of the execution station, it calculates the actual corresponding arrival tag for each action record at the execution station and compares the arrival tag with the target tag. Action records that match are retained, while those that don't are deleted. Subsequently, only the retained action records are matched with the real-time arrival tag at the execution station, and execution instructions are issued. Then, based on station feedback, executed and unexecuted actions are distinguished. Finally, invalid and executed actions are deleted. Action records that are still unexecuted and whose target tags have not yet reached the execution station are retained and written back into the set of actions to be executed, ensuring that subsequent processing always revolves around the still valid action records. For example, in a continuously conveying RFID tag production line, if the front end detects that a tag at the end of an old order needs to be rejected in the back end, the system first calculates the target tag that should follow the rejection action. When the tag continues to be conveyed to the vicinity of the rejection station, the system then combines the real-time arrival of the tag at the rejection station with the trigger time to determine whether the tag actually corresponding to the action is still consistent with the target tag. If they are consistent, rejection is performed; if they are inconsistent, the action record is deleted. For action records that are not executed in time but whose target tags have not yet arrived at the execution station, the system continues to retain them and proceeds to the next round of processing. In this way, even when changing orders without stopping the line, when tag specifications change, or when there is a distance difference between the front and back stations, the system can reduce the situation where residual actions from old orders are mistakenly applied to tags in new orders.
[0025] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for controlling the switching of multiple specifications of RFID tags, characterized in that, include: S1. Obtain the current order, next order, distance between workstations, conveying speed, detection time of each tag passing the detection position, and action records generated before the order change but not yet executed from the edge computing node. Calculate the execution time of the target tag corresponding to each action record arriving at the execution workstation according to the distance between workstations and the conveying speed. Bind each action record to the corresponding target tag and output the set of actions to be executed. S2. Obtain the detection time of each tag after the order change, the trigger time of each workstation, and the set of actions to be executed. For each action record in the set of actions to be executed, calculate the corresponding label when the action arrives at the workstation according to the detection time of the target tag bound to it, the execution time of the corresponding workstation, and the actual passing order of each tag after the order change, and output the label result corresponding to the action. S3. Obtain the label results corresponding to the action. Compare the target label bound to each action record with its calculated position label. If the two are the same, retain the action record. If the two are different, delete the action record. Output the retained action set and the deleted action set. S4. Obtain the set of reserved actions, the real-time arrival tags of the execution station, and the station execution feedback. Compare the real-time arrival tags with the target tags in the set of reserved actions one by one. When the comparison is consistent, send the execution instruction corresponding to the action record to the corresponding execution station, record the executed actions and the non-executed actions, and output the execution result set. S5. Obtain the deletion action set and execution result set, delete the action records in the deletion action set, retain the action records in the execution result set corresponding to the unexecuted actions and whose target labels have not yet reached the execution station, clear the action records corresponding to the executed actions in the execution result set, and output the action processing results after the change of order.
2. The RFID tag multi-specification changeover control method according to claim 1, characterized in that: S1 includes: S1-1. Extract the action generation station, execution station, action type, generation time and source tag identifier from the action record, and read the detection time of the detection position corresponding to the source tag identifier, and generate the action source table according to the correspondence between the source tag identifier and the detection time. S1-2. Based on the action generation station and execution station in the action source table, and combined with the distance between each station and the conveying speed, the conveying time of the action record is calculated by dividing the distance between the action generation station and the execution station by the conveying speed. Then, the conveying time is added to the generation time to obtain the execution time of each action record, and the action time table is output. S1-3. For each action record in the action timetable, read the detection time corresponding to its source label identifier, multiply the time difference between the detection time and the execution time by the conveying speed to obtain the target conveying distance, divide the target conveying distance by the label pitch corresponding to the current label specification and take the integer result as the forward label number, forward the source label identifier according to the forward label number to obtain the target label identifier, and write each action record and the corresponding target label identifier into the action set to be executed.
3. The RFID tag multi-specification changeover control method according to claim 2, characterized in that: S2 includes: S2-1. Read the detection time of each label after the order change, the trigger time of each workstation, and the action records of each action set to be executed. For each action record, extract the detection time of the target label bound to it at the detection position and the execution time of the corresponding execution workstation. Multiply the time difference between the execution time and the detection time by the conveying speed to obtain the forward pushing distance. Then, divide the forward pushing distance by the label pitch of the current label specification to determine the benchmark order. The labels corresponding to the benchmark order and their adjacent labels before and after them form a candidate in-place label sequence. S2-2. For each candidate positioning label in the candidate positioning label sequence of each action record, calculate the time difference between the trigger time and the execution time of the candidate positioning label at the execution station, calculate the order difference of the candidate positioning label relative to the bound target label, calculate the corresponding difference between the trigger time intervals on both sides of the candidate positioning label and the detection time intervals on both sides of the bound target label, and add the time amount corresponding to the time difference, the order difference and the corresponding difference to obtain the corresponding cost of each candidate positioning label, and output the action candidate table.
4. The RFID tag multi-specification changeover control method according to claim 3, characterized in that: S2 includes: S2-3. Read the action candidate table in the order of execution time of each action record. For candidate combinations that maintain an increasing order of arrival labels between adjacent action records and do not repeat, accumulate the corresponding cost and the difference between the execution time difference of adjacent action records and the trigger time difference of adjacent candidate arrival labels. Take the candidate combination with the smallest cumulative result as the arrival label combination of each action record and output the initial action corresponding label result. S2-4. Substitute each position tag in the initial action corresponding tag result back to the trigger time of each workstation, recalculate the remaining time difference between the execution time of each action record and the trigger time of the corresponding position tag, and use the remaining time difference to correct the forward push distance before executing S2-1 to S2-3 again until the position tag combination obtained in the previous two times is exactly the same, and output the action corresponding tag result.
5. The RFID tag multi-specification changeover control method according to claim 4, characterized in that: S3 includes: S3-1. Read the action record, target label and position label in the action corresponding label result according to the execution time of each action record. Sequentially form the target label corresponding to each action record into a target sequence, sequentially form the position label corresponding to each action record into a position sequence, and output the sequence lookup table. S3-2. Based on the sequence lookup table, perform sequential alignment of the target sequence and the position sequence. Under the constraints of keeping the order of the labels unchanged and each position label corresponding to only one action record, calculate the retention value obtained when the target label and the position label are the same, the deletion value obtained when the target label is deleted, and the skip value obtained when the position label is skipped for each position. Determine the optimal alignment path based on the result of the maximum cumulative retention value and the minimum cumulative deletion value when the cumulative retention values are the same, and output the action judgment table.
6. The RFID tag multi-specification changeover control method according to claim 5, characterized in that: S3 further includes: S3-3. Backtrack each action record along the optimal alignment path, write the action records in the path whose target label is the same as the position label into the retained action set, and write the action records in the path whose target label is different from the position label and those that have not entered the alignment result into the deleted action set. Output the retained action set and the deleted action set.
7. The RFID tag multi-specification changeover control method according to claim 6, characterized in that: S4 includes: S4-1. Read the action record identifier, target label, execution station, execution time, and action type from the retained action set, as well as the real-time arrival label, arrival time, and feedback time in the station execution feedback of the execution station. Sort each action record in the same execution station in ascending order of execution time to form an action sequence. Sort each real-time arrival label in the same execution station in ascending order of arrival time to form an arrival sequence. Pair each action record with the real-time arrival label that is the same as the target label one by one, calculate the absolute value of the time difference between the execution time and the arrival time, and output the candidate correspondence table.
8. The RFID tag multi-specification changeover control method according to claim 7, characterized in that: S4 further includes: S4-2. For each candidate correspondence in the same execution station in the candidate correspondence table, the absolute value of the time difference of each candidate correspondence is accumulated item by item in the order of the action sequence. Only candidate combinations that satisfy the condition that the position of the real-time arrival tag corresponding to the previous action record in the arrival sequence is less than the position of the real-time arrival tag corresponding to the next action record in the arrival sequence are retained. The candidate combination with the smallest cumulative absolute value of time difference is selected from all candidate combinations as the correspondence result between the action record and the real-time arrival tag. The matched action record and the unmatched action record are output. S4-3. Send execution instructions to the corresponding execution station according to the matching action records, and record the matching action records that have received completion feedback as executed actions based on the action record identifier and feedback results in the station execution feedback. Record the matching action records that have not received completion feedback and the unmatched action records as unexecuted actions, and output the execution result set.
9. The RFID tag multi-specification changeover control method according to claim 8, characterized in that: S5 includes: S5-1: Read the action records in the deletion action set and the executed actions, unexecuted actions, target tags, and execution stations in the execution result set; delete the action records in the deletion action set; delete the action records corresponding to the executed actions; and output the remaining action table. S5-2. For each unexecuted action in the remaining action list, read the latest detection record of its target label at the detection position, and calculate the remaining arrival time by dividing the distance between the target label's most recent detection time and the corresponding execution position by the conveying speed. Unexecuted actions with a remaining arrival time greater than zero are retained in the remaining action list, and unexecuted actions with a remaining arrival time less than or equal to zero are deleted. Output the retained action list. S5-3. Reorder each action record in the retained action table according to the execution position and execution time, write it back to the action set to be executed, and output the action processing result after the change of order.
10. A multi-specification RFID tag order changeover control system, used to implement the multi-specification RFID tag order changeover control method according to any one of claims 1-9, characterized in that, include: The binding calculation module is used to obtain the current order, the next order, the distance between each workstation, the conveying speed, the detection time of each tag passing the detection position, and the action records generated before the order change but not yet executed, received by the edge computing node. It calculates the execution time of the target tag corresponding to each action record arriving at the execution workstation according to the distance between each workstation and the conveying speed, binds each action record to the corresponding target tag, and outputs the set of actions to be executed. The arrival determination module is used to obtain the detection time of each tag after the order change, the trigger time of each workstation, and the set of actions to be executed. For each action record in the set of actions to be executed, according to the detection time of the target tag bound to it at the detection position, the execution time of the corresponding workstation of the action, and the actual passing order of each tag after the order change, the module calculates the arrival tag corresponding to the action when the action arrives at the execution workstation and outputs the tag result corresponding to the action. The consistent filtering module is used to obtain the tag results corresponding to the action. It compares the target tag bound to each action record with its calculated local tag. If the two are the same, the action record is retained; if they are different, the action record is deleted. The module outputs the set of retained actions and the set of deleted actions. The matching execution module is used to obtain the set of retained actions, the real-time arrival tags of the execution station, and the station execution feedback. It compares the real-time arrival tags with the target tags in the set of retained actions one by one. When the comparison matches, it sends the execution instruction corresponding to the action record to the corresponding execution station, records the executed actions and the non-executed actions, and outputs the execution result set. The results processing module is used to obtain the deletion action set and the execution result set, delete the action records in the deletion action set, retain the action records in the execution result set corresponding to the unexecuted actions and whose target tags have not yet reached the execution station, clear the action records corresponding to the executed actions in the execution result set, and output the action processing results after the change of order.