Method and system for dynamic early warning of department store inventory based on edge computing
Patent Information
- Application Number
- CN202611130357.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]针对以上问题,本申请提供基于边缘计算的百货库存动态预警方法及系统,用于至少解决如何在促销期库存模拟任务量差异和边缘节点负载不均条件下,对库存模拟任务进行拆解、调度并汇总全盘库存预测结果的问题
通过历史销售数据与促销信息生成初始促销热度,能够使库存模拟任务量与门店促销影响程度建立对应关系,避免库存模拟任务仅按照固定门店数量或商品数量分配。
Smart Images

Figure CN122928215A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, specifically relating to a method and system for dynamic early warning of department store inventory based on edge computing. Background Technology
[0002] In department store retail inventory management, sales records, inventory records, promotional configurations, store traffic, and merchandise transaction data are typically continuously collected in the form of industrial big data to support inventory consumption forecasting and inventory risk assessment during promotional periods. Related technologies usually upload data from each store to a central server, which then performs unified sales statistics, inventory forecasting, or promotional activity analysis. Some solutions also distribute computational tasks to edge nodes on the store side to reduce the centralized computing pressure on the central server.
[0003] In practical applications, promotional activities can cause significant differences in sales fluctuations across different stores and products. If inventory simulation tasks are generated according to fixed rules, it's easy to under-report inventory consumption in stores with high promotional activity or generate unnecessary simulation tasks for stores with low promotional activity. Furthermore, the CPU, GPU, memory, disk read / write, and network bandwidth conditions of edge nodes at different stores are inconsistent, and the number of concurrent threads and bandwidth utilization will continuously change during operation. If tasks are allocated solely based on the number of stores or products without considering the real-time load status of edge nodes, it's easy for some nodes to experience task backlog and increased queuing delays, while other nodes still have available resources. Moreover, existing task allocation methods often lack coordinated processing for breaking down overloaded node tasks and matching idle node resource redundancy, making it difficult to timely aggregate local prediction results into overall inventory prediction results, affecting the timeliness and consistency of inventory warning data generation during promotional periods. Summary of the Invention
[0004] To address the above issues, this application provides a method and system for dynamic early warning of department store inventory based on edge computing, which is used to at least solve the problem of how to decompose, schedule and summarize the overall inventory prediction results under the conditions of different inventory simulation task volume during the promotion period and uneven load on edge nodes.
[0005] To achieve the above objectives, the technical solution adopted in this application is as follows: Firstly, this application provides a method for dynamic early warning of department store inventory based on edge computing, the method comprising: Historical sales data and promotional information are obtained, and the initial promotional popularity is calculated using the random forest algorithm. Determine the simulated inventory task quantity based on the initial promotional enthusiasm; The initial node load is determined based on edge node resources, the number of concurrent threads, and bandwidth utilization. The peak load rate and queuing delay are obtained when the initial node load meets the overload condition, and the resource redundancy is obtained when the initial node load meets the idle condition. Based on the peak load rate and queuing delay, the inventory simulation task volume is broken down to obtain sub-inventory simulation tasks, and the target scheduling node is determined by clustering resource redundancy. The sub-inventory simulation tasks are sent to the target scheduling node for parallel processing to obtain local prediction results, which are then aggregated into the overall inventory prediction results.
[0006] Secondly, this application provides a department store inventory dynamic early warning system based on edge computing, used to implement a department store inventory dynamic early warning method based on edge computing. The system includes: The popularity determination module is used to obtain historical sales data and promotional information, and to obtain the initial promotional popularity through the random forest algorithm; The task determination module is used to determine the simulated inventory task quantity based on the initial promotional popularity; The load determination module is used to determine the initial node load based on edge node resources, the number of concurrent threads, and bandwidth utilization. The status acquisition module is used to acquire the peak load rate and queuing delay when the initial node load meets the overload condition, and to acquire the resource redundancy when the initial node load meets the idle condition. The scheduling determination module is used to break down the inventory simulation task volume into sub-inventory simulation tasks based on the peak load rate and queuing delay, and to cluster the resource redundancy to determine the target scheduling node. The prediction and aggregation module is used to send sub-inventory simulation tasks to the target scheduling node for parallel processing, obtain local prediction results, and aggregate them into overall inventory prediction results.
[0007] Compared with existing technologies, the advantages and beneficial effects of this application are as follows: By generating initial promotional momentum using historical sales data and promotional information, a correlation can be established between the inventory simulation task volume and the degree of impact of store promotions, avoiding the allocation of inventory simulation tasks based solely on a fixed number of stores or products.
[0008] Determining the initial node load by considering edge node resources, concurrent thread count, and bandwidth utilization allows for the integration of hardware infrastructure capabilities and current operational pressure into the same load assessment framework, enabling subsequent task scheduling to be based on factors beyond static device configuration.
[0009] By obtaining the peak load rate and queuing delay when the initial node load meets the overload condition, the edge nodes that need to be dismantled for inventory simulation tasks can be identified; by obtaining the resource redundancy when the idle condition is met, the edge nodes that can undertake sub-inventory simulation tasks can be identified.
[0010] By breaking down the inventory of simulated tasks based on peak load rate and queuing delay, and clustering resource redundancy to determine target scheduling nodes, the task breakdown results of overloaded nodes can be matched with the resource carrying capacity of idle nodes.
[0011] By sending sub-inventory simulation tasks to the target scheduling node for parallel processing and aggregating local prediction results, data output for overall inventory prediction can be generated. Attached Figure Description
[0012] Figure 1 This is a flowchart illustrating the method described in this application; Figure 2 This is a block diagram of the module combination of the system in this application. Detailed Implementation
[0013] To enable those skilled in the art to better understand the technical solution, the present application will be described in detail below with reference to the embodiments. The description in this section is only exemplary and explanatory, and should not be used to limit the scope of protection of the present application in any way.
[0014] In the scenario of dynamic inventory early warning in department stores, edge computing is not simply a replacement for central servers for local computation. Instead, it transforms the industrial big data continuously generated by the store side, such as sales, promotions, inventory, and node operating status, into executable inventory simulation tasks and node load judgment criteria. Store edge nodes not only handle local data access and preliminary calculations but also participate in cross-node task collaboration, freeing inventory prediction from complete queuing and processing at the central end. Based on this approach, promotional popularity, inventory simulation task volume, edge node computing power status, and network occupancy status can be incorporated into the same processing chain. By identifying node overload and idle nodes, inventory simulation tasks in high-load nodes are decomposed into sub-tasks and scheduled to target nodes with resource redundancy for parallel processing. Therefore, this application constructs a dynamic inventory early warning processing flow suitable for department store promotion scenarios, focusing on the generation, load judgment, task decomposition, resource matching, and prediction result aggregation of inventory simulation tasks in an edge computing environment.
[0015] like Figure 1 As shown, a method for dynamic early warning of department store inventory based on edge computing includes the following processing steps.
[0016] The inventory dynamic early warning platform receives historical sales data and current promotional information from stores. Historical sales data is provided by sales terminals, the inventory management platform, and member transaction records, while current promotional information is provided by the activity configuration platform. The platform merges data from different sources into a promotional analysis dataset using store number, product number, and sales time as correlation fields, and checks for missing, duplicate, and obviously abnormal data records. After data processing, the platform extracts sales features reflecting the degree of promotional impact from the promotional analysis dataset and inputs the processed features into a random forest algorithm for prediction, obtaining initial predicted values. The platform determines the initial promotional intensity based on the comparison between the initial predicted values and a predicted value threshold. This initial promotional intensity is used to enter the inventory simulation task quantity determination stage.
[0017] In one embodiment, historical sales data can be organized by store, product, and time window. Each record includes at least the store number, product number, sales time, sales quantity, transaction price, return quantity, and inventory deduction status. Promotional information can include the scope of promotional products, promotional price, activity start time, activity end time, participating store scope, and activity type. After receiving the above data, the inventory dynamic early warning platform first establishes a correspondence between sales records and promotional configurations according to the store number and product number, and then determines whether the sales record falls within the promotional activity period according to the sales time, thereby forming a promotional analysis dataset for each store. For data records lacking a store number, product number, or sales time, the platform marks them as invalid records and does not participate in subsequent promotional popularity calculations; for data records with negative sales quantities, empty transaction prices, repeated occurrences of the same transaction, or sales times significantly exceeding the store's operating hours, the platform removes them as abnormal records. If there are only a few missing sales records within a certain time window, and the same product in the same store has valid sales records in adjacent time windows, the platform can fill in the missing sales records based on the valid records in adjacent time windows, and retain the data source mark in the filled records for subsequent traceability.
[0018] After generating the standard sales feature set, the platform extracts the discount rate and customer traffic. The discount rate characterizes the degree of price reduction of the current promotional price relative to the historical benchmark price, which can be determined by the distribution of transaction prices for the same product in the same store during non-promotional periods. Customer traffic characterizes the activity level of consumer demand in the store during promotional periods, and can be determined by store visit counts, transaction counts, or member access records. Since the discount rate and customer traffic have different numerical ranges, the platform needs to normalize these two types of features to ensure that features from different stores and products are included in the same prediction scale. The normalization boundary can be determined by the feature distribution of each store within the same promotional batch, or by the feature distribution of several recent similar promotional activities. If the customer traffic data for a particular store is abnormal, the platform can use the transaction count as a substitute input and write the substitute input marker into the normalized promotional feature set to avoid misidentifying a data collection failure as low promotional activity.
[0019] After the normalized promotional feature set is input into the random forest algorithm, each decision tree in the random forest algorithm outputs the predicted value of the store under the current promotional conditions based on the discount rate, customer traffic, and historical sales change records. The platform summarizes the predicted values output by each decision tree to form the initial predicted value. The predicted value threshold can be determined based on the distribution of sales conversion levels in historical promotional activities, or it can be adjusted in conjunction with the activity level configured by the operations staff. If the initial predicted value is greater than the predicted value threshold, the platform marks the promotional impact of the corresponding store as high, forming a high initial promotional heat; if the initial predicted value does not exceed the predicted value threshold, the platform marks the promotional impact of the corresponding store as low, forming a low initial promotional heat. The initial promotional heat is bound and stored with the store number, product number, and promotional time window, serving as input for subsequently determining the inventory simulation task volume, enabling the inventory simulation task to be allocated to the corresponding store and corresponding product according to changes in promotional demand.
[0020] The inventory dynamic early warning platform receives the initial promotional heat generated in the previous stage and binds it with the store number, product number, and promotional time window. Based on the promotional heat, the platform determines the amount of simulated inventory tasks that each store needs to perform within the current time window. This simulated inventory task amount represents the scale of tasks that need to be simulated for inventory consumption. Simultaneously, the platform reads edge node resources, generates a task matching degree based on the carrying capacity relationship between the simulated inventory task amount and the edge node resources, and determines the task allocation amount based on the task matching degree. The task allocation amount is written to the node task queue and passed to the initial node load determination stage.
[0021] In one embodiment, the inventory dynamic early warning platform can generate task records based on the initial promotional activity level, categorized by store and product. Each task generation record includes at least the store number, product number, promotional time window, initial promotional activity level, current baseline inventory level, and task generation time. The initial promotional activity level characterizes the impact of the promotional activity on inventory consumption fluctuations. The current baseline inventory level, retrieved from the inventory management platform, is used to ensure that the inventory simulation task does not deviate from the actual inventory state. The platform determines the inventory simulation task volume based on the activity level range to which the initial promotional activity level belongs. This range can be determined based on the distribution of inventory consumption fluctuations in historical promotional activities or adjusted according to the activity level configured by the operations staff. Stores and products with higher activity levels require coverage of more inventory consumption scenarios, thus generating larger inventory simulation task volumes; stores and products with lower activity levels maintain smaller inventory simulation task volumes to avoid ineffective computational overhead at edge nodes.
[0022] Edge node resources represent the resource base that a store's edge computing node can use to handle inventory simulation tasks within the current scheduling cycle. This includes the number of CPU cores, GPU memory, available memory capacity, and disk read / write speed. After reading the edge node resources, the platform performs a task capacity check process, combining the inventory simulation task volume with the edge node resources to determine if the current task size matches the node's capacity. Task matching degree indicates the suitability of allocating inventory simulation tasks to edge nodes. This is determined based on factors including task size, available computing resources on the node, node storage read / write capacity, and resources already used within the current scheduling cycle. If resource data for a particular edge node is missing, the platform can use the most recently collected valid value for matching calculations and mark that node as a resource-pending node. Resource-pending nodes are not considered high-priority nodes.
[0023] The platform generates task allocation quantities based on task matching scores. These quantities represent the scale of inventory simulation task allocation on edge nodes and can be recorded as store number, product number, edge node number, number of assigned tasks, and scheduling time window. For edge nodes with high task matching scores, the platform allows for larger task allocation quantities; for edge nodes with low matching scores, the platform reduces the allocation quantity or postpones the allocation of new tasks to that node. After generating the task allocation quantities, the platform writes them to the pending task queue and synchronously passes them to the node load calculation process. The node load calculation process further determines the initial node load based on the task allocation quantities, inventory simulation task volume, and edge node resources, ensuring that the task scale generated by the promotion demand side aligns with the actual load capacity of the edge computing side.
[0024] After obtaining the inventory simulation task volume, the inventory dynamic early warning platform reads the resource status and operational status of each store's edge nodes. Resource status is composed of the number of CPU cores, GPU memory, available memory capacity, and disk read / write speed, while operational status is composed of the number of concurrent threads and bandwidth utilization. When quantifying resource status, the platform first standardizes and verifies the validity of the units for CPU cores, GPU memory, available memory capacity, and disk read / write speed. CPU cores and GPU memory reflect the basic computing power of the edge nodes; available memory capacity reflects the data cache space that the inventory simulation task can occupy during operation; and disk read / write speed reflects the capacity to handle historical sales data, promotional information, and simulation results during local read / write operations. The platform converts these resource indicators to the same evaluation scale and uses principal component analysis to extract the resource components that have a significant impact on the capacity of the inventory simulation task, forming the hardware basic computing power. The hardware basic computing power represents the basic processing capacity of the edge nodes without considering current task concurrency and network transmission load, and serves as the basis for subsequent computing power adjustments.
[0025] When generating the computing power conversion factor, the platform reads the number of concurrent threads and bandwidth utilization within the same scheduling cycle. The number of concurrent threads reflects the scale of tasks currently being executed or waiting to be executed by the edge node, while the bandwidth utilization reflects the degree to which network transmission resources are currently being used by the edge node. The platform compares the number of concurrent threads with the thread constraint benchmark and the bandwidth utilization with the bandwidth constraint benchmark, and determines the computing power conversion factor based on the comparison results. The thread constraint benchmark can be determined based on the maximum number of threads that the edge node can handle during its historical stable operation, while the bandwidth constraint benchmark can be determined based on the store's network bandwidth limit, task result feedback time limit, and data transmission requirements during promotional periods. If the number of concurrent threads is close to the thread constraint benchmark, or the bandwidth utilization is close to the bandwidth constraint benchmark, the platform reduces the computing power conversion factor, thus reducing the hardware's basic computing power within the current scheduling cycle. If both the number of concurrent threads and the bandwidth utilization are within the carrying capacity range, the platform maintains a high computing power conversion factor, allowing the edge node to continue to undertake inventory simulation tasks. After the computing power conversion factor is generated, it enters the current store's computing power calculation process along with the hardware's basic computing power.
[0026] The hardware's basic computing power is adjusted using a computing power conversion factor to form the current store's computing power. The platform matches and calculates the inventory simulation task volume with the current store's computing power to obtain the initial node load. The initial node load is then passed to the overload and idle state judgment stage.
[0027] In one embodiment, edge node resources are collected by a resource monitoring program deployed on the store side. The number of CPU cores characterizes the parallel capability of the edge node to perform general computing tasks; the graphics processing unit (GPU) memory characterizes the available GPU memory space when the edge node undertakes parallel inventory simulation or model calculations; the available memory capacity characterizes the memory space that task data, intermediate features, and simulation outputs can occupy during runtime; and the disk read / write speed characterizes the read / write capability of historical sales data, promotional information, and simulation results when accessed locally. The platform establishes resource records using the edge node number as an index, and each resource record is bound to a collection time window to avoid mixing resource states from different time windows.
[0028] Before resource records enter the quantification phase, the platform standardizes units and verifies the validity of four types of resource indicators. The number of CPU cores and GPU memory are hardware configuration indicators, which typically remain stable over a longer period; available memory capacity and disk read / write speed are runtime environment indicators, which need to be refreshed according to the scheduling cycle. If a hardware configuration indicator is missing, the platform reads the most recent valid configuration from the node registration information; if a runtime environment indicator is missing, the platform marks the corresponding edge node as a resource pending confirmation node and reduces the priority of the resource record in this round of load calculation. Resource pending confirmation nodes can still remain within the monitoring scope, but will not be used as high-priority task bearers.
[0029] The platform employs principal component analysis (PCA) to process the number of CPU cores, GPU memory, available RAM, and disk read / write speeds. During processing, the platform converts resource indicators of different dimensions to a unified scale and determines the primary resource components based on the distribution of resource indicators across edge nodes within the same scheduling cycle. These primary resource components reflect the resource directions that significantly impact the inventory simulation task's carrying capacity, such as computing resources, storage resources, or read / write resources. The platform generates basic hardware computing power based on these primary resource components. Basic hardware computing power represents the basic processing capacity that edge nodes can provide without considering the impact of current concurrent tasks and network occupancy. This basic hardware computing power, along with the edge node ID, store ID, and data collection time window, is stored and transferred to the computing power conversion stage for further refinement into the current store's computing power.
[0030] In one embodiment, the number of concurrent threads is collected by the edge node task scheduler to indicate the scale of task threads currently being executed or waiting to be executed by the edge node. Bandwidth utilization is collected by the network monitoring program to indicate the proportion of network transmission already occupied by the edge node within the scheduling cycle. The inventory dynamic early warning platform uses the number of concurrent threads and bandwidth utilization as operating status inputs and determines the computing power conversion factor based on the node's historical operating records. The computing power conversion factor is used to convert the hardware's basic computing power into the computing power level currently available for inventory simulation tasks. Its meaning is not the hardware configuration itself, but rather the converted proportion of hardware resources that can actually be released to inventory simulation tasks under the current operating pressure.
[0031] The constraint benchmark for the number of concurrent threads can be determined based on the maximum number of threads that the edge nodes can handle during stable operation. The constraint benchmark for bandwidth utilization can be determined based on the store's network bandwidth limit, the data transmission service level during promotions, and the task result feedback time limit. If the number of concurrent threads approaches or exceeds the thread constraint benchmark, the platform reduces the computing power conversion factor, reducing the hardware's basic computing power within the current scheduling cycle. If the bandwidth utilization remains at a high level, the platform also reduces the computing power conversion factor to avoid allocating a large number of subtasks to edge nodes where network transmission is already limited. If the number of concurrent threads is low and the bandwidth utilization is within a manageable range, the platform maintains a high computing power conversion factor, enabling edge nodes to handle more inventory simulation tasks.
[0032] The platform adjusts the hardware's basic computing power based on a computing power conversion factor to obtain the current store's computing power. The current store computing power represents the actual computing power level of the store's edge nodes that can be used to execute inventory simulation tasks within the current scheduling cycle. When generating the current store computing power, the platform simultaneously records the resource acquisition time and runtime status acquisition time involved in the calculation. If the resource acquisition time and runtime status acquisition time exceed the same scheduling cycle, the platform does not directly merge the two types of data. Instead, it waits for the next acquisition or calls the most recently valid synchronized sampling record to reduce load judgment bias caused by time asynchrony. After the current store computing power is generated, the platform transmits it along with the inventory simulation task volume to the initial node load calculation stage to determine whether the store's edge nodes have overload risk or idle space.
[0033] In one embodiment, before the inventory simulation task volume and current store computing power enter the initial node load calculation stage, the platform first constructs a computing power feature vector. This feature vector describes the combination relationship between task size and available node computing power. Data sources include the inventory simulation task volume, current store computing power, task allocation, edge node number, and scheduling time window. The inventory simulation task volume represents the scale of the simulated task to be executed in a promotional scenario; the current store computing power represents the processing capacity currently available to the edge node; and the task allocation indicates the allocation scale of the inventory simulation task volume relative to the edge node. The platform organizes the above data into a single feature record to avoid judging node load solely based on task size or computing power level.
[0034] The platform calculates task instruction throughput based on computing power feature vectors. Task instruction throughput represents the volume of task instructions that an edge node needs to process under the current task scale and the current store's computing power. The task instruction throughput can be set based on the average execution records of inventory simulation tasks during historical promotional periods, or on task execution statistics for similar products under similar promotional intensities. If abnormal data exists in the computing power feature vector, such as zero computing power for the current store, missing task allocation, or mismatched edge node numbers, the platform does not directly input the corresponding feature record into the load mapping matrix. Instead, it marks the corresponding edge node as a load-unconfirmed node and re-acquires complete data in the next scheduling cycle.
[0035] The load mapping matrix is used to map task instruction throughput to initial node load. The load mapping matrix is generated based on historical task instruction throughput, task completion time, queuing time, and node resource usage records. The mapping relationships in the matrix describe the impact of different task instruction throughputs on edge node load under different computing power levels. The platform performs matrix operations on the task instruction throughput and the load mapping matrix to obtain the initial node load. The initial node load is bound to the edge node number, store number, and scheduling time window for subsequent determination of whether the edge node meets overload or idle conditions. If the initial node load of the same edge node fluctuates significantly within multiple consecutive time windows, the platform retains the load record for each time window, avoiding overwriting historical records with a single load value, so that subsequent status judgments can be made based on the duration of continuous overload time windows or low-load stable periods.
[0036] The inventory dynamic early warning platform receives the initial node load generated in the previous stage and monitors its status according to the edge node number, store number, and scheduling time window. The platform compares the initial node load with the overload and idle thresholds, and determines the node status based on the duration of the continuous overload time window or the period of stable low-load conditions. Edge nodes meeting the overload condition enter the task decomposition preparation process, where the platform reads their peak load rate and queuing latency; edge nodes meeting the idle condition enter the resource capacity assessment process, where the platform reads their resource redundancy. These results are then passed to the subsequent task decomposition and target scheduling node determination stages.
[0037] In one embodiment, the inventory dynamic early warning platform samples the initial node load of each edge node at a fixed scheduling cycle. An overload judgment threshold is used to determine whether a node has approached or exceeded its stable carrying capacity boundary. This threshold can be set comprehensively based on task completion time, task queuing records, CPU utilization, memory usage, and network transmission status from the edge node's historical operation records. This threshold does not use fixed factory parameters but is configured in conjunction with historical operation samples of store edge nodes during promotional periods, allowing nodes from different stores to participate in the judgment according to their own carrying capacity. A continuous overload time window is used to eliminate false judgments caused by instantaneous fluctuations. Its length can be determined based on the maximum allowed waiting time for the inventory simulation task, the reserved calculation time before the start of the promotional activity, and the node status sampling cycle. Only when the initial node load exceeds the overload judgment threshold, and the duration of the overload reaches a time threshold, does the platform determine that the edge node as an overloaded node.
[0038] Once an edge node is identified as an overloaded node, the platform reads the peak load rate from the node monitoring program and the queuing delay from the task queue management program. The peak load rate reflects the highest pressure level reached by the node within the continuous overload time window, while the queuing delay reflects the waiting time between the entry of an inventory simulation task into the task queue and its commencement of execution. If the peak load rate is normal but the queuing delay is abnormally high, the platform marks the node as a queue-blocked node; if both data are high, the platform marks the node as a high-pressure task node. These markings are not directly used as the final output but are passed along with the peak load rate and queuing delay to the task decomposition stage to determine whether the inventory simulation task volume needs to be split and which scheduling queue the split sub-inventory simulation tasks will enter.
[0039] The idle threshold is used to determine whether an edge node has sufficient resources to handle external tasks. It can be set based on the average task load, available memory, network throughput, and disk read / write capacity during the node's idle period. The duration of the low-load period is used to confirm the stability of the node's low-load state. Its value can be determined based on the cross-node task transmission time and the minimum execution time of the inventory simulation task. Only when the initial node load is below the idle threshold and the low-load state duration reaches the duration threshold will the platform include the edge node in the idle node set. For the idle node set, the platform reads the resource redundancy. Resource redundancy represents the resource surplus that a node can handle for additional inventory simulation tasks while maintaining its original store business operation capabilities. Data sources include available computing resources, available memory, remaining network bandwidth, and the current task queue length. If resource redundancy data is missing, the platform retains the idle status record of the corresponding node but does not prioritize its scheduling. It will be re-collected and included in resource clustering in the next scheduling cycle.
[0040] The inventory dynamic early warning platform receives peak load rates and queuing delays from overloaded nodes, as well as resource redundancy from idle nodes. The platform compares the peak load rate with a load threshold and the queuing delay with a delay threshold. When both conditions are met, the platform uses time-sharding rules to break down the inventory simulation task into multiple sub-inventory simulation tasks. Time-sharding rules ensure that the decomposed tasks still retrieve results according to the original store, product, and time window. The platform performs K-means clustering analysis on resource redundancy to form resource clusters. When the centroid of a resource cluster exceeds a centroid threshold, the corresponding edge node is identified as the target scheduling node. The sub-inventory simulation tasks and target scheduling nodes are then jointly transmitted to the task sending and parallel prediction stages.
[0041] In one embodiment, the peak load rate comes from the node load monitoring records during the overload determination phase, and the queuing delay comes from the waiting time records of inventory simulation tasks in the task queue. The platform binds the peak load rate and queuing delay of the same edge node within the same scheduling time window to form the basis for overload task splitting. The load threshold can be determined based on the highest load rate that the edge node can bear during its historical stable operation, the latest completion time of the promotion task, and the node hardware protection strategy, and is used to determine whether the node is no longer suitable to continue to undertake complete inventory simulation tasks. The delay threshold can be determined based on the time window in which the inventory prediction results need to be returned, the historical waiting time of the task queue, and the reserved processing time before the start of the promotion activity, and is used to determine whether the task queuing has affected the prediction result generation time limit. The platform only splits the inventory simulation task volume when the peak load rate exceeds the load threshold and the queuing delay exceeds the delay threshold. If only the peak load rate exceeds the load threshold and the queuing delay does not exceed the delay threshold, the platform retains the original task queue and continues to monitor; if only the queuing delay exceeds the delay threshold and the peak load rate does not exceed the load threshold, the platform marks the corresponding node as a queue node to be checked, avoiding unnecessary splitting due to short-term task blocking.
[0042] The time-slicing rule breaks down the inventory simulation task volume according to the promotion time window. The platform establishes a task index based on store number, product number, promotion time window, and task batch number, dividing the original inventory simulation task volume into multiple continuous or discrete time-slice tasks. Each sub-inventory simulation task retains the source store number, product number, original task batch number, time slice start and end time, and result backfilling identifier. The result backfilling identifier is used to restore the local prediction results to the store, product, and time window corresponding to the original inventory simulation task in the subsequent aggregation stage, avoiding the inability to aggregate results after task decomposition. If the task size corresponding to a certain time slice still exceeds the carrying capacity of a single target scheduling node, the platform marks the time slice as a task to be further split and continues to subdivide it according to the same splitting rule in the next scheduling cycle; if the time slice task is smaller than the minimum executable task size, the platform can merge it with adjacent time slices to reduce the scheduling overhead caused by excessively small tasks.
[0043] Resource redundancy, derived from the idle node assessment phase, represents the remaining capacity of edge nodes after retaining their original store business capabilities. The platform inputs the resource redundancy of each idle node into the K-means clustering algorithm, determining the number of clusters based on the number of available nodes and resource distribution within the same scheduling cycle. After clustering, each resource cluster represents a group of edge nodes with similar resource reserves. The center value represents the overall carrying capacity of nodes within a resource cluster; the center threshold can be determined based on the minimum computing power requirements, network transmission requirements, and execution time requirements of the sub-inventory simulation task. When the center value of a resource cluster exceeds the center threshold, the platform extracts edge nodes from that cluster as target scheduling nodes. If multiple resource clusters exceed the center threshold, the platform prioritizes edge nodes with higher center values and lower allocated capacity. If no resource cluster meets the center threshold, the platform adds the sub-inventory simulation task to the scheduling queue and re-executes the clustering analysis after the next resource redundancy refresh. Once the target scheduling node is determined, the platform generates a task scheduling record and transmits the sub-inventory simulation task, the target scheduling node, and the result backfilling identifier to the parallel processing stage.
[0044] The inventory dynamic early warning platform receives the sub-inventory simulation tasks and target scheduling nodes generated in the previous stage, and reads the resource pool status of the target scheduling nodes within the current scheduling cycle. The resource pool status reflects the resource space that the target scheduling nodes can continue to undertake tasks. Based on the resource pool status, the platform divides the sub-inventory simulation tasks into multiple sub-task sets. The sub-task sets are sent to the target scheduling nodes for parallel processing via the edge communication network. After each target scheduling node completes its corresponding task, it returns a local prediction result. The platform clusters the local prediction results to form prediction clusters, and performs a global weighted calculation based on the prediction clusters to generate the overall inventory prediction result. The overall inventory prediction result is bound to the store, product, and promotion time window, and enters the inventory dynamic early warning output stage.
[0045] In one embodiment, the resource pool status is continuously maintained by the edge node management service during the scheduling cycle, primarily recording the available capacity and allocated capacity of the target scheduling node. Available capacity represents the resource space that the target scheduling node can still support inventory simulation tasks after preserving the local store's operational capabilities; it can be determined by available computing resources, available memory, remaining network bandwidth, and available disk read / write capabilities. Allocated capacity represents the scale of tasks already allocated to the target scheduling node but not yet completed; it can be determined by the number of unfinished subtasks in the task queue, the estimated task runtime, and the recorded occupied resources. The resource pool status is bound to the target scheduling node number, the collection time window, and the task batch number to prevent the mixing of node capacity across different scheduling cycles. If the available capacity of the target scheduling node is empty or the allocated capacity exceeds the carrying capacity limit, the platform will not send new subtask sets to the target scheduling node and will retain the corresponding sub-inventory simulation tasks in the pending sending queue.
[0046] When dividing the platform into subtask sets based on the resource pool status, it groups the sub-inventory simulation tasks according to their source store, product number, time slice identifier, and expected resource requirements. Each subtask set retains the original task batch number and result backfill identifier. The result backfill identifier is used to accurately aggregate the local prediction results returned by the target scheduling node to the store and time window corresponding to the original inventory simulation task volume. When dividing the subtask sets, the platform prioritizes ensuring that the expected resource requirements of a single subtask set do not exceed the available capacity of the target scheduling node, and that the total number of tasks already allocated to the same target scheduling node does not exceed the remaining space between the available capacity and the allocated capacity. If the expected resource requirements of a certain sub-inventory simulation task exceed the remaining space of all target scheduling nodes, the platform marks it as a task to be split and returns to the task splitting process for further splitting. If the resource requirements of multiple sub-inventory simulation tasks are small, the platform can merge tasks with adjacent source stores and time slices into the same subtask set to reduce the number of task sending.
[0047] After the subtask set is sent to the target scheduling node, the target scheduling node executes the inventory consumption simulation according to the task batch number and time slice identifier. During parallel processing, the target scheduling node reads the historical sales characteristics, promotional characteristics, baseline inventory quantity, and task time window carried by the subtask set, and generates partial prediction results. The partial prediction results include at least the source store, product number, time slice identifier, predicted consumption quantity, predicted remaining quantity, and task execution status. If the target scheduling node experiences network interruption, insufficient resources, or task execution timeout during execution, the platform marks the corresponding subtask set as an incomplete task and rereads the resource pool status to select another target scheduling node for retransmission. For completed partial prediction results, the platform performs reception verification according to the result backfill identifier, and proceeds to clustering processing after confirming that the source store, product number, and time slice identifier are consistent.
[0048] When clustering local prediction results, the platform uses the same store, the same product, and the same promotional time window as the basic aggregation scope, forming prediction clusters for local prediction results with similar predicted consumption and predicted remaining quantities. Prediction clusters are used to reduce the dispersion of results caused by different target scheduling nodes due to differences in task execution time, node load status, or sharding boundaries. After clustering, the platform determines the weights for global weighted calculation based on the number of results within each prediction cluster, the size of the source task, the resource status of the target scheduling node, and the execution status of the local prediction results. Local prediction results with larger task sizes, complete execution status, and stable source node resource status receive higher weights; local prediction results with retry records, execution timeout records, or missing data markers have lower weights. The platform completes global weighted calculation based on the prediction clusters to generate overall inventory prediction results, which are then written into the inventory dynamic early warning service. Overall inventory prediction results are used to generate inventory risk alerts, allocation suggestions, or replenishment triggers based on store, product, and promotional time window.
[0049] like Figure 2 As shown, a department store inventory dynamic early warning system based on edge computing includes the following modules.
[0050] The popularity determination module consists of a data interface, an edge processor, and a storage unit. The data interface receives historical sales data and promotional information from store sales terminals, inventory management platforms, and promotion configuration platforms; the storage unit caches sales records, promotional configurations, and random forest model parameters; and the edge processor calls the random forest model to perform feature calculations and prediction operations, and outputs the initial promotion popularity.
[0051] The task determination module consists of an edge processor, a task caching unit, and a task queue control unit. The edge processor is used to read the initial promotional heat and generate simulated inventory task quantities; the task caching unit is used to temporarily store task records formed by store, product, and time window; the task queue control unit is used to write the simulated inventory task quantities into the task queue to be assigned and to provide task size data for subsequent node load calculations.
[0052] The load determination module consists of a resource monitoring interface, an edge processor, and a runtime status acquisition unit. The resource monitoring interface is used to collect data on the number of CPU cores, GPU memory, available memory capacity, and disk read / write speed of the edge nodes; the runtime status acquisition unit is used to collect data on the number of concurrent threads and bandwidth utilization; and the edge processor is used to calculate the resources and runtime status of the edge nodes to form the initial node load.
[0053] The status acquisition module consists of a node monitoring unit, a task queue monitoring unit, and a resource statistics unit. The node monitoring unit is used to collect the peak load rate of edge nodes during the scheduling cycle; the task queue monitoring unit is used to collect the queuing delay of inventory simulation tasks; and the resource statistics unit is used to calculate the resource redundancy of edge nodes under low load conditions and transmit the peak load rate, queuing delay, and resource redundancy to the scheduling determination module.
[0054] The scheduling determination module consists of a task splitting processor, a clustering calculation unit, and a scheduling control unit. The task splitting processor is used to break down the inventory simulation task volume into sub-inventory simulation tasks based on peak load rate and queuing delay; the clustering calculation unit is used to perform cluster analysis on resource redundancy; and the scheduling control unit is used to determine the target scheduling node based on the clustering results and generate the scheduling relationship between the sub-inventory simulation tasks and the target scheduling node.
[0055] The forecasting and aggregation module consists of a communication interface, a parallel computing unit, and a result aggregation unit. The communication interface is used to send sub-inventory simulation tasks to the target scheduling node and receive the local forecast results returned by the target scheduling node; the parallel computing unit is used to execute the sub-inventory simulation tasks on the target scheduling node side; the result aggregation unit is used to collect, cluster, and weight the local forecast results to generate the overall inventory forecast result.
[0056] It should be noted that, in this document, the terms "comprising," "including," and any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Specific examples have been used in this document to illustrate the principles and implementation methods of the technical solutions of this application. The above examples are only for the purpose of helping to understand the methods and core ideas of this application. The above descriptions are merely preferred embodiments of this application. It should be pointed out that, due to the limitations of written expression and the objective existence of infinite specific structures, those skilled in the art can make several improvements, modifications, or changes without departing from the principles of this application, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes, or combinations, or the direct application of the concept and technical solutions of this application to other situations without modification, should all be considered within the scope of protection of this application.
Claims
1. A method for dynamic early warning of department store inventory based on edge computing, characterized in that, The method includes: Historical sales data and promotional information are obtained, and the initial promotional popularity is calculated using the random forest algorithm. The simulated inventory task quantity is determined based on the initial promotional enthusiasm. The initial node load is determined based on edge node resources, the number of concurrent threads, and bandwidth utilization. When the initial node load meets the overload condition, the peak load rate and queuing delay are obtained; when it meets the idle condition, the resource redundancy is obtained. Based on the peak load rate and the queuing delay, the inventory simulation task quantity is decomposed to obtain sub-inventory simulation tasks, and the target scheduling node is determined by clustering the resource redundancy. The sub-inventory simulation task is sent to the target scheduling node for parallel processing to obtain local prediction results, which are then aggregated into a total inventory prediction result.
2. The method according to claim 1, characterized in that, The process of obtaining historical sales data and promotional information, and then using a random forest algorithm to obtain the initial promotional popularity, includes: Outlier removal is performed on the historical sales data and promotional information to obtain a standard sales feature set; Extract the discount rate and customer traffic from the standard sales feature set, and normalize the discount rate and customer traffic to obtain a normalized promotion feature set; The normalized promotion feature set is processed using the random forest algorithm to obtain initial predicted values; The initial promotional intensity is determined based on the comparison between the initial predicted value and the predicted value threshold.
3. The method according to claim 2, characterized in that, The step of determining the simulated inventory task quantity based on the initial promotional popularity includes: Determine the heat range to which the initial promotional heat belongs, and determine the simulated inventory task quantity based on the heat range; The method further includes: The task matching degree is determined based on the simulated inventory task volume and the edge node resources; The task allocation amount is determined based on the task matching degree. The task allocation amount is used to indicate the allocation scale of the inventory simulation task amount relative to the edge node and serves as input for determining the initial node load.
4. The method according to claim 1, characterized in that, The determination of the initial node load based on edge node resources, concurrent thread count, and bandwidth utilization includes: The edge node resources are quantified to obtain the basic hardware computing power; The computing power conversion factor is determined based on the number of concurrent threads and the bandwidth utilization rate; The current store computing power is obtained by correcting the hardware's basic computing power using the computing power conversion factor. The initial node load is determined based on the inventory simulation task volume and the current store computing power.
5. The method according to claim 4, characterized in that, The edge node resources include the number of central processing unit cores, graphics processing unit memory, available memory capacity, and disk read / write speed. The quantization of the edge node resources to obtain the basic hardware computing power includes: Principal component analysis is used to process the number of CPU cores, the graphics processing unit memory, the available memory capacity, and the disk read / write speed to obtain the basic computing power of the hardware.
6. The method according to claim 4, characterized in that, The step of determining the initial node load based on the simulated inventory task volume and the current store computing power includes: The simulation task volume of the inventory and the current store computing power are used to extract features to obtain a computing power feature vector; Calculate the task instruction throughput based on the aforementioned computing power feature vector; The initial node load is obtained by performing matrix operations on the task instruction throughput and the load mapping matrix.
7. The method according to claim 1, characterized in that, The overload conditions include the initial node load being greater than a preset overload judgment threshold, and the continuous overload time window being greater than a preset time threshold. The idle conditions include that the initial node load is less than a preset idle determination threshold, and the duration of the low-valley stable period is greater than a preset duration threshold.
8. The method according to claim 1, characterized in that, The step of breaking down the inventory simulation task volume into sub-inventory simulation tasks based on the peak load rate and the queuing delay, and determining the target scheduling node by clustering the resource redundancy, includes: When the peak load rate is greater than a preset load threshold and the queuing delay is greater than a preset delay threshold, the inventory simulation task is decomposed using a time-slicing rule to obtain the sub-inventory simulation task. The resource redundancy was analyzed using the K-means clustering algorithm to obtain resource clusters. If the center value of the resource cluster is greater than a preset center threshold, the edge node corresponding to the resource cluster will be determined as the target scheduling node.
9. The method according to claim 1, characterized in that, The step of sending the sub-inventory simulation task to the target scheduling node for parallel processing, obtaining local prediction results, and summarizing them into a total inventory prediction result includes: Obtain the resource pool status, which indicates the available capacity and allocated capacity of the target scheduling node; The sub-inventory simulation task is divided into multiple sub-task sets based on the resource pool status; The multiple subtask sets are sent to the target scheduling node for parallel processing to obtain the local prediction results; The local prediction results are clustered to obtain prediction clusters, and a global weighted calculation is performed based on the prediction clusters to obtain the overall inventory prediction result.
10. A department store inventory dynamic early warning system based on edge computing, used to implement the department store inventory dynamic early warning method based on edge computing as described in any one of claims 1 to 9, characterized in that, The system includes: The popularity determination module is used to obtain historical sales data and promotional information, and to obtain the initial promotional popularity through the random forest algorithm; The task determination module is used to determine the simulated inventory task quantity based on the initial promotional popularity. The load determination module is used to determine the initial node load based on edge node resources, the number of concurrent threads, and bandwidth utilization. The status acquisition module is used to acquire the peak load rate and queuing delay when the initial node load meets the overload condition, and to acquire the resource redundancy when the initial node load meets the idle condition. The scheduling determination module is used to decompose the inventory simulation task quantity into sub-inventory simulation tasks based on the peak load rate and the queuing delay, and to cluster the resource redundancy to determine the target scheduling node. The prediction and aggregation module is used to send the sub-inventory simulation task to the target scheduling node for parallel processing, obtain local prediction results, and aggregate them into a total inventory prediction result.