Agricultural product future price prediction method and device, medium and program product
Through multiple pre-trained long and short-term memory network models, predict agricultural product output and combined with remote sensing image data, the agricultural product futures prices are predicted, which solves the problem that the existing technology is difficult to accurately capture the price change mode of agricultural product futures, and achieves higher prediction accuracy and explanatory.
Patent Information
- Application Number
- CN202411418548.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing agricultural product futures price prediction methods are difficult to accurately capture the complex price change patterns of agricultural product futures data, and lack the full integration of other information resources.
The output of agricultural products is predicted through multiple pre-trained long and short-term memory network models, and the output prediction matrix is obtained, and the agricultural product futures price is predicted using this matrix. This method combines remote sensing image data and historical futures price information to obtain more accurate prediction results through weighted average.
Effective prediction of agricultural product futures prices has been achieved, the shortcomings of traditional models in non-stationarity and low signal-to-noise ratio data have been overcome, and the accuracy and economic explanatory nature of the prediction have been improved.
Smart Images

Figure CN119515433A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of futures price prediction, and in particular to a method, device, medium and program product for predicting agricultural product futures prices. Background Art
[0002] Agricultural product futures price forecasting is an important research topic in the field of agriculture and finance. It not only helps to provide decision-makers with decision support in advance, but also can reduce the uncertainty risks brought by market price fluctuations. However, existing agricultural product futures price forecasting methods face many challenges. On the one hand, traditional econometric models, such as the autoregressive integrated moving average model (ARIMA) and the vector autoregression model (VAR), are simple and easy to use and have good economic interpretation. However, since agricultural product futures data usually have low signal-to-noise ratio and non-stationary characteristics, these models are often difficult to accurately capture their complex price change patterns. On the other hand, the methods based on neural networks and deep learning that have emerged in recent years, although they perform well in dealing with nonlinear problems, are insufficient in transparency and interpretability. At the same time, these methods mainly rely on historical price data and fail to fully integrate and utilize other publicly available information resources. Summary of the invention
[0003] The embodiments of the present invention provide a method, device, medium and program product for predicting agricultural product futures prices, aiming to achieve accurate prediction of agricultural product futures prices.
[0004] In order to achieve the above object, on the one hand, a method for predicting agricultural product futures prices is provided, the method comprising:
[0005] Step S1, predicting the yield of agricultural products by using a plurality of pre-trained long short-term memory network models to obtain a yield prediction matrix of the agricultural products;
[0006] Step S2, predicting the futures price of the agricultural product by using the yield prediction matrix, wherein:
[0007] Inputting the acquired closing price of the agricultural product futures into a pre-trained first long short-term memory network model to obtain a first multi-dimensional hidden state vector;
[0008] Inputting the yield prediction matrix into a pre-trained second long short-term memory network model to obtain a second multi-dimensional hidden state vector;
[0009] At a predetermined period, the formula A weighted average is performed on the first multidimensional hidden state vector and the second multidimensional hidden state vector, wherein: represents the hidden state vector after weighted averaging, represents the first multidimensional hidden state vector, represents the second multidimensional hidden state vector, W 2 , W i 1 , b are both trainable parameters;
[0010] By formula The forecast value of the agricultural product futures price is obtained, where: is a trainable parameter, y pre The closing price of the agricultural product futures on the first trading day of the next predicted period.
[0011] Preferably, in the prediction method, the plurality of pre-trained long short-term memory network models are obtained by the following steps:
[0012] Collect satellite remote sensing image data and the annual average yield of the agricultural product on a regular basis every year, and remove non-crop pixels in the remote sensing image data using global universal land cover data to obtain first remote sensing image data;
[0013] The first remote sensing image data is subjected to dimensionality reduction processing to obtain a remote sensing image data matrix, wherein: each remote sensing image in the first remote sensing image data has d frequency bands, each frequency band has b different values, and a remote sensing image is represented as a b*d dimensional matrix by pixel counting, denoted as h=(h1,...,h d ), h represents the remote sensing image matrix. Therefore, the remote sensing image data can be recorded as H = (h (1) ,...,h (T) ), where H represents the remote sensing image data matrix, and T represents the number of remote sensing image data acquisition times per year;
[0014] The remote sensing image data matrix is spliced into column vectors by column, and a plurality of long short-term memory network models are trained according to the column vectors and the corresponding annual average production.
[0015] Preferably, in the prediction method, the remote sensing image data includes surface reflectivity, surface temperature and / or land cover type.
[0016] Preferably, in the prediction method, step S2 further comprises: obtaining the futures closing price of the agricultural product, and extracting the closing price within the predetermined date of each year by year, wherein the closing price of the non-trading day is filled with the closing price of the last trading day before the non-trading day.
[0017] On the other hand, the present invention provides a device for predicting agricultural product futures prices, which includes a memory and a processor, wherein the memory stores at least one program, and the at least one program is executed by the processor to implement any of the prediction methods described above.
[0018] On the other hand, the present invention provides a computer-readable storage medium, wherein the storage medium stores at least one program, and the at least one program is executed by a processor to implement any of the prediction methods described above.
[0019] In yet another aspect, the present invention provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the prediction method as described above is implemented.
[0020] The above technical solution has the following technical effects:
[0021] The technical solution of the embodiment of the present invention predicts the yield of agricultural products through multiple pre-trained long short-term memory network (LSTM) models to obtain a yield prediction matrix; then the futures price of the agricultural products is predicted through the yield prediction matrix, thereby achieving effective prediction of the futures price of agricultural products. It not only overcomes the problem that traditional linear models are difficult to handle non-stationary and low signal-to-noise ratio data, but also makes up for the lack of economic explanation of existing deep learning methods, thereby improving the accuracy and economic explanation of predictions. In addition, the solution innovatively integrates crop growth information in remote sensing images with historical futures price information, providing a new method for predicting agricultural futures prices.
[0022] In a further embodiment, by taking a weighted average of the hidden state vectors of two pre-trained LSTM models during the remote sensing image acquisition cycle, and then combining the information in the remote sensing image with the historical price information, a more accurate agricultural futures price is predicted, thereby improving the overall reliability and practicality of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A schematic diagram of a process for predicting agricultural product futures prices according to an embodiment of the present invention;
[0024] Figure 2 The figure is a schematic diagram of a device for predicting agricultural product futures prices according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] To further illustrate the various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, a person of ordinary skill in the art should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0026] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.
[0027] Embodiment 1:
[0028] In order to achieve accurate prediction of agricultural product futures prices, an embodiment of the present invention provides a method for predicting agricultural product futures prices. Figure 1 FIG. 1 is a flow chart of a method for predicting agricultural product futures prices according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0029] Step S1, predicting the yield of agricultural products by using a plurality of pre-trained long short-term memory network models to obtain a yield prediction matrix of agricultural products;
[0030] Step S2, predicting the futures price of agricultural products through the yield prediction matrix, where:
[0031] Input the acquired closing price of agricultural futures into a pre-trained first long short-term memory network model to obtain a first multi-dimensional hidden state vector;
[0032] Inputting the yield prediction matrix into the pre-trained second long short-term memory network model to obtain a second multi-dimensional hidden state vector;
[0033] At a predetermined period, the formula The first multidimensional hidden state vector and the second multidimensional hidden state vector are weighted averaged, where represents the hidden state vector after weighted averaging, represents the first multidimensional hidden state vector, Represents the second multidimensional hidden state vector, W 2 , W i 1 , b are both trainable parameters;
[0034] By formula The forecast value of agricultural product futures prices is obtained, among which, is a trainable parameter, y pre The closing price of agricultural futures on the first trading day of the next predicted cycle.
[0035] Embodiment 2:
[0036] The technical solution of the embodiment of the present invention provides a method for predicting agricultural product futures prices. The method further improves the accuracy and interpretability of agricultural product futures price prediction by combining the LSTM model and remote sensing image data on the basis of the first embodiment. The method of the embodiment includes:
[0037] Step S1, online predicting the yield of agricultural products through multiple pre-trained long short-term memory network models to obtain a yield prediction matrix of agricultural products, wherein the multiple pre-trained long short-term memory network models are obtained through the following steps:
[0038] Satellite remote sensing image data and the annual average yield of agricultural products are collected regularly every year, and non-crop pixels in the remote sensing image data are eliminated through global universal land cover data to obtain the first remote sensing image data;
[0039] The first remote sensing image data is subjected to dimensionality reduction processing to obtain a remote sensing image data matrix, wherein: each remote sensing image in the first remote sensing image data has d frequency bands, each frequency band has b different values, and a remote sensing image is represented as a b*d dimensional matrix by pixel counting, denoted as h=(h1,...,h d ), h represents the remote sensing image matrix. Therefore, the remote sensing image data can be recorded as H = (h (1) ,...,h (T) ), where H represents the remote sensing image data matrix, and T represents the number of remote sensing image data acquisition times per year;
[0040] The remote sensing image data matrix is concatenated into column vectors by column, and multiple long short-term memory network models are trained based on the column vectors and their corresponding annual average production.
[0041] In a specific implementation, 11 states accounting for more than 75% of the soybean production in the United States are selected, and MODIS satellite remote sensing image data is collected from the 49th day to the 281st day each year; preferably, the data is collected once every 8 days, for a total of 30 times each year, and the collection years are from 2003 to 2023. At the same time, the average annual soybean production at the county level in these 11 states in the United States from 2003 to 2023 is collected on the website of the United States Department of Agriculture; preferably, the satellite remote sensing image data includes: surface reflectivity, surface temperature and / or land cover type;
[0042] Then, we use the global universal land cover data to remove non-crop pixels in remote sensing images;
[0043] According to the permutation invariance of remote sensing images, the remote sensing images are subjected to dimensionality reduction processing; preferably, each frequency band has at most b different values, and each remote sensing image has d frequency bands, then a remote sensing image can be represented as a b*d dimensional matrix by pixel counting, denoted as h=(h1,...,hd ), where \(h\) represents the remote sensing image matrix. Therefore, after dimensionality reduction processing, the remote sensing images of each county each year can be denoted as \(H=(h (1) ,...,h (T) );
[0044] Stack the pixel matrices \(h (i) \) in \(H\) column by column for \(i\in1...T\) to form a column vector \(S=(S (1) ,...,S (T) \), where \(S (i) \) for \(i\in1,...,T\) is a \(b\times d\) -dimensional column vector; then, map the pixel vectors of each county each year to the annual average yield one - to - one, and train an LSTM model for predicting the annual average yield.
[0045] Use the subset of the pixel vectors of each county each year above, that is, \(S=(S (1) ,...,S (i) ), 1\leq i<T\) to train \(T\) different LSTM models respectively, denoted as where \(i = 1...T\), \(Y\) represents the yield, and is used to perform online prediction of soybean yield at different time nodes during the soybean growth period each year. Among them, the input of these LSTM models is the corresponding pixel vector each year, and the output is the predicted annual yield;
[0046] Use the above \(T\) LSTM models to predict the annual average soybean yield at different time points during the remote sensing image collection period of the given year; preferably, for a given year, denote the number of counties as \(n\) and the number of remote sensing image collections each year as \(T\), then a yield prediction matrix \(Y\) of each county at different image collection time points can be obtained, where \(Y\in R n*T .
[0047] Step S2, predict the futures price of agricultural products through the yield prediction matrix, where: input the closing price of the agricultural product futures obtained into a pre - trained first long - short - term memory network model to obtain a first multi - dimensional hidden state vector;
[0048] Input the yield prediction matrix into a pre - trained second long - short - term memory network model to obtain a second multi - dimensional hidden state vector;
[0049] Under a predetermined period, perform weighted averaging on the first multi - dimensional hidden state vector and the second multi - dimensional hidden state vector through the formula , where represents the hidden state vector after weighted averaging, represents the first multi - dimensional hidden state vector, represents the second multi - dimensional hidden state vector, \(W 2 \), \(W i 1 \), and \(b\) are all trainable parameters;
[0050] By formula The forecast value of agricultural product futures prices is obtained, among which, is a trainable parameter, y pre The closing price of agricultural futures on the first trading day of the next predicted cycle.
[0051] In a specific implementation, the closing prices of soybean futures on the Chicago Mercantile Exchange from 2003 to 2023 are collected, divided into years, and the data from the 49th day to the 281st day of each year are extracted; preferably, the non-trading day data is filled with the closing price of the last trading day before the non-trading day, and the closing price data of 232 trading days is obtained each year;
[0052] At the same time, two LSTM models are pre-trained, the first one is the first long short-term memory network model Where F represents futures, The input of the model is the daily closing price of futures, and the output is the first multidimensional hidden state vector; the second is the second long short-term memory network model The input of the model is the column vector of the matrix Y in step 1, and the output is the second multidimensional hidden state vector;
[0053] Take the selected number of days, such as 8 days, as an image acquisition cycle, according to the formula For the same period and The output hidden state vector of the model is weighted averaged, where represents the hidden state vector after weighted averaging, represents the first multidimensional hidden state vector, Represents the second multidimensional hidden state vector, W 2 , W i 1 , b are both trainable parameters; then through the formula The futures price forecast is obtained, where is a trainable parameter, y pre The closing price of soybean futures on the first trading day of the next predicted cycle.
[0054] Embodiment three:
[0055] The present invention also provides a device for predicting agricultural product futures prices, such as Figure 2As shown, the device includes a processor 201, a memory 202, a bus 203, and a computer program stored in the memory 202 and executable on the processor 201. The processor 201 includes one or more processing cores. The memory 202 is connected to the processor 201 via the bus 203. The memory 202 is used to store program instructions. When the processor executes the computer program, the steps in the above method embodiment of the first embodiment of the present invention are implemented.
[0056] Further, as an executable solution, the forecasting device for agricultural product futures prices may be a computer unit, which may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The computer unit may include, but is not limited to, a processor and a memory. Those skilled in the art may understand that the composition structure of the above-mentioned computer unit is only an example of a computer unit and does not constitute a limitation on the computer unit, and may include more or less components than the above-mentioned, or a combination of certain components, or different components. For example, the computer unit may also include input and output devices, network access devices, buses, etc., which are not limited in the embodiments of the present invention.
[0057] Further, as an executable solution, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer unit, and various interfaces and lines are used to connect the various parts of the entire computer unit.
[0058] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the computer unit by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0059] Embodiment 4:
[0060] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method in the embodiment of the present invention are implemented.
[0061] If the module / unit integrated in the computer unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory) and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0062] Embodiment five:
[0063] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the method described above are implemented.
[0064] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.
Claims
1. A method for predicting agricultural product futures prices, characterized in that: include: Step S1, predicting the yield of agricultural products by using a plurality of pre-trained long short-term memory network models to obtain a yield prediction matrix of the agricultural products; Step S2, predicting the futures price of the agricultural product by using the yield prediction matrix, wherein: Inputting the acquired closing price of the agricultural product futures into a pre-trained first long short-term memory network model to obtain a first multi-dimensional hidden state vector; Inputting the yield prediction matrix into a pre-trained second long short-term memory network model to obtain a second multi-dimensional hidden state vector; At a predetermined period, the formula A weighted average is performed on the first multidimensional hidden state vector and the second multidimensional hidden state vector, wherein: represents the hidden state vector after weighted averaging, represents the first multidimensional hidden state vector, represents the second multidimensional hidden state vector, W 2 , W i 1 , b are both trainable parameters; By formula The forecast value of the agricultural product futures price is obtained, where: is a trainable parameter, y pre The closing price of the agricultural product futures on the first trading day of the next predicted period.
2. The prediction method according to claim 1, characterized in that: The plurality of pre-trained long short-term memory network models are obtained by the following steps: Collect satellite remote sensing image data and the annual average yield of the agricultural product on a regular basis every year, and remove non-crop pixels in the remote sensing image data using global universal land cover data to obtain first remote sensing image data; The first remote sensing image data is subjected to dimensionality reduction processing to obtain a remote sensing image data matrix, wherein: each remote sensing image in the first remote sensing image data has d frequency bands, each frequency band has b different values, and a remote sensing image is represented as a b*d dimensional matrix by pixel counting, denoted as h=(h1,...,h d ), h represents the remote sensing image matrix. Therefore, the remote sensing image data can be recorded as H = (h (1) ,...,h (T) ), where H represents the remote sensing image data matrix, and T represents the number of remote sensing image data acquisition times per year; The remote sensing image data matrix is spliced into column vectors by column, and a plurality of long short-term memory network models are trained according to the column vectors and the corresponding annual average production.
3. The prediction method according to claim 2, characterized in that: The remote sensing image data includes surface reflectivity, surface temperature and / or land cover type.
4. The prediction method according to claim 1, characterized in that: The step S2 also includes: obtaining the futures closing price of the agricultural product, and extracting the closing price within the predetermined date of each year in units of years, wherein the closing price of a non-trading day is filled with the closing price of the last trading day before the non-trading day.
5. A device for predicting agricultural product futures prices, characterized in that: The method comprises a memory and a processor, wherein the memory stores at least one program, and the at least one program is executed by the processor to implement the prediction method according to any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that: The storage medium stores at least one program, and the at least one program is executed by a processor to implement the prediction method according to any one of claims 1 to 4.
7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the prediction method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Method and system for intelligently balancing supply and demand of agricultural products
CN108122137A
Northern China winter wheat remote sensing yield estimation based on convolutional neural network
CN112131954A
Multi-scale crop phenological period remote sensing dimensionality reduction prediction method
CN114529097A
Winter wheat yield estimation analysis method and system based on long short-term memory network
CN115578637A
Crop yield prediction method based on triple attention mechanism
CN115860269A