CN113222247A - Chemical raw material price and purchase quantity prediction method, device and related equipment - Google Patents

Chemical raw material price and purchase quantity prediction method, device and related equipment Download PDF

Info

Publication number
CN113222247A
CN113222247A CN202110510944.3A CN202110510944A CN113222247A CN 113222247 A CN113222247 A CN 113222247A CN 202110510944 A CN202110510944 A CN 202110510944A CN 113222247 A CN113222247 A CN 113222247A
Authority
CN
China
Prior art keywords
data
chemical raw
raw material
long
purchasing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110510944.3A
Other languages
Chinese (zh)
Inventor
吴凌宇
王鹤
王国勋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Runlian Software System Shenzhen Co Ltd
Original Assignee
Runlian Software System Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Runlian Software System Shenzhen Co Ltd filed Critical Runlian Software System Shenzhen Co Ltd
Priority to CN202110510944.3A priority Critical patent/CN113222247A/en
Publication of CN113222247A publication Critical patent/CN113222247A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0206Price or cost determination based on market factors

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Strategic Management (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Development Economics (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Economics (AREA)
  • Accounting & Taxation (AREA)
  • Molecular Biology (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Finance (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Marketing (AREA)
  • Game Theory and Decision Science (AREA)
  • General Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Databases & Information Systems (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method, a device and related equipment for predicting chemical raw material price and purchase quantity, which comprises the steps of predicting the price of a raw material future, calculating a long-short term purchase proportion and predicting the purchase quantity of the raw material in a rolling mode according to the predicted price of the raw material future and the long-short term purchase proportion, wherein the embodiment of the invention trains a large amount of related chemical raw material data to obtain a model and predicts the price of the chemical raw material future, the model trained by machine learning is more accurate, convenient and rapid than manual prediction because the model stands on the basis of big data, then the long-short term purchase proportion of a period of time in the future is determined according to the long-short term purchase proportion and the purchase cost of historical chemical raw materials in the related chemical raw material data, and the current quantity of the chemical raw materials is predicted by combining the long-short term purchase proportion and the purchase cost, and the overall scheme is performed on the basis of the chemical raw material future price predicted in a previous machine learning model, therefore, the spot purchase quantity prediction of the chemical raw materials is more accurate.

Description

Chemical raw material price and purchase quantity prediction method, device and related equipment
Technical Field
The invention relates to the technical field of machine learning, in particular to a chemical raw material price and purchase quantity prediction method, a device and related equipment.
Background
Due to the influence of factors such as macroscopic economic environment, supply and demand relationship, production cost and the like, price fluctuation of partial chemical raw materials is frequent, fluctuation range is large, no obvious rule exists, the difficulty of price prediction of an enterprise during purchasing is greatly increased, a purchasing department is difficult to make a proper purchasing policy, and purchasing cost of the enterprise is minimized.
General chemical raw material purchasing is divided into two modes of contract purchasing and spot purchasing. Contract purchases are purchases that specify a period of time in the future in the beginning of the year, followed by monthly shipments. The advantage is that the contract purchasing amount is large, and a certain discount can be obtained usually, the disadvantage is that the purchasing amount can not be adjusted according to market conditions; the spot purchase can adjust the number of purchases in time according to market conditions and the number of orders, but the price is higher than that of contract purchase in most of the time. Therefore, companies need to balance contract procurement discounts with market fluctuations to determine appropriate long-short term (contract procurement/spot procurement) ratios.
At present, the method adopted by the industry for purchasing chemical raw materials is more that the purchasing department predicts according to historical experience and judgment of the current economic situation, and all factors cannot be fully considered. Therefore, the construction of an advanced and accurate chemical raw material purchasing system is crucial, and the system can be supplied to purchasing departments as a certain reference, so that a certain basis is provided for scientific decision-making.
Disclosure of Invention
The invention aims to provide a chemical raw material price and purchase quantity prediction method, a device and related equipment, and aims to solve the problem that the price of the chemical raw material cannot be accurately predicted in the prior art.
In a first aspect, an embodiment of the present invention provides a method for predicting future prices of chemical raw materials, including:
carrying out independent thermal coding on bin order data and dragon and tiger list data in a chemical raw material original data sample, and simultaneously carrying out normalized coding on other data in the chemical raw material original data sample to obtain first coded data;
processing the first coded data through Box-Cox transformation to obtain preprocessed second coded data;
classifying the second coded data to obtain a chemical raw material characteristic library containing a macroscopic factor, a supply and demand factor, a public opinion factor and a technical factor;
performing feature extraction on the second coded data sequentially through a stack type automatic encoder and a principal component analysis method to obtain advanced features;
the high-level features are sequentially subjected to time convolution network, a first full connection layer and an anti-overfitting layer to obtain feature data;
and inputting the characteristic data into a bidirectional long-time and short-time memory cyclic neural network for processing to obtain a characteristic vector, and inputting the characteristic vector into a second full-connection layer for prediction to obtain a predicted chemical raw material future price.
In a second aspect, an embodiment of the present invention provides a method for predicting a chemical raw material purchase amount, including:
carrying out independent thermal coding on bin order data and dragon and tiger list data in a chemical raw material original data sample, and simultaneously carrying out normalized coding on other data in the chemical raw material original data sample to obtain first coded data;
processing the first coded data through Box-Cox transformation to obtain preprocessed second coded data;
classifying the second coded data to obtain a chemical raw material characteristic library containing a macroscopic factor, a supply and demand factor, a public opinion factor and a technical factor;
performing feature extraction on the second coded data sequentially through a stack type automatic encoder and a principal component analysis method to obtain advanced features;
the high-level features are sequentially subjected to time convolution network, a first full connection layer and an anti-overfitting layer to obtain feature data;
inputting the characteristic data into a bidirectional long-time and short-time memory cyclic neural network for processing to obtain a characteristic vector, and inputting the characteristic vector into a second full-connection layer for prediction to obtain a predicted chemical raw material future price;
calculating the long and short term purchasing proportion;
and performing rolling type prediction on the chemical raw material purchase quantity according to the predicted chemical raw material future price and the long-short term purchase proportion.
In a third aspect, an embodiment of the present invention provides an apparatus for predicting future prices of chemical materials, including:
the first coding unit is used for carrying out independent thermal coding on the bin list data and the dragon and tiger list data in the chemical raw material original data sample, and simultaneously carrying out normalized coding on other data in the chemical raw material original data sample to obtain first coded data;
the second coding unit is used for processing the first coded data through Box-Cox transformation to obtain preprocessed second coded data;
the classification unit is used for classifying the second coded data to obtain a chemical raw material characteristic library containing a macroscopic factor, a supply and demand factor, a public opinion factor and a technical factor;
the advanced feature extraction unit is used for extracting features of the second coded data sequentially through a stack type automatic encoder and a principal component analysis method to obtain advanced features;
the time convolution processing unit is used for enabling the high-level features to sequentially pass through a time convolution network, a first full connection layer and an anti-overfitting layer to obtain feature data;
and the prediction unit is used for inputting the characteristic data into a bidirectional long-time and short-time memory cyclic neural network for processing to obtain a characteristic vector, and inputting the characteristic vector into a second full-connection layer for prediction to obtain a predicted chemical raw material future price.
In a fourth aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor, when executing the computer program, implements the method for predicting the future price of chemical raw material according to the first aspect.
The embodiment of the invention trains a large amount of related chemical raw material data to obtain a model, and predicts the future price of the chemical raw material, because the model trained by machine learning is more accurate, convenient and rapid than manual prediction when standing on the basis of big data, then the long-short term purchase proportion of a period of time in the future is determined by the long-short term purchase proportion and the purchase cost of historical chemical raw materials in the related chemical raw material data, and the prediction is carried out by combining the long-short term purchase proportion and the purchase cost of the chemical raw materials.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for predicting the future price of chemical raw materials according to an embodiment of the present invention;
fig. 2 is a schematic sub-flowchart of step S101 in the method for predicting the future price of chemical raw materials according to the embodiment of the present invention;
fig. 3 is a sub-flowchart of a method for predicting the future price of chemical raw materials according to an embodiment of the present invention before step S105;
FIG. 4 is a schematic flow chart illustrating a method for predicting chemical raw material procurement quantity according to an embodiment of the invention;
fig. 5 is a schematic sub-flowchart of step S107 in the method for predicting chemical raw material purchase amount according to the embodiment of the present invention;
fig. 6 is a schematic sub-flowchart of step S108 in the method for predicting chemical raw material procurement amount according to the embodiment of the invention;
fig. 7 is a schematic block diagram of an future price prediction apparatus for chemical materials according to an embodiment of the present invention;
FIG. 8 is a schematic block diagram of a computer apparatus provided by an embodiment of the present invention;
fig. 9 is another schematic flow chart of a method for predicting the future price of chemical materials according to an embodiment of the present invention;
FIG. 10 is a schematic view of another sub-flow of step S107 in the method for predicting the chemical raw material purchase amount according to the embodiment of the present invention;
fig. 11 is another sub-flowchart of step S108 in the method for predicting the chemical raw material procurement amount according to the embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1 and 9, a method for predicting the future price of chemical materials includes steps S101 to S105.
S101: carrying out independent thermal coding on bin order data and dragon and tiger list data in a chemical raw material original data sample, and simultaneously carrying out normalized coding on other data in the chemical raw material original data sample to obtain first coded data;
s102: processing the first coded data through Box-Cox transformation to obtain preprocessed second coded data;
s103: classifying the second coded data to obtain a chemical raw material characteristic library containing a macroscopic factor, a supply and demand factor, a public opinion factor and a technical factor;
s104: performing feature extraction on the second coded data sequentially through a stack type automatic encoder and a principal component analysis method to obtain advanced features;
s105: the high-level features are sequentially subjected to time convolution network, a first full connection layer and an anti-overfitting layer to obtain feature data;
s106: and inputting the characteristic data into a bidirectional long-time and short-time memory cyclic neural network for processing to obtain a characteristic vector, and inputting the characteristic vector into a second full-connection layer for prediction to obtain a predicted chemical raw material future price.
In step S101, warehouse data and dragon board data in the raw chemical material data sample are subjected to unique hot encoding, where the dragon board data is the name of a member who is in the warehouse and before 20 th of the position of the member, the trading styles of different members are different, and if the member ranks before 20 th of the member on the day through the dragon board, the value is 1, otherwise, the value is 0. The manifest data is the daily top 20 warehouse inventory number, which may reflect the material supply, and is 1 if a warehouse level is at the top 20 in the national warehouse listing, and 0 otherwise.
The one-hot encoding is one-hot encoding.
The other data refers to data in the chemical raw material raw data sample except the warehouse slip data and the dragon and tiger list data.
Because different evaluation indexes often have different dimensions and dimension units, the data analysis result is influenced under the condition, and in order to eliminate the dimension influence among the indexes, data standardization processing is needed, so other data are subjected to normalization processing, the result value is mapped to [0-1], the convergence speed of the model and the precision of the model are improved, the characteristics among different dimensions have certain comparability on the numerical value, the accuracy of the classifier can be greatly improved, and the gradient explosion of the model can be prevented.
It will be appreciated that once the linear regression model is established, the residual variance is typically examined. If the variance exists, the resulting regression model is inefficient and unstable, and odds with the consequences of the prediction may be obtained later.
When data analysis is carried out, the encountered data is not normally distributed, and if the data is not normal, problems are caused in some cases. For example, the premise of some models is that the data is required to have normality (KNN, bayes, etc.), and the normality of the data can improve the training effect of machine learning to some extent.
The first encoded data is processed by Box-Cox transform in step S202.
Specifically, the Box-Cox transform is a generalized power transform method proposed by Box and Cox in 1964, and is a data transform commonly used in statistical modeling, and is used for the case that continuous response variables do not satisfy normal distribution. After Box-Cox transformation, the correlation of non-observable errors and predictor variables can be reduced to some extent. The Box-Cox transformation is mainly characterized in that a parameter is introduced, the parameter is estimated through data per se to determine a data transformation form to be adopted, and the Box-Cox transformation can obviously improve the normality, symmetry and variance equality of the data and is effective for a plurality of actual data.
In this embodiment, in step S103, the macroscopic factor, the supply and demand factor, the public opinion factor and the technical factor include various data types (most of them are related historical data) related to the chemical raw material to be predicted; wherein, the macroscopic factors comprise interest rate, exchange rate, dollar index, Shanghai-Shen index, futures index, oil distribution price and the like; the supply and demand factors comprise warehouse bill data, transaction data, associated futures data, a dragon and tiger list, device start-up overhaul conditions and the like; the public opinion factors comprise domestic and foreign news, geopolitical factors, currency policies and financial policies; the technical factors include MACD, MA7, MA10, etc.
MACD (moving average Convergence and divergence) is a technical index proposed by GeralAppel in 1979, and is used for judging buying and selling opportunities by utilizing the aggregation and separation conditions between a short-term (usually 12 days) exponential moving average line and a long-term (usually 26 days) exponential moving average line of closing prices.
In MA7 and MA10, MA is a moving average line, which is a theoretical basis of the concept of average cost of Doujones, and the average value of stock prices in a period of time is connected into a curve by adopting the principle of moving average in statistics, so as to display the historical fluctuation condition of stock prices and further reflect the future development trend of the stock price index. It is an imaging representation of the Dow theory. Wherein, MA7 represents the moving average price of 7 days, and MA10 represents the moving average price of 10 days.
The device start-up overhaul data mainly comprises text data of a database, and daily data of overhaul, start-up and capacity of the chemical raw material device are obtained in a rule matching mode.
And adopting different feature extraction methods for different data types in the four factors, wherein the text data needs to be preprocessed together with the numerical information after the key information is sorted.
In order to eliminate multiple collinearity of data and reduce data dimension, dimension reduction and advanced feature extraction are performed on the chemical raw material feature library through step S104, wherein potential relations among features can be found by processing the chemical raw materials through a stacked automatic encoder, and information of the features is fully mined.
Step S105, the high-level features are sequentially processed through a time convolution network, a first full connection layer and an anti-overfitting layer to obtain feature data; the time convolution network is specifically TCN, and the TCN mainly comprises three parts of causal convolution, expansion convolution and residual error linkage. Causal convolution limits the value to depend only on the previous layer and previous data; the expansion convolution layer allows interval sampling, and a large receptive field can be obtained through a small number of layers; residual linking transfers information in a cross-layer manner by combining the input with the result through the convolution module.
Step S106, inputting the feature data into a bidirectional long-short-term memory cyclic neural network for processing to obtain a feature vector, wherein the bidirectional long-short-term memory cyclic neural network is composed of a forward-conducted LSTM model and a backward-conducted LSTM model, the structure provides complete past and future information for each point of an input feature sequence, and the front-back connection of data is established for the network, so that the learning can be more fully performed.
Where LSTM generally refers to long-short term memory artificial neural networks.
The predicted chemical future price will be obtained after passing through step S106.
The future price of the chemical raw material is closely related to the price of the chemical raw material, so that the price of the chemical raw material can be obtained only by converting the future price according to the current market.
Chemical raw material future price is predicted through machine learning, and prediction is accurate, and is more convenient and faster than manual prediction.
Referring to fig. 2, in an embodiment, in step S101, the other data includes public opinion data, and the normalization encoding of the public opinion data includes:
s201: carrying out word segmentation and stop word removal processing on the public sentiment data, taking out the first n words with the highest probability for numbering, mapping the words into id, complementing the id represented by the words into the id with the same length, and converting the id into a word vector matrix through a pre-trained word bank and embedding;
s202: performing one-dimensional convolution on the word vector matrix according to the time sequence direction through a plurality of convolution layers to capture information of different scales;
s203: processing the word vector matrix after convolution through a time sequence maximum pooling layer, merging the obtained data, and inputting the merged data into a third full-connection layer;
s204: and carrying out normalization processing on the data output by the third full-connection layer.
The third full-connection layer is a full-connection neural network with two hidden layers, and a dropout layer is added between the two hidden layers to reduce overfitting.
Specifically, the normalized coding of the public opinion data can be understood as a network for training the labeled public opinion data into emotion extraction through text-CNN.
Where text-CNN is an algorithm that classifies text using a convolutional neural network.
The emotion analysis has wide application scenes in the industrial field. For example, the E-commerce website extracts comment tags according to commodity comment data and adjusts a comment display sequence; the film comment website evaluates the film public praise according to the film comment and predicts whether the film is sold; the take-out website improves take-out services and the like according to user emotion indexes such as dish taste, delivery time, dish abundance and the like.
In the embodiment, emotion extraction and classification are carried out on public opinion data through text-CNN, so that the public opinion data can provide relevant characteristic data for a chemical raw material characteristic library to a greater extent, and optimization and accuracy of the model are facilitated.
Referring to fig. 3, in an embodiment, the step S105 of sequentially passing the high-level feature through the time convolution network, the first fully-connected layer, and the over-fitting prevention layer to obtain the feature data further includes:
s301: carrying out normalized coding on historical futures data of chemical raw materials to obtain third coded data;
s302: carrying out Box-Cox transformation on the third coded data to obtain fourth coded data;
s303: transforming the fourth encoded data into long-term trend features, medium-term trend features and short-term trend features by Fourier transform;
s304: stitching the long-term trend features, the medium-term trend features and the short-term trend features into the high-level features.
In the present embodiment, the chemical raw material historical futures data in step S301 is different from the associated futures data in the four types of factors in step S103 in that the chemical raw material historical futures data is data that is itself used as futures; as the name implies, the associated futures data, i.e. other futures data related to chemical raw materials that affect chemical raw material futures price, includes export related futures data including, but not limited to, 500IC, shanghai depth 300IF, superscript 50IH, crude oil contract SC, gold AU, natural rubber RU and ethylene glycol EG, and other related futures data (PTA as an example herein), including, but not limited to, NYMEX crude oil, dollar index futures, IMM-euro, standard futures, COMEX gold, IMM-yen, NYMEX natural gas and brent crude oil.
Wherein 500IC, Shanghai depth 300IF and Shanghai 50IH are domestic financial stock options.
The crude oil contract SC, gold AU, natural rubber RU and ethylene glycol EG are other futures prices related to the futures price of PTA chemical raw material, including crude oil, gold, natural rubber and ethylene glycol, but not limited to these four.
Other related futures data of other chemical raw materials are not necessarily the same as other related futures data of the PTA described above, and can be chosen or rejected according to the actual situation.
The futures data related to the outer disk is similar to the futures data described above, and these are disclosed in hundreds of degrees and will not be described herein again.
Since the futures prices are alternately in a trend and oscillation state, it is not appropriate to use a trend model when the futures are in the stock phase, and conversely, if the futures are in the trend phase, the trend model needs to be used. However, it is always a challenge to judge the starting point for starting the disk finalization or having a breakthrough. Therefore, in step 303, the chemical raw material historical futures data is decomposed into long, medium and short term trends by taking fourier transform.
Specifically, the fourier transform decomposes the historical data, and divides the historical data into long-term, medium-term and short-term functions according to different frequencies of decomposed functions, and the long-term, medium-term and short-term functions correspond to the long-term trend, the medium-term trend and the short-term trend.
Specifically, step S106 includes:
the chemical material future price is predicted by taking the following formula as a loss function:
Figure BDA0003060363710000091
wherein the formula selects the mean square error of the deviation between the predicted future price and the true value, yiIs the true value of the ith data, y'iThe ith predicted value output by the model.
Referring to fig. 4, the present invention further discloses a method for predicting the purchase quantity of chemical raw materials according to the method for predicting the future price of chemical raw materials, including:
s101: carrying out independent thermal coding on bin order data and dragon and tiger list data in a chemical raw material original data sample, and simultaneously carrying out normalized coding on other data in the chemical raw material original data sample to obtain first coded data;
s102: processing the first coded data through Box-Cox transformation to obtain preprocessed second coded data;
s103: classifying the second coded data to obtain a chemical raw material characteristic library containing a macroscopic factor, a supply and demand factor, a public opinion factor and a technical factor;
s104: performing feature extraction on the second coded data sequentially through a stack type automatic encoder and a principal component analysis method to obtain advanced features;
s105: the high-level features are sequentially subjected to time convolution network, a first full connection layer and an anti-overfitting layer to obtain feature data;
s106: inputting the characteristic data into a bidirectional long-time and short-time memory cyclic neural network for processing to obtain a characteristic vector, and inputting the characteristic vector into a second full-connection layer for prediction to obtain a predicted chemical raw material future price;
s107: calculating the long and short term purchasing proportion;
s108: and performing rolling type prediction on the chemical raw material purchase quantity according to the predicted chemical raw material future price and the long-short term purchase proportion.
In the present embodiment, steps S101 to S106 are all consistent with the steps executed by the future price prediction method for chemical materials.
The long-short term procurement proportion can be obtained by step S107, and then rolling prediction of the chemical material procurement amount is performed based on the predicted chemical material future price and the long-short term procurement proportion.
Referring to fig. 5 and 10, in an embodiment, the step S107 includes:
s401: the high-grade features, the long-short term purchasing proportion and the purchasing cost in the same time period are taken, the long-short term purchasing proportion is classified to obtain different long-short term purchasing proportion classes, and the high-grade features, the long-short term purchasing proportion classes and the purchasing cost in the same time period are used as a triple data set;
s402: inputting the high-grade characteristics and the long and short term purchasing proportion class as input data into a multi-classification model consisting of a support vector machine, a random forest and a distributed gradient enhancement library classifier for voting, and normalizing the voting result through a logistic regression model to obtain a predicted long and short term purchasing proportion class;
s403: and according to the predicted long and short term purchasing proportion class, taking the corresponding purchasing cost in the ternary group data set, calculating the weight of the purchasing cost through a punishment weight, and taking the long and short term purchasing proportion in the time period corresponding to the purchasing cost to obtain the corresponding long and short term purchasing proportion when the purchasing cost is the lowest.
In this embodiment, in step S401, the long-short term procurement proportions are classified to obtain different long-short term procurement proportion classes.
Specifically, the long-short term purchasing proportion is subjected to binning processing to obtain a plurality of long-short term purchasing proportion classes, each long-short term purchasing proportion belongs to one of the long-short term purchasing proportion classes, so that each triple data set can be regarded as having a corresponding long-short term purchasing proportion class, one long-short term purchasing proportion class corresponds to a plurality of triple data sets, and weight calculation is facilitated later.
The sub-box is concretely buckettized.
In fig. 10, the values at both ends of the long and short term purchase proportion class after binning are represented as pn and qn.
For example: the historical long and short term purchasing proportion is divided into boxes and groups, and the data is divided into six groups of long and short term purchasing proportion classes according to the historical level, which are respectively marked as a1:0.25-0.28,a2:0.28-0.31,a3:0.31-0.34,a4:0.34-0.37,a5:0.37-0.4,a6: 0.4-0.43, by comparing the long and short term purchasing proportion class, taking out the corresponding high-grade characteristics and purchasing cost in the same time period, and putting the high-grade characteristics and purchasing cost in the same data set with the corresponding long and short term purchasing proportion class, and recording as (x)t,ai,zt) Wherein it is understood that aiAn equal triple data set has several groups, xtIndicates high-level characteristics, ai indicates which long-short term procurement proportion class the piece of data belongs to, ztRepresenting the procurement cost of the time t.
In step S402, in order to prevent the error of single-mode classification, a multi-classification model is trained by Voting (Voting) using three classifiers, i.e., a Support Vector Machine (SVM), a random forest, and a distributed gradient enhancement library (XGBOOST), and finally, normalization processing is performed by a logistic regression model (softmax layer), so as to normalize the corresponding output components of each class, and obtain a predicted long-term and short-term procurement ratio range (i.e., a long-term and short-term procurement ratio class).
The Voting may be performed by using Hard Voting Classifier (final result is determined according to minority majority), or by using SoftVoting Classifier (average of probabilities of all model prediction samples in a certain class is used as a standard, and the corresponding class with the highest probability is the final prediction result).
In step S403, the obtaining the corresponding long-term and short-term procurement proportion when the procurement cost is the lowest by taking the corresponding procurement cost in the triple data set according to the predicted long-term and short-term procurement proportion class, calculating the weight of the procurement cost by using the penalty weight, and taking the long-term and short-term procurement proportion in the current time period corresponding to the procurement cost, includes:
the value of the loss function is calculated as follows:
Figure BDA0003060363710000111
the purchase cost is weighted according to the following formula:
Figure BDA0003060363710000121
for the weight wjNormalized to obtain wj';
Calculating the proportion of long and short term procurement according to the following formula:
Figure BDA0003060363710000122
wherein, yjWhether the predicted sample type is consistent with the actual type or not is shown, wherein the consistency is 1, and the inconsistency is 0; l is the value of a multi-class cross entropy function; sjIs the jth value of the output vector of the logistic regression model, representing the probability that this sample belongs to the jth class; z is a radical ofiIndicating procurement costs, R, in the ith triplet data setjLong and short term purchasing in the time period corresponding to the purchasing cost in the jth ternary data setRatio, m is the number of triple data sets corresponding to the predicted long and short term procurement ratio class, wjWeight of the jth triplet data, normalized
Figure BDA0003060363710000123
R represents the proportion of long and short term purchases for the target year.
Specifically, step S403 is described below by way of example:
the prediction step S402 can predict the class of the long-short term procurement proportions to which the long-short term procurement proportions to be calculated belong, and temporarily record the class as aiSeveral groups of triple data sets with the same long-term and short-term purchasing proportion can be obtained, and the purchasing cost is recorded as ziThe long-short term purchasing proportion in the same time period corresponding to the purchasing cost is recorded as RiAnd calculating the weight of the purchasing cost through the formula, and calculating the corresponding long-term and short-term purchasing proportion when the purchasing cost is the lowest.
Referring to fig. 6 and 11, in an embodiment, the step S108 includes:
s501: inputting the quantity of finished product purchase orders in a period of time in the future and the predicted chemical raw material future price in the period of time in the future into a rolling purchase model;
s502: according to the long and short term purchasing proportion and the contract purchasing quantity, the minimized purchasing cost and the constraint condition are used as limits, and the spot purchasing quantity in a future period of time is predicted;
s503: and repeatedly predicting the chemical raw material future price and calculating the long-term and short-term purchasing proportion according to the updated database, and updating the spot purchasing quantity in a future period in a rolling manner.
In this embodiment, in step S501, the quantity of the finished product purchase order can be obtained from the sales department, and the quantity gap corresponding to the chemical raw material for manufacturing the finished product can be obtained by the quantity of the finished product purchase order; the future chemical future price may be obtained from step S106.
Step S502 includes:
and calculating the predicted total spot purchase amount of the chemical raw materials for the next n months according to the following formula:
Figure BDA0003060363710000124
calculating the total sum of chemical raw material contract purchase of the next n months according to the following formula:
Figure BDA0003060363710000125
calculating the spot purchase quantity of the chemical raw materials in the next n months according to the following constraint conditions and formulas:
Figure BDA0003060363710000131
xi>0;
the total sum (namely the purchasing cost) of the spot purchase and contract purchase of the chemical raw materials for the next n months is calculated according to the following formula:
f=C’+C;
wherein f is the purchase cost of chemical raw materials, and the scheme which can reach the minimum value is preferred; c is total amount of chemical raw material contract purchase, which is determined at the beginning of the year; ciContract purchase amount of chemical raw materials in the ith month; c' is the chemical raw material spot purchase price; x is the number ofiThe spot purchase quantity of the chemical raw materials in the ith month; p is a radical ofi(ii) a chemical price in month i (i.e., a predicted chemical price if i is time in the future, the chemical price being available from a chemical future price); s0Stock of chemical raw materials at the beginning of presentation period, XiIndicating the procurement quantity of the chemical raw materials (including contract and spot) in the ith month, diIndicating the actual consumption of the chemical in month i (if i is the time in the future, the corresponding expected consumption of the chemical in month can be calculated from the product order obtained in the sales department).
In this embodiment, the precondition of the calculation result is to minimize the procurement cost, that is, f is as small as possible, so that the calculated spot procurement amount has a certain guiding significance.
Wherein the content of the first and second substances,
Figure BDA0003060363710000132
the larger number in (1) indicates that the stock amount in the warehouse is necessary, or the embarrassment that the chemical raw material is lacked and the finished product cannot be produced occurs.
xi>0 means that there is material to be put into the warehouse every time.
And finally, updating the chemical raw material original data sample and the chemical raw material historical futures data through the data updated at intervals, and repeating the plurality of prediction steps to obtain the stock purchase quantity required in the latest period.
The future period of time is generally one year (of course, a period of time with other length is also possible), that is, the contract purchase amount of the next year is determined in the beginning of the year, the long-term and short-term purchase proportion is determined through the step S107, then the chemical material future price is predicted through the steps S101 to S106, the stock purchase amount of the chemical material is predicted in a rolling mode through the step S108, the stock purchase amount of months which are not in the year is obtained, and in order to enable the data to be more matched with each month, the corresponding data is updated and the stock purchase amount is predicted again every month, wherein the long-term and short-term purchase proportion is determined only once in the year.
Referring to fig. 7, an apparatus 700 for predicting future prices of chemical materials includes:
the first encoding unit 701 is configured to perform unique hot encoding on the warehouse data and the dragon-tiger chart data in the chemical raw material original data sample, and perform normalized encoding on other data in the chemical raw material original data sample to obtain first encoded data;
a second encoding unit 702, configured to process the first encoded data by Box-Cox transform to obtain preprocessed second encoded data;
a classifying unit 703, configured to classify the second encoded data to obtain a chemical raw material feature library including a macroscopic factor, a supply and demand factor, a public opinion factor, and a technical factor;
an advanced feature extraction unit 704, configured to perform feature extraction on the second encoded data sequentially through a stacked automatic encoder and a principal component analysis method, so as to obtain advanced features;
the time convolution processing unit 705 is used for enabling the high-level features to sequentially pass through a time convolution network, a first full connection layer and an anti-overfitting layer to obtain feature data;
and the prediction unit 706 is configured to input the feature data into a bidirectional long-time and short-time memory cyclic neural network to be processed to obtain a feature vector, and input the feature vector into a second full-link layer to perform prediction, so as to obtain a predicted chemical raw material future price.
In an embodiment, the first encoding unit 701 includes:
the matrix conversion unit is used for carrying out word segmentation and stop word removal on the public sentiment data, taking out the first n words with the highest probability for numbering, mapping the words into id, complementing the id represented by the words into the id with the same length, and then converting the id into a word vector matrix through a pre-trained word bank and embedding;
the convolution unit is used for performing one-dimensional convolution on the word vector matrix according to the time sequence direction through the plurality of convolution layers and capturing information of different scales;
the pooling unit is used for processing the word vector matrix after convolution through a time sequence maximum pooling layer, merging the obtained data and inputting the merged data into a third full-connection layer;
and the normalization unit is used for normalizing the data output by the third full-connection layer.
In one embodiment, the method further comprises:
the third coding unit is used for carrying out normalized coding on the historical futures data of the chemical raw materials to obtain third coded data;
the fourth coding unit is used for obtaining fourth coded data after the third coded data are subjected to Box-Cox transformation;
a Fourier transform unit for transforming the fourth encoded data into a long-term tendency feature, a medium-term tendency feature and a short-term tendency feature by Fourier transform;
and the re-splicing unit is used for splicing the long-term tendency characteristic, the medium-term tendency characteristic and the short-term tendency characteristic into the high-level characteristic.
It should be noted that, as can be clearly understood by those skilled in the art, the specific implementation process of the aforementioned chemical raw material procurement amount prediction apparatus and each unit may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, no further description is provided herein.
Meanwhile, the division and connection manner of each unit in the chemical material future price prediction apparatus 700 are only used for illustration, in other embodiments, the chemical material future price prediction apparatus 700 may be divided into different units as needed, or each unit in the chemical material future price prediction apparatus 700 may adopt different connection sequences and manners, so as to complete all or part of the functions of the chemical material future price prediction apparatus 700.
The future price predicting apparatus 700 for chemical materials may be implemented as a computer program, which can be run on a computer device as shown in fig. 8.
Referring to fig. 8, fig. 8 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 800 may be a computer device such as a desktop computer or a server, or may be a component or part of another device.
Referring to fig. 8, the computer device 800 includes a processor 802, memory and network interface 805 connected by a system bus 801, wherein the memory may include a non-volatile storage medium 803 and an internal memory 804.
The non-volatile storage medium may store an operating system 8031 and computer programs 8032. The computer program 8032, when executed, causes the processor 802 to perform the method for predicting the future price of a chemical feedstock as described above.
The processor 802 is used to provide computing and control capabilities to support the operation of the overall computer device 800.
The internal memory 804 provides an environment for the operation of the computer program 8032 in the non-volatile storage medium 803, and when the computer program 8032 is executed by the processor 802, the processor 802 may be enabled to execute the method for predicting the future price of the chemical material.
The network interface 805 is used for network communication with other devices. Those skilled in the art will appreciate that the configurations illustrated in the figures are merely block diagrams of portions of configurations related to aspects of the present application, and do not constitute limitations on the computing devices to which aspects of the present application may be applied, as a particular computing device may include more or less components than those illustrated in FIG. 8, or may combine certain components, or have a different arrangement of components. For example, in some embodiments, the computer device 800 may only include the memory and the processor 802, and in such embodiments, the structure and function of the memory and the processor 802 are the same as those of the embodiment shown in fig. 8, and are not described herein again.
The processor 802 is configured to run a computer program 8032 stored in the memory to implement the aforementioned future price prediction method for chemical materials.
It should be understood that in the present embodiment, the Processor 802 may be a Central Processing Unit (CPU), and the Processor 802 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. Wherein a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiments can be implemented by the computer program 8032, and the computer program 8032 can be stored in a computer-readable storage medium. The computer program 8032 is executed by the at least one processor 802 in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present application also provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium, and the computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to execute the method for predicting the future price of the chemical raw material.
The computer readable storage medium may be an internal storage unit of the aforementioned device, such as a hard disk or a memory of the device. The computer readable storage medium may also be an external storage device of the device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the device. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the apparatus.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The computer readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk or an optical disk, and various computer readable storage media capable of storing program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the application can be combined, divided and deleted according to actual needs. In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing an electronic device (which may be a personal computer, a terminal, or a network device) to perform all or part of the steps of the method according to the embodiments of the present application.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for predicting the future price of a chemical raw material is characterized by comprising the following steps:
carrying out independent thermal coding on bin order data and dragon and tiger list data in a chemical raw material original data sample, and simultaneously carrying out normalized coding on other data in the chemical raw material original data sample to obtain first coded data;
processing the first coded data through Box-Cox transformation to obtain preprocessed second coded data;
classifying the second coded data to obtain a chemical raw material characteristic library containing a macroscopic factor, a supply and demand factor, a public opinion factor and a technical factor;
performing feature extraction on the second coded data sequentially through a stack type automatic encoder and a principal component analysis method to obtain advanced features;
the high-level features are sequentially subjected to time convolution network, a first full connection layer and an anti-overfitting layer to obtain feature data;
and inputting the characteristic data into a bidirectional long-time and short-time memory cyclic neural network for processing to obtain a characteristic vector, and inputting the characteristic vector into a second full-connection layer for prediction to obtain a predicted chemical raw material future price.
2. The method of predicting the future price of chemical raw material as claimed in claim 1, wherein the other data includes public opinion data, and the normalized encoding of the public opinion data includes:
carrying out word segmentation and stop word removal processing on the public sentiment data, taking out the first n words with the highest probability for numbering, mapping the words into id, complementing the id represented by the words into the id with the same length, and converting the id into a word vector matrix through a pre-trained word bank and embedding;
performing one-dimensional convolution on the word vector matrix according to the time sequence direction through a plurality of convolution layers to capture information of different scales;
processing the word vector matrix after convolution through a time sequence maximum pooling layer, merging the obtained data, and inputting the merged data into a third full-connection layer;
and carrying out normalization processing on the data output by the third full-connection layer.
3. The method for predicting the future price of a chemical raw material according to claim 1, wherein the step of obtaining the feature data by sequentially passing the high-level features through a time convolution network, a first full link layer and an anti-overfitting layer further comprises:
carrying out normalized coding on historical futures data of chemical raw materials to obtain third coded data;
carrying out Box-Cox transformation on the third coded data to obtain fourth coded data;
transforming the fourth encoded data into long-term trend features, medium-term trend features and short-term trend features by Fourier transform;
stitching the long-term trend features, the medium-term trend features and the short-term trend features into the high-level features.
4. A prediction method for chemical raw material purchasing quantity is characterized by comprising the following steps:
carrying out independent thermal coding on bin order data and dragon and tiger list data in a chemical raw material original data sample, and simultaneously carrying out normalized coding on other data in the chemical raw material original data sample to obtain first coded data;
processing the first coded data through Box-Cox transformation to obtain preprocessed second coded data;
classifying the second coded data to obtain a chemical raw material characteristic library containing a macroscopic factor, a supply and demand factor, a public opinion factor and a technical factor;
performing feature extraction on the second coded data sequentially through a stack type automatic encoder and a principal component analysis method to obtain advanced features;
the high-level features are sequentially subjected to time convolution network, a first full connection layer and an anti-overfitting layer to obtain feature data;
inputting the characteristic data into a bidirectional long-time and short-time memory cyclic neural network for processing to obtain a characteristic vector, and inputting the characteristic vector into a second full-connection layer for prediction to obtain a predicted chemical raw material future price;
calculating the long and short term purchasing proportion;
and performing rolling type prediction on the chemical raw material purchase quantity according to the predicted chemical raw material future price and the long-short term purchase proportion.
5. The method for predicting the procurement amount of chemical materials according to claim 4, wherein the calculating the long-term and short-term procurement proportions comprises:
the high-grade features, the long-short term purchasing proportion and the purchasing cost in the same time period are taken, the long-short term purchasing proportion is classified to obtain different long-short term purchasing proportion classes, and the high-grade features, the long-short term purchasing proportion classes and the purchasing cost in the same time period are used as a triple data set;
inputting the high-grade characteristics and the long and short term purchasing proportion class as input data into a multi-classification model consisting of a support vector machine, a random forest and a distributed gradient enhancement library classifier for voting, and normalizing the voting result through a logistic regression model to obtain a predicted long and short term purchasing proportion class;
and according to the predicted long and short term purchasing proportion class, taking the corresponding purchasing cost in the ternary group data set, calculating the weight of the purchasing cost through a punishment weight, and taking the long and short term purchasing proportion in the time period corresponding to the purchasing cost to obtain the corresponding long and short term purchasing proportion when the purchasing cost is the lowest.
6. The method for predicting chemical raw material procurement quantity according to claim 5, wherein the step of obtaining the procurement cost in the corresponding ternary data set according to the predicted long-short term procurement proportion, calculating the weight of the procurement cost by using a penalty weight, and obtaining the long-short term procurement proportion corresponding to the lowest procurement cost in the current time period by using the long-short term procurement proportion corresponding to the procurement cost comprises:
the value of the loss function is calculated as follows:
Figure FDA0003060363700000031
the purchase cost is weighted according to the following formula:
Figure FDA0003060363700000032
for the weight wjNormalized to obtain w'j
Calculating the proportion of long and short term procurement according to the following formula:
Figure FDA0003060363700000033
wherein, yjWhether the predicted sample type is consistent with the actual type or not is shown, wherein the consistency is 1, and the inconsistency is 0; l is the value of a multi-class cross entropy function; sjIs the jth value of the output vector of the logistic regression model, representing the probability that this sample belongs to the jth class; z is a radical ofiIndicating procurement costs, R, in the ith triplet data setjRepresenting the long and short term purchasing proportion of the current time period corresponding to the purchasing cost in the jth triple data set, m being the number of triple data sets corresponding to the predicted long and short term purchasing proportion class, wjWeight of the jth triplet data, normalized
Figure FDA0003060363700000034
R represents the proportion of long and short term purchases for the target year.
7. The method of predicting a chemical material procurement amount according to claim 4, wherein the rolling prediction of the chemical material procurement amount based on the predicted chemical material future price and the long-short term procurement proportion comprises:
inputting the quantity of finished product purchase orders in a period of time in the future and the predicted chemical raw material future price in the period of time in the future into a rolling purchase model;
according to the long and short term purchasing proportion and the contract purchasing quantity, the minimized purchasing cost and the constraint condition are used as limits, and the spot purchasing quantity in a future period of time is predicted;
and repeatedly predicting the chemical raw material future price and calculating the long-term and short-term purchasing proportion according to the updated database, and updating the spot purchasing quantity in a future period in a rolling manner.
8. The method for predicting the chemical raw material procurement amount according to claim 7, wherein the predicting the spot procurement amount for a future period of time with the minimum procurement cost and the constraint condition as limitations according to the long-term and short-term procurement proportions and the contract procurement amount comprises:
and calculating the predicted total spot purchase amount of the chemical raw materials for the next n months according to the following formula:
Figure FDA0003060363700000041
calculating the total sum of chemical raw material contract purchase of the next n months according to the following formula:
Figure FDA0003060363700000042
calculating the spot purchase quantity of the chemical raw materials in the next n months according to the following constraint conditions and formulas:
Figure FDA0003060363700000043
xi>0;
the total sum (namely the purchasing cost) of the spot purchase and contract purchase of the chemical raw materials for the next n months is calculated according to the following formula:
f=C′+C;
wherein f is the purchase cost of chemical raw materials, and the scheme which can reach the minimum value is preferred; c is total amount of chemical raw material contract purchase, which is determined at the beginning of the year; ciContract purchase amount of chemical raw materials in the ith month; c' is the chemical raw material spot purchase price; x is the number ofiThe spot purchase quantity of the chemical raw materials in the ith month; p is a radical ofiChemical raw material price in month i; s0Stock of chemical raw materials at the beginning of presentation period, XiIndicating the amount of chemical material purchased in month i, diThe actual consumption of the chemical raw material in month i is shown.
9. An apparatus for predicting the future price of a chemical raw material, comprising:
the first coding unit is used for carrying out independent thermal coding on the bin list data and the dragon and tiger list data in the chemical raw material original data sample, and simultaneously carrying out normalized coding on other data in the chemical raw material original data sample to obtain first coded data;
the second coding unit is used for processing the first coded data through Box-Cox transformation to obtain preprocessed second coded data;
the classification unit is used for classifying the second coded data to obtain a chemical raw material characteristic library containing a macroscopic factor, a supply and demand factor, a public opinion factor and a technical factor;
the advanced feature extraction unit is used for extracting features of the second coded data sequentially through a stack type automatic encoder and a principal component analysis method to obtain advanced features;
the time convolution processing unit is used for enabling the high-level features to sequentially pass through a time convolution network, a first full connection layer and an anti-overfitting layer to obtain feature data;
and the prediction unit is used for inputting the characteristic data into a bidirectional long-time and short-time memory cyclic neural network for processing to obtain a characteristic vector, and inputting the characteristic vector into a second full-connection layer for prediction to obtain a predicted chemical raw material future price.
10. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method for future price prediction of chemical raw materials according to any of claims 1 to 3 when executing the computer program.
CN202110510944.3A 2021-05-11 2021-05-11 Chemical raw material price and purchase quantity prediction method, device and related equipment Pending CN113222247A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110510944.3A CN113222247A (en) 2021-05-11 2021-05-11 Chemical raw material price and purchase quantity prediction method, device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110510944.3A CN113222247A (en) 2021-05-11 2021-05-11 Chemical raw material price and purchase quantity prediction method, device and related equipment

Publications (1)

Publication Number Publication Date
CN113222247A true CN113222247A (en) 2021-08-06

Family

ID=77094651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110510944.3A Pending CN113222247A (en) 2021-05-11 2021-05-11 Chemical raw material price and purchase quantity prediction method, device and related equipment

Country Status (1)

Country Link
CN (1) CN113222247A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108288109A (en) * 2018-01-11 2018-07-17 安徽优思天成智能科技有限公司 Motor-vehicle tail-gas concentration prediction method based on LSTM depth space-time residual error networks
CN111582560A (en) * 2020-04-22 2020-08-25 空间信息产业发展股份有限公司 Rice yield prediction method based on recurrent neural network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108288109A (en) * 2018-01-11 2018-07-17 安徽优思天成智能科技有限公司 Motor-vehicle tail-gas concentration prediction method based on LSTM depth space-time residual error networks
CN111582560A (en) * 2020-04-22 2020-08-25 空间信息产业发展股份有限公司 Rice yield prediction method based on recurrent neural network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
(法)AURÉLIENGÉRON著: "《机器学习实战》", 30 September 2020 *
虞雅雯: "基于网络舆情的 BP 神经网络模型的股票价格预测", 《中国优秀硕士学位论文全文数据库经济与管理科学辑》 *

Similar Documents

Publication Publication Date Title
Zhong et al. Predicting the daily return direction of the stock market using hybrid machine learning algorithms
Weytjens et al. Cash flow prediction: MLP and LSTM compared to ARIMA and Prophet
Meiri et al. Using simulated annealing to optimize the feature selection problem in marketing applications
TW530234B (en) Methods and systems for efficiently sampling portfolios for optimal underwriting
Liu et al. LSTM based reserve prediction for bank outlets
Bajari et al. Hedonic prices and quality adjusted price indices powered by AI
CN111105311A (en) Dynamic credit rating method and device for bond body
Dong et al. Belt: A pipeline for stock price prediction using news
CN115080868A (en) Product pushing method, product pushing device, computer equipment, storage medium and program product
Maguluri et al. An Efficient Stock Market Trend Prediction Using the Real-Time Stock Technical Data and Stock Social Media Data.
Michalewicz et al. Case study: an intelligent decision support system
Akyildirim et al. Forecasting high‐frequency excess stock returns via data analytics and machine learning
Zhang et al. An attention‐based Logistic‐CNN‐BiLSTM hybrid neural network for credit risk prediction of listed real estate enterprises
Hu Predicting and improving invoice-to-cash collection through machine learning
Bastos Predicting bank loan recovery rates with neural networks
Thesia et al. A dynamic scenario‐driven technique for stock price prediction and trading
Shaikh et al. Stock Price Prediction with Sentimental Analysis
Pattewar et al. Stock prediction analysis by customers opinion in Twitter data using an optimized intelligent model
Kirkos et al. Audit‐firm group appointment: an artificial intelligence approach
CN113222247A (en) Chemical raw material price and purchase quantity prediction method, device and related equipment
Liu et al. Stock price prediction using temporal graph model with value chain data
Oh et al. Developing time-based clustering neural networks to use change-point detection: Application to financial time series
Hájek Probabilistic neural networks for credit rating modelling
Sarao et al. Flight Fare Prediction Using Machine Learning
Renganathan Stock price analysis through Statistical and Data Science tools: An Overview

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210806

RJ01 Rejection of invention patent application after publication