Adaptive cleansing method and system for multi-channel retail data

By constructing a spatiotemporal feature matrix and 3D point cloud data, and combining federated learning and LSTM networks to generate dynamic cleaning rules, the problems of incomplete rule coverage and adaptation to new channels in multi-channel retail data cleaning are solved, achieving adaptability and accuracy in data cleaning.

CN121235594BActive Publication Date: 2026-03-03BEIJING ALL VIEW CLOUD DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511070135.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2026-03-03
Estimated Expiration
2045-07-31

AI Technical Summary

Technical Problem

Existing multi-channel retail data cleaning solutions suffer from timeliness and accuracy issues due to fixed rules that fail to cover all emerging data anomalies, making them unable to adapt to market demands and data format changes in new channels.

Method used

By collecting multi-channel retail data and product displacement trajectories, a spatiotemporal feature matrix and three-dimensional point cloud data are constructed. A local inventory prediction model is encrypted and aggregated using a federated learning framework to generate dynamic cleaning rules. The product trajectory sequences, spatiotemporal drift patterns, and inventory levels are input into an LSTM network to generate dynamic cleaning rules in response to the demand for offline inventory updates triggered by online orders.

Benefits of technology

It achieves adaptive cleaning of multi-channel retail data, dynamically adjusting cleaning rules to adapt to data changes and new channels, improving the accuracy and flexibility of data cleaning, and ensuring that online orders can trigger offline inventory updates in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121235594B_ABST
    Figure CN121235594B_ABST
Patent Text Reader

Abstract

The application provides a kind of multi-channel retail data self-adapting cleaning method and system.Therein, the method includes: collecting multi-channel retail data and commodity displacement trajectory data, dividing trajectory into data segments according to preset time interval, constructing space-time feature matrix; scanning commodity inventory generates three-dimensional point cloud data, generates entry and exit warehouse commodity trajectory sequence containing space coordinates through dynamic time warping algorithm matching. Based on each store trajectory sequence, use federated learning framework to encrypt and aggregate local inventory prediction model parameters, construct cross-regional inventory prediction model, identify commodity inventory space-time drift pattern; input trajectory sequence, space-time drift pattern and inventory level into LSTM network, space-time drift pattern as attention weight matrix is integrated into gate mechanism, output dynamic cleaning rule. Based on rule, multi-channel retail data is self-adaptively cleaned, and the demand of offline inventory update triggered by online order is responded. The application improves the self-adaptive ability and accuracy of multi-channel retail data cleaning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of adaptive cleaning technology, and in particular to an adaptive cleaning method and system for multi-channel retail data. Background Technology

[0002] In multi-channel retail scenarios, retail data originates from various sources, including online e-commerce platforms, offline physical stores, and social media promotions. Data types encompass order information, inventory records, and user behavior patterns, with significant differences in format, update frequency, and information dimensions across these channels. To achieve real-time linkage between online orders and offline inventory and ensure the accuracy of business processes such as inventory forecasting and scheduling, this multi-channel retail data needs to be cleaned to eliminate duplicate, erroneous, or inconsistent data. Furthermore, since product inventory status changes dynamically with order processing, data cleaning must have real-time responsiveness, automatically adjusting processing methods based on changes in data characteristics.

[0003] Currently, there is an automated cleaning solution based on fixed rules for cleaning multi-channel retail data. This solution performs batch checks on the input multi-channel data by pre-setting data verification conditions and processing rules, such as setting reasonable ranges for order amounts and positive / negative verification standards for inventory quantities. Data that does not conform to the rules is marked as abnormal and processed in a preset manner, such as deleting duplicate order records and correcting negative inventory quantity values.

[0004] However, the aforementioned automated data cleaning solutions based on fixed rules have significant drawbacks: Because the characteristics of multi-channel retail data dynamically change with factors such as market demand, promotional activities, and adjustments to product categories, pre-set fixed rules struggle to cover all newly emerging data anomalies. For example, if a product's order amount exceeds the normal range due to a short-term promotion, the fixed rules might mistakenly classify it as abnormal data. When new sales channels introduce new data formats, the existing rules become incompatible, requiring manual reconfiguration. This leads to a decrease in the timeliness and accuracy of data cleaning, making it difficult to meet the dynamic demand for rapid online order-triggered offline inventory updates. Summary of the Invention

[0005] This application provides an adaptive cleaning method and system for multi-channel retail data to solve the problems of adaptive capability and accuracy in multi-channel retail data cleaning caused by incomplete rule coverage, misjudgment of abnormal data, and incompatibility with new channels in the prior art.

[0006] Firstly, this application provides an adaptive cleaning method for multi-channel retail data, including:

[0007] Collect retail data from multiple channels and displacement trajectory data of retail products, divide the displacement trajectory data into multiple data segments according to a preset time interval, and perform spatiotemporal correlation on the coordinates and timestamps in each data segment to construct a spatiotemporal feature matrix;

[0008] The inventory of retail goods is scanned to generate three-dimensional point cloud data. The three-dimensional point cloud data and the spatiotemporal feature matrix are matched by a dynamic time warping algorithm to generate a sequence of inbound and outbound goods trajectories containing spatial coordinates.

[0009] Based on the inbound and outbound product trajectory sequences corresponding to each store, the parameters of the local inventory prediction model corresponding to each store are encrypted and aggregated using a federated learning framework to construct a cross-regional inventory prediction model. Based on the cross-regional inventory prediction model, the spatiotemporal drift pattern of product inventory is identified.

[0010] The inbound and outbound product trajectory sequence, the spatiotemporal drift pattern, and the inventory level are input into a Long Short-Term Memory (LSTM) network to output dynamic cleaning rules for product inventory. The spatiotemporal drift pattern is incorporated into the gating mechanism of the LSTM as an attention weight matrix.

[0011] Based on the dynamic cleaning rules, the multi-channel retail data is adaptively cleaned to respond to the need for offline inventory updates triggered by online orders.

[0012] Optionally, the step of inputting the inbound / outbound product trajectory sequence, the spatiotemporal drift pattern, and the inventory level into a Long Short-Term Memory (LSTM) network to output dynamic inventory cleaning rules includes:

[0013] The inbound and outbound product trajectory sequence, the spatiotemporal drift pattern, and the inventory level are input into the Long Short-Term Memory (LSTM) network. The spatiotemporal drift pattern is adapted to match the parameter scale of the LSTM network. Adjustment parameters are generated based on the adapted spatiotemporal drift pattern.

[0014] Based on the adjustment parameters, the forget gate operating parameters of the Long Short-Term Memory (LSTM) network are adjusted. The retention range of historical stored information is controlled by adjusting the forget gate operating parameters, and the filtered historical stored information is obtained.

[0015] Based on the adjustment parameters, the input gate operating parameters of the Long Short-Term Memory (LSTM) network are adjusted to control the selection range of the current input content, thereby obtaining the inbound and outbound commodity trajectory sequence and inventory level that conform to the selection range.

[0016] Based on the historical storage information, the inbound and outbound product trajectory sequence within the selected range, the adapted spatiotemporal drift pattern, and the inventory level within the selected range, dynamic cleaning rules for product inventory are generated.

[0017] Optionally, the step of generating dynamic inventory cleaning rules based on the historical storage information, the inbound and outbound product trajectory sequences within the selected range, the adapted spatiotemporal drift pattern, and the inventory level within the selected range includes:

[0018] Assign corresponding weights to historical stored information, inbound and outbound product trajectory sequences that meet the selected range, adapted spatiotemporal drift patterns, and inventory levels that meet the selected range.

[0019] Based on the weight allocation results, the historical storage information, the inbound and outbound commodity trajectory sequences that meet the selection range, the adapted spatiotemporal drift pattern, and the inventory level that meets the selection range are weighted to obtain a spatiotemporal weighted feature vector.

[0020] The spatiotemporal weighted feature vector is processed through the recurrent structure of the Long Short-Term Memory (LSTM) network to obtain the final hidden state;

[0021] Based on a preset mapping relationship, the final hidden state is mapped to a set of rules containing multi-dimensional parameters, and dynamic cleaning rules for product inventory are generated based on the set of rules.

[0022] Optionally, the step of matching the 3D point cloud data and the spatiotemporal feature matrix using a dynamic time warping algorithm to generate an inbound / outbound product trajectory sequence containing spatial coordinates includes:

[0023] The three-dimensional point cloud data is arranged in chronological order to form a three-dimensional point cloud sequence containing spatial coordinates and timestamps;

[0024] Spatial coordinates and timestamp information matching each timestamp in the three-dimensional point cloud sequence are extracted from the spatiotemporal feature matrix, and a reference trajectory sequence is constructed based on the matching spatial coordinates and timestamp information;

[0025] Using a dynamic time warping algorithm, a correspondence is established between the 3D point cloud sequence and the reference trajectory sequence. Based on the correspondence, the best matching position of each 3D point cloud data in the reference trajectory sequence is determined.

[0026] Based on the optimal matching position, the spatial coordinates in the three-dimensional point cloud sequence are mapped onto the time axis of the reference trajectory sequence to generate an initial trajectory sequence containing spatial coordinates and timestamps;

[0027] The initial trajectory sequence is smoothed to eliminate discontinuities caused by matching errors, resulting in an inbound / outbound goods trajectory sequence containing spatial coordinates.

[0028] Optionally, the step of mapping the spatial coordinates in the 3D point cloud sequence to the time axis of the reference trajectory sequence based on the optimal matching position to generate an initial trajectory sequence containing spatial coordinates and timestamps includes:

[0029] Traverse the best matching positions. If there are multiple 3D point cloud data corresponding to the same timestamp, calculate the center point of the spatial coordinates of the multiple 3D point cloud data corresponding to the same timestamp, and use the center point as the unique spatial coordinates corresponding to the same timestamp.

[0030] Construct a time axis covering all timestamps in the reference trajectory sequence, and map the center point onto the time axis according to the corresponding timestamp;

[0031] All center points mapped to the time axis are integrated to generate an initial trajectory sequence containing spatial coordinates and timestamps.

[0032] Optionally, based on the inbound and outbound product trajectory sequences corresponding to each store, a federated learning framework is used to encrypt and aggregate the parameters of the local inventory prediction model corresponding to each store to construct a cross-regional inventory prediction model. Based on the cross-regional inventory prediction model, the spatiotemporal drift pattern of product inventory is identified, including:

[0033] Based on the inbound and outbound product trajectory sequence, a local data set containing product location, time, and quantity is constructed.

[0034] Based on the local data set, a local merchandise inventory prediction model for each store is trained to generate local model parameters for each store.

[0035] The local model parameters of each store are encrypted using a federated learning framework to ensure data privacy.

[0036] The encrypted local model parameters are aggregated to generate the final global model parameters. Based on the final global model parameters, a cross-regional inventory forecasting model is constructed.

[0037] Based on the cross-regional inventory forecasting model, the changing trends of commodity inventory under different time and spatial dimensions are analyzed, and the spatiotemporal drift pattern of commodity inventory is identified based on the changing trends.

[0038] Optionally, the step of aggregating the encrypted local model parameters to generate final global model parameters, and constructing a cross-regional inventory forecasting model based on the final global model parameters, includes:

[0039] Based on the merchandise turnover of each store and the amount of data of the inbound and outbound merchandise trajectory sequences, the degree of influence of the local model parameters during aggregation is determined;

[0040] The encrypted local model parameters are adjusted according to the degree of influence, and the adjusted local model parameters are aggregated to form preliminary global model parameters;

[0041] Based on the characteristics of merchandise inventory in different store locations, and combined with the movement range of merchandise in the inbound and outbound merchandise trajectory sequence in each region, the initial global model parameters are adjusted to obtain the final global model parameters.

[0042] Based on the final global model parameters, a cross-regional inventory forecasting model is constructed.

[0043] Secondly, this application provides an adaptive cleaning system for multi-channel retail data, comprising:

[0044] The acquisition module is used to collect multi-channel retail data and displacement trajectory data of retail products. The displacement trajectory data is divided into multiple data segments according to a preset time interval. The coordinates and timestamps in each data segment are spatiotemporally correlated to construct a spatiotemporal feature matrix.

[0045] The generation module is used to scan the inventory of retail goods, generate three-dimensional point cloud data, and match the three-dimensional point cloud data and the spatiotemporal feature matrix through a dynamic time warping algorithm to generate a sequence of inbound and outbound goods trajectories containing spatial coordinates.

[0046] The aggregation module is used to encrypt and aggregate the parameters of the local inventory prediction model corresponding to each store based on the inbound and outbound product trajectory sequence corresponding to each store using a federated learning framework, to construct a cross-regional inventory prediction model, and to identify the spatiotemporal drift pattern of product inventory based on the cross-regional inventory prediction model.

[0047] The output module is used to input the inbound and outbound product trajectory sequence, the spatiotemporal drift pattern, and the inventory level into the Long Short-Term Memory (LSTM) network to output the dynamic cleaning rules for the product inventory. The spatiotemporal drift pattern is incorporated into the gating mechanism of the LSTM as an attention weight matrix.

[0048] The response module is used to adaptively clean the multi-channel retail data based on the dynamic cleaning rules in response to the need for offline inventory updates triggered by online orders.

[0049] Thirdly, this application provides a computing device including a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are to be invoked and executed by the processing component to implement an adaptive cleaning method for multi-channel retail data as described in any of the first aspects.

[0050] Fourthly, this application provides a computer storage medium storing a computer program, which, when executed by a computer, implements an adaptive cleaning method for multi-channel retail data as described in any of the first aspects.

[0051] This application provides an adaptive cleaning method for multi-channel retail data. The method includes: collecting multi-channel retail data and retail product displacement trajectory data; dividing the displacement trajectory data into multiple data segments according to a preset time interval; spatiotemporally associating the coordinates and timestamps within each data segment to construct a spatiotemporal feature matrix; scanning the inventory of retail products to generate 3D point cloud data; matching the 3D point cloud data and the spatiotemporal feature matrix using a dynamic time warping algorithm to generate an inbound / outbound product trajectory sequence containing spatial coordinates; based on the inbound / outbound product trajectory sequences corresponding to each store, using a federated learning framework to encrypt and aggregate the parameters of the local inventory prediction model corresponding to each store to construct a cross-regional inventory prediction model; identifying the spatiotemporal drift pattern of product inventory based on the cross-regional inventory prediction model; inputting the inbound / outbound product trajectory sequence, the spatiotemporal drift pattern, and the inventory level into a Long Short-Term Memory (LSTM) network to output dynamic cleaning rules for product inventory; the spatiotemporal drift pattern is incorporated into the LSTM gating mechanism as an attention weight matrix; and adaptively cleaning the multi-channel retail data based on the dynamic cleaning rules to respond to the demand for offline inventory updates triggered by online orders.

[0052] This application has the following advantages: By collecting multi-channel retail data and retail product displacement trajectory data, dividing the data into segments and performing spatiotemporal correlation to construct a spatiotemporal feature matrix, it can integrate multi-source data and establish the correlation between coordinates and time, providing a structured foundation for subsequent data matching; by scanning inventory to generate 3D point cloud data, and matching it with the spatiotemporal feature matrix using a dynamic time warping algorithm, it can generate inbound and outbound product trajectory sequences, achieving accurate correspondence between 3D spatial data and spatiotemporal features, obtaining product inbound and outbound trajectories containing spatial coordinates; based on the inbound and outbound product trajectory sequences of each store, it utilizes a federated learning framework to encrypt and aggregate local model parameters to construct a cross-regional inventory prediction model, thereby identifying product inventory... The spatiotemporal drift pattern enables cross-regional inventory forecasting and captures the spatiotemporal variation patterns of inventory while protecting the data privacy of each store. By inputting the inbound and outbound product trajectory sequences, the spatiotemporal drift pattern, and inventory levels into an LSTM network, it outputs dynamic cleaning rules for product inventory. The spatiotemporal drift pattern is integrated into the gating mechanism as an attention weight matrix. This allows for the generation of targeted dynamic cleaning rules through a neural network, combining product movement trajectories, spatiotemporal changes in inventory, and the current inventory status, while strengthening the influence of key spatiotemporal features. By adaptively cleaning multi-channel retail data based on dynamic cleaning rules, it can respond to the demand for offline inventory updates triggered by online orders, achieving dynamic adaptation of data cleaning.

[0053] Furthermore, the inbound and outbound product trajectory sequences, spatiotemporal drift patterns, and inventory levels are input into the LSTM network. The spatiotemporal drift patterns are adapted to generate adjustment parameters. Based on these parameters, the forget gate and input gate parameters are adjusted to filter historical information and select current input content. Weights are then assigned to relevant information and weighted to obtain a spatiotemporally weighted feature vector. After processing by the LSTM recurrent structure, the final hidden state is mapped to a set of rules, generating dynamic cleaning rules. The corresponding technical effect is that by refining the LSTM network's operation process and combining weight allocation and recurrent processing, the generation of dynamic cleaning rules more accurately integrates historical information with current input, strengthens the influence of key factors, and improves the adaptability of rules to dynamic changes in multi-channel retail data.

[0054] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description

[0055] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0056] Figure 1 A flowchart illustrating an adaptive cleaning method for multi-channel retail data provided in this application embodiment;

[0057] Figure 2 A schematic diagram of an adaptive cleaning system for multi-channel retail data provided in this application embodiment;

[0058] Figure 3 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation

[0059] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0060] In some of the processes described in the specification, claims, and accompanying drawings of this application, multiple operations appearing in a specific order are included. However, it should be clearly understood that these operations may not be executed in the order they appear herein, or may be executed in parallel. The operation numbers, such as 11, 12, etc., are merely used to distinguish different operations and do not themselves represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the descriptions such as "first," "second," etc., in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types.

[0061] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0062] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0063] To address the issues of incomplete rule coverage, misjudgment of abnormal data, and incompatibility with new channels in existing technologies, this application provides an adaptive cleaning method for multi-channel retail data. This method employs the following concept: First, collect retail data and product movement trajectory data from multiple channels. Divide the trajectory data into multiple segments at certain time intervals, and associate the location and time information within each segment to form features. Next, scan product inventory to obtain relevant data, and match this data to form product entry and exit trajectories containing location information. Then, combine the trajectories from each store, integrate the information using a specific method to build a model, and identify the spatiotemporal change patterns of product inventory. Next, input the trajectories, inventory change patterns, and inventory quantities into the network to generate dynamically adjustable cleaning rules, with the inventory change patterns highlighting important information during network processing. Finally, use these dynamic rules to clean the multi-channel retail data. In this method, the dynamic cleaning rules can automatically adjust according to data changes, solving the problems of incomplete coverage and misjudgment of data by fixed rules. Simultaneously, it can adapt to data from different channels, including newly added channels, solving the problem of incompatibility between existing solutions and new channels, thereby better responding to the demand for offline inventory updates from online orders.

[0064] Figure 1 A flowchart illustrating an adaptive cleaning method for multi-channel retail data provided in this application embodiment is shown below. Figure 1 As shown, the method includes:

[0065] S11. Collect multi-channel retail data and displacement trajectory data of retail products, divide the displacement trajectory data into multiple data segments according to a preset time interval, perform spatiotemporal correlation on the coordinates and timestamps in each data segment, and construct a spatiotemporal feature matrix.

[0066] Among them, multi-channel retail data is retail-related data collected from multiple sources such as online platform orders, offline store sales records, and social media promotion information; retail product displacement trajectory data records the movement path of products during transportation, warehousing, and sales, including the location information of products at different times; preset time interval is a fixed time length set by humans to divide trajectory data; data segment is the trajectory data part obtained after being split according to the time interval; coordinates are the specific location information of products at a certain moment; timestamp is the specific time when the data was generated; and spatiotemporal feature matrix is ​​a structured data set that integrates the correlation between coordinates and timestamps in each data segment.

[0067] In this embodiment, retail data from multiple channels such as online platforms and offline stores are first collected, as well as displacement trajectory data of goods moving from the warehouse to the store and within the store. Secondly, the displacement trajectory data is divided into multiple data segments according to a preset time interval (e.g., 10 minutes). For example, the transportation trajectory of a batch of goods over 2 hours can be divided into 12 segments by splitting it into 10-minute segments. Then, the coordinates of the goods in each data segment are associated with the corresponding timestamp to clarify the location corresponding to each time point. Finally, these associated information are organized into a structured spatiotemporal feature matrix.

[0068] S12. Scan the inventory of retail goods to generate three-dimensional point cloud data. Use a dynamic time warping algorithm to match the three-dimensional point cloud data with the spatiotemporal feature matrix to generate a sequence of inbound and outbound goods trajectories containing spatial coordinates.

[0069] Among them, 3D point cloud data is a dataset composed of a large number of spatial points obtained after scanning retail merchandise inventory. The location information of these points can reflect the spatial distribution of merchandise inventory; dynamic time warping algorithm is a method for matching time series data of different lengths; inbound and outbound merchandise trajectory sequence is a sequence that records the movement path of merchandise during the process of entering and leaving the warehouse, including the spatial coordinates of merchandise at each stage of inbound and outbound.

[0070] In this embodiment, the inventory of retail goods is first scanned to generate three-dimensional point cloud data, for example, by obtaining the spatial distribution of goods on warehouse shelves through a scanning device; secondly, the three-dimensional point cloud data is matched with the spatiotemporal feature matrix obtained in S11 through a dynamic time warping algorithm, and the time length of the data is adjusted to find the most similar part, thus determining the correspondence between the spatial distribution of inventory and the movement trajectory of goods; finally, based on the matching results, a sequence of inbound and outbound goods trajectories containing spatial coordinates is generated to clarify the location path of each link in the inbound and outbound process of goods.

[0071] S13. Based on the inbound and outbound product trajectory sequences corresponding to each store, the parameters of the local inventory prediction model corresponding to each store are encrypted and aggregated using a federated learning framework to construct a cross-regional inventory prediction model. Based on the cross-regional inventory prediction model, the spatiotemporal drift pattern of product inventory is identified.

[0072] Among them, the federated learning framework is a tool that can integrate model information from various parties without sharing the original data of each party; the local inventory prediction model parameters are the specific values ​​in the model used to predict inventory, trained by each store based on its own sales and inventory data; encrypted aggregation is the process of encrypting the local model parameters of each store and then merging them into overall parameters; the cross-regional inventory prediction model is a model used to predict the overall inventory situation in multiple regions; and the spatiotemporal drift pattern is the changing pattern of commodity inventory quantity over time and spatial transfer.

[0073] In this embodiment, firstly, based on the inbound and outbound product trajectory sequences of each store, each store trains a local inventory prediction model to obtain its own local model parameters; secondly, the local model parameters of each store are encrypted using a federated learning framework to ensure that the original data is not leaked; then, the encrypted local model parameters are aggregated and merged into global model parameters to construct a cross-regional inventory prediction model; finally, based on this model, the inventory changes of products in different times and regions are analyzed to identify spatiotemporal drift patterns.

[0074] S14. Input the inbound and outbound product trajectory sequence, spatiotemporal drift pattern, and inventory level into the Long Short-Term Memory (LSTM) network to output dynamic cleaning rules for product inventory. The spatiotemporal drift pattern is incorporated into the LSTM gating mechanism as an attention weight matrix.

[0075] Among them, inventory level is the current quantity of goods in stock; Long Short-Term Memory (LSTM) network is a tool that can process sequential data and remember important information; dynamic cleaning rules are rules that can be automatically adjusted according to data changes for processing retail data; attention weight matrix is ​​a tool used to highlight the importance of certain information; gating mechanism is the part of LSTM network that controls information retention and input.

[0076] In this embodiment, the inbound and outbound product trajectory sequence, spatiotemporal drift pattern, and inventory level are first input into the LSTM network. Next, the spatiotemporal drift pattern is adapted by adjusting its parameter scale to match the LSTM network, generating adjustment parameters. Then, based on the adjustment parameters, the forget gate and input gate operating parameters of the LSTM network are adjusted to filter historical stored information and select current input content that falls within the specified range. Finally, based on the filtered information, dynamic cleaning rules for the product inventory are generated, with the spatiotemporal drift pattern serving as an attention weight matrix to highlight important information.

[0077] S15. Based on dynamic cleaning rules, adaptive cleaning is performed on multi-channel retail data to respond to the need for offline inventory updates triggered by online orders.

[0078] Adaptive cleaning is a process of automatically adjusting the processing method to process multi-channel retail data according to dynamic cleaning rules. Its purpose is to ensure data accuracy in order to respond to the demand for offline inventory updates triggered by online orders.

[0079] In this embodiment, the dynamic cleaning rules generated in S14 are first applied to the multi-channel retail data collected in S11; then the data is processed according to the dynamic cleaning rules, retaining normal data and processing abnormal data; finally, adaptive cleaning is used to ensure data accuracy and respond to the need for offline inventory updates triggered by online orders.

[0080] This application provides the following specific example: Brand A has stores in multiple locations and sells online on multiple platforms. Its overall data processing flow is as follows: Staff first collect the brand's online orders, offline sales records, and the trajectory data of goods moving from the central warehouse to the stores and within the stores within a month. The trajectory is divided into segments at 15-minute intervals, and the position and time of each segment are associated to form a spatiotemporal feature matrix. Then, the central warehouse inventory is scanned to generate 3D point cloud data. By matching, the product entry and exit trajectories containing coordinates are obtained, such as the path from the warehouse entrance to the shelf and then to the exit. Each store (such as stores B and C) is based on its own trajectory. A local inventory prediction model is trained, and a cross-regional model is constructed using encrypted aggregation parameters within a specific framework. This model identifies the spatiotemporal drift pattern of "fast inventory depletion in region B on weekdays and fast depletion in region C on weekends." The trajectory, drift pattern, and inventory levels (60 items in store B and 90 items in store C) are input into an LSTM network to generate dynamic cleaning rules (such as "large orders in region B on weekdays are not considered abnormal"). Finally, these rules are used to clean multi-channel data, retaining large orders in region B on weekdays and deleting duplicate records to ensure that online orders can trigger offline inventory updates in a timely manner, such as adjusting the inventory of store B promptly after receiving an online order.

[0081] By executing steps S11 to S15, this embodiment of the application collects and processes multi-channel data and product trajectories, constructs associated features and matches them to generate inbound and outbound trajectories, integrates information from various stores to identify the spatiotemporal changes in inventory, and then generates dynamic cleaning rules, ultimately achieving adaptive cleaning of multi-channel retail data. In this process, dynamic rules can automatically adjust with data changes, solving the problems of incomplete coverage and misjudged data caused by fixed rules; at the same time, it adapts to different channels (including new channels), ensuring data accuracy, thereby efficiently responding to the demand for offline inventory updates from online orders, and improving the flexibility and accuracy of data processing and inventory linkage in retail operations.

[0082] In one possible embodiment, S14, the inbound and outbound product trajectory sequence, spatiotemporal drift pattern, and inventory level are input into a Long Short-Term Memory (LSTM) network to output dynamic inventory cleaning rules, including:

[0083] Step 141: Input the inbound and outbound product trajectory sequence, spatiotemporal drift pattern, and inventory level into the Long Short-Term Memory (LSTM) network. Adapt the spatiotemporal drift pattern to match the parameter scale of the LSTM network. Generate adjustment parameters based on the adapted spatiotemporal drift pattern.

[0084] Among them, the inbound and outbound goods trajectory sequence records the information of the path of goods entering and leaving the warehouse, including the location coordinates at different times; the spatiotemporal drift pattern is the law of changes in goods inventory over time and space; the inventory level is the current inventory quantity of goods; the Long Short-Term Memory network is a tool that can process sequence data and retain important information; the adaptation process is to adjust the number of parameters of the spatiotemporal drift pattern to match the number of parameters of the LSTM network; the adjustment parameters are generated based on the adapted spatiotemporal drift pattern and are used to adjust the parameters of the LSTM network operation.

[0085] In this embodiment, the inbound and outbound product trajectory sequence, spatiotemporal drift pattern, and inventory level are input into an LSTM network. The spatiotemporal drift pattern is adapted to match the network parameter scale, and adjustment parameters are generated based on the adapted pattern. For example, the inbound and outbound trajectory of Brand A products, the pattern of "fast inventory depletion at Store B on weekdays," and data of 80 items in inventory at Store B are input into the network. The number of pattern parameters is adjusted from 100 to 50 to match the network, and adjustment parameters are generated.

[0086] Step 142: Based on the adjustment parameters, adjust the forget gate operating parameters of the Long Short-Term Memory (LSTM) network. By adjusting the forget gate operating parameters, control the retention range of historical stored information and obtain the filtered historical stored information.

[0087] Among them, the adjustment parameters are used to adjust the operation of the LSTM network; the forget gate is the part of the LSTM network that controls whether to retain or discard historical information; the forget gate operation parameters are the parameters that control the working mode of the forget gate; the historical storage information is the past data recorded in the network; the retention range is the range of historical information that needs to be retained; and the filtered historical storage information is the useful historical data retained after being processed by the forget gate.

[0088] In this embodiment, the forget gate operating parameters of the LSTM network are adjusted based on the adjustment parameters in step 141. The adjusted parameters control the retention range of historical stored information, resulting in filtered historical stored information. For example, if the adjustment parameters indicate that the working day data of store B for the past 30 days should be retained, after adjusting the forget gate parameters, only data within this range will be retained, and irrelevant information will be discarded.

[0089] Step 143: Based on the adjustment parameters, adjust the input gate operating parameters of the Long Short-Term Memory (LSTM) network to control the selection range of the current input content, and obtain the inbound and outbound commodity trajectory sequence and inventory level that meet the selection range.

[0090] Among them, the adjustment parameters are used to adjust the operation of the LSTM network; the input gate is the part of the LSTM network that controls the selection of the current input information; the input gate operation parameters are the parameters that control the working mode of the input gate; the current input content is the data just input into the network, including the inbound and outbound trajectories and the inventory level; the selection range is the current input range that needs to be retained; the inbound and outbound trajectories and inventory levels that meet the selection range are the useful current data retained after being processed by the input gate.

[0091] In this embodiment, the input gate operating parameters of the LSTM network are adjusted based on the adjustment parameters in step 141. The adjusted parameters control the selection range of the current input content, thereby obtaining the inbound / outbound trajectories and inventory levels that conform to the range. For example, if the adjustment parameters indicate that the focus is on weekday data of store B, after adjusting the input gate parameters, only data within this range is selected, and irrelevant inputs are filtered out.

[0092] Step 144: Based on historical storage information, inbound and outbound product trajectory sequences within the selected range, adapted spatiotemporal drift patterns, and inventory levels within the selected range, generate dynamic cleaning rules for product inventory.

[0093] Among them, historical storage information is useful historical data retained in the network; inbound and outbound trajectories and inventory levels that meet the selection range are the current input data after being filtered; the adapted spatiotemporal drift pattern is the inventory change pattern after adjusting parameters; and the dynamic cleaning rules are retail data processing rules that can be automatically adjusted according to data changes.

[0094] In this embodiment, the historical information filtered in step 142, the current data within the compliance range in step 143, and the adapted pattern in step 141 are integrated and processed in an LSTM network to generate dynamic cleaning rules. For example, by combining historical data, current trajectory and inventory of store B, and the adapted pattern, a rule is generated that "large orders from store B on weekdays are considered normal".

[0095] This application provides the following specific example: The inbound and outbound inventory trajectories of Brand A products in stores B and C, the spatiotemporal drift pattern of "fast inventory depletion in store B on weekdays and fast inventory depletion in store C on weekends," and the inventory levels of 80 units in store B and 60 units in store C are input into an LSTM network. The spatiotemporal drift pattern is adapted by reducing its parameters from 80 to 60 to match the network, generating adjustment parameters. Based on these adjustment parameters, the forget gate parameters are adjusted to retain historical data from store B on weekdays for the past 25 days while discarding irrelevant information. Simultaneously, the input gate parameters are adjusted to select the current trajectory and inventory data of store B on weekdays. After integrating this information, dynamic cleaning rules are generated in the LSTM network, such as "order amounts in store B on weekdays exceeding 1.5 times the normal value are still considered normal data."

[0096] By executing steps 141 to 144, this embodiment of the application inputs product trajectories, inventory change patterns, and current inventory into an LSTM network. Through parameter adaptation, gating adjustment, and information integration, dynamic cleaning rules are generated. This process ensures the compatibility of the input data with the network, filters out useful historical and current information, and enables the generated rules to adapt to the spatiotemporal changes in product inventory. This provides a flexible and practical standard for multi-channel retail data cleaning, improving the targeting and accuracy of data processing.

[0097] In one possible embodiment, step 144, based on historical storage information, inbound and outbound product trajectory sequences within the selected range, adapted spatiotemporal drift patterns, and inventory levels within the selected range, generates dynamic cleaning rules for the product inventory, including:

[0098] a1. Assign corresponding weights to historical stored information, inbound and outbound product trajectory sequences within the selected range, adapted spatiotemporal drift patterns, and inventory levels within the selected range.

[0099] Among them, historical storage information is past data that has been filtered and retained and is helpful to the current processing; the inbound and outbound product trajectory sequence that meets the selection range is the product movement path information related to the processing in the current input; the adapted spatiotemporal drift mode is the product inventory change pattern that is compatible with the network after parameter adjustment; the inventory level that meets the selection range is the product inventory quantity related to the processing in the current input; and the weight is a value set for each of these four types of information to indicate the degree of importance, which is used to reflect the influence of each type of information in subsequent processing.

[0100] In this embodiment, corresponding weights are assigned to historical stored information, inbound / outbound product trajectory sequences within the selected range, adapted spatiotemporal drift patterns, and inventory levels within the selected range. The allocation is based on the importance of each type of information to the generation of dynamic cleaning rules. For example, when processing inventory of brand A products, if recent product movement trajectories have a greater impact on the rules, higher weights can be assigned to the trajectory sequences. For instance, historical stored information is assigned 20% weight, trajectory sequences within the selected range are assigned 30% weight, adapted spatiotemporal drift patterns are assigned 30% weight, and inventory levels within the selected range are assigned 20% weight, with a total weight of 100%.

[0101] a2. Based on the weight allocation results, the historical storage information, the inbound and outbound commodity trajectory sequences that meet the selection range, the adapted spatiotemporal drift pattern, and the inventory level that meets the selection range are weighted to obtain the spatiotemporal weighted feature vector.

[0102] Among them, the weight allocation result is the importance value set for each type of information, the weighting process is the process of multiplying each type of information by its corresponding weight and then integrating them, and the spatiotemporal weighted feature vector is a comprehensive data vector containing time and space information obtained through weighting process, which is used for subsequent network processing.

[0103] In this embodiment of the application, based on the weight allocation result of step a1, the historical storage information, the inbound and outbound commodity trajectory sequence that meets the selection range, the adapted spatiotemporal drift pattern, and the inventory level that meets the selection range are weighted. For example, if the value of the historical storage information is 50 and the weight is 20%, 50 × 20% = 10 is calculated; if the value of the trajectory sequence is 80 and the weight is 30%, 80 × 30% = 24 is calculated; if the value of the adapted pattern is 60 and the weight is 30%, 60 × 30% = 18 is calculated; and if the value of the inventory level is 70 and the weight is 20%, 70 × 20% = 14 is calculated. These results are integrated into a spatiotemporal weighted feature vector of (10, 24, 18, 14).

[0104] a3. The spatiotemporal weighted feature vectors are processed through the recurrent structure of the Long Short-Term Memory (LSTM) network to obtain the final hidden state.

[0105] Among them, the recurrent structure of the Long Short-Term Memory network is the part of the network that can repeatedly process sequential data and retain important information, the spatiotemporal weighted feature vector is a comprehensive data vector containing time and space information, and the final hidden state is the state data containing key information output after processing by the recurrent structure, reflecting the core features of the input data.

[0106] In this embodiment of the application, the spatiotemporal weighted feature vector obtained in step a2 is input into the recurrent structure of the LSTM network. The recurrent structure processes each element in the vector one by one and retains the key information from before. For example, it processes "10" (historical information part) first, and then processes "24" (trajectory sequence part) in combination with the result. After processing all elements in sequence, the state data containing the core features of all elements is finally formed, and the final hidden state is obtained.

[0107] a4. Based on the preset mapping relationship, the final hidden state is mapped to a set of rules containing multi-dimensional parameters, and dynamic cleaning rules for product inventory are generated based on the set of rules.

[0108] Among them, the preset mapping relationship is the pre-defined correspondence between the final hidden state and the rule set. The rule set, which contains multi-dimensional parameters, is a set of multiple processing standards. Each standard contains specific parameters. The dynamic cleaning rules for product inventory are processing rules generated from the rule set that can be automatically adjusted according to inventory changes.

[0109] In this embodiment of the application, based on a preset mapping relationship, the final hidden state obtained in step a3 is mapped to a set of rules containing multi-dimensional parameters. For example, if the final hidden state reflects "fast inventory consumption on weekdays", it is mapped to a set of parameters containing order quantity, amount, time, etc., such as "upper limit of order quantity" and "fluctuation range of amount". Then, dynamic cleaning rules are generated based on this set, such as "when the order quantity on weekdays exceeds a certain value, it is considered normal".

[0110] This application provides the following specific example: When processing inventory data for store B of brand A, first assign a 20% weight to the historical storage information of the past 25 days (value 40), a 30% weight to the inbound and outbound product trajectory sequence of weekdays (value 90), a 30% weight to the adapted "fast inventory depletion on weekdays" mode (value 70), and a 20% weight to the current weekday inventory level of 70 items (value 70). The four types of information are weighted, resulting in 40×20%=8, 90×30%=27, 70×30%=21, and 70×20%=14, which are then integrated into a spatiotemporal weighted feature vector of (8, 27, 21, 14). This vector is input into the recurrent structure of an LSTM network, processing each element sequentially and retaining key information to obtain the final hidden state reflecting the core features of weekday inventory changes. Based on the preset mapping relationship, this state is mapped to a set of rules containing parameters such as "maximum order volume", "range of amount fluctuation", and "time interval", generating dynamic cleaning rules, such as "when the order volume of store B does not exceed 200 orders per hour on weekdays from 9:00 to 18:00, it is considered normal".

[0111] By executing a1 to a4, this embodiment of the application assigns weights to different pieces of information and performs weighted integration, then maps and generates dynamic cleaning rules after processing through a loop structure. This process highlights the impact of important information, accurately captures the core patterns of commodity inventory, and enables the generated rules to adapt to the spatiotemporal changes in inventory. It provides a flexible and practical standard for cleaning multi-channel retail data, improving the targeting and accuracy of data processing.

[0112] In one possible embodiment, in S12, the 3D point cloud data and the spatiotemporal feature matrix are matched using a dynamic time warping algorithm to generate an inbound / outbound product trajectory sequence containing spatial coordinates, including:

[0113] Step 121: Arrange the 3D point cloud data in chronological order to form a 3D point cloud sequence containing spatial coordinates and timestamps.

[0114] Among them, 3D point cloud data is a collection of a large number of spatial points obtained after scanning the commodity inventory. Each point contains coordinates describing its spatial location. The time order is the order in which the data is generated. Spatial coordinates are information used to represent the specific location of the point in space. The timestamp is a marker that records the specific time when the data was generated. The 3D point cloud sequence is a sequence formed by arranging the 3D point cloud data in time order, where each data point contains corresponding spatial coordinates and timestamp.

[0115] In this embodiment of the application, the three-dimensional point cloud data is arranged in chronological order to form a three-dimensional point cloud sequence containing spatial coordinates and timestamps. For example, the warehouse where the goods of brand A are located is scanned multiple times. Each scan yields a set of three-dimensional point cloud data containing multiple spatial coordinates. These data are arranged in chronological order of the scan time (e.g., 10:00, 10:05, 10:10) so that the data corresponding to each time point contains the spatial coordinates of the goods at that time, thereby forming a three-dimensional point cloud sequence.

[0116] Step 122: Extract spatial coordinates and timestamp information that match each timestamp in the 3D point cloud sequence from the spatiotemporal feature matrix, and construct a reference trajectory sequence based on the matched spatial coordinates and timestamp information.

[0117] Among them, the spatiotemporal feature matrix is ​​a structured data set containing the correlation between timestamps and spatial coordinates in the commodity movement trajectory; the 3D point cloud sequence is scanned data arranged in time, containing timestamps and spatial coordinates; the matched spatial coordinates and timestamp information refers to the spatial coordinates and timestamps that are the same as those in the 3D point cloud sequence and the spatiotemporal feature matrix; the reference trajectory sequence is a sequence constructed based on the above matching information, containing timestamps and their corresponding spatial coordinates, serving as a reference benchmark for subsequent matching.

[0118] In this embodiment of the application, spatial coordinates and timestamp information that match each timestamp in the three-dimensional point cloud sequence are extracted from the spatiotemporal feature matrix. For example, if the timestamps of the three-dimensional point cloud sequence are 10:00, 10:05, and 10:10, the spatial coordinates corresponding to these three timestamps are found from the spatiotemporal feature matrix, and then a reference trajectory sequence is constructed based on these matching information so that each timestamp in the sequence corresponds to a unique spatial coordinate.

[0119] Step 123: Using the dynamic time warping algorithm, establish a correspondence between the 3D point cloud sequence and the reference trajectory sequence. Based on the correspondence, determine the best matching position of each 3D point cloud data in the reference trajectory sequence.

[0120] Among them, the dynamic time warping algorithm is a method for establishing a correspondence between sequence data of different time lengths; the 3D point cloud sequence and the reference trajectory sequence are two sequences containing timestamps and spatial coordinates; the correspondence refers to the matching relationship between data points in the two sequences; the best matching position is the most corresponding position found in the reference trajectory sequence for each data point in the 3D point cloud sequence.

[0121] In this embodiment of the application, a dynamic time warping algorithm is used to establish a correspondence between the three-dimensional point cloud sequence and the reference trajectory sequence. For example, by adjusting the time interval between the two sequences, the spatial coordinates of each time point in the three-dimensional point cloud are compared with the spatial coordinates of each time point in the reference trajectory to find the closest matching relationship. Based on this correspondence, the best matching position of each three-dimensional point cloud data in the reference trajectory sequence is determined.

[0122] Step 124: Based on the best matching position, map the spatial coordinates in the 3D point cloud sequence onto the time axis of the reference trajectory sequence to generate an initial trajectory sequence containing spatial coordinates and timestamps.

[0123] Among them, the best matching position is the position that corresponds most to the 3D point cloud data in the reference trajectory sequence; the spatial coordinates of the 3D point cloud sequence are the position information of the points obtained by scanning; the time axis of the reference trajectory sequence is the axis arranged in chronological order in the reference trajectory; the initial trajectory sequence is the sequence formed by mapping the spatial coordinates of the 3D point cloud sequence to the time axis of the reference trajectory sequence, which includes timestamps and corresponding spatial coordinates.

[0124] In this embodiment of the application, based on the best matching position, the spatial coordinates in the three-dimensional point cloud sequence are mapped onto the time axis of the reference trajectory sequence to generate an initial trajectory sequence containing spatial coordinates and timestamps. For example, if the spatial coordinates of 10:05 in the three-dimensional point cloud sequence match the position of 10:08 in the reference trajectory, then the coordinates are mapped to the timestamp of 10:08 in the reference trajectory. After processing all the data in this way, the initial trajectory sequence is formed.

[0125] Step 125: Smooth the initial trajectory sequence to eliminate discontinuities caused by matching errors, and obtain an inbound / outbound goods trajectory sequence containing spatial coordinates.

[0126] The initial trajectory sequence is a sequence containing timestamps and spatial coordinates obtained after mapping; smoothing is the process of adjusting points in the sequence whose coordinates suddenly change due to matching errors, making the sequence more coherent; matching error refers to the positional deviation generated during the matching process; discontinuity points are points in the sequence whose coordinates suddenly change significantly; and the inbound / outbound goods trajectory sequence is a continuous sequence containing the spatial coordinates of the inbound / outbound paths of goods obtained after smoothing.

[0127] In this embodiment of the application, the initial trajectory sequence is smoothed to eliminate discontinuities caused by matching errors, thereby obtaining a trajectory sequence of goods entering and leaving the warehouse containing spatial coordinates. For example, if the coordinate changes of two adjacent time points in the initial trajectory sequence are sudden and unreasonable, the coordinate changes are made to be smoother by adjusting the intermediate transition coordinate values, thereby forming a continuous trajectory sequence.

[0128] This application provides the following specific example: A warehouse containing Brand A's products is scanned. At 10:00, a 3D point cloud containing coordinates (X1, Y1, Z1) and (X2, Y2, Z2) is obtained; at 10:05, data containing coordinates (X3, Y3, Z3) is obtained; and at 10:10, data containing coordinates (X4, Y4, Z4) and (X5, Y5, Z5) is obtained. These data are arranged chronologically to form a 3D point cloud sequence. The spatial coordinates (Xa, Ya, Za), (Xb, Yb, Zb), and (Xc, Yc, Zc) corresponding to 10:00, 10:05, and 10:10 are extracted from the spatiotemporal feature matrix of Brand A's products to construct a reference orbit. The data at 10:00 in the 3D point cloud sequence is matched with the reference trajectory at 10:00 using a dynamic time warping algorithm. The data at 10:05 is matched with the reference trajectory at 10:07, and the data at 10:10 is matched with the reference trajectory at 10:10. The 3D point cloud coordinates are mapped to the time axis of the reference trajectory to generate initial trajectory sequences corresponding to (X1,Y1,Z1) at 10:00, (X3,Y3,Z3) at 10:07, and (X4,Y4,Z4) at 10:10. It is found that the coordinate change from 10:07 to 10:10 is sudden. By adding transition coordinates (X6,Y6,Z6) for smoothing, a continuous sequence of inbound and outbound goods trajectory sequences is obtained.

[0129] By executing steps 121 to 125, this embodiment of the application sorts the scanned data by time, matches it with reference trajectories, maps coordinates, and smooths it to obtain a continuous sequence of inbound and outbound product trajectories. This process ensures the temporal order and spatial coherence of the trajectory data, accurately reflecting the actual paths of goods entering and leaving the warehouse, and providing a reliable trajectory foundation for subsequent inventory analysis and data processing.

[0130] In one possible embodiment, step 124, based on the optimal matching position, maps the spatial coordinates in the 3D point cloud sequence onto the time axis of the reference trajectory sequence to generate an initial trajectory sequence containing spatial coordinates and timestamps, including:

[0131] b1. Traverse the best matching position. If there are multiple 3D point cloud data corresponding to the same timestamp, calculate the center point of the spatial coordinates of the multiple 3D point cloud data corresponding to the same timestamp, and use the center point as the unique spatial coordinates corresponding to the same timestamp.

[0132] Among them, the best matching position is the most corresponding position found in the reference trajectory sequence of the 3D point cloud data; the 3D point cloud data is a set of points containing spatial coordinates obtained by scanning the commodity inventory; the timestamp is a marker that records the time when the data was generated; the spatial coordinates are information describing the position of the point in space; the center point is the average position of multiple spatial coordinates, used as the unique spatial coordinate corresponding to the same timestamp; the generated result is the unique spatial coordinate corresponding to the same timestamp.

[0133] In this embodiment, all best matching positions are traversed to check if multiple 3D point cloud data correspond to the same timestamp. If such a situation exists, the center point of the spatial coordinates of these 3D point cloud data is calculated, and this center point is used as the unique spatial coordinates corresponding to the timestamp. For example, when processing the product data of brand A, it is found that the timestamp 14:00 corresponds to three 3D point cloud data, and their spatial coordinates are (2,3,4), (4,3,2), and (3,4,3). When calculating the center point, the X coordinates of the three points are first added together (2+4+3=9), and then divided by 3 to get 3. The Y coordinates are added together (3+3+4=10), and then divided by 3 to get approximately 3.33. The Z coordinates are added together (4+2+3=9), and then divided by 3 to get 3. Therefore, the center point coordinates are (3,3.33,3), which is used as the unique spatial coordinates corresponding to 14:00.

[0134] b2. Construct a time axis that covers all timestamps in the reference trajectory sequence, and map the center point onto the time axis according to the corresponding timestamp.

[0135] The time axis is an axis arranged in chronological order and covering all timestamps in the reference trajectory sequence; the timestamps of the reference trajectory sequence are all time markers recorded in the reference trajectory; the center point is the unique spatial coordinate corresponding to the same timestamp; mapping is the process of associating the center point with the corresponding timestamp on the time axis; the generation result is the center point mapped onto the time axis.

[0136] In this embodiment of the application, a timeline containing all timestamps in the reference trajectory sequence is constructed, and these timestamps are arranged in chronological order. Then, the center points obtained in step b1 are placed on the corresponding positions on the timeline according to their respective timestamps. For example, the timestamps of the reference trajectory sequence include 14:00, 14:10, and 14:20. A timeline containing these three timestamps is constructed, and the center point (3,3.33,3) corresponding to 14:00 is placed at the 14:00 position on the timeline. The center points corresponding to 14:10 and 14:20 are also placed on the timeline in the same way.

[0137] b3. Integrate all the center points mapped to the time axis to generate an initial trajectory sequence containing spatial coordinates and timestamps.

[0138] Among them, the center point mapped to the time axis is the spatial coordinate that has been associated with the timestamp on the time axis; integration is the process of arranging these center points into a sequence in chronological order; the initial trajectory sequence is the sequence containing timestamps and corresponding spatial coordinates after integration; the generated result is the initial trajectory sequence containing spatial coordinates and timestamps.

[0139] In this embodiment, all center points mapped to the time axis are arranged in chronological order of timestamps to form a continuous sequence. Each timestamp corresponds to the spatial coordinates of a center point, generating an initial trajectory sequence. For example, on the time axis, 14:00 corresponds to (3,3.33,3), 14:10 corresponds to (5,4,5), and 14:20 corresponds to (4,5,4). This information is arranged into a sequence according to time order, which is the initial trajectory sequence.

[0140] This application provides the following specific example: When processing product data for brand A, iterating through the best matching positions, it finds that the timestamp 14:00 corresponds to three 3D point cloud data points with coordinates (2,3,4), (4,3,2), and (3,4,3). When calculating the center point, the X coordinate is (2+4+3)÷3=3, the Y coordinate is (3+3+4)÷3=3.33, and the Z coordinate is (4+2+3)÷3=3, thus obtaining the unique spatial coordinates (3,3.33,3) corresponding to 14:00; 14:10 corresponds to... Given two coordinates (6,5,6) and (4,3,4), we calculate X(6+4)÷2=5, Y(5+3)÷2=4, Z(6+4)÷2=5, and the center point is (5,4,5). We construct a time axis containing 14:00, 14:10, and 14:20, map the above center points to the corresponding timestamp positions, and then integrate them in chronological order to obtain an initial trajectory sequence containing 14:00(3,3.33,3), 14:10(5,4,5), and 14:20(4,5,4).

[0141] By executing b1 to b3, this embodiment of the application obtains a unique center point by processing multiple coordinates of the same timestamp, maps it to the complete time axis and integrates it, thus solving the problem of multiple coordinates corresponding to the same timestamp, so that each timestamp has a unique spatial coordinate, and the generated initial trajectory sequence is continuous in time and uniform in coordinates, providing a clear and consistent data foundation for subsequent trajectory processing.

[0142] In one possible embodiment, S13, based on the inbound and outbound product trajectory sequences corresponding to each store, the parameters of the local inventory prediction model corresponding to each store are encrypted and aggregated using a federated learning framework to construct a cross-regional inventory prediction model. Based on the cross-regional inventory prediction model, the spatiotemporal drift pattern of product inventory is identified, including:

[0143] Step 131: Based on the inbound and outbound product trajectory sequence, construct a local data set containing product location, time, and quantity.

[0144] Among them, the inbound and outbound goods trajectory sequence is a sequence that records the path of goods entering and leaving the warehouse, including spatial coordinates and timestamps; the goods location is the location of the goods at a certain moment; the time is the moment when the goods location changes; the quantity is the quantity of goods at the corresponding time and location; the local data set is a dataset that integrates the goods location, time and quantity, and is constructed based on the inbound and outbound goods trajectory sequence.

[0145] In this embodiment, based on the inbound and outbound product trajectory sequence, the location and corresponding time information of the products at different times are extracted. Combined with the quantity of products at that time and location, this information is integrated to construct a local data set containing product location, time, and quantity. For example, from the inbound and outbound trajectory sequence of brand A products, the location information of the product at 10:00 on the shelf of store B is extracted. Combined with the quantity of 50 products at that location at that time, the information "10:00, store B shelf, 50 items" is added to the local data set, and all relevant information is integrated in this way.

[0146] Step 132: Based on the local dataset, train the local merchandise inventory prediction model for each store to generate local model parameters for each store.

[0147] The local dataset is a dataset containing product location, time, and quantity; the local product inventory prediction model for each store is a model used by each store to predict its own inventory changes; and the local model parameters are the specific values ​​used in the local model to calculate the prediction results, which are generated based on the local dataset.

[0148] In this embodiment, based on the local dataset constructed in step 131, the product location, time, and quantity information within it are used to train local product inventory prediction models for each store. By continuously adjusting the values ​​in the model to match actual inventory changes, the model can reflect the inventory patterns of the store, ultimately generating local model parameters for each store. For example, store B uses information from its own local dataset to train the model, adjusting the parameters until the model can accurately predict inventory changes, thus generating local model parameters for store B.

[0149] Step 133: Using a federated learning framework, the local model parameters of each store are encrypted to ensure data privacy.

[0150] Among them, the federated learning framework is a tool that can integrate model information from various stores without sharing the original data; the local model parameters of each store are the specific values ​​in the model trained by each store; encryption is the process of transforming the local model parameters so that they cannot directly reflect the original data; data privacy refers to the state in which the original data of each store is not leaked.

[0151] In this embodiment, a federated learning framework is used to encrypt the local model parameters of each store generated in step 132. By transforming the parameter form, the parameters cannot be used to deduce the original data of each store. For example, the local model parameters of stores B and C are converted into specific codes to ensure that other parties cannot obtain the sales or inventory information of the two stores through these parameters.

[0152] Step 134: Aggregate the encrypted local model parameters to generate the final global model parameters. Based on the final global model parameters, construct a cross-regional inventory forecasting model.

[0153] Among them, the encrypted local model parameters are the encrypted model parameters of each store; aggregation is the process of merging multiple encrypted local model parameters into a global parameter; the final global model parameter is the parameter obtained after aggregation and used to build the cross-regional model; the cross-regional inventory forecasting model is a model built based on the global model parameters and used to predict the overall inventory changes in multiple regions.

[0154] In this embodiment of the application, the local model parameters of each store after encryption in step 133 are aggregated and the parameters are merged according to the proportion of the business scale of each store to obtain the final global model parameters. For example, if the business scale of store B accounts for 60% and store C accounts for 40%, then the global parameters are encrypted parameters of store B × 60% + encrypted parameters of store C × 40%. A cross-regional inventory prediction model is constructed based on these global parameters.

[0155] Step 135: Based on the cross-regional inventory forecasting model, analyze the changing trends of commodity inventory under different time and spatial dimensions, and identify the spatiotemporal drift pattern of commodity inventory based on the changing trends.

[0156] Among them, the cross-regional inventory forecasting model is a model used to predict inventory changes in multiple regions; different time dimensions refer to different time periods, such as weekdays and weekends; different spatial dimensions refer to different regions, such as the areas where different stores are located; the trend of commodity inventory changes is the direction of commodity inventory quantity changes over time and space; the spatiotemporal drift pattern is the pattern of commodity inventory transfer over time and space identified from the trend.

[0157] In this embodiment of the application, based on the cross-regional inventory forecasting model constructed in step 134, the inventory changes of goods at different times (e.g., weekdays and weekends) and in different regions (e.g., store B and store C regions) are analyzed, the changing trends are summarized, and the spatiotemporal drift pattern of the goods inventory is identified from the trends. For example, the analysis finds that the inventory of brand A goods decreases faster in region B on weekdays and faster in region C on weekends; this pattern is the spatiotemporal drift pattern.

[0158] This application provides the following specific example: From the inventory entry and exit trajectory sequences of Brand A products in stores B and C, information such as "80 items in the warehouse at 9:00" and "30 items on the shelf at 10:30" for store B, and "60 items in the warehouse at 9:00" and "20 items on the shelf at 11:00" for store C, is extracted to construct local datasets for both stores. Store B uses its own data to train a local model, adjusting the parameters to predict inventory changes, generating local parameter P1; store C similarly generates parameter P2. Using a federated learning framework, P1 is converted into code A, and P2 is converted into code B. Aggregated at a ratio of 60% for store B and 40% for store C, the global parameter = code A × 60% + code B × 40% is used to construct a cross-regional model. Analysis of this model reveals that on weekdays, inventory in region B decreases by an average of 50 items per day, while in region C it decreases by 20 items per day; on weekends, inventory in region B decreases by 20 items per day, while in region C it decreases by 50 items per day. From this trend, a spatiotemporal drift pattern of "inventory concentrating in region B on weekdays and in region C on weekends" is identified.

[0159] By executing steps 131 to 135, this embodiment of the application identifies the spatiotemporal drift pattern of product inventory by constructing a local data set, training a local model, encrypting aggregation parameters, and constructing a cross-regional model. This process protects the data privacy of each store while integrating multi-regional inventory patterns, revealing the changes in inventory over time and space, providing a reliable basis for generating dynamic cleaning rules, and improving the accuracy and efficiency of cross-regional inventory management.

[0160] In one possible embodiment, step 134 involves aggregating the encrypted local model parameters to generate the final global model parameters, and constructing a cross-regional inventory forecasting model based on the final global model parameters, including:

[0161] c1. Based on the volume of merchandise turnover and the amount of data in the inbound and outbound merchandise trajectory sequences of each store, determine the degree of influence of local model parameters during aggregation.

[0162] Among them, the merchandise turnover of each store refers to the total sales and inflow / outflow of merchandise in each store within a certain period of time; the data volume of the inbound and outbound merchandise trajectory sequence is the total amount of information recording the movement trajectory of merchandise; the local model parameters are the model parameters trained by each store to predict its own inventory; the degree of influence refers to the importance of the local model parameters to the global parameters when they are aggregated, which is determined based on the merchandise turnover and trajectory data volume; the generated result is the degree of influence of each local model parameter.

[0163] In this embodiment, the influence of local model parameters during aggregation is determined based on the volume of merchandise turnover and the amount of data in the inbound and outbound merchandise trajectory sequences of each store. Generally, stores with larger merchandise turnover or more trajectory data have a higher degree of parameter influence. For example, store B of brand A has a merchandise turnover of 600 items and 900 trajectory data; store C has a turnover of 300 items and 300 trajectory data. Assuming that turnover and data volume each account for 50% of the weight, store B's score is (600÷900+900÷1200)÷2=(0.67+0.75)÷2=0.71, and store C's score is (300÷900+300÷1200)÷2=(0.33+0.25)÷2=0.29. Therefore, store B's parameter influence is higher than store C's.

[0164] c2. Adjust the encrypted local model parameters according to their degree of influence, and aggregate the adjusted local model parameters to form preliminary global model parameters.

[0165] Among them, the encrypted local model parameters are the encrypted model parameters of each store; the degree of influence is the importance of each parameter during aggregation; adjustment is to assign corresponding weights to the parameters according to the degree of influence; aggregation is to merge the adjusted parameters into a global parameter; the preliminary global model parameters are the initial global parameters obtained after aggregation; the generated result is the preliminary global model parameters.

[0166] In this embodiment, the encrypted local model parameters are adjusted according to the degree of influence determined by c1, with higher weights assigned to parameters with higher influence. The adjusted parameters are then merged to form preliminary global model parameters. For example, if the influence of the encrypted parameters for store B is 70% and for store C is 30%, then after adjustment, the parameters for store B will have a weight of 70% and for store C 30%. The aggregated preliminary global model parameters = encrypted parameters for store B × 70% + encrypted parameters for store C × 30%.

[0167] c3. Based on the characteristics of merchandise inventory in different store areas, and combined with the movement range of merchandise in the inbound and outbound merchandise trajectory sequence of each area, the preliminary global model parameters are adjusted to obtain the final global model parameters.

[0168] Among them, the characteristics of commodity inventory in different store areas refer to the characteristics of inventory turnover speed and fluctuation range in each area; the movement range of commodities in the commodity trajectory sequence of each area is the distance or coverage of the commodity within the area; the preliminary global model parameters are the initial global parameters obtained after aggregation; the final global model parameters are the global parameters adjusted to adapt to the characteristics of the area; the generated result is the final global model parameters.

[0169] In this embodiment of the application, based on the characteristics of the inventory of goods in different store locations, such as the fast turnover and large fluctuations of inventory in region B and the slow turnover and small fluctuations of inventory in region C, and combined with the movement range of goods in each region, such as the wide movement range of goods in region B and the narrow range in region C, the initial global model parameters are adjusted, and the weights of parameters related to the regional characteristics are increased to obtain the final global model parameters.

[0170] c4. Based on the final global model parameters, construct a cross-regional inventory forecasting model.

[0171] The final global model parameters are global parameters adjusted to adapt to regional characteristics; the cross-regional inventory forecasting model is built based on the final global parameters and is used to predict inventory changes in multiple regions; the generated result is the cross-regional inventory forecasting model.

[0172] In this embodiment, the final global model parameters obtained from c3 are substituted into the model structure to construct a cross-regional inventory forecasting model. This enables the model to integrate the inventory patterns of various regions and predict inventory changes in multiple regions. For example, by substituting the final global parameters into the model, the model can simultaneously predict inventory quantity changes in regions B and C.

[0173] This application provides the following specific example: Brand A's store B has a product turnover of 600 units and 900 inbound / outbound tracking data points; store C has a turnover of 300 units and 300 tracking data points. When calculating the degree of influence, turnover and data volume each account for 50% weight. Store B's score is (600÷900+900÷1200)÷2=0.71, and store C's score is (300÷900+300÷1200)÷2=0.29, determining the influence of store B's parameters to be 70%, and store C's to be 30%. The encrypted parameters P1 for store B and P2 for store C are adjusted proportionally, resulting in the initial global parameter = P1×70% + P2×30%. Considering the characteristics of fast inventory turnover and wide movement range in region B, and slow turnover and narrow range in region C, the initial parameters are adjusted, and relevant weights are increased to obtain the final global parameter. Substituting the final parameter into the model structure, a cross-regional inventory prediction model is constructed, which can predict inventory changes in both regions.

[0174] By executing c1 to c4, this embodiment of the application determines the degree of influence of parameters of each store, adjusts and aggregates the parameters accordingly, and then optimizes them in combination with regional characteristics to obtain the final parameters. The constructed cross-regional inventory prediction model can take into account the data contribution of each store and regional characteristics, improve the accuracy and adaptability of inventory change prediction in multiple regions, and provide effective support for cross-regional inventory management.

[0175] Figure 2 This application provides a schematic diagram of the structure of an adaptive cleaning system for multi-channel retail data, as shown in the embodiments. Figure 2 As shown, the system includes:

[0176] The acquisition module 21 is used to collect multi-channel retail data and displacement trajectory data of retail products. The displacement trajectory data is divided into multiple data segments according to a preset time interval. The coordinates and timestamps in each data segment are spatiotemporally correlated to construct a spatiotemporal feature matrix.

[0177] The generation module 22 is used to scan the inventory of retail goods, generate three-dimensional point cloud data, and match the three-dimensional point cloud data and spatiotemporal feature matrix through a dynamic time warping algorithm to generate a sequence of inbound and outbound goods trajectories containing spatial coordinates.

[0178] The aggregation module 23 is used to encrypt and aggregate the parameters of the local inventory prediction model corresponding to each store based on the inbound and outbound product trajectory sequence of each store, and to build a cross-regional inventory prediction model. Based on the cross-regional inventory prediction model, the spatiotemporal drift pattern of product inventory is identified.

[0179] Output module 24 is used to input the inbound and outbound commodity trajectory sequence, spatiotemporal drift pattern and inventory level into the Long Short-Term Memory (LSTM) network to output the dynamic cleaning rules of commodity inventory. The spatiotemporal drift pattern is integrated into the gating mechanism of LSTM as an attention weight matrix.

[0180] The response module 25 is used to adaptively clean multi-channel retail data based on dynamic cleaning rules in response to the need for offline inventory updates triggered by online orders.

[0181] Figure 2 The aforementioned adaptive cleaning system for multi-channel retail data can perform... Figure 1 The implementation principle and technical effects of the adaptive cleaning method for multi-channel retail data described in the illustrated embodiment will not be repeated here. The specific methods by which each module and unit of the adaptive cleaning system for multi-channel retail data in the above embodiments are performed have been described in detail in the embodiments related to this method, and will not be elaborated upon here.

[0182] In one possible design, Figure 2 An adaptive cleaning system for multi-channel retail data, as illustrated in the embodiment, can be implemented as a computing device, such as... Figure 3 As shown, the computing device may include a storage component 31 and a processing component 32.

[0183] The storage component 31 stores one or more computer instructions, wherein the one or more computer instructions are invoked and executed by the processing component 32.

[0184] The processing component 32 is used to execute the following processes: collecting multi-channel retail data and displacement trajectory data of retail goods; dividing the displacement trajectory data into multiple data segments according to a preset time interval; spatiotemporally associating the coordinates and timestamps within each data segment to construct a spatiotemporal feature matrix; scanning the inventory of retail goods to generate three-dimensional point cloud data; matching the three-dimensional point cloud data and the spatiotemporal feature matrix using a dynamic time warping algorithm to generate an inbound / outbound goods trajectory sequence containing spatial coordinates; based on the inbound / outbound goods trajectory sequences corresponding to each store, using a federated learning framework to encrypt and aggregate the parameters of the local inventory prediction model corresponding to each store to construct a cross-regional inventory prediction model; based on the cross-regional inventory prediction model, identifying the spatiotemporal drift pattern of the goods inventory; inputting the inbound / outbound goods trajectory sequence, the spatiotemporal drift pattern, and the inventory level into a Long Short-Term Memory (LSTM) network to output dynamic cleaning rules for the goods inventory; the spatiotemporal drift pattern is integrated into the gating mechanism of the LSTM as an attention weight matrix; and based on the dynamic cleaning rules, adaptively cleaning the multi-channel retail data to respond to the demand for offline inventory updates triggered by online orders.

[0185] The processing component 32 may include one or more processors to execute computer instructions to complete all or part of the steps in the above-described method. Alternatively, the processing component may be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described method.

[0186] Storage component 31 is configured to store various types of data to support operations at the terminal. The storage component can be implemented from any type of volatile or non-volatile storage device or a combination thereof, such as Random Access Memory (RAM), Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0187] Of course, computing devices may also include other components, such as input / output interfaces, display components, communication components, etc.

[0188] Input / output interfaces provide interfaces between processing components and peripheral interface modules, which can be output devices, input devices, etc.

[0189] The communication components are configured to facilitate wired or wireless communication between computing devices and other devices.

[0190] The computing device can be a physical device or an elastic computing host provided by a cloud computing platform. In this case, the computing device can refer to a cloud server, and the aforementioned processing components, storage components, etc., can be basic server resources rented or purchased from the cloud computing platform.

[0191] This application also provides a computer storage medium storing a computer program, which, when executed by a computer, can perform the above-described functions. Figure 1 An adaptive cleaning method for multi-channel retail data is shown in the embodiment.

[0192] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0193] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0194] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. An adaptive cleaning method for multi-channel retail data, characterized in that, The method comprises the following steps: Collecting multi-channel retail data and displacement trajectory data of retail goods, dividing the displacement trajectory data into multiple data segments according to a preset time interval, associating the coordinates and time stamps in each data segment in space-time, and constructing a space-time feature matrix; Scanning the inventory of retail goods to generate three-dimensional point cloud data, and matching the three-dimensional point cloud data and the space-time feature matrix through a dynamic time warping algorithm to generate an in-and-out warehouse goods trajectory sequence containing spatial coordinates; Based on the in-and-out warehouse goods trajectory sequence corresponding to each store, using a federated learning framework to encrypt and aggregate the local inventory prediction model parameters corresponding to each store to construct a cross-regional inventory prediction model, and identifying the space-time drift pattern of the goods inventory based on the cross-regional inventory prediction model; Inputting the in-and-out warehouse goods trajectory sequence, the space-time drift pattern and the inventory level into a long short-term memory (LSTM) network to output a dynamic cleaning rule for the goods inventory, and the space-time drift pattern is taken as an attention weight matrix and integrated into the gating mechanism of the LSTM; Based on the dynamic cleaning rule, the multi-channel retail data is adaptively cleaned to respond to the demand for updating the offline inventory triggered by online orders.

2. The method of claim 1, wherein, The method comprises the following steps: Inputting the in-and-out warehouse goods trajectory sequence, the space-time drift pattern and the inventory level into a long short-term memory (LSTM) network to output a dynamic cleaning rule for the goods inventory, and the space-time drift pattern is taken as an attention weight matrix and integrated into the gating mechanism of the LSTM; Based on the dynamic cleaning rule, the multi-channel retail data is adaptively cleaned to respond to the demand for updating the offline inventory triggered by online orders. The method comprises the following steps: Inputting the in-and-out warehouse goods trajectory sequence, the space-time drift pattern and the inventory level into a long short-term memory (LSTM) network to output a dynamic cleaning rule for the goods inventory, and the space-time drift pattern is taken as an attention weight matrix and integrated into the gating mechanism of the LSTM; 3. The method of claim 2, wherein, Based on the dynamic cleaning rule, the multi-channel retail data is adaptively cleaned to respond to the demand for updating the offline inventory triggered by online orders. The method comprises the following steps: Inputting the in-and-out warehouse goods trajectory sequence, the space-time drift pattern and the inventory level into a long short-term memory (LSTM) network to output a dynamic cleaning rule for the goods inventory, and the space-time drift pattern is taken as an attention weight matrix and integrated into the gating mechanism of the LSTM; Based on the dynamic cleaning rule, the multi-channel retail data is adaptively cleaned to respond to the demand for updating the offline inventory triggered by online orders. The method comprises the following steps: Inputting the in-and-out warehouse goods trajectory sequence, the space-time drift pattern and the inventory level into a long short-term memory (LSTM) network to output a dynamic cleaning rule for the goods inventory, and the space-time drift pattern is taken as an attention weight matrix and integrated into the gating mechanism of the LSTM; Based on the dynamic cleaning rule, the multi-channel retail data is adaptively cleaned to respond to the demand for updating the offline inventory triggered by online orders. The method comprises the following steps: Inputting the in-and-out warehouse goods trajectory sequence, the space-time drift pattern and the inventory level into a long short-term memory (LSTM) network to output a dynamic cleaning rule for the goods inventory, and the space-time drift pattern is taken as an attention weight matrix and integrated into the gating mechanism of the LSTM; Based on the dynamic cleaning rule, the multi-channel retail data is adaptively cleaned to respond to the demand for updating the offline inventory triggered by online orders. The method comprises the following steps: Inputting the in-and-out warehouse goods trajectory sequence, the space-time drift pattern and the inventory level into a long short-term memory (LSTM) network to output a dynamic cleaning rule for the goods inventory, and the space-time drift pattern is taken as an attention weight matrix and integrated into the gating mechanism of the LSTM; Based on the dynamic cleaning rule, the multi-channel retail data is adaptively cleaned to respond to the demand for updating the offline inventory triggered by online orders. The spatio-temporal weighted feature vector is processed through a loop structure of the long short-term memory network (LSTM) network to obtain a final hidden state; Based on a preset mapping relationship, the final hidden state is mapped to a rule set containing multi-dimensional parameters, and a dynamic cleaning rule of the commodity inventory is generated based on the rule set.

4. The method of claim 1, wherein, The matching of the three-dimensional point cloud data and the spatio-temporal feature matrix based on the dynamic time warping algorithm generates a warehouse-in and warehouse-out commodity trajectory sequence containing spatial coordinates, including: The three-dimensional point cloud data is arranged in time sequence to form a three-dimensional point cloud sequence containing spatial coordinates and time stamps; From the spatio-temporal feature matrix, the spatial coordinates and time stamp information matching each time stamp in the three-dimensional point cloud sequence are extracted, and based on the matched spatial coordinates and the time stamp information, a reference trajectory sequence is constructed; The dynamic time warping algorithm is used to establish a correspondence between the three-dimensional point cloud sequence and the reference trajectory sequence, and based on the correspondence, the best matching position of each three-dimensional point cloud data in the reference trajectory sequence is determined; Based on the best matching position, the spatial coordinates in the three-dimensional point cloud sequence are mapped onto the time axis of the reference trajectory sequence to generate an initial trajectory sequence containing spatial coordinates and time stamps; The initial trajectory sequence is smoothed to eliminate discontinuous points caused by matching errors, and a warehouse-in and warehouse-out commodity trajectory sequence containing spatial coordinates is obtained.

5. The method of claim 4, wherein, The matching of the three-dimensional point cloud data and the spatio-temporal feature matrix based on the dynamic time warping algorithm generates a warehouse-in and warehouse-out commodity trajectory sequence containing spatial coordinates, including: Iterate through the best matching position, and if there are multiple three-dimensional point cloud data corresponding to the same time stamp, calculate the center point of the spatial coordinates of the multiple three-dimensional point cloud data corresponding to the same time stamp, and take the center point as the unique spatial coordinate corresponding to the same time stamp; A time axis covering all time stamps in the reference trajectory sequence is constructed, and the center points are mapped onto the time axis according to the corresponding time stamps; All center points mapped onto the time axis are integrated to generate an initial trajectory sequence containing spatial coordinates and time stamps.

6. The method of claim 1, wherein, Based on the warehouse-in and warehouse-out commodity trajectory sequences corresponding to each store, the local inventory prediction model parameters corresponding to each store are encrypted and aggregated using a federated learning framework to construct a cross-regional inventory prediction model, and based on the cross-regional inventory prediction model, the spatio-temporal drift pattern of the commodity inventory is identified, including: Based on the warehouse-in and warehouse-out commodity trajectory sequences, a local data set containing commodity location, time and quantity is constructed; Based on the local data set, a local inventory prediction model of each store is trained to generate local inventory prediction model parameters of each store; The local inventory prediction model parameters of each store are encrypted using a federated learning framework to ensure data privacy; The encrypted local inventory prediction model parameters are aggregated to generate final global model parameters, and based on the final global model parameters, a cross-regional inventory prediction model is constructed; Based on the cross-regional inventory prediction model, the change trend of the commodity inventory in different time and different space dimensions is analyzed, and based on the change trend, the spatio-temporal drift pattern of the commodity inventory is identified.

7. The method of claim 6, wherein, The encrypted local inventory prediction model parameters are aggregated to generate final global model parameters, and based on the final global model parameters, a cross-regional inventory prediction model is constructed, which includes: Based on the commodity flow volume of each store and the data volume of the warehouse-in and warehouse-out commodity trajectory sequence, the influence degree of the local inventory prediction model parameters in aggregation is determined; The encrypted local inventory prediction model parameters are adjusted according to the influence degree, and the adjusted local inventory prediction model parameters are aggregated to form preliminary global model parameters; Based on the commodity inventory characteristics of different store regions and the moving range of commodities in the warehouse-in and warehouse-out commodity trajectory sequence of each region, the preliminary global model parameters are adjusted to obtain the final global model parameters; According to the final global model parameters, a cross-regional inventory prediction model is constructed.

8. An adaptive cleaning system for multi-channel retail data, characterized in that, It includes: The acquisition module is used for collecting multi-channel retail data and displacement trajectory data of retail commodities, dividing the displacement trajectory data into multiple data segments according to a preset time interval, associating the coordinates and time stamps in each data segment in space-time, and constructing a space-time feature matrix; The generation module is used for scanning the inventory of retail commodities, generating three-dimensional point cloud data, and matching the three-dimensional point cloud data and the space-time feature matrix through a dynamic time warping algorithm to generate a warehouse-in and warehouse-out commodity trajectory sequence containing spatial coordinates; The aggregation module is used for encrypting and aggregating the local inventory prediction model parameters of each store based on the warehouse-in and warehouse-out commodity trajectory sequence corresponding to each store using a federated learning framework, constructing a cross-regional inventory prediction model, and identifying the spatio-temporal drift pattern of the commodity inventory based on the cross-regional inventory prediction model; The output module is used for inputting the warehouse-in and warehouse-out commodity trajectory sequence, the spatio-temporal drift pattern and the inventory level into a long short-term memory (LSTM) network to output a dynamic cleaning rule for the commodity inventory, and the spatio-temporal drift pattern is used as an attention weight matrix and integrated into the gating mechanism of the LSTM; The response module is used for adaptively cleaning the multi-channel retail data based on the dynamic cleaning rule to respond to the demand for updating offline inventory triggered by online orders.

9. A computing device, comprising: It includes a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to realize the adaptive cleaning method of multi-channel retail data according to any one of claims 1-7.

10. A computer storage medium, characterized in that, The computer program is stored in the computer, and when the computer program is executed by the computer, the adaptive cleaning method of multi-channel retail data according to any one of claims 1-7 is realized.

Citation Information

Patent Citations

  • Inventory optimization method and system based on deep learning model

    CN119338511A

  • Multi-platform e-commerce order management method and system based on cloud data analysis

    CN120146958A