CN113672666A - Machine load prediction method and device, electronic equipment and readable storage medium - Google Patents

Machine load prediction method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113672666A
CN113672666A CN202110968976.8A CN202110968976A CN113672666A CN 113672666 A CN113672666 A CN 113672666A CN 202110968976 A CN202110968976 A CN 202110968976A CN 113672666 A CN113672666 A CN 113672666A
Authority
CN
China
Prior art keywords
load sequence
load
sequence
machine
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110968976.8A
Other languages
Chinese (zh)
Inventor
廖强
陈俊
王向勇
李辰
刘正一
罗磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Jiahua Chain Cloud Technology Co ltd
Original Assignee
Chengdu Jiahua Chain Cloud Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Jiahua Chain Cloud Technology Co ltd filed Critical Chengdu Jiahua Chain Cloud Technology Co ltd
Priority to CN202110968976.8A priority Critical patent/CN113672666A/en
Publication of CN113672666A publication Critical patent/CN113672666A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Probability & Statistics with Applications (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Fuzzy Systems (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a machine load prediction method, a device, an electronic device and a readable storage medium, and relates to the technical field of computers. According to the method, a similar load sequence corresponding to a target prediction time interval and a fourth load sequence before the target prediction time interval are obtained and input into a machine learning model, so that the model prediction accuracy is improved. The similar load sequence has larger similarity with the sequence to be predicted in time, numerical value and distribution trend, can reflect the regularity and periodicity of load change, is used as the input of a model, and can self-adaptively learn and extract the similarity rule of the load change by the model so as to predict and obtain a more accurate load sequence.

Description

Machine load prediction method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for predicting a machine load, an electronic device, and a readable storage medium.
Background
With the upgrading of power utilization structures and the large-scale grid connection of new energy such as hydropower, wind power, nuclear power and the like, a power grid is gradually subjected to more refined scheduling, the new energy is greatly disturbed due to weather, regions and the like, and the overall regulation and control of a thermal power generating unit are gradually enhanced.
The prediction of the load of each device (such as a generator and a boiler) in the thermal power generating unit is beneficial to the internal scheduling and the economical operation of a power plant, and provides a powerful reference for flue gas treatment (such as denitration, dust removal, desulfurization and the like).
At present, a prediction mode aiming at the load of each device in a thermal power generating unit is mainly used for predicting the load of each device by a worker based on historical load data and by combining self experience. This approach relies on human subjective experience and is not highly accurate.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for predicting a machine load, an electronic device, and a readable storage medium, so as to solve the problem in the prior art that accuracy is not high due to artificial experience-dependent load prediction.
In a first aspect, an embodiment of the present application provides a method for predicting a machine load, where the method includes:
acquiring a similar load sequence corresponding to a machine in a target prediction time interval and a fourth load sequence before the target prediction time interval, wherein the similar load sequence comprises at least one of a first load sequence of the machine in the same time interval one day before the target prediction time interval, a second load sequence of the machine in the same time interval one week before the target prediction time interval, and a third load sequence with the similarity degree determined from the historical load sequences of the machine being greater than a set value;
and inputting the similar load sequence and the fourth load sequence into corresponding machine learning models, and predicting and obtaining the load sequence corresponding to the target prediction time period through the machine learning models.
In the implementation process, by acquiring a similar load sequence corresponding to a target prediction time interval of a machine and a fourth load sequence before the target prediction time interval, the similar load sequence has greater similarity with a sequence to be predicted (a load sequence corresponding to the target prediction time interval) in time, numerical value and distribution trend, and can reflect the regularity and periodicity of load change, so that the similar load sequence and the fourth load sequence are input into a corresponding machine learning model for prediction, so that the model can learn in a self-adaptive manner and extract the similarity rule of the load change, and further more accurate load sequence can be predicted.
Optionally, the method further comprises:
acquiring other external environment characteristics;
the inputting the similar load sequence and the fourth load sequence into corresponding machine learning models, and obtaining the load sequence corresponding to the target prediction time period through prediction of the machine learning models includes:
and inputting the similar load sequence, the fourth load sequence and the other external environment features into corresponding machine learning models, and predicting and obtaining the load sequence corresponding to the target prediction time period through the machine learning models.
In the implementation process, load prediction is carried out by combining other external environment characteristics, and external factors influencing the prediction result are fully considered, so that more information useful for prediction can be extracted by the model, and the prediction is more accurate.
Optionally, a third load sequence with similarity greater than a set value is determined from the historical load sequences of the machine by:
acquiring a similar search space constructed according to the historical load sequence, wherein the similar search space comprises a plurality of sample data, and each sample data comprises a load sequence of a historical time period before a moment and a load sequence of a prediction time period after the moment;
acquiring a fifth load sequence before the target prediction time interval;
performing similarity matching on the fifth load sequence and the load sequence of the historical time period in each sample data in the similar search space to obtain the load sequence of the prediction time period in the target sample data with the similarity larger than a set value;
wherein, the load sequence of the prediction period in the target sample data is the third load sequence.
In the implementation process, the load sequences with the similarity greater than the set value are obtained from the similar search space, so that the load sequences with more similar change trends can be obtained, more similarity rules of load changes can be merged into the data input into the model, and the prediction accuracy of the model is improved.
Optionally, the historical loading sequence is obtained by:
acquiring an initial historical load sequence;
determining whether the initial historical load sequence is continuous in time;
if not, acquiring the time length of the missing part, and judging whether the time length is greater than a set threshold value;
if the load sequence is larger than the set threshold, partitioning the initial historical load sequence to obtain a plurality of load sequence blocks;
and carrying out interpolation processing on each load sequence block to obtain temporally continuous load sequence blocks, wherein the historical load sequence comprises a plurality of temporally continuous load sequence blocks.
In the implementation process, by carrying out interpolation processing after blocking on the discontinuous load sequence, the obtained data can be ensured to be continuous in time, and the subsequent construction of sample data of a similar search space is facilitated.
Optionally, if there are a plurality of target sample data, the method further includes:
weighting and summing the load sequences of the prediction time periods in the target sample data to obtain a final load sequence;
wherein the final load sequence is the third load sequence.
In the implementation process, the load sequence is input into the model after weighted summation, so that the dimensionality of the input data of the model can be reduced, the complexity of the model for processing the data is reduced, and the processing efficiency is improved.
Optionally, the machine learning model is trained by:
obtaining training samples, wherein the training samples comprise similar load sequence samples corresponding to the machine at each moment and fourth load sequence samples before each moment, and the similar load sequence samples comprise at least one of first load sequence samples of the machine at the same time period one day before each moment, second load sequence samples of the machine at the same time period one week before each moment, and third load sequence samples of which the similarity determined from the historical load sequences of the machine is greater than a set value; the label data of the training samples comprise target load sequences of prediction periods after each moment;
inputting the training sample into an initial machine learning model to obtain the output of the initial machine learning model;
calculating a loss value according to the output and the label data;
updating the network parameters of the initial machine learning model according to the loss values, and obtaining a trained machine learning model when a training end condition is reached;
wherein corresponding machine learning models are obtained for different training samples.
In the implementation process, the machine learning model is trained by adopting the three similar load sequence samples and the fourth load sequence sample, so that the model can better learn the change trend of the load sequence, and the prediction precision is improved.
Optionally, the label data of the training sample is obtained by:
obtaining a historical load sequence sample;
extracting a plurality of sequence samples in the historical load sequence samples, wherein each sequence sample comprises a load sequence of a historical time period before a moment and a load sequence of a prediction time period after the moment;
calculating and obtaining a numerical value representing the change degree of the load sequence of the prediction time interval in each sequence sample, wherein the larger the numerical value is, the larger the change degree is;
screening out a target sequence sample with the numerical value larger than a preset value, wherein the load sequence of the prediction time period in the target sequence sample is the label data of the training sample.
In the implementation process, the sequence samples are screened according to the change degree, so that the sequence samples with larger change degree can be screened out to be used as the label data, the model can learn more change trends of the load sequences with larger change degree, and the prediction accuracy of the load sequences with larger change degree is improved.
In a second aspect, an embodiment of the present application provides a machine load prediction apparatus, where the apparatus includes:
the load sequence acquisition module is used for acquiring a similar load sequence corresponding to a machine in a target prediction time interval and a fourth load sequence before the target prediction time interval, wherein the similar load sequence comprises at least one of a first load sequence of the machine in the same time interval one day before the target prediction time interval, a second load sequence of the machine in the same time interval one week before the target prediction time interval, and a third load sequence of which the similarity determined from the historical load sequences of the machine is greater than a set value;
and the load sequence prediction module is used for inputting the similar load sequence and the fourth load sequence into corresponding machine learning models and predicting and obtaining the load sequence corresponding to the target prediction time period through the machine learning models.
Optionally, the apparatus further comprises:
the external environment characteristic acquisition module is used for acquiring other external environment characteristics;
and the load sequence prediction module is used for inputting the similar load sequence, the fourth load sequence and the other external environment characteristics into corresponding machine learning models, and obtaining the load sequence corresponding to the target prediction time period through prediction of the machine learning models.
Optionally, a third load sequence with similarity greater than a set value is determined from the historical load sequences of the machine by:
acquiring a similar search space constructed according to the historical load sequence, wherein the similar search space comprises a plurality of sample data, and each sample data comprises a load sequence of a historical time period before a moment and a load sequence of a prediction time period after the moment;
acquiring a fifth load sequence before the target prediction time interval;
performing similarity matching on the fifth load sequence and the load sequence of the historical time period in each sample data in the similar search space to obtain the load sequence of the prediction time period in the target sample data with the similarity larger than a set value;
wherein, the load sequence of the prediction period in the target sample data is the third load sequence.
Optionally, the historical loading sequence is obtained by:
acquiring an initial historical load sequence;
determining whether the initial historical load sequence is continuous in time;
if not, acquiring the time length of the missing part, and judging whether the time length is greater than a set threshold value;
if the load sequence is larger than the set threshold, partitioning the initial historical load sequence to obtain a plurality of load sequence blocks;
and carrying out interpolation processing on each load sequence block to obtain temporally continuous load sequence blocks, wherein the historical load sequence comprises a plurality of temporally continuous load sequence blocks.
Optionally, if there are a plurality of target sample data, the apparatus further includes:
the load weighting module is used for carrying out weighted summation on load sequences of prediction time periods in the target sample data to obtain a final load sequence; wherein the final load sequence is the third load sequence.
Optionally, the apparatus further comprises:
a training module to:
obtaining training samples, wherein the training samples comprise similar load sequence samples corresponding to the machine at each moment and fourth load sequence samples before each moment, and the similar load sequence samples comprise at least one of first load sequence samples of the machine at the same time period one day before each moment, second load sequence samples of the machine at the same time period one week before each moment, and third load sequence samples of which the similarity determined from the historical load sequences of the machine is greater than a set value; the label data of the training samples comprise target load sequences of prediction periods after each moment;
inputting the training sample into an initial machine learning model to obtain the output of the initial machine learning model;
calculating a loss value according to the output and the label data;
updating the network parameters of the initial machine learning model according to the loss values, and obtaining a trained machine learning model when a training end condition is reached;
wherein corresponding machine learning models are obtained for different training samples.
Optionally, the label data of the training sample is obtained by:
obtaining a historical load sequence sample;
extracting a plurality of sequence samples in the historical load sequence samples, wherein each sequence sample comprises a load sequence of a historical time period before a moment and a load sequence of a prediction time period after the moment;
calculating and obtaining a numerical value representing the change degree of the load sequence of the prediction time interval in each sequence sample, wherein the larger the numerical value is, the larger the change degree is;
screening out a target sequence sample with the numerical value larger than a preset value, wherein the load sequence of the prediction time period in the target sequence sample is the label data of the training sample.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method as provided in the first aspect are executed.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, performs the steps in the method as provided in the first aspect above.
Additional features and advantages of the present application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the present application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
FIG. 1 is a flow chart of a method for predicting a load of a machine according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating a training process of a machine learning model according to an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of a machine learning model according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating a process of training and predicting a model according to an embodiment of the present disclosure;
fig. 5 is a block diagram illustrating a structure of a machine load prediction apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device for executing a method for predicting a machine load according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The method includes the steps that a similar load sequence corresponding to a target prediction time interval and a fourth load sequence before the target prediction time interval of a machine are obtained, the similar load sequence has larger similarity with a sequence to be predicted (the load sequence corresponding to the target prediction time interval) in time, numerical values and distribution trends, and the regularity and periodicity of load change can be reflected.
Referring to fig. 1, fig. 1 is a flowchart of a method for predicting a machine load according to an embodiment of the present disclosure, where the method includes the following steps:
step S110: and acquiring a similar load sequence of the machine in a target prediction time interval and a fourth load sequence before the target prediction time interval.
The machine may be an engine, a generator, an electrical appliance, or a boiler in an electrical power system, and the load refers to power generated and consumed by the devices during operation, and the load sequence described in this embodiment includes a plurality of loads, which may be a temporal load sequence formed by sorting the loads in a time sequence, for example, one load per second, and then a load sequence of one minute includes 60 loads.
The similar load sequence comprises at least one of a first load sequence of the machine in the same time period on the day before the target prediction time period, a second load sequence of the machine in the same time period on the day before the target prediction time period, and a third load sequence of which the similarity determined from the historical load sequence of the machine is greater than a set value.
For example, if the target prediction period is 30 minutes after the current time, and if the current time is 3:00 pm on 7/21/2021, then the target prediction period is 3:01-3:30, then the first load sequence may be a load sequence composed of loads generated by the machines during 20/3 pm on 7/2021; the second load sequence can be a load sequence consisting of loads generated by the machine in the period of 3:01-3:30 in 14 pm of 7 months and 14 days in 2021; and the third load sequence is determined from the historical load sequence, if the historical load sequence comprises the loads in the last two years of the machine, the load with the similarity larger than the set value is found from the loads to be used as the third load sequence.
In addition, in order to avoid the situation that the load sequences are different due to the shift of the loads at the same time on different dates when the first load sequence and the second load sequence are obtained, for example, the boiler load is maximum at 8:00 am in a certain day and the boiler load is maximum at 9:00 am in another day, so that when the first load sequence and the second load sequence are obtained, the loads of 30 minutes before and after the same day and the same time period before the target prediction time period can be intercepted as the first load sequence, and the loads of 30 minutes before and after the same time period on the same day and the same time period before the target prediction time period can be intercepted as the second load sequence. For example, the target prediction period is 2021 year 7 month 21 afternoon 3:01-3:30, then the load sequence of 21 pm of 7/2021 year 7/month 2:30-4:00 is intercepted as the first load sequence, and the load sequence of 14 pm of 7/month 2021 year 2:30-4:00 is intercepted as the second load sequence.
In some embodiments, the obtained first load sequence and second load sequence have a larger dimension, and in order to reduce the feature dimension and reduce the influence of noise on the machine learning model, the feature of the first load sequence and second load sequence may be downsampled and then input into the machine learning model.
For example, the first load sequence includes 90 load data, and when sampling is performed, sampling may be performed according to each time of the target prediction period, for example, when at the first time 3:01 of the target prediction period 3:01-3:30, the first 30 load data are down-sampled according to 15 minutes to obtain 2 load data, then 30 load data after the time are down-sampled according to 15 minutes to obtain 2 load data, and then the load data are combined with the load data at the time 3:01, 5 load data are obtained for the first time, sampling at the second time 3:02 is continued, that is, the 30 load data before and after the time are down-sampled according to 15 minutes, processing is continued in this manner until the 30 th time 3:30 is sampled, so that a 5 x 30-dimensional load sequence can be obtained, this load sequence may be input into the model as the processed first load sequence. The same is true for the second load sequence, and finally a 5 x 30 dimension load sequence input into the model is also available.
In addition, the fourth load sequence before the target prediction time interval has a certain influence on the prediction of the load sequence in the target prediction time interval, so that the fourth load sequence before the target prediction time interval needs to be acquired. For example, if the current time is 4:00 pm on 21 st/7/2021 and the target forecast time period is 4:01 pm to 4:30 pm, the fourth load sequence before the target forecast time period may refer to the load sequence during the time period 3:30 pm to 4:00 pm on 21 st/7/2021 (i.e., the load sequence 30 minutes before the current time). The time interval before the current moment can be flexibly set according to actual requirements.
Step S120: and inputting the similar load sequence and the fourth load sequence into corresponding machine learning models, and predicting and obtaining the load sequence corresponding to the target prediction time period through the machine learning models.
The obtained similar load sequence is possibly associated with the load sequence of the target prediction time period, so that the corresponding information is expected to be extracted in a self-adaptive mode through a machine learning model, and the prediction accuracy of the load sequence to be predicted is further improved. In other words, the obtained first load sequence, the second load sequence, the third load sequence and the fourth load sequence can reflect the regularity and periodicity of load change, so that the machine learning model can effectively extract the similarity regularity of the load change, can pay more attention to the change trend of the load, can adaptively obtain information with lower prediction error, and further improve the prediction accuracy.
In practical application, the obtained load sequence corresponding to the target prediction time period can be used for correspondingly regulating and controlling the machine, for example, for a boiler, the amount of coal can be flexibly regulated and controlled according to the load sequence corresponding to the target prediction time period, for example, the higher the load is, the more the coal is burned, the more the amount of the coal can be regulated and controlled in advance, and if the higher the load is, the more the exhaust gas generated is, the more the exhaust gas is, the corresponding measures can be planned and taken for treatment in advance. Or for the generator, the generator may be subjected to power generation control and the like according to the load sequence corresponding to the target prediction time period.
In the implementation process, the similar load sequence and the fourth load sequence corresponding to the target prediction time period of the machine are obtained, and the similar load sequence has larger similarity with the sequence to be predicted (the load sequence corresponding to the target prediction time period) in time, value and distribution trend, and can reflect the regularity and periodicity of load change, so that the similar load sequence and the fourth load sequence are input into the corresponding machine learning model for prediction, so that the model can learn in a self-adaptive manner and extract the similarity rule of the load change, and further more accurate load sequence can be predicted.
On the basis of the above embodiments, since the load of the machine (such as a generator, a boiler, etc.) is easily affected by various external factors such as seasons, weather, heating, etc., for example, the steam generated by the combustion of the boiler is used for power generation, the remaining exhaust gas is also used for other purposes such as municipal heating in winter in north, etc., and when the temperature is low, part of the main steam of the boiler is directly used for municipal heating, so that the load of the boiler has obvious seasonal dependence. Meanwhile, apart from thermal power, wind power in the north and water power in the south have strong correlation with seasons and weather, and the regulation and control of the power grid on the thermal power demand can be obviously influenced by the change of the generated power of the new energy. Therefore, the prediction of the load sequence in the target prediction time period has a certain relevance with external factors, in order to make the prediction more accurate, other external environment characteristics can be obtained, then the similar load sequence, the fourth load sequence and other external environment characteristics are input into the corresponding machine learning model, and the load sequence corresponding to the target prediction time period is obtained through the prediction of the machine learning model.
The target prediction time interval may be a time interval after the current time, that is, the target prediction time interval is a time interval in the future relative to the current time; the current time of day may be described as the time of day at the time of prediction (e.g., the time of day at the time of prediction is 3:00 pm on 7 months and 21 days of 2021, then the target prediction period may be 3:01-3: 30); it can also be described as a time before the start time of the target prediction period (for example, the load sequence is output in the minute level, which is one minute here), and if the target prediction period is 4:01-4:30 in 21 pm of 7 months in 2021, the current time is 4:00 in 21 pm of 7 months in 2021, that is, the current time may be the time that has occurred, and the target prediction period is a future period after the current time with respect to the current time.
In addition, the other external environmental characteristics may include historical meteorological observations (including precipitation, temperature, humidity, wind speed, wind direction, etc.), meteorological forecasts, and year, month and day of the corresponding time, and the other external environmental characteristics may refer to environmental characteristics corresponding to the time when each load in the similar load sequence is generated, for example, the similar load sequence includes a plurality of loads, each load is generated by the machine at one time, and each time may correspond to other external environmental characteristics. By combining other external environment characteristics which affect the prediction result to carry out load prediction, the model can adaptively extract more information which is useful for prediction, and the prediction is more accurate.
On the basis of the above embodiment, the third loading sequence may be obtained by: acquiring a similar search space constructed according to the historical load sequence, wherein the similar search space comprises a plurality of sample data, and each sample data comprises a load sequence of a historical time period before a moment and a load sequence of a prediction time period after the moment; acquiring a fifth load sequence before the target prediction time interval; and then carrying out similarity matching on the fifth load sequence and the load sequence of the historical time period in each sample data to obtain target sample data with the similarity larger than a set value, wherein the load sequence of the prediction time period in the target sample data is a third load sequence.
The construction process of the similar search space will be described first.
The similarity search space may be constructed using load data for a time period of T, such as the last two years. For search convenience, the similar search space may be a tuple containing (x, y, list _ date, list _ minimum), two-dimensional arrays and two one-dimensional arrays, respectively. x represents a load sequence of a historical period before a time, such as a load sequence of 720 minutes before a time (which may be set according to demand), and y represents a load sequence of a predicted period after the time, such as a load sequence of 30 minutes after the time (which may be set according to demand). The list _ date represents a timestamp of the zero point of the day at which the time corresponding to each sample data is located, and the list _ minute represents a difference value between the time corresponding to each sample data and the timestamp corresponding to the list _ date, that is, a combination of the list _ date and the list _ minute may represent the timestamp corresponding to the sample data.
The historical load sequence is load data that is sorted in chronological order, such as load data of the past two years, in constructing the tuple shown above, the time is used for sliding, for example, sliding "time" to 720 minutes (the time period here can be flexibly set according to actual requirements, and is only described as an example), taking the load sequence before the time and including the time as x, taking the load sequence 30 minutes after the time (the time period here can be flexibly set according to actual requirements, and is only described as an example) as y, and obtaining the timestamp list _ date and list _ minimum corresponding to the time (for example, if the time is 3:00 pm of 3/18/2019, the corresponding list _ date is 00:00 p/3/18/2019, and the list _ minimum is a difference between the time and the list _ date, such as 900 minutes), and storing the obtained (x, y) as first tuple data. And continuing to slide the 'time' to the 721 th minute, taking the load sequence before the time and within 720 minutes including the time as x, taking the load sequence 30 minutes after the time as y, acquiring the timestamp list _ date and list _ minute corresponding to the time, storing the timestamp list _ date and the timestamp list _ minute as second tuple data, continuously repeating the above processes according to the above mode to obtain a plurality of such tuple data, and merging the tuple data to obtain the sample data in the similar search space.
When similarity matching is performed, the fifth load sequence may refer to load data within 720 minutes before the current time, that is, the length of the fifth load sequence may be the same as that of the load sequence in the history time period in the sample data, if the target prediction time period is 3:00 pm on 7.21.7.2021, the fifth load sequence may be load data within 720 minutes before 3:00 pm on 21.7.2021, and then similarity calculation may be performed on the fifth load sequence and each x in the similar search space, and the similarity calculation may be performed by using methods such as pearson correlation, euclidean distance, cosine similarity, and the like, and an obtained value may represent the similarity between two load sequences.
After the similarity is obtained, load sequences (namely x) in historical time periods in target sample data with the similarity larger than a set value (specific numerical values of the set value can be flexibly set according to actual requirements) are screened out, or n x with the highest similarity can be selected, the screened-out x represents the load sequences with the similarity larger than that of a fifth load sequence, then y in the target sample data where the screened-out x is located is used as a third load sequence, and y is used as the load sequence in a prediction time period for each sample data, so that the y is input into a machine learning model, the machine learning model can better understand the relevance in the target sample data, and accurate prediction is achieved.
In the implementation process, the load sequences with the similarity greater than the set value are obtained from the similar search space, so that the load sequences with more similar change trends can be obtained, more similarity rules of load changes can be merged into the data input into the model, and the prediction accuracy of the model is improved.
In addition to the above embodiments, when a plurality of target sample data are provided, if all y are input to the machine learning model at this time, the data dimension is large, so that the processing complexity of the machine learning model increases, and therefore, in order to improve this situation, it is also possible to perform weighted summation on the load sequences of the prediction periods in the plurality of target sample data to obtain a final load sequence, and then input the final load sequence as a third load sequence to the machine learning model.
For example, each y is an array with a dimension of 30, which includes 30 load data, each time corresponds to one load data, if there are n y, a 30 × n-dimensional array can be formed, when weighting is performed, the load data of each longitudinal dimension can be weighted and summed (the summation weight of each y can be set according to actual requirements), so that a 30-dimensional array can be obtained, the load data in the array is a final load sequence, so that the data can be input into the model after dimensionality reduction, and the prediction efficiency of the model is higher.
On the basis of the above embodiment, in the process of obtaining the third loading sequence, in order to improve the search efficiency, a preliminary screening may be performed according to the time stamp, for example, sample data whose time is 30 minutes before and after the current time (e.g. the current time is one minute before the start of the target prediction period) can be screened from the similar search space according to the timestamp of the sample data, for example, the current time is 15:00, the target prediction period is 15:31-15:30, then sample data between 14:30 and 15:30 (so that similar sample data in time can be preliminarily screened out) can be screened out from the similar search space, such as obtaining N sample data, then, similarity calculation is carried out on x in the N sample data and the fifth load sequence respectively, and then a corresponding third load sequence is obtained through screening based on the similarity.
On the basis of the above embodiment, since there may be data missing in the obtained historical loading sequence for constructing the similar search space, so that the time when the obtained sample data is constructed is discontinuous when the similar search space is constructed subsequently, in order to improve this situation, correlation processing may also be performed, for example, the historical loading sequence for constructing the similar search space is obtained by: the method comprises the steps of obtaining an initial historical load sequence, judging whether each load in the initial historical load sequence is continuous in time, if not, obtaining the time length of a missing part, judging whether the time length is larger than a set threshold, if so, partitioning the initial historical load sequence to obtain a plurality of load sequence blocks, then carrying out interpolation processing on each load sequence block to obtain the load sequence blocks continuous in time, and if so, constructing the historical load sequence of a similar search space, wherein the historical load sequence comprises the load sequence blocks continuous in time.
It can be understood that the initial historical load sequence is a load sequence of the originally collected machine in a historical period (for example, the previous two years), and the load sequence at this time may have data loss, and if the initial historical load sequence is directly interpolated, the data quality may be affected, so that the initial historical load sequence may be processed after being partitioned. The history load sequence in the above embodiment refers to a load sequence which is continuous in time after the interpolation processing.
When the load sequence is partitioned, the initial load sequence can be scanned, and each load in the initial load sequence carries a corresponding time stamp, so that whether each load is continuous in time or not can be judged according to the time stamps, and when the time loss is long, the load sequence is partitioned. For example, according to the situation of data missing from far to near scanning, if a 300 th load is scanned, if 15 loads of the 300 loads are missing (each minute corresponds to one load, which means that the time length of the missing part reaches 15 minutes, that is, the set threshold is 15 minutes, and this time length can be flexibly set according to the actual requirement, which is only illustrated here), at this time, the initial load sequence can be divided into two left and right load sequence blocks, and the time length of the left load sequence block reaches 15 minutes, the left load sequence block is subjected to interpolation processing, such as linear interpolation, quadratic interpolation, polynomial interpolation, and the like, that is, the load data are interpolated by 15 loads, and the plurality of loads in the load sequence block obtained after the interpolation processing are continuous in time, and at this time, the load sequence block includes 300 loads.
And continuing to scan the right load sequence block in the same way, dividing the load sequence block into a left load sequence block and a right load sequence block when the time length of the missing part reaches 15 minutes, performing interpolation processing on the left load sequence block, then continuing to scan the right load sequence block, and continuing to divide and interpolate until the loads in all the finally obtained load sequence blocks are continuous in time.
Or the initial historical load sequence may be scanned first, then partitioned, and then each load sequence block is subjected to interpolation processing, so that the load in each load sequence block obtained in this way is also continuous in time.
Subsequently, when a similar search space is constructed, a similar search space may be constructed for each load sequence block, and because the load length required for creating the similar search space is large, when the load sequence block is performed, a minimum block length may be set for each load sequence block, for example, the minimum block length is 750, the length of the first load sequence block is 300, and if the minimum block length is not reached, the scanning is continued until the block length of the load sequence block after the block is subjected to the interpolation processing reaches 750. Alternatively, the blocking may be performed initially in the manner described above, and then the load sequence blocks with the block length smaller than 750 are discarded, and only the load sequence blocks with the remaining block length greater than or equal to 750 are retained. This enables enough sample data to be available when constructing a similar search space for each load sequence block.
However, as shown in the above embodiments, for the sake of brevity of description, repeated descriptions are omitted here, and the constructed similar search space may be stored, that is, the similar search space may be constructed in advance (as constructed in a model training phase), and when the prediction is performed, the stored similar search space may be directly read, and then the similarity matching is performed. It is understood that if M payload sequence blocks are finally obtained, M similar search spaces may be obtained. When the third load sequence is obtained, similarity matching may be performed on the fifth load sequence and sample data in each similar search space, and finally all the obtained target sample data are merged to form the third load sequence. Or after M similar search spaces are obtained, the M similar search spaces may be merged into one similar search space and stored, and when a third load sequence is obtained, the third load sequence with the similarity greater than the set value is directly searched in the one similar search space.
On the basis of the embodiment, in addition to power generation, observation shows that the electricity utilization habits show obvious regularity and difference, for example, 24 hours a day shows larger change along with the changes of work and rest of residents and production arrangement of factories, and the change of each day shows periodicity; the weekdays are different from weekends, and the ordinary weekends are different from the legal holidays, while the influence and the amplitude of national big holidays such as spring festival are also different from the ordinary holidays in the legal holidays.
Therefore, in order to conveniently distinguish loads at different moments, timestamps of the fields of month, weekday and hour can be constructed, and common legal holidays, national celebrations, spring festival and other important legal holidays can be marked to adapt to the regularity of the loads on the time sequence, so that the regularity and the periodic variation of the load variation can be well identified. In order to ensure that the dimensions of each field are consistent and facilitate model processing, each field can be normalized respectively.
In addition, in order to make the obtained historical load sequence meet the requirements, after the initial load sequence is obtained, data under abnormal working conditions in the initial load sequence can be screened out according to experience, for example, when the boiler load is smaller than a threshold value, the boiler is considered to be in an abnormal working state, the data can be removed, and the rest data can continue to be subjected to subsequent blocking, interpolation and the like, so that the influence of the data under the abnormal working state on the prediction accuracy can be eliminated.
On the basis of the above embodiment, the machine learning model may be a Long Short-Term Memory network (LSTM) model, a convolution machine learning model, a seq2seq model, etc., where the machine learning model is obtained by training in advance, as shown in fig. 2, and the training process includes the following steps:
step S210: obtaining training samples, wherein the training samples comprise similar load sequence samples corresponding to the machine at each moment and fourth load sequence samples before each moment, the similar load sequence samples comprise at least one of first load sequence samples of the machine at the same time period one day before each moment, second load sequence samples of the machine at the same time period one week before each moment, and third load sequence samples of which the similarity determined from the historical load sequences of the machine is greater than a set value; the label data of the training samples comprise target load sequences of prediction periods after each moment;
step S220: inputting the training sample into an initial machine learning model to obtain the output of the initial machine learning model;
step S230: calculating a loss value according to the output and the label data;
step S240: updating the network parameters of the initial machine learning model according to the loss values, and obtaining a trained machine learning model when a training end condition is reached;
wherein corresponding machine learning models are obtained for different training samples.
It will be appreciated that during the training process, training samples are obtained in a similar manner to the above embodiments where samples of the input model (such as the similar load sequence described above) are obtained at the time of prediction.
The training samples, which include a large number of similar load sequence samples, are described in detail below, assuming that the training samples are represented in the form of (x _ hist, x _ future, label). Where x _ hist denotes a fourth load sequence sample of a period before each time, x _ future denotes a first load sequence sample, a second load sequence sample, and a third load sequence sample among similar load sequence samples, and label denotes tag data, i.e., a target load sequence.
In some embodiments, as in the above-mentioned similar search space construction manner, a plurality of sequence samples may be obtained by sliding time instants, and then y in the sequence samples is taken as tag data, i.e. a target load sequence, according to the following processes: the method comprises the steps of obtaining historical load sequence samples, extracting a plurality of sequence samples in the historical load sequence samples, wherein each sequence sample comprises a load sequence of a historical time period before a moment and a load sequence of a prediction time period after the moment, and then using the load sequences of the prediction time periods in the sequence samples as label data.
The historical load sequence samples may refer to load data generated by the machine within two years, which is arranged in time sequence (may refer to the historical load sequence in the prediction process), and if the time period required to be predicted is set to be 30 minutes according to the requirement, the "time" (which may be understood as each "time" in step S210) may be slid to the 30 th minute, then the load data of the previous 30 minutes and including the 30 th minute (which may be flexibly set according to the actual requirement) is intercepted as the fourth load sequence sample x ', and then the load data of the 30 minutes after the 30 th minute is intercepted as the target load sequence label of the prediction time period after the time, that is, the sequence sample (x', label) corresponding to the time is obtained. In this way, when the "time" is slid further to the 31 th minute, the load data of the previous 30 minutes is cut out as x ', and the load data of the 30 minutes after the time is cut out as label, so that one sequence sample (x ', label) is obtained again, and when the "time" is slid further in the same way, a plurality of sequence samples (x ', label) can be obtained. Label in these samples is available as label data, and x' can be trained as the above-mentioned x _ hist input model.
It should be understood that, here, the historical load sequence may be partitioned, then each sequence block is interpolated in the manner described in the above embodiment, and then a corresponding sequence sample is extracted for each sequence block, and then label in all obtained sequence samples is used as tag data, and x' in the sequence samples may be trained as the above x _ hist input model.
Then, corresponding similar load sequence samples can be found according to each sequence sample, for example, for each sequence sample, load data of the same time period (e.g. 30 minutes after the time corresponding to the sequence sample on the previous day) before the label of the sequence sample is obtained as a first load sequence sample, load data of the same time period (e.g. 30 minutes after the time corresponding to the sequence sample on the same day as the previous week) before the label of the sequence sample is obtained as a second load sequence sample, and a third load sequence sample with similarity to the label greater than the set value is obtained from the similar search space in the same manner as the above embodiment, for example, a load sequence of 720 minutes before the current time (label) and including the current time is subjected to similarity calculation with x in each of the similar search spaces, and then y in target sample data with similarity greater than the set value is found, this y is the third load sequence sample, and these three load sequence samples (the first load sequence sample, the second load sequence sample, and the third load sequence sample) can be combined into x _ future as the input of the model.
Of course, other external environment characteristics, such as weather values, temperature, etc., described in the above embodiments may also be incorporated into x _ hist and x _ future in the training process as inputs to the model, so that a plurality of training samples in the form of (x _ hist, x _ future, label) patterns may be obtained.
On the basis of the above embodiment, in order to make the machine learning model learn as much as possible to some urgent trend, after obtaining a plurality of sequence samples (x', label), a numerical value representing the degree of change of the load sequence (i.e., label) of the prediction period in each sequence sample may be obtained through calculation, wherein the larger the numerical value is, the larger the degree of change is, and then a target sequence sample with a value larger than a preset value is screened out, wherein the load sequence of the prediction period in the target sequence sample is used as the label data of the training sample.
For example, if 500 sequence samples (x ', label) are obtained, the extreme value or variance of each label is calculated to determine the degree of change of the label, for example, a label with an extreme value larger than a preset value or a variance larger than a preset value is selected, if the condition is met by 300 labels obtained through screening, 300 remaining screened sequence samples (x', label) are reserved as subsequent calculations, that is, similar load sequence samples corresponding to the 300 sequence samples are obtained and the 300 sequence samples are used as the input of the model, so that the machine learning model can be trained by using samples with a larger degree of change as much as possible, the change trend of the load sequence is better learned, and the training accuracy of the model is improved.
In other embodiments, the sequence samples may be sampled to screen the sequence samples, and since the sequence samples are constructed according to a frequency sliding time of 1 minute, there is a significant time overlap between consecutive sequence samples, and the change trend of the consecutive sequence samples is also steep, if the change trend of the sequence samples is urgent, the sequence samples may be sampled as much as possible, for example, one every 3 minutes, and conversely, if the change trend of the sequence samples is slow, the sequence samples may be sampled as little as possible, for example, one every 10 minutes.
For example, there are 500 sequence samples currently, the variance or extremum corresponding to each sequence sample is sequentially calculated, if the variances or extremums of the previous 10 consecutive sequence samples are greater than a preset value, the 1 st sequence sample, the 3 rd sequence sample, the 6 th sequence sample, and the 9 th sequence sample can be selected as target sequence samples, that is, these sequence samples are retained, and other sequence samples are discarded, and if it is determined that the extremum or variance of 20 consecutive sequence samples is less than or equal to the preset value, it is considered that the change of these sequence samples is relatively smooth, and 2 sequence samples can be selected as target sequence samples.
Or after obtaining the variance or the extremum of 500 sequence samples, screening out the sequence samples whose variance or extremum is greater than a preset value to obtain a first part of sequence samples, using the remaining sequence samples as a second part of sequence samples, then sorting the first part of sequence samples and the second part of sequence samples according to a time sequence, and respectively sampling the two part of sequence samples, for example, for the first part of sequence samples, 1 sequence sample can be sampled every other 3 sequence samples as a final target sequence sample, and for the second part of sequence samples, 1 sequence sample can be sampled every other 10 sequence samples as a final target sequence sample.
After the training samples are obtained, the training samples are input into an initial machine learning model, which may be an untrained machine learning model, and taking the machine learning model as a seq2seq model as an example, the initial machine learning model is divided into two stages, namely an encoder (coding) stage and a decoder (decoding), in an application scenario of the present application, the input of the encoder (coding) section may be the above-mentioned x _ hist, and the input of the decoder (decoding) section is the above-mentioned x _ future, and a schematic diagram of the initial machine learning model is shown in fig. 3.
Defining the loss function of the model as the loss of the model, defined as:
loss=mae(y_true,y_hat)+0.5*(1-cosine_similarity(y_true,y_hat));
wherein y _ tune represents a true value sequence (i.e., label data label), y _ hat represents a predicted value sequence (i.e., output of the model), mae () represents absolute error loss, and cosine _ similarity () represents pearson similarity loss, and the combination of the two represents that the predicted sequence is expected to gradually approach the true sequence in both value and trend as training progresses.
It should be noted that, in practical applications, other loss functions may also be used to calculate the loss value, such as mse, smape, and the like.
Therefore, the corresponding loss value can be calculated according to the loss function, the network parameters of the model are updated in the direction of reducing the loss value by using a back propagation algorithm, the training process is repeated until the set iteration number is reached or the loss value is smaller than the set value, which indicates that the training end condition is reached, a trained machine learning model is obtained, and the machine learning model can be used for predicting the load sequence.
In the implementation process, the machine learning model is trained by adopting four load sequence samples, so that the model can better learn the change trend of the load sequence, and the prediction precision is improved.
In addition, in the training process, due to the lack of the original data, the obtained training samples may not be comprehensive, for example, only the above-mentioned first load sequence sample and third load sequence sample, or only the second load sequence sample and third load sequence sample, or all the four load sequence samples may be obtained, and different training samples have an influence on the training precision of the model, so that different initial machine learning models may also be trained when the training samples are different, for example, when the training samples are the first load sequence sample and the third load sequence sample, the first seq2seq model may be trained to obtain the first seq2seq model, when the training samples are the second load sequence sample and the third load sequence sample, the second seq2seq model may be trained to obtain the second seq2seq model, according to this way, different training samples may be arbitrarily combined, and training to obtain various models. Therefore, when prediction is performed, data obtained according to an actual situation can be selected to be input into a corresponding model for prediction, and if the actually obtained similar load sequence comprises the first load sequence and the third load sequence, the similar load sequence is input into the first seq2seq model for prediction, so that different models can be adapted to different input data, and a prediction result is more accurate.
As shown in fig. 4, which is a schematic diagram of the training and prediction processes, both of the two processes need to obtain similar load sequence samples from similar search spaces to obtain sample data required by the two stages, and the data needs to be subjected to corresponding preprocessing, such as abnormal value and missing value processing, normalization, and the like.
The seq2seq model is trained and predicted by the model, and the result of the model has strong flexibility for characteristic input, so that external factors influencing the prediction result can be fully considered according to experience and data analysis to acquire useful information for prediction as much as possible and improve the prediction accuracy.
Referring to fig. 5, fig. 5 is a block diagram of a machine load prediction apparatus 300 according to an embodiment of the present disclosure, where the apparatus 300 may be a module, a program segment, or code on an electronic device. It should be understood that the apparatus 300 corresponds to the above-mentioned embodiment of the method of fig. 1, and can perform various steps related to the embodiment of the method of fig. 1, and the specific functions of the apparatus 300 can be referred to the above description, and the detailed description is appropriately omitted here to avoid redundancy.
Optionally, the apparatus 300 comprises:
a load sequence obtaining module 310, configured to obtain a similar load sequence corresponding to a machine in a target prediction time interval and a fourth load sequence before the target prediction time interval, where the similar load sequence includes at least one of a first load sequence of the machine in the same time interval one day before the target prediction time interval, a second load sequence of the machine in the same time interval one week before the target prediction time interval, and a third load sequence of which a similarity determined from a historical load sequence of the machine is greater than a set value;
and a load sequence prediction module 320, configured to input the similar load sequence and the fourth load sequence into corresponding machine learning models, and obtain, through prediction of the machine learning models, a load sequence corresponding to the target prediction time period.
Optionally, the apparatus 300 further comprises:
the external environment characteristic acquisition module is used for acquiring other external environment characteristics;
the load sequence prediction module 320 is configured to input the similar load sequence, the fourth load sequence, and the other external environment features into corresponding machine learning models, and obtain a load sequence corresponding to the target prediction time period through prediction of the machine learning models.
Optionally, a third load sequence with similarity greater than a set value is determined from the historical load sequences of the machine by:
acquiring a similar search space constructed according to the historical load sequence, wherein the similar search space comprises a plurality of sample data, and each sample data comprises a load sequence of a historical time period before a moment and a load sequence of a prediction time period after the moment;
acquiring a fifth load sequence before the target prediction time interval;
performing similarity matching on the fifth load sequence and the load sequence of the historical time period in each sample data in the similar search space to obtain the load sequence of the prediction time period in the target sample data with the similarity larger than a set value;
wherein, the load sequence of the prediction period in the target sample data is the third load sequence.
Optionally, the historical loading sequence is obtained by:
acquiring an initial historical load sequence;
determining whether the initial historical load sequence is continuous in time;
if not, acquiring the time length of the missing part, and judging whether the time length is greater than a set threshold value;
if the load sequence is larger than the set threshold, partitioning the initial historical load sequence to obtain a plurality of load sequence blocks;
and carrying out interpolation processing on each load sequence block to obtain temporally continuous load sequence blocks, wherein the historical load sequence comprises a plurality of temporally continuous load sequence blocks.
Optionally, if there are a plurality of target sample data, the apparatus 300 further includes:
the load weighting module is used for carrying out weighted summation on load sequences of prediction time periods in the target sample data to obtain a final load sequence; wherein the final load sequence is the third load sequence.
Optionally, the apparatus 300 further comprises:
a training module to:
obtaining training samples, wherein the training samples comprise similar load sequence samples corresponding to the machine at each moment and fourth load sequence samples before each moment, and the similar load sequence samples comprise at least one of first load sequence samples of the machine at the same time period one day before each moment, second load sequence samples of the machine at the same time period one week before each moment, and third load sequence samples of which the similarity determined from the historical load sequences of the machine is greater than a set value; the label data of the training samples comprise target load sequences of prediction periods after each moment;
inputting the training sample into an initial machine learning model to obtain the output of the initial machine learning model;
calculating a loss value according to the output and the label data;
updating the network parameters of the initial machine learning model according to the loss values, and obtaining a trained machine learning model when a training end condition is reached;
wherein corresponding machine learning models are obtained for different training samples.
Optionally, the label data of the training sample is obtained by:
obtaining a historical load sequence sample;
extracting a plurality of sequence samples in the historical load sequence samples, wherein each sequence sample comprises a load sequence of a historical time period before a moment and a load sequence of a prediction time period after the moment;
calculating and obtaining a numerical value representing the change degree of the load sequence of the prediction time interval in each sequence sample, wherein the larger the numerical value is, the larger the change degree is;
screening out a target sequence sample with the numerical value larger than a preset value, wherein the load sequence of the prediction time period in the target sequence sample is the label data of the training sample.
It should be noted that, for the convenience and brevity of description, the specific working procedure of the above-described apparatus may refer to the corresponding procedure in the foregoing method embodiment, and the description is not repeated herein.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device for executing a machine load prediction method according to an embodiment of the present disclosure, where the electronic device may include: at least one processor 410, such as a CPU, at least one communication interface 420, at least one memory 430, and at least one communication bus 440. Wherein the communication bus 440 is used to enable direct connection communication of these components. In this embodiment, the communication interface 420 of the device in this application is used for performing signaling or data communication with other node devices. The memory 430 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). The memory 430 may optionally be at least one memory device located remotely from the aforementioned processor. The memory 430 stores computer readable instructions, which when executed by the processor 410, cause the electronic device to perform the method processes described above with reference to fig. 1.
It will be appreciated that the configuration shown in fig. 6 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 6 or have a different configuration than shown in fig. 6. The components shown in fig. 6 may be implemented in hardware, software, or a combination thereof.
Embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, performs the method processes performed by an electronic device in the method embodiment shown in fig. 1.
The present embodiments disclose a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the methods provided by the above-described method embodiments, for example, comprising: acquiring a similar load sequence corresponding to a machine in a target prediction time interval and a fourth load sequence before the target prediction time interval, wherein the similar load sequence comprises at least one of a first load sequence of the machine in the same time interval one day before the target prediction time interval, a second load sequence of the machine in the same time interval one week before the target prediction time interval, and a third load sequence with the similarity degree determined from the historical load sequences of the machine being greater than a set value; and inputting the similar load sequence and the fourth load sequence into corresponding machine learning models, and predicting and obtaining the load sequence corresponding to the target prediction time period through the machine learning models.
In summary, the embodiments of the present application provide a method, an apparatus, an electronic device, and a readable storage medium for predicting a machine load, where the method obtains a similar load sequence corresponding to a target prediction time period of a machine and a fourth load sequence before the target prediction time period, where the similar load sequence has a greater similarity with a to-be-predicted sequence (a load sequence corresponding to the target prediction time period) in time, a numerical value, and a distribution trend, and can reflect regularity and periodicity of load changes, so that the similar load sequence and the fourth load sequence are input into a corresponding machine learning model for prediction, so that the model can adaptively learn and extract a similarity rule of load changes, and further predict to obtain a more accurate load sequence.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for predicting a load on a machine, the method comprising:
acquiring a similar load sequence corresponding to a machine in a target prediction time interval and a fourth load sequence before the target prediction time interval, wherein the similar load sequence comprises at least one of a first load sequence of the machine in the same time interval one day before the target prediction time interval, a second load sequence of the machine in the same time interval one week before the target prediction time interval, and a third load sequence with the similarity degree determined from the historical load sequences of the machine being greater than a set value;
and inputting the similar load sequence and the fourth load sequence into corresponding machine learning models, and predicting and obtaining the load sequence corresponding to the target prediction time period through the machine learning models.
2. The method of claim 1, further comprising:
acquiring other external environment characteristics;
the inputting the similar load sequence and the fourth load sequence into corresponding machine learning models, and obtaining the load sequence corresponding to the target prediction time period through prediction of the machine learning models includes:
and inputting the similar load sequence, the fourth load sequence and the other external environment features into corresponding machine learning models, and predicting and obtaining the load sequence corresponding to the target prediction time period through the machine learning models.
3. The method of claim 1, wherein the third load sequence with a similarity greater than a set value is determined from the historical load sequences of the machine by:
acquiring a similar search space constructed according to the historical load sequence, wherein the similar search space comprises a plurality of sample data, and each sample data comprises a load sequence of a historical time period before a moment and a load sequence of a prediction time period after the moment;
acquiring a fifth load sequence before the target prediction time interval;
performing similarity matching on the fifth load sequence and the load sequence of the historical time period in each sample data in the similar search space to obtain the load sequence of the prediction time period in the target sample data with the similarity larger than a set value;
wherein, the load sequence of the prediction period in the target sample data is the third load sequence.
4. The method of claim 3, wherein the historical load sequence is obtained by:
acquiring an initial historical load sequence;
determining whether the initial historical load sequence is continuous in time;
if not, acquiring the time length of the missing part, and judging whether the time length is greater than a set threshold value;
if the load sequence is larger than the set threshold, partitioning the initial historical load sequence to obtain a plurality of load sequence blocks;
and carrying out interpolation processing on each load sequence block to obtain temporally continuous load sequence blocks, wherein the historical load sequence comprises a plurality of temporally continuous load sequence blocks.
5. The method of claim 3, wherein if there are more target sample data, further comprising:
weighting and summing the load sequences of the prediction time periods in the target sample data to obtain a final load sequence;
wherein the final load sequence is the third load sequence.
6. The method of any of claims 1-5, wherein the machine learning model is trained by:
obtaining training samples, wherein the training samples comprise similar load sequence samples corresponding to the machine at each moment and fourth load sequence samples before each moment, and the similar load sequence samples comprise at least one of first load sequence samples of the machine at the same time period one day before each moment, second load sequence samples of the machine at the same time period one week before each moment, and third load sequence samples of which the similarity determined from the historical load sequences of the machine is greater than a set value; the label data of the training samples comprise target load sequences of prediction periods after each moment;
inputting the training sample into an initial machine learning model to obtain the output of the initial machine learning model;
calculating a loss value according to the output and the label data;
updating the network parameters of the initial machine learning model according to the loss values, and obtaining a trained machine learning model when a training end condition is reached;
wherein corresponding machine learning models are obtained for different training samples.
7. The method of claim 6, wherein the label data of the training sample is obtained by:
obtaining a historical load sequence sample;
extracting a plurality of sequence samples in the historical load sequence samples, wherein each sequence sample comprises a load sequence of a historical time period before a moment and a load sequence of a prediction time period after the moment;
calculating and obtaining a numerical value representing the change degree of the load sequence of the prediction time interval in each sequence sample, wherein the larger the numerical value is, the larger the change degree is;
screening out a target sequence sample with the numerical value larger than a preset value, wherein the load sequence of the prediction time period in the target sequence sample is the label data of the training sample.
8. A machine load prediction apparatus, the apparatus comprising:
the load sequence acquisition module is used for acquiring a similar load sequence corresponding to a machine in a target prediction time interval and a fourth load sequence before the target prediction time interval, wherein the similar load sequence comprises at least one of a first load sequence of the machine in the same time interval one day before the target prediction time interval, a second load sequence of the machine in the same time interval one week before the target prediction time interval, and a third load sequence of which the similarity determined from the historical load sequences of the machine is greater than a set value;
and the load sequence prediction module is used for inputting the similar load sequence and the fourth load sequence into corresponding machine learning models and predicting and obtaining the load sequence corresponding to the target prediction time period through the machine learning models.
9. An electronic device comprising a processor and a memory, the memory storing computer readable instructions that, when executed by the processor, perform the method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202110968976.8A 2021-08-23 2021-08-23 Machine load prediction method and device, electronic equipment and readable storage medium Pending CN113672666A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110968976.8A CN113672666A (en) 2021-08-23 2021-08-23 Machine load prediction method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110968976.8A CN113672666A (en) 2021-08-23 2021-08-23 Machine load prediction method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113672666A true CN113672666A (en) 2021-11-19

Family

ID=78545280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110968976.8A Pending CN113672666A (en) 2021-08-23 2021-08-23 Machine load prediction method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113672666A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114386454A (en) * 2021-12-09 2022-04-22 首都医科大学附属北京友谊医院 Medical time sequence signal data processing method based on signal mixing strategy
WO2024001867A1 (en) * 2022-06-27 2024-01-04 中兴通讯股份有限公司 Communication load prediction method, and computer-readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930347A (en) * 2012-10-15 2013-02-13 河海大学 Method for forecasting short term load under demand response
CN103336891A (en) * 2013-06-09 2013-10-02 广东电网公司佛山供电局 Pseudo-measurement generation method applied to estimating condition of distribution network
CN105913175A (en) * 2016-04-07 2016-08-31 哈尔滨理工大学 Intelligent power grid short period load prediction method based on improved nerve network algorithm
CN107609716A (en) * 2017-10-12 2018-01-19 华中科技大学 A kind of power station load setting Forecasting Methodology
JP2018063574A (en) * 2016-10-13 2018-04-19 アズビル株式会社 Trend predicting device and load predicting device
CN112465250A (en) * 2020-12-08 2021-03-09 深圳供电局有限公司 Power load prediction method, power load prediction device, computer equipment and storage medium
CN112614006A (en) * 2020-11-30 2021-04-06 国网北京市电力公司 Load prediction method, device, computer readable storage medium and processor

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930347A (en) * 2012-10-15 2013-02-13 河海大学 Method for forecasting short term load under demand response
CN103336891A (en) * 2013-06-09 2013-10-02 广东电网公司佛山供电局 Pseudo-measurement generation method applied to estimating condition of distribution network
CN105913175A (en) * 2016-04-07 2016-08-31 哈尔滨理工大学 Intelligent power grid short period load prediction method based on improved nerve network algorithm
JP2018063574A (en) * 2016-10-13 2018-04-19 アズビル株式会社 Trend predicting device and load predicting device
CN107609716A (en) * 2017-10-12 2018-01-19 华中科技大学 A kind of power station load setting Forecasting Methodology
CN112614006A (en) * 2020-11-30 2021-04-06 国网北京市电力公司 Load prediction method, device, computer readable storage medium and processor
CN112465250A (en) * 2020-12-08 2021-03-09 深圳供电局有限公司 Power load prediction method, power load prediction device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
丁伟 等: "一种基于HMF的火电机组短期负荷预测方法" *
张思远 等: "基于相似时间序列检索的超短期负荷预测" *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114386454A (en) * 2021-12-09 2022-04-22 首都医科大学附属北京友谊医院 Medical time sequence signal data processing method based on signal mixing strategy
CN114386454B (en) * 2021-12-09 2023-02-03 首都医科大学附属北京友谊医院 Medical time sequence signal data processing method based on signal mixing strategy
WO2024001867A1 (en) * 2022-06-27 2024-01-04 中兴通讯股份有限公司 Communication load prediction method, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN111950793A (en) Comprehensive energy system load prediction method considering multivariate load coupling characteristics
CN113672666A (en) Machine load prediction method and device, electronic equipment and readable storage medium
US20170131435A1 (en) Localized weather prediction
CN111950805B (en) Medium-and-long-term power load prediction method and device, computer equipment and storage medium
CN113988477A (en) Photovoltaic power short-term prediction method and device based on machine learning and storage medium
Junior et al. Optimized hybrid ensemble learning approaches applied to very short-term load forecasting
CN116822997B (en) Real-time carbon emission accounting method and device considering green power
CN116663746A (en) Power load prediction method and device, computer equipment and storage medium
CN114330934A (en) Model parameter self-adaptive GRU new energy short-term power generation power prediction method
CN117494906B (en) Natural gas daily load prediction method based on multivariate time series
JP2023100466A (en) Power demand prediction device and power demand prediction method
Sun et al. Short-term power load prediction based on VMD-SG-LSTM
CN113657936A (en) Power load prediction method and terminal
CN116979503A (en) Commercial building load prediction method and system based on Informir network
Guan et al. Advanced load forecast with hierarchical forecasting capability
CN111737240B (en) Method and device for judging energy consumption attribution date and storage medium
Muschinski et al. Predicting power ramps from joint distributions of future wind speeds
Pesantez et al. A comparison study of predictive models for electricity demand in a diverse urban environment
Zhu et al. eForecaster: Unifying electricity forecasting with robust, flexible, and explainable machine learning algorithms
CN117808500A (en) Short-term electricity price prediction method and system for electric power market
MANUSOV et al. Analysis of electricity consumption forecasting methods for the coal industry.
CN117748500B (en) Photovoltaic power prediction method, device, equipment and medium
Svoboda et al. Data-driven multi-step energy consumption forecasting with complex seasonality patterns and exogenous variables: Model accuracy assessment in change point neighborhoods
CN117856240A (en) Power grid load prediction method and system based on multi-source data fusion
Walker et al. Verification and validation of developed short-term forecasting models

Legal Events

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

Application publication date: 20211119

RJ01 Rejection of invention patent application after publication