Data prediction method and system

Through the combination of SVM and genetic algorithm, the initial prediction model is optimized, which solves the problem of high model update cost in oil drilling construction and improves the practicality and accuracy of the prediction model.

CN118569417APending Publication Date: 2024-08-30CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310194210.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-08-30

Smart Images

  • Figure CN118569417A
    Figure CN118569417A
Patent Text Reader

Abstract

The invention relates to the technical field of data prediction, and provides a data prediction method and device, electronic equipment and a computer readable storage medium. The method comprises the steps that construction data are acquired and preprocessed; the pre-processed construction data are imported into a trained target prediction model, a target prediction result is generated, the target prediction model is formed by combining an SVM (Support Vector Machine) algorithm and a genetic algorithm, and the target prediction model constructs an initial prediction model through obtained historical data and then constructs the initial prediction model through the genetic algorithm. And optimizing the initial prediction model according to the obtained multiple pieces of newly-added construction data. According to the embodiment of the invention, the prediction model can be further improved by using the new construction data transmitted in real time on the premise of performing prediction aiming at the influence of various factors, and the accuracy of the model is ensured on the premise of greatly improving the model updating efficiency, so that the practicability of the method is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of data prediction, and in particular to a data prediction method and system. Background Art

[0002] In oil drilling construction, especially in the prediction process of mechanical drilling speed, traditional methods mostly rely on controlled variable methods for experiments or rely on experience and drilling theory formula derivation, which is not only time-consuming and labor-intensive, but also cannot meet the needs of current drilling projects when considering multiple influencing factors.

[0003] During oil drilling construction, new data is continuously generated. Due to the huge amount of data and the difference from the batch learning mode of commonly used big data algorithms that use complete data to establish prediction models, in the existing technology, when performing machine learning, it is first necessary to obtain historical data for model training. When the prediction model needs to be updated, the new data needs to be combined with the historical data for overall re-training, which makes the model update cost high and reduces the practicality of the prediction model. Summary of the invention

[0004] In view of this, the embodiments of the present disclosure provide a data prediction method and system to solve the problem in the prior art that when the prediction model needs to be updated, the new data needs to be combined with historical data for overall retraining, which makes the model update cost high and reduces the practicality of the prediction model.

[0005] A first aspect of the embodiments of the present disclosure provides a data prediction method, including:

[0006] Acquire construction data and pre-process it;

[0007] The preprocessed construction data is imported into the trained target prediction model to generate a target prediction result, wherein the target prediction model is composed of a combination of an SVM (Support Vector Machine) algorithm and a genetic algorithm. After the target prediction model is constructed with the acquired historical data, the initial prediction model is optimized according to the acquired multiple new construction data.

[0008] In some embodiments, constructing an initial prediction model based on the acquired historical data includes:

[0009] Acquiring the historical data and preprocessing it;

[0010] Importing the preprocessed historical data into a preset support vector machine prediction model for training to obtain a first prediction model;

[0011] Optimizing the penalty factor and hyperparameters in the first prediction model by genetic algorithm;

[0012] The first prediction model is updated according to the optimized penalty factor and hyperparameters to obtain the initial prediction model.

[0013] In some embodiments, the optimizing the penalty factor and hyperparameters in the first prediction model by using a genetic algorithm includes:

[0014] Using the penalty factor and the hyperparameter of the first prediction model as two chromosomes of the experimental individual, generating at least one population, wherein the length of each chromosome is the first number, and each population includes the second number of experimental individuals;

[0015] According to a preset selection probability, mutation probability and crossover probability, the experimental individuals in the at least one population are reproduced to obtain at least one population after reproduction;

[0016] Calculating the fitness value of each experimental individual in at least one population after reproduction for the first prediction model, and selecting the best individual at that time;

[0017] Repeat the step of reproducing the experimental individuals in the at least one population according to the preset selection probability, mutation probability and crossover probability until the fitness value of the optimal individual meets the preset requirements or the number of reproductions reaches the standard.

[0018] In some embodiments, the calculating the fitness value of each experimental individual in at least one population after reproduction for the first prediction model and selecting the best individual at that time includes:

[0019] Obtain any experimental individual whose fitness value has not been calculated from at least one population after reproduction to obtain a first individual;

[0020] Updating the penalty factor and hyperparameters of the first individual to the first prediction model, importing the historical data into the updated first prediction model for prediction, and obtaining a prediction result;

[0021] Calculating according to the predicted result and the corresponding true result to obtain the fitness value of the first individual;

[0022] Repeat the step of obtaining any experimental individual whose fitness value has not been calculated in the at least one population after reproduction until the fitness value of any experimental individual in the at least one population after reproduction is calculated, thereby obtaining the fitness values ​​of multiple experimental individuals;

[0023] The experimental individual with the highest fitness value is determined as the optimal individual of the time.

[0024] In some embodiments, the fitness value is the average relative error between the predicted result and the corresponding true result, and the calculation formula for calculating the average relative error is:

[0025]

[0026] Wherein, MRE represents the fitness value, p i To represent the prediction result, o i To represent the actual result, n represents the total number of the historical data, and i represents the serial number of the historical data.

[0027] In some embodiments, the step of optimizing the initial prediction model according to the acquired multiple newly added construction data to obtain the target prediction model includes:

[0028] Acquire the multiple newly added construction data;

[0029] Filtering out any new construction data to be optimized for which the weight vector has not been optimized from the multiple new construction data;

[0030] Importing the newly added data to be optimized into the initial prediction model to obtain prediction data;

[0031] Optimizing the weight vector of the initial prediction model according to the predicted data and the real data corresponding thereto;

[0032] Repeat the step of selecting any unoptimized new construction data to be optimized from the multiple new construction data until each of the multiple new construction data has been optimized to obtain the target prediction model.

[0033] In some embodiments, optimizing the weight vector of the initial prediction model according to the predicted data and the real data corresponding thereto includes:

[0034] If the difference between the predicted data and the corresponding actual result data meets the preset requirement, the weight vector corresponding to the newly added construction data to be optimized is increased by a preset first value;

[0035] If the difference between the predicted data and the corresponding actual result data does not meet the preset requirement, the weight vector corresponding to the newly added construction data to be optimized is reduced by a preset second value.

[0036] In some embodiments, each of the plurality of newly added construction data includes a time tag;

[0037] When any new construction data to be optimized whose weight vector has not been optimized is selected from the plurality of new construction data, the selection is performed according to the time sequence of the time tags in each new construction data.

[0038] A second aspect of the embodiments of the present disclosure provides a data prediction system, including:

[0039] Data acquisition module, used to acquire construction data and perform preprocessing;

[0040] The prediction module is used to import the preprocessed construction data into the trained target prediction model to generate a target prediction result, wherein the target prediction model is composed of a combination of an SVM algorithm and a genetic algorithm. After the target prediction model is constructed by the acquired historical data, the initial prediction model is optimized according to the acquired multiple new construction data.

[0041] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0042] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0043] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided. The computer program product includes a computer program or instructions. When the computer program or instructions are executed by a processor, the steps of the above method are implemented.

[0044] Beneficial Effects

[0045] Compared with the prior art, the beneficial effects of the embodiments of the present disclosure include at least: obtaining construction data and preprocessing it; importing the preprocessed construction data into a trained target prediction model to generate a target prediction result, wherein the target prediction model is composed of a combination of an SVM algorithm and a genetic algorithm, and the target prediction model is constructed by constructing an initial prediction model based on the acquired historical data, and then optimizing the initial prediction model based on the acquired multiple new construction data, so that the present disclosure, under the premise of predicting the influence of multiple factors, further improves the prediction model using the new construction data transmitted in real time, and ensures the accuracy of the model while greatly increasing the efficiency of updating the model, thereby increasing the practicality of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 is a schematic diagram of an application scenario of the data prediction method provided according to an embodiment of the present disclosure;

[0048] Figure 2 is a flowchart of some embodiments of a target prediction model training process of a data prediction method provided according to an embodiment of the present disclosure;

[0049] Figure 3 is a flowchart of other embodiments of another data prediction method provided according to an embodiment of the present disclosure;

[0050] Figure 4 It is a simplified structural diagram of a data prediction system provided according to an embodiment of the present disclosure;

[0051] Figure 5 is a schematic diagram of an electronic device provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0052] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0053] It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0054] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different systems, devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these systems, devices, modules or units.

[0055] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0056] The names of the messages or information exchanged between multiple systems in the embodiments of the present disclosure are only used for illustrative purposes, and are not used to limit the scope of these messages or information.

[0057] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0058] Figure 1 It is a schematic diagram of an application scenario of the data prediction method according to some embodiments of the present disclosure.

[0059] exist Figure 1 In the application scenario, first, the computing device 101 can obtain the construction data 102 and perform preprocessing;

[0060] Secondly, the computing device 101 can import the preprocessed construction data 103 into the trained target prediction model 104 to generate a target prediction result 105, wherein the target prediction model is composed of a combination of an SVM algorithm and a genetic algorithm, and the target prediction model is constructed by constructing an initial prediction model based on the acquired historical data, and then optimizing the initial prediction model based on the acquired multiple new construction data.

[0061] It should be noted that the computing device 101 can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is embodied as software, it can be installed in the hardware devices listed above. It can be implemented as multiple software or software modules for providing distributed services, or as a single software or software module. No specific limitation is made here.

[0062] It should be understood that Figure 1 The number of computing devices in the embodiment is only illustrative. Any number of computing devices may be provided according to implementation requirements.

[0063] Continue to refer Figure 2 , shows a process 200 of some embodiments of the data prediction method according to the present disclosure. The method can be Figure 1 The data prediction method comprises the following steps:

[0064] Step 201, obtain construction data and perform preprocessing.

[0065] In some embodiments, the execution subject of the data prediction method (such as Figure 1 The computing device 101) shown can be connected to the target device via a wired connection or a wireless connection, and then obtain the construction data and perform pre-processing.

[0066] Construction data can refer to the data generated during the oil well drilling process for subsequent predictions (such as drilling rate prediction). Since a large amount of different data is obtained during the construction process, today's prediction methods mostly use machine learning, that is, there is no need to consider the specific relationship between the data to make predictions, which can greatly reduce the computational complexity and make effective predictions.

[0067] Since there are many data in the directly acquired construction data that do not meet the model requirements, such as null values, singular points, and other data that seriously affect the model prediction effect, it is necessary to preprocess the construction data.

[0068] In some optional implementations, the preprocessing method may include denoising, missing value supplementation, normalization, and other existing or future methods of preprocessing data.

[0069] In some optional implementations, the execution subject may perform preprocessing based on the following normalized calculation formula:

[0070]

[0071] Among them, x′ i Can represent normalized data; x i It can be expressed as the input data before normalization; x min Can represent the minimum value of the input data before normalization; x max It can represent the maximum value of the input data before normalization.

[0072] Similarly, after the prediction is completed, when the predicted results need to be compared with the corresponding true results, denormalization can be performed.

[0073] In some optional implementations, the execution subject may perform preprocessing based on the following inverse normalization calculation formula:

[0074] y′ i =y i (x max -x min )+x min

[0075] Among them, y′ i Can represent the predicted data after denormalization; y i It can be expressed as the predicted data before normalization; x min Can represent the minimum value of the input data before normalization; x max It can represent the maximum value of the input data before denormalization.

[0076] It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or developed in the future.

[0077] Step 202, import the preprocessed construction data into the trained target prediction model to generate a target prediction result, wherein the target prediction model is composed of a combination of an SVM algorithm and a genetic algorithm, and the target prediction model is constructed by constructing an initial prediction model based on the acquired historical data, and then optimizing the initial prediction model based on the acquired multiple new construction data.

[0078] In some embodiments, the above-mentioned execution entity can import the preprocessed construction data into a trained target prediction model to generate a target prediction result, wherein the target prediction model is composed of a combination of an SVM algorithm and a genetic algorithm, and the target prediction model is constructed by constructing an initial prediction model based on the acquired historical data, and then optimizing the initial prediction model based on the acquired multiple new construction data.

[0079] The target prediction model may refer to a trained computing model that can be used for prediction. The computing model is composed of a combination of an SVM algorithm and a genetic algorithm, wherein SVM constitutes the basic algorithm model, and the genetic algorithm is used to optimize the C parameter (penalty factor, hereinafter referred to as C parameter) and the gamma parameter (hyperparameter, hereinafter referred to as gamma parameter) in the basic algorithm model. The target prediction result may refer to the result predicted based on the input construction data. As an example, when predicting the drilling speed, the target prediction result may refer to the predicted drilling speed data.

[0080] In some optional implementations, the execution entity may construct an initial prediction model based on the acquired historical data according to the following steps:

[0081] The first step is to obtain the historical data and preprocess it. Historical data can refer to the construction data with known results that have been saved, which can be used as data for training the model after preprocessing. The steps for preprocessing historical data are the same as those for preprocessing construction data, and can refer to the above content.

[0082] In the second step, the preprocessed historical data is imported into the preset support vector machine prediction model for training to obtain the first prediction model. The support vector machine prediction model is the SVM prediction model, which is one of the commonly used machine learning models. Since the drilling data is usually very high in dimension, the SVM model can usually be a hyperplane SVM model, and its kernel function can be a Sigmoid kernel function, a polynomial kernel function, an RBF kernel function, a linear kernel function, etc.

[0083] As a specific example, the SVM prediction model can use the RBF kernel function, and its calculation formula can be:

[0084] k(x i ,x j )=exp(||-γ(x i ·xj )|| 2 )

[0085] The hyperplane corresponding to the SVM prediction model can be:

[0086]

[0087] Among them, k is the RBF kernel function, γ represents the nonlinear transformation from the sample space to a high-dimensional feature space. This kernel function maps the original K-dimensional vector to infinite dimensions; i, j represent the sample numbers; x represents the eigenvalue, a represents the Lagrange multiplier, y represents the label value corresponding to a single set of sample data, and f(x) represents the model corresponding to the hyperplane.

[0088] The third step is to optimize the penalty factor and hyperparameters in the first prediction model by genetic algorithm. Genetic algorithm is designed and proposed based on the evolution law of organisms in nature. It is a computational model of biological evolution process that simulates the natural selection and genetic mechanism of Darwin's theory of biological evolution, and is a method of searching for the optimal solution by simulating the natural evolution process. The algorithm uses mathematical methods and computer simulation operations to convert the problem-solving process into processes such as crossover and mutation of chromosome genes in biological evolution. When solving more complex combinatorial optimization problems, it is usually possible to obtain better optimization results faster than some conventional optimization algorithms. The penalty factor (commonly represented by C parameter) and hyperparameter (commonly represented by gamma parameter) are more important parameters in SVM. By optimizing C parameter and gamma parameter, the prediction accuracy of the SVM prediction model can be further adjusted to make the prediction accuracy of the SVM prediction model higher.

[0089] The fourth step is to update the first prediction model according to the optimized penalty factor and hyperparameters to obtain the initial prediction model.

[0090] In some optional implementations, the execution entity may optimize the penalty factor and hyperparameters in the first prediction model through a genetic algorithm based on the following steps:

[0091] The first step is to use the penalty factor and hyperparameter of the first prediction model as two chromosomes of the experimental individual to generate at least one population, wherein the length of each chromosome is the first number, and each population includes the second number of experimental individuals. That is, a population includes multiple experimental individuals (usually 100 to 500, but not limited, set as needed), each experimental individual includes at least one chromosome, and the number of chromosomes is determined according to the parameters adjusted as needed. For example, the present disclosure needs to adjust two parameters, the C parameter and the gamma parameter, and the number of chromosomes is 2. It should be pointed out that the number of populations is determined according to the number of chromosomes. Generally speaking, the fewer the number of chromosomes in the experimental individual, the fewer the number of populations required. Conversely, the more the number of chromosomes in the experimental individual, the more the number of populations required. For example, the number of populations corresponding to the present disclosure can be 1.

[0092] In addition, the length of the chromosome can be determined as needed. As an example, the length of the chromosome in the present disclosure can be 100. Assuming that the initial value of the C parameter is 15 and the initial value of the gamma parameter is 1, the C parameter corresponding to the chromosome can be set to 00...15 (i.e., the first 98 digits are all 0 and the last 2 digits are 15), and the gamma parameter corresponding to the chromosome can be set to 00...01 (i.e., the first 99 digits are all 0 and the last 1 digit is 1).

[0093] The number of each chromosome bit can be binary, decimal, hexadecimal, etc., and can be set as needed, and no specific limitation is made here.

[0094] In the second step, the experimental individuals in the at least one population are reproduced according to the preset selection probability, mutation probability and crossover probability to obtain at least one reproduced population. The reproduction may refer to training each chromosome in the plurality of experimental individuals with a genetic algorithm according to the selection probability, mutation probability and crossover probability.

[0095] Among them, the selection probability refers to the probability corresponding to the selection operation. The selection operation refers to selecting a number of individuals from the population based on the selection probability for elimination (for example, individuals with lower fitness), so that the excellent individuals are directly inherited or passed on to the next generation through crossover. Fitness can refer to the data obtained after updating the SVM prediction model according to each experimental individual. The higher the fitness, the higher the value of the C parameter and gamma parameter corresponding to the experimental individual, and the better the experimental effect.

[0096] The mutation probability can refer to the probability corresponding to the mutation operation. The mutation operation simulates the gene mutation in the biological world, selects several individuals from the population, and randomly mutates the code at a certain position on their chromosomes with the mutation probability.

[0097] The crossover probability may refer to the probability corresponding to the crossover operation, wherein the crossover operation may refer to the crossover of two chromosomes reproduced last time at one or more points to generate a new chromosome.

[0098] As a specific example, Table 1 may represent the parameter settings of a genetic algorithm:

[0099] parameter Number of individuals in a population Maximum generation number Chromosome length Selection probability Mutation probability Crossover probability Fitness function Numeric 300 150 100 0.3 0.05 0.8 Absolute error

[0100] Table 1 Genetic algorithm parameter settings

[0101] In some optional implementations, the execution subject may calculate the fitness value of each experimental individual in at least one population after reproduction for the first prediction model based on the following steps, and select the optimal individual at that time:

[0102] The first step is to obtain any experimental individual whose fitness value has not been calculated in at least one population after reproduction, and obtain a first individual.

[0103] In the second step, the penalty factor and hyperparameters of the first individual are updated to the first prediction model, and the historical data is imported into the updated first prediction model for prediction to obtain a prediction result.

[0104] The third step is to calculate according to the predicted result and the corresponding actual result to obtain the fitness value of the first individual.

[0105] When calculating the fitness value, you can use the average relative error, squared error, cross entropy, etc. of the predicted results and the corresponding true results.

[0106] In some optional implementations, the fitness value is the average relative error between the predicted result and the corresponding true result, and the calculation formula for calculating the average relative error is:

[0107]

[0108] Wherein, MRE represents the fitness value, p i To represent the prediction result, o i To represent the actual result, n represents the total number of the historical data, and i represents the serial number of the historical data.

[0109] The fourth step is to repeatedly execute the step of obtaining any experimental individual whose fitness value has not been calculated in at least one population after reproduction, until the fitness value of any experimental individual in at least one population after reproduction is calculated, and the fitness values ​​of multiple experimental individuals are obtained.

[0110] The fifth step is to determine the experimental individual with the highest fitness value as the optimal individual of the time.

[0111] In some optional implementations, the execution subject may optimize the weight vector of the initial prediction model according to the prediction data and the corresponding real data based on the following steps: Step 1: if the difference between the prediction data and the corresponding real result data meets the preset requirements, the weight vector corresponding to the newly added construction data to be optimized is increased by a preset first value. Step 2: if the difference between the prediction data and the corresponding real result data does not meet the preset requirements, the weight vector corresponding to the newly added construction data to be optimized is reduced by a preset second value.

[0112] The weight vector is a relatively important parameter in the hyperplane SVM, which can be directly obtained after the training is completed. The preset requirements may refer to the requirements for the difference between the predicted data and the corresponding true result data. It should be pointed out that different prediction model purposes correspond to different judgment methods. As an example, if the prediction model is a classification model, correct classification may be considered to meet the requirements, and incorrect classification may be considered to not meet the requirements. If it is a regression model, correct classification may refer to the limit value of the difference between the predicted value data and the corresponding true result data. It is set as needed, and no specific restrictions are made here. The first numerical value and the second numerical value may refer to pre-set modification values ​​for the weight vector. The first numerical value and the second numerical value may be the same or different. As an example, the first numerical value may be 0.01 and the second numerical value may be 0.005.

[0113] In some optional implementations, each of the multiple newly added construction data includes a time tag.

[0114] When the execution subject selects any new data to be optimized whose weight vector has not been optimized from the multiple new construction data, the selection can be performed according to the time sequence of the time tags in each new construction data.

[0115] The beneficial effects of one of the above-mentioned embodiments of the present disclosure include at least: obtaining construction data and preprocessing it; importing the preprocessed construction data into a trained target prediction model to generate a target prediction result, wherein the target prediction model is composed of a combination of an SVM algorithm and a genetic algorithm, and the target prediction model is constructed by constructing an initial prediction model based on the acquired historical data, and then optimizing the initial prediction model based on the acquired multiple new construction data, so that the present disclosure, under the premise of predicting the influence of multiple factors, further improves the prediction model by using the new construction data transmitted in real time, and ensures the accuracy of the model while greatly increasing the efficiency of updating the model, thereby increasing the practicality of the present disclosure.

[0116] Continue to refer Figure 3 , showing step 300 of the target prediction model training process according to the data prediction method of the present disclosure, the method can be Figure 1 The target prediction model training steps include:

[0117] Step 301, obtain historical data and pre-process it.

[0118] Step 302: import the preprocessed historical data into a preset support vector machine prediction model for training to obtain a first prediction model.

[0119] Step 303: Optimize the penalty factor and hyperparameters in the first prediction model by using a genetic algorithm.

[0120] Step 304: Update the first prediction model according to the optimized penalty factor and hyperparameters to obtain an initial prediction model.

[0121] Step 305, obtaining a plurality of newly added construction data.

[0122] Step 306: Filter out any new construction data to be optimized whose weight vector has not been optimized from the multiple new construction data.

[0123] Step 307: import the newly added data to be optimized into the initial prediction model to obtain prediction data.

[0124] Step 308: Optimize the weight vector of the initial prediction model according to the predicted data and the corresponding real data.

[0125] Step 309, repeating steps 306-308 until each of the multiple newly added construction data has been optimized to obtain a target prediction model.

[0126] In some embodiments, the specific implementation of steps 301-309 and the technical effects brought about can be referred to Figure 2 The steps in the corresponding embodiments will not be repeated here.

[0127] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0128] The following are system embodiments of the present disclosure, which can be used to execute the method embodiments of the present disclosure. For details not disclosed in the system embodiments of the present disclosure, please refer to the method embodiments of the present disclosure.

[0129] Further references Figure 4 As an implementation of the above methods in the above figures, the present disclosure provides some embodiments of the data prediction system. These system embodiments are Figure 2 The above method embodiments correspond.

[0130] like Figure 4As shown, the data prediction system 400 of some embodiments includes:

[0131] Data acquisition module, used to acquire construction data and perform preprocessing;

[0132] The prediction module is used to import the preprocessed construction data into the trained target prediction model to generate a target prediction result, wherein the target prediction model is composed of a combination of an SVM algorithm and a genetic algorithm. After the target prediction model is constructed by the acquired historical data, the initial prediction model is optimized according to the acquired multiple new construction data.

[0133] In some optional implementations of some embodiments, constructing an initial prediction model based on the acquired historical data includes: acquiring the historical data and preprocessing it; importing the preprocessed historical data into a preset support vector machine prediction model for training to obtain a first prediction model; optimizing the penalty factor and hyperparameters in the first prediction model through a genetic algorithm; updating the first prediction model according to the optimized penalty factor and hyperparameters to obtain the initial prediction model.

[0134] In some optional implementations of some embodiments, the optimization of the penalty factor and hyperparameters in the first prediction model by a genetic algorithm includes: taking the penalty factor and hyperparameters of the first prediction model as two chromosomes of an experimental individual to generate at least one population, wherein the length of each chromosome is a first number, and each population includes a second number of experimental individuals; breeding the experimental individuals in the at least one population according to preset selection probability, mutation probability, and crossover probability to obtain at least one population after breeding; calculating the fitness value of each experimental individual in the at least one population after breeding for the first prediction model, and screening out the optimal individual of the time; repeating the step of breeding the experimental individuals in the at least one population according to the preset selection probability, mutation probability, and crossover probability until the fitness value of the optimal individual meets the preset requirements or the number of breeding times reaches the standard.

[0135] In some optional implementations of some embodiments, the step of calculating the fitness value of each experimental individual in at least one population after reproduction for the first prediction model and screening out the optimal individual of the time includes: obtaining any experimental individual in at least one population after reproduction whose fitness value has not been calculated, to obtain a first individual; updating the penalty factor and hyperparameters of the first individual to the first prediction model, importing the historical data into the updated first prediction model for prediction, and obtaining a prediction result; calculating according to the prediction result and the corresponding actual result, to obtain the fitness value of the first individual; repeating the step of obtaining any experimental individual in at least one population after reproduction whose fitness value has not been calculated, until the fitness value calculation of any experimental individual in at least one population after reproduction is completed, to obtain the fitness values ​​of multiple experimental individuals; determining the experimental individual with the highest fitness value as the optimal individual of the time.

[0136] In some optional implementations of some embodiments, the fitness value is the average relative error between the predicted result and the corresponding true result, and the calculation formula for calculating the average relative error is:

[0137]

[0138] Wherein, MRE represents the fitness value, p i To represent the prediction result, o i To represent the actual result, n represents the total number of the historical data, and i represents the serial number of the historical data.

[0139] In some optional implementations of some embodiments, the step of optimizing the initial prediction model according to the acquired multiple newly added construction data to obtain the target prediction model includes: acquiring the multiple newly added construction data; filtering out any newly added data to be optimized whose weight vector has not been optimized from the multiple newly added construction data; importing the newly added data to be optimized into the initial prediction model to obtain predicted data; optimizing the weight vector of the initial prediction model according to the predicted data and the corresponding real data; repeating the step of filtering out any newly added data to be optimized that has not been optimized from the multiple newly added construction data until each of the multiple newly added construction data has been optimized to obtain the target prediction model.

[0140] In some optional implementations of some embodiments, the weight vector of the initial prediction model is optimized based on the predicted data and the corresponding real data, including: if the difference between the predicted data and the corresponding real result data meets the preset requirements, the weight vector corresponding to the newly added construction data to be optimized is increased by a preset first value; if the difference between the predicted data and the corresponding real result data does not meet the preset requirements, the weight vector corresponding to the newly added construction data to be optimized is reduced by a preset second value.

[0141] In some optional implementations of some embodiments, each of the multiple newly added construction data includes a time label; when any newly added data to be optimized for which the weight vector has not been optimized is filtered out from the multiple newly added construction data, the filtering is performed according to the time sequence of the time labels in each newly added construction data.

[0142] It is understood that the modules described in the system 400 are similar to those described in the reference Figure 2 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the system 400 and the modules included therein, and will not be described in detail here.

[0143] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0144] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 5 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0145] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program or instruction carried on a computer-readable medium, and the computer program or instruction contains a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.

[0146] It should be noted that the computer-readable medium in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0147] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0148] The computer-readable medium may be included in the device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains construction data and preprocesses it; imports the preprocessed construction data into the trained target prediction model to generate a target prediction result, wherein the target prediction model is composed of a combination of an SVM algorithm and a genetic algorithm, and the target prediction model is obtained by optimizing the initial prediction model based on the acquired historical data after constructing the initial prediction model.

[0149] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0150] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0151] The modules described in some embodiments of the present disclosure may be implemented in software or hardware. The modules described may also be set in a processor, for example, may be described as:

[0152] Data acquisition module and prediction module. For example, the data acquisition module can also be described as a "module that acquires construction data and performs preprocessing."

[0153] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0154] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.

Claims

1. A data prediction method, characterized in that: include: Acquire construction data and pre-process it; The preprocessed construction data is imported into the trained target prediction model to generate a target prediction result, wherein the target prediction model is composed of a combination of an SVM algorithm and a genetic algorithm. After the target prediction model is constructed by the acquired historical data, the initial prediction model is optimized according to the acquired multiple new construction data.

2. The method according to claim 1, characterized in that The step of constructing an initial prediction model based on the acquired historical data includes: Acquiring the historical data and preprocessing it; Importing the preprocessed historical data into a preset support vector machine prediction model for training to obtain a first prediction model; Optimizing the penalty factor and hyperparameters in the first prediction model by genetic algorithm; The first prediction model is updated according to the optimized penalty factor and hyperparameters to obtain the initial prediction model.

3. The method according to claim 2, characterized in that The optimizing the penalty factor and hyperparameters in the first prediction model by using a genetic algorithm includes: Using the penalty factor and the hyperparameter of the first prediction model as two chromosomes of the experimental individual, generating at least one population, wherein the length of each chromosome is the first number, and each population includes the second number of experimental individuals; According to a preset selection probability, mutation probability and crossover probability, the experimental individuals in the at least one population are reproduced to obtain at least one population after reproduction; Calculating the fitness value of each experimental individual in at least one population after reproduction for the first prediction model, and selecting the best individual at that time; Repeat the step of reproducing the experimental individuals in the at least one population according to the preset selection probability, mutation probability and crossover probability until the fitness value of the optimal individual meets the preset requirements or the number of reproductions reaches the standard.

4. The method according to claim 3, characterized in that The calculating the fitness value of each experimental individual in at least one population after reproduction for the first prediction model and selecting the best individual at that time includes: Obtain any experimental individual whose fitness value has not been calculated from at least one population after reproduction to obtain a first individual; Updating the penalty factor and hyperparameters of the first individual to the first prediction model, importing the historical data into the updated first prediction model for prediction, and obtaining a prediction result; Calculating according to the predicted result and the corresponding true result to obtain the fitness value of the first individual; Repeat the step of obtaining any experimental individual whose fitness value has not been calculated in the at least one population after reproduction until the fitness value of any experimental individual in the at least one population after reproduction is calculated, thereby obtaining the fitness values ​​of multiple experimental individuals; The experimental individual with the highest fitness value is determined as the optimal individual of the time.

5. The method according to claim 4, characterized in that The fitness value is the average relative error between the predicted result and the corresponding true result. The calculation formula for calculating the average relative error is: Wherein, MRE represents the fitness value, p i To represent the prediction result, o i To represent the actual result, n represents the total number of the historical data, and i represents the serial number of the historical data.

6. The method according to claim 1, characterized in that The step of optimizing the initial prediction model according to the acquired multiple newly added construction data to obtain the target prediction model includes: Acquire the multiple newly added construction data; Filtering out any new construction data to be optimized for which the weight vector has not been optimized from the multiple new construction data; Importing the newly added data to be optimized into the initial prediction model to obtain prediction data; Optimizing the weight vector of the initial prediction model according to the predicted data and the real data corresponding thereto; Repeat the step of selecting any unoptimized new construction data to be optimized from the multiple new construction data until each of the multiple new construction data has been optimized to obtain the target prediction model.

7. The method according to claim 6, characterized in that The step of optimizing the weight vector of the initial prediction model according to the predicted data and the real data corresponding thereto includes: If the difference between the predicted data and the corresponding actual result data meets the preset requirement, the weight vector corresponding to the newly added construction data to be optimized is increased by a preset first value; If the difference between the predicted data and the corresponding actual result data does not meet the preset requirement, the weight vector corresponding to the newly added construction data to be optimized is reduced by a preset second value.

8. The method according to claim 6 or 7, characterized in that: Each of the plurality of newly added construction data includes a time tag; When any new construction data to be optimized whose weight vector has not been optimized is selected from the plurality of new construction data, the selection is performed according to the time sequence of the time tags in each new construction data.

9. A data prediction system, characterized in that: include: Data acquisition module, used to acquire construction data and perform preprocessing; The prediction module is used to import the preprocessed construction data into the trained target prediction model to generate a target prediction result, wherein the target prediction model is composed of a combination of an SVM algorithm and a genetic algorithm. After the target prediction model is constructed by the acquired historical data, the initial prediction model is optimized according to the acquired multiple new construction data.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product, comprising a computer program or instructions, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Communication frequency prediction method and device, electronic equipment and storage medium

    CN121283545A