An application control method considering data collaborative prediction and adaptive correction
By combining the baseline prediction model and the residual correction model, and combining the actual data volume for deviation characteristic analysis, adaptive correction of data prediction is achieved, which solves the problem of low control accuracy in the existing technology and improves the accuracy of data prediction and the real-time response capability of the control system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING YIHUI INFORMATION TECH CO LTD
- Filing Date
- 2026-02-14
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies fail to effectively consider the variations in actual application scenarios in data prediction, resulting in low control accuracy.
A method that balances data-driven collaborative prediction and adaptive correction is adopted. The first prediction sequence is generated through a baseline prediction model and a residual correction model. The deviation characteristics are determined by combining the actual amount of data, adaptive correction is performed, a second prediction sequence is generated, and an application control strategy is generated.
It improves the accuracy of data volume prediction, can quickly respond to changes in actual prediction scenarios, avoids frequent global corrections or insufficient corrections, has strong real-time adaptive capabilities, and improves control accuracy.
Smart Images

Figure CN121704213B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to an application control method, electronic device, and computer-readable storage medium that takes into account both collaborative data prediction and adaptive correction. Background Technology
[0002] Data prediction is defined as using existing data and relevant analytical techniques to understand and predict future behaviors and outcomes. This technology can be applied to various practical fields, such as water, HVAC, power energy, and logistics warehousing. For example, in the water sector, urban residents' domestic water, urban greening water, and industrial water are typically supplied by waterworks. With the continuous expansion of urban areas, water consumption is increasing year by year. How to effectively replenish and minimize waste in water supply to residential users has become a widespread concern. Currently, most fields mainly rely on historically collected data to predict future data, without considering the potential changes brought about by actual application scenarios. This makes it impossible to ensure consistently reliable and effective predictions for appropriate control, resulting in low overall control accuracy. Summary of the Invention
[0003] This invention aims to at least partially address one of the technical problems in related technologies. To this end, this invention proposes an application control method that combines data-driven collaborative prediction and adaptive correction, capable of responding to changes in the actual prediction scenario and improving control accuracy.
[0004] In a first aspect, embodiments of the present invention provide an application control method that balances data collaborative prediction and adaptive correction, comprising the following steps:
[0005] Step S1: Based on the pre-configured baseline prediction model and residual correction model, generate a first prediction sequence corresponding to the prediction period, wherein the prediction period includes multiple different prediction periods in the future;
[0006] Step S2: When the current prediction period of the prediction cycle is in progress, the prediction data volume of each target prediction period in the prediction cycle is determined according to the first prediction sequence. The target prediction period includes the current prediction period and several historical prediction periods before the current prediction period.
[0007] Step S3: For each target prediction period, determine the deviation characteristics of the target prediction period based on the predicted data volume of the target prediction period and the actual data volume of the target prediction period obtained.
[0008] Step S4: Determine the deviation scenario suitable for the current prediction period based on all the deviation features, and perform adaptive correction on the first prediction sequence based on the deviation scenario to obtain the second prediction sequence;
[0009] Step S5: Generate an application control strategy for the prediction period based on the second prediction sequence.
[0010] Optionally, in one embodiment of the present invention, step S1 includes the following steps:
[0011] Step S11: Based on the pre-configured baseline prediction model, predict the amount of data for multiple different prediction periods in the future to obtain the basic prediction data amount;
[0012] Step S12: Based on the pre-configured residual correction model and combined with the pre-constructed event feature vectors for each different prediction period, perform residual prediction for each different prediction period to obtain residual prediction data. Each event feature vector represents at least one of the date feature, time feature, and meteorological feature corresponding to one of the prediction periods.
[0013] Step S13: Generate a first prediction sequence corresponding to the prediction period based on the amount of basic prediction data and the amount of residual prediction data.
[0014] Optionally, in one embodiment of the present invention, the deviation feature includes:
[0015] Deviation rate is used to characterize the degree of deviation between the actual data volume of the target prediction period and the predicted data volume of the target prediction period;
[0016] The deviation direction value is used to characterize the relative magnitude relationship between the actual data volume and the predicted data volume during the target prediction period.
[0017] Wherein, when the deviation direction value is 1, it indicates that the actual data volume of the target prediction period is greater than the predicted data volume of the target prediction period;
[0018] When the deviation direction value is -1, it indicates that the actual data volume of the target prediction period is less than the predicted data volume of the target prediction period.
[0019] When the deviation direction value is 0, it indicates that there is no deviation between the actual data volume of the target prediction period and the predicted data volume of the target prediction period.
[0020] Optionally, in one embodiment of the present invention, step S4, determining the deviation scenario suitable for the current prediction period based on all the deviation characteristics, includes the following steps:
[0021] Step S41: Generate the deviation statistics index for the current prediction period based on all the deviation rates and all the deviation direction values;
[0022] Step S42: Based on the deviation statistics and all the deviation rates, determine the deviation scenario suitable for the current prediction period.
[0023] Optionally, in one embodiment of the present invention, the deviation statistics include at least one of the following:
[0024] The number of consecutive deviations is the number of target prediction time periods in which the deviation direction value is 1 or -1 consecutively.
[0025] The deviation direction index is the ratio of the number of multiple target prediction periods with the same deviation direction value to the total number of target prediction periods.
[0026] The deviation change value is the difference in the deviation rate between two adjacent target prediction time periods;
[0027] The deviation change trend value represents the influence of each deviation change value and the time decay weight corresponding to each deviation change value on the deviation of the prediction period.
[0028] The first volatility metric is the standard deviation of the deviation rate for all the target prediction periods;
[0029] The second volatility metric is the ratio of the first volatility metric to the average deviation rate for all the target prediction periods.
[0030] Optionally, in one embodiment of the present invention, step S42 includes the following steps:
[0031] Step S421: When the deviation statistics index includes the first volatility index, if the deviation rate of the current prediction period is not greater than the preset deviation tolerance threshold and the first volatility index is not greater than the preset volatility threshold, it is determined that the current prediction period is in a deviation-free application scenario.
[0032] or,
[0033] Step S422: When the deviation statistics include the number of consecutive deviations, the deviation direction index, and the deviation change trend value, if the deviation rate of the current prediction period is greater than the deviation tolerance threshold and less than or equal to the preset maximum deviation tolerance threshold, and the deviation change trend value is less than the preset trend change threshold, and the number of consecutive deviations is not greater than the preset deviation number threshold or the deviation direction index is less than the preset first deviation direction threshold, it is determined that the current prediction period is in an occasional fluctuation application scenario, wherein the deviation tolerance threshold is less than or equal to the maximum deviation tolerance threshold;
[0034] or,
[0035] Step S423: When the deviation statistics index includes the deviation direction index and the deviation change trend value, if the first scenario condition is satisfied at least N consecutive times, it is determined that the current prediction period is in a trend change application scenario.
[0036] Wherein, N is a preset minimum continuous trend limit value, the first scenario condition is that the deviation rate of the current prediction period is greater than the minimum deviation tolerance threshold and less than or equal to the preset lower limit value for abnormal event judgment, and the deviation direction index is not less than the preset second deviation direction threshold, and the deviation change trend value is not less than the trend change threshold, the lower limit value for abnormal event judgment is not less than the maximum deviation tolerance threshold, and the second deviation direction threshold is greater than the first deviation direction threshold.
[0037] or,
[0038] Step S424: When the deviation rate of the current prediction period is greater than the lower limit of the abnormal event judgment, it is determined that the current prediction period is in an abnormal application scenario.
[0039] Optionally, in one embodiment of the present invention, step S4, which involves adaptively correcting the first predicted sequence according to the deviation scenario to obtain a second predicted sequence, includes the following steps:
[0040] Step S43: When it is determined that the current prediction period is in an unbiased application scenario, the first prediction sequence is used as the second prediction sequence;
[0041] or,
[0042] Step S44: When it is determined that the current prediction period is in an occasional fluctuation application scenario, the prediction data volume of all prediction periods is corrected by using the weight decay method or the full update method to obtain the second prediction sequence;
[0043] or,
[0044] Step S45: When it is determined that the current prediction period is in a trend change application scenario or an abnormal application scenario, the prediction data volume of each prediction period after the current prediction period is corrected by the full update method to obtain the second prediction sequence.
[0045] Optionally, in one embodiment of the present invention, step S5 includes the following steps:
[0046] Step S51: Determine the planned data volume for each of the prediction periods based on the second prediction sequence;
[0047] Step S52: Based on the planned data volume for each forecast period and combined with predetermined data response delay factors and data application time conditions, generate an application control strategy for the forecast period.
[0048] In a second aspect, embodiments of the present invention provide an electronic device, comprising:
[0049] At least one processor;
[0050] At least one memory for storing at least one program;
[0051] When at least one of the programs is executed by at least one of the processors, the application control method that balances data collaborative prediction and adaptive correction as described in the first aspect is implemented.
[0052] Thirdly, embodiments of the present invention provide a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to implement the application control method as described in the first aspect, which balances data collaborative prediction and adaptive correction.
[0053] This invention proposes an application control method that combines collaborative data prediction and adaptive correction. By collaboratively predicting the amount of data in the prediction period using a baseline prediction model and a residual correction model, the accuracy of data prediction can be significantly improved. Then, based on the predicted data amount in the target prediction period and the actual data amount in the target prediction period, the deviation characteristics of the target prediction period can be determined, thus obtaining the basis for correction decisions. Based on the deviation characteristics, the deviation scenarios suitable for the current prediction period can be accurately identified. Therefore, the first prediction sequence is adaptively corrected according to the deviation scenarios to obtain the second prediction sequence. It can be seen that this hierarchical correction mechanism not only avoids frequent global correction and prevents over-correction or under-correction, but also ensures rapid response to changes in the actual prediction scenario, and has strong real-time adaptive capability, thereby effectively improving control accuracy. Attached Figure Description
[0054] Figure 1This is a flowchart of an application control method that combines data collaborative prediction and adaptive correction according to an embodiment of the present invention;
[0055] Figure 2 yes Figure 1 The flowchart of step S1 in the process;
[0056] Figure 3 yes Figure 1 A partial flowchart of step S4, "Determine the deviation scenario suitable for the current prediction period based on all deviation characteristics";
[0057] Figure 4 yes Figure 1 The flowchart for step S5 in the process;
[0058] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0060] It should be noted that although functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.
[0061] Figure 1 The flowchart shows an application control method that combines data collaborative prediction and adaptive correction according to an embodiment of the present invention. This application control method may include, but is not limited to, steps S1 to S5.
[0062] It should be noted that this application control method, which combines data collaborative prediction and adaptive correction, can be applied to various application scenarios that require data prediction and corresponding control. There are no restrictions here. For example, it can be applied to water, HVAC, power energy, and logistics warehousing fields. Taking water systems as an example, it can be applied to urban secondary water supply pump stations, involving data volume prediction and automatic control of water pumps, solenoid valves, and regulating valves; or to industrial park circulating cooling water systems, involving cooling water demand prediction and intelligent adjustment of circulating pumps and water supply valves; or to residential community booster pump stations, involving water supply demand prediction and optimized operation control of booster pump sets. Taking power energy systems as an example, it can be applied to regional power load management and control, industrial park microgrids, etc. There are no restrictions here.
[0063] Specifically, in the above application scenarios, each time at least 5 seconds to 15 minutes of historical demand data (such as water consumption, electricity consumption, and heating and cooling loads) can be collected. There are stable daily, weekly, or multi-cycle demand patterns, and there may also be significant influences from the external environment. It also has the ability to collect and report data in real time, as well as the ability to schedule data prediction tasks periodically. In addition, it has the ability to communicate with relevant equipment for on-site management in real time and supports remote control.
[0064] Step S1: Based on the pre-configured baseline prediction model and residual correction model, generate the first prediction sequence corresponding to the prediction period. The prediction period includes multiple different prediction periods in the future. It can be understood that the duration of different prediction periods can be set by the user without restriction. In terms of time sequence, different prediction periods have a sequential distinction. At specific time nodes, different prediction periods can be continuous, for example, the previous prediction period is 9:00-12:00 on December 20, and the next prediction period is 12:00-14:00 on December 20; or they can be discontinuous, for example, the previous prediction period is 9:00-12:00 on December 20, and the next prediction period is 15:00-18:00 on December 20.
[0065] Step S2: When the current prediction period is in the prediction cycle, the prediction data volume of the target prediction period in each prediction cycle is determined according to the first prediction sequence. The target prediction period includes the current prediction period and several historical prediction periods before the current prediction period.
[0066] Step S3: For each target prediction period, determine the deviation characteristics of the target prediction period based on the predicted data volume of the target prediction period and the actual data volume of the target prediction period obtained.
[0067] Step S4: Determine the deviation scenario suitable for the current prediction period based on all deviation characteristics, and perform adaptive correction on the first prediction sequence based on the deviation scenario to obtain the second prediction sequence;
[0068] Step S5: Generate an application control strategy for the prediction period based on the second prediction sequence.
[0069] In this step, the data volume of the prediction period is predicted collaboratively by the baseline prediction model and the residual correction model, which can significantly improve the accuracy of data volume prediction. Then, based on the predicted data volume of the target prediction period and the actual data volume of the target prediction period, the deviation characteristics of the target prediction period are determined, and the basis for correction decisions can be obtained. Based on the deviation characteristics, the deviation scenarios suitable for the current prediction period can be accurately identified. Thus, the first prediction sequence is adaptively corrected according to the deviation scenarios to obtain the second prediction sequence. It can be seen that such a hierarchical correction mechanism not only avoids frequent global correction and prevents over-correction or under-correction, but also ensures that it can quickly respond to changes in the actual prediction scenario and has strong real-time adaptive capability, thereby effectively improving control accuracy.
[0070] In one embodiment, the specific types and parameters of the baseline prediction model and the residual correction model can be set according to the actual application scenario, as long as they can respectively achieve baseline prediction and residual correction. For example, the baseline prediction model can preferably be the Holt-Winters baseline prediction model, which is a time series prediction method with periodicity and smooth trend as its core, and outputs a baseline prediction model based on historical patterns. ARIMA, SARIMA, Prophet, and LSTM can also be used. The residual correction model can preferably be the LightGBM event correction model, which is a machine learning method based on gradient boosting tree (GBDT) to learn how much the baseline prediction will deviate under certain feature conditions. XGBoost, CatBoost, Random Forest, and neural networks can also be used. To avoid redundancy, the Holt-Winters baseline prediction model and the LightGBM event correction model are used as examples in the following embodiments, but they are not the only limitations.
[0071] In one embodiment, the current prediction period in step S2 mainly reflects the prediction period corresponding to the current situation, which is actually one of all prediction periods. The target prediction period includes the current prediction period and several historical prediction periods before the current prediction period. This means that whenever the current prediction period is in the prediction cycle, the prediction data volume of each target prediction period needs to be determined by the first prediction sequence. Each target prediction period is a separate prediction granularity.
[0072] In one embodiment, before step S1, but not limited to, periodic model updates can be performed on the Holt-Winters baseline prediction model and the LightGBM event correction model. Specifically, model updates are performed at the beginning of each prediction period. For the Holt-Winters baseline prediction model, the actual data volume of the previous complete period is first collected, and then a full fit update is performed with fixed smoothing parameters. The smoothing parameters can be re-optimized under the following circumstances: when the quarterly data application pattern changes, when the model prediction error continues to increase, or when manually triggered. The model update data range adopts a sliding window mechanism, and the data of the most recent weeks can be selected by default. For the LightGBM event correction model, it is triggered after the Holt-Winters baseline prediction model update is completed, and retraining is performed using all historical data. In particular, when the smoothing parameters of the Holt-Winters baseline prediction model are updated, the LightGBM event correction model needs to be retrained synchronously. This periodic update mechanism ensures the consistency and timeliness of the LightGBM event correction model and the Holt-Winters baseline prediction model.
[0073] In one embodiment, the deviation features may include, but are not limited to:
[0074] The deviation rate, used to characterize the degree of deviation between the actual data volume and the predicted data volume for the target prediction period, can be expressed as: ,in, Indicates the current forecast period. This indicates the amount of forecast data for the current forecast period. This indicates the actual amount of data for the current forecast period. This represents the deviation rate for the current forecast period, and so on. This indicates the previous historical forecast period preceding the current forecast period;
[0075] The deviation direction value, used to characterize the relative magnitude of the actual data volume and the predicted data volume during the target prediction period, can be expressed as: , Indicates the current forecast period;
[0076] Specifically, when the deviation direction value is 1, it indicates that the actual data volume of the target prediction period is greater than the predicted data volume of the target prediction period; when the deviation direction value is -1, it indicates that the actual data volume of the target prediction period is less than the predicted data volume of the target prediction period; when the deviation direction value is 0, it indicates that there is no deviation between the actual data volume and the predicted data volume of the target prediction period. "No deviation" means that the difference between the actual data volume and the predicted data volume is within a preset reasonable difference threshold range. This reasonable difference threshold range can be set according to the actual application scenario and is not limited here.
[0077] One embodiment of the present invention, such as Figure 2 As shown, step S1 may include, but is not limited to, steps S11 to S13.
[0078] Step S11: Based on the pre-configured baseline prediction model, predict the amount of data for multiple different prediction periods in the future to obtain the basic prediction data amount. The prediction granularity of each prediction period can be set by the user without any restrictions, for example, it can be set to 15 minutes.
[0079] Step S12: Based on the pre-configured residual correction model and combined with the pre-constructed event feature vectors for each different prediction period, perform residual prediction for each different prediction period to obtain residual prediction data. Each event feature vector represents at least one of the date feature, time feature, and meteorological feature corresponding to one prediction period. Specifically, the date feature can be weekday, weekend, holiday, etc., the time feature can be hour, minute, intraday cycle code, etc., and the meteorological feature can be temperature, weather type, etc.
[0080] Step S13: Generate the first prediction sequence corresponding to the prediction period based on the amount of basic prediction data and the amount of residual prediction data.
[0081] In this step, baseline prediction is performed using a baseline prediction model, supplemented by residual prediction using a residual correction model. In particular, residual prediction is combined with event feature vectors for different prediction periods, which can better take into account the influencing factors of event feature vectors and ensure accurate residual prediction data. Then, based on the basic prediction data and residual prediction data, a first prediction sequence corresponding to the prediction period is generated. This part belongs to the relevant prior art well known to those skilled in the art, and will not be elaborated here to avoid redundancy.
[0082] In one embodiment, after step S13, the first prediction sequence may be aggregated according to business needs (e.g., aggregated from 15-minute granularity to 30-minute granularity) to facilitate subsequent data planning.
[0083] One embodiment of the present invention, such as Figure 3 As shown, step S4, which determines the deviation scenario suitable for the current prediction period based on all deviation characteristics, may include, but is not limited to, the following steps:
[0084] Step S41: Generate deviation statistics for the current forecast period based on all deviation rates and all deviation direction values;
[0085] Step S42: Based on the deviation statistics and all deviation rates, determine the deviation scenario suitable for the current prediction period.
[0086] In this step, the deviation statistics for the current prediction period are calculated by using the deviation rate and deviation direction value corresponding to each target prediction period. These deviation statistics can be multi-dimensional. Therefore, based on these, the deviation scenarios suitable for the current prediction period can be determined by combining the deviation statistics with all deviation rates. This can reduce the impact of extreme errors on the overall control system and provide a clear and definite basis for subsequent correction decisions.
[0087] In one embodiment, the deviation statistics can be presented in multiple dimensions, specifically including, but not limited to, at least one of the following:
[0088] The number of consecutive deviations, denoted as N_consecutive, is the number of consecutive target prediction time periods where the deviation direction value is 1 or -1. Here, "consecutive" can be evaluated within a preset sliding window, for example, by maintaining the sliding window. , Indicates the window length;
[0089] The deviation direction index is the ratio of the number of multiple target prediction periods with the same deviation direction value to the total number of target prediction periods, denoted as C_direction;
[0090] The deviation change value is the difference in the deviation rate between two adjacent target prediction time periods, denoted as . , ;
[0091] The deviation trend value represents the impact of each deviation change value and its corresponding time decay weight on the deviation of the prediction period, denoted as . , ,in, This represents the time decay weight; the closer the time node is to the current prediction period, the greater the decay weight. The larger;
[0092] The first volatility indicator is the standard deviation of the deviation rate for all target prediction periods, denoted as... ;
[0093] The second volatility indicator is the ratio of the average deviation rate of the first volatility indicator to the target prediction period for all time periods, denoted as... .
[0094] It should be noted that there can be many other deviation statistical indicators, which can be set according to the actual application scenario. The embodiments of the present invention are mainly based on the deviation statistical indicators given above, but are not the only limitation.
[0095] In one embodiment of the present invention, step S42 may include, but is not limited to, the following steps:
[0096] Step S421: When the deviation statistics include the first volatility index, if the deviation rate of the current prediction period is not greater than the preset deviation tolerance threshold and the first volatility index is not greater than the preset volatility threshold, it is determined that the current prediction period is in a no-deviation application scenario.
[0097] or,
[0098] Step S422: When the deviation statistics include the number of consecutive deviations, the deviation direction index, and the deviation change trend value, if the deviation rate of the current prediction period is greater than the deviation tolerance threshold and less than or equal to the preset maximum deviation tolerance threshold, and the deviation change trend value is less than the preset trend change threshold, and the number of consecutive deviations is not greater than the preset deviation number threshold or the deviation direction index is less than the preset first deviation direction threshold, it is determined that the current prediction period is in an occasional fluctuation application scenario, wherein the deviation tolerance threshold is less than or equal to the maximum deviation tolerance threshold.
[0099] or,
[0100] Step S423: When the deviation statistics include deviation direction indicators and deviation change trend values, if the first scenario condition is met at least N consecutive times, it is determined that the current prediction period is in a trend change application scenario.
[0101] Wherein, N is the preset minimum continuous trend limit value, the first scenario condition is that the deviation rate of the current prediction period is greater than the minimum deviation tolerance threshold and less than or equal to the preset lower limit value for abnormal event judgment, and the deviation direction index is not less than the preset second deviation direction threshold, and the deviation change trend value is not less than the trend change threshold, the lower limit value for abnormal event judgment is not less than the maximum deviation tolerance threshold, and the second deviation direction threshold is greater than the first deviation direction threshold.
[0102] or,
[0103] Step S424: When the deviation rate of the current prediction period is greater than the lower limit of the abnormal event judgment, it is determined that the current prediction period is in an abnormal application scenario.
[0104] Specifically, in step S421, the deviation tolerance threshold can be set to 10%, and the volatility threshold can be set to 5%. It can be seen that in this scenario, the predicted value is highly consistent with the actual value, the historical deviation fluctuation is small, and the entire control system operates stably.
[0105] In step S422, if the above judgment conditions are met, it indicates that the deviation amplitude is moderate. Even if deviations occur, they are discontinuous or the deviation directions are not completely consistent, showing no obvious trend change. This may be caused by random disturbances, measurement errors, or short-term sudden factors, such as a short-term concentrated increase in usage by individual users, instantaneous fluctuations in sensors, temporary equipment start-up and shutdown, or the impact of other small-scale activities. Therefore, it is determined that the current prediction period is in an occasional fluctuation application scenario with little overall impact. Among them, the maximum deviation tolerance threshold can be, but is not limited to, 10%~30%, the deviation frequency threshold can be, but is not limited to, 1, the first deviation direction threshold can be, but is not limited to, 0.6, indicating that 60% of the deviation directions in all target prediction periods are consistent, and the trend change threshold can be, but is not limited to, 5%.
[0106] In step S423, if the above judgment conditions are met, it indicates that deviations in the same direction occur repeatedly and the deviation rate is in an increasing or decreasing range. The deviation amplitude is moderate but continuous, which indicates that the data application mode has undergone a phased change, such as seasonal changes in water usage habits, changes in the number of users, or adjustments to production plans. Thus, it can be determined that the current forecast period is in a trend change application scenario. Among them, N can be, but is not limited to, 2, indicating that the recommended number of consecutive times required for trend judgment is 2, the lower limit for abnormal event judgment is 30%, and the threshold for the second deviation direction is 80%.
[0107] In step S424, if the deviation rate of the current prediction period is greater than the lower limit for judging abnormal events, it indicates that the deviation rate exceeds the normal range and an immediate response is required. It can be determined that the current prediction period is in an abnormal application scenario. Furthermore, the specific circumstances of the abnormal application scenario can be further determined based on the degree to which the deviation rate of the current prediction period exceeds the lower limit for judging abnormal events. For example, if the deviation rate of the current prediction period is slightly greater than 30% and the number of consecutive deviations is less than or equal to 1, it is judged as a moderate abnormal application scenario; if there are two or more consecutive deviations exceeding 40%, it is judged as a high-level abnormal application scenario; if the deviation rate of the current prediction period is detected to exceed 50%, it is judged as a severe abnormal application scenario, such as potentially involving pipeline bursts, major events, or system failures.
[0108] In one embodiment of the present invention, step S4, which involves adaptively correcting the first predicted sequence based on the deviation scenario to obtain the second predicted sequence, may include, but is not limited to, the following steps:
[0109] Step S43: When it is determined that the current prediction period is in an unbiased application scenario, the first prediction sequence is used as the second prediction sequence, that is, no correction operation is required, but the deviation data can continue to be monitored for subsequent model evaluation and optimization.
[0110] or,
[0111] Step S44: When it is determined that the current prediction period is in an occasional fluctuation application scenario, the prediction data volume of all prediction periods is corrected by using the weight decay method or the full update method to obtain the second prediction sequence.
[0112] or,
[0113] Step S45: When it is determined that the current prediction period is in a trend change application scenario or an abnormal application scenario, the prediction data volume of each prediction period after the current prediction period is corrected by the full update method to obtain the second prediction sequence.
[0114] In one embodiment, differentiated correction strategies can be adopted for different deviation scenarios, including but not limited to differentiated processing in dimensions such as correction range (local / global), correction method (weight decay / full update / proportional adjustment) and whether to trigger control plan replanning. At the same time, the time range of the correction window (such as 3 hours, 6 hours or all day) is dynamically determined according to the severity and type of the deviation scenario to achieve a balance between accurate correction and system stability.
[0115] Specifically, in applications with occasional fluctuations, the correction range can be set to within 3 hours. The weighted decay method or the full update method can be used to correct the amount of predicted data for all prediction periods, resulting in a second prediction sequence. The weighted decay method is more suitable for scenarios with smaller deviations and where the expected impact will gradually diminish. This can be expressed as:
[0116] ;
[0117] in, The decay rate is the number of steps from the current time. and correction factor The settings can be customized according to the actual situation, and there are no restrictions here. The full update method is more suitable for scenarios with large deviation amplitude and long duration of deviation impact. The correction method is to update the predicted value in the correction window according to the deviation ratio. In addition, boundary checks and smoothing can be performed after correction to further record correction information.
[0118] In applications involving trend changes, considering that the impact of trend changes typically lasts for a considerable period, to avoid the continuous accumulation of trend deviations, a full update method can be used to correct the amount of forecast data for each subsequent forecast period, as shown in the following formula:
[0119] ;
[0120] in, The average deviation rate for multiple target prediction periods with continuous deviations; and, after correction, boundary checks and smoothing can also be performed to further record correction information;
[0121] If an abnormal application scenario occurs, it will be categorized according to different situations. Specifically, if it is a single severe anomaly, the subsequent predicted values will be adjusted as a whole according to the deviation ratio, and a manual review mechanism will be triggered to determine whether it is a genuine anomaly and generate an anomaly event report. If it is a continuous anomaly, the subsequent predicted values for all remaining time periods of the day will be adjusted as a whole according to the deviation ratio, and an anomaly alarm notification will be sent. If it is an extreme anomaly, i.e. an emergency, the subsequent predicted values for all remaining time periods of the day will be adjusted as a whole according to the deviation ratio, a high-priority alarm will be sent, and it will automatically switch to manual review mode, suspend automatic control, wait for manual confirmation, perform anomaly diagnosis, and record detailed anomaly event logs.
[0122] It can be seen that by periodic deviation detection and scene classification, accurate identification of different types of deviations is achieved, and the targeted correction strategy avoids over-correction or under-correction caused by "one-size-fits-all" approach. Even when the data distribution changes or fluctuates greatly during holidays, the hierarchical correction mechanism can respond quickly and distinguish between occasional fluctuations and trend changes, avoiding overreaction to random noise. The graded handling mechanism for abnormal events improves the system reliability under extreme conditions. In addition, based on historical correction effect data, relevant correction parameters can be optimized periodically to improve the overall prediction accuracy.
[0123] One embodiment of the present invention, such as Figure 4 As shown, step S5 may include, but is not limited to, the following steps:
[0124] Step S51: Determine the planned data volume for each forecast period based on the second forecast sequence;
[0125] Step S52: Based on the planned data volume for each forecast period and the predetermined data response delay factors and data application time conditions, generate an application control strategy for the forecast period.
[0126] In this step, the corrected second prediction sequence is transformed into a device control objective. Based on the device control objective and the device's physical constraints (response delay, startup time), a device operation state plan and control command sequence are obtained, thereby generating an application control strategy oriented towards the prediction cycle. This prediction-driven mechanism realizes the transformation from passive response to active control, which can respond to changes in demand in advance, avoid service interruptions or resource waste caused by supply and demand imbalances, and further improve the system response speed. In addition, a prediction-correction-control closed-loop feedback mechanism can be established, that is, by monitoring the device's execution status and control effect in real time, the execution deviation is fed back to the pre-configured prediction and correction module, forming a two-way closed loop of prediction optimization and control optimization. This closed-loop mechanism enables the system to have adaptive and self-learning capabilities, and can continuously improve the prediction and control effects.
[0127] In one embodiment, but not limited to, combining optimization principles (optimal energy efficiency, minimal start-stop) to generate application control strategies oriented towards the prediction cycle.
[0128] In one embodiment, the control protocol that the control command sequence can be adapted to can be a variety of protocols, which are not limited here. For example, it can be, but is not limited to, Modbus TCP / RTU, OPCUA, MQTT and other proprietary protocols.
[0129] In one embodiment, the step between step S4 and step S5 may include, but is not limited to, the following step: outputting the corrected second prediction sequence to the downstream system and recording the current correction event for subsequent model optimization analysis. That is, based on the actual control effect, the basic prediction process is optimized in reverse. In other words, if the downstream system is not satisfied with the current correction event, it can further adjust the relevant training parameters or simulation parameters, return to the steps before step S4, until the recorded correction event meets the requirements, and then execute the subsequent step S5.
[0130] Figure 5 This is a schematic diagram of the structure of an electronic device 1000 provided in an embodiment of the present invention. Figure 5 As shown, the electronic device 1000 includes a memory 1100 and a processor 1200. The number of memories 1100 and processors 1200 can be one or more. Figure 5 Taking a memory 1100 and a processor 1200 as an example; the memory 1100 and the processor 1200 in the device can be connected via a bus or other means. Figure 5 Taking the example of a connection between China and Israel via a bus.
[0131] The memory 1100, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the application control method that combines data collaborative prediction and adaptive correction provided in any embodiment of the present invention. The processor 1200 implements the above-mentioned application control method that combines data collaborative prediction and adaptive correction by running the software programs, instructions, and modules stored in the memory 1100.
[0132] The memory 1100 may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system and application programs required for at least one function. Furthermore, the memory 1100 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 1100 may further include memory remotely located relative to the processor 1200, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0133] An embodiment of the present invention also provides a computer-readable storage medium storing computer-executable instructions for executing an application control method that combines data collaborative prediction and adaptive correction as provided in any embodiment of the present invention.
[0134] An embodiment of the present invention also provides a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium and executes the computer program or computer instructions, causing the computer device to perform an application control method that combines data collaborative prediction and adaptive correction as provided in any embodiment of the present invention.
[0135] The electronic devices and application scenarios described in the embodiments of this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of electronic devices and the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.
[0136] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0137] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0138] The terms “component,” “module,” “system,” etc., used in this specification are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process or execution thread, and components may be located on a single computer or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, or a network, such as the Internet interacting with other systems via signals).
Claims
1. An application control method that combines data-driven collaborative prediction and adaptive correction, characterized in that, Includes the following steps: Step S1: Based on the pre-configured baseline prediction model and residual correction model, generate a first prediction sequence corresponding to the prediction period, wherein the prediction period includes multiple different prediction periods in the future; Step S2: When the current prediction period of the prediction cycle is in progress, the prediction data volume of each target prediction period in the prediction cycle is determined according to the first prediction sequence. The target prediction period includes the current prediction period and several historical prediction periods before the current prediction period. Step S3: For each target prediction period, determine the deviation characteristics of the target prediction period based on the predicted data volume of the target prediction period and the actual data volume of the target prediction period obtained. Step S4: Determine the deviation scenario suitable for the current prediction period based on all the deviation features, and perform adaptive correction on the first prediction sequence based on the deviation scenario to obtain the second prediction sequence; Step S5: Generate an application control strategy for the prediction period based on the second prediction sequence; The deviation characteristics include: Deviation rate is used to characterize the degree of deviation between the actual data volume of the target prediction period and the predicted data volume of the target prediction period; The deviation direction value is used to characterize the relative magnitude relationship between the actual data volume and the predicted data volume during the target prediction period. Wherein, when the deviation direction value is 1, it indicates that the actual data volume of the target prediction period is greater than the predicted data volume of the target prediction period; When the deviation direction value is -1, it indicates that the actual data volume of the target prediction period is less than the predicted data volume of the target prediction period. When the deviation direction value is 0, it indicates that there is no deviation between the actual data volume of the target prediction period and the predicted data volume of the target prediction period; The step S4, which determines the deviation scenario suitable for the current prediction period based on all the deviation characteristics, includes the following steps: Step S41: Generate the deviation statistics index for the current prediction period based on all the deviation rates and all the deviation direction values; Step S42: Based on the deviation statistics and all the deviation rates, determine the deviation scenario suitable for the current prediction period; The deviation statistics include at least one of the following: The number of consecutive deviations is the number of target prediction time periods in which the deviation direction value is 1 or -1 consecutively. The deviation direction index is the ratio of the number of multiple target prediction periods with the same deviation direction value to the total number of target prediction periods. The deviation change value is the difference in the deviation rate between two adjacent target prediction time periods; The deviation change trend value represents the influence of each deviation change value and the time decay weight corresponding to each deviation change value on the deviation of the prediction period. The first volatility metric is the standard deviation of the deviation rate for all the target prediction periods; The second volatility metric is the ratio of the first volatility metric to the average deviation rate for all the target prediction periods.
2. The application control method that combines data collaborative prediction and adaptive correction according to claim 1, characterized in that, Step S1 includes the following steps: Step S11: Based on the pre-configured baseline prediction model, predict the amount of data for multiple different prediction periods in the future to obtain the basic prediction data amount; Step S12: Based on the pre-configured residual correction model and combined with the pre-constructed event feature vectors for each different prediction period, perform residual prediction for each different prediction period to obtain residual prediction data. Each event feature vector represents at least one of the date feature, time feature, and meteorological feature corresponding to one of the prediction periods. Step S13: Generate a first prediction sequence corresponding to the prediction period based on the amount of basic prediction data and the amount of residual prediction data.
3. The application control method that combines data collaborative prediction and adaptive correction according to claim 1, characterized in that, Step S42 includes the following steps: Step S421: When the deviation statistics index includes the first volatility index, if the deviation rate of the current prediction period is not greater than the preset deviation tolerance threshold and the first volatility index is not greater than the preset volatility threshold, it is determined that the current prediction period is in a deviation-free application scenario. or, Step S422: When the deviation statistics include the number of consecutive deviations, the deviation direction index, and the deviation change trend value, if the deviation rate of the current prediction period is greater than the deviation tolerance threshold and less than or equal to the preset maximum deviation tolerance threshold, and the deviation change trend value is less than the preset trend change threshold, and the number of consecutive deviations is not greater than the preset deviation number threshold or the deviation direction index is less than the preset first deviation direction threshold, it is determined that the current prediction period is in an occasional fluctuation application scenario, wherein the deviation tolerance threshold is less than or equal to the maximum deviation tolerance threshold; or, Step S423: When the deviation statistics index includes the deviation direction index and the deviation change trend value, if the first scenario condition is satisfied at least N consecutive times, it is determined that the current prediction period is in a trend change application scenario. Wherein, N is a preset minimum continuous trend limit value, the first scenario condition is that the deviation rate of the current prediction period is greater than the minimum deviation tolerance threshold and less than or equal to the preset lower limit value for abnormal event judgment, and the deviation direction index is not less than the preset second deviation direction threshold, and the deviation change trend value is not less than the trend change threshold, the lower limit value for abnormal event judgment is not less than the maximum deviation tolerance threshold, and the second deviation direction threshold is greater than the first deviation direction threshold. or, Step S424: When the deviation rate of the current prediction period is greater than the lower limit of the abnormal event judgment, it is determined that the current prediction period is in an abnormal application scenario.
4. The application control method that combines data collaborative prediction and adaptive correction according to claim 3, characterized in that, Step S4, which involves adaptively correcting the first predicted sequence based on the deviation scenario to obtain the second predicted sequence, includes the following steps: Step S43: When it is determined that the current prediction period is in an unbiased application scenario, the first prediction sequence is used as the second prediction sequence; or, Step S44: When it is determined that the current prediction period is in an occasional fluctuation application scenario, the prediction data volume of all prediction periods is corrected by using the weight decay method or the full update method to obtain the second prediction sequence; or, Step S45: When it is determined that the current prediction period is in a trend change application scenario or an abnormal application scenario, the prediction data volume of each prediction period after the current prediction period is corrected by the full update method to obtain the second prediction sequence.
5. The application control method that combines data collaborative prediction and adaptive correction according to claim 1, characterized in that, Step S5 includes the following steps: Step S51: Determine the planned data volume for each of the prediction periods based on the second prediction sequence; Step S52: Based on the planned data volume for each forecast period and combined with predetermined data response delay factors and data application time conditions, generate an application control strategy for the forecast period.
6. An electronic device, characterized in that, include: At least one processor; At least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the application control method that combines data collaborative prediction and adaptive correction as described in any one of claims 1 to 5 is implemented.
7. A computer-readable storage medium, characterized in that, It stores a processor-executable program, which, when executed by the processor, is used to implement the application control method that combines data collaborative prediction and adaptive correction as described in any one of claims 1 to 5.