Cloud edge collaboration-based decoupling and connection method for new and old WMS systems
Patent Information
- Application Number
- CN202611046869.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-07-15
AI Technical Summary
协议与调用链路多以接口归属、转发规则、订阅关系为主要依据,现场设备排队、旧系统回执时限、数据版本状态在同一决策点中难以形成强约束,堆垛机等待、输送线扫码延迟、RF终端重复提交并存时,业务单据可能早于现场确认进入写入流程,进而引发账实短时偏离、重复扣减或跨库位状态滞留
本发明中,在接口执行前同步采集接口名、协议类型、调用方向、业务动作、批次号、库位、变动数量与变动方向,并把变动方向同库存字段方向进行核对,再以一致或冲突结果、求和比值、基准比较共同形成可执行或阻断标识,可把原本依赖接口连通性判断的交互过程前移到字段语义级校验,减少方向相反、数量正负含义混淆、批次和库位口径不齐引起的误写。继续把协议类型、协议标识、调用方向、匹配乘积同可执行标识合并筛选,可在指令进入现场前排除协议相符但方向不合、方向相符但字段不可写的记录,降低跨端调用中无效请求占用边缘通道的概率。再把堆垛机指令、输送线扫码、RF终端指令纳入候选记录验证,并以排队时间、旧WMS回执时限、版本差值及交集关系确定云边分流结果,可使现场等待状态、历史回执约束、数据版本一致性共同参与分流决策,避免设备端尚在排队或版本未齐时提前改写库存。库存写入阶段把业务动作、变动数量、可用量、占用量、冻结量、现存量置于同一校验链,只有差值方向、冻结边界、现存边界均满足时才形成放行记录,可增强库存变动同实际仓储约束之间的一致性。节点停留时长、超时节点、边缘空回执记录共同交叉触发补偿,可把异常处理从事后日志追踪推进到节点级触发,提升并行切换期间库存写入安全性、指令执行连续性、异常定位精度及云边协同稳定性。
Smart Images

Figure CN122570591B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial microservices technology, and in particular to a method for decoupling and connecting old and new WMS systems based on cloud-edge collaboration. Background Technology
[0002] The field of industrial microservices technology encompasses data interaction services for industrial production, warehousing and logistics, equipment collaboration, and business process flow. Its core content involves breaking down business objects such as orders, inventory, storage locations, materials, batches, permissions, personnel, inbound / outbound slips, transfer slips, and inventory records into independently callable service units. These units are achieved through service interfaces, API gateways, message queues, data mapping tables, interface adaptation layers, permission verification rules, and log records, facilitating data transfer, instruction forwarding, process association, and status synchronization between different industrial systems. This covers business connections between PCs, PDAs, AGV scheduling terminals, automated warehouse control terminals, MES, WMS, SCADA, and ERP systems.
[0003] Among them, the cloud-edge collaborative decoupling and connection method for old and new WMS systems refers to the connection method for warehouse operations during the parallel or replacement process of old and new WMS. This patent subject addresses technical aspects such as material coding, storage location coding, batch format, inventory quantity, order records, inbound and outbound documents, personnel permissions, AGV instructions, PDA scanning records, personalized shelving rules in the workshop, picking rules, replenishment trigger conditions, and abnormal process records. It employs methods such as microservice decomposition, API gateway forwarding, standard interface adaptation layer, ETL data cleaning, field mapping, database mirroring, log parsing, RabbitMQ message subscription, trigger push, hash verification, sharded transmission, breakpoint resumption, BPM process node mapping, rule engine configuration, transaction boundary control, and abnormal log alarms.
[0004] In practice, existing technologies tend to rely on general connection actions such as interface adaptation, field mapping, message subscription, mirror synchronization, and log alarms to maintain connectivity between old and new warehouse links. Business fields are often moved according to mapping relationships, and there is a lack of semantic verification between quantity (positive / negative), inbound / outbound direction, and inventory field direction. When encountering complex actions such as material returns, warehouse transfers, and freeze / release operations, batch inventory may show inflated available quantities or abnormal occupied quantities due to inconsistent direction interpretations. Protocols and call links are mainly based on interface affiliation, forwarding rules, and subscription relationships. On-site equipment queuing, old system response time limits, and data version status are difficult to form strong constraints at the same decision point. When stacker cranes are waiting, conveyor line barcode scanning is delayed, and RF terminals submit duplicates, business documents may enter the writing process before on-site confirmation, leading to short-term discrepancies between accounts and actual inventory, duplicate deductions, or cross-location status delays. Inventory write operations typically prioritize successful data transfer, transaction commits, and exception log retention, while neglecting the boundary relationships between available, occupied, frozen, and current inventory. In scenarios such as inventory discrepancies, replenishment triggers, and abnormal outbound shipments, successful communication can easily be misinterpreted as readability. Exception handling relies heavily on log parsing and alarm tracing, with a focus on interface or document-level granularity. If there is no feedback from the edge and the process node remains stuck, compensation triggers are prone to delays, increasing manual investigation costs and impacting the on-site operational cycle time during parallel switchover periods. Summary of the Invention
[0005] To address the technical problems existing in the prior art, this invention provides a method for decoupling and connecting old and new WMS systems based on cloud-edge collaboration. The technical solution is as follows: A method for decoupling and connecting old and new WMS systems based on cloud-edge collaboration includes the following steps: S1: Obtain the interface name, protocol type, call direction, business action, batch number, storage location, change quantity and direction, verify the change direction with the inventory field direction, identify consistency or conflict and sum the ratio, write the executable or blocking flag to the comparison benchmark, and generate a set of interface field execution flags. S2: Based on the interface field, the execution identifier set is matched with the protocol type and protocol identifier, the call direction is verified, the matching product is calculated, and the records are filtered in combination with the executable identifier to generate the interface edge execution candidate set; S3: Based on the candidate set of execution at the interface edge, call stacker crane instructions, conveyor line scanning instructions, and RF terminal instructions, calculate the queuing time and compare the old WMS receipt time limit, filter waiting records, calculate the version difference to filter consistent records, and obtain the interface cloud-edge traffic splitting result set by the intersection. S4: Call the interface cloud-edge traffic splitting result set to map business actions and changes in quantity, calculate the difference between available quantity and occupied quantity, compare the difference with zero, verify the frozen quantity and the existing quantity, and generate inventory to write to the release record set; S5: Calculate the node dwell time for the inventory write release record set, filter timeout nodes and edge empty receipt records, and obtain the cloud edge node compensation trigger set by the intersection.
[0006] As a further aspect of the present invention, the step of obtaining S1 is as follows: S101: Obtain the interface name, protocol type, call direction, business action, batch number, storage location, change quantity and direction, detect the combination relationship between change quantity and direction, establish a change direction set and compare it with the business action item by item, map the inventory field change path, generate the interface record corresponding change path identifier and write it into the set in order to obtain the change path identifier sequence. S102: Based on the change path identifier sequence, call the existing quantity, available quantity, frozen quantity, occupied quantity, and in-transit quantity, perform field direction comparison on each item of the sequence, write the matching value, write the conflict value if there is no match, sum the matching values and calculate the ratio with the total number of records to obtain the direction matching ratio; S103: Based on the direction matching ratio, call the preset direction consistency benchmark condition, compare the ratio with the benchmark condition, if the condition is met, write the executable flag; if not, write the blocking flag. Integrate and output all interface record flags according to the original sequence to generate a set of interface field execution flags.
[0007] As a further aspect of the present invention, the step of obtaining S2 is as follows: S201: Based on the interface field, execute the identifier set to obtain the protocol type and edge protocol adapter protocol identifier list. Compare the protocol type and protocol identifier item by item. If the characters match, write the matching identifier 1; if they do not match, write the matching identifier 0. Form a sequence set of matching identifiers for all interface records in order to obtain the protocol matching identifier sequence. S202: According to the protocol matching identifier sequence, call the call direction and the protocol identifier record direction field. Compare the call direction and the direction field one by one. If the directions match, write the direction matching identifier 1. If the directions do not match, write the direction matching identifier 0. Perform the product operation between the direction matching identifier and the protocol matching identifier sequence one by one to obtain the direction protocol matching result set. S203: For the direction protocol matching result set, call the interface field execution identifier set to select the executable identifiers. Filter the combined matching results and executable identifiers item by item, retain the records with a matching value of 1 and the identifier of executable, output the filtered record set in the original order, and generate the interface edge execution candidate set.
[0008] As a further aspect of the present invention, the step of obtaining S3 is as follows: S301: Based on the candidate set of the interface edge execution, call the stacker crane task instruction, conveyor line barcode scanning data, and RF terminal in / out instructions, obtain the request entry time and the current timestamp, calculate the difference to form a queuing time sequence, and at the same time obtain the old WMS receipt waiting time limit and compare it with the queuing time item by item, filter the records whose queuing time is less than the receipt waiting time limit and output them according to the original sequence to obtain the time limit filtered record sequence. S302: Based on the time limit filter record sequence, call the new system to confirm the field version number and edge synchronization version number, calculate the difference between the two types of version numbers one by one, write the consistency flag if the difference is zero, write the inconsistency flag if the difference is non-zero, filter the consistency flags and retain the flags as consistent records, output the filtering results according to the original sequence, and obtain the version consistent record sequence. S303: Perform intersection filtering on the record sequence of the version consistent record sequence and the time limit filtering record sequence. Match the interface identifiers of the two sequences one by one and retain the records that exist at the same time. Reorganize the filtering result set according to the interface entry order to generate the interface cloud-edge splitting result set.
[0009] As a further aspect of the present invention, the step of obtaining S4 is as follows: S401: Call the cloud-edge splitting result set of the interface to obtain business actions and changes in quantity, detect the correspondence between business actions and inventory fields such as current quantity, available quantity, frozen quantity, occupied quantity, and in-transit quantity, map the changes in quantity to the target inventory fields one by one according to the business actions and perform addition and subtraction operations, output the field change result sequence according to the interface order, and obtain the inventory change mapping sequence. S402: Based on the inventory change mapping sequence, call the available quantity and occupied quantity in the inventory field, calculate the difference for each item in the mapping sequence and compare it with zero, filter records with a difference not less than zero, and at the same time call the frozen quantity and the existing quantity to compare each item, filter records with a frozen quantity not greater than the existing quantity, and perform an intersection operation on the two types of filtering results according to the interface identifier to obtain the inventory constraint filtering sequence. S403: Based on the inventory constraints, the original records of the cloud-edge splitting result set of the filter sequence call interface are used to match the original records item by item of the interface identifier in the filter sequence and retain the consistent items. The filter result set is reorganized according to the batch number and storage location order to generate the inventory write release record set.
[0010] As a further aspect of the present invention, the step of obtaining S5 is as follows: S501: For inventory write release record set, obtain process node identifier, node entry time and current timestamp, perform time difference calculation to form node dwell time sequence, at the same time obtain node allowable waiting time and compare it with the node dwell time sequence item by item, filter records whose dwell time exceeds the allowable waiting time and output them in the original order to obtain node timeout record sequence; S502: Based on the node timeout record sequence, call the responsibility execution side identifier, edge device task status and old WMS receipt status, match the responsibility execution side identifier with the edge end identifier item by item, match the device task status with the completion status item by item, match the receipt status with the empty status item by item, perform intersection filtering on the three types of matching results and output the records that meet the conditions to obtain the edge empty receipt matching sequence. S503: Based on the edge empty receipt matching sequence, call the node timeout record sequence to perform intersection operation, match the node identifiers in the two sequences one by one and retain the records that exist at the same time, reorganize the filtering result set according to the node entry time order, and generate the cloud edge node compensation trigger set.
[0011] The beneficial effects of the technical solutions provided by the embodiments of the present invention include at least the following: In this invention, before interface execution, the interface name, protocol type, call direction, business action, batch number, storage location, change quantity, and change direction are collected synchronously. The change direction is then compared with the inventory field direction. An executable or blocking identifier is formed by combining consistent or conflicting results, summation ratios, and benchmark comparisons. This moves the interaction process, which originally relied on interface connectivity judgment, to the field semantic level for validation, reducing errors caused by opposite directions, confusion of positive and negative quantities, and inconsistent batch and storage location definitions. Furthermore, by merging and filtering the protocol type, protocol identifier, call direction, matching product, and executable identifier, records that match the protocol but have incorrect directions, or whose directions match but whose fields are unwritable, can be excluded before the instruction enters the field, reducing the probability of invalid requests occupying edge channels during cross-end calls. Furthermore, stacker crane commands, conveyor line barcode scanning, and RF terminal commands are included in the candidate record verification. The cloud-edge routing result is determined by queuing time, old WMS receipt time limit, version difference, and intersection relationship. This allows on-site waiting status, historical receipt constraints, and data version consistency to participate in the routing decision, preventing premature inventory rewriting when equipment is still queuing or the version is incomplete. During the inventory writing phase, business actions, changed quantities, available quantities, occupied quantities, frozen quantities, and existing quantities are placed on the same verification chain. Only when the difference direction, freeze boundary, and existing boundary are all satisfied are a release record formed, which can enhance the consistency between inventory changes and actual warehousing constraints. Node dwell time, timeout nodes, and edge empty receipt records are cross-triggered for compensation, which can advance anomaly handling from post-log tracking to node-level triggering, improving the security of inventory writing, the continuity of command execution, the accuracy of anomaly location, and the stability of cloud-edge collaboration during parallel switching. Attached Figure Description
[0012] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0013] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0014] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0015] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0016] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0017] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0018] Please see Figure 1 This invention provides a technical solution: a method for decoupling and connecting old and new WMS systems based on cloud-edge collaboration, comprising the following steps: S1: Obtain the interface name, protocol type, and call direction fields in the old WMS interface message header, and the business action, target batch number, target storage location, requested change quantity, and requested change direction fields in the message body. Detect the correspondence between the transaction lock flag and the inventory fields: current quantity, available quantity, frozen quantity, occupied quantity, and in-transit quantity. Verify the requested change direction field by field with the change direction of the inventory fields. Write the flag value 1 if the field direction is consistent, and write the flag value 0 if the field direction conflicts. Perform a summation operation on all field flag values and calculate the ratio with the total number of fields. Compare the ratio result with the preset direction consistency benchmark value of 0.8. Write the executable flag if the condition is met, and write the blocking flag if the condition is not met. Generate a set of interface field execution flags. S2: Based on the interface field execution identifier set, call the protocol type and the edge protocol adapter protocol identifier list, match the protocol type and protocol identifier list string values item by item. If the match is successful, write the protocol matching value 1, and if the match fails, write the protocol matching value 0. At the same time, read the call direction and the direction field of the protocol identifier record and compare them character by character. If the directions are consistent, write the direction matching value 1, and if the directions are inconsistent, write the direction matching value 0. Perform a product operation on the protocol matching value and the direction matching value to obtain the protocol adaptation result value. Combine the protocol adaptation result value with the executable identifier in the interface field execution identifier set to filter out the interface records that can enter the edge execution queue and generate the interface edge execution candidate set. S3: Based on the candidate set of interface edge execution, call the stacker crane task instructions, conveyor line barcode scanning data, and RF terminal inbound / outbound instructions in the automated warehouse scenario. Read the old WMS receipt waiting time limit and the edge queuing waiting time, calculate the difference between the current timestamp and the request entry time to obtain the queuing time value, compare the queuing time value with the old WMS receipt waiting time limit, and filter the interface records whose queuing time value is less than the receipt waiting time limit. At the same time, read the new system confirmation field version number and the edge synchronization version number to perform difference calculation, and filter the interface records whose version difference is equal to 0. Perform the intersection operation of the two filtering results to obtain the set of interface records that are allowed to complete closed-loop processing at the edge, and generate the interface cloud-edge traffic splitting result set. S4: Call the interface cloud-edge splitting result set to obtain the current quantity, available quantity, frozen quantity, occupied quantity, and in-transit quantity of the inventory mirror data corresponding to the target batch number and target storage location. Read the requested business action and the requested change quantity. Map the requested change quantity to the target inventory field according to the business action and perform addition and subtraction operations. Calculate the difference between the available quantity and the occupied quantity after the change. Compare the difference with 0 and filter records with a difference greater than or equal to 0. At the same time, compare the frozen quantity after the change with the current quantity and filter records with a frozen quantity less than or equal to the current quantity. Perform an intersection operation on the two filtering results to obtain the set of data records that can be written to the inventory mirror and generate the inventory write release record set. S5: For the inventory write-to-release record set, in the warehouse execution scheduling scenario, the AGV task receipt status, picking wave document status, and outbound verification record status are called. The process node identifier, node entry time, and current time are used to calculate the node dwell time. The node dwell time is compared with the node's allowed waiting time value, and node records with dwell time greater than the allowed waiting time are filtered. At the same time, the responsible execution side identifier, old WMS receipt status, new WMS transaction status, and edge device task status are read. Node records with the responsible execution side identifier being edge end, device task status being completed, and receipt status being empty are filtered. The intersection operation of the two filtering results is performed to obtain the set of nodes that need to perform edge retransmission or cloud retransmission actions, and a cloud-edge node compensation trigger set is generated.
[0019] Furthermore, the steps to obtain S1 are as follows: S101: Obtain the interface name, protocol type, call direction, business action, batch number, storage location, change quantity and direction, detect the combination relationship between change quantity and direction, establish a change direction set and compare it with the business action item by item, map the inventory field change path, generate the interface record corresponding change path identifier and write it into the set in order to obtain the change path identifier sequence.
[0020] To obtain the interface name, protocol type, call direction, business action, batch number, storage location, change quantity, and direction, first extract the field values in the warehouse system on a per-interface-request basis. For example, in a certain outbound request, the business action is outbound allocation, the change quantity is 50, and the direction is reducing available quantity. When checking the combination relationship between change quantity and direction, denote the change quantity as Q and the direction as D, where D takes the value of increase or decrease. Map the combination of Q and D to a signed quantity Qd. If the direction is decrease, then Qd = -50; if it is increase, then Qd = +50. When establishing the change direction set, form an array structure according to the interface order, and then check each business action item. According to the inventory field rules, for example, when the outbound allocation corresponds to a decrease in available quantity and an increase in occupied quantity, and when the put-away corresponds to a change in the relationship between existing quantity and storage location, the business actions are converted into field path identifiers. For example, the transfer path from available quantity to occupied quantity is recorded as A→B. When mapping the inventory field change path, the Qd of each record is bound to the path identifier to form a tuple structure. When generating the corresponding change path identifier for the interface record, the path identifier is encoded as a numerical sequence. For example, A→B is recorded as 1, and A→C is recorded as 2. All path identifiers are written into the set in the interface time order to form a sequence such as 1,1,2,1. This sequence is used for subsequent item-by-item verification to obtain the change path identifier sequence.
[0021] S102: Based on the change path identifier sequence, call the existing quantity, available quantity, frozen quantity, occupied quantity, and in-transit quantity, perform field direction comparison on each item of the sequence, write the matching value, write the conflict value if there is no match, sum the matching values and calculate the ratio with the total number of records to obtain the direction matching ratio; Based on the sequence of change path identifiers, the system calls the existing quantity, available quantity, frozen quantity, occupied quantity, and in-transit quantity. First, it reads the field values of the corresponding batch and storage location from the inventory mirror. For example, the existing quantity is 100, the available quantity is 80, the frozen quantity is 10, the occupied quantity is 5, and the in-transit quantity is 5. When performing field direction comparison on each item of the sequence, the change path identifier is mapped to the field change rule. For example, if path 1 indicates that the available quantity decreases while the occupied quantity increases, then the corresponding execution is ΔAvailable quantity = -50 and ΔOccupied quantity = +50. The calculated result is compared with the current field value to determine the direction. If the change direction is consistent with the business rule, a direction consistency value of 1 is written; otherwise, a direction conflict value of 0 is written. All direction consistency values are summed to obtain the total consistency S. Then, the total number of records N is obtained and the ratio R = S / N is calculated. This ratio is used to represent the consistency of the current batch interface execution. For example, if S = 3 and N = 4, then R = 0.75. This ratio is used as the basis for subsequent judgment to obtain the direction matching ratio.
[0022] S103: Based on the direction matching ratio, call the preset direction consistency benchmark condition, compare the ratio with the benchmark condition, if the condition is met, write the executable flag; if the condition is not met, write the blocking flag. Integrate and output all interface record flags according to the original sequence to generate a set of interface field execution flags. Based on the direction matching ratio, a preset direction consistency benchmark condition is invoked. When comparing the ratio with the benchmark condition, the direction consistency benchmark condition is first set as an interval range. For example, R≥0.7 is classified as an executable interval, and R<0.7 is classified as a blocking interval. This interval is set according to the historical interface execution stability interval in the field. For example, if the direction is consistent in 7 out of 10 consecutive interface calls, execution is allowed to continue. During the comparison process, the current R value is judged item by item with the interval boundary. If R falls into the executable interval, an executable flag 1 is written. If it falls into the blocking interval, a blocking flag 0 is written. Then, all interface record flags are integrated and output according to the original sequence. For example, the sequence is 1,1,0,1, indicating that the third interface needs to be blocked, and the rest are executable. This sequence directly drives the subsequent interface traffic splitting and generates a set of interface field execution flags.
[0023] Furthermore, the steps to obtain S2 are as follows: S201: Based on the interface field, execute the identifier set to obtain the protocol type and edge protocol adapter protocol identifier list. Compare the protocol type and protocol identifier item by item. If the characters match, write the matching identifier 1; if they do not match, write the matching identifier 0. Form a sequence set of matching identifiers for all interface records in order to obtain the protocol matching identifier sequence. Based on the interface field execution identifier set, the protocol type and edge protocol adapter protocol identifier list are obtained. First, the corresponding protocol type string for each record in the interface field execution identifier set is read at the edge access node, such as HTTP, MQTT, TCP. The list of activated protocol identifiers in the edge protocol adapter is read as a string array, such as HTTP, MQTT, AMQP. When performing character-level comparison of protocol type and protocol identifier item by item, the protocol type is recorded as string P_i, and each item in the protocol identifier list is recorded as A_j. For each P_i, all A_j are traversed and the length and character sequence are compared character by character. If the lengths are consistent and the positions of each character are the same, it is determined to be consistent and a matching identifier 1 is written. Otherwise, a matching identifier 0 is written. For example, if the protocol type of an interface is HTTP, it is written as 1 if HTTP exists in the list. If the protocol type is TCP but TCP does not exist in the list, it is written as 0. All interface record matching identifiers are arranged in chronological order to form a numerical sequence, such as 1,1,0,1. This sequence is used for subsequent directional matching and association processing to obtain the protocol matching identifier sequence.
[0024] S202: According to the protocol matching identifier sequence, call the call direction and the protocol identifier record direction field. Compare the call direction and the direction field one by one. If the directions match, write the direction matching identifier 1. If the directions do not match, write the direction matching identifier 0. Perform the product operation between the direction matching identifier and the protocol matching identifier sequence one by one to obtain the direction protocol matching result set. The process involves calling the call direction and the protocol identification record direction field based on the protocol matching identifier sequence. First, the call direction field value is read from the interface record (e.g., IN for inbound and OUT for outbound). Simultaneously, the direction field value is read from the protocol identification record, denoted as D_i for the call direction and D_j for the protocol direction. Character comparison is performed on each of these records. If the characters match perfectly, a direction matching identifier of 1 is written; otherwise, 0 is written. For example, if an interface is IN and the protocol supports the IN direction, 1 is written; if the interface is OUT and the protocol direction is IN, 0 is written. Then, the direction matching identifier and the protocol matching identifier sequence are multiplied item by item. Let the protocol matching value be M_i and the direction matching value be N_i. The combined result C_i = M_i × N_i. In the product operation, C_i is 1 only when both M_i and N_i are 1; otherwise, it is 0. For example, if the sequence M is 1,1,0,1 and N is 1,0,1,1, then C is 1,0,0,1. This sequence represents the set of records that simultaneously satisfy both protocol and direction conditions, resulting in the direction protocol matching result set.
[0025] S203: For the direction protocol matching result set, call the interface field execution identifier set to execute the executable identifiers in the identifier set, filter the combined matching results and executable identifiers item by item, retain the records with a matching value of 1 and the identifier of executable, output the filtered record set in the original order, and generate the interface edge execution candidate set; For the direction protocol matching result set, the executable identifier in the execution identifier set of the call interface field is executed. First, the corresponding executable identifier value of each interface record is read. For example, 1 indicates that execution is allowed and 0 indicates that execution is blocked. The direction protocol matching result set sequence is denoted as C_i and the executable identifier sequence is denoted as E_i. The two sequences are filtered and judged item by item. When C_i=1 and E_i=1, the interface record is retained. Otherwise, it is discarded. For example, if C is 1,0,0,1 and E is 1,1,0,1, then the records with positions 1 and 4 are retained after filtering. The filtering results are recombined and output according to the original entry order of the interface, and the corresponding batch number and storage location information are retained for subsequent processing to form the interface execution candidate set structure data and generate the interface edge execution candidate set.
[0026] Furthermore, the steps to obtain S3 are as follows: S301: Based on the candidate set of the interface edge execution, call the stacker crane task instruction, conveyor line barcode scanning data, and RF terminal in / out instructions, obtain the request entry time and the current timestamp, calculate the difference to form a queuing time sequence, and at the same time obtain the old WMS receipt waiting time limit and compare it with the queuing time item by item, filter the records whose queuing time is less than the receipt waiting time limit and output them according to the original sequence to obtain the time limit filtered record sequence. Based on the candidate set of interface edge execution, the system invokes stacker crane task instructions, conveyor line barcode scanning data, and RF terminal inbound / outbound instructions. In the automated warehouse, the task trigger time is extracted as the request entry time for each individual interface request. Simultaneously, the system's current timestamp is read as the processing time. For example, if the entry time of an outbound interface is 10:00:05 and the current time is 10:00:20, the queuing time is calculated as 15 seconds using the time difference. This difference is recorded as Tq and used to form a time series according to the interface order. Then, the old WMS receipt is read and the system waits. The time limit is used as a constraint value. For example, the waiting time limit for receipts is set to 30 seconds. Each item Tq is compared with this time limit. When Tq is less than or equal to 30 seconds, it is marked as a record that can be waited. If Tq exceeds 30 seconds, it is marked as a timeout record. In actual processing, if the sequence is 15 seconds, 28 seconds, and 35 seconds, the first two records are marked as waitable, and the third record is marked as timeout. All waitable records are output in the order they enter through the interface to form a new sequence structure. The corresponding batch number and device instruction information are retained for subsequent processing to obtain the time limit filtering record sequence.
[0027] S302: Based on the time limit filter record sequence, call the new system to confirm the field version number and edge synchronization version number, calculate the difference between the two types of version numbers one by one, write the consistency flag if the difference is zero, write the inconsistency flag if the difference is non-zero, filter the consistency flags and retain the flags as consistent records, output the filtering results according to the original sequence, and obtain the version consistent record sequence. Based on the time-limited filtering record sequence, the new system confirmation field version number and the edge synchronization version number are called. During the system synchronization process, the new system confirmation version number corresponding to each interface record is recorded as Vn, and the current cache version number on the edge side is recorded as Ve. The difference between the two version numbers is calculated item by item to obtain ΔV, where ΔV=Vn-Ve. When ΔV is equal to 0, a consistency flag of 1 is written, and when ΔV is not equal to 0, an inconsistency flag of 0 is written. For example, if Vn is 105 and Ve is 105 for a certain interface, then ΔV is 0 and marked as 1. If Vn is 106 and Ve is 105, then ΔV is 1 and marked as 0. All flags are arranged in the original sequence to form a flag array. Then, the flag array is filtered to keep only the records with a flag of 1. For example, in the sequence 1,0,1,1, the second record is removed, and the remaining records are kept. The filtering results are output in the original order of the interfaces. At the same time, the time and batch association information is retained for subsequent intersection operations to obtain the version consistent record sequence.
[0028] S303: Perform intersection filtering on the version-consistent record sequence call time limit filtering record sequence, match the interface identifiers of the two sequences one by one and retain the records that exist at the same time, reorganize the filtering result set according to the interface entry order, and generate the interface cloud-edge traffic splitting result set; For version-consistent record sequences, the time-limited filtering record sequences are used to perform intersection filtering. During the execution, the unique identifier of the interface is used as the matching key. Each record in the version-consistent record sequence is denoted as Id_i, and the corresponding identifier in the time-limited filtering record sequence is denoted as Id_j. The two sequences are matched item by item. If Id_i and Id_j are the same, the interface record is retained; otherwise, it is discarded. For example, if the version-consistent sequence is A, B, C, and the time-limited filtering sequence is B, C, D, the intersection result is B, C. The matched records are reordered according to the original interface entry time order. For example, if B precedes C in the time sequence, the order B, C is maintained. At the same time, the corresponding device instructions and inventory information are associated and output to form a unified data set, generating the interface cloud-edge splitting result set.
[0029] Furthermore, the steps to obtain S4 are as follows: S401: Call the cloud-edge splitting result set of the interface to obtain business actions and changes in quantity, detect the correspondence between business actions and inventory fields such as current quantity, available quantity, frozen quantity, occupied quantity, and in-transit quantity, map the changes in quantity to the target inventory fields one by one according to the business actions and perform addition and subtraction operations, output the field change result sequence according to the interface order, and obtain the inventory change mapping sequence. The API call to the cloud-edge distribution result set first reads the corresponding business action, quantity change, batch number, storage location, current inventory, available quantity, frozen quantity, occupied quantity, and in-transit quantity from the completed cloud-edge distribution records according to the API identifier. Taking API record R001 as an example in an automated warehousing scenario, this record has batch number B24051501, storage location A03 layer 02 column, business action "outbound allocation," and a quantity change of 30. The current inventory of this batch is read as 200, available quantity as 120, frozen quantity as 20, occupied quantity as 40, and in-transit quantity as 20. When judging the correspondence between business actions and inventory fields, outbound allocation is directed to a decrease in available quantity and an increase in occupied quantity; frozen quantity is directed to a decrease in available quantity and an increase in frozen quantity; inbound confirmation is directed to an increase in current inventory and a decrease in in-transit quantity; and putaway is directed to the storage location field. The segment update maintains the existing quantity, and the inventory adjustment is directed to the correction of the existing quantity and the linkage correction of the available quantity. For R001, the change quantity of 30 is written into the available quantity deduction item and the occupied quantity increase item. After the addition and subtraction processing, the available quantity is 90, the occupied quantity is 70, the existing quantity is 200, the frozen quantity is 20, and the in-transit quantity is 20. When the same processing is performed on the interface record R002, if the business action is to freeze, the change quantity is 15, the current available quantity is 90, and the frozen quantity is 20, then the mapped available quantity is 75 and the frozen quantity is 35. The values of the corresponding fields before the change, the values of the fields after the change, the business action, and the change quantity of each record are arranged in the order of interface entry. In the field change result, each record has the interface identifier, batch number, storage location, target inventory field, change direction, and change value, thus obtaining the inventory change mapping sequence.
[0030] S402: Based on the inventory change mapping sequence, call the available quantity and occupied quantity in the inventory field, calculate the difference for each item in the mapping sequence and compare it with zero, filter records with a difference not less than zero, and at the same time call the frozen quantity and the existing quantity to compare each item, filter records with a frozen quantity not greater than the existing quantity, and perform an intersection operation on the two types of filtering results according to the interface identifier to obtain the inventory constraint filtering sequence. Based on the inventory change mapping sequence, the available quantity, occupied quantity, frozen quantity, and current inventory after the change are first read from each mapping record. Taking batch B24051501 as an example in the inventory gating scenario, after processing by S401, interface record R001 has an available quantity of 90, an occupied quantity of 70, a frozen quantity of 20, and a current inventory of 200. When calculating the difference between the available quantity and the occupied quantity, the available quantity is subtracted from the occupied quantity to obtain a difference of 20. This difference is then compared with zero. If the difference is not less than zero, the record enters the first filtering sequence; if the difference is less than zero, the record is excluded from the first filtering sequence. If interface record R003 has an available quantity of 40 and an occupied quantity of 55, the difference is -15, and this record is excluded. Subsequently... The frozen quantity is read and compared with the existing quantity. If the frozen quantity of 20 in R001 is not greater than the existing quantity of 200, the record enters the second filtering sequence. If the frozen quantity of interface record R004 is 210 and the existing quantity is 200, the frozen quantity exceeds the existing quantity, and the record is excluded from the second filtering sequence. When performing the intersection operation on the first filtering sequence and the second filtering sequence according to the interface identifier, the first filtering sequence identifier set is recorded as R001, R002, and R005, and the second filtering sequence identifier set is recorded as R001, R005, and R006. After matching item by item, R001 and R005 are retained. The intersection records are arranged in the original interface order and accompanied by the batch number, storage location, and changed inventory field values to obtain the inventory constraint filtering sequence.
[0031] S403: Based on the inventory constraint, filter the sequence call interface cloud-edge splitting result set original records, match the interface identifier in the filter sequence with the original records one by one and retain the consistent items, reorganize the filter result set according to the batch number and storage location order, and generate the inventory write release record set; Based on the inventory constraint filtering sequence, the original record fields are first saved in the interface cloud-edge splitting result set. The interface identifier, batch number, storage location, business action, change quantity, source system identifier, target system identifier, and request entry time are read. In the edge inventory write scenario, records R001 and R005 in the inventory constraint filtering sequence are taken as examples. The interface identifier of R001 is matched item by item with the identifiers of each record in the interface cloud-edge splitting result set. After matching the same interface identifier, the original business action outbound allocation, batch number B24051501, storage location A03 layer 02 column, and change quantity 30 are read and retained. R003 and R004, which do not appear in the inventory constraint filtering sequence, are excluded from the output sequence. For R00... 5. When performing similar processing, if the batch number is B24051502, the storage location is column 04 of layer B01, the business action is freeze, and the change quantity is 15, then this record is merged with its original diversion field into a release candidate record. Then, it is arranged in character order of batch number, and within the same batch, it is arranged in character order of storage location. If the batch numbers R001 and R005 are different, then B24051501 is output before B24051502. If there are columns 02 of layer A03 and columns 05 of layer A03 in the same batch, then column 02 of layer A03 is output first. After reorganization, each record retains the interface identifier, batch number, storage location, business action, change quantity, field change value, and cloud edge diversion source identifier, and generates inventory to be written into the release record set.
[0032] Furthermore, the steps to obtain S5 are as follows: S501: For inventory write release record set, obtain process node identifier, node entry time and current timestamp, perform time difference calculation to form node dwell time sequence, at the same time obtain node allowable waiting time and compare it with the node dwell time sequence item by item, filter records whose dwell time exceeds the allowable waiting time and output them in the original order to obtain node timeout record sequence; For inventory write release record sets, first extract the batch number, storage location, business action, process node identifier, and node entry time according to the interface identifier. The current timestamp is read from the edge coordination layer clock. The allowed waiting time for the node is read from the process node record. Both the node entry time and the current timestamp are converted to seconds. Subtracting the node entry time from the current timestamp yields the node dwell time. Interface record R001 corresponds to batch B24051501, storage location A03, layer 02 column, node identifier is outbound allocation confirmation, node entry time is 10:02:10, and current timestamp is 10:05:00. After conversion, the dwell time is 170 seconds. The allowed waiting time in this node record is... The timeout period is 120 seconds. The 170-second timeout period is compared with the 120-second timeout period. If the 170-second timeout period exceeds the 120-second timeout period, a timeout flag of 1 is written. The node entry time corresponding to interface record R002 is 10:04:20, the current timestamp is 10:05:00, and the allowed waiting time is 120 seconds. If the dwell time is 40 seconds and does not exceed the 120-second timeout period, a timeout flag of 0 is written. During the filtering, only records with a timeout flag of 1 are retained. The retained records are arranged in the original interface order in the inventory release record set. The arrangement fields retain the interface flag, process node flag, batch number, storage location, node entry time, current timestamp, node allowed waiting time, node dwell time, and timeout flag, resulting in a node timeout record sequence.
[0033] S502: Based on the node timeout record sequence, call the responsibility execution side identifier, edge device task status and old WMS receipt status, match the responsibility execution side identifier with the edge end identifier item by item, match the device task status with the completion status item by item, match the receipt status with the empty status item by item, perform intersection filtering on the three types of matching results and output the records that meet the conditions to obtain the edge empty receipt matching sequence. Based on the node timeout record sequence, first read the responsibility execution side identifier, edge device task status, and old WMS receipt status bound to each timeout record. The responsibility execution side identifier is taken from the process node record. The edge device task status is taken from the stacker crane task, conveyor line barcode scanning task, or RF terminal task status field associated with that node. The old WMS receipt status is taken from the old WMS interface receipt field. For interface record R001, the responsibility execution side identifier is edge end, the edge device task status is completed, and the old WMS receipt status is empty. Match the responsibility execution side identifier with the edge end identifier character by character. If they match, write the responsibility matching identifier 1; if they do not match, write the responsibility matching identifier 0. Match the edge device task status with the completion status character by character. Matching: if consistent, write task matching identifier 1; if inconsistent, write task matching identifier 0. Match the old WMS receipt status with the empty status character by character. If consistent, write receipt matching identifier 1; if inconsistent, write receipt matching identifier 0. R001: all three identifiers are 1. For interface record R003, if the responsibility execution side identifier is cloud, the edge device task status is completed, and the old WMS receipt status is empty, then the responsibility matching identifier is 0, the task matching identifier is 1, and the receipt matching identifier is 1. When filtering by the intersection of the three identifiers according to the interface identifier, only records where all three identifiers are 1 are retained. The output fields retain the interface identifier, node identifier, responsibility execution side identifier, edge device task status, and old WMS receipt status, resulting in the edge empty receipt matching sequence.
[0034] S503: Based on the edge empty receipt matching sequence, call the node timeout record sequence to perform intersection operation, match the node identifiers in the two sequences one by one and retain the records that exist at the same time, reorganize the filtering result set according to the node entry time order, and generate the cloud edge node compensation trigger set. Based on the edge empty receipt matching sequence, first, the node identifier, interface identifier, node entry time, batch number, and storage location within the same interface range in the node timeout record sequence are retrieved. The intersection operation uses the node identifier and interface identifier as the double matching key. In the edge empty receipt matching sequence, record R001 has an interface identifier of IF001 and a node identifier of outbound allocation confirmation. If there is a record in the node timeout record sequence with both interface identifier IF001 and node identifier of outbound allocation confirmation, then that record is retained. In the edge empty receipt matching sequence, record R006 has an interface identifier of IF006 and a node identifier of freeze receipt confirmation. If there is no record corresponding to IF006 in the node timeout record sequence, then that record is removed. The intersection result is sorted by node entry time from earliest. If node R001 enters at 10:02:10 and node R004 enters at 10:03:30, then R001 will be listed before R004. For nodes with the same entry time, they will be arranged in the order of the interface identifier characters. After reorganization, each record retains the interface identifier, process node identifier, batch number, storage location, node entry time, node dwell time, responsible execution side identifier, edge device task status, and old WMS receipt status. Record R001 corresponds to batch B24051501, storage location A03 layer 02 column, node dwell time 170 seconds, responsible execution side is edge end, device task status is completed, and old WMS receipt status is empty. This record enters the trigger set and generates the cloud edge node compensation trigger set.
[0035] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of protection of the technical solution.
Claims
1. A method for decoupling and connecting old and new WMS systems based on cloud-edge collaboration, characterized in that, Includes the following steps: S1: Obtain the interface name, protocol type, call direction, business action, batch number, storage location, change quantity and direction; detect the combination relationship between change quantity and direction; establish a change direction set and compare it with each business action; map the inventory field change path to obtain the change path identifier sequence; based on the change path identifier sequence, call the existing quantity, available quantity, frozen quantity, occupied quantity, and in-transit quantity; perform field direction comparison on each item of the sequence; write a consistent value if it matches, and write a conflict value if it does not match; sum the consistent values and calculate the ratio with the total number of records to obtain the direction matching ratio; Based on the direction matching ratio, the preset direction consistency benchmark condition is invoked. The ratio is compared with the benchmark condition. If the condition is met, an executable flag is written; if not, a blocking flag is written. A set of execution flags for the interface field is generated. S2: Based on the interface field, the execution identifier set is matched with the protocol type and protocol identifier, the call direction is verified, the matching product is calculated, and the records are filtered in combination with the executable identifier to generate the interface edge execution candidate set; S3: Based on the candidate set of interface edge execution, call stacker crane instructions, conveyor line scanning instructions, and RF terminal instructions, calculate the queuing time and compare it with the old WMS receipt waiting time limit, filter records with queuing time less than the old WMS receipt waiting time limit and output them in the original sequence to obtain the time limit filtered record sequence; calculate the difference between the new system confirmation field version number and the edge synchronization version number, filter records with a version difference of zero to obtain the version consistent record sequence; for the version consistent record sequence, call the time limit filtered record sequence to perform intersection filtering, match the interface identifiers of the two sequences item by item and retain records that exist simultaneously, and generate the interface cloud-edge traffic splitting result set; S4: Call the interface cloud-edge traffic splitting result set to map business actions and changes in quantity, calculate the difference between available quantity and occupied quantity, compare the difference with zero, verify the frozen quantity and the existing quantity, and generate inventory to write to the release record set; S5: Calculate the node dwell time for the inventory write release record set, filter records whose dwell time exceeds the node's allowed waiting time, and obtain the node timeout record sequence; based on the node timeout record sequence, call the responsibility execution side identifier, edge device task status, and old WMS receipt status, match the responsibility execution side identifier with the edge end identifier item by item, match the device task status with the completion status item by item, and match the receipt status with the empty status item by item, perform intersection filtering on the three types of matching results, and output the records that meet the conditions, to obtain the edge empty receipt matching sequence; The intersection operation is performed on the node timeout record sequence based on the edge empty receipt matching sequence. The node identifiers in the two sequences are matched item by item and the records that exist at the same time are retained to generate the cloud edge node compensation trigger set.
2. The method for decoupling and connecting old and new WMS systems based on cloud-edge collaboration according to claim 1, characterized in that, The steps for obtaining S1 are as follows: S101: Obtain the interface name, protocol type, call direction, business action, batch number, storage location, change quantity and direction, detect the combination relationship between change quantity and direction, establish a change direction set and compare it with the business action item by item, map the inventory field change path, generate the interface record corresponding change path identifier and write it into the set in order to obtain the change path identifier sequence. S102: Based on the change path identifier sequence, call the existing quantity, available quantity, frozen quantity, occupied quantity, and in-transit quantity, perform field direction comparison on each item of the sequence, write the matching value, write the conflict value if there is no match, sum the matching values and calculate the ratio with the total number of records to obtain the direction matching ratio; S103: Based on the direction matching ratio, call the preset direction consistency benchmark condition, compare the ratio with the benchmark condition, if the condition is met, write the executable flag; if not, write the blocking flag. Integrate and output all interface record flags according to the original sequence to generate a set of interface field execution flags.
3. The method for decoupling and connecting old and new WMS systems based on cloud-edge collaboration according to claim 1, characterized in that, The steps for obtaining S2 are as follows: S201: Based on the interface field, execute the identifier set to obtain the protocol type and edge protocol adapter protocol identifier list. Compare the protocol type and protocol identifier item by item. If the characters match, write the matching identifier 1; if they do not match, write the matching identifier 0. Form a sequence set of matching identifiers for all interface records in order to obtain the protocol matching identifier sequence. S202: According to the protocol matching identifier sequence, call the call direction and the protocol identifier record direction field. Compare the call direction and the direction field one by one. If the directions match, write the direction matching identifier 1. If the directions do not match, write the direction matching identifier 0. Perform the product operation between the direction matching identifier and the protocol matching identifier sequence one by one to obtain the direction protocol matching result set. S203: For the direction protocol matching result set, call the interface field execution identifier set to select the executable identifiers. Filter the combined matching results and executable identifiers item by item, retain the records with a matching value of 1 and the identifier of executable, output the filtered record set in the original order, and generate the interface edge execution candidate set.
4. The method for decoupling and connecting old and new WMS systems based on cloud-edge collaboration according to claim 1, characterized in that, The steps for obtaining S3 are as follows: S301: Based on the candidate set of the interface edge execution, call the stacker crane task instruction, conveyor line barcode scanning data, and RF terminal in / out instructions, obtain the request entry time and the current timestamp, calculate the difference to form a queuing time sequence, and at the same time obtain the old WMS receipt waiting time limit and compare it with the queuing time item by item, filter the records whose queuing time is less than the receipt waiting time limit and output them according to the original sequence to obtain the time limit filtered record sequence. S302: Based on the time limit filter record sequence, call the new system to confirm the field version number and edge synchronization version number, calculate the difference between the two types of version numbers one by one, write the consistency flag if the difference is zero, write the inconsistency flag if the difference is non-zero, filter the consistency flags and retain the flags as consistent records, output the filtering results according to the original sequence, and obtain the version consistent record sequence. S303: Perform intersection filtering on the record sequence of the version consistent record sequence and the time limit filtering record sequence. Match the interface identifiers of the two sequences one by one and retain the records that exist at the same time. Reorganize the filtering result set according to the interface entry order to generate the interface cloud-edge splitting result set.
5. The method for decoupling and connecting old and new WMS systems based on cloud-edge collaboration according to claim 1, characterized in that, The steps for obtaining S4 are as follows: S401: Call the cloud-edge splitting result set of the interface to obtain business actions and changes in quantity, detect the correspondence between business actions and inventory fields such as current quantity, available quantity, frozen quantity, occupied quantity, and in-transit quantity, map the changes in quantity to the target inventory fields one by one according to the business actions and perform addition and subtraction operations, output the field change result sequence according to the interface order, and obtain the inventory change mapping sequence. S402: Based on the inventory change mapping sequence, call the available quantity and occupied quantity in the inventory field, calculate the difference for each item in the mapping sequence and compare it with zero, filter records with a difference not less than zero, and at the same time call the frozen quantity and the existing quantity to compare each item, filter records with a frozen quantity not greater than the existing quantity, and perform an intersection operation on the two types of filtering results according to the interface identifier to obtain the inventory constraint filtering sequence. S403: Based on the inventory constraints, the original records of the cloud-edge splitting result set of the filter sequence call interface are used to match the original records item by item of the interface identifier in the filter sequence and retain the consistent items. The filter result set is reorganized according to the batch number and storage location order to generate the inventory write release record set.
6. The method for decoupling and connecting old and new WMS systems based on cloud-edge collaboration according to claim 1, characterized in that, The steps for obtaining S5 are as follows: S501: For inventory write release record set, obtain process node identifier, node entry time and current timestamp, perform time difference calculation to form node dwell time sequence, at the same time obtain node allowable waiting time and compare it with the node dwell time sequence item by item, filter records whose dwell time exceeds the allowable waiting time and output them in the original order to obtain node timeout record sequence; S502: Based on the node timeout record sequence, call the responsibility execution side identifier, edge device task status and old WMS receipt status, match the responsibility execution side identifier with the edge end identifier item by item, match the device task status with the completion status item by item, match the receipt status with the empty status item by item, perform intersection filtering on the three types of matching results and output the records that meet the conditions to obtain the edge empty receipt matching sequence. S503: Based on the edge empty receipt matching sequence, call the node timeout record sequence to perform intersection operation, match the node identifiers in the two sequences one by one and retain the records that exist at the same time, reorganize the filtering result set according to the node entry time order, and generate the cloud edge node compensation trigger set.
Citation Information
Patent Citations
Auditable privacy protection authentication method based on Internet of Things access
CN121125228A
Cloud edge collaboration-oriented data service task scheduling and consistency processing method
CN121771287A