A clothing inventory dynamic prediction method and system based on big data analysis
Patent Information
- Application Number
- CN202611095221.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-10-09
AI Technical Summary
[0005]因此,本发明解决的技术问题是:现有的服装库存预测方法存在异步事件的业务时间与写入时间不一致导致库存状态失真,库存数据可信程度未参与需求变化校正,跨节点调拨及预测出入库数量缺少库存守恒校核,以及如何利用大数据分析生成可动态更新且能够反映服装库存实际流转状态的库存预测结果的问题
通过按照款号、颜色编码和尺码编码生成服装库存对象标识,并对库存变动事件和订单履约事件建立业务时序、写入时序、事件指纹及迟到事件回插机制,实现了异步多源库存数据的统一归并、去重和库存量重构,使库存状态序列能够保持业务发生顺序及写入过程的双重可追溯性,从而减少重复写入和迟到写入造成的库存状态偏移。
Smart Images

Figure CN122887367A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of inventory data management technology, specifically to a method and system for dynamic prediction of apparel inventory based on big data analysis. Background Technology
[0002] With the informatization of apparel retail, wholesale, and supply chain collaboration, apparel companies typically use order management systems, warehouse management systems, inventory ledger systems, and store management systems to record inventory changes and order fulfillment status corresponding to style numbers, colors, and sizes. Because apparel inventory objects are characterized by a large number of style, color, and size combinations, dispersed inventory nodes, significant order fluctuations, and frequent cross-node transfers, inventory management information systems need to merge, sort, and analyze a large number of inventory change events and order fulfillment events to support warehouse preparation, store replenishment, order fulfillment, and inventory resource allocation. Big data analytics technology is increasingly being applied to apparel inventory management, providing a data foundation for inventory forecasting and inventory status assessment for management purposes by centrally processing inventory and order data from multiple nodes and time periods.
[0003] Existing apparel inventory management methods typically generate inventory statistics based on the current inventory balance in the inventory ledger or the system write order of order records. However, inventory increases, decreases, order fulfillment, and order cancellations may be written asynchronously by different business systems, and the actual business time of the event may differ from the system write time. This can easily lead to the same apparel inventory object appearing in different inventory states under different time calibers. Some systems directly overwrite historical records with the latest write record, making it difficult to identify the continuous impact of duplicate and late events on subsequent inventory nodes, thus causing breakpoints or quantity offsets in the inventory history sequence. In addition, existing demand forecasting often uses fixed-period averages, simple moving averages, or single order quantity changes for calculation, without fully considering the order fulfillment level, pending demand, and the reliability of the inventory data itself. This results in abnormal writes, delayed writes, or discrepancies in the book balance being directly passed on to the forecast results. When calculating future inventory on a time-by-time basis, some methods lack continuous verification of the quantity relationship between inventory increases, decreases, predicted outbound shipments, and cross-node transfers, which may lead to negative inventory, mismatches between transfer increases and decreases, and difficulty in tracing different forecast versions. Therefore, how to utilize big data analytics in apparel inventory management information systems to generate consistent and traceable inventory status data for asynchronous inventory events and order fulfillment events, and to dynamically predict future inventory under the constraint of inventory conservation, remains a problem that needs to be solved. Summary of the Invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, the technical problem solved by this invention is: existing apparel inventory forecasting methods suffer from inconsistencies between the business time and writing time of asynchronous events, leading to distorted inventory status; the reliability of inventory data is not corrected for demand changes; cross-node allocation and predicted inbound / outbound quantities lack inventory conservation verification; and the problem of how to use big data analysis to generate dynamically updated inventory forecasting results that reflect the actual circulation status of apparel inventory.
[0006] To address the aforementioned technical problems, this invention provides the following technical solution: a method for dynamic prediction of apparel inventory based on big data analysis, comprising acquiring inventory change events and order fulfillment events, merging them by apparel inventory object identifier, sorting them by business time and write time, and generating an inventory status sequence.
[0007] Perform big data analysis on the inventory status sequence to construct a demand change representation and an inventory reliability representation, and correct the demand change representation according to the inventory reliability representation.
[0008] Based on the corrected demand change characteristics, inventory turnover is extrapolated for each time period. The extrapolation results are verified according to the inventory conservation relationship to generate apparel inventory forecast results.
[0009] As a preferred embodiment of the big data-based dynamic inventory prediction method for apparel described in this invention, the acquisition of inventory change events and order fulfillment events includes: combining style number, color code, and size code according to a preset field order to generate an apparel inventory object identifier; acquiring the apparel inventory object identifier, inventory node identifier, inventory change type, inventory change quantity, remaining quantity, business time, write time, execution status, and transfer association identifier from the apparel inventory ledger to form an inventory change event, where the inventory change type is divided into inventory increase type and inventory decrease type; acquiring the apparel inventory object identifier, fulfillment node identifier, ordered quantity, fulfilled quantity, canceled quantity, business time, and write time from the order fulfillment record to form an order fulfillment event; mapping the fulfillment node identifier to the inventory node identifier, enabling the inventory change event and order fulfillment event to be associated according to the apparel inventory object identifier, inventory node identifier, and time relationship.
[0010] As a preferred embodiment of the big data-based dynamic inventory forecasting method for apparel described in this invention, the generation of the inventory state sequence includes: grouping inventory change events and order fulfillment events according to apparel inventory object identifiers and inventory node identifiers; and establishing a business sequence and a write sequence according to the write time within each group. For inventory change events, the apparel inventory object identifier, inventory node identifier, inventory change type, inventory change quantity, business time, and transfer association identifier are combined to form an inventory event fingerprint. For order fulfillment events, the apparel inventory object identifier, inventory node identifier, ordered quantity, fulfilled quantity, canceled quantity, and business time are combined to form a fulfillment event fingerprint. When the inventory event fingerprints are the same or the fulfillment event fingerprints are the same, the event with the earliest write time is retained, and the remaining events with the same event fingerprint are deleted. From the completed inventory change events before the forecast start point, the inventory change event with the business time closest to the forecast start point is selected, and the remaining quantity in the selected inventory change event is determined as the starting inventory quantity. The initial inventory level is determined by setting the remaining inventory quantity after the selected inventory change event is processed. Starting from the first completed inventory change event following the selected event in the business timeline, subsequent completed inventory change events are read sequentially. Inventory increase events are accumulated, and inventory decrease events are deducted, generating the reconstructed inventory level for each business time node. When the business time of an inventory change event or order fulfillment event is earlier than the write time, and the business time is before an already generated business time node, the corresponding event is identified as a late event. It is then inserted into the business timeline according to its business time, and the reconstructed inventory level or order fulfillment level for subsequent business time nodes is recalculated from the insertion position. The ordering position of the same event in the business timeline and the write timeline is compared, and the time interval between the corresponding business time and the write time is calculated, generating an event delay sequence. The reconstructed inventory level, inventory change events, order fulfillment events, and event delay sequences for each business time node are associated according to the apparel inventory object identifier and the inventory node identifier, generating an inventory status sequence.
[0011] As a preferred embodiment of the apparel inventory dynamic forecasting method based on big data analysis described in this invention, the following steps involve performing big data analysis on the inventory status sequence: reading the order quantity, fulfilled quantity, and canceled quantity from the order fulfillment events in the inventory status sequence; deducting the canceled quantity from the order quantity to generate the net order demand quantity; deducting the fulfilled quantity from the net order demand quantity to generate the unfulfilled demand quantity; and setting the unfulfilled demand quantity to zero when the deduction result is less than zero; aggregating the net order demand quantity, fulfilled quantity, and unfulfilled demand quantity into a continuous analysis period according to business time to generate a net demand sequence, a fulfillment quantity sequence, and an unfulfilled demand sequence; dividing the continuous analysis period into a first analysis window, and combining the first analysis windows with consecutive times into a second analysis window; calculating the difference in net order demand quantities between adjacent analysis periods within the same first analysis window to generate a local demand change sequence; sorting the net order demand quantities with the same time position in each of the first analysis windows within the second analysis window, and selecting the net order demand quantity corresponding to the median position in the sort to generate a periodic demand benchmark sequence. A fulfillment ratio sequence is generated based on the correspondence between net order demand and fulfilled quantity. The unfulfilled demand quantity is then accumulated according to business time to generate an unfulfilled demand accumulation sequence. The local demand change sequence, the periodic demand baseline sequence, the fulfillment ratio sequence, and the unfulfilled demand accumulation sequence are time-aligned to generate a demand change representation.
[0012] As a preferred embodiment of the big data-based dynamic inventory forecasting method for apparel described in this invention, the method of correcting demand change representation based on inventory reliability includes: reading the reconstructed inventory quantity and the remaining quantity in the corresponding inventory change event from the inventory state sequence, calculating the difference between the reconstructed inventory quantity and the remaining quantity, and generating an inventory state residual; reading the difference in the sorting position of each event in the business time sequence and the time interval between the business time and the write time from the event delay sequence, and generating an event delay amount; calculating the cumulative amount of the corresponding inventory change quantity propagated from the insertion position to subsequent business time nodes for late inventory change events, and generating a late event propagation amount; and collecting the absolute value of the inventory state residual, the event delay amount, and the late event propagation amount according to the apparel inventory object identifier, the inventory node identifier, and the first analysis window. Based on the absolute value of the inventory status residual, the event delay, and the propagation of late events within each first analysis window, window-level inventory status residual indicators, window-level event delay indicators, and window-level late event propagation indicators are generated for the corresponding first analysis window. The inventory status residual, event delay, late event propagation, and inventory credibility weights are combined to generate an inventory credibility representation.
[0013] The inventory reliability weights are correlated with the local demand change sequence, cyclical demand baseline sequence, fulfillment ratio sequence, and accumulated unfulfilled demand sequence in the demand change representation based on business time. The retention share of the local demand change sequence in the corrected demand quantity is determined based on the inventory reliability weights, and the introduction share of the cyclical demand baseline sequence in the corrected demand quantity is determined based on the complement of the inventory reliability weights, thus generating the corrected demand change sequence. When a late order fulfillment event is inserted into the business timeline, the corresponding fulfilled quantity is reassigned to its respective first analysis window according to the business time of the late order fulfillment event, and the fulfillment ratio and accumulated unfulfilled demand in the corresponding first analysis window are recalculated. Under the condition that the total net order demand quantity remains unchanged within the same second analysis window, the corrected demand change sequence, the recalculated fulfillment ratio, and the accumulated unfulfilled demand are combined to generate the corrected demand change representation.
[0014] As a preferred embodiment of the apparel inventory dynamic forecasting method based on big data analysis described in this invention, the step of extrapolating inventory turnover according to the corrected demand change characterization for each time period includes: dividing the target time period after the forecast starting point into sequentially connected forecast time slices, and determining the reconstructed inventory quantity at the end of the inventory state sequence as the initial inventory quantity of the first forecast time slice. Inventory change events with confirmed execution status and business time within the target time period are selected from the inventory change events, and the selected inventory change events are allocated to the corresponding forecast time slices according to business time. Based on the inventory change type, the inventory change quantities corresponding to the inventory increase type in each forecast time slice are aggregated into the planned increase inventory quantity, and the inventory change quantities corresponding to the inventory decrease type are aggregated into the planned decrease inventory quantity. The corrected demand quantity corresponding to each forecast time slice is read from the corrected demand change characterization, and the corrected demand quantity is determined as the predicted net demand quantity for the corresponding forecast time slice. According to the corrected fulfillment ratio, the predicted net demand quantity is converted into the predicted outbound demand quantity, and the accumulated unfulfilled demand quantity is added to the predicted outbound demand quantity for the corresponding forecast time slice according to the order of business time. The beginning inventory is added to the planned increase in inventory, and then the planned decrease in inventory and the predicted outbound demand are subtracted sequentially to generate the candidate ending inventory for the current forecast time slice. The candidate ending inventory for the current forecast time slice is then passed to the next forecast time slice as the candidate beginning inventory, and the inventory projection results for each forecast time slice are generated sequentially. When a new inventory change event or a new order fulfillment event is written, the affected business time node or forecast time slice is determined based on the business time of the new event. The inventory state sequence, the corrected demand change representation, and the inventory projection results are regenerated from the affected position, and an inventory forecast version identifier is configured for the regenerated inventory projection results.
[0015] As a preferred embodiment of the apparel inventory dynamic forecasting method based on big data analysis described in this invention, the generation of apparel inventory forecast results includes: for each forecast time slice, adding the corresponding beginning inventory quantity to the planned increase inventory quantity, and subtracting the planned decrease inventory quantity and the predicted outbound demand quantity to generate a conserved inventory quantity. The conserved inventory quantity is compared with the corresponding candidate ending inventory quantity. When the two are inconsistent, the candidate ending inventory quantity is replaced with the conserved inventory quantity, and the replaced conserved inventory quantity is passed to the next forecast time slice. For inventory change events with the same allocation association identifier, the inventory decrease quantity of the source inventory node is matched with the inventory increase quantity of the target inventory node. When the two are inconsistent, the unmatched inventory increase quantity is not included in the planned increase inventory quantity of the target inventory node, and the inventory decrease quantity that has already occurred in the source inventory node is retained in the planned decrease inventory quantity. When the conserved inventory quantity is less than zero, the predicted available inventory quantity is determined to be zero, the absolute value of the conserved inventory quantity is determined as the demand gap quantity, and the demand gap quantity is passed to the predicted outbound demand quantity of the next forecast time slice. When the conserved inventory quantity is not less than zero, the conserved inventory quantity is determined as the predicted available inventory quantity, and the demand gap is determined as zero. Based on the apparel inventory object identifier, inventory node identifier, and forecast time slice, the predicted available inventory quantity, demand gap, and inventory forecast version identifier are combined to generate the apparel inventory forecast result.
[0016] As a preferred embodiment of the apparel inventory dynamic prediction system based on big data analysis described in this invention, it includes an inventory event sequencing module, a demand reliability correction module, and an inventory conservation prediction module.
[0017] The inventory event sequencing module is used to obtain inventory change events and order fulfillment events, merge them according to the clothing inventory object identifier, sort them according to the business time and the write time, and generate an inventory status sequence.
[0018] The demand credibility correction module is used to perform big data analysis on the inventory status sequence, construct demand change representation and inventory credibility representation, and correct the demand change representation according to the inventory credibility representation.
[0019] The inventory conservation forecasting module is used to extrapolate inventory turnover on a time-by-time basis based on the corrected demand change characterization, verify the extrapolation results according to the inventory conservation relationship, and generate apparel inventory forecast results.
[0020] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement a method for dynamic prediction of clothing inventory based on big data analysis.
[0021] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of a method for dynamic prediction of clothing inventory based on big data analysis.
[0022] The beneficial effects of this invention are: By generating apparel inventory object identifiers according to style number, color code, and size code, and establishing business sequence, write sequence, event fingerprint, and late event back-insertion mechanism for inventory change events and order fulfillment events, the system achieves unified merging, deduplication, and inventory quantity reconstruction of asynchronous multi-source inventory data. This enables the inventory state sequence to maintain dual traceability of business occurrence order and write process, thereby reducing inventory state offset caused by duplicate writes and late writes.
[0023] By generating local demand changes, cyclical demand benchmarks, fulfillment ratios, and accumulated demand from net order demand, fulfillment quantity, and pending fulfillment demand, and by generating inventory reliability weights based on inventory status residuals, event delays, and the propagation of late events, the participation share of local demand changes and cyclical demand benchmarks is adjusted according to the reliability of inventory data. This enables the demand correction process to suppress instantaneous fluctuations caused by low-reliability inventory data, while maintaining consistency in the total net order demand within the second analysis window.
[0024] By dividing the target period into continuous forecast time slices, the planned increase in inventory, the planned decrease in inventory, and the predicted outbound demand are recursively extrapolated. The inventory conservation quantity, the matching relationship of the transfer quantity, and the negative inventory demand gap are checked. This enables the continuous transmission of apparel inventory forecast results between forecast time slices, so that the predicted available inventory and demand gap have a clear source of quantity, thereby avoiding the distortion of forecast results caused by mismatched transfer increases, negative inventory, and the write-back of new events. Attached Figure Description
[0025] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 The above is an overall flowchart of a method for dynamic prediction of clothing inventory based on big data analysis provided in Embodiment 1 of the present invention. Detailed Implementation
[0027] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0028] Example 1, referring to Figure 1 As an embodiment of the present invention, a method for dynamic prediction of apparel inventory based on big data analysis is provided, comprising: S1. Obtain inventory change events and order fulfillment events, merge them by apparel inventory object identifier, sort them by business time and write time, and generate an inventory status sequence. Acquiring inventory change events and order fulfillment events involves combining style number, color code, and size code according to a preset field order to generate an apparel inventory object identifier. From the apparel inventory ledger, the apparel inventory object identifier, inventory node identifier, inventory change type, inventory change quantity, remaining quantity, business time, write time, execution status, and transfer association identifier are retrieved to form an inventory change event. The inventory change type is categorized into inventory increase and inventory decrease types. From order fulfillment records, the source system identifier, order identifier, order line identifier, apparel inventory object identifier, fulfillment node identifier, ordered quantity, fulfilled quantity, canceled quantity, order business time, agreed fulfillment time, write time, and fulfillment event status are retrieved to form an order fulfillment event. The order identifier distinguishes different orders, the order line identifier distinguishes different apparel inventory objects within the same order, the agreed fulfillment time allocates unfulfilled order quantities to corresponding forecast time slices, and the fulfillment event status distinguishes between pending confirmation, confirmed, canceled, and completed fulfillment records. By mapping the fulfillment node identifier to the inventory node identifier, inventory change events and order fulfillment events can be associated according to the apparel inventory object identifier, inventory node identifier, and time relationship.
[0029] Furthermore, the method in this embodiment is executed by an apparel inventory dynamic prediction system deployed on an apparel inventory management server or cloud computing node. Data sources include apparel inventory ledgers, order fulfillment records, apparel basic data tables, and inventory node mapping tables. Inventory ledgers can be written by warehouse management systems, store inventory systems, or enterprise resource management systems, while order fulfillment records can be written by order management systems, sales management systems, or fulfillment service interfaces. Each data record enters the big data analysis and processing engine in the form of a structured data table or message events, using the apparel inventory object identifier and inventory node identifier as data partition keys. The data access cycle adopts a preset engineering range of 1 to 5 minutes. This range is determined based on the data writing frequency of the apparel inventory business system, enabling timely reception of inventory and fulfillment changes while avoiding excessive interface call volume caused by remote queries. Furthermore, the style number represents the basic code of the apparel product style, the color code represents the standard code of the color attribute under the same style number, and the size code represents the standard code of the specification attribute under the same style number and color. Apparel inventory object identifiers are generated in a fixed field order: style number, color code, and size code. Each field is first processed by removing leading and trailing spaces, standardizing character case, and converting between full-width and half-width characters. Then, a separator character that will not appear in the business code is used to connect the fields. The style number length is set to 4 to 32 characters, the color code length to 1 to 16 characters, and the size code length to 1 to 12 characters. These ranges are derived from the engineering storage boundaries of the apparel product master data fields, ensuring compatibility with numeric, alphanumeric, and combined codes, and preventing unclear code boundaries caused by directly concatenating different fields.
[0030] Furthermore, inventory node identifiers are used to distinguish between central warehouses, regional warehouses, store warehouses, returns warehouses, or other management nodes involved in apparel inventory flow. Fulfillment node identifiers and inventory node identifiers are linked through an inventory node mapping table, which records at least the fulfillment node identifier, inventory node identifier, effective time, and expiration time. For the same fulfillment node corresponding to different inventory nodes at different times, the mapping record in effect is selected based on the business time of the order fulfillment event. When multiple mapping records are matched for the same business time, the one with the latest effective time is retained. When no valid mapping record exists, the corresponding order fulfillment event enters the pending mapping queue and does not participate in the current round of forecasting. It is rewritten according to the original business time after the node relationship is supplemented, thereby preventing the fulfillment quantity from being incorrectly assigned to other inventory nodes.
[0031] Furthermore, inventory increase types must include at least purchase receipts, return receipts, transfer receipts, and inventory surplus receipts; inventory decrease types must include at least sales shipments, transfer shipments, loss reporting shipments, and inventory shortage shipments. The specific set of types is determined by the data dictionary of the inventory ledger, and calculations are not based on unregistered free text. Both inventory change quantity and ending inventory quantity are recorded in units of garment pieces, using non-negative integers. The direction of inventory quantity is determined by the inventory change type. Execution status must include at least pending confirmation, confirmed, in progress, and completed. Inventory status reconstruction uses completed inventory change events, while subsequent planned inventory projections use inventory change events whose business time falls within the target period and whose execution status is confirmed, to avoid prematurely changing historical inventory status with planned quantities that have not yet taken effect.
[0032] Furthermore, the transfer association identifier is used to connect the source inventory node decrease event and the target inventory node increase event formed by the same cross-inventory node transfer. Ordinary inbound or outbound events with an empty transfer association identifier do not undergo cross-node matching, but still participate in the quantity calculation of their respective inventory nodes according to the inventory change type. Business time represents the actual time when the inventory change or order fulfillment occurs, and write time represents the time when the corresponding record enters the inventory management information system; both are uniformly converted to the same time zone and accurate to the second. If the source system only provides date or minute-level time, it is sorted according to the minimum time precision that the source system can provide, and in the case of the same time, a stable order is determined sequentially by write time and event record number, so that the same input data can repeatedly generate the same event arrangement result.
[0033] The process of generating an inventory status sequence includes grouping inventory change events and order fulfillment events according to the apparel inventory object identifier and inventory node identifier, and establishing a business sequence and a write sequence within each group based on the business time and the write time, respectively. For inventory change events, the apparel inventory object identifier, inventory node identifier, inventory change type, inventory change quantity, business time, and transfer association identifier are combined to form an inventory event fingerprint. For order fulfillment events, the apparel inventory object identifier, inventory node identifier, ordered quantity, fulfilled quantity, canceled quantity, and business time are combined to form a fulfillment event fingerprint. When inventory event fingerprints or fulfillment event fingerprints are identical, the event with the earliest write time is retained, and other events with the same fingerprint are deleted. From the completed inventory change events before the forecast start point, the inventory change event with the business time closest to the forecast start point is selected, and the remaining quantity in the selected inventory change event is determined as the starting inventory quantity. The initial inventory level is determined by setting the remaining inventory quantity after the selected inventory change event is processed. Starting from the first completed inventory change event following the selected event in the business timeline, subsequent completed inventory change events are read sequentially. Inventory increase events are accumulated, and inventory decrease events are deducted, generating the reconstructed inventory level for each business time node. When the business time of an inventory change event or order fulfillment event is earlier than the write time, and the business time is before an already generated business time node, the corresponding event is identified as a late event. It is then inserted into the business timeline according to its business time, and the reconstructed inventory level or order fulfillment level for subsequent business time nodes is recalculated from the insertion position. The ordering position of the same event in the business timeline and the write timeline is compared, and the time interval between the corresponding business time and the write time is calculated, generating an event delay sequence. The reconstructed inventory level, inventory change events, order fulfillment events, and event delay sequences for each business time node are associated according to the apparel inventory object identifier and the inventory node identifier, generating an inventory status sequence.
[0034] Furthermore, within each group defined by the apparel inventory object identifier and inventory node identifier, the business sequence and write sequence respectively store the event record number, event type, business time, write time, and sorting position. Inventory event fingerprints and fulfillment event fingerprints use a comparison rule where field values are completely identical. Numerical fields are first standardized to integer quantities, time fields are standardized to the minimum time precision provided by the source system, and air conditioning transfer association identifiers are standardized to null values. For events with identical fingerprints, the earliest write time is considered the valid event. If the write times are still identical, the event with the smallest lexicographical order of the event record number is considered the valid event. Fingerprint deduplication only deletes duplicate write records; it does not merge business events with different business times, quantities, or transfer association identifiers to avoid misjudging multiple actual inventory changes as duplicate events.
[0035] Furthermore, to ensure the inventory restructuring process has a defined starting point, this embodiment requires that each combination of garment inventory object identifier and inventory node identifier has at least one completed inventory change event before the prediction starting point, and that event includes the remaining inventory quantity. If no event meets the conditions, the combination is marked as having an initial inventory quantity to be replenished, and no formal garment inventory prediction result is generated; it is not replaced by any average value or the inventory quantity of other garment inventory objects. For multiple completed inventory change events with the same business time and all close to the prediction starting point, the final inventory status is determined according to the latest write time, because this record reflects the subsequent ledger updates completed at the same business time point.
[0036] Furthermore, starting from the first completed inventory change event after the inventory restructuring anchor point, completed inventory change events are read sequentially according to business time sequence. For each inventory increase event read, the inventory change quantity in that event is added to the restructured inventory quantity of the previous business time node. For each inventory decrease event read, the inventory change quantity in that event is deducted from the restructured inventory quantity of the previous business time node. If the same business time node contains multiple inventory change events, the inventory increase and decrease quantities are first aggregated separately, and then the increase quantity is added to the initial or preceding restructured inventory quantity, and the decrease quantity is subtracted. To ensure this recursive relationship has clear mathematical boundaries, the following inventory restructuring formula is used: in, Indicates the number of elements in the current group. The reconstructed inventory level for each business time point is derived from the initial inventory level and the recursive calculation of inventory change events that have been completed before that point, and the unit is pieces. This indicates the remaining inventory quantity recorded for the completed inventory change event that is closest to the forecast start date in the business time prior to the forecast start date, in units of pieces. This represents the sequence number of the business time nodes, arranged according to the business time sequence, starting from the business time corresponding to the initial inventory quantity, and is a positive integer. This indicates the sequence number of the completed inventory change event that participated in the current inventory restructuring calculation, with a value ranging from 1 to... . Indicates the first The quantity direction of each inventory change event is set to 1 when the inventory change type is inventory increase and -1 when the inventory change type is inventory decrease. Indicates the first The quantity of inventory change in each inventory change event is derived from the apparel inventory ledger, in units of pieces, and rounded to a non-negative integer.
[0037] The result of this formula is written into the inventory status sequence as the reconstructed inventory quantity for the corresponding business time node. If the reconstructed inventory quantity is negative, the current step retains the negative value and the event set that caused it for subsequent inventory status residual and inventory reliability analysis. It is not directly modified to zero in the historical reconstruction stage to avoid masking the quantity discrepancy between the inventory ledger and the event stream.
[0038] Furthermore, late events are not determined by a fixed delay threshold. As long as the event's business time is earlier than the write time and the business time is before the already generated business time node, it is identified as a late event. Late inventory change events are inserted into the business time sequence according to their business time. From the insertion position, subsequent inventory change events are reread, and calculations are performed according to the rules of accumulation for inventory increases and deduction for inventory decreases, recalculating to the end of the inventory status sequence. After a late order fulfillment event is inserted, the ordered quantity, fulfilled quantity, and canceled quantity are re-aggregated starting from the analysis period corresponding to its business time. This determination directly relies on the objective chronological relationship between business time and write time, avoiding the omission of late records that affect historical inventory when the fixed delay threshold is too high.
[0039] Furthermore, the event delay sequence simultaneously stores the sorting position difference and the time interval. The sorting position difference is obtained by subtracting the sorting position of the same event in the business sequence from its sorting position in the write sequence, and taking the absolute value of the result; the value is an integer not less than 0. The time interval is obtained by subtracting the business time from the write time and uniformly converting it to minutes. When the calculation result is less than 0, it is set to 0, and the corresponding record is marked as a time anomaly. The sorting position difference reflects the degree of disturbance of the event write order to the business sequence, while the time interval reflects the actual delay time for the event to enter the inventory management system. These two are not merged into a new complex index in S1, but are written as two independent data items in the event delay sequence for use by S2 in aggregating the data according to the same apparel inventory objects, inventory nodes, and analysis windows.
[0040] Furthermore, the inventory status sequence is organized according to apparel inventory object identifiers, inventory node identifiers, and business time nodes. Each business time node includes at least the reconstructed inventory quantity, the set of valid inventory change events, the set of valid order fulfillment events, the sorting position difference, the time interval, and a recalculation flag. For business time nodes with only order fulfillment events and no inventory change events, the reconstructed inventory quantity from the previous business time node is used. For nodes with only inventory change events and no order fulfillment events, the order-related quantity is recorded as 0. The big data analysis and processing engine partitions and stores the inventory status sequence according to the apparel inventory object identifier and the inventory node identifier, maintaining business time order within the same group. Subsequent analysis only reads the latest sequence version that has completed node mapping, event deduplication, and late event back-insertion.
[0041] It should be noted that this step is not simply a routine sorting of the inventory ledger based on a single time field. Instead, it addresses the challenges of a large number of apparel inventory objects, dispersed inventory nodes, and asynchronous writes from multiple business systems. It establishes a continuous data processing chain by combining apparel inventory object identifiers, business timelines, write timelines, event fingerprints, late event back-insertion, and inventory quantity reconstruction. This process preserves both the actual order of events and the write process of events entering the inventory management information system. This allows the impact of duplicate and late events on inventory status to be located and recalculated, providing stable and traceable foundational data for subsequent adjustments to requirements based on the reliability of inventory data.
[0042] S2. Perform big data analysis on the inventory status sequence to construct demand change representations and inventory reliability representations, and correct the demand change representations according to the inventory reliability representations. Big data analysis of inventory status sequences includes: reading the order quantity, fulfilled quantity, and canceled quantity from order fulfillment events in the inventory status sequence; subtracting the canceled quantity from the order quantity to generate the net order demand; subtracting the fulfilled quantity from the net order demand to generate the pending demand quantity, setting the pending demand quantity to zero when the subtraction result is less than zero; aggregating the net order demand, fulfilled quantity, and pending demand quantity into continuous analysis periods according to business time to generate a net demand sequence, a fulfillment quantity sequence, and a pending demand sequence; dividing the continuous analysis period into a first analysis window, and combining time-continuous first analysis windows into a second analysis window; calculating the difference in net order demand between adjacent analysis periods within the same first analysis window to generate a local demand change sequence; sorting the net order demand quantities with the same time position in each first analysis window within the second analysis window, and selecting the net order demand quantity corresponding to the median position in the sort to generate a periodic demand baseline sequence; generating a fulfillment ratio sequence based on the correspondence between net order demand and fulfilled quantity, and accumulating the pending demand quantity according to business time to generate a pending demand accumulation sequence. The local demand change sequence, the cyclical demand baseline sequence, the fulfillment ratio sequence, and the cumulative sequence of unfulfilled demand are time-aligned to generate a demand change representation.
[0043] Furthermore, the net order demand quantity represents the number of garments still corresponding to the actual order relationship after deducting the cancellation quantity from the order fulfillment event. This is specifically obtained by subtracting the cancellation quantity from the order quantity. The pending fulfillment demand quantity represents the portion of the net order demand quantity not yet covered by the fulfilled quantity. This is specifically obtained by subtracting the fulfilled quantity from the net order demand quantity; a result less than 0 is taken as 0. Order quantity, fulfilled quantity, and cancellation quantity are all measured in pieces, and the cancellation quantity should generally not exceed the order quantity. If a source record does not meet this constraint, the record is marked as having a quantity anomaly and the current analysis window is exited. After the order management system corrects the error, the data is re-aggregated according to the original business time, and the erroneous quantity is not used to generate demand change representations.
[0044] Furthermore, in this embodiment, the continuous analysis period is set to 1 hour. 24 consecutive analysis periods constitute a first analysis window, and 28 consecutive first analysis windows constitute a second analysis window. This setting stems from the need to analyze intraday sales changes and four-week cyclical changes in apparel inventory management. The first analysis window is used to retain hourly demand changes, and the second analysis window is used to provide multiple historical comparison samples for the same intraday time position. Each analysis period uses a left-closed, right-open time boundary; for example, data from 10:00 to 11:00 is included in the 10:00 analysis period, and events occurring exactly at 11:00 are included in the next analysis period. For new apparel inventory objects with fewer than 28 first analysis windows, the existing consecutive first analysis windows are used, but the number of windows participating in the cyclical demand benchmark calculation must not be less than 3.
[0045] Furthermore, the change in local demand is obtained by subtracting the net order demand of the previous adjacent analysis period from the net order demand of the current continuous analysis period. A positive result indicates an increase in net order demand, a negative result indicates a decrease in net order demand, and a result of 0 indicates no change in demand in the adjacent analysis period. If the first continuous analysis period of the first analysis window has no preceding period in the same window, the net order demand of the adjacent analysis period at the end of the previous first analysis window is used for calculation. If the preceding data does not exist, the change in local demand at that position is set to 0, and the initial position is recorded to avoid artificially introducing unfounded demand jumps.
[0046] Furthermore, the cyclical demand baseline sequence is generated by comparing the same time positions in each of the first analysis windows within the second analysis window. For example, the net order demand quantity between 10:00 and 11:00 each day is sorted in ascending order. When the sample size is odd, the median value is taken; when the sample size is even, the arithmetic mean of the two median values is taken. If the average result is 0.5 units, it is temporarily retained to 0.5 units and then rounded to the nearest integer before being included in subsequent inventory projections. Using the median position instead of directly using the average value is to account for the possibility that apparel orders may result in extreme quantities within a single window due to promotions, group purchases, or concentrated order cancellations. The median position can reduce the sustained impact of a single abnormal fluctuation on the cyclical demand baseline.
[0047] Furthermore, the fulfillment ratio is obtained by dividing the fulfilled quantity by the net order demand quantity within the same continuous analysis period, with a value range limited to 0 to 1. When the net order demand quantity is 0, the fulfillment ratio is 0 to avoid a division by zero. Results greater than 1 are truncated to 1. The accumulated amount of pending demand starts from the first continuous analysis period of the current second analysis window, accumulating the pending demand quantity for each period according to business time. When an order is subsequently fulfilled, canceled, or removed from the current forecast business scope, the corresponding processed quantity is deducted from the accumulated amount of pending demand, and the order identifier is recorded to prevent the same pending demand from being added repeatedly in multiple forecast time slices.
[0048] The inventory reliability characterization for correcting demand changes includes: reading the reconstructed inventory quantity and the remaining inventory quantity in the corresponding inventory change event from the inventory state sequence for each business time node; calculating the difference between the reconstructed inventory quantity and the remaining inventory quantity to generate the inventory state residual; reading the difference in the sorting position of each event in the business time sequence and the time interval between the business time and the write time from the event delay sequence to generate the event delay quantity; calculating the cumulative quantity of the corresponding inventory change from the insertion position to subsequent business time nodes for late inventory change events to generate the late event propagation quantity; collecting the absolute value of the inventory state residual, the event delay quantity, and the late event propagation quantity according to the apparel inventory object identifier, inventory node identifier, and first analysis window, respectively; generating window-level inventory state residual index, window-level event delay index, and window-level late event propagation index for each first analysis window based on the absolute value of the inventory state residual, the event delay quantity, and the late event propagation quantity within each first analysis window; and combining the inventory state residual, event delay quantity, late event propagation quantity, and inventory reliability weights to generate the inventory reliability characterization. The inventory reliability weights are correlated with the local demand change sequence, cyclical demand baseline sequence, fulfillment ratio sequence, and accumulated unfulfilled demand sequence in the demand change representation based on business time. The retention share of the local demand change sequence in the corrected demand quantity is determined based on the inventory reliability weights, and the introduction share of the cyclical demand baseline sequence in the corrected demand quantity is determined based on the complement of the inventory reliability weights, thus generating the corrected demand change sequence. When a late order fulfillment event is inserted into the business timeline, the corresponding fulfilled quantity is reassigned to its respective first analysis window according to the business time of the late order fulfillment event, and the fulfillment ratio and accumulated unfulfilled demand in the corresponding first analysis window are recalculated. Under the condition that the total net order demand quantity remains unchanged within the same second analysis window, the corrected demand change sequence, the recalculated fulfillment ratio, and the accumulated unfulfilled demand are combined to generate the corrected demand change representation.
[0049] Furthermore, the inventory status residual is obtained by subtracting the inventory ledger balance from the reconstructed inventory quantity at the same business time node, in units of pieces. A positive value indicates that the reconstructed inventory quantity is higher than the ledger balance, and a negative value indicates that the reconstructed inventory quantity is lower than the ledger balance. Event latency is formed by the difference in sorting position and the time interval: first, the difference in sorting position is divided by the number of events in the first analysis window minus 1; if the number of events is not greater than 1, this item is set to 0. Then, the time interval is divided by 1440 minutes, and if the result is greater than 1, it is set to 1. Finally, the components are merged according to the preset engineering share of 0.4 for the sorting position component and 0.6 for the time interval component. 1440 minutes corresponds to a one-day data reconciliation cycle, which can prevent the extreme latency caused by cross-day historical data entry from being infinitely amplified.
[0050] Furthermore, the late event propagation volume is used to represent the continuous impact of a late inventory change event on subsequent inventory status. Specifically, the inventory change quantity of the late inventory change event is first read, then the number of business time nodes affected by the recalculation from the event insertion position to the end of the corresponding first analysis window is counted, and finally the absolute value of the inventory change quantity is multiplied by the number of affected nodes to obtain the late event propagation volume expressed in units. The larger this volume is, the larger the scale of a single late event or the more subsequent nodes it affects. For late order fulfillment events, the inventory quantity propagation volume is not calculated; instead, the fulfillment quantity and the quantity of pending fulfillment in the corresponding analysis window are re-aggregated.
[0051] For each first analysis window contained within the same second analysis window, a window-level inventory status residual index, a window-level event delay index, and a window-level late event propagation index are generated. The window-level inventory status residual index is the average of the absolute values of the effective inventory status residuals within the corresponding first analysis window. The window-level event delay index is the average of the delay amounts of all effective events within the corresponding first analysis window. To reduce the impact of extreme delay events, the median or a predetermined high percentile value can also be used, but the same statistical method should be used consistently within the same implementation. The window-level late event propagation index is the total propagation impact of all late inventory change events within the corresponding first analysis window. Among the multiple first analysis windows contained within the same second analysis window, they are sorted from smallest to largest according to the window-level inventory status residual index, the window-level event delay index, and the window-level late event propagation index. For each window-level index, the normalized percentile corresponding to the first analysis window with the smallest index is set to zero, the normalized percentile corresponding to the first analysis window with the largest index is set to one, and the normalized percentile between zero and one is determined for the first analysis windows located between the two, based on their sorting position. When multiple first analysis windows have the same metric, their normalized percentile is determined by averaging the ranking positions occupied by these first analysis windows. The percentiles for inventory status residuals, event delays, and late event propagation are obtained for the current first analysis window. The average of these three normalized percentiles is calculated, and then subtracted from one to obtain the inventory confidence weight for the current first analysis window. The output range of the inventory confidence weight is zero to one. The smaller the three metrics, the closer the inventory confidence weight is to one. The larger the three metrics, the closer the inventory confidence weight is to zero. When one of the three window-level metrics is missing, the inventory confidence weight is calculated using the average of the remaining two effective percentiles. When there are fewer than two effective metrics, the inventory confidence weight is set to a preset default value, and an insufficient sample indicator is added to the output. The preset default value should be determined through historical validation.
[0052] Furthermore, the inventory reliability weight ranges from 0 to 1, used to determine the participation share of local demand changes and cyclical demand benchmarks in the corrected demand quantity. The closer the inventory reliability weight is to 1, the smaller the inventory quantity residual in the current first analysis window, the more timely the event writing, and the weaker the impact of delayed propagation, thus retaining more local demand changes during correction. The closer the inventory reliability weight is to 0, the larger the quantity deviation or timing disturbance in the current inventory status, thus incorporating more cyclical demand benchmarks during correction. To keep the correction relationship clear and avoid multiple formula stacking, the following demand correction formula is adopted: in, Indicates the first The number of correction requirements for each continuous analysis period before the total processing is maintained, in units of pieces. Indicates the first The net order demand quantity in units for the consecutive analysis periods preceding the adjacent analysis periods. Indicates the first The first analysis window of each continuous analysis period The inventory credibility weight, with a value ranging from 0 to 1, is obtained by subtracting the average value from 1, which is the average of the average normalized sorting order of the first three items. Indicates the first The number of local demand changes in a consecutive analysis period relative to the previous adjacent analysis period, in units of pieces. Indicates the first The number of cyclical demand benchmarks corresponding to the time position of each continuous analysis period, in units of pieces. Indicates the first The time position of each continuous analysis period in the first analysis window is taken as 0 to 23 in this embodiment. This indicates the sequence number of consecutive analysis periods arranged according to business time.
[0053] This formula primarily preserves localized demand variations when inventory confidence is high, while adjusting demand quantities to align with cyclical demand benchmarks when inventory confidence is low. A value of 0 is used when the adjustment result is less than 0 to ensure that demand quantities do not contain negative values.
[0054] Furthermore, to maintain the total net order demand within the same second analysis window, the net order demand before and after correction are first summarized separately. When the total corrected demand is greater than 0, a uniform ratio is obtained by dividing the total before correction by the total after correction. Then, the corrected demand for each analysis period within the second analysis window is multiplied by this ratio. When the total corrected demand is 0 but the total before correction is not 0, the original net order demand for each analysis period is directly restored. When the ratio adjustment results in decimal numbers, they are first retained to two decimal places, and then the remaining integer numbers are allocated from largest to smallest according to the decimal part until the sum of the adjusted quantities for each period is completely consistent with the original net order demand.
[0055] Furthermore, when a late order fulfillment event is inserted into the business timeline, its corresponding continuous analysis period and first analysis window are determined according to the event's business time. The ordered quantity, fulfilled quantity, and canceled quantity are then re-aggregated to their corresponding positions. The calculation is then performed from the start of the analysis period to the end of the current second analysis window, including the net order demand quantity, the quantity of demand awaiting fulfillment, the fulfillment ratio, and the cumulative amount of demand awaiting fulfillment. When a late event crosses the boundary of the second analysis window, the affected adjacent second analysis windows are simultaneously reconstructed. After recalculation, the total demand maintenance process is executed again to ensure that late fulfillment records only change the distribution of demand at each time point, without unjustifiably altering the total net order demand already determined by the order event.
[0056] Furthermore, the corrected demand change representation is organized according to the apparel inventory object identifier, inventory node identifier, business time, and first analysis window number. It includes at least the corrected demand quantity, the corrected demand change quantity, the cyclical demand baseline quantity, the recalculated fulfillment ratio, the recalculated accumulated unfulfilled demand, inventory reliability weights, and data version. The corrected demand change quantity is only used to represent the change between adjacent corrected demand quantities and is not directly used to generate the predicted net demand. If an inventory reliability weight is missing at a certain forecast time point, the inventory reliability weight of the most recent complete first analysis window is used. If two consecutive first analysis windows have no valid data, the corresponding apparel inventory object is marked as having insufficient forecast input, and no arbitrary default weights are used to generate the official inventory forecast result.
[0057] It should be noted that this step does not involve a simple average or fixed-ratio smoothing of historical order quantities. Instead, it transforms the quantity residuals from inventory restructuring, the perturbation of event writing order, and the propagation impact of late inventory events into inventory reliability weights. These weights then control the participation share of local demand changes and cyclical demand benchmarks. By sorting and ranking data across three different dimensions, and using total quantity preservation rules within the second analysis window, the correction process is prevented from altering the determined net order demand. This ensures that demand correction is based on inventory data quality, time location, and quantity boundaries.
[0058] S3. Based on the corrected demand change representation, extrapolate inventory turnover over time periods, verify the extrapolation results according to the inventory conservation principle, and generate apparel inventory forecast results. The inventory turnover projection based on the corrected demand change representation for each time period includes: dividing the target period after the forecast start point into sequentially connected forecast time slices, and determining the reconstructed inventory quantity at the end of the inventory status sequence as the initial inventory quantity of the first forecast time slice. Inventory change events with a confirmed execution status and whose business time falls within the target period are selected from the inventory change events, and these selected events are allocated to the corresponding forecast time slices according to business time. Based on the inventory change type, the inventory change quantities corresponding to inventory increase types within each forecast time slice are aggregated into planned inventory increase quantities, and the inventory change quantities corresponding to inventory decrease types are aggregated into planned inventory decrease quantities. The corrected demand quantity for each forecast time slice is read from the corrected demand change representation, and this corrected demand quantity is determined as the predicted net demand quantity for the corresponding forecast time slice. According to the corrected fulfillment ratio, the predicted net demand quantity is converted into the predicted outbound demand quantity, and the accumulated unfulfilled demand quantity is added to the predicted outbound demand quantity for the corresponding forecast time slice according to the order of business time. The beginning inventory is added to the planned increase in inventory, and then the planned decrease in inventory and the predicted outbound demand are subtracted sequentially to generate the candidate ending inventory for the current forecast time slice. The candidate ending inventory for the current forecast time slice is then passed to the next forecast time slice as the candidate beginning inventory, and the inventory projection results for each forecast time slice are generated sequentially. When a new inventory change event or a new order fulfillment event is written, the affected business time node or forecast time slice is determined based on the business time of the new event. The inventory state sequence, the corrected demand change representation, and the inventory projection results are regenerated from the affected position, and an inventory forecast version identifier is configured for the regenerated inventory projection results.
[0059] Furthermore, this embodiment sets the 72 hours following the forecast start point as the target period, and divides it into 72 sequentially linked forecast time slices, each 1 hour long. The length of the forecast time slice is consistent with the continuous analysis period in S2, and the source of this setting is the consistency requirement of time granularity between demand change representation and inventory projection, which can avoid further splitting or merging of the corrected demand quantity. The initial inventory quantity of the first forecast time slice is the reconstructed inventory quantity of the latest business time node at the end of the inventory state sequence. When the end time of the inventory state sequence is more than 24 hours earlier than the forecast start point, it indicates that the inventory data is not updated in time, and the corresponding apparel inventory object enters the data waiting-to-update state. No formal forecast version is generated before the replenishment of inventory change events.
[0060] Furthermore, planned increases and decreases in inventory are determined solely by inventory change events with a confirmed execution status and whose business time falls within the target time period. "Confirmed" indicates that the corresponding inventory operation has been confirmed through the inventory management process but has not yet become a historical completed inventory change event. Events awaiting confirmation are not included in the forecast to avoid undetermined plans altering the forecasted inventory. Events whose business time falls within the left boundary of the forecast time slice but less than the right boundary are assigned to the current forecast time slice, while events within the right boundary are assigned to the next forecast time slice. Multiple events within the same forecast time slice are aggregated according to their inventory increase or decrease type, retaining the event record number and transfer association identifier.
[0061] Furthermore, the predicted net demand is obtained by adding the adjusted demand change to the baseline demand quantity at the corresponding time position, with a value of 0 if the result is less than 0. The adjusted fulfillment ratio is preferentially used from the fulfillment ratio in the most recent complete first analysis window that has the same time position as the predicted time slice. When there is no valid fulfillment ratio at that time position, the median of all valid fulfillment ratios in the current second analysis window is used. The predicted outbound demand is obtained by multiplying the predicted net demand by the adjusted fulfillment ratio, with the result rounded to two decimal places and converted to an integer number of units before being included in the inventory count.
[0062] Furthermore, the accumulated demand awaiting fulfillment is allocated to forecast time slots based on the order's business time and the agreed fulfillment time. If an order has an agreed fulfillment time, the unfulfilled quantity is added to the forecast time slot containing that agreed fulfillment time. If no agreed fulfillment time is recorded, allocation begins from the first forecast time slot according to the order of business time. Each quantity awaiting fulfillment is added only once, and after allocation, the order identifier, the allocated time slot, and the allocated quantity are recorded. The original forecasted outbound demand in the forecast time slot is added to the quantity awaiting fulfillment allocated to that time slot to form the final forecasted outbound demand participating in inventory projection.
[0063] Furthermore, the time-period inventory projection is performed in the following order: First, the beginning inventory of the current forecast time slice is read. Second, the planned increase in inventory for this time slice is added. Third, the planned decrease in inventory is subtracted. Finally, the forecasted outbound demand is subtracted to obtain the candidate ending inventory. The candidate ending inventory is not immediately restricted to a non-negative number so that subsequent inventory conservation checks can identify the amount by which demand exceeds available inventory. The candidate ending inventory of the current time slice is temporarily used as the candidate beginning inventory for the next forecast time slice until the allocation matching and inventory conservation checks are completed, at which point the corresponding candidate value is replaced by the check result.
[0064] The process of generating apparel inventory forecasts involves, for each forecast time slot, adding the corresponding beginning inventory to the planned increase in inventory, and subtracting the planned decrease in inventory and the predicted outbound demand to generate a conserved inventory quantity. This conserved inventory quantity is then compared to the corresponding candidate ending inventory. If they do not match, the conserved inventory quantity replaces the candidate ending inventory quantity, and the replaced conserved inventory quantity is carried over to the next forecast time slot. For inventory change events with the same transfer association identifier, the inventory decrease quantity of the source inventory node is matched with the inventory increase quantity of the target inventory node. If they do not match, the unmatched inventory increase quantity is not included in the planned increase in inventory of the target inventory node, and the inventory decrease quantity already occurring in the source inventory node is retained in the planned decrease in inventory. When the conserved inventory quantity is less than zero, the predicted available inventory is set to zero, the absolute value of the conserved inventory quantity is set as the demand gap, and the demand gap is carried over to the predicted outbound demand of the next forecast time slot. When the conserved inventory quantity is not less than zero, the conserved inventory quantity is set as the predicted available inventory, and the demand gap is set to zero. Based on the apparel inventory object identifier, inventory node identifier, and forecast time slice, the available inventory quantity, demand gap quantity, and inventory forecast version identifier are combined to generate the apparel inventory forecast result.
[0065] Furthermore, inventory change events with the same transfer association identifier constitute a transfer matching group. The system separately aggregates the inventory reduction quantity recorded at the source inventory node and the inventory increase quantity recorded at the target inventory node for each transfer matching group. The transfer quantity that can be included in the planned increase in inventory at the target inventory node must not exceed the inventory reduction quantity that has already occurred or been confirmed at the source inventory node. The portion of the target increase quantity that exceeds the source reduction quantity is identified as an unmatched inventory increase quantity and is not included in the planned increase in inventory at the target node. The inventory reduction quantity that has already occurred at the source inventory node remains in the planned reduction in inventory, because this quantity has changed the inventory status of the source inventory node.
[0066] Furthermore, for batch allocations, quantity matching is performed according to the chronological order of business transactions. The earlier the target inventory node increase event occurs, the more likely it is to occupy the already formed decrease quantity from the source inventory node. For example, if the source node corresponding to the same allocation association identifier has already decreased by 100 units, and the target node subsequently registers increases of 60 and 50 units, then all 60 units in the first target increase event are valid, only 40 units in the second target increase event are valid, and the remaining 10 units are temporarily not included in the target node's planned inventory increase. When the source node subsequently generates another decrease quantity corresponding to the same allocation association identifier, matching continues from the unmatched target increase quantity.
[0067] Furthermore, considering the interplay between candidate inventory rollover, allocation quantity matching, and negative inventory gap propagation, and the potential for mismatched allocation quantities or demand gaps to be repeatedly counted in decentralized calculations, this embodiment first calculates the effective planned inventory increase, and then uniformly generates the inventory conservation quantity. The effective planned inventory increase includes non-allocation types of purchase receipts, returned goods receipts, and inventory surplus receipts, as well as allocation receipts confirmed through quantity reduction matching at the source node. The inventory conservation quantity is calculated using the following formula: in, Indicates the first The inventory conservation quantity for each predicted time slice, in units of pieces. Indicates the first The initial inventory for each forecast time slice is derived from the verification result of the previous forecast time slice or the reconstructed inventory at the end of the inventory state sequence corresponding to the first forecast time slice, and is expressed in units of pieces. Indicates the first The effective planned increase in inventory for each forecast time slice includes both non-transferable inventory increases and transfer increases confirmed through transfer matching, in units of pieces. Indicates the first The planned reduction in inventory for each forecast time slice includes the quantity of goods shipped out for sales, damaged goods shipped out, goods shipped out for inventory shortages, and goods transferred out from source inventory nodes, in units of pieces. Indicates the first The forecast outbound demand for each forecast time slot includes the outbound demand obtained based on the forecast net demand and the fulfillment ratio, as well as the quantity of unfulfilled demand allocated to that time slot, in units of pieces. This indicates the prediction time slice number, which in this embodiment ranges from 1 to 72.
[0068] This formula is used to re-perform a closed-loop quantity calculation for each forecast time slice after the effective increase in allocation has been determined. When the inventory conservation quantity is inconsistent with the previously generated candidate ending inventory quantity, the candidate ending inventory quantity is replaced with the inventory conservation quantity, and the beginning inventory quantity for the next forecast time slice is re-determined based on the replacement result.
[0069] Furthermore, when the inventory balance is not less than 0, this inventory balance is determined as the forecast available inventory for the current forecast time slice, the demand gap is set to 0, and the forecast available inventory is carried over to the beginning inventory for the next forecast time slice. When the inventory balance is less than 0, the forecast available inventory for the current forecast time slice is set to 0, the absolute value of the inventory balance is determined as the demand gap, and 0 is carried over to the beginning inventory for the next forecast time slice. Simultaneously, the demand gap is added to the forecast outbound demand for the next forecast time slice. The demand gap formed in the last forecast time slice is no longer carried over to outside the target period but is recorded as unmet demand at the end of the target period.
[0070] Furthermore, both the conserved inventory quantity and the candidate ending inventory quantity are precisely compared using integers representing the number of garment pieces. A discrepancy is considered inconsistent if the difference between the two quantities is not zero, and no fuzzy tolerance is set. When an inconsistency occurs, the system records the original candidate ending inventory quantity, the conserved inventory quantity, the replacement time, and the planned increase events, planned decrease events, and demand characterization records involved in the current calculation. This record is used to distinguish quantity differences caused by event rewriting, changes in allocation matching status, or outdated recursive cache, ensuring that the inventory forecast version has an auditable source of quantity.
[0071] Furthermore, when a new inventory change event or a new order fulfillment event is written, the system determines the recalculation starting point based on the business time of the new event. If the new event's business time is before the forecast starting point, the inventory state sequence is regenerated from its insertion position in the business timeline, and the affected demand change representation and all subsequent forecast time slices are updated sequentially. If the new event's business time is within the target time period, the recalculation begins from its respective forecast time slice. If the new event's business time is later than the target time period, it is stored in the subsequent planned event set and does not trigger a recalculation for the current target time period. The inventory forecast version identifier is formed by combining the apparel inventory object identifier, inventory node identifier, forecast starting point, generation time, and incrementing version number. Each time a recalculation occurs at the same forecast starting point, the version number increments by 1.
[0072] Furthermore, the apparel inventory forecast results use the apparel inventory object identifier, inventory node identifier, and forecast time slice as a composite index. Each result includes at least the start and end times of the forecast time slice, the forecast available inventory quantity, the demand gap, the effective planned increase in inventory, the planned decrease in inventory, the forecast outbound demand, the inventory conservation check status, the allocation matching status, and the inventory forecast version identifier. When multiple inventory forecast versions exist for the same composite index, the current version with the largest version number is read by default, while retaining the input event range, generation time, and replacement relationship corresponding to the old version to support version tracking and management information querying in the apparel inventory forecasting process.
[0073] It should be noted that this step does not deduct the predicted demand from the current inventory all at once. Instead, it incorporates planned inventory changes, fulfillment outbound demand, pending fulfillment demand, and cross-node transfer events into continuous forecast time slices, recursively pushing them over time. In each time slice, transfer quantity matching and inventory conservation checks are re-executed. When the inventory conservation quantity is negative, it is converted into both the predicted available inventory and the demand gap, avoiding the situation where negative inventory simultaneously carries the dual meanings of physical inventory status and unmet demand. By combining the recalculation of affected locations triggered by new events with version identification, the dynamic forecast results still maintain quantity closure and version traceability.
[0074] Example 2, an embodiment of the present invention, provides a dynamic prediction system for apparel inventory based on big data analysis, including an inventory event sequencing module, a demand reliability correction module, and an inventory conservation prediction module.
[0075] The inventory event sequencing module is used to obtain inventory change events and order fulfillment events, merge them by apparel inventory object identifier, sort them by business time and write time, and generate an inventory status sequence.
[0076] The Demand Reliability Correction Module is used to perform big data analysis on the inventory status sequence, construct a demand change representation and an inventory reliability representation, and correct the demand change representation according to the inventory reliability representation.
[0077] The inventory conservation forecasting module is used to extrapolate inventory turnover on a time-by-time basis based on the corrected demand change characteristics, verify the extrapolation results according to the inventory conservation relationship, and generate apparel inventory forecast results.
Claims
1. A method for dynamic forecasting of apparel inventory based on big data analysis, characterized in that, include: Acquire inventory change events and order fulfillment events, merge them by apparel inventory object identifier, sort them by business time and write time, and generate an inventory status sequence; Perform big data analysis on the inventory status sequence to construct a demand change representation and an inventory reliability representation, and correct the demand change representation according to the inventory reliability representation; Based on the corrected demand change characteristics, inventory turnover is extrapolated for each time period. The extrapolation results are verified according to the inventory conservation relationship to generate apparel inventory forecast results.
2. The method for dynamic prediction of apparel inventory based on big data analysis as described in claim 1, characterized in that: The acquisition of inventory change events and order fulfillment events includes, Combine the style number, color code, and size code according to the preset field order to generate a clothing inventory object identifier; The clothing inventory object identifier, inventory node identifier, inventory change type, inventory change quantity, balance quantity, business time, write time, execution status and transfer association identifier are obtained from the clothing inventory ledger to form an inventory change event. The inventory change type is divided into inventory increase type and inventory decrease type. The order fulfillment record contains the apparel inventory object identifier, fulfillment node identifier, order quantity, fulfilled quantity, canceled quantity, business time, and write time, which are used to form an order fulfillment event. By mapping the fulfillment node identifier to the inventory node identifier, inventory change events and order fulfillment events can be associated according to the apparel inventory object identifier, inventory node identifier, and time relationship.
3. The method for dynamic prediction of apparel inventory based on big data analysis as described in claim 2, characterized in that: The generated inventory status sequence includes, Inventory change events and order fulfillment events are grouped according to the clothing inventory object identifier and inventory node identifier, and business time sequence and write time sequence are established according to business time and write time respectively within each group; For inventory change events, the apparel inventory object identifier, inventory node identifier, inventory change type, inventory change quantity, business time, and transfer association identifier are combined into an inventory event fingerprint; For order fulfillment events, the apparel inventory object identifier, inventory node identifier, order quantity, fulfilled quantity, canceled quantity, and business time are combined to form a fulfillment event fingerprint; When inventory event fingerprints are the same or fulfillment event fingerprints are the same, retain the event with the earliest write time and delete the rest of the events with the same event fingerprints; From the completed inventory change events before the forecast start point, select the inventory change event with the business time closest to the forecast start point, and determine the inventory quantity in the selected inventory change event as the starting inventory quantity. The starting inventory quantity is determined by the remaining inventory quantity after the selected inventory change event is processed. Starting from the first completed inventory change event after the selected inventory change event in the business time sequence, subsequent completed inventory change events are read sequentially. The inventory change quantity corresponding to the inventory increase type is accumulated, and the inventory change quantity corresponding to the inventory decrease type is deducted to generate the reconstructed inventory quantity for each business time node. When the business time of an inventory change event or an order fulfillment event is earlier than the write time, and the business time is before the already generated business time node, the corresponding event is identified as a late event, the business time is inserted according to the business time of the corresponding event, and the reconstructed inventory quantity or order fulfillment quantity of subsequent business time nodes is recalculated from the insertion position. Compare the order of the same event in the business time sequence and the write time sequence, and calculate the time interval between the corresponding business time and the write time to generate an event delay sequence; The reconstructed inventory quantity, inventory change events, order fulfillment events, and event delay sequences of each business time node are associated according to the apparel inventory object identifier and inventory node identifier to generate an inventory status sequence.
4. The method for dynamic prediction of apparel inventory based on big data analysis as described in claim 3, characterized in that: The big data analysis of the inventory status sequence includes, Read the order quantity, fulfilled quantity, and canceled quantity from the order fulfillment events in the inventory status sequence, and subtract the canceled quantity from the order quantity to generate the net order demand quantity; The net order demand quantity is reduced by the fulfilled quantity to generate the unfulfilled demand quantity, and the unfulfilled demand quantity is set to zero when the deduction result is less than zero. The net demand quantity, fulfilled quantity, and pending demand quantity are aggregated into a continuous analysis period according to the business time, generating a net demand sequence, a fulfilled quantity sequence, and a pending demand sequence; The continuous analysis period is divided into the first analysis window, and the first analysis windows with continuous time are combined into the second analysis window; Calculate the difference in net order demand between adjacent analysis periods within the same first analysis window to generate a local demand change sequence; Sort the net demand quantities of orders with the same time position in each of the first analysis windows in the second analysis window, and select the net demand quantity of orders corresponding to the median position in the sort to generate a periodic demand baseline sequence. A fulfillment ratio sequence is generated based on the correspondence between the net order demand quantity and the fulfilled quantity, and the unfulfilled demand quantity is accumulated according to the business time to generate an unfulfilled demand accumulation sequence. The local demand change sequence, the cyclical demand baseline sequence, the fulfillment ratio sequence, and the cumulative sequence of unfulfilled demand are time-aligned to generate a demand change representation.
5. The method for dynamic prediction of apparel inventory based on big data analysis as described in claim 4, characterized in that: The demand change characterization corrected by inventory reliability characterization includes, Read the reconstructed inventory quantity and the remaining inventory quantity in the corresponding inventory change event for each business time node from the inventory status sequence, calculate the difference between the reconstructed inventory quantity and the remaining inventory quantity, and generate the inventory status residual. The event latency is generated by reading the difference in the order of each event in the business timing sequence and the write timing sequence, as well as the time interval between the business time and the write time, from the event latency sequence. For delayed inventory change events, calculate the cumulative number of corresponding inventory changes that propagate from the insertion point to subsequent business time nodes, and generate the delayed event propagation volume; Based on the clothing inventory object identifier, inventory node identifier, and first analysis window, the absolute value of inventory status residual, event delay amount, and late event propagation amount are collected respectively. Based on the absolute value of the inventory status residual, the event delay, and the late event propagation amount within each first analysis window, generate the corresponding window-level inventory status residual index, window-level event delay index, and window-level late event propagation index for each first analysis window. Among multiple first analysis windows contained in the same second analysis window, the window-level inventory status residual index, the window-level event delay index, and the window-level late event propagation index are sorted in ascending order to determine the normalized percentile of the current first analysis window in the three sorts. Calculate the average of the three normalized percentiles, and subtract the average from 1 to obtain the inventory confidence weight for the current first analysis window. The inventory status residual, event delay, late event propagation, and inventory credibility weights are combined to generate an inventory credibility representation. Based on business time, the inventory reliability weight is associated with the local demand change sequence, cyclical demand benchmark sequence, fulfillment ratio sequence, and cumulative demand to be fulfilled sequence in the demand change representation; The retention share of the local demand change sequence in the corrected demand quantity is determined based on the inventory reliability weight, and the introduction share of the cyclical demand benchmark sequence in the corrected demand quantity is determined based on the complement of the inventory reliability weight, thus generating the corrected demand change sequence. When a late order fulfillment event is inserted into the business sequence, the corresponding fulfilled quantity is reassigned to its first analysis window according to the business time of the late order fulfillment event, and the fulfillment ratio and the accumulated amount of pending fulfillment demand in the corresponding first analysis window are recalculated. Under the condition that the total net order demand remains unchanged within the same second analysis window, the corrected demand change sequence, the recalculated fulfillment ratio, and the accumulated demand to be fulfilled are combined to generate a corrected demand change representation.
6. The method for dynamic prediction of apparel inventory based on big data analysis as described in claim 5, characterized in that: The time-period deduction of inventory turnover based on the corrected demand change characterization includes, The target period following the forecast start point is divided into sequential forecast time slices, and the reconstructed inventory quantity at the end of the inventory status sequence is determined as the initial inventory quantity of the first forecast time slice. Filter inventory change events from those with a confirmed execution status and whose business time falls within the target time period, and then allocate the filtered inventory change events to the corresponding forecast time slices according to the business time. Based on the type of inventory change, the inventory change quantity corresponding to the type of inventory increase within each forecast time slice is aggregated into the planned increase in inventory quantity, and the inventory change quantity corresponding to the type of inventory decrease is aggregated into the planned decrease in inventory quantity. Read the corrected demand quantity corresponding to each forecast time slice from the corrected demand change representation, and determine the corrected demand quantity as the forecast net demand quantity for the corresponding forecast time slice. Based on the corrected fulfillment ratio, the predicted net demand is converted into the predicted outbound demand, and the accumulated demand to be fulfilled is added to the predicted outbound demand of the corresponding prediction time slice according to the order of business time. Add the beginning inventory to the planned increase in inventory, and then subtract the planned decrease in inventory and the predicted outbound demand in sequence to generate the candidate ending inventory for the current forecast time slice. The candidate ending inventory of the current forecast time slice is passed to the next forecast time slice as the candidate beginning inventory of the next forecast time slice, and the inventory projection results of each forecast time slice are generated in sequence. When a new inventory change event or a new order fulfillment event is written, the affected business time node or forecast time slice is determined based on the business time of the new event. The inventory status sequence, the corrected demand change representation, and the inventory projection results are regenerated from the affected position, and an inventory forecast version identifier is configured for the regenerated inventory projection results.
7. The method for dynamic prediction of apparel inventory based on big data analysis as described in claim 6, characterized in that: The generated apparel inventory forecast results include, For each forecast time slice, the corresponding beginning inventory is added to the planned increase in inventory, and the planned decrease in inventory and the forecasted outbound demand are subtracted to generate the inventory conservation quantity. The conserved inventory quantity is compared with the corresponding candidate ending inventory quantity. When the two are inconsistent, the candidate ending inventory quantity is replaced with the conserved inventory quantity, and the replaced conserved inventory quantity is passed to the next forecast time slice. For inventory change events with the same transfer association identifier, the inventory reduction quantity of the source inventory node is matched with the inventory increase quantity of the target inventory node; When the two are inconsistent, the unmatched inventory increase quantity will not be included in the planned increase inventory quantity of the target inventory node, and the inventory decrease quantity that has already occurred in the source inventory node will be retained in the planned decrease inventory quantity; When the inventory conservation quantity is less than zero, the predicted available inventory quantity is set to zero, the absolute value of the inventory conservation quantity is set as the demand gap quantity, and the demand gap quantity is passed on to the predicted outbound demand quantity of the next forecast time slice. When the inventory conservation quantity is not less than zero, the inventory conservation quantity is determined as the predicted available inventory quantity, and the demand gap is determined as zero. Based on the apparel inventory object identifier, inventory node identifier, and forecast time slice, the available inventory quantity, demand gap quantity, and inventory forecast version identifier are combined to generate the apparel inventory forecast result.
8. A dynamic inventory forecasting system for apparel based on big data analysis, employing the dynamic inventory forecasting method for apparel based on big data analysis as described in any one of claims 1 to 7, characterized in that: Includes an inventory event sequencing module, a demand reliability correction module, and an inventory conservation forecasting module; The inventory event sequencing module is used to obtain inventory change events and order fulfillment events, merge them according to the clothing inventory object identifier, sort them according to the business time and the write time, and generate an inventory status sequence. The demand credibility correction module is used to perform big data analysis on the inventory status sequence, construct demand change representation and inventory credibility representation, and correct the demand change representation according to the inventory credibility representation. The inventory conservation forecasting module is used to extrapolate inventory turnover on a time-by-time basis based on the corrected demand change characterization, verify the extrapolation results according to the inventory conservation relationship, and generate apparel inventory forecast results.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method for dynamic prediction of clothing inventory based on big data analysis as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for dynamic prediction of clothing inventory based on big data analysis as described in any one of claims 1 to 7.