A data prediction method, device, equipment and computer readable storage medium
By collecting influence parameters, calculating the initial feature vectors and using the kernel main element analysis algorithm for feature extraction, the problem that the existing data prediction method is affected by human subjective factors is solved, and more efficient and accurate data prediction is achieved.
Patent Information
- Application Number
- CN202510113210.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-04-04
AI Technical Summary
Existing data prediction methods are greatly affected by human subjective factors, with low prediction accuracy, low efficiency, and contain redundant information or noisy data, resulting in low effectiveness.
A data prediction method is adopted to collect influence parameters, calculate the initial feature vector, and use the kernel main element analysis algorithm to perform feature extraction to obtain the target feature matrix, and input it into the pre-trained data prediction model to improve the data prediction efficiency and effectiveness.
It improves the accuracy and efficiency of data prediction, reduces the influence of human subjective factors, and enhances the effectiveness of prediction results.
Smart Images

Figure CN119762169A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data prediction method, device, equipment and computer-readable storage medium. Background Art
[0002] When data prediction is required, various influencing parameters related to the data to be predicted are collected. After collecting various influencing parameters, there are two main methods for using the collected influencing parameters to predict data. One is to directly use the collected influencing parameters to predict data based on manual experience and subjective judgment; the other is to input all collected influencing parameters into the prediction model for data prediction.
[0003] However, both of the above methods have their own shortcomings. First, the method of predicting data based on manual experience and subjective judgment is greatly affected by human subjective factors, and the accuracy of the predicted data is low, and the data prediction efficiency is low. Second, the method of inputting all the collected influencing parameters into the prediction model for data prediction contains a large amount of redundant information or noise data, resulting in low effectiveness of data prediction.
[0004] To sum up, how to effectively solve the problems of low accuracy of predicted data, low efficiency of data prediction, and low effectiveness of data prediction, which are greatly affected by human subjective factors, is an urgent problem that technical personnel in this field need to solve. Summary of the invention
[0005] The purpose of this application is to provide a data prediction method, which improves the efficiency of data prediction, improves the effectiveness of data prediction, avoids the influence of human subjective factors, and improves the accuracy of predicted data; another purpose of this application is to provide a data prediction device, equipment and computer-readable storage medium.
[0006] In order to solve the above technical problems, this application provides the following technical solutions:
[0007] A data prediction method, comprising:
[0008] Collecting influencing parameters corresponding to first preset number of first time points before the current moment; wherein each influencing parameter is an influencing parameter required for predicting the data to be predicted, and each time point is a time point selected at a preset time interval;
[0009] Calculate the initial eigenvectors corresponding to the first time points according to the influencing parameters;
[0010] Using a kernel principal component analysis algorithm to extract features from an initial feature matrix composed of each initial feature vector, to obtain a target feature matrix; wherein the dimension of each target feature vector in the target feature matrix is smaller than the dimension of each initial feature vector;
[0011] The target feature matrix is input into the pre-trained data prediction model, and the data prediction values corresponding to each of the second preset number of second time points after the current moment are output.
[0012] In a specific implementation of the present application, after collecting the influencing parameters corresponding to the first preset number of first time points before the current moment, and before calculating the initial feature vectors corresponding to the first time points according to the influencing parameters, it also includes:
[0013] When it is determined that each of the first time points includes a first time point where a missing influencing parameter exists, the first time point where the missing influencing parameter exists is determined as a target time point;
[0014] Acquire a first influencing parameter corresponding to the missing influencing parameter in the influencing parameter set corresponding to a time point before the target time point;
[0015] Acquire a second influencing parameter corresponding to the missing influencing parameter in the influencing parameter set corresponding to a time point after the target time point;
[0016] Calculating the mean of the first influencing parameter and the second influencing parameter to obtain a target mean;
[0017] Fill the target mean into the corresponding position of the missing influencing parameter.
[0018] In a specific implementation of the present application, a kernel principal component analysis algorithm is used to extract features from an initial feature matrix composed of initial feature vectors, including:
[0019] Calculate the characteristic parameter average values and characteristic parameter standard deviations respectively corresponding to various characteristic parameters in the initial characteristic matrix;
[0020] For each characteristic parameter, respectively calculate a first difference between each characteristic parameter and an average value of the characteristic parameter;
[0021] Calculate the quotient of the first difference and the characteristic parameter standard deviation to obtain a first quotient;
[0022] replacing the characteristic parameter with the first quotient value;
[0023] Obtaining an adjusted feature matrix obtained by replacing each feature parameter in the initial feature matrix;
[0024] The kernel principal component analysis algorithm is used to extract features from the adjusted feature matrix.
[0025] In a specific implementation of the present application, the target feature matrix is input into a pre-trained data prediction model, and the data prediction values corresponding to each of the second preset number of second time points after the current moment are output, including:
[0026] The target feature matrix is input into a first data prediction model obtained by training based on a bidirectional long short-term memory network, and the first data prediction values corresponding to each second time point are output; wherein the target feature matrix includes prediction feature parameters of backward time points at preset time intervals corresponding to each first time point;
[0027] Inputting the target feature matrix into a second data prediction model trained based on a support vector regression algorithm, and outputting second data prediction values corresponding to each second time point;
[0028] The first data prediction value and the second data prediction value corresponding to each second time point are averaged to obtain the data prediction value corresponding to each second time point.
[0029] In a specific implementation of the present application, after outputting the first data prediction values corresponding to each second time point, the method further includes:
[0030] Obtaining the true value of the first data corresponding to each second time point;
[0031] The first data prediction model is evaluated according to each first data prediction value and each first data true value.
[0032] In a specific implementation of the present application, evaluating the first data prediction model according to each first data prediction value and each first data true value includes:
[0033] For each second time point, calculating a second difference between the first data prediction value and the first data true value;
[0034] Calculating a quotient of the second difference and the first data true value to obtain an initial accuracy rate;
[0035] Calculate the target accuracy rate corresponding to each second time point according to each initial accuracy rate;
[0036] The first data prediction model is evaluated according to each target accuracy.
[0037] In a specific implementation of the present application, the target accuracy corresponding to each second time point is calculated according to each initial accuracy, including:
[0038] When the first data predicted value and the first data true value are both 0, the target accuracy is determined to be 100%;
[0039] When the first data prediction value is not 0 and the first data true value is 0, determining the target accuracy rate to be 0;
[0040] When the first data true value is not 0 and the initial accuracy is greater than 0, calculating a third difference between the first data true value and the first data predicted value;
[0041] Calculating a second quotient between the third difference and the true value of the first data, and calculating an absolute value of the second quotient;
[0042] Determine the difference between 1 and the absolute value as the target accuracy;
[0043] When the initial accuracy rate is less than 0, determining the target accuracy rate to be 0;
[0044] When the first data prediction value is lower than a first preset value, the first data prediction value is reset to 0; and when the first data true value is lower than a second preset value, the first data true value is reset to 0.
[0045] A data prediction device, comprising:
[0046] An influencing parameter collection unit, used to collect influencing parameters corresponding to a first preset number of first time points before the current moment; wherein each influencing parameter is an influencing parameter required for predicting the data to be predicted, and each time point is a time point selected at a preset time interval;
[0047] An initial feature vector calculation unit, used to calculate the initial feature vectors corresponding to each first time point according to each influencing parameter;
[0048] A target feature matrix obtaining unit is used to extract features from an initial feature matrix composed of each initial feature vector using a kernel principal component analysis algorithm to obtain a target feature matrix; wherein the dimension of each target feature vector in the target feature matrix is smaller than the dimension of each initial feature vector;
[0049] The data prediction value output unit is used to input the target feature matrix into the pre-trained data prediction model, and output the data prediction values corresponding to each of the second preset number of second time points after the current moment.
[0050] A data prediction device, comprising:
[0051] Memory for storing computer programs;
[0052] A processor is used to implement the steps of the data prediction method as described above when executing the computer program.
[0053] A computer-readable storage medium stores a computer program, which implements the steps of the data prediction method as described above when executed by a processor.
[0054] The data prediction method provided in the present application collects influencing parameters corresponding to each first time point of a first preset number before the current moment; wherein each influencing parameter is an influencing parameter required for predicting the data to be predicted, and each time point is a time point selected at a preset time interval; initial feature vectors corresponding to each first time point are calculated according to each influencing parameter; an initial feature matrix composed of each initial feature vector is extracted using a kernel principal component analysis algorithm to obtain a target feature matrix; wherein the dimension of each target feature vector in the target feature matrix is smaller than the dimension of each initial feature vector; the target feature matrix is input into a pre-trained data prediction model, and data prediction values corresponding to each second time point of a second preset number after the current moment are output.
[0055] It can be seen from the above technical solution that by collecting the influencing parameters corresponding to the first preset number of first time points before the current moment, the initial feature vectors corresponding to the first time points are calculated according to the influencing parameters, and the preprocessing of the collected original influencing parameters is realized. The initial feature vectors with greater relevance to data prediction are calculated according to the influencing parameters, thereby obtaining an initial feature matrix containing multiple initial feature vectors. After the initial feature matrix is calculated, the kernel principal component analysis algorithm is used to extract features from the initial feature matrix composed of the initial feature vectors to obtain the target feature matrix. The target feature matrix is input into the pre-trained data prediction model, and the data prediction values corresponding to the second preset number of second time points after the current moment are output. By using the kernel principal component analysis algorithm for feature extraction, the feature parameters with high relevance to data prediction are screened, and the feature parameters with low relevance to data prediction are eliminated, thereby improving the efficiency of data prediction and the effectiveness of data prediction. By using the data prediction model to predict data according to the target feature matrix obtained by feature extraction, the influence of human subjective factors is avoided and the accuracy of the predicted data is improved.
[0056] Correspondingly, the present application also provides a data prediction device, equipment and computer-readable storage medium corresponding to the above-mentioned data prediction method, which have the above-mentioned technical effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0058] Figure 1 This is a flowchart of an implementation of a data prediction method in an embodiment of the present application;
[0059] Figure 2 This is a flowchart of another data prediction method in an embodiment of the present application;
[0060] Figure 3 This is a simplified structural diagram of a hidden layer unit of a bidirectional long short-term memory network in an embodiment of the present application;
[0061] Figure 4 A schematic diagram of a forget gate of a hidden layer unit of a bidirectional long short-term memory network in an embodiment of the present application;
[0062] Figure 5 A schematic diagram of an input gate of a hidden layer unit of a bidirectional long short-term memory network in an embodiment of the present application;
[0063] Figure 6 This is a schematic diagram of an output gate of a hidden layer unit of a bidirectional long short-term memory network in an embodiment of the present application;
[0064] Figure 7 This is a flowchart of another data prediction method in an embodiment of the present application;
[0065] Figure 8 This is a structural block diagram of a data prediction device in an embodiment of the present application;
[0066] Fig. 9 This is a structural block diagram of a data prediction device in an embodiment of the present application;
[0067] Fig.10 A schematic diagram of the specific structure of a data prediction device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0069] See also Figure 1 , Figure 1 This is a flowchart of an implementation of a data prediction method in an embodiment of the present application. The method may include the following steps:
[0070] S101: Collect influencing parameters corresponding to a first preset number of first time points before the current moment.
[0071] Among them, each influencing parameter is an influencing parameter required for predicting the data to be predicted, and each time point is a time point selected according to a preset time interval.
[0072] Multiple influencing parameters are required to predict the data to be predicted, and the time points for collecting the influencing parameters are set according to the preset time intervals. When data prediction is required, the influencing parameters corresponding to the first preset number of first time points before the current time are collected.
[0073] S102: Calculate the initial feature vectors corresponding to the first time points according to the influencing parameters.
[0074] After collecting the influencing parameters corresponding to the first preset number of first time points before the current moment, the initial feature vectors corresponding to the first time points are calculated according to the influencing parameters. For example, the initial feature vectors can be obtained by performing addition, subtraction and other operations on the influencing parameters.
[0075] S103: Using a kernel principal component analysis algorithm, extract features from an initial feature matrix formed by each initial feature vector to obtain a target feature matrix.
[0076] Among them, the dimension of each target feature vector in the target feature matrix is smaller than the dimension of each initial feature vector.
[0077] After calculating the initial eigenvectors, the kernel principal component analysis (kernel-PCA) algorithm is used to extract features from the initial feature matrix composed of each initial eigenvector to obtain the target feature matrix. By using the kernel principal component analysis algorithm to extract features from the initial feature matrix, the feature parameters of some types that are more important for data prediction are extracted from a variety of feature parameters, so that the dimension of each target feature vector in the extracted target feature matrix is smaller than the dimension of each initial feature vector, thus achieving matrix dimensionality reduction.
[0078] S104: Input the target feature matrix into the pre-trained data prediction model, and output the data prediction values corresponding to each of the second preset number of second time points after the current moment.
[0079] Pre-train the data prediction model, after feature extraction obtains the target feature matrix, input the target feature matrix into the pre-trained data prediction model, and output the data prediction values corresponding to each second time point of a second preset number after the current moment.
[0080] It can be seen from the above technical solution that by collecting the influencing parameters corresponding to the first preset number of first time points before the current moment, the initial feature vectors corresponding to the first time points are calculated according to the influencing parameters, and the preprocessing of the collected original influencing parameters is realized. The initial feature vectors with greater relevance to data prediction are calculated according to the influencing parameters, thereby obtaining an initial feature matrix containing multiple initial feature vectors. After the initial feature matrix is calculated, the kernel principal component analysis algorithm is used to extract features from the initial feature matrix composed of the initial feature vectors to obtain the target feature matrix. The target feature matrix is input into the pre-trained data prediction model, and the data prediction values corresponding to the second preset number of second time points after the current moment are output. By using the kernel principal component analysis algorithm for feature extraction, the feature parameters with high relevance to data prediction are screened, and the feature parameters with low relevance to data prediction are eliminated, thereby improving the efficiency of data prediction and the effectiveness of data prediction. By using the data prediction model to predict data according to the target feature matrix obtained by feature extraction, the influence of human subjective factors is avoided and the accuracy of the predicted data is improved.
[0081] It should be noted that, based on the above embodiments, the embodiments of the present application also provide corresponding improved solutions. In the subsequent embodiments, the same steps or corresponding steps as those in the above embodiments can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, which will not be repeated one by one in the following improved embodiments.
[0082] See also Figure 2 , Figure 2 This is a flowchart of another data prediction method in an embodiment of the present application. The method may include the following steps:
[0083] S201: Collect influencing parameters corresponding to a first preset number of first time points before the current moment.
[0084] Among them, each influencing parameter is an influencing parameter required for predicting the data to be predicted, and each time point is a time point selected according to a preset time interval.
[0085] S202: When it is determined that the first time points include a first time point with a missing influencing parameter, the first time point with the missing influencing parameter is determined as a target time point.
[0086] After collecting the influencing parameters, check whether there is a first time point containing the missing influencing parameters. When it is determined that the first time points contain the first time point containing the missing influencing parameters, the first time point containing the missing influencing parameters is determined as the target time point.
[0087] S203: Acquire a first influencing parameter corresponding to a missing influencing parameter in an influencing parameter set corresponding to a time point before the target time point.
[0088] After determining the target time point where the missing influencing parameter exists, the first influencing parameter corresponding to the missing influencing parameter in the influencing parameter set corresponding to the previous time point of the target time point is obtained. The first influencing parameter is a parameter of the same type as the missing influencing parameter, but the acquisition time is the previous time point of the target time point.
[0089] S204: Acquire a second influencing parameter corresponding to a missing influencing parameter in an influencing parameter set corresponding to a time point after the target time point.
[0090] After determining the target time point where the missing influencing parameter exists, the second influencing parameter corresponding to the missing influencing parameter in the influencing parameter set corresponding to the time point after the target time point is obtained. The first influencing parameter and the missing influencing parameter are parameters of the same type, but the acquisition time is the time point after the target time point.
[0091] S205: Calculate the mean of the first influencing parameter and the second influencing parameter to obtain a target mean.
[0092] After obtaining the first influencing parameter corresponding to the missing influencing parameter set corresponding to the time point before the target time point, and obtaining the second influencing parameter corresponding to the missing influencing parameter set corresponding to the time point after the target time point, the first influencing parameter and the second influencing parameter are averaged to obtain the target average.
[0093] S206: Fill the target mean value into the corresponding position of the missing influencing parameter.
[0094] After calculating the target mean of the first influencing parameter and the second influencing parameter, by calculating the mean of the first influencing parameter corresponding to the previous time point and the second influencing parameter corresponding to the next time point, both the influence of forward information and the influence of backward information are taken into account, thereby improving the accuracy of the calculated influencing parameters that fill in the corresponding positions of the missing influencing parameters.
[0095] S207: Calculate the initial feature vectors corresponding to the first time points according to the influencing parameters.
[0096] S208: Calculate the feature parameter average values and feature parameter standard deviations corresponding to various feature parameters in the initial feature matrix respectively.
[0097] The initial feature matrix contains multiple types of feature parameters, and the feature parameter average values and feature parameter standard deviations corresponding to various feature parameters in the initial feature matrix are calculated respectively.
[0098] S209: For each characteristic parameter, respectively calculate a first difference between each characteristic parameter and an average value of the characteristic parameter.
[0099] After calculating and obtaining the feature parameter average values and feature parameter standard deviations corresponding to various feature parameters in the initial feature matrix, for each feature parameter, a first difference between each feature parameter and the feature parameter average value is calculated.
[0100] S210: Calculate a quotient of the first difference and the characteristic parameter standard deviation to obtain a first quotient.
[0101] After respectively calculating the first difference between each characteristic parameter and the characteristic parameter average value for each characteristic parameter, the first difference is calculated with the characteristic parameter standard deviation to obtain a first quotient.
[0102] The first quotient can be calculated using the following formula: :
[0103] ;
[0104] in, is the average value of characteristic parameters, is the characteristic parameter standard deviation, is the original feature parameter in the initial feature matrix.
[0105] S211: Replace the characteristic parameter with the first quotient value.
[0106] After the first quotient value corresponding to each characteristic parameter is calculated, the characteristic parameter is replaced by the first quotient value.
[0107] S212: Obtain an adjusted feature matrix obtained by replacing each feature parameter in the initial feature matrix.
[0108] After replacing each characteristic parameter in the initial characteristic matrix with its corresponding first quotient value, an adjusted characteristic matrix obtained by replacing each characteristic parameter in the initial characteristic matrix is obtained. By preprocessing each original characteristic parameter in the initial characteristic matrix according to the characteristic parameter average value and characteristic parameter standard deviation corresponding to each type of characteristic parameter, the consistency of each data in the adjusted characteristic matrix is improved.
[0109] S213: Using a kernel principal component analysis algorithm to extract features from the adjusted feature matrix to obtain a target feature matrix.
[0110] Among them, the dimension of each target feature vector in the target feature matrix is smaller than the dimension of each initial feature vector.
[0111] After obtaining the adjusted feature matrix, the kernel principal component analysis algorithm is used to extract features from the adjusted feature matrix to obtain the target feature matrix.
[0112] By using the kernel principal component analysis algorithm to map the data into a high-dimensional feature space, it can better handle nonlinear data structures and relationships. Compared with traditional PCA, Kernel PCA has stronger expressive power and adaptability, and is suitable for processing nonlinear data sets.
[0113] S214: Input the target feature matrix into the first data prediction model obtained by training based on the bidirectional long short-term memory network, and output the first data prediction values corresponding to each second time point.
[0114] The target feature matrix includes prediction feature parameters of backward time points at preset time intervals corresponding to each first time point.
[0115] The first data prediction model for data prediction is obtained in advance based on the BiLSTM training. After the adjusted feature matrix is extracted using the kernel principal component analysis algorithm to obtain the target feature matrix, the target feature matrix is input into the first data prediction model obtained based on the BiLSTM training, and the first data prediction values corresponding to each second time point are output. By using the first data prediction model obtained based on the BiLSTM training to predict the data to be predicted, both the influence of the forward information on the prediction result and the influence of the backward information on the prediction result are considered, which greatly improves the accuracy of the predicted first data prediction value.
[0116] See also Figure 3 , Figure 3 This is a simplified structural diagram of a hidden layer unit of a bidirectional long short-term memory network in an embodiment of the present application. The internal structure of the hidden layer neural unit of LSTM is obviously more complex, with more forget gates, input gates and output gates than RNN.
[0117] See also Figure 4 , Figure 4 This is a schematic diagram of the forget gate of a hidden layer unit of a bidirectional long short-term memory network in an embodiment of the present application. The dotted circle is the forget gate: it determines what information needs to be forgotten from the cell state. Input the output of the previous hidden layer and the input of this hidden layer , outputs a number between 0 and 1 through the sigmoid layer, which is consistent with the cell state of the previous layer Multiply them together to decide to forget the previous layer some information.
[0118] See also Figure 5 , Figure 5 This is a schematic diagram of the input gate of a hidden layer unit of a bidirectional long short-term memory network in an embodiment of the present application. The dotted circle is the input gate: it determines the cell state of this layer at the output. What kind of information is stored in it? First, use the input gate sigmoid layer to decide which data needs to be updated. Represents the weight, update degree, and second, uses the tanh layer to create a vector with Multiplying by the required update to The new cell state is added to the old cell state that has been selectively forgotten in the previous step to form a new cell state .
[0119] See also Figure 6 , Figure 6 This is a schematic diagram of the output gate of a hidden layer unit of a bidirectional long short-term memory network in an embodiment of the present application. The dotted circle is the output gate: based on the new cell state , determines the output of this hidden layer First, the new cell state Put in tanh to compress the value to between (-1, 1), and use an output gate to determine the new cell state Which part of needs to be output to the next hidden layer.
[0120] Therefore, LSTM can solve the gradient problem of RNN very well. The original RNN calculation state is in the form of a composite function. If its derivatives are greater than 1 or less than 1, the gradient will explode or disappear. However, the state of LSTM is calculated by accumulation, so its derivatives are not in the form of products, and will not disappear or explode. It can better handle long time series or feature vectors with higher dimensions.
[0121] The difference between Bidirectional LSTM (BiLSTM) and LSTM is similar to the difference between BiRNN and RNN. It can better analyze the contextual connection between semantics, including the ability to deduce the following context from the previous context, and vice versa. Simply put, a single-layer BiLSTM is composed of two LSTMs, one to process the input sequence forward and the other to process the input sequence backward. After processing, the output vectors of the two LSTMs are combined to obtain the final BiLSTM output result.
[0122] S215: Input the target feature matrix into the second data prediction model trained based on the support vector regression algorithm, and output the second data prediction values corresponding to each second time point.
[0123] A second data prediction model for data prediction is obtained by pre-training based on a support vector regression (SVR) algorithm. The target feature matrix is input into the second data prediction model obtained by training based on the support vector regression algorithm, and the second data prediction values corresponding to each second time point are output.
[0124] S216: Calculate the mean of the first data prediction value and the second data prediction value corresponding to each second time point to obtain the data prediction value corresponding to each second time point.
[0125] After the first data prediction value is predicted by the first data prediction model trained based on the bidirectional long short-term memory network, and the second data prediction value is predicted by the second data prediction model trained based on the support vector regression algorithm, the first data prediction value and the second data prediction value corresponding to each second time point are averaged to obtain the data prediction value corresponding to each second time point. The final data prediction value is obtained by average calculation of the data prediction values predicted by the two models, thereby improving the accuracy of the final data prediction value.
[0126] In a specific implementation of the present application, after step S214, the method may further include the following steps:
[0127] Step 1: Obtain the true value of the first data corresponding to each second time point;
[0128] Step 2: Evaluate the first data prediction model based on each first data prediction value and each first data true value.
[0129] For the convenience of description, the above two steps can be combined for explanation.
[0130] After the first data prediction value is predicted by the first data prediction model trained based on the bidirectional long short-term memory network, the first data true value corresponding to each second time point is obtained, and the first data prediction model is evaluated according to each first data prediction value and each first data true value, thereby achieving effective evaluation of the first data prediction model trained based on the bidirectional long short-term memory network.
[0131] In a specific implementation of the present application, evaluating the first data prediction model according to each first data prediction value and each first data true value may include the following steps:
[0132] Step 1: for each second time point, calculating a second difference between the predicted value of the first data and the true value of the first data;
[0133] Step 2: Calculate the quotient of the second difference and the true value of the first data to obtain an initial accuracy rate;
[0134] Step 3: Calculate the target accuracy corresponding to each second time point according to each initial accuracy;
[0135] Step 4: Evaluate the first data prediction model according to each target accuracy.
[0136] For the convenience of description, the above four steps can be combined for explanation.
[0137] After each first data prediction value is predicted by using the first data prediction model trained based on the bidirectional long short-term memory network and each first data true value is obtained, for each second time point, the second difference between the first data prediction value and the first data true value is calculated, and the quotient of the second difference and the first data true value is calculated to obtain the initial accuracy rate, and the target accuracy rate corresponding to each second time point is calculated according to each initial accuracy rate, and the first data prediction model is evaluated according to each target accuracy rate. The target accuracy rate is used to achieve accurate and effective evaluation of the first data prediction model.
[0138] In a specific implementation of the present application, calculating the target accuracy corresponding to each second time point according to each initial accuracy rate may include the following steps:
[0139] Step 1: When the predicted value of the first data and the true value of the first data are both 0, the target accuracy is determined to be 100%;
[0140] Step 2: When the predicted value of the first data is not 0 and the true value of the first data is 0, determining the target accuracy is 0;
[0141] Step 3: When the true value of the first data is not 0 and the initial accuracy is greater than 0, a third difference between the true value of the first data and the predicted value of the first data is calculated;
[0142] Step 4: Calculate a second quotient between the third difference and the true value of the first data, and calculate an absolute value of the second quotient;
[0143] Step 5: The difference between 1 and the absolute value is determined as the target accuracy;
[0144] Step 6: When the initial accuracy is less than 0, determine the target accuracy to be 0;
[0145] When the predicted value of the first data is lower than the first preset value, the predicted value of the first data is reset to 0; when the true value of the first data is lower than the second preset value, the true value of the first data is reset to 0.
[0146] For the convenience of description, the above six steps can be combined for explanation.
[0147] It is preset that when the first data prediction value is lower than the first preset value, the first data prediction value is returned to 0, and when the first data true value is lower than the second preset value, the first data true value is returned to 0. After the quotient of the second difference and the first data true value is calculated to obtain the initial accuracy, when the first data prediction value and the first data true value are both 0, the target accuracy is determined to be 100%, when the first data prediction value is not 0 and the first data true value is 0, the target accuracy is determined to be 0, when the first data true value is not 0 and the initial accuracy is greater than 0, the third difference between the first data true value and the first data prediction value is calculated, the second quotient between the third difference and the first data true value is calculated, and the absolute value of the second quotient is calculated, and the difference between 1 and the absolute value is determined as the target accuracy, and when the initial accuracy is less than 0, the target accuracy is determined to be 0. By considering the situation that the first data prediction value and the first data true value are 0, the target accuracy is determined according to the situation, which greatly improves the accuracy of the determined target accuracy, thereby improving the accuracy of the evaluation of the first data prediction model obtained by training based on the bidirectional long short-term memory network.
[0148] It should be noted that the first preset value and the second preset value can be set and adjusted according to actual conditions, and the embodiment of the present application does not limit this. There is no difference in size or order between the first and second preset values, and the first preset value and the second preset value can be the same or different.
[0149] To facilitate understanding of the technical solution provided by the embodiment of the present invention, the technical solution provided by the embodiment of the present invention is described in detail below by taking a specific scenario applied to measurement as an example.
[0150] It should be noted that the current electricity price forecast is to directly send the collected data to the electricity price forecast model for electricity price forecasting. Directly inputting all data into the model may contain a large amount of redundant information or noise data, resulting in reduced effectiveness of model training. It is also easy to cause overfitting during the training process, and the generalization ability of the model is low. As the amount of data continues to increase, the computing resources required to train deep learning models also increase. The model needs to consume a lot of computing resources to process redundant data. This increases the training time of the model and the operating cost, which is not conducive to an environment with limited resources.
[0151] The data prediction method provided in the embodiment of the present invention can be used to solve the above problems. The specific implementation process is as follows:
[0152] Step 1: Collect influencing parameters (e.g., historical electricity prices, load data, weather conditions, economic indicators, etc.) corresponding to a first preset number of first time points before the current time.
[0153] Among them, each influencing parameter is an influencing parameter required for predicting the electricity price to be predicted, and each time point is a time point selected according to a preset time interval;
[0154] Step 2: Calculate the initial eigenvectors corresponding to each first time point according to each influencing parameter;
[0155] Step 3: Use the kernel principal component analysis algorithm to extract features from the initial feature matrix composed of each initial feature vector to obtain the target feature matrix;
[0156] Among them, the dimension of each target feature vector in the target feature matrix is smaller than the dimension of each initial feature vector;
[0157] Step 4: Input the target feature matrix into the pre-trained electricity price prediction model, and output the electricity price prediction values corresponding to each of the second preset number of second time points after the current moment.
[0158] See also Figure 7 , Figure 7 This is a flowchart of another data prediction method in the embodiment of the present application.
[0159] The data collection module is used to collect data, including basic data collection: collecting basic information from the data warehouse, such as basic information of market entities, date, time series, etc.; it also includes officially disclosed data collection: obtaining historical data from the port disclosed by the power trading center (including spot price data, the day-ahead provincial load forecast, the day-ahead new energy output forecast, the day-ahead inter-provincial interconnection line forecast, real-time market data at 96 time points, market unit output and thermal power start-up capacity data, etc.); it also includes third-party data collection: obtaining third-party manufacturer data from designated interfaces, such as future short-term weather forecast data, load forecast data for other provinces, etc.
[0160] The data preprocessing module is used for data preprocessing, including missing value processing: the missing values are processed using the average value method.
[0161] The feature engineering module is used to perform feature engineering on the pre-processed data, including adding important features of the bidding space, bidding space = provincial load + interconnection line - hydropower output plan - new energy forecast output; adding statistical value features, such as mean, median, maximum and minimum values, variance, etc.; adding lag features that can highlight history, such as the average spot electricity price in the past 3 days, 7 days, and 15 days; adding time-related features, including time-based features (such as the day of the year, month, and ten days, the quarter), Boolean features (such as whether it is a holiday), time difference features (such as the number of days to the nearest holiday); adding important thermal power quotation preferences, thermal power quotation preferences are divided into three types: low quotation, normal quotation, and high quotation. Select the features within seven days from D-6 to D, and finally output an initial feature matrix of 672*35, where 35 is the number of feature vectors, and 672 is 96 points per day in the past 7 days, a total of 672 points, and the initial feature matrix is normalized.
[0162] Then the kernel-PCA model is used, and the KernelPCA in the sklearn.decomposition module is used. The kernel function PCA parameters are selected as follows: sklearn.decomposition.KernelPCA (n_components=8, kernel='sigmoid', gamma='auto', coef0=1, kernel_params=None, alpha=1.0, fit_inverse_transform=False, eigen_solver='auto', tol=0, max_iter=None, remove_zero_eig=False). The 672*35 feature matrix is reduced in dimension for feature extraction, from the original 672*35 to the 672*8 feature matrix. Each 1*8 feature vector of the matrix is used as the input of the model for training. By reducing the dimension and reshaping the features, the power market data can be processed more efficiently, the burden of training can be greatly reduced, the limitations of traditional forecasting methods can be overcome, and more reliable support can be provided for short-term electricity price forecasting. It not only helps to improve the accuracy of the model, but also provides market participants with a more scientific basis for decision-making.
[0163] The model training module is used for model training. The trained model is the BiLSTM-SVR model. The 672*8 feature matrix is sequentially input into the BiLSTM and SVR models by rows, and the predicted electricity prices at 288 time points for the next D+1 to D+3 days are output respectively. For the final predicted price of the same point, the arithmetic mean of the predicted prices of the two models is used as the final predicted electricity price. The model parameters are selected as BiLSTM(input_size=8, hidden_layer_size=30, output_size=1, loss_function = nn.BCELoss(), optimizer = Adam, lr=0.001, bidirectional=True), SVR(*, kernel='sigmoid', gamma='scale', coef0=0.0, tol=0.001, C=0.8, epsilon=0.1, shrinking=True, cache_size=200, verbose=False, max_iter=-1).
[0164] The model evaluation module is used for model evaluation, and the best-performing model is selected for application. The performance of the three trained BiLSTM models is evaluated. In terms of evaluation metrics, due to the situation where the electricity price is 0, the following accuracy rate is used for evaluation.
[0165] ;
[0166] Daily rolling trading strategy: After the model outputs the predicted electricity prices at 288 future time points, for each time point, the following strategies are generated for the interval to which the predicted electricity price P_pred belongs: (1) When P_pred > P_sell1, a listed buy transaction is taken, and P_listed = P_sell1; (2) When P_sell1 > P_pred > P_buy1, sell at the price of P_listed = (P_pred + P_sell1) / 2 or buy at the price of P_listed = (P_pred + P_buy1) / 2; (3) When P_pred < P_buy1, a listed sell transaction is taken, and P_listed = P_buy1.
[0167] The electricity price forecasting method provided in the embodiment of the present application is applied to improve the efficiency of daily rolling transactions and maximize profits. The method uses the feature vector obtained after PCA dimensionality reduction to train the LSTM-SVR model, and finally outputs a short-term electricity price forecast for multiple days. Daily rolling transactions are performed based on the predicted electricity price and the listed price. The fluctuation of electricity prices is affected by many factors, including historical data, decision-making behaviors of market participants, and changes in the external environment (such as weather, policies, etc.). The present application adopts the BiLSTM-SVR model to simultaneously process forward and backward information, thereby more comprehensively analyzing electricity price data and significantly improving the prediction accuracy. Compared with the traditional single model, it can effectively avoid the overfitting problem.
[0168] Corresponding to the above method embodiment, the present application also provides a data prediction device. The data prediction device described below and the data prediction method described above can refer to each other.
[0169] See also Figure 8 , Figure 8 This is a structural block diagram of a data prediction device in an embodiment of the present application, and the device may include:
[0170] The influencing parameter collection unit 81 is used to collect influencing parameters corresponding to each first time point of a first preset number before the current time; wherein each influencing parameter is an influencing parameter required for predicting the data to be predicted, and each time point is a time point selected at a preset time interval;
[0171] An initial feature vector calculation unit 82, used to calculate the initial feature vectors corresponding to each first time point according to each influencing parameter;
[0172] The target feature matrix obtaining unit 83 is used to extract features from the initial feature matrix composed of each initial feature vector using a kernel principal component analysis algorithm to obtain a target feature matrix; wherein the dimension of each target feature vector in the target feature matrix is smaller than the dimension of each initial feature vector;
[0173] The data prediction value output unit 84 is used to input the target feature matrix into the pre-trained data prediction model, and output the data prediction values corresponding to each of the second preset number of second time points after the current moment.
[0174] It can be seen from the above technical solution that by collecting the influencing parameters corresponding to the first preset number of first time points before the current moment, the initial feature vectors corresponding to the first time points are calculated according to the influencing parameters, and the preprocessing of the collected original influencing parameters is realized. The initial feature vectors with greater relevance to data prediction are calculated according to the influencing parameters, thereby obtaining an initial feature matrix containing multiple initial feature vectors. After the initial feature matrix is calculated, the kernel principal component analysis algorithm is used to extract features from the initial feature matrix composed of the initial feature vectors to obtain the target feature matrix. The target feature matrix is input into the pre-trained data prediction model, and the data prediction values corresponding to the second preset number of second time points after the current moment are output. By using the kernel principal component analysis algorithm for feature extraction, the feature parameters with high relevance to data prediction are screened, and the feature parameters with low relevance to data prediction are eliminated, thereby improving the efficiency of data prediction and the effectiveness of data prediction. By using the data prediction model to predict data according to the target feature matrix obtained by feature extraction, the influence of human subjective factors is avoided and the accuracy of the predicted data is improved.
[0175] In a specific embodiment of the present application, the device may further include:
[0176] A target time point determination unit is used to, after collecting the influencing parameters respectively corresponding to the first preset number of first time points before the current time, and before calculating the initial feature vectors respectively corresponding to the first time points according to the influencing parameters, determine the first time point with the missing influencing parameters as the target time point when it is determined that the first time points include the first time point with the missing influencing parameters;
[0177] A first influencing parameter acquisition unit, used to acquire a first influencing parameter corresponding to a missing influencing parameter in an influencing parameter set corresponding to a time point before a target time point;
[0178] A second influencing parameter acquisition unit, used to acquire a second influencing parameter corresponding to a missing influencing parameter in an influencing parameter set corresponding to a time point after the target time point;
[0179] A target mean value obtaining unit, used for calculating the mean of the first influencing parameter and the second influencing parameter to obtain a target mean value;
[0180] The missing influencing parameter filling unit is used to fill the target mean to the corresponding position of the missing influencing parameter.
[0181] In a specific implementation of the present application, the target feature matrix obtaining unit 83 includes:
[0182] The mean value and standard deviation calculation subunit is used to calculate the feature parameter mean values and feature parameter standard deviations corresponding to various feature parameters in the initial feature matrix respectively;
[0183] A first difference calculation subunit, used for calculating, for each characteristic parameter, a first difference between each characteristic parameter and an average value of the characteristic parameter;
[0184] A first quotient value obtaining subunit is used to calculate the quotient of the first difference value and the characteristic parameter standard deviation to obtain a first quotient value;
[0185] a characteristic parameter replacement subunit, configured to replace the characteristic parameter with the first quotient value;
[0186] The adjusted feature matrix obtaining subunit is used to obtain the adjusted feature matrix obtained by replacing each feature parameter in the initial feature matrix;
[0187] The feature extraction subunit is used to extract features from the adjusted feature matrix using a kernel principal component analysis algorithm.
[0188] In a specific implementation of the present application, the data prediction value output unit 84 includes:
[0189] A first data prediction value output subunit is used to input the target feature matrix into the first data prediction model obtained by training based on the bidirectional long short-term memory network, and output the first data prediction values corresponding to each second time point; wherein the target feature matrix includes the prediction feature parameters of the backward time points of the preset time interval corresponding to each first time point;
[0190] A second data prediction value output subunit is used to input the target feature matrix into a second data prediction model trained based on a support vector regression algorithm, and output second data prediction values corresponding to each second time point;
[0191] The data prediction value obtaining subunit is used to calculate the mean of the first data prediction value and the second data prediction value corresponding to each second time point to obtain the data prediction value corresponding to each second time point.
[0192] In a specific embodiment of the present application, the device may further include:
[0193] A first data true value acquisition unit, configured to acquire the first data true value corresponding to each second time point after outputting the first data predicted value corresponding to each second time point;
[0194] The model evaluation unit is used to evaluate the first data prediction model according to each first data prediction value and each first data true value.
[0195] In a specific embodiment of the present application, the model evaluation unit includes:
[0196] A second difference calculation subunit, used for calculating, for each second time point, a second difference between the predicted value of the first data and the true value of the first data;
[0197] An initial accuracy rate obtaining subunit is used to calculate the quotient of the second difference value and the true value of the first data to obtain an initial accuracy rate;
[0198] A target accuracy calculation subunit, used to calculate the target accuracy corresponding to each second time point according to each initial accuracy;
[0199] The model evaluation subunit is used to evaluate the first data prediction model according to each target accuracy rate.
[0200] In a specific implementation of the present application, the target accuracy calculation subunit includes:
[0201] A first target accuracy determination unit, configured to determine that the target accuracy is 100% when the first data prediction value and the first data true value are both 0;
[0202] A second target accuracy determination unit, configured to determine that the target accuracy is 0 when the predicted value of the first data is not 0 and the true value of the first data is 0;
[0203] A third difference calculation unit, configured to calculate a third difference between the first data true value and the first data predicted value when the first data true value is not 0 and the initial accuracy is greater than 0;
[0204] an absolute value calculation unit, used to calculate a second quotient between the third difference value and the true value of the first data, and to calculate an absolute value of the second quotient;
[0205] a target accuracy determination unit, configured to determine the difference between 1 and the absolute value as the target accuracy;
[0206] A third target accuracy determination unit, configured to determine the target accuracy to be 0 when the initial accuracy is less than 0;
[0207] When the predicted value of the first data is lower than the first preset value, the predicted value of the first data is reset to 0; when the true value of the first data is lower than the second preset value, the true value of the first data is reset to 0.
[0208] Corresponding to the above method embodiment, see Fig. 9 , Fig. 9 A schematic diagram of a data prediction device provided in this application, which may include:
[0209] A memory 332, for storing computer programs;
[0210] The processor 322 is used to implement the steps of the data prediction method of the above method embodiment when executing the computer program.
[0211] For details, please refer to Fig.10 , Fig.10 A specific structural diagram of a data prediction device provided for this embodiment, which may have relatively large differences due to different configurations or performances, may include a processor (central processing units, CPU) 322 (for example, one or more processors) and a memory 332, wherein the memory 332 stores one or more computer programs 342 or data 344. Among them, the memory 332 may be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the data processing device. Furthermore, the processor 322 may be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the data prediction device 301.
[0212] The data prediction device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .
[0213] The steps in the data prediction method described above can be implemented by the structure of a data prediction device.
[0214] Corresponding to the above method embodiment, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps can be implemented:
[0215] Collect influencing parameters corresponding to each first time point of a first preset number before the current moment; wherein each influencing parameter is an influencing parameter required for predicting the data to be predicted, and each time point is a time point selected at a preset time interval; calculate the initial feature vectors corresponding to each first time point according to each influencing parameter; use the kernel principal component analysis algorithm to extract features from the initial feature matrix composed of each initial feature vector to obtain a target feature matrix; wherein the dimension of each target feature vector in the target feature matrix is smaller than the dimension of each initial feature vector; input the target feature matrix into the pre-trained data prediction model, and output the data prediction values corresponding to each second time point of a second preset number after the current moment.
[0216] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0217] For an introduction to the computer-readable storage medium provided in this application, please refer to the above method embodiment, and this application will not go into details here.
[0218] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the devices, equipment and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0219] Specific examples are used herein to illustrate the principles and implementation methods of the present application, and the description of the above embodiments is only used to help understand the technical solution and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.
Claims
1. A data prediction method, characterized in that: include: Collecting influencing parameters corresponding to first preset number of first time points before the current moment; wherein each influencing parameter is an influencing parameter required for predicting the data to be predicted, and each time point is a time point selected at a preset time interval; Calculate the initial eigenvectors corresponding to the first time points according to the influencing parameters; Using a kernel principal component analysis algorithm to extract features from an initial feature matrix composed of each initial feature vector, to obtain a target feature matrix; wherein the dimension of each target feature vector in the target feature matrix is smaller than the dimension of each initial feature vector; The target feature matrix is input into the pre-trained data prediction model, and the data prediction values corresponding to each of the second preset number of second time points after the current moment are output.
2. The data prediction method according to claim 1, characterized in that: After collecting the influencing parameters corresponding to the first preset number of first time points before the current moment, and before calculating the initial feature vectors corresponding to the first time points according to the influencing parameters, the method further includes: When it is determined that each of the first time points includes a first time point where a missing influencing parameter exists, the first time point where the missing influencing parameter exists is determined as a target time point; Acquire a first influencing parameter corresponding to the missing influencing parameter in the influencing parameter set corresponding to a time point before the target time point; Acquire a second influencing parameter corresponding to the missing influencing parameter in the influencing parameter set corresponding to a time point after the target time point; Calculating the mean of the first influencing parameter and the second influencing parameter to obtain a target mean; Fill the target mean value into the corresponding position of the missing influencing parameter.
3. The data prediction method according to claim 1, characterized in that: The kernel principal component analysis algorithm is used to extract features from the initial feature matrix composed of each initial feature vector, including: Respectively calculating the feature parameter average values and feature parameter standard deviations corresponding to various feature parameters in the initial feature matrix; For each characteristic parameter, respectively calculate a first difference between each characteristic parameter and an average value of the characteristic parameter; Calculate the quotient of the first difference and the characteristic parameter standard deviation to obtain a first quotient; replacing the characteristic parameter with the first quotient value; Obtaining an adjusted feature matrix obtained by replacing each feature parameter in the initial feature matrix; The kernel principal component analysis algorithm is used to extract features from the adjusted feature matrix.
4. The data prediction method according to any one of claims 1 to 3, characterized in that: Inputting the target feature matrix into the pre-trained data prediction model, and outputting the data prediction values corresponding to the second preset number of second time points after the current moment, including: The target feature matrix is input into a first data prediction model obtained by training based on a bidirectional long short-term memory network, and the first data prediction values corresponding to each second time point are output; wherein the target feature matrix includes prediction feature parameters of backward time points at preset time intervals corresponding to each first time point; Inputting the target feature matrix into a second data prediction model trained based on a support vector regression algorithm, and outputting second data prediction values corresponding to each second time point; The first data prediction value and the second data prediction value corresponding to each second time point are averaged to obtain the data prediction value corresponding to each second time point.
5. The data prediction method according to claim 4, characterized in that: After outputting the first data prediction values corresponding to each second time point, the method further includes: Obtaining the true value of the first data corresponding to each second time point; The first data prediction model is evaluated according to each first data prediction value and each first data true value.
6. The data prediction method according to claim 5, characterized in that: The first data prediction model is evaluated according to each first data prediction value and each first data true value, including: For each second time point, calculating a second difference between the first data prediction value and the first data true value; Calculating a quotient of the second difference and the first data true value to obtain an initial accuracy rate; Calculate the target accuracy rate corresponding to each second time point according to each initial accuracy rate; The first data prediction model is evaluated according to each target accuracy.
7. The data prediction method according to claim 6, characterized in that: The target accuracy corresponding to each second time point is calculated according to each initial accuracy, including: When the first data predicted value and the first data true value are both 0, the target accuracy is determined to be 100%; When the first data prediction value is not 0 and the first data true value is 0, determining the target accuracy rate to be 0; When the first data true value is not 0 and the initial accuracy is greater than 0, calculating a third difference between the first data true value and the first data predicted value; Calculating a second quotient between the third difference and the true value of the first data, and calculating an absolute value of the second quotient; Determine the difference between 1 and the absolute value as the target accuracy; When the initial accuracy rate is less than 0, determining the target accuracy rate to be 0; When the first data prediction value is lower than a first preset value, the first data prediction value is reset to 0; and when the first data true value is lower than a second preset value, the first data true value is reset to 0.
8. A data prediction device, characterized in that: include: An influencing parameter collection unit, used to collect influencing parameters corresponding to a first preset number of first time points before the current moment; wherein each influencing parameter is an influencing parameter required for predicting the data to be predicted, and each time point is a time point selected at a preset time interval; An initial feature vector calculation unit, used to calculate the initial feature vectors corresponding to each first time point according to each influencing parameter; A target feature matrix obtaining unit is used to extract features from an initial feature matrix composed of each initial feature vector using a kernel principal component analysis algorithm to obtain a target feature matrix; wherein the dimension of each target feature vector in the target feature matrix is smaller than the dimension of each initial feature vector; The data prediction value output unit is used to input the target feature matrix into the pre-trained data prediction model, and output the data prediction values corresponding to each of the second preset number of second time points after the current moment.
9. A data prediction device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the data prediction method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data prediction method according to any one of claims 1 to 7 are implemented.