Fresh agricultural product warehouse purchase demand prediction method

By improving the extreme learning machine model and combining the sales changes of fresh food products, the accuracy and stability of fresh agricultural product warehouse purchase demand prediction have been improved, and the problems of complex structure and insufficient applicability of the existing model are solved.

CN119515442APending Publication Date: 2025-02-25CHANGZHOU INST OF LIGHT IND TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411563962.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing neural network model has complex structure, is not very applicable, and has insufficient prediction stability and accuracy in forecasting of fresh agricultural product warehouse purchase demand.

Method used

A method for purchasing demand prediction of fresh agricultural products warehouses is adopted to construct a training set by obtaining historical demand data, and the first and second prediction models are trained using the extreme learning machine model to obtain the corresponding correction coefficients, and the results are corrected through the third prediction model to improve the prediction accuracy.

Benefits of technology

By improving the extreme learning machine model and combining the sales change laws of fresh food products, the prediction accuracy is improved and the applicability and stability of the model are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515442A_ABST
    Figure CN119515442A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of purchase demand prediction, in particular to a fresh agricultural product warehouse purchase demand prediction method, which comprises the steps of obtaining historical demand data of a fresh agricultural product warehouse, and constructing a training set; training the first prediction model and the second prediction model by using the training set data to obtain a corresponding correction coefficient; performing prediction by using the first prediction model to obtain a first prediction value; performing prediction by using a second prediction model to obtain a second prediction value; and training a third prediction model by using the first prediction value, the second prediction value and the corresponding warehouse demand actual value to obtain a correction coefficient of the third prediction model. The problems that an existing neural network model is complex in structure and low in applicability are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of purchase demand forecasting, and in particular to a method for forecasting purchase demand of a fresh agricultural product warehouse. Background Art

[0002] With the continuous development of society, people's demand for fresh agricultural products is increasing. However, fresh products are difficult to store, fresh, and ready to eat. Therefore, it is necessary to effectively grasp the changing trend of demand for fresh agricultural products, replenish warehouses in time, ensure product freshness, and reduce inventory costs. Therefore, it is crucial to reasonably predict the purchase demand of fresh agricultural products warehouses.

[0003] At present, there are few studies on the forecasting of warehouse purchase demand for fresh agricultural products and there are many deficiencies. For example, Li Jie et al. conducted a study on forecasting the cold chain logistics demand for fresh agricultural products based on grey neural networks. A single grey neural network model was used for forecasting the demand for fresh agricultural products. This forecasting method requires a large amount of training data, and the testing and forecasting workload is large. The model is relatively complex. In addition, the forecasting stability is insufficient and the applicability is not strong. Summary of the invention

[0004] Aiming at the deficiencies of the existing methods, the present invention solves the problems of complex structure and poor applicability of the existing neural network model.

[0005] The technical solution adopted by the present invention is: a method for predicting the purchase demand of fresh agricultural products warehouse comprises the following steps:

[0006] Step 1: Obtain historical demand data of a fresh agricultural product warehouse and build a training set;

[0007] As a preferred embodiment of the present invention, the fresh agricultural product is kiwi fruit.

[0008] Step 2: Use the training set data to train the first prediction model and the second prediction model to obtain corresponding correction coefficients;

[0009] As a preferred implementation of the present invention, the formula of the first prediction model is:

[0010]

[0011] Among them, ω i , ε i are the first and second correction coefficients of the first prediction model, respectively, i Enter data for group i.

[0012] As a preferred embodiment of the present invention, the first correction parameter ω of the first prediction model i A random number between -1 and 1.

[0013] As a preferred embodiment of the present invention, the formula of the second prediction model is:

[0014]

[0015] Among them, δ i ,θ i They are the first and second correction coefficients of the second prediction model respectively.

[0016] As a preferred embodiment of the present invention, the first correction parameter θ of the second prediction model i A random number between -1 and 1.

[0017] Step 3: Use the first prediction model to make predictions to obtain a first prediction value; use the second prediction model to make predictions to obtain a second prediction value;

[0018] Step 4: train the third prediction model using the first prediction value, the second prediction value and the corresponding actual value of warehouse demand to obtain a correction coefficient of the third prediction model;

[0019] As a preferred embodiment of the present invention, the formula of the third prediction model is:

[0020] y(t)=ay1(t)+by2(t)+d (5)

[0021] Wherein, a, b and d are the first to third correction coefficients of the third prediction model.

[0022] As a preferred embodiment of the present invention, a system for predicting the purchase demand of a fresh agricultural product warehouse includes: a memory for storing instructions executable by a processor; and a processor for executing the instructions to implement a method for predicting the purchase demand of a fresh agricultural product warehouse.

[0023] As a preferred embodiment of the present invention, a computer readable medium stores computer program code, and the computer program code, when executed by a processor, implements a method for predicting the purchase demand of a fresh agricultural product warehouse.

[0024] Beneficial effects of the present invention:

[0025] 1. Combined with the changing rules of fresh product sales, the extreme learning machine model is improved to obtain fresh agricultural product prediction models y1(t) and y2(t). The models y1(t) and y2(t) are trained respectively through the historical data of fresh agricultural product warehouse demand to determine the parameters of the models y1(t) and y2(t). Then, the prediction values ​​of the trained models y1(t) and y2(t) are used as input to train the prediction model y(t) and obtain the corresponding correction coefficient, thereby improving the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flow chart of the method for predicting the purchase demand of fresh agricultural products warehouse of the present invention. DETAILED DESCRIPTION

[0027] The present invention is further described below in conjunction with the accompanying drawings and embodiments. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore it only shows the components related to the present invention.

[0028] like Figure 1 As shown, a method for predicting the purchase demand of fresh agricultural products warehouse includes the following steps:

[0029] Step 1: Obtain historical demand data of a fresh agricultural product warehouse and build a training set;

[0030] Take the 21-day historical demand data of fresh agricultural product warehouse as training data, and group the historical data to obtain training input data x j,f And the corresponding output data t j ;

[0031] A warehouse for fresh agricultural products such as kiwi fruit is shown in Table 1;

[0032] Table 1 Historical demand data for kiwifruit warehouses

[0033]

[0034]

[0035] Take the warehouse demand data from the 14th day to the 7th day as the first group of input data x 1,f , f=1,2,...,8, the warehouse demand data on the 15th day is used as the output data t1 of the first group of training data; the warehouse demand data from the 13th to the 6th day is used as the second group of input data x 2,f ,f=1,2,...,8, the warehouse demand data on the 14th day is used as the output data t2 of the second group of training data; and so on, the warehouse demand data from the 8th to the 1st day is used as the input data x of the 7th group 7,f ,f=1,2,...,8, taking the warehouse demand data on the 9th day as the output data t7 of the 7th group of training data, a total of 7 groups of training data are obtained.

[0036] Step 2: Using data x j,f and t j The first prediction model y1(t) and the second prediction model y2(t) are trained to obtain two model correction coefficients: ω i , ε i , δ i ,θ i , i=1,2,…,7;

[0037] The formula of the first prediction model y1(t) is:

[0038]

[0039] Among them, ω i , ε i are the first and second correction coefficients of the first prediction model, respectively, i Enter data for group i.

[0040] Input 7 sets of training data into the model y1(t) to obtain:

[0041]

[0042] Among them, x j,f is the corresponding group input data in the training process, j = 1, 2, 3, ..., 7, f = 1, 2, ..., 8; t j The output data corresponding to the grouped input data.

[0043] First, the parameter ω i Assign a random number between -1 and 1 and save it; then j,f ,t j and ω i Substitute into formula (2) to determine the parameter ε i , and continuously calculate in a loop to obtain several groups of ω i and ε i value.

[0044] The formula of the second prediction model y2(t) is:

[0045]

[0046] Among them, δ i ,θ i are the first and second correction coefficients of the second prediction model, respectively, i Enter data for group i.

[0047] Input 7 sets of training data into the model y2(t) to obtain:

[0048]

[0049] First, the parameter θ i Assign a random number between -1 and 1 and save it; then j,f ,t j and θ i Substitute into formula (2) to determine the parameter δ i , and continuously calculate and obtain several groups of θ i and δ i value.

[0050] Step 3: Use the first prediction model y1(t) to make predictions and obtain the first prediction value h i =[h1,h2,...,h i ], i = 1, 2, ..., 6; use the second prediction model y2(t) to make a prediction and obtain the second prediction value c i =[c1,c2,...c i ],i=1,2,...,6;

[0051] Step 4: Use the first forecast value and the second forecast value and the corresponding warehouse demand actual value y i =[y1,y2,...y i ]i=1,2,...,6 train the third prediction model y(t) to obtain the correction coefficient of the third prediction model y(t);

[0052] The formula of the third prediction model y(t) is:

[0053] y(t)=ay1(t)+by2(t)+d (5)

[0054] Wherein, a, b and d are the first to third correction coefficients of the third prediction model.

[0055] Input the 6 sets of first and second forecast values ​​and the corresponding warehouse demand actual values ​​into y(t):

[0056]

[0057] h i 、c i ,y i Substitute into equation (6) and determine the values ​​of the three correction coefficients a, b, and d using the least squares method. Specific embodiment 1:

[0059] Take the historical demand data of a warehouse of Hema fresh kiwifruit in Table 1 as the model training data, and the warehouse demand data from September 22 to September 15 as the first group of input data of the model, x 1,f =[355.73, 387.45, 311.65, 271.84, 256.7, 176.53, 181.92, 335.14], f = 1, 2, ..., 8, the warehouse demand data on September 23 is used as the corresponding output value t1 = 179.83 in the training process; the warehouse demand data from September 21 to September 14 is used as the second group of input data of the model, x 2,f=[387.45, 311.65, 271.84, 256.7, 176.53, 181.92, 335.14, 391.77], f = 1, 2, ..., 8, the warehouse demand data on September 22 is used as the corresponding output value t2 = 355.73 in the training process; and so on, the warehouse demand data from September 16 to September 9 is used as the seventh group of input data of the model, x 7,f =[181.92, 335.14, 391.77, 311.63, 214.81, 281.43, 256.76, 231.35], f = 1, 2, …, 8, with the warehouse demand data on September 17 as the corresponding output value t7 = 176.53 in the training process; a total of 7 sets of prediction model training data are obtained.

[0060] Input the data into the first prediction model y1(t) and the second prediction model y2(t) respectively, and obtain the correction coefficient as follows:

[0061] Table 2ω i value

[0062] Serial number 1 2 3 4 5 6 7 Numeric 0.83657 -0.15326 0.31524 -0.13214 -0.32156 0.52341 0.01857

[0063] Since the parameter ω i Randomly assign values ​​to initialize the values ​​as shown in Table 2. Finally, ε can be obtained by training i The values ​​are shown in Table 3:

[0064] Table 3ε i value

[0065] Serial number 1 2 3 4 5 6 7 Numeric -0.25761 1.98364 2.51236 4.32155 -0.31251 0.53214 5.32157

[0066] Table 4θ i value

[0067] Serial number 1 2 3 4 5 6 7 Numeric 0.62321 0.35218 -0.42386 0.18326 0.31254 -0.42153 0.11256

[0068] Since the parameter θ i Random assignment is performed to initialize the values ​​as shown in Table 4. Finally, δ i The values ​​are shown in Table 5:

[0069] Table 5δ i value

[0070] Serial number 1 2 3 4 5 6 7 Numeric 0.23567 2.36154 3.18536 -0.36521 -0.28133 0.83652 6.32561

[0071] The predicted values ​​h of the trained first prediction model and the second prediction model are i =[h1,h2,...,h i ], i = 1, 2, ..., 6 and c i =[c1,c2,...c i], i = 1, 2, ..., 6 as input data to train the third prediction model, using the actual warehouse demand data y from September 24 to September 29 i =[y1,y2,...y i ], i=1,2,...,6, is the output data of the third prediction model.

[0072] h i 、c i ,y i Substitute into the third prediction model and determine the correction coefficients a, b, and d through the least squares method.

[0073] where h i , c i ,y i , a, b, d are shown in Table 6-9:

[0074] Table 6h i value

[0075] Serial number 1 2 3 4 5 6 Numeric 206.2857 238.2869 195.3564 281.3652 361.8632 346.8863

[0076] Table 7c i value

[0077] Serial number 1 2 3 4 5 6 Numeric 213.5318 249.3145 201.3214 288.6358 373.6233 356.2831

[0078] Table 8y i value

[0079] Serial number 1 2 3 4 5 6 Numeric 211.35 246.82 198.79 286.91 368.52 351.43

[0080] Since the parameter h i 、c i ,y i The values ​​of are shown in Table 6-8. Finally, the values ​​of a, b, and d can be obtained by the least squares method as shown in the following table:

[0081] Table 9y i value

[0082] parameter a b d Numeric 0.0950 0.8906 1.7489

[0083] Table 10 Enterprise inventory demand data display:

[0084]

[0085]

[0086] Table 11 Comparison of predicted and actual values ​​of y1(t), y2(t), and y(t):

[0087] Serial number <![CDATA[y1(t)]]> <![CDATA[y2(t)]]> y(t) Actual value 1 196.2617. 204.2831 202.3283 203.51 2 203.3589 213.6841 211.3751 211.86 3 223.5312 237.5985 234.5896 235.71 4 240.9631 251.0218 248.2004 248.15 5 291.7466 303.1120 299.4164 301.25

[0088] It can be seen from the experimental results that y(t) is relatively close to the actual value, indicating that the method of the present invention can accurately complete the forecast of warehouse demand for fresh agricultural products, verifying the effectiveness of the method of the present invention.

[0089] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.

Claims

1. A method for predicting the purchase demand of fresh agricultural products warehouse, characterized in that: The following steps are involved: Step 1: Obtain historical demand data of a fresh agricultural product warehouse and build a training set; Step 2: Use the training set data to train the first prediction model and the second prediction model to obtain corresponding correction coefficients; Step 3: Use the first prediction model to make predictions to obtain a first prediction value; use the second prediction model to make predictions to obtain a second prediction value; Step 4: Use the first prediction value, the second prediction value and the corresponding actual warehouse demand value to train the third prediction model to obtain a correction coefficient of the third prediction model.

2. The method for predicting the purchase demand of fresh agricultural products warehouse according to claim 1 is characterized in that: The formula for the first prediction model is: Among them, ω i , ε i are the first and second correction coefficients of the first prediction model, respectively, i Enter data for group i.

3. The method for predicting the purchase demand of fresh agricultural products warehouse according to claim 1, characterized in that: The formula for the second prediction model is: Among them, δ i ,θ i They are the first and second correction coefficients of the second prediction model respectively.

4. The method for predicting the purchase demand of fresh agricultural products in warehouses according to claims 2 and 3 is characterized in that: The formula for the third prediction model is: y(t)=ay1(t)+by2(t)+d (5) Wherein, a, b and d are the first to third correction coefficients of the third prediction model.

5. The method for predicting the purchase demand of fresh agricultural products warehouse according to claim 2, characterized in that: The first correction parameter ω of the first prediction model i A random number between -1 and 1.

6. The method for predicting the purchase demand of fresh agricultural products warehouse according to claim 3 is characterized in that: The first correction parameter θ of the second prediction model i A random number between -1 and 1.

7. The method for predicting the purchase demand of fresh agricultural products warehouse according to claim 1, characterized in that: A certain fresh agricultural product is kiwi fruit.

8. Fresh agricultural product warehouse purchase demand forecasting system, characterized by: include: a memory for storing instructions executable by a processor; A processor, configured to execute instructions to implement the method for predicting the purchase demand of a fresh agricultural product warehouse as described in any one of claims 1 to 7.

9. A computer readable medium storing a computer program code, characterized in that: The computer program code, when executed by a processor, implements the method for predicting the purchase demand of a fresh agricultural product warehouse as described in any one of claims 1 to 7.