Intelligent food inventory management method and system
Through the random forest model trained by machine learning, the information asymmetry and untimely message problems in the inventory management of food enterprises are solved, intelligent inventory prediction and management are realized, and inventory utilization and enterprise competitiveness are improved.
Patent Information
- Application Number
- CN202411217095.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Food companies face information asymmetry and untimely news in the food purchase and sales process, which leads to unscientific inventory management, which increases inventory costs and sales risks, and cannot meet the competitive needs of the modern market.
The random forest model is trained using machine learning methods, predict food sales and inventory demand through data preprocessing, feature extraction and model optimization, formulate intelligent inventory management strategies, and monitor and adjust strategies in real time to optimize inventory management.
It improves the scientificity and accuracy of inventory management, reduces inventory costs, improves the competitiveness and profitability of enterprises, and adapts to market changes and demand fluctuations.
Smart Images

Figure CN119168536A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of food management, and in particular to an intelligent food inventory management method and system. Background Art
[0002] With the progress and development of society, the food industry is facing increasingly complex management challenges. The traditional extensive management model in the food field can no longer meet the needs of enterprises and companies in today's highly competitive market environment. In such a competitive and changing environment, companies need to manage their food inventory more scientifically and meticulously to ensure that the high-quality products produced can be obtained by consumers in a timely manner, while maintaining the company's good reputation and competitive advantage.
[0003] At present, faced with huge amounts of food product data, companies often face problems of information asymmetry and untimely news. In the food purchasing and sales process, if the inventory situation and market demand cannot be monitored in a timely and accurate manner, it will easily lead to product surplus or insufficient supply, which will not only increase the company's inventory costs, but may also lead to a decline in sales performance and even cause company property losses.
[0004] With the progress and development of society, the original extensive management model in the food field can no longer meet the needs of the development of enterprises and companies. Faced with huge food product data, there are often untimely news and information asymmetry in the food purchasing and sales links, and it is impossible to scientifically manage and monitor the purchasing, sales and after-sales links, which reduces the company's operating efficiency and causes property losses to the company.
[0005] Therefore, food companies are currently in urgent need of an intelligent food inventory management method that can provide more intelligent and technological solutions to achieve refined and optimized food inventory management. Summary of the invention
[0006] Purpose of the invention: In order to overcome the above shortcomings, the purpose of the present invention is to provide an intelligent food inventory management method.
[0007] In order to solve the above technical problems, the present invention provides an intelligent food inventory management method, comprising: Step S1: generating a data set according to the collected historical food inventory data, and then performing data preprocessing on the data set; Step S2: using a machine learning method to continuously train the data set to obtain an inventory management model, including: extracting features and performing feature engineering on the data set, training the random forest model on the processed data set, evaluating and tuning the trained random forest model, and setting the best performing random forest model as the inventory management model; Step S3: deploying the inventory management model and continuously collecting real-time food inventory management data; Step S4: inputting the food inventory management data into the inventory management model, predicting the sales volume and inventory demand of the preset food within a preset time, and generating food prediction results; Step S5: Formulate a preset food inventory management strategy based on the food prediction results, and feed back the inventory management strategy to the preset terminal.
[0008] As a preferred embodiment of the present invention, in step S1, the method comprises the following steps: Step S10: Collecting historical food inventory data, including: food sales data, inventory data and transportation records; Step S11: cleaning and preprocessing the collected food historical inventory data, including at least one of removing outliers, filling missing values, and converting data formats.
[0009] As a preferred embodiment of the present invention, in step S2, the method comprises the following steps: Step S20: extracting relevant features based on preset feature factors in the historical food inventory data; Step S21: Perform feature selection based on the extracted relevant features: remove redundant or irrelevant features and retain the most informative and influential features; Step S22: combining the relevant features after feature selection with the model requirements to construct a preset combined feature; Step S23: Encode the preset combined features, convert the categorical features into numerical features or map the categorical features into integer labels.
[0010] As a preferred embodiment of the present invention, in step S2, the method further comprises the following steps: Step S24: Divide the processed data set into a training set and a validation set; Step S25: training multiple decision trees on the training set to construct a random forest model; Step S26: Use the validation set to evaluate the trained random forest model, compare the performance of the model under different parameters, and then optimize the model performance by adjusting the parameters of the random forest model; Step S27: According to the evaluation results, the best performing random forest model is selected for application and set as the inventory management model.
[0011] As a preferred embodiment of the present invention, in step S25, the method further comprises the following steps: Step S250: In each decision tree, for each node split, randomly select a preset proportion of features from all features in the training set; Step S251: According to each decision tree, a subset is randomly selected from the original training set; Step S252: constructing a preset number of decision trees based on the randomly selected features and subsets; Step S253: training each decision tree independently: selecting a node and a preset feature, calculating information gain or average error, selecting a split point that minimizes information gain or average error for node splitting, and repeating the splitting process at each node until the stop condition of the decision tree is met; Step S254: Integrate all independently trained decision trees to construct a random forest model.
[0012] As a preferred embodiment of the present invention, in step S26, the method further comprises the following steps: Step S260: adjusting the hyperparameters of the random forest model, including: the number of trees, the depth of the tree, and the minimum number of leaf node samples; Step S261: using a cross-validation method to evaluate each hyperparameter combination and calculate the evaluation index under each hyperparameter combination; Step S262: Finally, the hyperparameter combination that optimizes the evaluation index is selected as the hyperparameter of the final random forest model.
[0013] As a preferred embodiment of the present invention, in step S5, the method further comprises the following steps: Step S50: Analyze the food forecast results of the inventory management model to obtain the sales volume and inventory demand of the preset food within a preset time; Step S51: Optimizing the inventory level and inventory strategy of the preset food according to the food forecast result; Step S52: Optimizing the inventory layout and storage location of the preset food according to the regional distribution of food sales and the food forecast results; Step S53: Optimizing the transportation route and method of the preset food according to the food transportation data and the food prediction results; Step S54: Optimizing the transportation batch and frequency of the preset food according to the food transportation cost and the food prediction result; Step S55: Formulate a preset food inventory management strategy based on the preset optimized inventory level, inventory strategy, inventory layout, storage location, transportation route and method, and transportation batch and frequency.
[0014] As a preferred embodiment of the present invention, after the inventory management model is deployed, the method further comprises the following steps: Step S100: retraining the inventory management model using the latest food inventory management data at a preset time interval to complete the update of the inventory management model; Step S101: monitor the implementation effect of the inventory management strategy in real time, adjust and improve the inventory management strategy according to the implementation effect, and feed back the updated inventory management strategy to the preset terminal.
[0015] As a preferred embodiment of the present invention, in step S3, the method further comprises the following steps: Step S30: extracting real-time food inventory data according to the food inventory management data, and feeding back the real-time food inventory data to the monitoring terminal; Step S31: Based on the food inventory data, use time series analysis and / or anomaly detection analysis methods to determine whether there are any abnormal problems with the inventory food. If so, feedback the abnormal information to the monitoring terminal. If not, return to step S30 and re-extract the real-time food inventory data.
[0016] The present invention also provides an intelligent food inventory management system, comprising: A food data module, used to generate a data set based on the collected historical food inventory data, and then perform data preprocessing on the data set; The model training module is used to continuously train the data set using a machine learning method to obtain an inventory management model, including: extracting features and performing feature engineering on the data set, training the random forest model on the processed data set, building multiple decision trees, evaluating and tuning the trained random forest model, and then setting the best performing random forest model as the inventory management model; The food forecasting module is used to deploy the inventory management model and continuously collect real-time food inventory management data, and then input the food inventory management data into the inventory management model to predict the sales volume and inventory demand of the preset food within the preset time and generate the food preset results; The strategy generation module is used to formulate a storage strategy for a preset product according to the food prediction result, and feed back the storage strategy to a preset terminal.
[0017] The above technical solution of the present invention has the following advantages compared with the prior art: 1. Use machine learning methods to train the inventory management model. Through continuous iteration and optimization, the random forest model with the best performance is obtained. This can automatically adjust the model parameters according to the actual situation, improve the generalization ability and adaptability of the model, make the inventory management strategy more intelligent and effective, make inventory management more scientific and accurate, and better predict and manage food inventory demand.
[0018] 2. By real-time monitoring of the implementation effect of inventory management strategies, timely adjustment and improvement of strategies, and feedback of updated strategies to preset terminals, this real-time data processing and feedback mechanism can maintain the timeliness and accuracy of inventory management strategies and ensure the efficient implementation of inventory management; at the same time, by adjusting the model's hyperparameters and optimizing model performance, the model's prediction accuracy and generalization ability are continuously improved. This continuous model update and performance optimization can maintain the model's effectiveness and stability and adapt to market changes and demand fluctuations.
[0019] 3. By analyzing food forecast results and optimizing key parameters, inventory management strategies can be made more flexible and accurate. The optimization and real-time adjustment of such strategies can improve inventory utilization and reduce inventory costs, thereby enhancing the competitiveness and profitability of the company. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0021] Figure 1 It is a flow chart of the intelligent food inventory management method provided by an embodiment of the present invention.
[0022] Figure 2 It is a flow chart of a data preprocessing method provided by an embodiment of the present invention.
[0023] Figure 3 It is a flow chart of a feature processing method provided by an embodiment of the present invention.
[0024] Figure 4 It is a flow chart of the random forest model training method provided by an embodiment of the present invention.
[0025] Figure 5 It is a flow chart of a method for constructing a random forest model provided by an embodiment of the present invention.
[0026] Figure 6 It is a flow chart of a method for optimizing a random forest model provided by an embodiment of the present invention.
[0027] Figure 7 It is a flow chart of the inventory management strategy formulation method provided by an embodiment of the present invention.
[0028] Figure 8 It is a flow chart of a model and strategy updating method provided by an embodiment of the present invention.
[0029] Fig. 9It is a flow chart of a data anomaly detection method provided by an embodiment of the present invention.
[0030] Fig.10 It is a schematic diagram of module connections of the intelligent food inventory management system provided by an embodiment of the present invention.
[0031] Description of the Figures in the Specification: 100. Data processing module, 101. Food data module, 102. Model training module, 103. Food prediction module, 104. Strategy generation module. DETAILED DESCRIPTION
[0032] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0033] refer to Figure 1 As shown, in some embodiments, a smart food inventory management method includes the following steps: Step S1: Generate a data set based on the collected historical food inventory data, and then perform data preprocessing on the data set.
[0034] Specifically, refer to Figure 2 As shown, in step S1, the method further includes the following steps: Step S10: Collecting historical food inventory data, including food sales data, inventory data and transportation records.
[0035] Specifically, these data can come from various sources, including but not limited to: sensors: used to monitor environmental conditions, transportation status, etc.; warehouse management system: record inventory information, warehousing and outbound records, etc.; transportation records: record the location of the transport vehicle, transportation route, transportation time, etc.; sales system: record product sales, order information, etc.; environmental monitoring equipment: monitor the temperature, humidity and other parameters of the storage environment; integrate these data into a unified database for storage and management.
[0036] Step S11: Clean and preprocess the collected food historical inventory data, including at least one of removing outliers, filling missing values, and converting data formats to ensure data quality and consistency for subsequent analysis and modeling.
[0037] Specifically, when removing outliers, according to the characteristics of the data and business needs, select a suitable outlier detection method, such as a statistical method (such as Z-score), a distance-based method (such as isolation forest), etc., and then remove the outliers in the data according to the results of the outlier detection; for example, if the Z-score method is used: in, is the value of the data, is the mean of the data, is the standard deviation of the data, if If the absolute value of is greater than the threshold set by the debugger, the data point is considered abnormal.
[0038] Specifically, when filling missing values, the missing value statistics are performed on the data to determine the location and number of missing values, and then according to the distribution and characteristics of the data, the appropriate filling method is selected, such as mean, median, interpolation, etc. For categorical data, the mode can be used to fill missing values; for example, taking mean filling as an example: in, is the data with non-missing values, is the number of nonmissing values.
[0039] Specifically, when performing data format conversion, the data is converted into a unified format, such as numerical type, categorical type, etc., to facilitate subsequent analysis and modeling.
[0040] For example, suppose there is a set of food temperature monitoring data, which contains the temperature data recorded by the temperature sensor every hour. During the data preprocessing process: first, the Z-score method is used to detect outliers, and data points that differ too much from the average temperature are regarded as outliers and removed; then for missing values, the average temperature of each day can be calculated, and this value can be used to fill the missing hourly data; finally, the temperature data is converted into a numerical format to facilitate subsequent analysis and modeling.
[0041] Step S2: Use machine learning methods to continuously train the data set to obtain an inventory management model, including: extracting features and performing feature engineering on the data set, training the random forest model on the processed data set, evaluating and tuning the trained random forest model, and setting the best performing random forest model as the inventory management model.
[0042] Specifically, refer to Figure 3 As shown, in step S2, the method further includes the following steps: Step S20: extracting relevant features based on preset feature factors in the historical food inventory data.
[0043] Specifically, the preset feature factors are set by the debugging personnel according to actual needs. For example, relevant features are extracted based on seasonal trends, market activities, promotional activities and other factors in historical data. For example, time feature extraction: extracting time features such as season, month, day of the week from date data to capture seasonal trends; market activity feature extraction: extracting market activity features related to sales, such as exhibitions, promotional activities, etc., based on historical records of market activities. Promotion activity feature extraction: extracting promotion activity features related to sales, such as discounts, coupons, etc., based on historical records of promotion activities.
[0044] Step S21: Based on the extracted relevant features, feature selection is performed: redundant or irrelevant features are eliminated, and the most informative and influential features are retained to improve the generalization ability and efficiency of the model.
[0045] Step S22: Combine the relevant features after feature selection with the model requirements to construct a preset combined feature.
[0046] Specifically, the preset combination features are set by the debugging personnel according to actual needs to construct new features according to domain knowledge or model needs; illustratively, new features are constructed by combining, aggregating or deriving existing features to improve the performance of the model, for example, new time features or promotional features are constructed based on the information of sales dates and promotional activities, such as whether it is a holiday, whether there is a promotional activity, etc.
[0047] Step S23: Encode the preset combined features, convert the categorical features into numerical features or map the categorical features into integer labels.
[0048] Specifically, the extracted features are encoded, and the categorical features are converted into numerical features, such as one-hot encoding or label encoding, to facilitate model training and prediction; wherein one-hot encoding is to convert categorical features into binary numerical features; label encoding is to map categorical features into integer labels; illustratively, seasonal features are one-hot encoded, and market activity and promotion activity features are binary encoded to facilitate model training and prediction; further, continuous features can also be standardized or normalized, and the standardization process is: in, is the original eigenvalue, is the mean of the feature, is the standard deviation of the feature; The normalization process is: in, is the original eigenvalue, is the minimum value of the feature, is the maximum value of the feature.
[0049] refer to Figure 4 As shown, after feature extraction and feature engineering processing, the method further includes the following steps: Step S24: Divide the processed data set into a training set and a validation set. Usually, 70% of the data is used as the training set and 30% of the data is used as the validation set.
[0050] Step S25: Train multiple decision trees on the training set to build a random forest model.
[0051] Specifically, refer to Figure 5 As shown, in step S25, the method further includes the following steps: Step S250: In each decision tree, for each node split, a preset proportion of features are randomly selected from all the features in the training set. Random forests are composed of a large number of decision trees. When constructing a decision tree, features are randomly selected for splitting, and each decision tree randomly selects features for splitting. This will happen no matter what features are selected, even if they are repeated features; each decision tree contains many branches, each branch is a feature, and if the features of each branch are the same, then the feature is the optimal feature.
[0052] For example, suppose there is a data set with 7 features, and random feature selection is used when building the decision tree, and 3 features are randomly selected for consideration at each split; Initial node: At the root node of the decision tree, randomly select features 1, 4, and 7 for consideration; First split: The first split is performed based on the three random features selected by the initial node. Assuming that feature 1 is selected for splitting, the data set is divided into two parts according to the threshold set for feature 1: one part is the samples whose feature 1 is greater than the threshold, and the other part is the samples whose feature 1 is less than or equal to the threshold; Second split: On each child node, randomly select some of the three features for the second split. Suppose in the first child node, feature 4 and feature 7 are selected for splitting; in the second child node, feature 2 and feature 5 are selected for splitting; In this way, each node only considers some features when splitting instead of using all features, which helps ensure that each decision tree is trained based on a different subset of features, increases the diversity of the model, improves the generalization performance of the model, and prevents the model from being overly dependent on certain specific features.
[0053] Step S251: According to each decision tree, a subset is randomly selected from the original training set.
[0054] Specifically, for the training of each decision tree, a data subset is randomly selected from the original data set so that each decision tree can be trained on a different data subset.
[0055] Step S252: construct a preset number of decision trees based on the randomly selected features and subsets.
[0056] Specifically, the preset number is set by the commissioning personnel according to actual needs.
[0057] Step S253: Train each decision tree independently: select a node and preset features, calculate information gain or average error, select a split point that minimizes information gain or average error to split the node, and repeat the splitting process at each node until the stop condition of the decision tree is met.
[0058] Specifically, when each decision tree is trained independently, the CART (Classification And Regression Tree) decision tree algorithm is used, where: for classification problems, the splitting of each node is based on information gain (Entropy); for regression problems, the splitting of nodes is based on minimizing the mean squared error (Mean Squared Error).
[0059] The calculation process of the information gain is as follows: First, calculate the entropy of the training set: in, is the entropy of the training set, is the number of categories, It is The proportion of samples that are Second, calculate the conditional entropy of the feature: Among them, conditional entropy refers to the expected value of the entropy of the training set when the features are known; It is a feature The set of all possible values of is the feature in the training set The value is A subset of samples, Is a subset The number of samples, Is the training set The total number of samples; Then, calculate the information gain: in, It is a feature For the training set The information gain of
[0060] The calculation process of minimizing the mean square error is as follows: First, calculate the mean square error of the node: For a containing The formula for the mean square error of a node with samples is: in, It is The actual value of the samples, is the mean of all samples of the node, and the calculation formula is: Secondly, calculate the mean square error after splitting: Assume a feature A value of is selected as the split point, and the data set Divide into two subsets: left subset and right subset , respectively including and samples, the mean square error after splitting is the weighted average mean square error of the two subsets, and the calculation formula is: in, and are the mean square errors of the left and right subsets, respectively, and are calculated in the same way as the mean square error of the node; Then, choose the best split point: By traversing all possible splitting points of all features, calculating the mean square error after splitting, and selecting the features and splitting points that minimize the mean square error after splitting.
[0061] Using the features and splitting points with the smallest mean square error can improve prediction accuracy and generate more meaningful splits: the mean square error measures the square difference between the predicted value and the actual value. By selecting the features and splitting points that minimize the mean square error after splitting, it can ensure that the samples of the child nodes are more concentrated and consistent after each split, thereby improving the accuracy of the prediction; the feature that minimizes the mean square error after splitting is usually the most discriminative feature of the current node. Such a selection can ensure that each split of the model is performed on the most effective feature at the moment, thereby generating more meaningful splits and making the decision tree more interpretable and understandable.
[0062] Step S254: Integrate all independently trained decision trees to construct a random forest model.
[0063] Step S26: Use the validation set to evaluate the trained random forest model, compare the performance of the model under different parameters, and then optimize the model performance by adjusting the parameters of the random forest model.
[0064] Specifically, refer to Figure 6 As shown, in step S26, the method further includes the following steps: Step S260: Adjust the hyperparameters of the random forest model, including: the number of trees, the depth of the tree, and the minimum number of leaf node samples.
[0065] Step S261: Use the cross-validation method to evaluate each hyperparameter combination and calculate the evaluation index under each hyperparameter combination.
[0066] The evaluation indicators include but are not limited to mean square error, mean absolute error, accuracy, precision, recall rate, etc., which are set by the debugging personnel according to actual needs.
[0067] Step S262: Finally, the hyperparameter combination that optimizes the evaluation index is selected as the hyperparameter of the final random forest model.
[0068] Step S27: According to the evaluation results, the best performing random forest model is selected for application and set as the inventory management model.
[0069] Step S3: deploying the inventory management model and continuously collecting real-time food inventory management data; Specifically, when continuously collecting real-time food inventory management data, formulate a data collection plan to determine the frequency, time point and data content of data collection, for example, real-time monitoring of environmental parameters, collecting data once every hour; recording transportation information, collecting data after each transportation, etc.; Standardize the format of the collected data to ensure data consistency and comparability, and unify data naming specifications, unit identifiers, timestamp formats, etc.
[0070] The collected data can be stored and managed through a unified data platform. You can choose to use a database system (such as MySQL, PostgreSQL) or a big data platform (such as Hadoop, Spark) for data storage and management.
[0071] Step S4: Input the food inventory management data into the inventory management model, predict the sales volume and inventory demand of the preset food within the preset time, and generate the food prediction result.
[0072] Specifically, the preset time and preset food are preset by the debugging personnel according to actual needs.
[0073] Step S5: Formulate a preset food inventory management strategy based on the food prediction results, and feed back the inventory management strategy to the preset terminal.
[0074] Specifically, refer to Figure 7 As shown, in step S5, the method further includes the following steps: Step S50: Analyze the food prediction results of the inventory management model to obtain the sales volume and inventory demand of the preset food within a preset time.
[0075] For example, high-selling products and low-selling products, as well as trends such as seasonal changes in sales, can be identified based on the forecast results.
[0076] Step S51: Optimize the inventory level and inventory strategy of the preset food according to the food prediction results.
[0077] Exemplarily, inventory reserves are increased for high-selling products to ensure adequate supply and avoid stock-outs, and inventory levels are reduced for low-selling products to reduce excess inventory and reduce inventory costs.
[0078] Step S52: Optimize the inventory layout and storage location of the preset food according to the regional distribution of food sales and the food forecast results.
[0079] For example, high-selling products can be placed in warehouses close to sales markets to shorten supply chain time and reduce transportation costs. Cross-regional or distributed warehousing models can be adopted to flexibly adjust inventory layout according to sales demand in different regions.
[0080] Step S53: Optimize the transportation route and method of the preset food according to the food transportation data and the food prediction results.
[0081] For example, the optimal transportation route is selected, taking into account factors such as traffic conditions, transportation distance, and transportation costs to reduce transportation time and costs, and considering using multiple transportation methods such as multimodal transport or container transport to improve transportation efficiency and flexibility.
[0082] Step S54: Optimize the transportation batch and frequency of the preset food according to the food transportation cost and the food prediction result.
[0083] For example, for high-volume products and long-distance transportation routes, increase the shipping batch and frequency to ensure timely supply and reduce transportation costs, and for low-volume products and short-distance transportation routes, reduce the shipping batch and frequency to reduce inventory backlogs and transportation costs.
[0084] Step S55: Formulate a preset food inventory management strategy based on the preset optimized inventory level, inventory strategy, inventory layout, storage location, transportation route and method, and transportation batch and frequency.
[0085] In some embodiments, reference Figure 8 As shown, after the inventory management model is deployed, the method further includes the following steps: Step S100: retraining the inventory management model using the latest food inventory management data at a preset time interval to complete the update of the inventory management model; Specifically, the model is updated regularly and retrained with the latest data to adapt to the ever-changing market environment and demand. Model parameters and features are adjusted according to actual results and feedback information to continuously optimize prediction performance. When updating, new data is added to the existing data set, and the training set and validation set are re-divided. If the amount of data is large, the incremental training method can be used to update the model using only the newly added data; then the random forest model is retrained based on the latest data, and the model parameters are adjusted to optimize performance. For example, the number of decision trees, the maximum depth of the tree, the number of feature selections when splitting nodes, etc. can be adjusted; then the updated model performance is evaluated using the latest validation set, and the model with the best performance is selected as the final inventory management model.
[0086] Step S101: monitor the implementation effect of the inventory management strategy in real time, adjust and improve the inventory management strategy according to the implementation effect, and feed back the updated inventory management strategy to the preset terminal.
[0087] Specifically, the preset terminals include but are not limited to mobile terminals and desktop terminals of warehouse managers and purchasing departments; When updating the strategy, analyze the implementation effect of the inventory management strategy based on real-time data. For example, if it is found that the out-of-stock rate of certain commodities is high, it may be necessary to increase the safety stock; if the inventory holding cost of certain commodities is too high, it may be necessary to optimize the order quantity and order cycle; update the adjusted and improved inventory management strategy to the system, and promptly feedback to the warehouse managers and the purchasing department's terminal devices, so that the warehouse managers and the purchasing department can receive the latest inventory management strategy in a timely manner to ensure the efficient implementation of inventory management.
[0088] In some embodiments, reference Fig. 9 As shown, in step S3, the method further includes the following steps: Step S30: extracting real-time food inventory data according to the food inventory management data, and feeding back the real-time food inventory data to the monitoring terminal.
[0089] Specifically, after collecting food inventory management data in real time, data related to food inventory is extracted from the food inventory management data and fed back to the corresponding warehouse managers and mobile terminals and desktop terminals of the purchasing department.
[0090] Step S31: Based on the food inventory data, use time series analysis and / or anomaly detection analysis methods to determine whether there are any abnormalities in the inventory food; If yes, then execute step S310: feedback abnormal information to the monitoring terminal; If not, the process returns to step S30 to re-extract the real-time food inventory data. Specifically, the abnormal information includes but is not limited to: alarm setting, setting a multi-level alarm mechanism according to business needs, such as general alarm, serious alarm and emergency alarm, different levels of alarm trigger different processing processes; alarm notification, when an abnormality is detected, the system notifies relevant personnel through various means, such as email, SMS, instant messaging, etc., to ensure that the abnormal information is conveyed in a timely manner; at the same time, a feedback mechanism is set up to allow managers to provide feedback on exception handling, such as confirming the exception, ignoring the exception, completing the processing, etc.
[0091] Exemplarily, the timing analysis method is: Data segmentation: divide inventory data into multiple time segments (such as day, week, month) in chronological order; Trend analysis, using time series analysis methods such as moving average and exponential smoothing to analyze the changing trends of inventory data and identify normal inventory change patterns; Seasonality analysis, identifying seasonal changes in inventory data, such as weekly peaks and troughs, and quarterly sales peaks and off-seasons.
[0092] Exemplarily, the anomaly detection analysis method is: Statistical methods, using statistical methods such as Z-scores, box plots, etc., to detect outliers in inventory data; for example, calculating the mean and standard deviation of inventory data, and detecting whether data points exceeding 3 standard deviations are abnormal; Machine learning methods use machine learning algorithms such as isolation forest and support vector machine for anomaly detection; Rule setting: set anomaly detection rules based on business experience, such as setting upper and lower limit warning lines for inventory. When the inventory quantity exceeds or falls below the warning line, it is judged as an abnormality.
[0093] Anomaly confirmation: When an anomaly is detected, further analysis is performed to confirm the authenticity of the anomaly, for example, to exclude anomalies caused by data collection errors or temporary factors.
[0094] refer to Fig.10 As shown, in some embodiments, the present invention also provides an intelligent food inventory management system, including: A data processing module, used to connect with existing food-related sensors, warehouse management systems, transportation record systems, sales systems, environmental monitoring equipment, preset terminals and monitoring terminals to collect and process data; A food data module, used to generate a data set based on the collected historical food inventory data, and then perform data preprocessing on the data set; The model training module is used to continuously train the data set using a machine learning method to obtain an inventory management model, including: extracting features and performing feature engineering on the data set, training the random forest model on the processed data set, building multiple decision trees, evaluating and tuning the trained random forest model, and then setting the best performing random forest model as the inventory management model; The food forecasting module is used to deploy the inventory management model and continuously collect real-time food inventory management data, and then input the food inventory management data into the inventory management model to predict the sales volume and inventory demand of the preset food within the preset time and generate the food preset results; The strategy generation module is used to formulate a storage strategy for a preset product according to the food prediction result, and feed back the storage strategy to a preset terminal.
[0095] The present invention also provides a computer medium, on which a computer program is stored, and the computer program is executed by a processor to implement the intelligent food inventory management method.
[0096] The present invention also provides a computer, comprising the computer medium.
[0097] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0098] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. An intelligent food inventory management method, characterized in that: The following steps are involved: Step S1: generating a data set according to the collected historical food inventory data, and then performing data preprocessing on the data set; Step S2: using a machine learning method to continuously train the data set to obtain an inventory management model, including: extracting features and performing feature engineering on the data set, training the random forest model on the processed data set, evaluating and tuning the trained random forest model, and setting the best performing random forest model as the inventory management model; Step S3: deploying the inventory management model and continuously collecting real-time food inventory management data; Step S4: inputting the food inventory management data into the inventory management model, predicting the sales volume and inventory demand of the preset food within a preset time, and generating food prediction results; Step S5: Formulate a preset food inventory management strategy based on the food prediction results, and feed back the inventory management strategy to the preset terminal.
2. The intelligent food inventory management method according to claim 1, characterized in that: In step S1, the method comprises the following steps: Step S10: Collecting historical food inventory data, including: food sales data, inventory data and transportation records; Step S11: cleaning and preprocessing the collected food historical inventory data, including at least one of removing outliers, filling missing values, and converting data formats.
3. The intelligent food inventory management method according to claim 1, characterized in that: In step S2, the method comprises the following steps: Step S20: extracting relevant features based on preset feature factors in the historical food inventory data; Step S21: Perform feature selection based on the extracted relevant features: remove redundant or irrelevant features and retain the most informative and influential features; Step S22: combining the relevant features after feature selection with the model requirements to construct a preset combined feature; Step S23: Encode the preset combined features, convert the categorical features into numerical features or map the categorical features into integer labels.
4. The intelligent food inventory management method according to claim 3, characterized in that: In step S2, the method further comprises the following steps: Step S24: Divide the processed data set into a training set and a validation set; Step S25: training multiple decision trees on the training set to construct a random forest model; Step S26: Use the validation set to evaluate the trained random forest model, compare the performance of the model under different parameters, and then optimize the model performance by adjusting the parameters of the random forest model; Step S27: According to the evaluation results, the best performing random forest model is selected for application and set as the inventory management model.
5. The intelligent food inventory management method according to claim 4, characterized in that: In step S25, the method further comprises the following steps: Step S250: In each decision tree, for each node split, randomly select a preset proportion of features from all features in the training set; Step S251: According to each decision tree, a subset is randomly selected from the original training set; Step S252: constructing a preset number of decision trees based on the randomly selected features and subsets; Step S253: training each decision tree independently: selecting a node and a preset feature, calculating information gain or average error, selecting a split point that minimizes information gain or average error for node splitting, and repeating the splitting process at each node until the stop condition of the decision tree is met; Step S254: Integrate all independently trained decision trees to construct a random forest model.
6. The intelligent food inventory management method according to claim 4, characterized in that: In step S26, the method further comprises the following steps: Step S260: adjusting the hyperparameters of the random forest model, including: the number of trees, the depth of the tree, and the minimum number of leaf node samples; Step S261: using a cross-validation method to evaluate each hyperparameter combination and calculate the evaluation index under each hyperparameter combination; Step S262: Finally, the hyperparameter combination that optimizes the evaluation index is selected as the hyperparameter of the final random forest model.
7. The intelligent food inventory management method according to claim 1, characterized in that: In step S5, the method further comprises the following steps: Step S50: Analyze the food forecast results of the inventory management model to obtain the sales volume and inventory demand of the preset food within a preset time; Step S51: Optimizing the inventory level and inventory strategy of the preset food according to the food forecast result; Step S52: Optimizing the inventory layout and storage location of the preset food according to the regional distribution of food sales and the food forecast results; Step S53: Optimizing the transportation route and method of the preset food according to the food transportation data and the food prediction results; Step S54: Optimizing the transportation batch and frequency of the preset food according to the food transportation cost and the food prediction result; Step S55: Formulate a preset food inventory management strategy based on the preset optimized inventory level, inventory strategy, inventory layout, storage location, transportation route and method, and transportation batch and frequency.
8. An intelligent food inventory management method according to claim 1 or 7, characterized in that: After deploying the inventory management model, the method further includes the following steps: Step S100: retraining the inventory management model using the latest food inventory management data at a preset time interval to complete the update of the inventory management model; Step S101: monitor the implementation effect of the inventory management strategy in real time, adjust and improve the inventory management strategy according to the implementation effect, and feed back the updated inventory management strategy to the preset terminal.
9. The intelligent food inventory management method according to claim 1, characterized in that: In step S3, the method further comprises the following steps: Step S30: extracting real-time food inventory data according to the food inventory management data, and feeding back the real-time food inventory data to the monitoring terminal; Step S31: Based on the food inventory data, use time series analysis and / or anomaly detection analysis methods to determine whether there are any abnormal problems with the inventory food. If so, feedback the abnormal information to the monitoring terminal. If not, return to step S30 and re-extract the real-time food inventory data.
10. An intelligent food inventory management system, characterized in that: include: A food data module, used to generate a data set based on the collected historical food inventory data, and then perform data preprocessing on the data set; The model training module is used to continuously train the data set using a machine learning method to obtain an inventory management model, including: extracting features and performing feature engineering on the data set, training the random forest model on the processed data set, building multiple decision trees, evaluating and tuning the trained random forest model, and then setting the best performing random forest model as the inventory management model; The food forecasting module is used to deploy the inventory management model and continuously collect real-time food inventory management data, and then input the food inventory management data into the inventory management model to predict the sales volume and inventory demand of the preset food within the preset time and generate the food preset results; The strategy generation module is used to formulate a storage strategy for a preset product according to the food prediction result, and feed back the storage strategy to a preset terminal.
Citation Information
Patent Citations
BP neural network-based fresh food e-commerce inventory prediction system
CN112215419A
Equipment subsequent spare part demand prediction method based on ensemble learning
CN115438849A
Automobile accessory quick-wear part store purchase recommendation method under big data scene
CN116308477A
Intelligent supply chain management system based on big data
CN116629577A
Supply chain management and control method for fabricated building components
CN116843156A
Cited By
Supply chain inventory management optimization method based on machine learning
CN119599575A
