A multi-terminal inventory conflict calibration method and device for intelligent warehousing
Patent Information
- Application Number
- CN202611154601.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-20
AI Technical Summary
[0005]为解决多终端仓储作业过程中因终端时钟不一致、网络中断、数据重复上传和并发操作所造成的库存事件顺序不明、库存增量重复计算及账面库存与物理库存不一致的问题,本发明提供一种面向智能仓储的多终端库存冲突校准方法及装置
[0078]综上,本发明所采用的技术方案以统一库存事件为处理对象,将来自智能货柜、智能仓库、移动盘点终端、企业微信终端和仓储工作站的库存操作写入携带逻辑时标、基线水位及物理感知结果的事件链;通过向量逻辑时钟确定事件的因果先后、并发及覆盖关系,结合事件标识、业务指纹和库存约束识别离线盘点、重复提交及并发领料冲突;再将扫码、货柜感知、业务单据、维修工单和终端可信等级转换为事件可信权重,从确认快照开始回放可接纳事件,重建目标时刻理论库存,并依据货位感知量和移动盘点量进行约束校准;校准结果通过携带确认水位、补偿事件及墓碑标记的增量同步数据下发至各终端,由此形成可追溯的库存冲突处理与状态收敛过程。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent warehousing and distributed data consistency processing technology, specifically to a multi-terminal inventory conflict calibration method and device for intelligent warehousing. Background Technology
[0002] With the collaborative application of smart vending machines, warehouse management systems, mobile inventory terminals, WeChat enterprise terminals, and warehouse workstations in warehousing operations, the receipt, requisition, return, inventory, and transfer operations of the same material may be recorded separately by different terminals. The communication status, data format, and local clock of each terminal may differ, and mobile terminals may also continue to operate offline and upload data centrally after the network is restored.
[0003] Existing warehousing systems typically update inventory based on server reception time or terminal timestamps, and perform consistency checks through message retries, deduplication of business order numbers, or container sensing results. When offline inventory counts and online material requisitions overlap, the same operation is submitted repeatedly, or multiple terminals simultaneously retrieve materials from the same storage location, a single timestamp is insufficient to accurately represent the causal relationship between events. Furthermore, later data directly overwriting the current inventory may result in the loss of actual operation records, duplicate deductions, or negative inventory.
[0004] Furthermore, barcode scanning records, container sensing results, inbound / outbound slips, maintenance work orders, and terminal operating status all serve different evidentiary purposes. Existing processing methods typically lack a unified and reliable evaluation mechanism and a historical event replay mechanism, making it difficult to reconstruct the theoretical inventory at the target time and to determine the source of anomalies and calibration results when there are discrepancies between book inventory, location sensing quantities, and moving inventory quantities. Therefore, a unified approach is needed for determining the relationships between multi-terminal inventory events, identifying conflicts, evaluating evidence, reconstructing inventory, and updating synchronously. Summary of the Invention
[0005] To address the issues of unclear inventory event sequence, duplicate inventory increment calculations, and discrepancies between book and physical inventory caused by inconsistent terminal clocks, network interruptions, duplicate data uploads, and concurrent operations during multi-terminal warehousing operations, this invention provides a multi-terminal inventory conflict calibration method and apparatus for intelligent warehousing. This invention converts inventory operations generated by each terminal into inventory events with a unified structure, uses logical time stamps to determine the partial order relationship between inventory events, identifies different types of inventory conflicts based on this, and comprehensively determines the credibility of inventory events by integrating multi-source evidence. Theoretical inventory at the target time is reconstructed through event playback, and the inventory calibration value is determined by combining location perception and moving inventory counts. Finally, the calibration results are distributed to each terminal in the form of incremental synchronized data.
[0006] The present invention provides a multi-terminal inventory conflict calibration method for intelligent warehousing, comprising the following steps.
[0007] S1 receives inventory operation data generated by smart vending machines, smart warehouses, mobile inventory terminals, enterprise WeChat terminals, and warehouse workstations. It encapsulates each inventory operation into an inventory event that includes material code, location, quantity, terminal identifier, operator, physical sensing result, and logical time stamp, and generates an event identifier.
[0008] Specifically, the inventory operation data generated by smart vending machines includes door opening records, door closing records, weighing change records, RFID tag set change records, visual counting results, and local inventory records on the terminal; the inventory operation data generated by smart warehouses includes records of automatic inbound, automatic outbound, transfer, conveying, picking, and changes in storage location status; the inventory operation data generated by mobile inventory terminals includes material scanning records, storage location scanning records, inventory quantity, inventory scope, and offline operation records; the inventory operation data generated by WeChat terminals includes material requisition requests, material return requests, approval results, operation confirmations, and anomaly feedback; and the inventory operation data generated by warehouse workstations includes inbound slips, outbound slips, transfer slips, scrap slips, inventory adjustment slips, and corresponding execution confirmation records.
[0009] A unified mapping is implemented for material identifiers, location identifiers, personnel identifiers, business document identifiers, operation types, and units of measurement used across different terminals. Inbound, return, and transfer operations are converted into positive inventory increments, while requisition, scrap, and transfer operations are converted into negative inventory increments. Inventory counting operations are converted into inventory observations, which record the inventory scope, observation time, and baseline level, without directly overriding existing inventory increment event chains. For materials measured by weight, the perceived weight is converted into candidate inventory quantities based on tare weight, unit material weight, and measurement accuracy; for materials measured by quantity, the number of scanned items, labels, or visually recognized items are converted into candidate inventory quantities.
[0010] Furthermore, inventory events also include batch identifiers, baseline levels, terminal local sequences, business references, payload summaries, and generation status. The baseline level indicates the range of server events that have been received and acknowledged when the terminal generates the inventory event; the terminal local sequence indicates the local order in which the events were generated by the corresponding terminal; the business reference indicates the association between the inventory event and business documents, approval events, cabinet opening events, or previous inventory events; and the generation status is used to distinguish between inventory events generated online, offline, supplementary, and automatically sensed.
[0011] Event identifiers are generated based on warehouse domain identifiers, terminal identifiers, and terminal local sequences, enabling terminals to independently generate event identifiers suitable for global deduplication even offline. Business fingerprints are generated based on material code, storage location, operation type, quantity, business document identifier, operator, and action stage. Inventory events with the same event identifier are identified as transmission duplicate events; inventory events with different event identifiers but identical business fingerprints, payload summaries, and business parent events are identified as business duplicate events. Transmission duplicate events and business duplicate events are stored as subordinate records of the master inventory event, preventing duplicate inventory increments.
[0012] For the application, approval, cabinet opening, and material requisition confirmation in the same material requisition process, each stage is recorded as a different event with a business reference relationship. The actual inventory event that generates inventory increment is determined according to the preset settlement stage, avoiding the reinterpretation of multiple action stages in the same business chain as multiple material requisitions. For raw data whose material code or storage location cannot be determined, it is encapsulated as an event to be assigned, retaining the original terminal identifier, original fields, and payload summary, and is not included in the inventory increment calculation until the material code and storage location are assigned.
[0013] S2 performs time-series merging based on the logical time stamps of each terminal, establishes the partial order relationship of events corresponding to the same material and storage location, and determines the sequential relationship, concurrent relationship, or coverage relationship between inventory events.
[0014] Specifically, the logical time stamp includes a vector logical clock and a hybrid logical clock. The vector logical clock is used to determine the causal relationship between inventory events on different terminals, while the hybrid logical clock is used to record the approximate physical time corresponding to the inventory events, forming a stable display order and a deterministic playback order within the same partial order layer. The determination of causal relationship is based on the vector logical clock; the hybrid logical clock, server receiving order, and terminal physical time are not used as separate criteria for determining coverage relationship.
[0015] Each terminal maintains its own corresponding vector component. When a terminal generates an inventory event, it increments the vector component corresponding to that terminal and writes the confirmed vector components of other terminals into the inventory event. After receiving incremental synchronization data from the server, the terminal takes the maximum value for each component of its local vector logical clock and the end confirmation level carried in the incremental synchronization data. After receiving an inventory event, the server takes the maximum value for each component of its maintained vector logical clock and the vector logical clock carried in the inventory event, and updates the corresponding vector component of the server.
[0016] For inventory events e_a and e_b, their vector logical clocks are represented as V_a and V_b, respectively. Inventory event e_a is determined to be causally prior to inventory event e_b when V_a[k] ≤ V_b[k] holds for all vector components k, and there exists a vector component that satisfies V_a[k] < V_b[k]. When V_a and V_b do not have a component-wise inclusion relationship, inventory events e_a and e_b are determined to be concurrent. Concurrency means that neither inventory event has observed the other's inventory event when it is generated, and their concurrency relationship is not changed by one inventory event arriving at the server first.
[0017] When inventory event e_b is causally subsequent to inventory event e_a, and inventory event e_b carries a reversal reference, compensation reference, or calibration reference pointing to inventory event e_a, it is determined that inventory event e_b overwrites inventory event e_a. During replay, inventory event e_b does not directly delete inventory event e_a, but rather offsets or corrects the inventory impact of inventory event e_a through newly added reversal increments, compensation increments, or calibration increments, thereby preserving the original operation process.
[0018] Optionally, when the warehousing system contains a large number of terminals, the vector logic clock adopts a sparse vector formed by warehouse, storage area, material category, or inventory segmentation. The sparse vector only records the terminal components that have been observed in the current inventory event; unrecorded terminal components are treated as unobserved. By using sparse vectors, the amount of data in the logical timescale is reduced, while maintaining the ability to determine the partial order relationship of events.
[0019] The hybrid logic clock includes a physical time component and a logical increment component. When the terminal physical time has not rolled back and is greater than the physical time component of the received event, the current physical time is used as the new physical time component; when multiple inventory events have the same physical time component or the terminal physical time has rolled back, the logical increment component is used. The hybrid logic clock is used to form the query cursor and replay order, but the vector logic clock is already determined as concurrent inventory events and is not converted into a causal sequence due to the different hybrid logic clocks.
[0020] S3 identifies inventory conflicts caused by offline inventory counts, duplicate submissions, or concurrent material requisitions based on the partial order of events, event identifiers, business reference relationships, and the baseline level carried by inventory events.
[0021] Specifically, the inventory conflict domain is determined by material code, storage location, and batch identifier. For materials not subject to batch management, the inventory conflict domain is determined by material code and storage location. The server retrieves inventory events within the target time range within the conflict domain and determines whether the inventory events can coexist under the same inventory state based on the partial order relationship of the events.
[0022] When the baseline level carried by an inventory count event is earlier than the server-confirmed level, and there are unobserved events such as receiving, issuing, returning, transferring, or calibration events between the two levels, the inventory count event is identified as an offline inventory count conflict event. The inventory quantity recorded in the inventory count event is interpreted as an inventory observation based on the original inventory count level, rather than as an absolute inventory value covering the current server inventory. The server adds or subtracts the corresponding inventory increment based on the partial order relationship between the inventory count observation time and the unobserved inventory events, so as to establish a correspondence between the offline inventory count results and the target time.
[0023] When two inventory events have the same event identifier, the subsequently received inventory event is identified as a transmission duplicate event. When two inventory events have different event identifiers, but their service fingerprint, payload digest, and service parent event are consistent, one of the inventory events is identified as the primary inventory event, and the remaining inventory events are identified as service duplicate events. Duplicate inventory events are retained in the event log and a duplicate dependency relationship is established, but only the inventory increment of the primary inventory event is calculated during inventory replay.
[0024] When the vector logic clocks of multiple negative inventory increment events corresponding to the same material and storage location do not have a component-wise inclusion relationship, and the sum of the demand quantities of the multiple negative inventory increment events is greater than the sum of the common baseline inventory and the already determined inventory increment, the multiple negative inventory increment events are identified as concurrent material requisition conflict events. The common baseline inventory is the most recently confirmed inventory that has been observed in all multiple concurrent material requisition events, and the already determined inventory increment is the inventory change after the common baseline that does not have a mutually exclusive relationship with the concurrent material requisition events.
[0025] When the container sensing result indicates a change in the quantity of materials, but there are no inventory operation events in the corresponding time and causal neighborhoods, a physical change marker with no operation record is generated. When an inventory operation event indicates a change in the quantity of materials, but the container sensing result does not show a corresponding change, a physical unchanged marker with an operation record is generated. These markers together serve as physical logic conflict markers. If a valid maintenance work order corresponding to the equipment, sensor, or container partition exists within the corresponding time range, it is further determined whether the physical change was caused by maintenance disassembly / reassembly, sensor calibration, or temporary removal of materials.
[0026] When the same inventory event simultaneously meets both the duplicate submission and concurrent material requisition conditions, duplicate inventory increments are first eliminated based on the event identifier and business fingerprint. Then, concurrent material requisition is determined for the retained master inventory event. This processing sequence prevents false inventory increments caused by duplicate transmissions from being included in the concurrent demand quantity.
[0027] S4 associates conflicting inventory events with barcode scanning records, container sensing results, inbound / outbound slips, maintenance work orders, and terminal trust levels, and calculates the trust weight of inventory events based on the consistency of the associated evidence.
[0028] Specifically, an event evidence package is established within the operation time neighborhood and causal neighborhood corresponding to the inventory event. The event evidence package stores references to barcode scanning records, vending machine sensing records, business documents, maintenance work orders, terminal status, and operator permission records. The evidence in the event evidence package retains the original data summary, source terminal, collection time, and valid status, enabling the credibility weight of the inventory event to be traced back to the corresponding evidence.
[0029] The barcode scan results are compared with the barcodes in the inventory events, and the location barcode scan results are compared with the locations in the inventory events. A barcode consistency S_e is then generated by combining the scanning order, the location of the scanning terminal, and the operator's identity. A high level of barcode consistency is achieved when the scan result matches both the barcode and the location. If only the barcode of the material is scanned but the location is not, the barcode consistency is reduced based on the terminal's location range and the open cabinet zoning. If the scanned material does not match the location where the weight change occurred, a conflicting evidence record is generated.
[0030] Changes in container weight, RFID tag set, or visual count are compared with inventory increments in inventory events to form physical perception consistency P_e. For weight perception results, the number of candidate changes is determined based on the stable weight before and after the operation, container tare weight, and unit material weight. For RFID tag perception results, the identification of newly added or removed materials is determined based on the difference in tag sets before and after the operation. For visual count results, the number of candidate changes is determined based on the difference in the target quantity of materials before and after the operation. When multiple perception results coexist, physical perception consistency is determined based on the health status and time alignment status of each sensing device.
[0031] The materials, batches, quantities, effective status, and execution status in the inbound / outbound slips are compared with inventory events to form document consistency (D_e). If a business document has not yet been approved or has been withdrawn, it is not considered sufficient evidence that the inventory operation has actually been completed. Document consistency is improved when the business document has taken effect and the corresponding execution confirmation, barcode scanning results, and container sensing results are consistent. For partially fulfilled material requisition transactions, the approved quantity on the document is used to limit the maximum quantity that can be requisitioned; the actual inventory increase is determined based on execution evidence.
[0032] The equipment identification, maintenance time, affected area, and maintenance type in the maintenance work order are compared with the container sensing results to form the maintenance explanatory power M_e. When sensor disassembly / reassembly, weighing zeroing, container power failure, or temporary material removal occurs within the effective scope of the maintenance work order, the explanatory power of the physical change caused by the maintenance activity is increased, while the role of the corresponding sensing results as evidence of normal material requisition or warehousing is reduced. Maintenance work orders that are inconsistent with the corresponding equipment, time, or affected area are not used to explain inventory changes.
[0033] Terminal credibility T_e is formed based on the terminal's historical verification results, clock offset status, sensing device calibration status, data retry ratio, and firmware status. Terminal type is used to determine the types of evidence it can provide, but does not directly determine terminal credibility. For example, the approval result of the WeChat Work terminal is used to prove whether the operation was authorized, and the container sensing result is used to prove whether the goods have undergone physical changes. Both participate in the credibility evaluation of their respective evidence dimensions.
[0034] Specifically, the confidence weight R_e of inventory event e is calculated according to the following formula:
[0035] R_e=clip(λ_sS_e+λ_pP_e+λ_dD_e+λ_mM_e+λ_tT_e-λ_aA_e, 0, 1).
[0036] Where S_e represents barcode consistency, P_e represents physical perception consistency, D_e represents document consistency, M_e represents maintenance interpretability, T_e represents terminal credibility, and A_e represents the degree of contradiction between related evidence; λ_s, λ_p, λ_d, λ_m, λ_t, and λ_a represent the corresponding non-negative weight coefficients; clip indicates that the calculation result is restricted to 0 to 1. Different material types and operation types can use different combinations of weight coefficients, but inventory events participating in the comparison within the same conflict domain use the same weight configuration and rule version.
[0037] Specifically, the terminal trustworthiness T_j of terminal j is updated according to the following formula:
[0038] T_j=(a_0+n_j^+) / (a_0+b_0+n_j^+n_j^-).
[0039] Wherein, n_j^+ represents the number of inventory events generated by terminal j and verified as correct, n_j^- represents the number of inventory events generated by terminal j and verified as incorrect, and a_0 and b_0 represent the prior reliability parameters. Time decay is applied to historical verification results that have exceeded a preset validity period, so that verification results within a more recent time period have a higher impact on the current terminal reliability. After the terminal completes clock correction, sensing device calibration, or firmware replacement, a new reliability update starting point is recorded, and the terminal state records before and after correction are retained. For inventory event e generated by terminal j, T_e in the reliability weight calculation is taken as the T_j corresponding to the time the inventory event was generated, and it is saved together with the corresponding rule version.
[0040] When the same physical perceived change is referenced by multiple mutually exclusive inventory events, this physical perceived change is not unconditionally accepted as complete supporting evidence for each inventory event. Physical perceived changes are categorized based on the opening operation range, scanning sequence, personnel identity, and perceived change curve. If categorization is not possible, the physical perceived change is marked as shared evidence, and the degree of evidence contradiction is increased to prevent multiple mutually exclusive inventory events from repeatedly using the same physical change to increase its credibility weight.
[0041] S5 starts with a confirmed inventory snapshot no later than the target time, replays the inventory events before the target time according to the partial order of events, determines the set of acceptable events under inventory constraints, and reconstructs the theoretical inventory at the target time.
[0042] Specifically, the confirmed inventory snapshot includes the snapshot inventory Q_0, the snapshot confirmation level V_0, a summary of the accepted event set, the snapshot rule version, and the snapshot verification value. The confirmed inventory snapshot no later than the target time and with the confirmation level closest to the target time is selected as the replay starting point. Inventory events not dominated by the snapshot confirmation level V_0 and no later than the target time are queried, and a directed acyclic graph of events is constructed based on event partial order relationships, business reference relationships, revoked references, compensated references, and calibration references.
[0043] Inventory events with causal relationships are replayed in topological order. Concurrent inventory events affecting different materials or storage locations can be replayed in parallel at the same topological layer. For concurrent inventory events affecting the same material and storage location but whose inventory increments can jointly satisfy inventory constraints, these concurrent inventory events are jointly written into the acceptable event set. For inventory events that cannot be simultaneously true within the same conflict domain, a combination of events that can be simultaneously true is selected based on event credibility weights and inventory constraints.
[0044] Specifically, the theoretical inventory Q_th at the target time is determined according to the following formula:
[0045] Q_th=Q_0+Σ_i x_iΔq_i+Σ_h Δq_h.
[0046] Where x_i represents the event acceptance variable corresponding to conflicting inventory event i, and x_i can be 0 or 1; Δq_i represents the inventory increment corresponding to conflicting inventory event i; Δq_h represents the inventory increment that has been determined and does not belong to the set of pending conflicts. When x_i is 1, the corresponding conflicting inventory event is accepted and participates in the theoretical inventory calculation; when x_i is 0, the corresponding conflicting inventory event does not generate the inventory increment for this replay.
[0047] Specifically, the event combination satisfies the following inventory quantity constraints:
[0048] 0≤Q_0+Σ_i x_iΔq_i+Σ_h Δq_h≤Cap.
[0049] Here, Cap represents the inventory capacity of the corresponding material in the corresponding storage location. Event combinations also satisfy constraints regarding batch validity, serial number uniqueness, approved business document quantity, and quantity conservation at both ends of the transfer process. Among event combinations that satisfy these constraints, the event combination with the largest sum of credibility weights is selected as the acceptable event set. If the difference in the sum of credibility weights of multiple event combinations is less than a preset distinguishing threshold, a single event combination is not forcibly determined; instead, the relevant inventory events are marked as pending review.
[0050] When the demand quantity corresponding to a concurrent material requisition conflict event exceeds the available inventory, the effective fulfillment quantity y_i is determined based on the serial number scanning result associated with each material requisition event, the cabinet opening operation range, the perceived change in the container, the effective quantity of the material requisition order, and the trusted weight, such that 0≤y_i≤r_i, and the sum of each effective fulfillment quantity is not greater than the available inventory, where r_i represents the demand quantity of the corresponding material requisition event.
[0051] The effective fulfillment quantity is written into the fulfillment event derived from the original material requisition event, and a short requisition exception event is generated based on the difference between the required quantity and the effective fulfillment quantity. The fulfillment event participates in inventory replay, and the short requisition exception event is used to generate material shortage feedback without deducting inventory twice. The correspondence between the original material requisition request quantity, the actual fulfilled quantity, and the unfulfilled quantity is maintained through the derived event.
[0052] When a perceived change in the same container is simultaneously associated with multiple mutually exclusive material requisition events, the perceived change is categorized based on the container opening area, personnel identity, and scanning sequence. If the actual material requisition quantity corresponding to each material requisition event can be determined, a fulfillment event is generated for each event. If the quantity corresponding to each material requisition event cannot be determined, the relevant material requisition events are kept in a pending review state, and the inventory quantity is not directly allocated according to the trusted weight ratio.
[0053] After the event replay is completed, the inventory events are marked as accepted, duplicate dependent, compensated, partially fulfilled, rejected, or pending review. Duplicate dependent events retain their reference relationships with the master inventory event, compensated events retain their reference relationships with the compensated event, and partially fulfilled events retain their reference relationships with the original request event and the short-receipt exception event. A summary of the acceptable event set is generated based on the replay results and associated with the theoretical inventory and target time.
[0054] S6 verifies the discrepancy between the theoretical inventory and the location perception quantity and moving inventory quantity aligned with the target time, and determines the inventory calibration value, the source of the anomaly, and the locations to be reviewed.
[0055] Specifically, the location perception quantity and moving inventory quantity may be generated before or after the target time. Based on the confirmed inventory events between the location perception time, moving inventory time, and target time, the location perception quantity and moving inventory quantity are time-aligned. When the observation time is earlier than the target time, the confirmed inventory increment between the observation time and the target time is added to the observation quantity; when the observation time is later than the target time, the confirmed inventory increment between the target time and the observation time is subtracted from the observation quantity to obtain the location perception quantity Q_s and moving inventory quantity Q_m at the target time.
[0056] Calculate the difference between the theoretical inventory Q_th and the location-sensed quantity Q_s, and the difference between the theoretical inventory Q_th and the moving inventory quantity Q_m. When both differences are within the corresponding allowable error range, the theoretical inventory Q_th is determined as the inventory calibration value. The allowable error range is determined based on the material measurement method, sensing equipment error, the dispersion of single-item weight, and the completeness of the inventory count. For materials with unique serial numbers and managed by item, the allowable error range can be set to zero; for materials whose quantity is converted from weight, the allowable error range is set based on the accuracy of the weighing equipment and the unit material weight deviation.
[0057] When any difference exceeds the corresponding allowable error range, the inventory calibration value Q_cal is determined according to the following formula, under the constraints of non-negativity of inventory, storage capacity, batch validity, and serial number uniqueness represented by the candidate set Ω:
[0058] Q_cal=arg min_(q∈Ω){ω_tρ(q-Q_th)+ω_sρ(q-Q_s)+ω_mρ(q-Q_m)+ω_bρ(q-Q_biz)}.
[0059] Where q represents the candidate inventory value; Q_biz represents the candidate inventory quantity independently derived from the effective inbound, outbound, return, and transfer orders; ρ represents the robust loss function; ω_t represents the theoretical inventory weight determined based on the credibility of the event chain; ω_s represents the location perception weight determined based on the sensor health; ω_m represents the mobile inventory weight determined based on the inventory coverage, missed scan status, and inventory terminal credibility; and ω_b represents the business inventory weight determined based on the completeness and execution status of the business documents.
[0060] The robust loss function employs squared loss when the difference is small and linear loss when the difference exceeds a preset threshold, in order to reduce the impact of a single outlier observation on the inventory calibration value. For materials managed by piece, the candidate inventory value q is a non-negative integer; for materials managed by weight, length, or volume, the candidate inventory value is discretized according to the corresponding minimum measurement precision.
[0061] The calibration confidence level is determined based on the objective function difference between the optimal inventory value and adjacent candidate inventory values, the number of valid evidences, and the consistency of evidence. When the calibration confidence level reaches the automatic calibration threshold, a calibration event is generated to adjust the theoretical inventory to the inventory calibration value; when the calibration confidence level is lower than the automatic calibration threshold but not lower than the freeze threshold, the suggested calibration value is retained and a storage location to be reviewed is generated; when the calibration confidence level is lower than the freeze threshold, a storage location to be reviewed is generated, and the automatic inventory deduction operation is restricted for the corresponding storage location.
[0062] The source of anomalies is determined based on the partial order of events, inventory constraint violation status, and residuals of each observation. When the baseline level of inventory count events lags behind, and the missed inventory events can explain the inventory count discrepancies, the source of anomalies is determined to be an outdated offline inventory count baseline; when business fingerprints or event identifiers are duplicated, the source of anomalies is determined to be duplicate submissions; when multiple concurrent negative inventory increment events exceed the available inventory at the common baseline, the source of anomalies is determined to be concurrent material requisition exceeding limits; when the theoretical inventory and moving inventory count are consistent, but the perceived location quantity continuously deviates, the source of anomalies is determined to be a sensing device malfunction; when the scanned location is inconsistent with the location where the physical change has occurred, the source of anomalies is determined to be misplacement or cross-location operation.
[0063] The pending storage location records include material code, storage location, target time, theoretical inventory, storage location perceived quantity, moving inventory quantity, suggested calibration value, calibration confidence level, source of anomaly, related inventory events, and suggested review actions. After the review action is completed, the results of rescanning, reweighing, opening the container for verification, or confirming the document will be encapsulated as a new inventory event, triggering partial replay of the relevant conflict domain, without directly modifying the original inventory event.
[0064] S7 generates incremental synchronization data carrying confirmation water level based on inventory calibration value and acceptable event set, and sends it to the corresponding terminal so that the corresponding terminal performs idempotent update according to event identifier.
[0065] Specifically, a confirmed logical water level is maintained for each terminal. Incremental synchronization data includes a synchronization data identifier, applicable terminal, starting confirmation water level, ending confirmation water level, tombstone markers for new acceptance events, compensation events, duplicate events, or failed events, inventory snapshot summary, rule version, and overall summary check value. The tombstone marker is used to indicate that the corresponding event will no longer generate an inventory increment independently, but the original event record is not deleted.
[0066] Based on the terminal type and the inventory range it is responsible for, corresponding incremental synchronization data is generated. Smart vending machines receive inventory calibration events, compensation events, and operational restrictions related to their storage locations; mobile inventory terminals receive inventory changes, pending review tasks, and new confirmation levels within their inventory range; WeChat terminals receive event statuses related to material requisition, material return, approval, and anomaly feedback; and warehouse workstations receive acceptable events, inventory calibration values, and business document execution status.
[0067] After receiving incremental synchronization data, the terminal verifies the local acknowledgment level and the overall summary checksum, performs an idempotency check on the event identifier, and applies the new acceptance event, compensation event, and tombstone marker within the same transaction. Upon successful transaction application, the local acknowledgment level is updated, and the updated acknowledgment level is sent back to the server. When the terminal repeatedly receives the same incremental synchronization data, it identifies the already processed content based on the synchronization data identifier and event identifier, and avoids duplicate inventory changes.
[0068] When the terminal's local confirmation level cannot cover the initial confirmation level of the incremental synchronization data, the terminal requests recovery data including an inventory snapshot summary and missing events. The terminal updates its local inventory status and confirmation level based on the recovery data. When the terminal has offline inventory events that have not yet been uploaded, it does not directly use the server's inventory value to overwrite the local offline events. Instead, it first uploads the offline inventory events and their baseline levels, and the server re-determines the partial order relationship between the offline inventory events and the confirmed events before returning the corresponding incremental synchronization data to the terminal.
[0069] On the other hand, the present invention also provides a multi-terminal inventory conflict calibration device for intelligent warehousing. The device includes an event access module, a timing relationship determination module, a conflict identification module, a trusted weight determination module, an event playback module, a difference calibration module, and an incremental synchronization module.
[0070] The event access module receives inventory operation data generated by smart vending machines, smart warehouses, mobile inventory terminals, WeChat enterprise terminals, and warehouse workstations. It performs unified mapping of material identifiers, location identifiers, operation types, and units of measurement, encapsulates each inventory operation as an inventory event, and generates an event identifier, business fingerprint, and payload summary. The event access module also identifies duplicate transmission events and duplicate business events, and encapsulates data for which material codes or locations cannot be determined as pending events.
[0071] The timing relationship determination module maintains the logical timestamps corresponding to each terminal, merges the logical timestamps of received inventory events, establishes the partial order relationship of events corresponding to the same material and storage location, and determines the chronological, concurrent, or overriding relationships between inventory events. The timing relationship determination module writes the partial order relationship of events into the event record and provides the conflict identification module with the event relationships within the corresponding conflict domain.
[0072] The conflict identification module identifies offline inventory conflicts, duplicate submission conflicts, and concurrent material requisition conflicts based on event partial order relationships, event identifiers, business fingerprints, business reference relationships, and baseline levels. It also generates physical logic conflict markers based on the correspondence between inventory operation events and the container perception results. When the same inventory event meets multiple conflict conditions, the conflict identification module first processes duplicate inventory increments, and then determines whether the retained master inventory event constitutes a concurrent material requisition conflict.
[0073] The credibility weight determination module is used to establish event evidence packages corresponding to conflicting inventory events. It associates inventory events with barcode scanning records, container sensing results, inbound and outbound slips, maintenance work orders, and terminal credibility levels. It calculates the credibility weight of inventory events based on barcode consistency, physical sensing consistency, document consistency, maintenance interpretability, terminal credibility, and degree of evidence contradiction, and updates the terminal credibility based on subsequent review results.
[0074] The event replay module reads and confirms inventory snapshots, constructs a directed acyclic graph of events based on partial order and business reference relationships, and replays inventory events prior to the target time in topological order. Under constraints of non-negative inventory, storage capacity, batch validity, unique serial numbers, and quantity conservation at both ends of the transfer, it determines the acceptable set of events and reconstructs the theoretical inventory at the target time. For cases where concurrent material requisitions exceed available inventory, the event replay module determines the valid fulfillment quantity and generates fulfillment events and short-requisition exception events.
[0075] The discrepancy calibration module is used to align the location perception quantity and moving inventory quantity with the target time, verify the discrepancy between the theoretical inventory and the location perception quantity and moving inventory quantity at the target time, determine the inventory calibration value and calibration confidence under preset constraints, and determine the source of anomalies and the locations to be reviewed based on event relationships, inventory constraints and observation residuals.
[0076] The incremental synchronization module is used to generate incremental synchronization data carrying confirmation water level based on inventory calibration value and acceptable event set, send new acceptance events, compensation events, tombstone markers and inventory snapshot summaries to the corresponding terminals, receive updated confirmation water level feedback from the terminals, and generate recovery data when the terminal confirmation water level is discontinuous.
[0077] The inventory conflict calibration device can be located on a central warehouse server, a warehouse edge server, or a combination of both. The warehouse edge server receives terminal inventory operation data, maintains local logical timescales, and extracts container sensing results. The central warehouse server merges inventory events from different warehouse edge servers, performs conflict identification, event playback, difference calibration, and incremental synchronization. The device includes a processor, a memory, and a communication interface. The memory stores an event library, a snapshot library, an evidence index, terminal confirmation levels, and rule versions. When the processor executes the program in the memory, it implements the aforementioned inventory conflict calibration method.
[0078] In summary, the technical solution adopted in this invention takes unified inventory events as the processing object, and writes inventory operations from smart vending machines, smart warehouses, mobile inventory terminals, WeChat enterprise terminals, and warehouse workstations into an event chain carrying logical time stamps, baseline levels, and physical perception results. The causal sequence, concurrency, and coverage relationships of events are determined by vector logical clocks, and offline inventory, duplicate submissions, and concurrent material requisition conflicts are identified by combining event identifiers, business fingerprints, and inventory constraints. Then, barcode scanning, vending machine perception, business documents, maintenance work orders, and terminal trust levels are converted into event trust weights. Acceptable events are replayed starting from the confirmation snapshot to reconstruct the theoretical inventory at the target time, and constraint calibration is performed based on the location perception volume and mobile inventory volume. The calibration results are sent to each terminal through incremental synchronous data carrying confirmation levels, compensation events, and tombstone markers, thereby forming a traceable inventory conflict handling and state convergence process.
[0079] Compared with existing technologies, firstly, this invention utilizes vector logic clocks to represent the causal relationships between multi-terminal inventory events, enabling offline retransmission events, online events, and concurrent events to be distinguished according to their partial order, reducing inventory order judgment errors caused by terminal clock deviations, server receiving order, or late-arriving data overwriting. Secondly, this invention identifies duplicate inventory events through event identifiers and business fingerprints, and incorporates non-negative inventory, location capacity, and quantity conservation constraints during concurrent material requisition processing, ensuring that duplicate submissions do not generate duplicate inventory increments, and distinguishing between actual fulfilled and unfulfilled quantities when concurrent material requisition exceeds available inventory. Thirdly, this invention uses multi-source evidence formed by barcode scanning, container sensing, business documents, maintenance work orders, and terminal credibility for inventory event credibility evaluation, and replays acceptable events starting from the confirmed inventory snapshot, allowing inventory calibration values to correspond to specific inventory events, associated evidence, and replay processes, facilitating the identification of anomaly sources. Furthermore, this invention aligns theoretical inventory, location sensing quantity, and moving inventory quantity to the same target time, and determines inventory calibration values under inventory constraints, avoiding the direct use of single terminal records or single sensing results as inventory overwrite values. By controlling the processing scope of automatic calibration, manual review, and storage location freezing through calibration confidence level control, this invention ensures that inventory discrepancies with insufficient evidence retain a review path. Finally, by confirming water level, event identifiers, compensation events, and tombstone markers to generate incremental synchronization data, this invention enables each terminal to update its local inventory according to the same event range after repeated reception, out-of-order reception, or network outage recovery, reducing the possibility of calibration results being overwritten by old inventory data again. Attached Figure Description
[0080] Figure 1 This is a flowchart of the multi-terminal inventory conflict calibration method of the present invention.
[0081] Figure 2 This is a schematic diagram illustrating the inventory event encapsulation and idempotency identification of the present invention.
[0082] Figure 3 This is a schematic diagram illustrating the logical timescale merging and event relationship determination of the present invention.
[0083] Figure 4 This is a flowchart of the inventory conflict type identification process of the present invention.
[0084] Figure 5 This is a schematic diagram illustrating the multi-source evidence association and credibility weight calculation of the present invention.
[0085] Figure 6 This is a schematic diagram illustrating the event replay and concurrent material requisition constraint processing of the present invention.
[0086] Figure 7 This is a flowchart of the inventory difference calibration process at the target time of this invention.
[0087] Figure 8This is a block diagram of the multi-terminal inventory conflict calibration device of the present invention.
[0088] Figure 9 This is a schematic diagram illustrating the application scenario of intelligent warehousing multi-terminal inventory calibration according to the present invention. Detailed Implementation
[0089] To make the technical solution and effects of the present invention clearer, the present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments are used to illustrate the implementable path of the present invention and are not intended to limit the scope of protection of the present invention.
[0090] Unless otherwise stated, the technical and scientific terms used in this specification have the meanings commonly understood by those skilled in the art. As used in this specification, an inventory event is an immutable data record formed by inventory operations, physical observations, business confirmations, compensation processing, or calibration processing, and has an event identifier and logical timescale; the confirmation level refers to the range of inventory events that the terminal or inventory conflict calibration device has received and confirmed; and the target time refers to the logical processing boundary at which the inventory status needs to be reconstructed or calibrated.
[0091] The connections, receptions, transmissions, or associations referred to in this specification can be implemented through direct communication links, or indirectly through edge gateways, message middleware, service interfaces, or storage media. Each functional module can be implemented by a processor executing program instructions, or by dedicated circuitry capable of performing the corresponding data processing functions, or by multiple computing nodes working together.
[0092] In the absence of technical contradictions, the technical features in the following specific embodiments can be combined with each other. Specific quantities, thresholds, weighting coefficients, time ranges, hardware specifications, and storage scales are used to describe the implementation methods of the corresponding technical means, and can be configured according to material attributes, warehouse scale, terminal capabilities, and sensing accuracy.
[0093] Example 1
[0094] This embodiment provides a multi-terminal inventory conflict calibration method for intelligent warehousing. For example... Figure 1 As shown, the method consists of steps S1 to S7, which convert the inventory operations generated by smart vending machines, smart warehouses, mobile inventory terminals, enterprise WeChat terminals and warehouse workstations into inventory events with logical time stamps, and sequentially complete event relationship determination, inventory conflict identification, reliability evaluation, event playback, difference calibration and incremental synchronization.
[0095] The inventory conflict calibration device that performs the method described above can be configured with an event library, a snapshot library, an evidence index, a rule library, and a terminal synchronization state library. The event library stores inventory events and event relationships; the snapshot library stores confirmed inventory and corresponding confirmation levels; the evidence index stores references to barcode scanning, sensing, document, and maintenance records; the rule library stores event mappings, reliability evaluations, and calibration parameters; and the terminal synchronization state library stores the logical levels that have been confirmed by each terminal.
[0096] In step S1, the inventory conflict calibration device receives multi-terminal inventory operation data through message interfaces, business interfaces, or edge gateways. It performs unified mapping of material numbers, storage location numbers, personnel numbers, operation types, and units of measurement, and encapsulates each operation as an inventory event. An inventory event includes an event identifier, material code, storage location, quantity, terminal identifier, operator, physical sensing result, and logical timestamp. It may also include batch, business document reference, maintenance work order reference, baseline confirmation level, terminal local sequence, payload summary, business parent event, and generation status.
[0097] Inbound, return, and transfer operations are converted into positive inventory increments, while requisition, scrap, and transfer operations are converted into negative inventory increments. Inventory counts, weighing conversions, label quantities, and visual measurement quantities are encapsulated as inventory observations and do not directly cover the inventory event chain. For the same requisition operation, the application, approval, opening of storage, and requisition confirmation are determined based on the business reference and action stage, and the remaining events are stored as authorization evidence or execution evidence. Data whose material code or location cannot be determined forms an event awaiting attribution and does not participate in inventory increment calculations until attribution is completed.
[0098] In step S2, the inventory conflict calibration device uses a vector logic clock to determine the causal sequence and concurrency of inventory events, and uses a hybrid logic clock to form a stable display and playback order. When a terminal generates an inventory event, it increments its own vector component; when receiving other events or incremental synchronization data, it takes the maximum value of each component. For events e_a and e_b, if all components of V_a are not greater than V_b and there is a component that is strictly less than V_b, e_a is determined to be causally preceding e_b; if V_a and V_b are mutually exclusive, they are determined to be concurrent. Only when a subsequent event causally follows the preceding event and carries a reversal, compensation, or calibration reference is an overriding relationship established; the server's receiving order does not constitute an overriding relationship on its own.
[0099] Step S3: The inventory conflict calibration device establishes inventory conflict domains based on materials, locations, and batches. When the baseline confirmation level of an inventory count event lags behind, and there are inventory increment events not observed by the inventory terminal within the level difference range, an offline inventory count conflict flag is generated. When event identifiers are the same, or event identifiers are different but the business fingerprint, payload summary, and business parent event are consistent, a duplicate submission conflict flag is generated, and duplicate subordinate events no longer generate inventory increments. When the vector logical clocks of multiple negative inventory increment events are mutually exclusive, and the sum of the required quantities exceeds the available inventory at the common causal baseline, a concurrent material requisition conflict flag is generated. During conflict identification, duplicate inventory increments are eliminated first, and then it is determined whether the retained master inventory event constitutes a concurrent material requisition conflict.
[0100] Step S4: The inventory conflict calibration device correlates the scanned records of materials and storage locations, weight or label changes, inbound / outbound slips, maintenance work orders, and terminal historical verification results within the temporal and causal neighborhoods of inventory events. It then generates scan consistency S_e, physical perception consistency P_e, document consistency D_e, maintenance interpretability M_e, terminal credibility T_e, and evidence contradiction degree A_e, respectively. The event credibility weight is determined according to R_e = clip(λ_sS_e + λ_pP_e + λ_dD_e + λ_mM_e + λ_tT_e - λ_aA_e, 0, 1). Evidence not applicable to the current event is excluded from the valid evidence coefficients. When the same physical change is referenced by multiple mutually exclusive events and cannot be separated, it is marked as shared evidence, and the evidence contradiction degree is increased.
[0101] Step S5: The inventory conflict calibration device selects the most recently confirmed inventory snapshot no later than the target time. It then queries the events to be replayed after the snapshot confirmation level and constructs a directed acyclic graph of events based on logical partial order and business references. Events with causal relationships are replayed in topological order. Concurrent events that jointly satisfy inventory constraints are accepted together; events that cannot both satisfy the constraints are combined into feasible combinations based on their reliability weights. The theoretical inventory is represented as Q_th = Q_0 + Σx_iΔq_i + ΣΔq_h, satisfying the constraints of non-negative inventory, storage capacity, batch validity, unique serial number, and conservation at both ends of the transfer process.
[0102] When concurrent material requisition requests exceed available inventory, the effective fulfillment quantity y_i is determined based on the number of scans, changes in container perception, and the document approval limit, ensuring that 0 ≤ y_i ≤ r_i and the sum of all effective fulfillment quantities does not exceed available inventory. A fulfillment event is generated for the actual requisitioned portion, and a short-requisition anomaly event is generated for the difference between the requested quantity and the actual fulfilled quantity. Short-requisition anomaly events do not deduct inventory repeatedly. When candidate combinations lack sufficient evidence for differentiation, they are retained in a pending review status.
[0103] Step S6: The inventory conflict calibration device performs positive or negative compensation on the location perception quantity and moving inventory quantity based on the confirmed inventory events between the observation time and the target time, obtaining Q_s and Q_m at the target time. When the differences between Q_s, Q_m, and Q_th are all within the corresponding allowable error range, Q_th is determined as the inventory calibration value; when the difference exceeds the limit, the weighted robust loss corresponding to the theoretical inventory, location perception quantity, moving inventory quantity, and candidate inventory of business documents is minimized within the inventory constraint set Ω to determine Q_cal.
[0104] The inventory conflict calibration device determines the calibration confidence level based on the objective function difference between the optimal candidate and its adjacent candidates, the number of valid pieces of evidence, and the consistency of the evidence. A calibration event is generated when the automatic calibration threshold is reached; when the threshold is lower, a suggested value and a location to be reviewed are output; when the threshold is lower than the freeze threshold or there is unexplained physical movement, the automatic deduction of the corresponding location is restricted. The source of the anomaly is stored along with related events, evidence, the number of discrepancies, and suggested review actions.
[0105] In step S7, the inventory conflict calibration device generates incremental synchronization data based on the logical watermarks already confirmed by each terminal. The incremental synchronization data includes the initial confirmation watermark, the end confirmation watermark, new acceptance events, compensation events, calibration events, tombstone markers, inventory snapshot summaries, rule versions, and summary checksums. Terminals perform idempotency checks according to event identifiers, apply events and tombstone markers within the same transaction, and update the confirmation watermarks upon successful application. If a terminal has not uploaded offline events, it first uploads the offline events and their baseline confirmation watermarks, and the inventory conflict calibration device re-determines the event relationships before returning the corresponding incremental synchronization data.
[0106] like Figure 1 As shown, after step S6 is completed, it is determined whether the automatic calibration conditions are met based on the calibration confidence level. If met, step S7 is initiated and a calibration event and incremental synchronization data are issued. If not met, the source of the anomaly and the location to be reviewed are output first, and then the review task, restriction status, and corresponding incremental synchronization data are issued without directly rewriting the original inventory event. The corresponding terminal application uses incremental synchronization data and feeds back a new confirmation level. This confirmation level serves as the baseline for subsequent inventory event encapsulation, logical timescale merging, and partial playback, thus forming... Figure 1 The confirmation water level feedback path returns from step S7 to step S1.
[0107] Through the above steps, the target inventory level is not determined directly from the absolute value, but rather derived jointly from confirmed inventory snapshots and acceptable inventory events. Calibration results are expressed through new calibration events or confirmation records. Historical inventory events and evidence references remain traceable, and incremental data synchronization ensures that each terminal is updated to the corresponding confirmation level.
[0108] Example 2
[0109] This embodiment, based on Embodiment 1, describes the specific implementation methods of inventory event encapsulation, logical time stamp maintenance, event relationship determination, and inventory conflict identification. Figure 2 This illustrates the process by which inventory operation data enters a unified mapping process from multiple terminal operation sources, and is then encapsulated into inventory events for event identification and idempotent processing. Figure 3 It illustrates the process of logical time stamp merging and determining the order, concurrency, and coverage relationships of events; Figure 4 The process of identifying offline inventory conflicts, duplicate submission conflicts, concurrent material requisition conflicts, and physical-logical conflicts is shown.
[0110] like Figure 2 As shown, the inventory conflict calibration device establishes data interfaces with smart vending machines, smart warehouses, mobile inventory terminals, WeChat Work terminals, and warehouse workstations. Smart vending machines send door opening records, operator identities, weight changes, RFID tag set changes, visual counting results, and stable inventory levels after the door is closed; smart warehouses send inbound, outbound, transfer, picking, and location adjustment data; mobile inventory terminals send barcode scanning records, inventory quantities, inventory ranges, missed scan markers, and offline baseline levels; WeChat Work terminals send material requisition requests, material return requests, approval results, and receipt confirmations; and warehouse workstations send inbound / outbound slips, transfer slips, scrap slips, and manual verification results.
[0111] Because different terminals use different field names, identification systems, and units of measurement, the inventory conflict calibration device performs a unified mapping before encapsulating inventory events. This unified mapping includes identifier mapping, operation type mapping, action stage mapping, location normalization, and unit of measurement conversion. Identifier mapping maps material numbers, asset numbers, product numbers, and RFID tags from different business systems to unified material codes, and maps smart vending machine slot numbers, warehouse location numbers, and inventory area numbers to standardized location codes. Operation type mapping converts business actions generated by each terminal into standardized operation types such as inbound, outbound, material requisition, material return, transfer in, transfer out, inventory count, scrapping, cancellation, compensation, or calibration.
[0112] Action phase mapping is used to distinguish between application, authorization, physical execution, and inventory settlement within the same business process. Taking a material requisition business initiated through WeChat Work as an example, a material requisition application indicates that the operator has submitted a material request; the approval result indicates that the request has been authorized; the smart locker opening and weight change indicate that the material may have been retrieved; and the requisition confirmation or warehouse workstation outbound confirmation indicates that the material requisition business has entered the settlement phase. The rule base determines the settlement phase that generates inventory increments based on the warehouse business configuration, and establishes business reference relationships between other phases and settlement events and saves them as evidence. Therefore, multiple actions within the same material requisition business will not be separately identified as multiple independent material requisitions.
[0113] Unit conversion is used to convert terminal data such as boxes, packages, pieces, kilograms, and meters into the corresponding inventory management units for materials. For materials managed by number of pieces, the number of boxes or packages is converted to the number of pieces based on packaging conversion relationships; for bulk materials managed by weight, weight changes are converted into inventory increments under the minimum measurement accuracy; for materials with independent serial numbers, the corresponding quantity is determined by changes in the serial number set. The unit conversion result simultaneously saves the original quantity, original unit, conversion factor, and rule version, so that events can be replayed when packaging specifications or conversion rules change.
[0114] After unified mapping, inventory operation data is divided into inventory increment data and inventory observation data. Inbound, outbound, material requisition, material return, scrapping, and transfer operations are converted into positive or negative inventory increments. Inventory counts, weight conversions, RFID tag quantities, and visual measurement quantities are converted into inventory observations and are not directly used as increments covering the inventory book value. The absolute quantities recorded in inventory count data only become calibration events after logical time-stamp determination, target time alignment, and difference calibration are completed.
[0115] The basic fields in an inventory event include material code, location code, batch, quantity, operation type, terminal identifier, and operator. Causal fields include logical timescale, baseline confirmation level, terminal local sequence, and business reference. Evidence fields include physical sensing result, business document reference, maintenance work order reference, load summary, and event generation status. The event generation status is used to distinguish between online generation, offline generation, automatic equipment sensing, manual entry, and server-derived events.
[0116] For inventory operations with both material and location codes, the inventory conflict calibration device generates inventory events according to a unified event model. For data where the material or location code cannot be determined, a pending assignment event is generated. Pending assignment events can be caused by damaged barcodes, unresolved RFID tags, outdated location mapping tables, or temporary data entry by mobile inventory personnel. Pending assignment events save the original data and logical timestamps but do not participate in inventory increment calculations. After the materials and locations are subsequently determined, the inventory conflict calibration device generates an assignment confirmation event. The assignment confirmation event references the original pending assignment event and triggers local conflict identification for the corresponding materials and locations.
[0117] The inventory conflict calibration device generates a global event identifier (event_id) for inventory events. The global event identifier can consist of a warehouse domain identifier, a terminal identifier, a local terminal sequence, and a random identifier. Even when a terminal is offline, it can still generate a global event identifier based on its local monotonic sequence, independent of the central server. When a terminal reconnects to the network and retransmits data, it uses the global event identifier generated during the offline period and does not regenerate the event identifier based on the upload time.
[0118] In addition to the global event identifier, the inventory conflict calibration device also calculates the business fingerprint. The business fingerprint can be generated using the following formula:
[0119] F_e=Hash(C_(mat,e)∥C_(loc,e)∥O_e∥q_e∥B_e∥U_e∥G_e).
[0120] Wherein, F_e represents the business fingerprint of inventory event e; C_(mat,e) represents the material code; C_(loc,e) represents the location code; O_e represents the standardized operation type; q_e represents the standardized quantity; B_e represents the document number and document line number; U_e represents the operator; G_e represents the stage of the business action; the symbol "∥" represents field concatenation; and Hash represents the digest operation. The original fields and digest rule versions corresponding to the business fingerprint are stored in the inventory event.
[0121] like Figure 2 As shown, the inventory conflict calibration device performs idempotency judgment based on event identifiers and business fingerprints. When two messages carry the same global event identifier, they are identified as duplicate transmissions of the same inventory event. For messages with different event identifiers, the business fingerprint, payload digest, document unique key, terminal local sequence, and logical parent event are further compared. If the business fingerprint and payload digest are the same, the document unique key is the same, and they belong to the same commit chain, they are identified as business-level duplicates. The inventory conflict calibration device determines a primary inventory event from the duplicate messages. The primary inventory event generates one inventory increment, and the remaining messages are saved as duplicate subordinate records, and no further inventory increments are generated.
[0122] When business fingerprints are the same but the action stages are different, or when documents are the same but the document line numbers, batch numbers, and serial numbers are different, they are not directly judged as duplicates. For example, in the same material requisition business, the material requisition application, cabinet opening and retrieval, and retrieval confirmation have the same materials, storage locations, and quantities, but different action stages; these three are organized into an event chain with business reference relationships. As another example, if the same operator repeatedly retrieves the same quantity of the same material, but the two operations have different terminal local sequences, cabinet door operation ranges, and physical sensing records, both inventory events are retained.
[0123] This embodiment uses material M01 and storage location L01 in warehouse W01 as an example to illustrate the maintenance method of the logical time scale. The nodes involved in the logical time scale maintenance include the smart vending terminal C, the mobile inventory terminal P, the enterprise WeChat terminal E, the warehouse workstation S, and the inventory conflict calibration device G. The components in the vector logical clock are arranged in the order of C, P, E, S, and G. The vector confirmation level corresponding to a certain confirmation snapshot is:
[0124] V_0=(10, 6, 8, 12, 20).
[0125] The vector confirmation water level indicates that, at the time of snapshot generation, the system has already received the 10th logical event of the smart vending terminal C, the 6th logical event of the mobile inventory terminal P, the 8th logical event of the WeChat Work terminal E, the 12th logical event of the warehouse workstation S, and the 20th logical event of the inventory conflict calibration device G.
[0126] like Figure 3 As shown, each terminal capable of maintaining a logical clock, upon generating a new inventory event, first obtains its locally confirmed vector level and then increments its corresponding vector component. The mobile inventory terminal P enters offline mode and performs one inventory count after confirming the vector level V_0. Its local vector logical clock can be represented as:
[0127] V_p=(10,7,8,12,20).
[0128] After receiving the vector confirmation water level V_0, the Enterprise WeChat terminal E generates a material requisition request event, whose vector logic clock can be represented as:
[0129] V_e=(10, 6, 9, 12, 20).
[0130] Since the mobile inventory terminal component of V_p is greater than the corresponding component of V_e, and the enterprise WeChat terminal component of V_e is greater than the corresponding component of V_p, V_p and V_e are mutually exclusive. Therefore, the mobile inventory event and the material requisition application event are determined to be concurrent, rather than their order being determined by the physical time of the two events or the server's receiving order.
[0131] After receiving the material requisition authorization information from the WeChat terminal E, the smart vending terminal C first takes the maximum value of each component of the local vector and the vector of the material requisition request event, and then increments the component corresponding to smart vending terminal C. Therefore, the vector logical clock of the smart vending material requisition event can be represented as:
[0132] V_c=(11, 6, 9, 12, 20).
[0133] Since each component of V_e is less than or equal to the corresponding component of V_c, and the components of the smart vending terminal C exhibit a strict increase, the material requisition event precedes the smart vending machine material retrieval event. After the warehouse workstation S receives the smart vending machine material retrieval event and completes the outbound confirmation, it forms a vector logic clock:
[0134] V_s=(11, 6, 9, 13, 20).
[0135] Therefore, the smart vending machine material retrieval event precedes the warehouse workstation outbound confirmation event. The material requisition, smart vending machine material retrieval, and warehouse workstation outbound confirmation form a continuous business causal chain through a vector inclusion relationship.
[0136] The vector V_p of the mobile inventory count event and the vector V_c of the smart vending machine retrieval event are mutually exclusive, as are the vector V_p of the mobile inventory count event and the vector V_s of the warehouse workstation outbound confirmation event. Even if the mobile inventory count event eventually reaches the inventory conflict calibration device due to network recovery, it cannot be determined that the mobile inventory count event covers either the smart vending machine retrieval event or the warehouse workstation outbound confirmation event.
[0137] When the inventory conflict calibration device receives an inventory event from the terminal, it takes the maximum value for each component of the server's current vector, the terminal's event vector, and the baseline acknowledgment level carried by the terminal, and increments the server component. After the incremental synchronization data is sent to the terminal, the terminal also takes the maximum value for each component of the end acknowledgment level in the local vector and the incremental synchronization data. As a result, subsequent inventory events generated by the terminal can carry the server event status that it has observed.
[0138] For devices such as weighing sensors or simple RFID readers that lack logical clock maintenance capabilities, the logical clock is maintained by the corresponding smart vending machine controller or edge gateway. When encapsulating sensing events, the edge gateway retains the original sensor identifier, acquisition sequence, acquisition time, and device status, and generates a logical time stamp using the corresponding vector components of the edge gateway. Multiple sensors managed by the same edge gateway can establish an internal sequence relationship based on the sensor identifier and acquisition sequence.
[0139] Inventory events can also carry a hybrid logic clock H_e = (p_e, l_e). Here, p_e represents the constrained physical time component, and l_e represents the incrementing logic component when the physical time components are the same or when the terminal physical time rolls back. The hybrid logic clock is used for event list display, paging cursors, and stable playback order within the same topology layer. When the vector logic clock has determined that two inventory events occur concurrently, the hybrid logic clock cannot change the concurrency relationship to a causal order.
[0140] Inventory conflict calibration device according to Figure 3 The relationship determination process shown compares the vector logical clocks V_a and V_b of events e_a and e_b. When V_a ≤ V_b and there exists a vector component that is strictly less than V_a, event e_a is determined to be causally preceding event e_b; when V_a and V_b are mutually exclusive, events e_a and e_b are determined to be concurrent; when V_a = V_b and the event identifiers are different, the service fingerprint and payload digest are further examined to identify event replication, abnormal cloning, or different observation events generated by the same logical node.
[0141] Overriding relationships are determined based on causal sequence. If event e_b causally follows event e_a, and event e_b carries a reversal reference, compensation reference, or calibration reference pointing to event e_a, then event e_b forms a corresponding correction relationship with event e_a. The correction result is expressed through a newly added event e_b, while event e_a remains stored in the event database. Overriding relationships are not determined only if the server receives the data later or the terminal's physical time is later, and a causal inclusion relationship and a correction reference are lacking.
[0142] like Figure 4 As shown, the inventory conflict calibration device establishes inventory conflict domains based on the set of inventory events within the same material, the same storage location, the same batch, and adjacent business boundaries. For cross-location transfer events, conflict domains can be established at both the outgoing and incoming storage locations, and quantity conservation at both ends is maintained through the same transfer business identifier. Conflict identification sequentially performs offline inventory checks, duplicate submission checks, duplicate inventory increment elimination, concurrent material requisition checks, and physical-logical consistency checks.
[0143] During offline inventory checks, the inventory conflict calibration device compares the baseline confirmation level of an inventory event with the server confirmation level. If the baseline confirmation level of an inventory event lags behind, and there is an unobserved inventory increase between the two confirmation levels, the inventory event is marked as an offline inventory conflict. The inventory conflict calibration device also checks whether the unobserved event actually affects the inventory items and inventory locations, preventing events involving irrelevant items or other locations from causing incorrect conflict markings.
[0144] In the aforementioned example, the inventory of material M01 in the snapshot is confirmed to be 12 units, and the inventory count recorded by the offline mobile inventory terminal P is also 12 units. While the mobile inventory terminal is offline, the smart vending machine terminal performs the operation of retrieving 4 units of material, and the warehouse workstation generates an outbound confirmation event. After the mobile inventory terminal regains network connectivity, it uploads the inventory event, and its inventory count remains 12 units. Because the vector V_p of the inventory event does not include the newly added vector components of the material requisition request, smart vending machine retrieval, and outbound confirmation, the inventory conflict calibration device determines this inventory count as an observation result under the old baseline conditions and marks it as an offline inventory conflict, disallowing the inventory count of 12 units from directly overwriting the inventory state after material requisition.
[0145] During the duplicate submission check, the inventory conflict calibration device first compares the event identifier, then compares the business fingerprint and the business unique key. If the WeChat Work terminal resends the same message after receiving confirmation but fails to receive a timely response from the server, and the duplicate message uses the same event identifier, it is identified as a transmission-level duplicate. If the WeChat Work application regenerates the message and generates a new event identifier, but the message corresponds to the same material requisition form, the same line number, the same action stage, the same quantity, and the same operator, and the payload digest is consistent, it is identified as a business-level duplicate.
[0146] The inventory conflict calibration device retains the first retrieval confirmation event that passes integrity verification as the master event and records the remaining events as duplicate subordinate events. Duplicate subordinate events save the reception time, source terminal, and message digest for analyzing network retries or duplicate callbacks, but do not generate negative inventory increments again. After completing duplicate event processing, the inventory conflict calibration device continues to perform concurrent conflict judgment using the master event set after eliminating duplicate inventory increments.
[0147] During concurrent material requisition checks, the inventory conflict calibration device extracts negative inventory increment events that are mutually exclusive within the conflict domain's vector logic clocks and determines the common causal baseline for these events. Let the common causal baseline inventory be Q_b, and the sum of the determined inbound, return, or non-conflict material requisition increments after the baseline be ΔQ_c. The demand quantities for concurrent material requisition events are respectively... A concurrent material requisition conflict is determined to exist when the following formula is satisfied:
[0148] Σ_(i=1)^n r_i>Q_b+ΔQ_c.
[0149] For example, if the available inventory on the common causal baseline is 10 units, a first material requisition event occurs on the WeChat terminal with a demand of 7 units, and a second material requisition event occurs on another warehouse workstation with a demand of 6 units. Both material requisition events are based on an inventory of 10 units, and their vector logical clocks are independent. Since the total concurrent demand of 13 units exceeds the common baseline available inventory of 10 units, the inventory conflict calibration device adds the two material requisition events to the same concurrent material requisition conflict set. This stage only determines that the two events cannot simultaneously occur according to the original demand; the specific acceptance quantity is determined by subsequent credible evidence calculation and constraint replay.
[0150] Concurrency does not necessarily constitute an inventory conflict. Two concurrent events, acting on different materials, locations, or batches, can be replayed separately. Similarly, two concurrent material requisition events acting on the same inventory, but whose combined demand does not exceed a common baseline of available inventory, can be accepted simultaneously. Only when both logical concurrency and the constraint of the same inventory resource are met will the corresponding events be marked as concurrent material requisition conflicts.
[0151] After completing the concurrent conflict judgment, the inventory conflict calibration device checks whether the inventory operation and the changes perceived by the storage unit are consistent. For negative inventory increment events, it checks whether there is a decrease in weight, a reduction in RFID tags, or a decrease in visual count in the corresponding operation window; for positive inventory increment events, it checks whether there is a corresponding increase in weight, an increase in tags, or an increase in visual count. When a book inventory event exists but there is no corresponding physical change, it is marked as an item with a document but no movement; when there is a physical change but no corresponding inventory event, it is marked as an item without a document and movement; when the scanned storage location is inconsistent with the storage location where the weight change occurred, it is marked as a candidate for cross-location operation.
[0152] When physical changes are inconsistent with inventory operations, the inventory conflict calibration device retrieves maintenance work orders for the corresponding equipment and time range. If the maintenance work order records sensor disassembly / reassembly, weighing zeroing, temporary removal of goods, or RFID reader testing, and the maintenance time and scope of impact can explain the physical change, the inventory conflict calibration device generates a maintenance explanation flag, but does not directly identify the change as a genuine inbound / outbound transaction. If the maintenance work order cannot explain the perceived change, or if the maintenance work order corresponds to other equipment and time ranges, the corresponding event is marked as a physical logic conflict.
[0153] After inventory conflict identification is completed, a set of conflict events and conflict type tags are output. An inventory event can have multiple conflict type tags simultaneously. For example, a material requisition event retransmitted from an offline terminal may have duplicate copies due to network retries, and may also be concurrent with an online material requisition event, lacking corresponding physical sensing changes. The inventory conflict calibration device retains the processing order and correlation between offline inventory counts, duplicate submissions, concurrent material requisitions, and physical logical conflicts, enabling subsequent trusted weight calculations to select appropriate evidence for different conflict causes.
[0154] This embodiment preserves business information, causal context, and evidence references for inventory operations through unified event encapsulation. It determines the causal partial order and concurrency relationships between cross-terminal inventory events using vector logical clocks and combines business references to determine coverage relationships. During conflict identification, duplicate inventory increments are eliminated first, followed by a determination of whether concurrent demand exceeds the available inventory at the common baseline. This avoids incorrectly including duplicate quantities resulting from network retries in concurrent demand. Inventory count data and physical sensing data participate in subsequent calibration as inventory observations, preventing them from directly overwriting the inventory event chain due to their later arrival time.
[0155] Example 3
[0156] This embodiment, based on Embodiment 1 and Embodiment 2, describes the specific implementation methods of multi-source evidence association, inventory event credibility weight calculation, target time event replay, concurrent material requisition constraint processing, and inventory difference calibration. Figure 5It illustrates the correlation between conflicting inventory events and barcode scanning records, physical sensing results, inbound and outbound slips, maintenance work orders, and terminal historical status, as well as the process of forming consistent features from various types of evidence and calculating the event credibility weight. Figure 6 This illustrates the process of constructing a directed acyclic graph of events starting from a confirmed inventory snapshot, replaying inventory events according to the topology layer, and processing partial fulfillments. Figure 7 This demonstrates the process of determining the inventory calibration value after aligning theoretical inventory, location-aware quantity, moving inventory quantity, and candidate inventory from business documents at a target time.
[0157] like Figure 5 As shown, the inventory conflict calibration device establishes an evidence package for each inventory event in the conflict event set. The evidence package does not directly aggregate all data close to the event time; instead, it filters records that can prove the authenticity or quantity validity of the event based on materials, storage locations, operators, terminals, business documents, physical operation areas, and logical causal relationships. Each piece of evidence stores an evidence identifier, evidence type, source device, collection time, logical level, associated materials, associated storage locations, original record summary, scope of application, and integrity check value.
[0158] The barcode scanning record is associated with inventory events based on the scanned material code, storage location code, operator, scanning terminal location, and scanning order. For materials with unique serial numbers, the barcode scanning record also includes a set of serial numbers. If a material requisition event declares the requisition of 5 items, and the barcode scanning record contains 5 valid serial numbers matching the target materials, then the barcode scanning evidence supports the declared quantity; if the barcode scanning record only contains 3 valid serial numbers, then the barcode scanning evidence only supports 3 items, and the remaining 2 items cannot be considered as actually requisitioned based solely on the material requisition application.
[0159] The container perception results are correlated with inventory events based on the container door opening interval, operator identification interval, weighing stability interval, RFID tag set changes, and visual trajectory. For weighing containers, a first stable weight W_1 can be obtained before the door is opened, and a second stable weight W_2 can be obtained after the door is closed and vibration is eliminated. The weight change is ΔW = W_2 - W_1. For a single item with a nominal weight of w_u, the candidate quantity change can be expressed as:
[0160] ΔQ_w=round(ΔW / w_u).
[0161] When the weight of individual items varies significantly, or when a single operation involves different packaging specifications, the above conversion results are not used alone. Instead, the candidate quantity is determined by combining changes in the RFID tag set or visual counting results. The sensing record also includes zero-point drift, noise range, most recent calibration time, and equipment operating status, used to determine whether the sensing result can be used as valid evidence.
[0162] Inbound and outbound slips are associated with inventory events based on the document number, document line number, material code, batch, approved quantity, executed quantity, and current document status. Documents in draft, withdrawn, or unapproved status do not prove that the inventory operation has been authorized; documents in the approved status can prove the maximum allowed quantity, but cannot prove that the materials have been physically moved; documents in the executed status with workstation confirmation, smart locker sensing, or barcode scanning records can serve as both authorization evidence and business execution evidence.
[0163] Maintenance work orders are associated with inventory events based on equipment number, maintenance start time, maintenance end time, fault type, maintenance operation, and the range of affected sensors. For example, if a maintenance work order records the disassembly, zeroing, or weight calibration of a specific load cell, weight fluctuations occurring within the maintenance timeframe can be explained by the maintenance operation. In this case, the maintenance work order is used to reduce the evidentiary weight of the corresponding weight change for actual inbound / outbound operations, rather than directly increasing the credibility weight of all inventory events corresponding to that timeframe.
[0164] Terminal status and historical verification results are used to determine terminal trustworthiness. Terminal status includes firmware version, clock drift, network retry rate, sensor health, authentication status, and last calibration time. Historical verification results include the number of times the inventory events submitted by the corresponding terminal were subsequently confirmed as correct or incorrect through barcode scanning, physical sensing, document verification, or manual review. Terminal type only determines the initial trusted prior and the types of evidence that can be provided; it does not fix a particular terminal type as high or low trustworthiness.
[0165] Evidence association is defined by both event temporal neighborhood and event causal neighborhood. The event temporal neighborhood is used to find scanning and sensing records generated near the physical operation time, while the event causal neighborhood is used to find records within the same business chain as material requisition, approval, cabinet opening, material retrieval, and outbound confirmation. When there is a drift in the terminal's physical clock, evidence relationships are determined primarily based on logical water level, cabinet door status changes, and business references; physical time is only used to narrow down the candidate search range.
[0166] The same physical evidence cannot unconditionally support multiple mutually exclusive inventory events. For example, if only a weight decrease of 5 items is detected within a cabinet opening operation area, and two concurrent material requisition events both declare the requisition of 5 items, then this weight decrease cannot be considered complete evidence that both events have requisitioned 5 items. The inventory conflict calibration device determines evidence attribution based on operator identity, scanning order, document reference, and cabinet zoning; when it cannot distinguish between them, the perceived record is set as shared evidence, and the degree of evidence contradiction between the two events is increased.
[0167] After completing the evidence association, the inventory conflict calibration device converts evidence from different sources into consistency characteristics with values ranging from 0 to 1. For example... Figure 5 As shown, the barcode scanning consistency of inventory event e is denoted as S_e, physical perception consistency as P_e, document consistency as D_e, maintenance interpretability as M_e, terminal credibility as T_e, and the degree of evidence contradiction as A_e.
[0168] The barcode consistency S_e is determined based on the degree of matching between the scanned material, storage location, quantity, serial number, and scanning personnel and the inventory event. For materials managed by item and with unique serial numbers, quantity consistency can be determined by the ratio of the number of valid matching serial numbers to the quantity reported in the event, while also checking whether the same serial number has already been accepted by other inventory events. When the scanned material or storage location is inconsistent with the inventory event, the corresponding consistency is reduced.
[0169] Physical perception consistency P_e is determined based on the direction of perceived change, the number of candidate changes, the operation time range, and sensor health. When a material requisition event corresponds to a decrease in weight, a reduction in labels, or a decrease in the number of visual items, the direction of change is consistent. When a material return or warehousing event corresponds to an increase in weight, an increase in labels, or an increase in the number of visual items, the direction of change is consistent. Consistency decreases when the direction of perceived change is opposite, the number of perceived changes significantly exceeds the declared quantity, or there is no physical change within the operation window.
[0170] Document consistency (D_e) is determined based on the document's materials, location, batch, approved quantity, execution status, and event action stage. Document consistency is high when the number of events does not exceed the approved document quantity and the document is valid; document consistency decreases when the event lacks a document, the document has been revoked, the material batch is inconsistent, or the number of events exceeds the approved quantity. For inventory observations or equipment automatic sensing events that do not require business documents, the document evidence is marked as inapplicable, but inapplicable evidence is not directly treated as zero.
[0171] The maintenance explanatory power M_e represents the degree to which a maintenance work order explains the current evidence of anomalies. When a maintenance work order can fully cover the equipment, time, and operation type of the perceived anomaly, it can increase the explanatory power of "the perceived anomaly was caused by equipment maintenance" and reduce the effective weight of this perceived result in inventory quantity determination. When a maintenance work order is unrelated to the target equipment or target time, it is not used to explain the perceived anomaly. If an inventory event claims that normal automatic outbound processing was completed during equipment power outage maintenance, the maintenance work order can also serve as evidence to refute this execution method.
[0172] The degree of evidentiary contradiction, A_e, is determined based on whether there are conflicts in direction, quantity, materials, storage location, or personnel among different pieces of evidence concerning the same event. For example, a barcode scan record indicates that material M01 was retrieved from storage location L01, while the weight change occurred at storage location L02; the approved quantity on the outbound slip is 3 items, while the event report states 5 items; the RFID tag set decreases by 5 tags, but the visual count remains unchanged. The inventory conflict calibration device determines A_e based on the type of contradiction, evidentiary health, and interpretability, preventing multiple pieces of formally contradictory evidence from collectively inflating the credibility weight of an event.
[0173] The basic credibility weight R_e of inventory event e is calculated according to the following formula:
[0174] R_e=clip(λ_sS_e+λ_pP_e+λ_dD_e+λ_mM_e+λ_tT_e-λ_aA_e, 0, 1).
[0175] Where λ_s, λ_p, λ_d, λ_m, λ_t, and λ_a are non-negative weighting coefficients; clip(x, 0, 1) restricts the calculation result to the range of 0 to 1. The positive evidence coefficient is configured based on the material type, operation type, and terminal capabilities. For controlled materials with unique serial numbers, the coefficients corresponding to barcode consistency and tag set consistency are increased; for bulk materials managed by weight, the physical perception consistency coefficient after health correction is increased; for material requisition operations requiring approval, the coefficient for authorization judgment based on document consistency is increased, but the actual requisition quantity is still determined by physical evidence and playback constraints.
[0176] When a certain type of evidence is not applicable to the current inventory event, the inventory conflict calibration device does not set its characteristic value to zero, but excludes it from the coefficients of valid positive evidence in this instance, and renormalizes the remaining positive evidence coefficients. For example, automatic inventory count observations do not require associated outbound slips, and the lack of outbound slips does not reduce the credibility of the inventory count observation itself; however, when a material requisition settlement event should have associated documents according to warehousing rules, the lack of such documents constitutes a lack of evidence and reduces document consistency.
[0177] The historical reliability T_j of terminal j can be determined by the following formula:
[0178] T_j=(a_0+n_j^+) / (a_0+b_0+n_j^+n_j^-).
[0179] Where a_0 and b_0 are prior parameters, n_j^+ represents the valid count of inventory events submitted by terminal j and subsequently confirmed as correct, and n_j^- represents the valid count of inventory events subsequently confirmed as incorrect. To reduce the continued impact of earlier verification results on the current terminal state, time decay can be applied to historical counts. Let Δt_r be the time interval between the r-th verification result and the current evaluation time, and let γ be the decay coefficient, where 0<γ≤1. Then, the valid count coefficient of the corresponding verification result can be expressed as γ^(Δt_r). After the terminal completes recalibration, firmware update, or clock synchronization, the prior parameters and historical valid counts can be adjusted according to the rule version. For inventory event e generated by terminal j, T_e in the basic trust weight formula is taken as the T_j corresponding to the time the event was generated; this value is recorded together with the rule version of the event trust weight.
[0180] The trusted weight calculation results save the corresponding evidence citations, feature values, weight coefficients, and rule versions. After subsequent manual review or confirmation of the event's authenticity with added physical evidence, the inventory conflict calibration device updates the terminal's trustworthiness and sensor health, but does not modify the original evidence content in historical inventory events. When replaying the same historical target moment, one can choose to reproduce the original processing results using the original rule version, or generate new calibration suggestions using the new rule version, while retaining the version relationship between the two processing results. Figure 5 The feedback path in the code means that the subsequent review results are written back to the terminal status and historical review records, and then the terminal credibility used for subsequent events is updated according to the time decay method, without modifying the original fields of the already saved historical events.
[0181] For the same set of conflicts C, the normalized selection weight W_e can also be calculated based on the event-based confidence weights:
[0182] W_e=exp(κR_e) / Σ_(x∈C) exp(κR_x).
[0183] Here, κ represents the distinguishing strength parameter greater than 0, and R_x represents the basic confidence weight of inventory event x in the conflict set C. Normalized selection weights are used for candidate combination ranking and do not directly split the event quantity according to W_e. For example, if two material requisition events each declare the requisition of 5 items, the inventory cannot be automatically allocated to 3 and 2 items simply because their selection weights are 0.6 and 0.4 respectively. The actual fulfillment quantity needs to be determined jointly by the scanned quantity, the physically sensed quantity, the document limit, and the available inventory.
[0184] like Figure 6As shown, event playback begins with a confirmed inventory snapshot prior to the target time t*. The inventory conflict calibration device selects a confirmed inventory snapshot S_0 from the snapshot library that is no later than the target time t* and is the closest to the target time. The confirmed inventory snapshot S_0 includes the baseline inventory Q_0, the vector confirmation level V_0, the summary of accepted inventory events, the batch status, the sequence number set, the storage capacity, and the snapshot verification value.
[0185] The inventory conflict calibration device queries inventory events that are not dominated by the vector confirmation level V_0 and whose occurrence boundary is no later than the target time t*. For offline inventory events with uncertain physical time, their inclusion in the current replay range is determined based on their logical timescale, baseline confirmation level, business parent event, and perceived operation interval. Inventory events whose occurrence before the target time cannot be determined are retained as boundary events awaiting review and are not forcibly added or excluded without sufficient evidence.
[0186] The inventory conflict calibration device constructs a directed acyclic graph of events based on logical partial order relationships, undo references, compensating references, calibration references, and business version relationships. Causal precedence relationships form edges pointing from preceding inventory events to subsequent inventory events; compensating events and compensated events form reference edges; material requisition requests, cabinet opening executions, and outbound confirmations form business edges according to business stages. If imported data forms circular references, the relevant inventory events are marked as reference anomalies and their automatic replay is stopped to avoid unstable results when the preceding and following relationships cannot be determined.
[0187] After the directed acyclic graph of events is constructed, it is replayed according to the topology layer. Inventory events acting on different materials, different storage locations, or different batches in the same topology layer can be applied separately; concurrent events acting on the same inventory but which can jointly satisfy the non-negativity of inventory, capacity, and business constraints can be accepted together; inventory events acting on the same conflict domain and which cannot be simultaneously satisfied enter the candidate combination selection process.
[0188] For a conflict candidate event eᵢ, let the acceptance variable x_i, x_i∈{0,1}. x_i=1 indicates that the full inventory effect of accepting the inventory event eᵢ is accepted, and x_i=0 indicates that the inventory effect is not accepted. Let the inventory increment corresponding to the inventory event eᵢ be Δq_i, and the inventory increment that has been determined and does not belong to the conflict set be Δq_h. Then the theoretical inventory Q_th(t*) is expressed as:
[0189] Q_th(t*)=Q_0+Σ_ix_iΔq_i+Σ_hΔq_h.
[0190] The inventory conflict calibration device selects combinations from the candidate combinations that have a high sum of confidence weights and can explain physically perceived changes, and ensures that the selected combinations satisfy the inventory range constraint shown in the following formula:
[0191] 0≤Q_0+Σ_ix_iΔq_i+Σ_hΔq_h≤Cap(L,M).
[0192] Here, Cap(L, M) represents the effective capacity of storage location L for material M. Candidate combinations must also satisfy constraints such as document approval quantity, batch availability, material validity period, serial number uniqueness, and quantity conservation at both ends of the transfer. Even if a candidate combination has a high event confidence weight, it will not be considered a valid replay result if it results in negative inventory, reuse of the same serial number, or inconsistency in quantity at both ends of the transfer.
[0193] For concurrent material requisition requests exceeding available inventory, it is not required that each requisition event can only be fully accepted or fully rejected. Let the requested quantity of requisition event eᵢ be r_i, and the actual effective fulfillment quantity be y_i, then the following condition is met:
[0194] 0≤y_i≤r_i, and y_i belongs to the discrete quantity set corresponding to the smallest unit of inventory measurement.
[0195] The number of fulfillments within the same conflict domain also satisfies:
[0196] Σ_iy_i≤Q_available.
[0197] Where Q_available represents the sum of the common causal baseline inventory and the confirmed non-conflict increments after the baseline. The inventory conflict calibration device determines y_i based on the number of valid barcode scans, the number of RFID tag changes, the amount of stable weight change, the number of visual inspections, and the document approval limit. For materials managed by serial number, y_i can be directly determined based on the number of serial numbers supported by valid evidence and not yet accepted by other events.
[0198] For example, the common causal baseline available inventory for a certain storage location is 10 units. A first requisition event requests 7 units, and a second requisition event requests 6 units. The vector logic clocks for the two requisition events are independent. The first requisition event corresponds to 7 valid serial number barcode scan records, and there are 7 changes in the tag set indicating that the materials have left the storage location. The second requisition event has authorization for 6 units, but physical sensing and subsequent verification only support the actual retrieval of 3 units. The inventory conflict calibration device can determine the effective fulfillment quantity of the first requisition event as 7 units and the effective fulfillment quantity of the second requisition event as 3 units.
[0199] For the second material requisition event, the inventory conflict calibration device generates a fulfillment event for 3 items and a short requisition exception event for 3 items. The short requisition exception event indicates the difference between the requested quantity and the actual fulfilled quantity, and does not generate a second inventory deduction. Therefore, the theoretical inventory after replay is 0 items, and the business status of the second material requisition event not being fully fulfilled is retained. If 3 items are subsequently added and requisitioned again, a new supplementary requisition fulfillment event is generated, without modifying the original short requisition exception event.
[0200] If both candidate combinations satisfy inventory constraints and their confidence weights, physical interpretation levels, and document statuses are similar, the inventory conflict calibration device does not force a determination of one combination based on terminal identifiers or server receiving order. In this case, the candidate combination, its corresponding theoretical inventory range, and relevant evidence are retained, and a pending review status is output. After the reviewer re-scans the barcode, verifies the serial number, or checks the container operation records, the review result is encapsulated as a new inventory event, and partial replay is performed on the corresponding conflict domain.
[0201] After completing the topology layer playback, the inventory conflict calibration device merges acceptable inventory events, fulfilled events, and abnormal events that do not generate inventory increments to obtain the theoretical inventory Q_th at the target time and an event state summary. The event state summary records whether each event belongs to a state of full acceptance, partial fulfillment, duplicate subordination, compensated, insufficient evidence, constraint rejection, or pending review, and records the constraints and evidence references that led to this state.
[0202] like Figure 7 As shown, the inventory conflict calibration device uses the theoretical inventory Q_th, the original location sensing quantity, the original moving inventory quantity, and the candidate inventory Q_biz from the business document as inputs for inventory calibration at the target time. Since the observation times corresponding to each input may be different, forward or reverse compensation is first performed based on the confirmed inventory events before and after the target time.
[0203] Let the initial location sensing value be Q_(s,raw), and its observation time be t_s. When t_s is earlier than the target time t*, the location sensing value Q_s at the target time is determined according to the following formula:
[0204] Q_s=Q_(s,raw)+Σ_(e∈(t_s,t*]) Δq_e.
[0205] When t_s is later than the target time t*, the cargo position sensing quantity Q_s at the target time is determined according to the following formula:
[0206] Q_s=Q_(s,raw)-Σ_(e∈(t*, t_s]) Δq_e.
[0207] The above summation uses the inventory event increments that have been confirmed within the corresponding time range and match the target material, location, and batch. The moving inventory quantity Q_m is aligned to the target time in the same way. For inventory events that are logically concurrent with the observed events but whose occurrence before or after the observation cannot be determined, they are not directly included in the time compensation, but are retained as calibration uncertainties and the effective weight of the corresponding observation is reduced.
[0208] The candidate inventory Q_biz for business documents is calculated independently, starting from the most recent business confirmation snapshot, based on effective inbound, outbound, return, scrap, and transfer orders. Business documents that are not approved, have been withdrawn, or have not yet entered the inventory settlement stage do not generate inventory increments corresponding to Q_biz. Q_biz is used to determine whether there are systematic differences between the event chain, physical perception, and business documents, and does not replace the event replay process of theoretical inventory.
[0209] After achieving the target time alignment, the inventory conflict calibration device calculates the location perception difference and the moving inventory difference, respectively:
[0210] ;
[0211] .
[0212] The permissible discrepancy for location sensing is determined based on weighing noise, the dispersion of single-item weight, the missed reading rate of RFID readings, or the effective range of visual recognition; the permissible discrepancy for mobile inventory is determined based on the completeness of the inventory range, missed scan marks, and the status of the inventory terminal. and When all values are within the corresponding allowable difference range, the theoretical inventory is directly determined as the inventory calibration value, i.e., Q_cal = Q_th.
[0213] When the discrepancy in perceived location or the discrepancy in moving inventory exceeds the allowable range, calculate the inventory calibration value Q_cal within the candidate set Ω:
[0214] Q_cal=arg min_(q∈Ω){ω_tρ(q-Q_th)+ω_sρ(q-Q_s)+ω_mρ(q-Q_m)+ω_bρ(q-Q_biz)}.
[0215] Where Ω represents the set of candidate inventories that satisfy the constraints of non-negative inventory, storage capacity, batch validity, serial number uniqueness, and measurement accuracy; ω_t represents the weight of the event chain theoretical inventory; ω_s represents the weight of the storage location perceived quantity; ω_m represents the weight of the moving inventory quantity; ω_b represents the weight of the business document candidate inventory; and ρ represents the robust loss function.
[0216] The theoretical inventory weight ω_t is determined based on the credibility weight of accepted inventory events, the completeness of the event chain, and the number of events awaiting review. The location awareness weight ω_s is determined based on sensor health, sensing stability, and maintenance status. The mobile inventory weight ω_m is determined based on the completeness of the inventory coverage area, barcode scanning coverage, and the credibility of the inventory terminal. The business document weight ω_b is determined based on document completeness, approval status, and execution confirmation status. All weights can be normalized so that ω_t + ω_s + ω_m + ω_b = 1.
[0217] A robust loss function can be the Huber loss. Let the residual be z and the segmentation threshold be δ, then the Huber loss ρ_δ(z) is expressed as:
[0218] ρ_δ(z)=z² / 2, when |z|≤δ;
[0219] ρ_δ(z)=δ(|z|-δ / 2), when |z|>δ.
[0220] When the residuals are small, squared loss is used to distinguish multiple similar inventory candidates; when the residuals are large, linear growth is used to limit the impact of a single outlier observation on the inventory calibration value. For materials managed by piece, the candidate inventory q is rounded to an integer; for materials managed by weight, length, or volume, the candidate inventory q is discretized according to the corresponding minimum measurement accuracy.
[0221] For example, event replay reveals that the theoretical inventory Q_th at the target time is 20 units, the moving inventory quantity Q_m after time alignment is 20 units, the candidate inventory Q_biz in the business document is 20 units, and the location weighing perception quantity Q_s is 18 units. The inventory conflict calibration device detects a zero-point drift record in the weighing sensor, and the corresponding maintenance work order indicates that the sensor has not yet been recalibrated, thus reducing ωs. During robust calibration, a single weighing perception difference will not directly modify the book inventory to 18 units; the inventory calibration value is determined jointly based on the event chain, inventory quantity, business document, and valid perception evidence. Simultaneously, the weighing difference is retained as a candidate for container perception anomalies, and a sensor verification task is generated.
[0222] The inventory calibration device calculates the calibration confidence score after obtaining the optimal candidate value. Let the optimal candidate value be q_1, with an objective function value of J(q_1), and the second-best candidate value be q_2, with an objective function value of J(q_2). Then the candidate gap feature C_gap can be expressed as:
[0223] C_gap=clip([J(q_2)-J(q_1)] / [J(q_2)+ε], 0, 1).
[0224] Here, ε is a positive number set to avoid a denominator of zero. A larger candidate interval indicates that the optimal candidate value has more explicit evidentiary support compared to other candidate values. The inventory conflict calibration device also determines the sufficiency of evidence feature C_ev based on the number of valid evidence, the coverage of evidence from different sources, evidence consistency, and the number of pending conflicts. The calibration confidence level C_cal can be expressed as:
[0225] C_cal=clip(η_1C_gap+η_2C_ev+η_3C_con-η_4C_unc, 0, 1).
[0226] Where C_con represents the consistency between the event chain, location awareness, moving inventory, and business documents; C_unc represents the degree of uncertainty caused by boundary events, shared evidence, and pending conflicts; η_1, η_2, η_3, and η_4 represent the corresponding non-negative coefficients, and η_1 + η_2 + η_3 + η_4 > 0.
[0227] When the calibration confidence level reaches the automatic calibration threshold, the inventory conflict calibration device generates an automatic calibration event. The automatic calibration event includes the theoretical inventory before calibration, the inventory after calibration, the target time, the calibration quantity, associated conflict events, evidence citations, rule version, and calibration confidence level. The automatic calibration event is written to the event database as a new inventory event; previous inventory events are neither deleted nor modified in situ.
[0228] When the calibration confidence level is below the automatic calibration threshold but above the review processing threshold, a suggested inventory value, candidate range, and storage locations to be reviewed are output, without immediately changing the available inventory. When the calibration confidence level is below the freeze threshold, or when the conflict involves controlled materials, duplicate serial numbers, or unexplained physical movement, the automatic deduction for the corresponding storage location is restricted, and the reviewer is required to complete a rescan, physical count, sensor zeroing, or business document verification.
[0229] Regardless of whether the output is an automatic calibration event, a review task, or a location restriction status, the inventory conflict calibration device outputs the source of the anomaly and the associated inventory event. The source of the anomaly is determined based on the conflict type, evidence residuals, and constraint violations, including outdated offline inventory baselines, duplicate submissions, concurrent material requisitions exceeding limits, partial material requisition fulfillment, document quantity discrepancies, container sense drift, misplaced materials, and undocumented material movement. The retention of anomaly outputs allows calibration results to be traced back to the original inventory event and the reference relationships in the evidence records.
[0230] This embodiment transforms barcode scanning, physical sensing, business documents, maintenance work orders, and terminal historical status into interpretable and consistent features, enabling different pieces of evidence to participate in the credible evaluation of inventory events within a unified scope. Credibility weights are used only for candidate event selection and interpretation, and are not directly used to segment discrete inventory according to weight ratios. Event replay determines acceptable events and actual fulfillment quantities under constraints of non-negative inventory, storage location capacity, batch, serial number, and transfer conservation. Robust discrepancy calibration is then performed using storage location sensing quantities and moving inventory quantities aligned to the target time, resulting in a corresponding processing outcome between inventory calibration values, anomaly sources, and storage locations awaiting review.
[0231] Example 4
[0232] This embodiment provides a multi-terminal inventory conflict calibration device for intelligent warehousing. For example... Figure 8 As shown, the device includes an event access module m1, a timing relationship determination module m2, a conflict identification module m3, a trusted weight determination module m4, an event playback module m5, a difference calibration module m6, and an incremental synchronization module m7. The functions of each module will be explained first, followed by the specific implementation methods of each module.
[0233] The event access module m1 is used to receive inventory operation data generated by smart vending machines, smart warehouses, mobile inventory terminals, enterprise WeChat terminals, and warehouse workstations. It performs unified mapping of data from different terminals and encapsulates each operation into an inventory event that includes material code, location, quantity, terminal identifier, operator, physical sensing result, and logical time stamp.
[0234] The timing relationship determination module m2 is used to maintain the logical clock corresponding to each terminal, merge the logical time stamp and baseline confirmation level carried by the inventory events, determine the causal order and concurrency relationship between events based on the vector logical clock, and determine the coverage relationship in combination with the cancellation, compensation or calibration reference.
[0235] The conflict identification module m3 is used to establish conflict domains according to materials, locations and batches. It identifies offline inventory conflicts, duplicate submission conflicts and concurrent material requisition conflicts based on event partial order relationships, event identifiers, business fingerprints and baseline confirmation levels. It also generates physical and logical conflict markers based on the consistency between inventory operations and location perception changes.
[0236] The trusted weight determination module m4 is used to associate barcode scanning records, container sensing results, inbound and outbound orders, maintenance work orders, and terminal historical verification results. It converts the associated evidence into consistent features and calculates the trusted weight of inventory events, as well as updating the terminal's trustworthiness and sensor health status based on subsequent verification results.
[0237] The event replay module m5 is used to start from the confirmed inventory snapshot no later than the target time, construct an event directed acyclic graph based on logical partial order and business references, replay inventory events according to the topology layer, and determine the acceptable events and actual fulfillment quantities under the constraints of non-negative inventory, storage capacity, batch, serial number and transfer conservation, so as to obtain the theoretical inventory at the target time.
[0238] The difference calibration module m6 is used to align the location perception quantity and moving inventory quantity with the target time, verify the difference between them and the theoretical inventory, determine the inventory calibration value and calibration confidence level within the candidate inventory set, and output the automatic calibration event, suggested calibration value, source of anomaly, location to be reviewed or location operation restriction status.
[0239] The incremental synchronization module m7 is used to maintain and confirm the water level for each terminal. It generates incremental synchronization data based on the inventory calibration value and the set of acceptable events, sends new acceptance events, compensation events, calibration events, tombstone markers and inventory snapshot summaries to the corresponding terminals, and updates the confirmation water level based on terminal feedback.
[0240] In its implementation, the event access module m1 includes a terminal interface unit, a field standardization unit, an event encapsulation unit, and an idempotent preprocessing unit. The terminal interface unit receives terminal data through a message interface, a business interface, or an edge gateway. The field standardization unit stores the mapping rules for material codes, location aliases, operation types, action stages, and units of measurement. The event encapsulation unit generates an event identifier and writes it into a logical timestamp, business reference, and payload summary. The idempotent preprocessing unit determines the primary event and duplicate dependent records based on the event identifier and business fingerprint, and saves data with unknown codes or locations as events to be assigned.
[0241] The timing relationship determination module m2 includes a logical clock maintenance unit, a logical water level merging unit, an event relationship comparison unit, and a relationship indexing unit. When a terminal generates an event, it increments its own vector component; when receiving other events or synchronization data, it takes the maximum value for each component. Low-capacity sensors have their logical time stamps maintained by the smart vending machine controller or edge gateway. The event relationship comparison unit determines causal order and concurrency relationships based on vector inclusion relationships. The relationship indexing unit writes partial order, coverage, and business parent-child relationships into the event database for querying by the conflict identification module m3 and the event playback module m5.
[0242] The conflict identification module m3 includes a conflict domain construction unit, an offline inventory identification unit, a duplicate submission identification unit, a concurrent material requisition identification unit, and a physical-logical conflict identification unit. The conflict domain construction unit extracts events that jointly affect the same inventory status. The offline inventory identification unit compares the inventory baseline level with the server-confirmed level. The duplicate submission identification unit eliminates duplicate inventory increments based on event identifiers, business fingerprints, document unique keys, and payload summaries. The concurrent material requisition identification unit determines whether negative demand exceeds the common baseline available inventory. The physical-logical conflict identification unit compares event increments with weight, label, or visual changes, and uses maintenance work orders to determine whether perceived anomalies can be explained by maintenance operations.
[0243] The trust weight determination module m4 includes an evidence retrieval unit, an evidence association unit, a feature conversion unit, a trust calculation unit, and a trust status update unit. The evidence retrieval unit reads scan, sensing, document, maintenance, and historical review records from the evidence index. The evidence association unit establishes event evidence packages based on materials, storage locations, operators, business references, cabinet door operation areas, and logical relationships. The feature conversion unit generates scan consistency, physical sensing consistency, document consistency, maintenance interpretability, terminal trustworthiness, and evidence contradiction degree. The trust calculation unit stores trust weights, evidence references, and rule versions. The trust status update unit updates the terminal trustworthiness based on the review results.
[0244] The event replay module m5 includes a snapshot selection unit, an event query unit, an event graph construction unit, a topology replay unit, and a constraint solving unit. The snapshot selection unit reads Q_0, V_0, event summary, batch status, and sequence number status from the snapshot library. The event query unit extracts events from the event library that are after V_0 and within the target processing boundary. The event graph construction unit constructs a directed acyclic graph based on the temporal relationships determined by the output of module m2. The topology replay unit accepts events that can be jointly fulfilled, and the constraint solving unit sets acceptance variables or effective fulfillment quantities for conflicting events, outputting theoretical inventory and an event status summary.
[0245] The difference calibration module m6 includes an observation alignment unit, a difference calculation unit, a robust calibration unit, a confidence calculation unit, and an anomaly output unit. The observation alignment unit compensates for the original location perception and moving inventory volume based on confirmation events before and after the target time. The robust calibration unit minimizes the weighted robust loss within the candidate set that satisfies inventory constraints. The confidence calculation unit determines the calibration confidence based on the difference in candidate objective functions, the number of valid evidences, evidence consistency, and pending conflicts. The anomaly output unit sends the anomaly type, related events, number of differences, evidence citations, and review actions to the incremental synchronization module m7.
[0246] The incremental synchronization module m7 includes a terminal level management unit, a synchronization data generation unit, a sending unit, and an acknowledgment processing unit. The synchronization data generation unit extracts new events, compensation events, calibration events, and tombstone markers based on the terminal's acknowledgment level, and writes the start and end acknowledgment levels, snapshot summary, rule version, and summary checksum. The terminal performs idempotency checks and applies the synchronization data in a transactional manner; upon successful application, it sends back the end acknowledgment level. When the acknowledgment level is discontinuous, the sending unit provides missing events or snapshot recovery data.
[0247] Figure 8 The event library is used to store immutable inventory events and event relationships, the snapshot library is used to store confirmed inventory sections, and the evidence index and confirmation level storage is used to store evidence references and the synchronization status of each terminal. The event access module m1 and the timing relationship determination module m2 write events and relationships to the event library, the trust weight determination module m4 reads the evidence index, the event playback module m5 reads the event library and the snapshot library, the difference calibration module m6 forms a new calibration record, and the incremental synchronization module m7 sends the processing results to the terminal incremental receiving and level feedback interface. Figure 8 The event library, snapshot library, and evidence index shown inside the inventory conflict calibration device, along with the storage with the same name in the state storage layer, represent logical access components and corresponding persistent carriers, respectively. They are associated through read-write interfaces and are not two independent sets of inventory states.
[0248] The aforementioned modules can be implemented by a processor executing program instructions within the same server, or they can be deployed across edge servers and a central server. Edge servers can perform terminal access, sensory evidence extraction, and local logical time stamp maintenance, while the central server performs cross-terminal conflict identification, event playback, difference calibration, and incremental synchronization. When the central network is interrupted, the edge servers save the original event identifiers, logical time stamps, and baseline confirmation levels. After the network is restored, the events are retransmitted, and local playback of the corresponding conflict domain is triggered.
[0249] The device also includes a processor, a memory, a communication interface, and a terminal interface. The memory stores program instructions that implement the functions of modules m1 to m7, as well as an event library, a snapshot library, an evidence index, a terminal confirmation level, and rule versions. The processor executes the program instructions to implement the functions of the aforementioned modules. The module division is used to illustrate functionalities and data collaboration relationships; it does not require each module to be implemented by a separate physical device.
[0250] Example 5
[0251] This embodiment, using the scenario of maintenance spare parts management in intelligent warehousing, describes the technical requirements, hardware configuration, parameter settings, execution process, and processing results of the multi-terminal inventory conflict calibration method and device. Figure 9As shown, the application scenarios include intelligent warehousing sites, business and control terminals, and an inventory conflict calibration platform. The intelligent warehousing site includes target storage locations (L), intelligent container controllers, weighing and RFID tag sensing devices, operators, and mobile inventory terminals; the business and control terminals include intelligent warehouse control terminals, WeChat enterprise terminals, warehouse workstations, inbound / outbound order systems, and maintenance work order systems; the inventory conflict calibration platform includes edge access devices, inventory conflict calibration devices, an event library, a snapshot library, terminal confirmation level storage, and a verification task output interface.
[0252] In this embodiment, target material A is a maintenance spare part managed on a piece-by-piece basis and attached with an RFID tag, stored in target storage location L. Material A can be identified piece by piece via RFID tags, and the quantity can be verified based on the total weight of the storage location. Target storage location L is controlled by an intelligent storage cabinet controller to open and close the cabinet door. After identification, operators can retrieve or return materials. The enterprise WeChat terminal is used to submit material requisition applications and approvals, the warehouse workstation is used to process outbound confirmation, return confirmation, and anomaly verification, and the mobile inventory terminal is used for barcode scanning and supports offline operations.
[0253] The application scenario requires that inventory operations generated by each terminal be associated with a unified material code and standardized storage location code. The material number in the WeChat enterprise terminal, the product number in the smart warehouse control terminal, the RFID tag in the smart vending machine, and the material code in the warehouse workstation are mapped to material A through a material mapping table. The smart vending machine compartment number, the smart warehouse storage location number, and the mobile inventory area number are mapped to the target storage location L through a storage location mapping table.
[0254] Inventory operation data sent by each terminal must carry terminal and operator identifiers. When a terminal can maintain its own logical clock, it increments its own vector component when an inventory operation occurs. If a simple sensor cannot independently maintain its logical clock, the smart vending machine controller or edge access device will act as the proxy for maintaining the logical clock. When a mobile inventory terminal is offline, it must save the original baseline confirmation level, the terminal's local sequence, and offline operation data. After communication is restored, the logical information at the time of the inventory operation must not be replaced by a re-uploaded time.
[0255] The intelligent vending machine's sensing equipment needs to obtain stable sensing results before the door is opened, during operation, and after the door is closed. Weighing results store the total weight, tare weight, stable range, and equipment health status; RFID reading results store the tag set before and after the operation; door sensing results store the person opening the door, opening time, and closing time. Weighing, tag, and door data are encapsulated as physical observation events and associated with material requisition or return events through the same door operation range.
[0256] The inventory conflict calibration platform needs to save immutable inventory events, inventory snapshots, and terminal confirmation levels. After an inventory event is written, it does not express reversal, short-claim, or calibration through in-situ modification; instead, it generates a compensation event, short-claim anomaly event, or calibration event that references the original inventory event. In addition to saving inventory quantities, inventory snapshots also save vector confirmation levels, accepted event summaries, batch status, sequence number sets, and snapshot verification values.
[0257] The intelligent vending machine controller in this embodiment can be an industrial controller equipped with a multi-core processor, memory, Ethernet interface, serial interface, and general-purpose input / output interface. The industrial controller connects to the weighing acquisition module via a serial interface or fieldbus, to the RF reader via a network interface or general-purpose serial interface, and acquires the vending machine door status and controls the electronic lock via the general-purpose input / output interface. The industrial controller sets up a local event queue so that it can still save vending machine opening, material retrieval, vending machine closing, and physical sensing events even when the central network is interrupted.
[0258] The weighing range of the weighing acquisition module is determined based on the maximum allowable load of the target storage location, and its resolution should be able to distinguish the smallest inventory management unit corresponding to material A. When the weight of a single item of material A is w_u, the weighing resolution should be less than the change in weight of a single item, and the quantity conversion error range should be set according to the dispersion of the weight of a single item. The effective reading range of the RFID reader is limited to the target storage location L or the corresponding container partition, reducing the number of tags from adjacent storage locations entering the current tag set. After the cabinet door is closed, the weighing acquisition module waits for the weight change to enter a stable range before generating the sensing result after the door is closed.
[0259] Mobile inventory terminals can be industrial mobile terminals with barcode scanning, RFID, wireless communication, and local storage capabilities. In offline mode, the mobile inventory terminal generates a local monotonic sequence and a global event identifier for each inventory count, and saves the inventory range, the set of scanned materials, the inventory quantity, and the offline baseline confirmation level. After communication is restored, the mobile inventory terminal retransmits the inventory events according to the local sequence.
[0260] Edge access devices can be edge computing equipment with multi-core processors, RAM, local non-volatile storage, and dual network interfaces. They deploy terminal interface adaptation, event encapsulation, logical timestamp maintenance, and local event caching functions. The edge access device connects to the smart vending machine controller via a local area network and to the central inventory conflict calibration device via an authenticated message connection. When the central network is interrupted, the edge access device continues to receive on-site inventory operations and saves the original logical timestamp; after the central network is restored, it retransmits inventory events according to the event identifiers.
[0261] The central inventory conflict calibration device can utilize servers with multi-core processors, RAM, and persistent storage. The event database can use a database supporting transactional writes and multi-field indexes, with query indexes built according to event identifier, material, location, batch, and logical level. The snapshot database stores confirmed inventory snapshots for each location, and the evidence index stores the location and summary of original sensing records, barcode records, business documents, and maintenance work orders. For large warehouses, the event database can be partitioned by warehouse or storage area, and the logical clock can maintain a sparse vector according to storage area and material range.
[0262] The above hardware configuration illustrates a feasible deployment method. The number of processor cores, storage capacity, interface type, and sensor specifications can be adjusted according to the number of storage locations, event frequency, and material measurement method, as long as event encapsulation, logical time stamp maintenance, evidence association, event playback, difference calibration, and incremental synchronization processing can be completed.
[0263] In this embodiment, material A is managed in units of one piece, and the capacity of the target storage location L is set to 30 pieces. The nominal weight of a single piece of material A is set to 1.25 kg, the allowable weight fluctuation range is set to 0.03 kg, and the resolution of the weighing acquisition module is set to 0.01 kg. When the weight change within a stable range for two consecutive seconds after the cabinet door is closed, the corresponding average weight is taken as the stable weight after the door is closed. When the change in the RFID tag set and the weighing conversion result are inconsistent, both types of sensing evidence are retained and the degree of evidence contradiction is increased, and the inventory is not directly modified based on a single sensing result.
[0264] Inventory event identifiers consist of warehouse domain identifiers, terminal identifiers, local monotonic sequences, and random identifiers. Business fingerprints are generated from material codes, storage locations, operation types, normalized quantities, document numbers, document line numbers, operators, and action stages. For identical event identifiers generated by network retries, idempotent identification is performed regardless of time range. For WeChat callbacks with different event identifiers but the same business fingerprint, they are identified as business-level duplicates if the corresponding business documents are still in the same execution stage. Events from different action stages or with different document line numbers are not automatically merged.
[0265] Confirmed inventory snapshots can be generated based on the number of events or the time interval. In this embodiment, a new snapshot is generated when 500 confirmed inventory events accumulate in the same storage location or when 30 minutes have passed since the last snapshot. A new snapshot can also be generated immediately when manual review, batch switching, or inventory calibration occurs in the storage location. The snapshot generation cycle only affects the playback starting point and the number of queries; it does not change the logical relationship between inventory events.
[0266] In the calculation of event credibility weights, the positive evidence coefficients can be set as λ_s = 0.25, λ_p = 0.30, λ_d = 0.20, λ_m = 0.05, and λ_t = 0.20, while the evidence contradiction penalty coefficient can be set as λ_a = 0.30. The sum of the above positive evidence coefficients is 1. Since material A has an RFID tag and can be weighed repeatedly, physical perception consistency and barcode consistency have high distinguishing ability in this scenario. Maintenance work orders only participate in credibility evaluation when the work order equipment, time range, and influencing sensors match the current perceived anomaly.
[0267] The prior parameters for terminal credibility can be set to a_0 = 5 and b_0 = 5, giving terminals lacking historical verification results intermediate prior credibility. Subsequent verifications confirming correctness increase the valid correct count, and verifications confirming errors increase the valid error count. Historical counts can be multiplied by a decay coefficient of 0.98 according to the evaluation period, gradually reducing the impact of earlier verification results on the current terminal credibility.
[0268] When using Huber loss for inventory discrepancy calibration, the segment threshold δ can be set to 1 item. Automatic calibration events are allowed when the calibration confidence reaches 0.80; suggested calibration values and locations awaiting review are output when the calibration confidence is below 0.80 but not below 0.55; automatic deductions to the target location are restricted when the calibration confidence is below 0.35, or when duplicate serial numbers or unexplained physical movement are detected. For materials requiring enhanced control, the automatic calibration threshold can be increased. All the above parameters are saved together with the rule version.
[0269] The following describes the execution method of this embodiment using a multi-terminal concurrent operation process as an example.
[0270] The confirmed inventory snapshot of the target storage location L records the inventory quantity Q_0 of material A as 20 units, and saves the vector confirmation level V_0. After receiving V_0, the mobile inventory terminal P enters offline mode and performs an inventory count on the target storage location L, obtaining an inventory quantity Q_p of 20 units. The mobile inventory terminal P generates an inventory count event E_p, which carries the baseline confirmation level V_0, the mobile inventory terminal's local sequence, and the set of inventory materials. Since the mobile inventory terminal is offline, the inventory count event E_p is temporarily stored locally.
[0271] Worker A submitted an application to receive 12 items of material A via WeChat Work. After approval, a material requisition authorization event was generated on the WeChat Work terminal. After operator A completes identity verification and barcode scanning at the smart vending machine, the smart vending machine controller opens the door corresponding to the target storage location L. After the door closes, the RFID tag set decreases by 12 tags, corresponding to a reduction of 12 items in the weighing result. The smart vending machine controller then generates a physical execution event. The warehouse workstation generates a receipt confirmation event based on material requisition authorization, barcode scanning records, and smart locker sensing results. and A material requisition event chain is formed by referencing business logic.
[0272] After sending a confirmation message, the WeChat Work terminal did not receive a timely response from the server and subsequently sent the confirmation data twice. One duplicate message used the original event identifier, while the other duplicate message generated a new event identifier but corresponded to the same document number, document line number, quantity, operator, and action stage. The event access module identified the first duplicate message as a transport-level duplicate based on the event identifier, and the second duplicate message as a business-level duplicate based on the business fingerprint, payload digest, and document unique key. Both duplicate records belonged to the main confirmation message event. Only the main event generates a negative inventory effect of 12 units once.
[0273] Before worker A's material requisition process was synchronized to another warehouse workstation, worker B submitted a request to requisition 10 items of material A through that warehouse workstation, thus creating a material requisition event. . and Based on the same confirmed inventory snapshot, and because the vector logical clocks of the two events are mutually exclusive, they are identified as concurrent events. The total demand of the two material requisition requests is 22 units, exceeding the available inventory of 20 units on the common causal baseline. The conflict identification module adds the corresponding material requisition event to the concurrent material requisition conflict set.
[0274] Worker A has already retrieved 12 items of material A through the smart locker. After worker B opens the target storage location L, the smart locker controller, based on the latest storage location detection results, only allows the retrieval of the remaining 8 items. Worker B completes scanning the 8 items, reducing the RFID tag set by 8 tags, and the weight change also supports a reduction of 8 items. The smart locker controller generates a physical execution event for 8 items. The warehouse workstation generated an execution confirmation event for the actual number of items received: 8. .
[0275] The Trusted Weight Determination Module establishes evidence packages for the material requisition events corresponding to Operator A and Operator B. Operator A's event chain includes 12 barcode scanning records, 12 RFID tag reduction records, corresponding weight decrease, a valid material requisition form, and a valid terminal status. Operator B's material requisition request has an approved quantity of 10 items, but the barcode scanning, RFID tag, and weighing results only support the actual requisition of 8 items. The Trusted Weight Determination Module does not directly recognize Operator B's 10 approved items as the actual requisition quantity. Instead, it interprets the document evidence as the upper limit of the allowed requisition quantity and interprets the physical sensing and barcode scanning evidence as the basis for the actual fulfillment of the quantity.
[0276] The event replay module starts with a confirmed inventory snapshot of 20 units, queries inventory events after V_0, and constructs a directed acyclic graph of events. The receipt confirmation event for operator A is counted only once; two duplicate subordinate events do not generate inventory increments. The effective fulfillment quantity for operator A is determined to be 12 units, and the effective fulfillment quantity for operator B is determined to be 8 units. The 2 unfulfilled units by operator B generate a short-receipt exception event, but do not result in inventory deduction.
[0277] The theoretical inventory Q_th at the target time is determined by the following formula:
[0278] Q_th = 20 - 12 - 8 = 0.
[0279] After the smart locker is closed, the RFID tag set no longer contains the tag corresponding to material A, and the weight conversion result is also 0 pieces. Therefore, the target time location sensing quantity Q_s is 0 pieces. The warehouse workstation records the execution quantity of operator A as 12 pieces and the execution quantity of operator B as 8 pieces. The candidate inventory Q_biz for the business document is 0 pieces.
[0280] The mobile inventory terminal P subsequently resumed communication and uploaded an inventory event E_p with a count of 20 items. Although inventory event E_p arrived last on the server, its baseline confirmation level was V_0, and its vector logic clock did not include the material requisition events corresponding to operators A and B. The inventory conflict calibration device identified E_p as an offline inventory conflict, treating the count of 20 items as the inventory observation under the old baseline condition, and did not allow it to directly cover the theoretical inventory at the target time.
[0281] The inventory conflict calibration device sends a verification task to the mobile inventory terminal P. After receiving the latest confirmed level, the verifier rescans the target location L and obtains a mobile verification inventory quantity Q_m of 0 units. After completing the target time alignment, the theoretical inventory Q_th, location-aware quantity Q_s, mobile verification inventory quantity Q_m, and business document candidate inventory Q_biz are all 0 units. Therefore, the inventory calibration value Q_cal is set to 0 units.
[0282] Since the inventory calibration value matches the theoretical inventory, this process does not require generating a compensation event to change the inventory quantity. The inventory conflict calibration device generates a calibration confirmation record, recording the target time, inventory calibration value, offline inventory conflict, duplicate submission conflict, concurrent material requisition conflict, operator B's short requisition anomaly, and corresponding evidence citations. The original inventory quantity of 20 items from the mobile inventory terminal is still stored in the event database and remains associated with the old baseline confirmation level V_0.
[0283] The inventory conflict calibration device generates incremental synchronization data for the smart vending machine controller, mobile inventory terminal, WeChat Work terminal, and warehouse workstation. The smart vending machine controller receives the inventory calibration value of 0 units and the out-of-stock status of the target location; the mobile inventory terminal receives offline inventory anomalies, verification results, and new confirmation levels; the WeChat Work terminal receives the business status of operator A completing material requisition and operator B actually requisitioning 8 units and requisitioning 2 units short; the warehouse workstation receives material requisition fulfillment events, short requisition anomaly events, and calibration confirmation records.
[0284] If the same incremental synchronization packet is resent due to network retries, the terminal identifies the already applied inventory events based on the event identifier in the synchronization packet and does not deduct the inventory again. If a later-generated synchronization packet arrives before the preceding synchronization packet, the terminal detects a lack of intermediate events based on the initial acknowledgment level and requests the preceding synchronization packet or snapshot recovery packet. After completing the event application, each terminal updates its local acknowledgment level to the same final acknowledgment level.
[0285] This embodiment retains the original logical timestamps of offline inventory events through edge access devices, completes cross-terminal event relationship determination, evidence evaluation, and inventory playback through a central inventory conflict calibration device, and sends incremental synchronization data to each terminal through event identifiers and logical confirmation levels. Therefore, offline inventory counts, duplicate submissions, and concurrent material requisitions can be distinguished within the same event processing chain, and inventory calibration values, short requisition anomalies, pending review tasks, and terminal synchronization status can all be associated with the corresponding inventory events and evidence records.
[0286] The above description illustrates specific embodiments of the present invention, serving to demonstrate the technical solution and its implementation process. Those skilled in the art can adjust or equivalently replace the terminal type, event fields, logical time stamp maintenance method, evidence association method, constraint solving method, calibration parameters, and deployment structure without departing from the technical concept of the present invention. Any resulting technical solutions capable of determining the relationship between identical inventory events, conflict identification, event playback, difference calibration, and incremental synchronization should fall within the protection scope of the present invention. The protection scope of the present invention is defined by the scope of the claims.
Claims
1. A multi-terminal inventory conflict calibration method for intelligent warehousing, characterized in that, Includes the following steps: S1 receives inventory operation data generated by smart vending machines, smart warehouses, mobile inventory terminals, enterprise WeChat terminals, and warehouse workstations. It encapsulates each inventory operation into an inventory event containing material code, location, quantity, terminal identifier, operator, physical sensing result, and logical time stamp, and generates an event identifier. S2, based on the logical time stamps of each terminal, merges the time sequence, establishes the partial order relationship of events corresponding to the same material and storage location, and determines the sequential relationship, concurrent relationship or coverage relationship between inventory events; S3, based on the event partial order relationship, event identifier, business reference relationship and the baseline level carried by the inventory event, identify inventory conflicts caused by offline inventory count, duplicate submission or concurrent material requisition; S4 associates conflicting inventory events with barcode scanning records, container sensing results, inbound and outbound slips, maintenance work orders, and terminal trust levels, and calculates the trust weight of inventory events based on the consistency of the associated evidence. S5. Starting from the confirmed inventory snapshot no later than the target time, replay the inventory events before the target time according to the event partial order relationship, determine the acceptable event set under inventory constraints, and reconstruct the theoretical inventory at the target time. S6, perform a difference check between the theoretical inventory and the location perception quantity and moving inventory quantity aligned with the target time, and determine the inventory calibration value, the source of the anomaly and the location to be checked; S7. Generate incremental synchronization data carrying confirmation water level based on the inventory calibration value and the set of acceptable events, and send it to the corresponding terminal so that the corresponding terminal can perform idempotent updates according to the event identifier.
2. The multi-terminal inventory conflict calibration method for intelligent warehousing according to claim 1, characterized in that, In step S1, the material identifiers, storage location identifiers, personnel identifiers, business document identifiers, operation types, and units of measurement of different terminals are uniformly mapped. Inbound, return, and transfer operations are converted into positive inventory increments, while requisition, scrap, and transfer operations are converted into negative inventory increments. Inventory counting operations are converted into inventory observations carrying the inventory counting range, observation time, and inventory baseline level. These inventory observations do not directly cover the inventory increment event chain. The inventory events also include batch identifiers, baseline levels, terminal local sequences, business references, payload summaries, and generation status. Event identifiers are generated based on warehouse domain identifiers, terminal identifiers, and terminal local sequences. Business fingerprints are generated based on material codes, storage locations, operation types, quantities, business document identifiers, operators, and action stages. Inventory events with the same event identifier are identified as transmission duplicate events. Inventory events with different event identifiers but consistent business fingerprints, payload summaries, and business parent events are identified as business duplicate events. Transmission duplicate events and business duplicate events are stored as subordinate records of the main inventory event and do not generate duplicate inventory increments. The original data of materials whose codes or locations cannot be determined is packaged as events to be assigned and will not be included in the inventory increment calculation until the coding and assignment are completed.
3. The multi-terminal inventory conflict calibration method for intelligent warehousing according to claim 1, characterized in that, In step S2, the logical time stamp includes a vector logic clock and a hybrid logic clock. The vector logic clock is used to determine the partial order relationship of events, and the hybrid logic clock is used to determine a stable display and playback order within the same partial order layer. When a terminal generates an inventory event, it increments the vector component corresponding to that terminal and writes the confirmed vector components of other terminals into the inventory event. After receiving the inventory event, it takes the maximum value of each component of the local vector logic clock and the vector logic clock of the inventory event. For inventory events e_a and e_b, when V_a[k]≤V_b[k] holds true for each vector component k and there exists a vector component that is strictly less than k, it is determined that inventory event e_a precedes inventory event e_b. When V_a and V_b do not have a component-wise inclusion relationship, it is determined that they are concurrent. When inventory event e_b is causally after inventory event e_a, and inventory event e_b carries a revocation reference, compensation reference, or calibration reference pointing to inventory event e_a, it is determined that inventory event e_b covers inventory event e_a. The hybrid logic clock, the server receiving order, or the terminal physical time do not constitute the coverage relationship on their own.
4. The multi-terminal inventory conflict calibration method for intelligent warehousing according to claim 1, characterized in that, In step S3, when the baseline level of the inventory count event is earlier than the server confirmation level, and there is an inventory increment event that is not observed in the inventory count event between the two levels, the inventory count event is determined to be an offline inventory count conflict event. When an inventory event meets the conditions of duplicate event identifier or duplicate business fingerprint, the corresponding inventory event will be identified as a duplicate submission conflict event. When the vector logic clocks of multiple negative inventory increment events corresponding to the same material and storage location do not have a component-wise inclusion relationship, and the sum of the demand quantities corresponding to the multiple negative inventory increment events is greater than the sum of the common baseline inventory and the determined inventory increment, the multiple negative inventory increment events are identified as concurrent material requisition conflict events. When the container sensing result shows an inventory change but there is no inventory operation event in the corresponding time neighborhood, or when an inventory operation event exists but the container sensing result does not change accordingly, a physical logic conflict flag is generated, and it is determined whether the change is caused by a maintenance operation based on a valid maintenance work order; when the same inventory event simultaneously meets the duplicate submission condition and the concurrent material requisition condition, the duplicate inventory increment is eliminated first, and then the concurrent material requisition judgment is performed on the retained master inventory event.
5. The multi-terminal inventory conflict calibration method for intelligent warehousing according to claim 1, characterized in that, In step S4, within the operation time neighborhood and causal neighborhood corresponding to the inventory event, the barcode scanning of materials and the barcode scanning of storage locations form barcode consistency S_e; the changes in container weight, tag set, or visual count form physical perception consistency P_e; the materials, batches, quantities, and effective status of inbound and outbound slips form document consistency D_e; the equipment, time, and scope of impact of maintenance work orders form maintenance interpretability M_e; and the terminal credibility T_e is formed based on the terminal's historical verification results. The credibility weight R_e of inventory event e is calculated according to R_e = clip(λ_sS_e + λ_pP_e + λ_dD_e + λ_mM_e + λ_tT_e - λ_aA_e, 0, 1), where A_e represents the relationship between various related pieces of evidence. The degree of contradiction is defined by non-negative weighting coefficients λ_s, λ_p, λ_d, λ_m, λ_t, and λ_a, with clip indicating that the calculation result is limited to 0 to 1. For inventory event e generated by terminal j, T_e is set as the terminal credibility T_j corresponding to the time the inventory event is generated. The terminal credibility of terminal j is updated according to T_j = (a_0 + n_j^+) / (a_0 + b_0 + n_j^+ + n_j^-), where n_j^+ and n_j^- represent the number of events that are verified correctly and incorrectly, respectively, and a_0 and b_0 represent the credibility prior parameters. Time decay is applied to historical verification results that have exceeded the preset validity period, and a new credibility update starting point is recorded after the terminal completes clock correction or sensing device calibration.
6. The multi-terminal inventory conflict calibration method for intelligent warehousing according to claim 1, characterized in that, In step S5, the confirmed inventory snapshot includes snapshot inventory Q_0, snapshot confirmation level V_0, and a summary of the accepted event set; query inventory events that are not dominated by the snapshot confirmation level and are no later than the target time; construct a directed acyclic graph of events based on the partial order relationship and business reference relationship; replay inventory events with causal sequence relationship in topological order; and replay concurrent inventory events that act on different materials or different storage locations in parallel. For inventory events that cannot be simultaneously established within the same conflict domain, an event acceptance variable x_i is set. x_i = 1 indicates acceptance of the corresponding conflicting inventory event, and x_i = 0 indicates rejection of the corresponding conflicting inventory event. Under the conditions of 0 ≤ Q_0 + Σ_i x_iΔq_i + Σ_h Δq_h ≤ Cap, and the conditions of batch validity, unique serial number, and quantity conservation at both ends of the transfer, the event combination with the larger sum of confidence weights is selected. Here, Δq_i represents the inventory increment of the conflicting inventory event, Δq_h represents the inventory increment of the confirmed inventory event, and Cap represents the inventory capacity of the corresponding material in the corresponding storage location. Mark the replayed inventory events as accepted, duplicate dependent, compensated, partially fulfilled, or pending review status, and write the status results into the summary of the acceptable event set.
7. The multi-terminal inventory conflict calibration method for intelligent warehousing according to claim 6, characterized in that, When the demand quantity corresponding to a concurrent material requisition conflict event exceeds the available inventory, the effective fulfillment quantity y_i of each material requisition event is determined based on the scan result of the sequence number associated with each material requisition event, the cabinet opening operation range, the change in the perceived quantity of the container, the effective quantity of the material requisition order, and the trust weight, such that 0≤y_i≤r_i and the sum of the effective fulfillment quantities is not greater than the available inventory, where r_i represents the demand quantity of the corresponding material requisition event. The effective fulfillment quantity is written into the fulfillment event derived from the original material requisition event, and a short requisition exception event is generated based on the difference between the demand quantity and the effective fulfillment quantity, so that the fulfillment event participates in inventory replay. The short requisition exception event is used to generate material shortage feedback and does not deduct inventory repeatedly. When the perceived change of the same container is associated with multiple mutually exclusive material requisition events at the same time, the perceived change of the container is divided according to the cabinet opening range and the scan sequence. If the division cannot be completed, the corresponding material requisition event is kept in the pending review state instead of directly allocating the inventory quantity according to the trust weight.
8. The multi-terminal inventory conflict calibration method for intelligent warehousing according to claim 1, characterized in that, In step S6, based on the confirmed inventory events between the location perception time and the moving inventory time and the target time, the location perception quantity and the moving inventory quantity are compensated in a positive or negative increment to obtain the location perception quantity Q_s and the moving inventory quantity Q_m at the target time. When the differences between the theoretical inventory Q_th and Q_s and Q_m are all within the corresponding allowable error range, Q_th is determined as the inventory calibration value; when any difference exceeds the corresponding allowable error range, under the constraints of inventory non-negativity, storage capacity, batch validity, and serial number uniqueness represented by the candidate set Ω, according to Q_cal=arg The inventory calibration value Q_cal is determined by min_(q∈Ω){ω_tρ(q-Q_th)+ω_sρ(q-Q_s)+ω_mρ(q-Q_m)+ω_bρ(q-Q_biz)}, where ρ represents the robust loss function, Q_biz represents the candidate inventory quantity determined based on the effective business documents, and ω_t, ω_s, ω_m, and ω_b are determined based on the event chain credibility, sensor health, inventory count completeness, and document completeness, respectively. The calibration confidence level is determined based on the objective function difference between the optimal inventory value and the adjacent candidate inventory values, the number of valid evidences, and the consistency of evidence. When the calibration confidence level reaches the automatic calibration threshold, a calibration event is generated. When the calibration confidence level is lower than the automatic calibration threshold, the suggested calibration value is retained and the storage location to be reviewed is output. When the calibration confidence level is lower than the freeze threshold, the automatic deduction of inventory for the corresponding storage location is restricted.
9. The multi-terminal inventory conflict calibration method for intelligent warehousing according to claim 1, characterized in that, In step S7, a confirmed logical water level is maintained for each terminal. The incremental synchronization data includes a synchronization data identifier, applicable terminal, starting confirmation water level, ending confirmation water level, new acceptance event, compensation event, tombstone marker for duplicate or failed events, inventory snapshot summary, rule version, and overall summary check value. After receiving the incremental synchronization data, the terminal verifies the local confirmation water level and overall summary check value, performs an idempotency check on the event identifier, applies the new acceptance event, compensation event, and tombstone marker in the same transaction, and updates the local confirmation water level after successful application. When the local confirmation water level cannot cover the starting confirmation water level, the terminal requests recovery data containing the inventory snapshot summary and missing events. When the terminal has offline inventory events that have not yet been uploaded, it first uploads the offline inventory events and their baseline water levels, and then applies the incremental synchronization data according to the partial order relationship of the events returned by the server, so that the repeatedly received or out-of-order received incremental synchronization data does not repeatedly change the inventory.
10. A multi-terminal inventory conflict calibration device for intelligent warehousing, characterized in that, It includes an event access module, a timing relationship determination module, a conflict identification module, a trusted weight determination module, an event playback module, a difference calibration module, and an incremental synchronization module; The event access module is used to receive inventory operation data generated by smart vending machines, smart warehouses, mobile inventory terminals, enterprise WeChat terminals and warehouse workstations, and encapsulate each inventory operation into an inventory event containing material code, location, quantity, terminal identifier, operator, physical sensing result and logical time stamp, and generate a corresponding event identifier. The timing relationship determination module is used to merge the received inventory events according to the logical time scale maintained by each terminal, establish the partial order relationship of events corresponding to the same material and storage location, and determine the sequential relationship, concurrent relationship or coverage relationship between inventory events. The conflict identification module is used to identify inventory conflicts caused by offline inventory counts, duplicate submissions, or concurrent material requisitions based on the partial order of events, event identifiers, business reference relationships, and baseline levels, and to send the inventory events that cause inventory conflicts to the trusted weight determination module. The trusted weight determination module is used to associate inventory events with inventory conflict records, vending machine perception results, inbound and outbound slips, maintenance work orders and terminal trusted levels, calculate the trusted weight of the inventory event based on the consistency of the associated evidence, and send the trusted weight to the event playback module. The event replay module is used to replay the inventory events before the target time according to the partial order of the events, starting from the confirmed inventory snapshot no later than the target time, to determine the set of acceptable events under inventory constraints, to reconstruct the theoretical inventory at the target time, and to send the theoretical inventory to the difference calibration module. The difference calibration module is used to verify the difference between the theoretical inventory and the location perception quantity and moving inventory quantity aligned with the target time, determine the inventory calibration value, the source of the anomaly and the location to be reviewed, and send the inventory calibration value and the set of acceptable events to the incremental synchronization module. The incremental synchronization module is used to generate incremental synchronization data carrying confirmation water level based on inventory calibration value and acceptable event set, send incremental synchronization data to the corresponding terminal, and receive the updated confirmation water level fed back by the corresponding terminal.