Agricultural product circulation price index prediction method and system
Through grouping agricultural products and establishing a PROPHET-LSTM predictive model, combined with influencing factors to predict the agricultural product price index, it solves the problem of accurate prediction of agricultural product price indexes in existing technology, and achieves accurate predictions on different supply chains.
Patent Information
- Application Number
- CN202411403743.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-01-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology is difficult to accurately predict the agricultural product price index and fails to consider the impact of factors such as different supply chains and emergencies.
By grouping agricultural products in accordance with the type of supply chain, obtaining previous data and influencing factors, the Prophed-LSTM predictive model is established, the reporting price and transaction quantity are predicted in combination with the influencing factors, and the sample weight is calculated to determine the price index.
The accurate prediction of the price index of different types of supply chain agricultural products is implemented, dynamically determine the predictive model parameters, and the weight of the LSTM network model is dynamically determined by the LSTM network model.
Smart Images

Figure CN119379325A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of agricultural products, and in particular to a method and system for predicting the circulation price index of agricultural products. Background Art
[0002] As a daily necessity for Chinese residents, the price of agricultural products is directly related to people's living standards and the development of the national economy. The price of agricultural products fluctuates greatly and frequently, affecting national food security and social and economic stability. Its price index is difficult to accurately predict.
[0003] Most of the existing prediction methods for agricultural products are relatively simple and do not consider the impact of different supply chains on the price index, as well as the impact of emergencies, policies, etc. on the price index. Summary of the invention
[0004] 1. Technical issues to be resolved In order to solve the above technical problems, the present invention provides a method and system for predicting the circulation price index of agricultural products.
[0005] (II) Technical solution In order to solve the above-mentioned technical problems and achieve the purpose of the invention, the present invention is implemented by the following technical solutions: A method for predicting agricultural product circulation price index comprises the following steps: S1: Group agricultural products according to supply chain type; S2: Obtain the historical data and influencing factors of different groups of agricultural products respectively; The past data include past circulation prices and transaction quantities of different groups of agricultural products, and average transportation time; the influencing factors include region, climate conditions, special policies, and emergencies; S3: Calculate the average base period price and transaction volume of agricultural products; S4: Establish a Prophet-LSTM prediction model to predict the price and transaction volume during the reporting period based on the influencing factors; S5: Calculate sample weight; S6: Calculate price index; The price index is calculated according to the following formula: in, is the price forecast value for the reporting period, is the forecast value of transaction quantity in the reporting period, is the sample weight, is the base period price, is the number of transactions in the base period, r is the total number of sample types; The price index of the supply chain is calculated according to the supply chain mode grouping.
[0006] Furthermore, the supply chain types include processing enterprises, agricultural supermarkets, e-commerce and tourism supply chains.
[0007] Furthermore, the average base price of agricultural products is determined based on the data of the most recent N years without any sudden events, special policies or abnormal weather conditions in the past data, combined with the consumer price index of the current year, and is calculated as follows: in, is the coefficient of the consumer price index for the i-th year, is the sample price of agricultural products corresponding to the i-th year.
[0008] Furthermore, the Prophet-LSTM prediction model is expressed as follows: in, is the price or transaction quantity forecast value for the reporting period, is a time-related term, which indicates the trend of change that is only related to time. is a region-related item, which indicates the changing trend affected by the region. is a climate-related term, For special policy related items, For emergency related items, is the correction item; , , , , are the corresponding weight coefficients respectively.
[0009] Furthermore, the time-related item determination method is as follows: in, is the model load factor, is the growth rate, and m is the data offset.
[0010] Furthermore, the climate-related term is expressed as follows: Where N is the number of cycles, is the cycle time, , is the period coefficient, k is the number of occurrences of special climate, is the impact severity coefficient, is a Poisson distribution.
[0011] Furthermore, the weight coefficient is determined based on the LSTM neural network, specifically in the following manner: a. Establish an LSTM network. The network input is the supply chain mode, sample price, transaction quantity, sample average transportation distance, sample average transportation time, average sales time, product quality grade, regional information, policy information and emergency information; the network output is the weight coefficient to be determined , , , , ; b. Network training: input the training set into the network for training and determine the network parameters; c. Weight coefficients determined based on the trained network output.
[0012] Furthermore, the step S4 further includes: performing price forecasts for the reporting period for different model parameters determined by different supply chain mode groups, and obtaining four groups of price forecast results for the reporting period for different supply chain modes respectively. , , , And the transaction quantity forecast results , , , .
[0013] The present invention also provides a system for predicting agricultural product circulation price index, which comprises: A grouping module, which is used to group agricultural products according to supply chain types; A past data acquisition module, which is used to obtain past data and influencing factors of different groups of agricultural products; The base period price and transaction quantity calculation module is used to determine the base period price and transaction quantity based on the data of the most recent N years without any sudden events, special policies or abnormal weather conditions in the past period data and the consumer price index of the current year; The prediction module is used to establish the Prophet-LSTM prediction model and predict the price and transaction volume during the reporting period based on the influencing factors; A sample weight calculation module is used to calculate the weight of the sample in the total number of transactions according to the number of base period transactions; The price index calculation module is used to calculate the price index of four groups of supply chains according to the supply chain grouping method.
[0014] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which program instructions of a method for predicting a circulation price index of agricultural products are stored. The program instructions of a method for predicting a circulation price index of agricultural products can be executed by one or more processors to implement the steps of the method for predicting a circulation price index of agricultural products as described above.
[0015] (III) Beneficial effects Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention dynamically determines the parameters of the prediction model based on different supply chain types, thereby achieving accurate prediction of the agricultural product price index of different types of supply chains.
[0016] (2) The present invention improves the Prophet model and combines it with the LSTM network model to dynamically determine the weights of each item. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 It is a flow chart of a method for predicting the circulation price index of agricultural products according to an embodiment of the present application. DETAILED DESCRIPTION
[0018] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0019] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0020] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0021] See also Figure 1 , a method for predicting agricultural product circulation price index comprises the following steps: S1: Group agricultural products according to supply chain type; Optionally, agricultural products can be divided into processing enterprises, agricultural supermarkets, e-commerce and tourism supply chains according to different supply chains, corresponding to the first group, the second group, the third group and the fourth group respectively.
[0022] Due to differences in transaction links, transportation time and other factors in different supply chains, the impact of agricultural product circulation prices on products in different supply chains varies greatly. Therefore, the present invention predicts the agricultural product price index according to different supply chain types.
[0023] S2: Obtain the historical data and influencing factors of different groups of agricultural products respectively; The past data include past circulation prices, transaction volumes and average transportation time of different groups of agricultural products; the influencing factors include region, climate conditions, special policies and emergencies.
[0024] Optionally, the past data is captured based on web crawler technology.
[0025] S3: Calculate the average base period price and transaction volume of agricultural products The average base price of agricultural products is determined based on the data of the most recent N years without any sudden events, special policies or abnormal weather conditions in the past data, combined with the consumer price index of the current year. The calculation method is as follows: in, is the coefficient of the consumer price index for the i-th year, is the sample price of agricultural products corresponding to the i-th year.
[0026] The transaction quantity is determined based on the historical data of the corresponding year in the above base period price calculation.
[0027] S4: Establish an intelligent forecasting model to forecast the price and transaction volume during the reporting period based on influencing factors; S41: Establish intelligent prediction model; The present invention establishes an intelligent prediction model based on the Prophet-LSTM model, and the model expression is as follows: in, is the price or transaction quantity forecast value for the reporting period, is a time-related term, which indicates the trend of change that is only related to time. is a region-related item, which indicates the changing trend affected by the region. is a climate-related term, For special policy related items, For emergency related items, is the correction item; , , , , are the corresponding weight coefficients respectively.
[0028] S42: Determination of parameters in the model, including time-related items, region-related items, climate-related items, special policy-related items, and emergency-related items, as well as the corresponding weight coefficients and correction items.
[0029] The time-related items are determined as follows: in, is the model load factor, is the growth rate, and m is the data offset.
[0030] The method for determining regional related items is as follows: The influencing factors of region-related items are affected by many comprehensive factors such as geographical location, historical factors, economic factors, etc., but region-related items are generally relatively stable and do not change much. Therefore, the present invention determines the region-related items by empirical parameters in the database.
[0031] The climate-related items are determined as follows: Climate-related items include seasonal cyclical changes and special climate impacts. The occurrence of special climate conditions such as typhoons and droughts is determined based on the degree of impact.
[0032] According to the following function expression: Where N is the number of cycles, is the cycle time, , is the period coefficient, k is the number of occurrences of special climate, is the impact severity coefficient, is a Poisson distribution.
[0033] The method for determining special policy-related items is as follows: The impact of special policies lasts from the implementation of the policy until the policy is abolished, so the items related to special policies are uniformly distributed, as expressed by the following function: Among them, a and b are the start and end time of the policy respectively. is the impact coefficient of the i-th special policy.
[0034] The method for determining the relevant items of an emergency is as follows: The impact of an emergency will gradually weaken as time goes by. Its impact on the fluctuation of prices and transaction volume will change from a more severe impact at the beginning to a gradual weakening in the later period. Therefore, the items related to the emergency are subject to exponential distribution expression, as shown below: in, is the exponential distribution coefficient of the ith emergency event.
[0035] The correction term is the change that does not belong to the previous terms, and it is assumed to conform to the normal distribution.
[0036] The differences in transportation methods, transportation time, and sales methods of different supply chain types lead to different degrees of influence of various related items on the prediction of overall price and transaction quantity. Therefore, for models of different supply chain types, the present invention dynamically determines the weight coefficients corresponding to various related items according to the different supply chain types. The weight coefficients are determined based on the LSTM neural network, and the specific method is as follows: a. Establish an LSTM network. The network input is the supply chain mode, sample price, transaction quantity, sample average transportation distance, sample average transportation time, average sales time, product quality grade, regional information, policy information and emergency information; the network output is the weight coefficient to be determined , , , , .
[0037] b. Network training: input the training set into the network for training and determine the network parameters.
[0038] c. Weight coefficients determined based on the trained network output.
[0039] S43: Forecast the price and transaction volume during the reporting period based on the model; Different model parameters determined by different supply chain groups are used to forecast prices during the reporting period, and four groups of price forecast results for different supply chain groups are obtained. , , , And the transaction quantity forecast results , , , .
[0040] S5: Calculate sample weights Calculate the weight of the sample in the total number of transactions based on the number of base period transactions: in, is the weight, is the number of transactions of sample i, The total volume of agricultural product transactions.
[0041] S6: Calculate price index The price index is calculated according to the following formula: in, is the price forecast value for the reporting period, is the forecast value of transaction quantity in the reporting period, is the sample weight, is the base period price, is the number of transactions in the base period, and r is the total number of sample types.
[0042] The price index of four groups of supply chains is calculated according to the supply chain mode grouping. , , , .
[0043] In this embodiment, the parameters of the prediction model are dynamically determined based on different supply chain types, and accurate prediction of the agricultural product price index of different types of supply chains is achieved. At the same time, the Prophet model is improved, and the weights of each item are dynamically determined by combining the LSTM network model.
[0044] The embodiment of the present invention further provides a system for predicting agricultural product circulation price index, including: A grouping module, which is used to group agricultural products according to supply chain types; A past data acquisition module, which is used to obtain past data and influencing factors of different groups of agricultural products; The base period price and transaction quantity calculation module is used to determine the base period price and transaction quantity based on the data of the most recent N years without any sudden events, special policies or abnormal weather conditions in the past period data and the consumer price index of the current year; The prediction module is used to establish the Prophet-LSTM prediction model and predict the price and transaction volume during the reporting period based on the influencing factors; A sample weight calculation module is used to calculate the weight of the sample in the total number of transactions according to the number of base period transactions; The price index calculation module is used to calculate the price index of four groups of supply chains according to the supply chain grouping method.
[0045] In addition, an embodiment of the present invention also proposes a computer-readable storage medium, on which program instructions of a method for predicting a circulation price index of agricultural products are stored. The program instructions for predicting a circulation price index of agricultural products can be executed by one or more processors to implement the steps of the method for predicting a circulation price index of agricultural products as described above.
[0046] The embodiments described above are only descriptions of the preferred implementation modes of the present invention, and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for predicting the circulation price index of agricultural products, characterized in that: The steps include: S1: Group agricultural products according to supply chain type; S2: Obtain the historical data and influencing factors of different groups of agricultural products respectively; The past data include past circulation prices and transaction quantities of different groups of agricultural products, and average transportation time; the influencing factors include region, climate conditions, special policies, and emergencies; S3: Calculate the average base period price and transaction volume of agricultural products; S4: Establish a Prophet-LSTM prediction model to predict the price and transaction volume during the reporting period based on the influencing factors; S5: Calculate sample weight; S6: Calculate price index; The price index is calculated according to the following formula: in, is the price forecast value for the reporting period, is the forecast value of transaction quantity in the reporting period, is the sample weight, is the base period price, is the number of transactions in the base period, r is the total number of sample types; The price index of the supply chain is calculated according to the supply chain mode grouping.
2. The method for predicting the circulation price index of agricultural products according to claim 1, characterized in that: The supply chain types include processing enterprises, agricultural supermarkets, e-commerce and tourism supply chains.
3. The method for predicting the circulation price index of agricultural products according to claim 1, characterized in that: The average base price of agricultural products is determined based on the data of the most recent N years without any sudden events, special policies or abnormal weather conditions in the past data, combined with the consumer price index of the current year. The calculation method is as follows: in, is the coefficient of the consumer price index for the i-th year, is the sample price of agricultural products corresponding to the i-th year.
4. The method for predicting the circulation price index of agricultural products according to claim 2, characterized in that: The Prophet-LSTM prediction model expression is as follows: in, is the price or transaction quantity forecast value for the reporting period, is a time-related term, which indicates the trend of change that is only related to time. is a region-related item, which indicates the changing trend affected by the region. is the climate-related term, For special policy related items, For emergency related items, is the correction item; , , , , are the corresponding weight coefficients respectively.
5. The method for predicting the circulation price index of agricultural products according to claim 4, characterized in that: The method for determining the time-related item is as follows: in, is the model load factor, is the growth rate, and m is the data offset.
6. The method for predicting the circulation price index of agricultural products according to claim 5, characterized in that: The climate-related terms are expressed as follows: Where N is the number of cycles, is the cycle time, , is the period coefficient, k is the number of occurrences of special climate, is the impact severity coefficient, is a Poisson distribution.
7. The method for predicting the circulation price index of agricultural products according to claim 4, characterized in that: The weight coefficient is determined based on the LSTM neural network, specifically in the following way: a. Establish an LSTM network. The network input is the supply chain mode, sample price, transaction quantity, sample average transportation distance, sample average transportation time, average sales time, product quality grade, regional information, policy information and emergency information; the network output is the weight coefficient to be determined , , , , ; b. Network training: input the training set into the network for training and determine the network parameters; c. Weight coefficients determined based on the trained network output.
8. The method for predicting the circulation price index of agricultural products according to claim 7, characterized in that: The step S4 also includes: performing price forecasting for the reporting period for different model parameters determined by different supply chain mode groups, and obtaining four groups of price forecasting results for the reporting period for different supply chain modes respectively. , , , And the transaction quantity forecast results , , , .
9. A system based on the agricultural product circulation price index prediction method according to any one of claims 1 to 8, comprising: A grouping module, which is used to group agricultural products according to supply chain types; A past data acquisition module, which is used to obtain past data and influencing factors of different groups of agricultural products; The base period price and transaction quantity calculation module is used to determine the base period price and transaction quantity based on the data of the most recent N years without any sudden events, special policies or abnormal weather conditions in the past period data and the consumer price index of the current year; The prediction module is used to establish the Prophet-LSTM prediction model and predict the price and transaction volume during the reporting period based on the influencing factors; A sample weight calculation module is used to calculate the weight of the sample in the total number of transactions according to the number of base period transactions; The price index calculation module is used to calculate the price index of four groups of supply chains according to the supply chain grouping method.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions of a method for predicting the circulation price index of agricultural products, and the program instructions of the method for predicting the circulation price index of agricultural products can be executed by one or more processors to implement the steps of the method for predicting the circulation price index of agricultural products as described in any one of claims 1-8.