Method, device, terminal equipment and medium for predicting resource usage of periodic variation
By classifying and modeling the resource usage historical data in time periods, the problem of low accuracy of resource usage prediction is solved, and more accurate resource usage prediction is achieved to meet actual allocation needs.
Patent Information
- Application Number
- CN202310011745.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-05
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2043-01-05
AI Technical Summary
The existing resource usage prediction methods are relatively low in accuracy, especially during the time period between the low peak and the peak period, which leads to resource allocation relying on manual experience and resource waste.
By obtaining the historical overall parameter data of resource usage and historical period parameter characteristic data, classifying it according to time periods, using the parameter prediction model and combining the model to process the data of different time periods, the overall resource usage and hourly resource usage prediction values for the day to be tested are obtained.
The accuracy of resource usage prediction is improved, and the differences and influencing factors in different time periods are taken into account, which enhances the prediction accuracy of hourly resource usage.
Smart Images

Figure CN116227681B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of periodic resource usage prediction, and in particular relates to a periodic resource usage prediction method, apparatus, terminal equipment, and medium. Background Art
[0002] Resource usage (water and electricity consumption) prediction is a prerequisite for achieving optimal resource scheduling. Currently, most resource allocation schemes are based on relatively rough regression prediction models or no prediction models. This results in resource allocation mostly relying on manual experience, which is relatively blind and leads to resource waste.
[0003] Residential water and electricity consumption are easily affected by many factors, such as season, weather, temperature, holidays, local economic development level, etc. These factors often cause large fluctuations in resource usage in the short term, especially in the period between low and peak periods, which makes it impossible to accurately predict.
[0004] Research has found that residents' water and electricity usage habits exhibit a certain degree of cyclicality, which in turn leads to a certain degree of cyclicality in their corresponding water and electricity consumption. This provides a new approach to resource usage forecasting. Therefore, predicting resource usage based on the characteristics of cyclical changes in resource usage, thereby achieving efficient resource allocation, has become an effective solution. However, current methods for predicting cyclical resource usage have low accuracy. Summary of the Invention
[0005] The embodiments of the present application provide a method, apparatus, terminal device, and medium for predicting the usage of resources that vary quasi-periodically, which can solve the problem of low accuracy of methods for predicting the usage of resources that vary quasi-periodically.
[0006] In a first aspect, an embodiment of the present application provides a method for predicting resource usage of a quasi-periodic variation, including:
[0007] Obtain historical overall parameter data of resource usage and historical period parameter characteristic data of resource usage; the historical overall parameter data of resource usage includes multiple groups of operating parameter sets and the historical daily overall resource usage corresponding to each group of operating parameter sets; the historical period parameter characteristic data of resource usage includes multiple groups of historical hourly resource usage proportion characteristic values;
[0008] Classify the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage according to time periods to obtain the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage for different time periods; different time periods include weekdays, weekends and holidays;
[0009] The parameter prediction model is used to process the historical overall parameter data of resource usage in different time periods and the historical period parameter characteristic data of resource usage in different time periods to obtain the overall resource usage forecast value of the test day and the characteristic forecast value of the hourly resource usage ratio of the test day;
[0010] The predicted value of the overall resource usage of the day to be measured and the predicted value of the hourly resource usage ratio characteristic of the day to be measured are processed using the pre-defined parameters combined with the model to obtain the predicted value of the hourly resource usage of the day to be measured.
[0011] Optionally, obtain parameter characteristic data of resource usage over historical periods, including:
[0012] By calculating the formula Get the parameter characteristics of a resource usage history period Among them, y i represents the resource usage in the i-th hour of the k-th day in history, x k represents the total daily resource usage on the kth day in history, i = 1, 2, ..., I, I represents the number of characteristic values of each group of historical hourly resource usage ratios, k = 1, 2, ..., K, K represents the total number of groups of operating parameters;
[0013] The resource usage ratio characteristic values of multiple hours corresponding to the kth historical day are used as a set of resource usage historical period parameter characteristics, and all K groups of resource usage historical period parameter characteristics are used as resource usage historical period parameter characteristic data.
[0014] Optionally, a parameter prediction model is used to process the historical overall parameter data of resource usage in different time periods and the historical period parameter characteristic data of resource usage in different time periods to obtain the overall resource usage forecast value of the test day and the characteristic forecast value of the hourly resource usage ratio of the test day, including:
[0015] Selecting resource usage historical overall parameter data outside a preset historical time period from resource usage historical overall parameter data of different time periods, and training a parameter prediction model using the selected resource usage historical overall parameter data to obtain a first parameter prediction model;
[0016] Selecting resource usage historical period parameter characteristic data outside a preset historical time period from the resource usage historical period parameter characteristic data of different time periods, and using the selected resource usage historical period parameter characteristic data to train a parameter prediction model to obtain a second parameter prediction model;
[0017] Use the first parameter prediction model to predict the historical overall parameter data of resource usage within the preset historical time period to obtain the overall resource usage prediction value for the day to be measured
[0018] Input the historical period parameter characteristic data of resource usage in the preset historical time period into the second parameter prediction model to obtain the characteristic prediction value of the resource usage ratio of the day and hour to be measured Indicates the predicted value of the resource usage ratio in the i-th hour of the test day.
[0019] Optionally, before using the parameter prediction model to process the historical overall parameter data of resource usage in different time periods and the historical period parameter characteristic data of resource usage in different time periods to obtain the predicted value of the overall resource usage for the day to be measured and the predicted value of the characteristic of the hourly resource usage ratio for the day to be measured, the quasi-cycle-varying resource usage prediction provided by the present application further includes:
[0020] Normalize the historical overall parameter data of resource usage in different time periods.
[0021] Optionally, the predicted value of the total resource usage for the day to be measured and the predicted value of the hourly resource usage ratio for the day to be measured are processed using predefined parameters combined with the model to obtain the predicted value of the hourly resource usage for the day to be measured, including:
[0022] By calculating the formula Get the predicted value of resource usage per day and hour to be measured in, It represents the resource usage forecast value of the i-th hour on the day to be measured, Indicates the predicted value of the resource usage ratio of the day and hour to be measured, Indicates the predicted value of overall resource usage on the day to be measured.
[0023] In a second aspect, an embodiment of the present application provides a device for predicting resource usage of a quasi-periodic variation, including:
[0024] The acquisition module is used to obtain the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage; the historical overall parameter data of resource usage includes multiple groups of operating parameter sets and the historical daily overall resource usage corresponding to each group of operating parameter sets, and the historical period parameter characteristic data of resource usage includes multiple groups of historical hourly resource usage proportion characteristic values.
[0025] The classification module is used to classify the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage according to time periods, and obtain the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage in different time periods; different time periods include weekdays, weekends and holidays.
[0026] The neural network module is used to use the parameter prediction model to process the historical overall parameter data of resource usage in different time periods and the historical period parameter characteristic data of resource usage in different time periods, and obtain the overall resource usage prediction value of the day to be measured and the characteristic prediction value of the hourly resource usage ratio of the day to be measured.
[0027] The prediction module is used to process the predicted value of the overall resource usage of the day to be measured and the predicted value of the hourly resource usage ratio characteristic of the day to be measured using pre-defined parameters combined with the model to obtain the predicted value of the hourly resource usage of the day to be measured.
[0028] In a third aspect, an embodiment of the present application provides a terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned method for predicting the usage of resources subject to periodic changes is implemented.
[0029] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for predicting the usage of resources with cyclical variations is implemented.
[0030] The above solution of the present application has the following beneficial effects:
[0031] In some embodiments of the present application, by classifying the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage according to time periods, the differences in the periodic changes in resource usage in different time periods are taken into account, and the accuracy of resource usage prediction can be improved; when predicting hourly resource usage, the overall resource usage prediction value and the hourly resource usage proportion characteristic prediction value are combined, and the resource usage influencing factors considered are more comprehensive, thereby improving the accuracy of resource usage prediction.
[0032] Other beneficial effects of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0034] Figure 1 A flowchart of a method for predicting resource usage of periodic variation provided in one embodiment of the present application;
[0035] Figure 2 A schematic diagram showing a comparison between the predicted value of the total flow rate on the day to be measured and the actual value of the total flow rate on the day to be measured provided in one embodiment of the present application;
[0036] Figure 3 A schematic diagram showing a comparison between a predicted value of the hourly flow rate ratio to be measured and an actual value of the hourly flow rate ratio to be measured provided in an embodiment of the present application;
[0037] Figure 4 A comparison chart of the predicted hourly water flow rate of the target research pump station on the day to be measured and the actual hourly water flow rate on that day provided in one embodiment of the present application;
[0038] Figure 5 A schematic diagram showing the error between the predicted hourly water flow rate of a target research pump station on a test day and the actual hourly water flow rate on that day provided in one embodiment of the present application;
[0039] Figure 6 A schematic diagram of the structure of a device for predicting resource usage of periodic variation provided in one embodiment of the present application;
[0040] Figure 7 A schematic diagram of the structure of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0041] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0042] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0043] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0044] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0045] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0046] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0047] In response to the problem of low accuracy of current methods for predicting resource usage that changes periodically, the present application provides a method for predicting resource usage that changes periodically. By classifying the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage according to time periods, the differences in resource usage that changes periodically in different time periods are taken into account, thereby improving the accuracy of resource usage prediction. When predicting hourly resource usage, the overall resource usage prediction value and the hourly resource usage proportion characteristic prediction value are combined, and the resource usage influencing factors considered are more comprehensive, thereby improving the accuracy of resource usage prediction.
[0048] For the sake of ease of explanation, water consumption is selected to illustrate the method for predicting the usage of periodically changing resources provided in this application. It can be understood that the embodiments provided in this application can also be applied to the prediction of the usage of other periodically changing resources, such as the prediction of electricity consumption.
[0049] like Figure 1 As shown, the method for predicting resource usage of periodic changes provided by this application mainly includes the following steps:
[0050] Step 11: Obtain historical overall parameter data of resource usage and historical period parameter characteristic data of resource usage.
[0051] The above-mentioned historical overall parameter data of resource usage includes multiple sets of operating parameter sets and the overall resource usage of a historical day corresponding to each set of operating parameter sets. Among them, the operating parameters include maximum temperature (°C), minimum temperature (°C), average temperature (°C), etc.
[0052] The specific process of obtaining the characteristic data of resource usage parameters in the historical period is as follows:
[0053] Step a, calculate the formula Get the parameter characteristics of a resource usage history period Among them, y i represents the resource usage in the i-th hour of the k-th day in history, x k represents the total daily resource usage on the kth historical day, i = 1, 2, ..., I, I represents the number of characteristic values of each group of historical hourly resource usage proportions, and k = 1, 2, ..., K, K represents the total number of groups of operating parameters.
[0054] In step b, the resource usage ratio characteristic values of multiple hours corresponding to the kth historical day are used as a set of resource usage historical period parameter characteristics, and all K groups of resource usage historical period parameter characteristics are used as resource usage historical period parameter characteristic data.
[0055] Taking water consumption as an example, the historical overall parameter data of resource consumption can be expressed as {(maximum temperature: 33℃, minimum temperature: 18℃, average temperature: 22℃, daily total resource consumption: 10m 3 ), (maximum temperature: 30℃, minimum temperature: 10℃, average temperature: 20℃, daily total resource usage: 8m 3 ), (maximum temperature: 10℃, minimum temperature: 1℃, average temperature: 5℃, daily total resource usage: 3m 3 )}; The operating parameter set is the input data of the subsequent parameter prediction model, and the daily total resource usage is the model label, which is used to judge the quality of the parameter prediction model training effect. The parameter feature data of the resource usage history period can be expressed as { }.
[0056] It should be noted that the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage are one-to-one corresponding, that is, each set of historical period parameter characteristic data of resource usage corresponds to a set of historical overall parameter data of resource usage.
[0057] Step 12: classify the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage according to time periods to obtain the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage in different time periods.
[0058] The above-mentioned different time periods include holidays, weekends and weekdays. In some embodiments of the present application, when holidays and weekends overlap, holiday classification is given priority.
[0059] Taking water consumption as an example, the historical overall parameter data of resource consumption after time period classification can be expressed as {(maximum temperature: 33℃, minimum temperature: 18℃, average temperature: 22℃, daily total resource consumption: 10m 3, time period: weekend of June 20), (maximum temperature: 30℃, minimum temperature: 10℃, average temperature: 20℃, total daily resource usage: 8m 3 , time period: working day on June 21), (maximum temperature: 10℃, minimum temperature: 1℃, average temperature: 5℃, total daily resource usage: 3m 3 , time period: working day on June 22)}; the resource usage historical period parameter characteristic data after time period classification can be expressed as {( Time period: weekend of June 20), ( Time period: working day on June 21), ( Time period: working day on June 22)}.
[0060] It is worth mentioning that the classification here is based on time periods, which takes into account the differences in resource usage in different time periods and can improve the accuracy of resource usage prediction.
[0061] Step 13: Use the parameter prediction model to process the historical overall parameter data of resource usage in different time periods and the historical period parameter characteristic data of resource usage in different time periods to obtain the overall resource usage prediction value of the day to be measured and the characteristic prediction value of the hourly resource usage ratio of the day to be measured.
[0062] In some embodiments of the present application, the parameter prediction model may be a bidirectional long short-term memory network model (BiLSTM, Bi-directional Long Short-Term Memory) model, which may process data bidirectionally and may better process information before and after the data.
[0063] Since the physical dimensions of the operating parameters used as input data for the parameter prediction model are different, and the range of variation of the values of different operating parameters varies greatly, if the operating parameters are not processed, it is inevitable that the absolute error of the output components obtained after the parameter prediction model processing of the operating parameters with large values will be large, and the absolute error of the output components with small values will be small, which is not conducive to the prediction of resource usage. Therefore, before executing step 13, the operating parameter set in the overall parameter data of the resource usage history needs to be normalized.
[0064] Specifically, by calculating the formula
[0065]
[0066] Normalize each set of operating parameters; where x j represents the jth set of operating parameters, x min represents the minimum value of the jth group of operating parameters under all working conditions, x maxIt represents the maximum value of the jth operating parameter set under all working conditions.
[0067] Step 14 , using predefined parameters combined with the model to process the predicted value of the total resource usage for the day to be measured and the predicted value of the hourly resource usage ratio characteristic for the day to be measured, to obtain the predicted value of the hourly resource usage for the day to be measured.
[0068] It is worth mentioning that the overall resource usage forecast value and the hourly resource usage ratio characteristic forecast value are combined here, which takes into account more comprehensive factors affecting resource usage and improves the accuracy of resource usage forecast.
[0069] It can be seen from the above steps that the method for predicting cyclically changing resource usage provided in this application classifies the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage according to time periods, taking into account the differences in cyclically changing resource usage in different time periods, thereby improving the accuracy of resource usage prediction; when predicting hourly resource usage, it combines the overall resource usage prediction value and the hourly resource usage proportion characteristic prediction value, and considers the resource usage influencing factors more comprehensively, thereby improving the accuracy of resource usage prediction.
[0070] The following is an example explanation of the specific process of step 13 (using the parameter prediction model to process the historical overall parameter data of resource usage in different time periods and the historical period parameter characteristic data of resource usage in different time periods to obtain the overall resource usage prediction value of the day to be measured and the characteristic prediction value of the hourly resource usage ratio of the day to be measured).
[0071] Step 13.1, selecting historical overall parameter data of resource usage outside a preset historical time period from the historical overall parameter data of resource usage in different time periods, and using the selected historical overall parameter data of resource usage to train a parameter prediction model to obtain a first parameter prediction model.
[0072] The above-mentioned preset historical time period represents a pre-set period of time. In some embodiments of the present application, the preset historical time period may be ten days before the day to be measured.
[0073] In some embodiments of the present application, when training the parameter prediction model, an adaptive moment estimation (Adam) optimizer is used to optimize the parameter prediction model. The Adam optimizer will comprehensively consider the first-order matrix estimation and the second-order matrix estimation of the gradient and calculate the update step size. In each training of the model, the Adam optimizer will automatically update the learning rate of the model. Specifically, first determine the initial learning rate lr, the first-order matrix estimation m, the second-order matrix estimation v, the smoothing constants β1, β2 (used to smooth m and v), then initialize the learning parameter θ0, and set m0=0, v0=0, t=0, and then set the number of iterations c. When t=m, stop the iteration and update the number of training times to t=t+1. Then calculate the gradient g t , and then calculate the cumulative gradient: m t =β1*m t-1 +(1-β1)*g t And the squared gradient: v t =β2*v t-1 +(1-β2)*(g t ) 2 , and then perform bias correction on m and v: Finally update the learning rate: Among them, θ t is the current learning rate; θ t-1 is the learning rate at the previous moment; is the cumulative gradient deviation correction value; is the cumulative gradient square deviation correction value; ∈ is the anti-zero constant to prevent the denominator from being zero; l is the learning rate.
[0074] In some embodiments of the present application, the corresponding values of the parameters when the Adam optimizer achieves the best optimization effect are shown in the following table:
[0075]
[0076] It's worth noting that in the original prediction model, the learning rate is constant. However, in practice, the learning rate significantly affects the convergence speed. Therefore, using the Adam optimizer to adjust the learning rate in real time can significantly improve the convergence rate. It calculates the exponential moving average of the gradient and the squared gradient, and the parameters β1 and β2 control the moving average decay rate to correct for deviations and obtain the updated learning rate. This allows the learning rate to adapt to the model training requirements, increasing the learning rate when a larger learning rate is required and decreasing it when a smaller learning rate is required.
[0077] Step 13.2: Select resource usage historical period parameter characteristic data outside the preset historical time period from the resource usage historical period parameter characteristic data of different time periods, and use the selected resource usage historical period parameter characteristic data to train the parameter prediction model to obtain a second parameter prediction model.
[0078] In this step, the Adam optimizer is also used to optimize the parameter prediction model. The specific steps are the same as above.
[0079] In some embodiments of the present application, the corresponding values of the parameters when the Adam optimizer achieves the best optimization effect are shown in the following table:
[0080]
[0081] Step 13.3: The first parameter prediction model is used to predict the overall parameter data of resource usage in the preset historical time period to obtain the predicted value of the overall resource usage on the day to be measured.
[0082] Step 13.4: Input the historical period parameter characteristic data of resource usage in the preset historical time period into the second parameter prediction model to obtain the characteristic prediction value of the resource usage ratio of the day and hour to be measured.
[0083] The specific process of step 14 (processing the predicted value of the overall resource usage for the day to be measured and the predicted value of the hourly resource usage ratio characteristic for the day to be measured using predefined parameters in combination with the model to obtain the predicted value of the hourly resource usage for the day to be measured) is exemplified below.
[0084] Specifically, by calculating the formula Get the predicted value of resource usage per day and hour to be measured in, It represents the resource usage forecast value of the i-th hour on the day to be measured, Indicates the predicted value of the resource usage ratio of the day and hour to be measured, Indicates the predicted value of overall resource usage on the day to be measured.
[0085] The following is an illustrative description of the resource usage prediction of periodic changes provided by this application in conjunction with specific embodiments.
[0086] In this embodiment, water consumption is used as the predicted cyclically varying resource consumption.
[0087] A total of 125 sets of data were collected, including historical main pipe water discharge data, maximum temperature data, minimum temperature data, average temperature data, wind speed data, and wind direction data after the target research pump station was merged. Among them, 115 sets were used as parameter prediction model training sets, and 10 sets (data from ten days before the test day) were used as parameter prediction model sample sets. The output of the parameter prediction model is the predicted value of the overall flow of the pump station on the test day. The BiLSTM network model was trained using the training samples to obtain the first parameter prediction model. The sample set was input into the first parameter prediction model to obtain the predicted value of the overall flow on the test day. The predicted value of the overall flow on the test day was compared with the actual value of the overall flow on the test day. Figure 2 As shown, Figure 2 The vertical axis represents the flow rate (m3).
[0088] The historical hourly flow ratio values of the target research pump station after the merger were collected, with a total of 125 groups of data, 24 data in each group, of which 115 groups were used as the training set of the hourly flow period parameter characteristic value prediction model, and 10 groups were used as the sample set. The output of the parameter prediction model is the hourly flow ratio prediction value of the pump station main. The BiLSTM network model was trained using the training samples to obtain the second parameter prediction model. The sample set was input into the second parameter prediction model to obtain the hourly flow ratio prediction value of the test day. The hourly flow ratio prediction value has 24 hourly flow ratio prediction values, corresponding to 24 hours a day. The hourly flow ratio prediction value of the test day is compared with the actual value of the hourly flow ratio of the test day. Figure 3 As shown, Figure 3 The vertical axis represents the ratio, and the horizontal axis represents the unit time (hour).
[0089] The predicted value of the total flow rate on the day to be measured and the predicted value of the hourly flow rate on the day to be measured are combined with the model to obtain the predicted value of the hourly flow rate on the day to be measured for the target research pump station. The comparison between the predicted value of the hourly water flow rate on the day to be measured for the target research pump station and the actual value of the hourly water flow rate on that day is as follows: Figure 4 As shown, Figure 4 The horizontal axis represents the unit time (hours), and the vertical axis represents the water flow (m 3 The error between the predicted hourly water flow rate of the target pump station on the day to be measured and the actual hourly water flow rate on that day is as follows: Figure 5 As shown, Figure 5 The horizontal axis represents the unit time (hours), and the vertical axis represents the absolute value of the actual water flow minus the predicted water flow (m 3 ).Depend on Figure 4 and Figure 5 It can be seen that the method for predicting resource usage with cyclical changes provided in this application has high accuracy and meets the actual resource allocation needs.
[0090] The following is an illustrative description of the periodic resource usage prediction device provided by the present application in conjunction with specific embodiments.
[0091] like Figure 6 As shown, an embodiment of the present application provides a device for predicting the usage of periodic-varying resources. The device 600 includes:
[0092] Acquisition module 601 is used to obtain historical overall parameter data of resource usage and historical period parameter characteristic data of resource usage; the historical overall parameter data of resource usage includes multiple groups of operating parameter sets and the historical daily overall resource usage corresponding to each group of operating parameter sets, and the historical period parameter characteristic data of resource usage includes multiple groups of historical hourly resource usage proportion characteristic values.
[0093] The classification module 602 is used to classify the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage according to time periods to obtain the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage in different time periods; time periods include weekdays, weekends and holidays.
[0094] The neural network module 603 is used to use the parameter prediction model to process the historical overall parameter data of resource usage in different time periods and the historical period parameter characteristic data of resource usage in different time periods to obtain the overall resource usage prediction value of the day to be measured and the characteristic prediction value of the hourly resource usage ratio of the day to be measured.
[0095] The prediction module 604 is used to process the predicted value of the total resource usage of the day to be measured and the predicted value of the hourly resource usage ratio characteristics of the day to be measured using predefined parameters combined with the model to obtain the predicted value of the hourly resource usage of the day to be measured.
[0096] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0097] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0098] like Figure 7 As shown, an embodiment of the present application provides a terminal device, and the terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 7 Only one processor is shown in the figure), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, wherein the processor D100 implements the steps of any of the above method embodiments when executing the computer program D102.
[0099] Specifically, when the processor D100 executes the computer program D102, it obtains the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage, and then classifies the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage according to time periods to obtain the historical overall parameter data of resource usage in different time periods and the historical period parameter characteristic data of resource usage in different time periods. Then, the parameter prediction model is used to process the historical overall parameter data of resource usage in different time periods and the historical period parameter characteristic data of resource usage in different time periods respectively to obtain the overall resource usage forecast value of the day to be measured and the characteristic forecast value of the hourly resource usage proportion of the day to be measured. Finally, the pre-defined parameter combination model is used to process the overall resource usage forecast value of the day to be measured and the characteristic forecast value of the hourly resource usage proportion of the day to be measured to obtain the hourly resource usage forecast value of the day to be measured. Among them, by classifying the historical overall parameter data of resource usage and the historical period parameter characteristic data of resource usage according to time periods, the differences in resource usage in different time periods are taken into account, which can improve the accuracy of resource usage prediction; when predicting hourly resource usage, the overall resource usage prediction value and the hourly resource usage proportion characteristic prediction value are combined, and the resource usage influencing factors considered are more comprehensive, thereby improving the accuracy of resource usage prediction.
[0100] The processor D100 may be a central processing unit (CPU), or may be another general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor.
[0101] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk, a smart memory card (SMC, SmartMedia Card), a secure digital (SD, Secure Digital) card, a flash card, etc. equipped on the terminal device D10. Furthermore, the memory D101 may also include both an internal storage unit of the terminal device D10 and an external storage device. The memory D101 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory D101 may also be used to temporarily store data that has been output or is to be output.
[0102] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented.
[0103] An embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0104] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the cyclical resource usage prediction device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, a computer-readable medium cannot be an electric carrier signal or a telecommunication signal.
[0105] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0106] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for predicting resource usage of quasi-cyclical changes, characterized in that: include: Obtain historical overall parameter data of resource usage and historical period parameter characteristic data of resource usage; The resource usage historical overall parameter data includes multiple groups of operating parameter sets and the historical daily overall resource usage corresponding to each group of operating parameter sets, and the resource usage historical period parameter characteristic data includes multiple groups of historical hourly resource usage proportion characteristic values; Classifying the resource usage history overall parameter data and the resource usage history period parameter characteristic data according to time periods to obtain resource usage history overall parameter data and resource usage history period parameter characteristic data for different time periods; the different time periods include weekdays, weekends, and holidays; The parameter prediction model is used to process the historical overall parameter data of resource usage in different time periods and the historical period parameter characteristic data of resource usage in different time periods respectively to obtain the overall resource usage prediction value of the day to be measured and the characteristic prediction value of the hourly resource usage ratio of the day to be measured; The parameter prediction model is used to process the historical overall parameter data of resource usage in different time periods and the historical period parameter characteristic data of resource usage in different time periods to obtain the overall resource usage prediction value of the measured day and the characteristic prediction value of the hourly resource usage ratio of the measured day, including: Selecting resource usage historical overall parameter data outside a preset historical time period from the resource usage historical overall parameter data of the different time periods, and training the parameter prediction model using the selected resource usage historical overall parameter data to obtain a first parameter prediction model; Selecting resource usage historical period parameter characteristic data outside the preset historical time period from the resource usage historical period parameter characteristic data of the different time periods, and training the parameter prediction model using the selected resource usage historical period parameter characteristic data to obtain a second parameter prediction model; The first parameter prediction model is used to predict the overall parameter data of resource usage in the preset historical time period to obtain the overall resource usage prediction value of the measured day. Input the resource usage historical period parameter characteristic data within the preset historical time period into the second parameter prediction model to obtain the characteristic prediction value of the resource usage ratio of the day and hour to be measured Indicates the predicted value of resource usage ratio in hour i on the day to be measured; Using a predefined parameter combination model to process the predicted value of the overall resource usage of the day to be measured and the predicted value of the hourly resource usage ratio characteristic of the day to be measured, to obtain the predicted value of the hourly resource usage of the day to be measured; The method of processing the predicted value of the total resource usage of the day to be measured and the predicted value of the hourly resource usage ratio characteristic of the day to be measured by combining a predefined parameter with a model to obtain the predicted value of the hourly resource usage of the day to be measured includes: By calculating the formula Get the predicted value of resource usage per day and hour to be measured in, It represents the resource usage forecast value of the i-th hour on the day to be measured, Indicates the predicted value of the resource usage ratio of the day and hour to be measured, Indicates the predicted value of overall resource usage on the day to be measured.
2. The prediction method according to claim 1, characterized in that Obtain resource usage parameter characteristic data for historical periods, including: By calculating the formula Get the parameter characteristics of a resource usage history period Among them, y i represents the resource usage in the i-th hour of the k-th day in history, x k represents the daily total resource usage on the kth day in history, i = 1, 2, ..., I, I represents the number of characteristic values of each group of historical hourly resource usage proportions, k = 1, 2, ..., K, K represents the total number of groups of the operating parameters; The multiple hourly resource usage proportion feature values corresponding to the historical k-th day are used as a set of resource usage historical period parameter features, and all K groups of resource usage historical period parameter features are used as the resource usage historical period parameter feature data.
3. The prediction method according to claim 1, wherein: Before using the parameter prediction model to process the historical overall parameter data of resource usage in different time periods and the historical period parameter characteristic data of resource usage in different time periods to obtain the predicted value of the overall resource usage for the day to be measured and the predicted value of the characteristic of the hourly resource usage ratio for the day to be measured, the prediction method further includes: Normalize the historical overall parameter data of resource usage in different time periods.
4. A device for predicting resource usage of quasi-periodic changes, characterized in that: include: An acquisition module is used to obtain historical overall parameter data of resource usage and historical period parameter characteristic data of resource usage; The resource usage historical overall parameter data includes multiple groups of operating parameter sets and the historical daily overall resource usage corresponding to each group of operating parameter sets, and the resource usage historical period parameter characteristic data includes multiple groups of historical hourly resource usage proportion characteristic values; a classification module, configured to classify the resource usage history overall parameter data and the resource usage history period parameter characteristic data according to time periods, to obtain resource usage history overall parameter data and resource usage history period parameter characteristic data for different time periods; the different time periods include weekdays, weekends, and holidays; A neural network module is used to process the historical overall parameter data of resource usage in different time periods and the historical period parameter characteristic data of resource usage in different time periods using a parameter prediction model to obtain a predicted value of the overall resource usage on the day to be measured and a predicted value of the characteristic of the hourly resource usage ratio on the day to be measured; The processing flow of the neural network module is as follows: Selecting resource usage historical overall parameter data outside a preset historical time period from the resource usage historical overall parameter data of the different time periods, and training the parameter prediction model using the selected resource usage historical overall parameter data to obtain a first parameter prediction model; Selecting resource usage historical period parameter characteristic data outside the preset historical time period from the resource usage historical period parameter characteristic data of the different time periods, and training the parameter prediction model using the selected resource usage historical period parameter characteristic data to obtain a second parameter prediction model; The first parameter prediction model is used to predict the overall parameter data of resource usage in the preset historical time period to obtain the overall resource usage prediction value of the measured day. Input the resource usage historical period parameter characteristic data within the preset historical time period into the second parameter prediction model to obtain the characteristic prediction value of the resource usage ratio of the day and hour to be measured Indicates the predicted value of resource usage ratio in hour i on the day to be measured; A prediction module is used to process the predicted value of the total resource usage of the day to be measured and the predicted value of the hourly resource usage ratio characteristic of the day to be measured using a predefined parameter combination model to obtain a predicted value of the hourly resource usage of the day to be measured; The processing flow of the prediction module is as follows: The method of processing the predicted value of the total resource usage of the day to be measured and the predicted value of the hourly resource usage ratio characteristic of the day to be measured by combining a predefined parameter with a model to obtain the predicted value of the hourly resource usage of the day to be measured includes: By calculating the formula Get the predicted value of resource usage per day and hour to be measured in, It represents the resource usage forecast value of the i-th hour on the day to be measured, Indicates the predicted value of the resource usage ratio of the day and hour to be measured, Indicates the predicted value of overall resource usage on the day to be measured.
5. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for predicting the usage of resources with similar periodic changes according to any one of claims 1 to 3 is implemented.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for predicting the usage of resources with quasi-periodic changes according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Energy consumption parameter prediction tracking method and system and computer readable storage medium
CN113869580A
Power load prediction method, system and equipment based on NARNN model
CN114169648A