CN116128566A - Price prediction method, price prediction device, electronic equipment and storage medium - Google Patents

Price prediction method, price prediction device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116128566A
CN116128566A CN202310349233.1A CN202310349233A CN116128566A CN 116128566 A CN116128566 A CN 116128566A CN 202310349233 A CN202310349233 A CN 202310349233A CN 116128566 A CN116128566 A CN 116128566A
Authority
CN
China
Prior art keywords
feature
preset
historical
price
price prediction
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
CN202310349233.1A
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.)
Beijing East Environment Energy Technology Co ltd
Original Assignee
Beijing East Environment Energy Technology 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 Beijing East Environment Energy Technology Co ltd filed Critical Beijing East Environment Energy Technology Co ltd
Priority to CN202310349233.1A priority Critical patent/CN116128566A/en
Publication of CN116128566A publication Critical patent/CN116128566A/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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Data Mining & Analysis (AREA)
  • General Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Health & Medical Sciences (AREA)
  • Water Supply & Treatment (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Public Health (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (AREA)
  • Tourism & Hospitality (AREA)
  • Artificial Intelligence (AREA)
  • Game Theory and Decision Science (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a price prediction method, a price prediction device, electronic equipment and a storage medium, wherein the price prediction method comprises the steps of configuring parameters in a pre-constructed parameter file and executing the following model training process: acquiring historical feature data based on the configured parameters; calculating an association coefficient between each preset feature associated with the historical feature data and the historical price in the historical feature data; determining a plurality of feature groups based on the plurality of association coefficients and the configured parameters; training at least one price prediction model in the pre-constructed price prediction models based on each feature group and the corresponding historical feature data; based on the time period to be predicted and the corresponding characteristic data thereof, the price corresponding to the time period to be predicted is predicted by adopting a price prediction model meeting the preset training cut-off condition, so that the technical problem that the characteristics to be learned are not changed along with the change of influence factors when the model is updated in the prior art is solved, and the accuracy of model prediction is improved.

Description

Price prediction method, price prediction device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a price prediction method, a price prediction device, an electronic device, and a storage medium.
Background
With the increasing development of the electricity trading market, electricity prices become key factors for power generators and electricity companies to formulate optimal trading strategies, so how to accurately predict electricity prices is of great importance. The predicted power price is obtained by analyzing and researching by using a model under the condition of fully considering the influence factors such as the supply and demand relationship of a power trade market, the market force of market participants, the power cost, the market system structure and the like, exploring the internal relation between the power price and the influence factors thereof and the development change rule of the power price, and predicting the price in the future power market under the condition of meeting the requirements of certain prediction precision and calculation speed. In the prior art, a model for predicting the price of electric power needs to be maintained and updated to improve the accuracy of predicting the price of electric power by the model, but as time goes on, the influencing factors of the price of electric power in the electric power trade market may change, so that the characteristics of the model which need to be learned and are related to the price of electric power change in the training process, and the model is continuously trained by the historical data related to the original characteristics, so that the price of electric power cannot be accurately predicted.
Disclosure of Invention
In view of the foregoing, it is an object of the present application to provide a price prediction method, apparatus, electronic device and storage medium, so as to overcome all or part of the drawbacks in the prior art.
Based on the above objects, the present application provides a price prediction method, including: configuring parameters in a pre-constructed parameter file and executing the following model training process: acquiring historical feature data based on the configured parameters; calculating a correlation coefficient between each preset feature associated with the historical feature data and a historical price in the historical feature data; determining a plurality of feature groups based on the plurality of association coefficients and the configured parameters, wherein each feature group comprises at least one preset feature; training at least one price prediction model in a plurality of pre-constructed price prediction models based on each feature group and the corresponding historical feature data so as to obtain a price prediction model meeting a preset training cut-off condition; and predicting the price corresponding to the time period to be predicted by adopting the price prediction model meeting the preset training cut-off condition based on the time period to be predicted and the corresponding characteristic data.
Optionally, determining the preset feature associated with the historical feature data includes: filling the missing value of the historical characteristic data in response to determining that the historical characteristic data is in a missing state; performing feature derivation on the features corresponding to the filled historical feature data to obtain derived features; and determining the features corresponding to the derivative features and the filled historical feature data as preset features associated with the historical feature data.
Optionally, the parameters of the parameter file include weights of each preset feature; the calculating of the correlation coefficient between each preset feature associated with the historical feature data and the historical price in the historical feature data includes: calculating the absolute value of a linear correlation coefficient between each preset feature and the historical price; and taking the product of the absolute value of the linear correlation coefficient and the weight of the corresponding preset feature as the correlation coefficient.
Optionally, the parameters of the parameter file include a preset grouping rule; the determining a plurality of feature sets based on the plurality of association coefficients and the configured parameters includes: taking the preset feature with the association coefficient larger than a preset association coefficient threshold value as a candidate preset feature; sequencing the candidate preset features according to the sequence from the big to the small of the corresponding association coefficient to obtain a feature sequence; and selecting different numbers of candidate preset features from the feature sequence in sequence based on the preset grouping rule to form N feature groups, wherein the number of the candidate preset features in the feature groups gradually increases according to the sequence from 1 to N, the latter feature group comprises all candidate preset features in the former feature group, and the number of all candidate preset features is equal to the number N of the feature groups.
Optionally, before training at least one price prediction model of the plurality of pre-constructed price prediction models based on each feature group and the historical feature data corresponding thereto, the method comprises: calculating the sum of squares of the correlation coefficients of all candidate preset features in each feature group based on the correlation coefficients of each candidate preset feature; each feature set is ordered in the order of the sum of squares corresponding thereto from large to small.
Optionally, the parameters of the parameter file include a total number of model training and a model tolerance error; training at least one price prediction model in a plurality of pre-constructed price prediction models based on each feature group and the corresponding historical feature data to obtain a price prediction model meeting a preset training cut-off condition, wherein the training comprises the following steps: training at least one price prediction model according to the sequence of the sequenced feature groups based on each feature group and the historical feature data corresponding to each feature group; and in response to determining that the training times of at least one price prediction model is greater than the total times of model training and the output error of at least one trained price prediction model is less than or equal to the model tolerance error, determining the price prediction model with the minimum output error as the price prediction model meeting the preset training cut-off condition.
Optionally, the method further comprises: and in response to determining that the training times of at least one price prediction model are greater than the total number of model training times and that the output errors of all price prediction models are greater than the model tolerance errors, reconfiguring parameters in the pre-constructed parameter file and executing the model training process to obtain a price prediction model meeting the preset training cut-off condition.
Based on the same inventive concept, the application also provides a price prediction device, which comprises a configuration module configured to configure parameters in a pre-constructed parameter file and execute the following model training process: an acquisition module configured to acquire historical feature data based on the configured parameters; a calculation module configured to calculate a correlation coefficient between each preset feature associated with the historical feature data and a historical price in the historical feature data; a first determining module configured to determine a plurality of feature groups based on the plurality of association coefficients and the configured parameters, wherein each feature group includes at least one preset feature; the training module is configured to train at least one price prediction model in a plurality of pre-constructed price prediction models based on each feature group and the corresponding historical feature data so as to obtain a price prediction model meeting a preset training cut-off condition; and the prediction module is configured to predict the price corresponding to the time period to be predicted by adopting the price prediction model meeting the preset training cut-off condition based on the time period to be predicted and the corresponding characteristic data thereof.
Based on the same inventive concept, the application also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable by the processor, the processor implementing the method as described above when executing the computer program.
Based on the same inventive concept, the present application also provides a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method as described above.
From the above, it can be seen that the price prediction method, apparatus, electronic device and storage medium provided by the present application, by configuring parameters in a pre-constructed parameter file and executing the following model training process, after parameter configuration, the model can be automatically trained and updated, so as to ensure timeliness of model update. Historical feature data is acquired based on the configured parameters such that the historical feature data is representative. And calculating the association coefficient between each preset feature associated with the historical feature data and the historical price in the historical feature data, and more intuitively determining the influence degree of the preset feature on the historical price through specific numerical values. Based on the plurality of association coefficients and the configured parameters, a plurality of feature groups are determined, wherein each feature group comprises at least one preset feature, and the aim of providing more selectable learning features for updating the model is fulfilled. Based on each feature group and the corresponding historical feature data, training at least one price prediction model in a plurality of pre-constructed price prediction models to obtain a price prediction model meeting preset training cut-off conditions, and improving the accuracy of price prediction of the price prediction model. Based on the time period to be predicted and the corresponding characteristic data, the price corresponding to the time period to be predicted is predicted by adopting the price prediction model meeting the preset training cut-off condition, so that the accuracy of price prediction is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present application or related art, the drawings that are required to be used in the description of the embodiments or related art will be briefly described below, and it is apparent that the drawings in the following description are only embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 is a flow chart of a price prediction method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a price predicting device according to an embodiment of the present application;
fig. 3 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings.
It should be noted that unless otherwise defined, technical or scientific terms used in the embodiments of the present application should be given the ordinary meaning as understood by one of ordinary skill in the art to which the present application belongs. The terms "first," "second," and the like, as used in embodiments of the present application, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
As described in the background section, the power trade market is in increasing progress and factors affecting the price of power may change over time, resulting in changes in the characteristics associated with the price of power that the model to be updated needs to learn during the training process. When the price prediction model is maintained and updated, the model is continuously updated by utilizing the historical data related to the original characteristics, so that the updated model cannot accurately predict the price of the electric power.
In view of this, the embodiment of the present application proposes a price prediction method, referring to fig. 1, including the following steps:
step 101, configuring parameters in a pre-constructed parameter file and executing the following model training process.
In this step, in order to implement flexible updating of the price prediction model, parameters in the parameter file need to be configured, and for example, in the case that the predicted price is the price of electric power, the parameter file needs to be configured for the influencing factor of the price of electric power. All the characteristics affecting the price of the electric power are added in the parameter file according to the influencing factors of the price of the electric power, for example, the characteristics affecting the price of the electric power can be time, load, output and the like. It is also necessary to set derivative features for part of the features affecting the price of electricity, for example, derivative features of time may be set as workdays, holidays. The features and derived features together constitute preset features in the parameter file. The influence degree of different influence factors on the electric power price is different, and then the influence degree of different features to be learned of the model on the electric power price is different can be determined, weights can be added to preset features according to historical experience in a parameter file, the weight corresponding to the preset features with large influence degree on the electric power price is relatively large, and the weight corresponding to the preset features with small influence degree on the electric power price is relatively small, so that the preset features with large influence on the electric power price can be screened out in the subsequent calculation process. In the training process of the model, historical characteristic data also need to be acquired, influence factors influencing the price of the electric power are determined through analysis of the historical characteristic data, and a time period corresponding to the acquired historical characteristic data needs to be set in the parameter file. The parameter file also comprises the total number of model training and model tolerance errors, and the data are configured according to the experience of model training. After the parameter file is configured, the model is trained. Parameters in the parameter file are configured in advance, the parameters in the parameter file can be flexibly configured, and after the parameters are configured, the model can be automatically trained and updated so as to ensure timeliness of model updating.
It should be noted that, the model may be updated periodically in the parameter file, or may be updated before each price prediction.
Step 102, obtaining historical feature data based on the configured parameters.
In this step, the configured parameters include a time period corresponding to the acquired history feature data, and the history feature data in the above time period is acquired from the database. The time period is not too long or too short, and the accuracy of features to be learned in the training process of the re-selection model can be affected by the too long or too short time period. The time period may be set according to an empirical value, and illustratively, the time period may be thirty days before the model update time. The proper setting of the time period can enable the historical characteristic data to accurately reflect the current factors influencing the price of the electric power, so that the historical characteristic data is representative.
Step 103, calculating a correlation coefficient between each preset feature associated with the historical feature data and the historical price in the historical feature data.
In this step, by parsing the history feature data, a preset feature corresponding to the history feature data may be determined in the parameter file. The association coefficient can reflect the association degree of the preset feature and the historical price, the calculated association coefficient is relatively large, the association degree of the preset feature corresponding to the calculated association coefficient and the historical price is relatively large, the calculated association coefficient is relatively small, and the association degree of the preset feature corresponding to the calculated association coefficient and the historical price is relatively small. The association coefficient quantifies the association degree of the preset feature and the historical price, and the influence degree of the preset feature on the historical price can be determined more intuitively through the specific numerical value.
Step 104, determining a plurality of feature groups based on the plurality of association coefficients and the configured parameters, wherein each feature group comprises at least one preset feature.
In this step, the degree of influence of the preset feature on the historical price can be determined by a plurality of correlation coefficients. Based on preset features with different influence degrees on the historical price and configured parameters, a plurality of feature groups are determined, and the purpose of providing more selectable learning features for updating the model is achieved.
And step 105, training at least one price prediction model in a plurality of pre-constructed price prediction models based on each feature group and the corresponding historical feature data so as to obtain the price prediction model meeting the preset training cut-off condition.
In this step, among the price prediction models corresponding to the plurality of feature groups, a price prediction model whose price prediction result is most accurate needs to be determined. And training at least one price prediction model through the plurality of feature groups and the corresponding historical feature data, wherein the price prediction model with the most accurate trained price prediction result is the price prediction model meeting the preset training cut-off condition. And (3) the feature group corresponding to the price prediction model meeting the preset training cut-off condition is the feature which is reselected by considering the feature change which needs to be learned in the training process of the price prediction model. By redetermining the features to be learned in the training process of the price prediction model, the price prediction model does not need to be subjected to model training by using historical feature data associated with the original features when being maintained and updated, and the accuracy of price prediction of the price prediction model is improved.
And step 106, predicting the price corresponding to the time period to be predicted by adopting the price prediction model meeting the preset training cut-off condition based on the time period to be predicted and the corresponding characteristic data thereof.
In the step, the price prediction model can achieve the purpose of predicting the price, and the price of the time period to be detected and the corresponding characteristic data thereof can be obtained by inputting the time period to be detected and the characteristic data thereof into the price prediction model. The features to be learned of the price prediction model in the training process are changed according to the influence degree on the price, so that the accuracy of price prediction is improved.
Through the scheme, parameters in the pre-constructed parameter file are configured, and the following model training process is executed, and after the parameters are configured, the model can be automatically trained and updated so as to ensure timeliness of model updating. Historical feature data is acquired based on the configured parameters such that the historical feature data is representative. And calculating the association coefficient between each preset feature associated with the historical feature data and the historical price in the historical feature data, and more intuitively determining the influence degree of the preset feature on the historical price through specific numerical values. Based on the plurality of association coefficients and the configured parameters, a plurality of feature groups are determined, wherein each feature group comprises at least one preset feature, and the aim of providing more selectable learning features for updating the model is fulfilled. Based on each feature group and the corresponding historical feature data, training at least one price prediction model in a plurality of pre-constructed price prediction models to obtain a price prediction model meeting preset training cut-off conditions, and improving the accuracy of price prediction of the price prediction model. Based on the time period to be predicted and the corresponding characteristic data, the price corresponding to the time period to be predicted is predicted by adopting the price prediction model meeting the preset training cut-off condition, so that the accuracy of price prediction is improved.
In some embodiments, determining the preset feature associated with the historical feature data comprises: filling the missing value of the historical characteristic data in response to determining that the historical characteristic data is in a missing state; performing feature derivation on the features corresponding to the filled historical feature data to obtain derived features; and determining the features corresponding to the derivative features and the filled historical feature data as preset features associated with the historical feature data.
In this embodiment, after the historical feature data is obtained, the historical feature data may be in a missing state, and the historical feature data in the missing state needs to be filled to ensure the integrity of the historical feature data. Based on a time period corresponding to the obtained historical feature data, sorting the historical feature data from near to far according to time, searching the missing values of the sorted historical feature data, and responding to the fact that the historical feature data is in a missing state, filling by using a nearest neighbor data fitting interpolation method, wherein the nearest neighbor data fitting interpolation method is used for filling by using the average value of n nearest points of missing value time points, and providing a data basis for the subsequent steps. The derived features that can be derived from the features have been set in advance in the parameter file. According to the parameter file, carrying out feature derivation on the features corresponding to the filled historical feature data, wherein the time can be divided into years, months, days and moments firstly by the features, and then carrying out feature derivation on the time to obtain workdays and rest days; and carrying out characteristic crossing on different loads and forces in a mode of adding and ratio to obtain derivative characteristics, and unifying dimensionality of the logarithmic values by using data normalization. By carrying out feature derivation on the features corresponding to the historical feature data, training samples of the model are increased, dependence on existing data is reduced, the phenomenon of over-fitting of the model in the training process is prevented, and generalization capability of the model and convergence speed of the model are improved.
In some embodiments, the parameters of the parameter file include weights for each preset feature; the calculating of the correlation coefficient between each preset feature associated with the historical feature data and the historical price in the historical feature data includes: calculating the absolute value of a linear correlation coefficient between each preset feature and the historical price; and taking the product of the absolute value of the linear correlation coefficient and the weight of the corresponding preset feature as the correlation coefficient.
In this embodiment, the pearson correlation coefficient is used to calculate the linear correlation coefficient between each preset feature and the historical price, and further calculate the absolute value of the linear correlation coefficient. The calculated linear correlation coefficient ranges from-1 to 1, the absolute value of the linear correlation coefficient is closer to 0 to indicate that the degree of correlation between the preset feature and the historical price is smaller, and the absolute value of the correlation coefficient is closer to 1 to indicate that the degree of correlation between the preset feature and the historical price is larger, wherein the pearson correlation coefficient is used for measuring the linear correlation coefficient of two variables. The abstract relation between each preset feature and the historical price is specifically and numerically used, so that the influence degree of each preset feature on the historical price can be intuitively determined. The weight of each preset feature can be set in advance according to the history experience in the parameter file, the absolute value of the linear correlation coefficient is multiplied by the weight of the corresponding preset feature, the purpose of adjusting the influence degree of each preset feature on the history price according to the history experience is achieved, and the influence degree of each preset feature on the history price is determined more accurately.
In some embodiments, the parameters of the parameter file include preset grouping rules; the determining a plurality of feature sets based on the plurality of association coefficients and the configured parameters includes: taking the preset feature with the association coefficient larger than a preset association coefficient threshold value as a candidate preset feature; sequencing the candidate preset features according to the sequence from the big to the small of the corresponding association coefficient to obtain a feature sequence; and selecting different numbers of candidate preset features from the feature sequence in sequence based on the preset grouping rule to form N feature groups, wherein the number of the candidate preset features in the feature groups gradually increases according to the sequence from 1 to N, the latter feature group comprises all candidate preset features in the former feature group, and the number of all candidate preset features is equal to the number N of the feature groups.
In this embodiment, the influence degree of each preset feature on the historical price is different, the preset feature with relatively small influence degree on the historical price does not need to participate in training of the model, and the predicted price result obtained by training of the preset feature participation model with relatively small influence degree on the historical price is inaccurate. Therefore, it is necessary to screen preset features having a relatively large degree of influence on the historical price. And taking the preset features with the association coefficient larger than the preset association coefficient threshold value as the preset features with relatively large influence degree on the historical price, namely screening candidate preset features, wherein the preset association coefficient threshold value is determined according to historical experience. And sequencing the candidate preset features according to the sequence from the large to the small of the corresponding association coefficient to obtain a feature sequence, wherein the feature sequence is the sequencing of the influence degree of the candidate preset features on the historical price. The parameter file further comprises a preset grouping rule, the feature sequence is grouped based on the preset grouping rule to form N feature groups, wherein the preset grouping rule is that the number N of all candidate preset features is determined to be the number N of the feature groups, the number of the candidate preset features in the feature groups is gradually increased in sequence from 1 to N, and the latter feature group comprises all candidate preset features in the former feature group. By determining multiple feature sets, more selectable learning features are provided for training of the model.
In some embodiments, prior to training at least one price prediction model of the plurality of pre-constructed price prediction models based on each feature set and historical feature data corresponding thereto, the method comprises: calculating the sum of squares of the correlation coefficients of all candidate preset features in each feature group based on the correlation coefficients of each candidate preset feature; each feature set is ordered in the order of the sum of squares corresponding thereto from large to small.
In this embodiment, each feature group includes different candidate preset features, and the influence degree of each candidate preset feature on the historical price is relatively large, so that the price result output by the model is closer to the actual price. In the subsequent model training process, the feature changes of all feature groups are not required to be learned, and only the feature changes of the feature groups with relatively large influence on the historical price are required to be learned, so that the sequence of the feature groups participating in the model training is required to be ordered. And calculating the square sum of the association coefficients of all candidate preset features in each feature group, and sequencing the feature groups according to the order of the square sum from large to small. And the concrete numerical value is obtained by calculating the square sum of the association coefficients, the influence degree of the feature group on the historical price is quantized, the influence degree of the feature group on the historical price is intuitively reflected by the concrete numerical value, the model is trained from the feature group with large numerical value, the training efficiency of the model is improved, and the time cost of model training is reduced.
In some embodiments, the parameters of the parameter file include a total number of model training and model tolerance errors; training at least one price prediction model in a plurality of pre-constructed price prediction models based on each feature group and the corresponding historical feature data to obtain a price prediction model meeting a preset training cut-off condition, wherein the training comprises the following steps: training at least one price prediction model according to the sequence of the sequenced feature groups based on each feature group and the historical feature data corresponding to each feature group; and in response to determining that the training times of at least one price prediction model is greater than the total times of model training and the output error of at least one trained price prediction model is less than or equal to the model tolerance error, determining the price prediction model with the minimum output error as the price prediction model meeting the preset training cut-off condition.
In this embodiment, the parameter file includes the total number of model training, and at least one price prediction model is trained according to the sequence of the feature set, so that the sum of the training numbers of all price prediction models is limited, the iterative update number of the price prediction models is reduced, and the time cost and the labor cost are reduced. The price prediction model trained by each feature set can be one or more, and the price prediction model can be one or more of a random gradient descent model, a K nearest neighbor model and a long-term and short-term memory model, and the types corresponding to the one or more price prediction models trained by each feature set are the same. And under the condition that the price prediction models are multiple, training the multiple price prediction models corresponding to the ordered feature groups. In the parameter file configuration, the types of price prediction models need to be considered, for example, when the price prediction models are multiple, the total number of times of model training needs to be increased compared with the case that the price prediction models are one. And stopping training the model under the condition that the training times of at least one price prediction model are greater than the total training times, and determining a price prediction model with an output error smaller than a tolerance error of the model in the trained price prediction model, wherein the output error is an absolute value of a difference value between an output price and an actual historical price. The price prediction model with the smallest output error shows that the training effect of the price prediction model corresponding to the price prediction model is best, and also shows that the larger the association degree between the characteristics and the price in the price prediction model is, the price prediction model with the smallest output error is determined to be the price prediction model meeting the preset training cut-off condition. Features to be learned of the price prediction model in the training process can be changed along with changes of price influence factors, adaptability of the price prediction model is improved, and accuracy of price prediction of the price prediction model is improved.
In some embodiments, the method further comprises: and in response to determining that the training times of at least one price prediction model are greater than the total number of model training times and that the output errors of all price prediction models are greater than the model tolerance errors, reconfiguring parameters in the pre-constructed parameter file and executing the model training process to obtain a price prediction model meeting the preset training cut-off condition.
In this embodiment, when the number of training times of at least one price prediction model is greater than the total number of model training times, and the error of the price prediction model after all training is greater than the tolerance error of the model, it is indicated that the price prediction model which does not meet the training cutoff condition needs to be reconfigured, for example, the weight of the feature is adjusted, the tolerance error of the model is adjusted, the total number of training times is adjusted, and so on. After the parameters in the parameter file are reconfigured, the price prediction model is trained again, so that the price prediction model meeting the preset cut-off condition is obtained, and the accuracy of model prediction is improved.
It should be noted that, the method of the embodiments of the present application may be performed by a single device, for example, a computer or a server. The method of the embodiment can also be applied to a distributed scene, and is completed by mutually matching a plurality of devices. In the case of such a distributed scenario, one of the devices may perform only one or more steps of the methods of embodiments of the present application, and the devices may interact with each other to complete the methods.
It should be noted that some embodiments of the present application are described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Based on the same inventive concept, the application also provides a price prediction device corresponding to the method of any embodiment.
Referring to fig. 2, the price prediction apparatus includes:
a configuration module 10 configured to configure parameters in a pre-built parameter file and perform a model training process as follows:
an acquisition module 20 configured to acquire historical feature data based on the configured parameters;
a calculation module 30 configured to calculate a correlation coefficient between each preset feature associated with the historical feature data and a historical price in the historical feature data;
A first determining module 40 configured to determine a plurality of feature groups based on the plurality of association coefficients and the configured parameters, wherein each feature group includes at least one preset feature;
a training module 50 configured to train at least one price prediction model of a plurality of pre-constructed price prediction models based on each feature group and the historical feature data corresponding thereto to obtain a price prediction model satisfying a preset training cutoff condition;
the prediction module 60 is configured to predict a price corresponding to the time period to be predicted by adopting the price prediction model meeting a preset training cut-off condition based on the time period to be predicted and the corresponding characteristic data thereof.
By the device, parameters in a pre-constructed parameter file are configured, and a model training process is executed, and after the parameters are configured, the model can be automatically trained and updated so as to ensure timeliness of model updating. Historical feature data is acquired based on the configured parameters such that the historical feature data is representative. And calculating the association coefficient between each preset feature associated with the historical feature data and the historical price in the historical feature data, and more intuitively determining the influence degree of the preset feature on the historical price through specific numerical values. Based on the plurality of association coefficients and the configured parameters, a plurality of feature groups are determined, wherein each feature group comprises at least one preset feature, and the aim of providing more selectable learning features for updating the model is fulfilled. Based on each feature group and the corresponding historical feature data, training at least one price prediction model in a plurality of pre-constructed price prediction models to obtain a price prediction model meeting preset training cut-off conditions, and improving the accuracy of price prediction of the price prediction model. Based on the time period to be predicted and the corresponding characteristic data, the price corresponding to the time period to be predicted is predicted by adopting the price prediction model meeting the preset training cut-off condition, so that the accuracy of price prediction is improved.
In some embodiments, the method further comprises a second determination module further configured to: filling the missing value of the historical characteristic data in response to determining that the historical characteristic data is in a missing state; performing feature derivation on the features corresponding to the filled historical feature data to obtain derived features; and determining the features corresponding to the derivative features and the filled historical feature data as preset features associated with the historical feature data.
In some embodiments, the computing module 30 is further configured such that the parameters of the parameter file include weights for each preset feature; calculating the absolute value of a linear correlation coefficient between each preset feature and the historical price; and taking the product of the absolute value of the linear correlation coefficient and the weight of the corresponding preset feature as the correlation coefficient.
In some embodiments, the first determining module 40 is further configured such that the parameters of the parameter file include a preset grouping rule; taking the preset feature with the association coefficient larger than a preset association coefficient threshold value as a candidate preset feature; sequencing the candidate preset features according to the sequence from the big to the small of the corresponding association coefficient to obtain a feature sequence; and selecting different numbers of candidate preset features from the feature sequence in sequence based on the preset grouping rule to form N feature groups, wherein the number of the candidate preset features in the feature groups gradually increases according to the sequence from 1 to N, the latter feature group comprises all candidate preset features in the former feature group, and the number of all candidate preset features is equal to the number N of the feature groups.
In some embodiments, the method further comprises a ranking module further configured to calculate a sum of squares of the correlation coefficients of all candidate preset features in each feature group based on the correlation coefficients of each candidate preset feature before training at least one of the plurality of pre-constructed price prediction models based on each feature group and the historical feature data corresponding thereto; each feature set is ordered in the order of the sum of squares corresponding thereto from large to small.
In some embodiments, the training module 50 is further configured such that the parameters of the parameter file include a total number of model training and model tolerance errors; training at least one price prediction model according to the sequence of the sequenced feature groups based on each feature group and the historical feature data corresponding to each feature group; and in response to determining that the training times of at least one price prediction model is greater than the total times of model training and the output error of at least one trained price prediction model is less than or equal to the model tolerance error, determining the price prediction model with the minimum output error as the price prediction model meeting the preset training cut-off condition.
In some embodiments, further comprising an execution module further configured to: and in response to determining that the training times of at least one price prediction model are greater than the total number of model training times and that the output errors of all price prediction models are greater than the model tolerance errors, reconfiguring parameters in the pre-constructed parameter file and executing the model training process to obtain a price prediction model meeting the preset training cut-off condition.
For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, the functions of each module may be implemented in the same piece or pieces of software and/or hardware when implementing the present application.
The device of the foregoing embodiment is used to implement the corresponding price prediction method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Based on the same inventive concept, the application also provides an electronic device corresponding to the method of any embodiment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the price prediction method of any embodiment when executing the program.
Fig. 3 shows a more specific hardware architecture of an electronic device according to this embodiment, where the device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 implement communication connections therebetween within the device via a bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit ), microprocessor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc. for executing relevant programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory ), static storage device, dynamic storage device, or the like. Memory 1020 may store an operating system and other application programs, and when the embodiments of the present specification are implemented in software or firmware, the associated program code is stored in memory 1020 and executed by processor 1010.
The input/output interface 1030 is used to connect with an input/output module for inputting and outputting information. The input/output module may be configured as a component in a device (not shown in the figure) or may be external to the device to provide corresponding functionality. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various types of sensors, etc., and the output devices may include a display, speaker, vibrator, indicator lights, etc.
Communication interface 1040 is used to connect communication modules (not shown) to enable communication interactions of the present device with other devices. The communication module may implement communication through a wired manner (such as USB, network cable, etc.), or may implement communication through a wireless manner (such as mobile network, WIFI, bluetooth, etc.).
Bus 1050 includes a path for transferring information between components of the device (e.g., processor 1010, memory 1020, input/output interface 1030, and communication interface 1040).
It should be noted that although the above-described device only shows processor 1010, memory 1020, input/output interface 1030, communication interface 1040, and bus 1050, in an implementation, the device may include other components necessary to achieve proper operation. Furthermore, it will be understood by those skilled in the art that the above-described apparatus may include only the components necessary to implement the embodiments of the present description, and not all the components shown in the drawings.
The electronic device of the foregoing embodiment is configured to implement the corresponding price prediction method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which is not described herein.
Based on the same inventive concept, corresponding to any of the above embodiments of the method, the present application further provides a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the price prediction method according to any of the above embodiments.
The computer readable media of the present embodiments, including both permanent and non-permanent, removable and non-removable media, may be used to implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device.
The storage medium of the above embodiment stores computer instructions for causing the computer to execute the price prediction method according to any of the above embodiments, and has the advantages of the corresponding method embodiments, which are not described herein.
Those of ordinary skill in the art will appreciate that: the discussion of any of the embodiments above is merely exemplary and is not intended to suggest that the scope of the application (including the claims) is limited to these examples; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the present application, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of brevity.
Additionally, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown within the provided figures, in order to simplify the illustration and discussion, and so as not to obscure the embodiments of the present application. Furthermore, the devices may be shown in block diagram form in order to avoid obscuring the embodiments of the present application, and this also takes into account the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform on which the embodiments of the present application are to be implemented (i.e., such specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the application, it should be apparent to one skilled in the art that embodiments of the application can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative in nature and not as restrictive.
While the present application has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of those embodiments will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
The present embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Accordingly, any omissions, modifications, equivalents, improvements and/or the like which are within the spirit and principles of the embodiments are intended to be included within the scope of the present application.

Claims (10)

1. A method of price prediction, comprising:
configuring parameters in a pre-constructed parameter file and executing the following model training process:
acquiring historical feature data based on the configured parameters;
calculating a correlation coefficient between each preset feature associated with the historical feature data and a historical price in the historical feature data;
determining a plurality of feature groups based on the plurality of association coefficients and the configured parameters, wherein each feature group comprises at least one preset feature;
Training at least one price prediction model in a plurality of pre-constructed price prediction models based on each feature group and the corresponding historical feature data so as to obtain a price prediction model meeting a preset training cut-off condition;
and predicting the price corresponding to the time period to be predicted by adopting the price prediction model meeting the preset training cut-off condition based on the time period to be predicted and the corresponding characteristic data.
2. The method of claim 1, wherein determining the preset feature associated with the historical feature data comprises:
filling the missing value of the historical characteristic data in response to determining that the historical characteristic data is in a missing state;
performing feature derivation on the features corresponding to the filled historical feature data to obtain derived features;
and determining the features corresponding to the derivative features and the filled historical feature data as preset features associated with the historical feature data.
3. The method of claim 1, wherein the parameters of the profile include weights for each preset feature;
the calculating of the correlation coefficient between each preset feature associated with the historical feature data and the historical price in the historical feature data includes:
Calculating the absolute value of a linear correlation coefficient between each preset feature and the historical price;
and taking the product of the absolute value of the linear correlation coefficient and the weight of the corresponding preset feature as the correlation coefficient.
4. The method of claim 1, wherein the parameters of the parameter file comprise preset grouping rules;
the determining a plurality of feature sets based on the plurality of association coefficients and the configured parameters includes:
taking the preset feature with the association coefficient larger than a preset association coefficient threshold value as a candidate preset feature;
sequencing the candidate preset features according to the sequence from the big to the small of the corresponding association coefficient to obtain a feature sequence;
and selecting different numbers of candidate preset features from the feature sequence in sequence based on the preset grouping rule to form N feature groups, wherein the number of the candidate preset features in the feature groups gradually increases according to the sequence from 1 to N, the latter feature group comprises all candidate preset features in the former feature group, and the number of all candidate preset features is equal to the number N of the feature groups.
5. The method of claim 1, wherein prior to training at least one of the plurality of pre-constructed price prediction models based on each feature set and historical feature data corresponding thereto, the method comprises:
Calculating the sum of squares of the correlation coefficients of all candidate preset features in each feature group based on the correlation coefficients of each candidate preset feature;
each feature set is ordered in the order of the sum of squares corresponding thereto from large to small.
6. The method of claim 5, wherein the parameters of the parameter file include a total number of model training and model tolerance errors;
training at least one price prediction model in a plurality of pre-constructed price prediction models based on each feature group and the corresponding historical feature data to obtain a price prediction model meeting a preset training cut-off condition, wherein the training comprises the following steps:
training at least one price prediction model according to the sequence of the sequenced feature groups based on each feature group and the historical feature data corresponding to each feature group;
and in response to determining that the training times of at least one price prediction model is greater than the total times of model training and the output error of at least one trained price prediction model is less than or equal to the model tolerance error, determining the price prediction model with the minimum output error as the price prediction model meeting the preset training cut-off condition.
7. The method of claim 6, wherein the method further comprises:
and in response to determining that the training times of at least one price prediction model are greater than the total number of model training times and that the output errors of all price prediction models are greater than the model tolerance errors, reconfiguring parameters in the pre-constructed parameter file and executing the model training process to obtain a price prediction model meeting the preset training cut-off condition.
8. A price prediction apparatus, comprising:
the configuration module is configured to configure parameters in the pre-constructed parameter file and execute the following model training process:
an acquisition module configured to acquire historical feature data based on the configured parameters;
a calculation module configured to calculate a correlation coefficient between each preset feature associated with the historical feature data and a historical price in the historical feature data;
a first determining module configured to determine a plurality of feature groups based on the plurality of association coefficients and the configured parameters, wherein each feature group includes at least one preset feature;
the training module is configured to train at least one price prediction model in a plurality of pre-constructed price prediction models based on each feature group and the corresponding historical feature data so as to obtain a price prediction model meeting a preset training cut-off condition;
And the prediction module is configured to predict the price corresponding to the time period to be predicted by adopting the price prediction model meeting the preset training cut-off condition based on the time period to be predicted and the corresponding characteristic data thereof.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when the program is executed by the processor.
10. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 7.
CN202310349233.1A 2023-04-04 2023-04-04 Price prediction method, price prediction device, electronic equipment and storage medium Pending CN116128566A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310349233.1A CN116128566A (en) 2023-04-04 2023-04-04 Price prediction method, price prediction device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310349233.1A CN116128566A (en) 2023-04-04 2023-04-04 Price prediction method, price prediction device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116128566A true CN116128566A (en) 2023-05-16

Family

ID=86299350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310349233.1A Pending CN116128566A (en) 2023-04-04 2023-04-04 Price prediction method, price prediction device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116128566A (en)

Similar Documents

Publication Publication Date Title
CN112566196B (en) Heterogeneous network access selection method based on smart grid and related equipment
CN111950225B (en) Chip layout method and device, storage medium and electronic equipment
CN110263938B (en) Method and apparatus for generating information
Vafaei et al. Selecting normalization techniques for the analytical hierarchy process
CN110633859B (en) Hydrologic sequence prediction method integrated by two-stage decomposition
CN111461445B (en) Short-term wind speed prediction method and device, computer equipment and storage medium
CN111898247B (en) Landslide displacement prediction method, landslide displacement prediction equipment and storage medium
Silva et al. A multi-criteria decision model for the selection of a more suitable Internet-of-Things device
CN116757378A (en) Demand response evaluation model training method, application evaluation method and related equipment
CN117592012A (en) Petroleum feature processing method, device and equipment based on linear regression and decision tree
CN114490786A (en) Data sorting method and device
CN117573961A (en) Information recommendation method, device, electronic equipment, storage medium and program product
CN115689061B (en) Wind power ultra-short term power prediction method and related equipment
CN116128566A (en) Price prediction method, price prediction device, electronic equipment and storage medium
CN114816954A (en) Performance prediction method for deep learning model training and related equipment
CN110276501A (en) The prediction technique and device of the electricity price of short term power trade market
CN116011345A (en) Insulator information prediction model generation method, device, equipment and medium
CN114971736A (en) Power metering material demand prediction method and device, electronic equipment and storage medium
CN111461328B (en) Training method of neural network
CN113627755A (en) Test method, device, equipment and storage medium for intelligent terminal factory
CN112417543A (en) Model standard layer processing method and device and electronic equipment
CN112070354A (en) Power grid equipment operation efficiency evaluation method
CN116484201B (en) New energy power grid load prediction method and device and electronic equipment
CN113807654B (en) Evaluation method of network operation index, electronic equipment and storage medium
CN118227982A (en) ESG decision expected value calculation and prediction method and related equipment for power grid enterprises

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: 20230516

RJ01 Rejection of invention patent application after publication