Database migration method and device based on multiple prediction curves and medium
By constructing a multi-period prediction baseline and a rate limiting strategy, the database migration rate is dynamically adjusted, solving the problems of low efficiency and instability in traditional database migration technologies, and achieving a highly efficient and stable migration process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-14
- Publication Date
- 2026-04-03
AI Technical Summary
Traditional database migration techniques cannot dynamically adapt to changes in the load of the source database, resulting in low migration efficiency or difficulty in maintaining business stability. Existing multi-threaded concurrency strategies are poorly configured and cannot achieve efficient and stable migration.
By integrating historical data from multiple periods to construct a prediction baseline, a target prediction baseline is generated. The migration rate is dynamically adjusted in conjunction with a flow-limiting strategy. A set of prediction curves is generated using historical data from multiple periods and then weighted and fused to form the target prediction baseline, which is used for risk identification and flow-limiting control.
It achieves a dynamic balance between security and efficiency in the migration process, avoids the risk of business interruption, and ensures the stability and efficiency of the migration process.
Smart Images

Figure CN121786023A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data migration technology, and in particular to a database migration method, device and medium based on multiple prediction curves. Background Technology
[0002] In database migration, replication, or backup scenarios, traditional online data migration technologies typically employ migration strategies based on fixed rates or static rules. For example, data is processed sequentially using a single thread or fixed thread, such as querying one row and moving one row at a time. This method is logically simple but cannot dynamically adapt to changes in the load of the source database. When the source database is busy, it may cause delays or even interruptions in the response of core business processes. When the source database is idle, the fixed migration rate cannot make full use of idle system resources, resulting in low migration efficiency. To improve the migration rate, some technologies use multi-threaded concurrent processing of multiple data blocks. However, the number of threads and the migration rate are often pre-configured statically by the user or adjusted coarsely at runtime based on simple performance metric thresholds, making it difficult to balance migration efficiency and business stability. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention provides a database migration method, device, and medium based on multiple prediction curves. By integrating historical data from multiple periods to construct an accurate prediction baseline, it provides a precise and reliable benchmark reference for risk identification and flow control, significantly improving the security of the data migration process and ensuring a dynamic balance between migration efficiency and business stability.
[0004] According to a first aspect of the present invention, a database migration method based on multiple prediction curves is provided, comprising the following steps: Data on several preset key performance indicators of the source database within a historical time period are collected at preset high-frequency sampling intervals.
[0005] Based on several preset key performance indicator data, a set of prediction curves is periodically generated and updated; the set of prediction curves includes prediction curves generated based on the comprehensive values of several performance indicators at the same moment in the first historical period, the second historical period, and the third historical period, respectively; wherein, the duration of the first historical period, the second historical period, and the third historical period increases sequentially; the third historical period includes a preset landmark period covering several years; the comprehensive value of the performance indicators is calculated from the data of several preset key performance indicators.
[0006] Based on a pre-acquired preset migration time period, several prediction curves in the prediction curve set are weighted and fused to calculate the expected performance value at each moment within the preset migration time period, forming the target prediction baseline.
[0007] Before the preset migration period, the system determines whether there is a risk window in the future period where the expected performance value is less than the preset business safety line but within the preset gap range or not less than the preset business safety line, based on the target prediction baseline. If such a risk window exists, the system executes a preset rate limiting strategy before the risk window to dynamically adjust the database migration rate.
[0008] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the above-described database migration method based on multiple prediction curves.
[0009] According to a third aspect of the present invention, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0010] The present invention has at least the following beneficial effects: This invention provides a database migration method based on multiple prediction curves. First, data on several preset key performance indicators of the source database are collected at preset high-frequency sampling intervals over historical time periods. Prediction curves are periodically generated based on the combined values of these performance indicators at the same moment in the first, second, and third historical periods. Generating prediction curves based on multi-period historical data can characterize performance patterns across different time dimensions. Then, several prediction curves within the prediction curve set are weighted and fused to calculate the expected performance value at each moment within the preset migration time period, forming a target prediction baseline. Generating the target prediction baseline by weighting and fusing multi-period prediction curves comprehensively reflects the load patterns across multiple time dimensions, thus obtaining a more stable and realistic performance expectation for the migration period, providing an accurate and reliable benchmark for risk identification and rate limiting control. Before the preset migration time period, the existence of a risk window in the future time period is determined based on the target prediction baseline. If a risk window exists, a preset rate limiting strategy is executed before the risk window. Early identification and triggering of rate limiting based on the target prediction baseline protects database performance, avoids business interruption risks, and ensures a dynamic balance between migration efficiency and business stability. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A flowchart of a database migration method based on multiple prediction curves provided in an embodiment of the present invention. Detailed Implementation
[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] This invention provides a database migration method based on multiple prediction curves, such as... Figure 1 As shown, the method includes the following steps: S1 collects data on several preset key performance indicators from the source database within a historical time period at a preset high-frequency sampling interval. For example, the preset high-frequency sampling interval can be set to 100 milliseconds; technical personnel can set the corresponding historical collection time period according to actual business needs.
[0015] Specifically, the preset key performance indicators include CPU utilization, log write rate, disk IOPS, core SQL response time and network round-trip latency.
[0016] S2, based on several preset key performance indicator data, periodically generate and update a set of prediction curves; the set of prediction curves includes prediction curves generated based on the comprehensive values of several performance indicators at the same moment in the first historical period, the second historical period, and the third historical period; wherein, the duration of the first historical period, the second historical period, and the third historical period increases sequentially; the third historical period includes preset landmark periods covering several years; such as peak business periods such as holidays.
[0017] Specifically, the comprehensive value of the performance index is calculated from the data of several preset key performance indicators.
[0018] Furthermore, the comprehensive performance index value is obtained by weighting and calculating the data of several preset key performance indicators after normalization and the preset weight coefficients corresponding to each preset key performance indicator.
[0019] In a specific embodiment, the preset weight coefficient corresponding to each preset key performance indicator is obtained through the following steps: S01, acquire time-series data of each preset key performance indicator and corresponding load status labeling information within the historical observation period; the load status labeling information includes high load periods and normal load periods. In specific implementations, the historical observation period can be set to the past 6 months, and high load periods can be filtered out through business logs, alarm records, or the experience of database administrators.
[0020] S02, for each preset key performance indicator, extract feature values from high-load and normal-load periods respectively to obtain high-load sample sets and normal-load sample sets. The extracted feature values can be the average, peak, or variance of the preset key performance indicator during the corresponding load period.
[0021] S03, calculate the distribution difference metric for each preset key performance indicator between the high-load and normal-load sample sets, and use the distribution difference metric as the contribution score of the corresponding preset key performance indicator. In specific implementations, statistical tests or information gain calculations can be used to quantify the contribution of the preset key performance indicators in distinguishing between high-load and normal-load conditions.
[0022] For example, through information gain calculation, the contribution score corresponding to any preset key performance indicator meets the following conditions: Where G represents the contribution score corresponding to any preset key performance indicator, and E(Q) represents the information entropy corresponding to the data set Q. j ) represents the data set Q j The corresponding information entropy, |Q| and |Q j | represent data set Q and data set Q, respectively. j The number of samples, Q represents the data set corresponding to the time series data of any preset key performance indicator, Q j Let Q represent the subset of samples belonging to the j-th state, where z is the total number of pre-defined states. This can be understood as discretizing the continuous characteristic values of the preset key performance indicator, for example, by using equal-frequency binning or segmentation based on business experience to divide the continuous characteristic values into z mutually exclusive states, thus dividing Q into corresponding z subsets of samples, where subset Q... j This includes all samples whose key performance indicator values belong to the j-th state. Those skilled in the art are familiar with the specific methods for obtaining this set, and will not elaborate further here.
[0023] Specifically, , Where H is the proportion of high-load samples in dataset Q, and T is the proportion of normal-load samples in dataset Q. j For subset Q j The proportion of medium-to-high load sample sets, T j For subset Q j The proportion of the normal load sample set in the middle.
[0024] S04, normalize the contribution scores of all preset key performance indicators to obtain the preset weight coefficient corresponding to each preset key performance indicator; this can be understood as: after normalization, the sum of the initial contribution scores of all preset key performance indicators is 1.
[0025] The above-mentioned method quantifies the statistical differences of various preset key performance indicators between historical high-load periods and normal-load periods, and normalizes them into weighting coefficients, providing an objective and data-driven quantitative basis for comprehensively evaluating the database load status. This overcomes the bias of subjective experience configuration and ensures the scientificity and adaptability of subsequent prediction and rate limiting decisions.
[0026] Preferably, the prediction curve set includes a daily trend prediction curve corresponding to a first historical period, a weekly trend prediction curve corresponding to a second historical period, and an annual trend prediction curve corresponding to a third historical period. In specific implementations, the first historical period can be set to the most recent 30 days, the second historical period can be set to the most recent 12 weeks, and the third historical period can be set to the most recent three years. Each preset curve is automatically updated every day at midnight.
[0027] As mentioned above, the prediction curves generated based on multi-period historical data can characterize the performance patterns in different time dimensions. For example, the daily trend prediction curve can capture high-frequency and normalized business characteristics, such as the morning rush hour at 9 a.m. or the routine backup at 2 a.m. every day. The weekly trend prediction curve can identify businesses with weekly cycle characteristics, such as a company running a full-staff report every Wednesday at 10 a.m., which is not visible in the daily trend prediction curve but is very obvious in the weekly trend prediction curve. The annual trend prediction curve can identify the characteristics of macro cycles or specific holidays, such as Double 11 or end-of-month settlement, which are not obvious in the daily and weekly trend prediction curves.
[0028] In one embodiment, the weekly trend prediction curve is generated as follows: S201, Obtain the comprehensive performance index value at the same time each week within the previous two historical periods. For example, read several preset key performance index data at 10:00 AM on Wednesdays each week for the past 12 weeks, and calculate the corresponding comprehensive performance index value. Then, there are a total of 12 comprehensive performance index values corresponding to that time.
[0029] S202: For each moment within the current update cycle, the average of several performance metrics corresponding to that moment is taken to obtain the expected performance value for that moment. For example, if the updates are performed automatically every day at midnight, then the current update cycle is that day. Here, each moment corresponds to each sampling moment.
[0030] S203, based on the performance expectation value at each moment within the preset update cycle, plots the weekly trend prediction curve corresponding to the current update cycle.
[0031] Specifically, the construction methods for the daily trend forecast curve and the annual trend forecast curve are the same as those for the weekly trend forecast curve, and will not be repeated here.
[0032] As mentioned above, the prediction curve generated based on multi-period historical data can characterize the performance patterns in different time dimensions, and can more comprehensively and accurately predict the load trend and potential risks of the database at a specific time in the future. This provides a highly reliable decision-making basis for dynamic rate limiting of database migration, thereby effectively improving the security and success rate of the migration process.
[0033] S3, based on the pre-acquired preset migration time period, performs weighted fusion on several prediction curves in the prediction curve set to calculate the expected performance value at each moment within the preset migration time period, forming the target prediction baseline; this can be understood as: calculating the corresponding expected performance value for each sampling moment and fitting the target prediction baseline.
[0034] Specifically, the expected performance value at any time within the preset migration time period meets the following conditions: F i =D i1 ×W1+D i2 ×W2+D i3 ×W3, where W1>W2>W3, and W1>W2+W3, F i Let D be the expected performance value at time i. i1 Let D be the value of the prediction curve corresponding to the first historical period at time i. i2 Let D be the value of the prediction curve corresponding to the second historical period at time i. i3 W1 is the value of the prediction curve corresponding to the third historical period at time i, W2 is the preset weight of the prediction curve corresponding to the first historical period, W3 is the preset weight of the prediction curve corresponding to the second historical period, and W4 is the preset weight of the prediction curve corresponding to the third historical period.
[0035] In one specific implementation, W1, W2, and W3 are preset. For example, W1=0.6 represents the recent normal state, W2=0.3 is used to correct for fluctuations in the weekly dimension, such as low traffic on weekends, and W1=0.1 is used as a long-tail reference.
[0036] In another specific implementation, the fluctuation of the three prediction curves is obtained by calculating the variance. The value obtained after normalizing the fluctuation of each curve is used as the preset weight of the corresponding prediction curve. The larger the variance, the greater the change and the greater the reference value. Therefore, the prediction curve with large variance is given a higher weight.
[0037] As mentioned above, by generating the target prediction baseline through weighted fusion of multi-period prediction curves, the load patterns of multiple time dimensions such as daily, weekly, and yearly can be comprehensively reflected, thereby obtaining a more stable and more realistic performance expectation for the migration period. This provides an accurate and reliable benchmark reference for risk identification and flow control, significantly improving the rationality of data migration planning and achieving a coexistence of migration efficiency and business stability.
[0038] S4, before the preset migration time period, determines whether there is a risk window in the future time period where the expected performance value is less than the preset business safety line but within the preset gap range or not less than the preset business safety line, based on the target prediction baseline. If so, a preset rate limiting strategy is executed before the risk window to dynamically adjust the database migration rate. This can be understood as follows: the future time period can be a time period with a given duration set by the user. The future risk window is judged within a given duration before the preset migration time period. If it is determined that there is a future time period where the expected performance value is close to or exceeds the preset business safety line, then the time period is marked as a risk window to tighten the migration rate in advance.
[0039] As mentioned above, by identifying and triggering rate limiting in advance based on the target prediction baseline before the risk window actually occurs, it is possible to achieve proactive protection of database performance, avoid the risk of business interruption caused by passive impact, and achieve reasonable coordination between migration tasks and business load while ensuring the stability of the source database.
[0040] In one specific embodiment, the preset rate limiting strategy includes the following: S401 calculates the real-time deviation between the comprehensive performance index and the target prediction baseline. When the real-time deviation exceeds a preset first deviation threshold, or when the cumulative value of the real-time deviation within a first preset time period exceeds a preset cumulative deviation threshold, a rapid suppression mechanism is triggered. Those skilled in the art can set the first deviation threshold and the cumulative deviation threshold according to actual needs. For example, the first deviation threshold may be a safety margin exceeding the expected performance value, which will not be elaborated here.
[0041] S402, when it is detected that the target prediction baseline will enter the risk window within a second preset time period in the future, the current flow limit is gradually reduced by a preset first adjustment step size, and the monitoring frequency of each preset key performance indicator is increased. For example, the second preset time period is set to 10~15 minutes, and the first adjustment step size is 20%, for example, from 100% of the flow limit to 80%.
[0042] Specifically, the rate limit is a parameter pre-configured by the user, such as the maximum number of concurrent threads or the maximum throughput.
[0043] S403: If the overall performance index is detected to be rising at the actual start of the risk window, a rapid suppression mechanism is triggered; otherwise, a slow start recovery mechanism is triggered.
[0044] S404: After the rapid suppression mechanism is triggered, each preset key performance indicator is continuously monitored. Within M consecutive monitoring periods, the absolute value of the real-time deviation between the comprehensive value of the performance indicator and the target prediction baseline in each monitoring period is less than the preset second deviation threshold, and the sequence of real-time deviations shows a non-positive trend, triggering the slow start recovery mechanism. This can be understood as: recovery is only allowed when the comprehensive value of the performance indicator is near the target prediction baseline for several consecutive monitoring periods and the trend is stable and improving.
[0045] Specifically, M is an integer greater than 1.
[0046] The aforementioned predictive rate limiting strategy, through a multi-level closed-loop control mechanism combining real-time deviation detection, risk window prediction, trend triggering, and conditional recovery, achieves dynamic regulation throughout the entire process, from passive response to proactive prevention and then to smooth recovery. It can not only quickly suppress performance anomalies to ensure system stability, but also avoid risks based on prediction, thereby reducing the business impact on the source database in advance and ensuring the safe and controllable recovery process.
[0047] Furthermore, the rapid inhibition mechanism includes the following: S10, when the triggering condition of the fast suppression mechanism is met, the current current limiting upper limit is lowered to a safe value according to the exponential decay function; wherein, the exponential decay function meets the following conditions: U1 = L + (CL) × exp(-α × λ), where U1 is the upper limit of the current limit adjusted to the safe value, L is the preset lower limit of the current limit, C is the current upper limit of the current limit before the adjustment, α is the preset attenuation coefficient, and λ is the adjustment factor. The adjustment factor is determined by a base component that is positively correlated with the deviation of the current measured comprehensive value of the performance index from the target prediction baseline, and a correction component that is correlated with the instantaneous slope of the target prediction baseline. It can be understood that the larger the deviation, the stronger the upward trend of the future load, and the larger the value of λ, resulting in a faster rate of adjustment. When the instantaneous slope is positive, the correction component strengthens the adjustment factor, and when the instantaneous slope is negative, the correction component weakens or maintains the adjustment factor.
[0048] In another implementation, adjustments can be made according to pre-set reduction rules, such as immediately reducing the current rate limit upper limit to a safe value close to the rate limit lower limit, such as adjusting it to 30% of the rate limit upper limit.
[0049] S20, based on a preset suppression time window, prohibits the execution of rate limiting recovery operations within the suppression time window after the rate reduction operation. Those skilled in the art can set the duration of the suppression time window according to actual needs, such as 10 seconds, to ensure that resources have sufficient time to fall back.
[0050] S30, if within or after the suppression time window, in N consecutive monitoring cycles, the deviation between the corresponding comprehensive performance index value and the target prediction baseline exceeds the previous monitoring cycle, and the deviation value corresponding to the last monitoring cycle exceeds the preset deviation threshold, then the current upper limit of the flow limit will continue to be adjusted downwards until the lower limit of the flow limit is reached or the migration task will be suspended; this can be understood as: if the comprehensive performance index value continues to deteriorate, the current upper limit of the flow limit will continue to be adjusted downwards until the lower limit of the flow limit is reached or the migration task will be suspended.
[0051] Specifically, N is an integer greater than 1.
[0052] As described above, this rapid suppression mechanism combines an exponential decay model with a dynamic adjustment factor to achieve rapid, smooth, and intelligent convergence of the current limiting rate. It can accurately calculate the reduction range based on the current deviation and future trend when a risk occurs. Huaneng prevents oscillations by suppressing the time window and automatically downgrades the rate step by step until it is suspended when the situation continues to deteriorate. This multi-level security ensures that the migration load is reduced to a controllable level in advance before the risk occurs, thus ensuring the high stability of the core business of the source database under sudden load pressure.
[0053] Furthermore, the slow start recovery mechanism includes the following: P10, when the slow start recovery mechanism trigger condition is met, the current rate limit is increased and restored according to a linearly increasing function; wherein, the linearly increasing function meets the following conditions: U2 = K + β × (SK), where U2 is the increased rate limit, K is the current rate limit before the increase, S is the preset original rate limit, and β is the increment step coefficient, and 0 < β < 1.
[0054] In another implementation, adjustments can be made according to pre-set recovery rules. For example, the initial recovery may increase the current rate limit to 40% of the original rate limit. If the overall performance index remains stable after recovery, the rate limit may be gradually increased to 60%, 80%, etc.
[0055] P20, after each upgrade operation, re-detects preset key performance indicators based on a preset observation time interval. If the overall value of the corresponding performance indicator is detected to exceed the preset recovery warning line, the upgraded rate limiting limit will be rolled back to the value before the upgrade. Those skilled in the art can set the preset observation time interval according to actual needs, which will not be elaborated here.
[0056] P30: If two consecutive boost operations trigger rollback operations, the subsequent observation interval will be extended, or the slow start recovery mechanism will be paused to await user confirmation.
[0057] As described above, the slow-start recovery mechanism adopts a small-scale, multiple-adjustment strategy. By combining a linear incremental model with conditional rollback, it reduces the oscillations caused by overly rapid recovery, achieves a stable and controllable increase in migration rate, and immediately rolls back once an anomaly is detected, further enhancing the robustness and security of the system. This ensures that after the risk is eliminated, the migration task can safely recover to optimal efficiency in a way that minimizes the impact on the source database.
[0058] Embodiments of the present invention also provide a non-transitory computer-readable storage medium that can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a method in the method embodiments, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the database migration method based on multiple prediction curves provided in the above embodiments.
[0059] Embodiments of the present invention also provide an electronic device, including a processor and the aforementioned non-transitory computer-readable storage medium.
[0060] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. It should also be understood that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.
Claims
1. A database migration method based on multiple prediction curves, characterized in that, The method includes the following steps: Data on several preset key performance indicators of the source database within a historical time period are collected at preset high-frequency sampling intervals. Based on several preset key performance indicator data, a set of prediction curves is periodically generated and updated; the set of prediction curves includes prediction curves generated based on the comprehensive values of several performance indicators at the same moment in the first historical period, the second historical period, and the third historical period, respectively; wherein, the duration of the first historical period, the second historical period, and the third historical period increases sequentially; the third historical period includes a preset landmark period covering several years; the comprehensive value of the performance indicators is calculated from the data of several preset key performance indicators; Based on the pre-acquired preset migration time period, several prediction curves in the prediction curve set are weighted and fused to calculate the expected performance value at each moment within the preset migration time period, forming the target prediction baseline. Before the preset migration period, the system determines whether there is a risk window in the future period where the expected performance value is less than the preset business safety line but within the preset gap range or not less than the preset business safety line, based on the target prediction baseline. If such a risk window exists, the system executes a preset rate limiting strategy before the risk window to dynamically adjust the database migration rate.
2. The database migration method based on multiple prediction curves according to claim 1, characterized in that, The preset key performance indicators include CPU utilization, log write rate, disk IOPS, core SQL response time, and network round-trip latency.
3. The database migration method based on multiple prediction curves according to claim 1, characterized in that, The prediction curve set includes daily trend prediction curves corresponding to the first historical period, weekly trend prediction curves corresponding to the second historical period, and annual trend prediction curves corresponding to the third historical period; wherein, the weekly trend prediction curves are generated in the following way: Obtain the comprehensive performance index value at the same time each week within the previous and second historical periods; For each moment in the current update cycle, the average value of several performance indicators corresponding to each moment is taken to obtain the expected performance value for that moment. Based on the expected performance value at each moment within the preset update cycle, the weekly trend prediction curve corresponding to the current update cycle is plotted.
4. The database migration method based on multiple prediction curves according to claim 1, characterized in that, The comprehensive performance index value is calculated by weighting and summing several normalized preset key performance index data and the preset weight coefficient corresponding to each preset key performance index; wherein, the preset weight coefficient corresponding to each preset key performance index is obtained through the following steps: Acquire time-series data of each preset key performance indicator and corresponding load status labeling information within the historical observation period; the load status labeling information includes high load periods and normal load periods. For each preset key performance indicator, feature values are extracted from high load periods and normal load periods to obtain high load sample sets and normal load sample sets. Calculate the distribution difference metric for each preset key performance indicator between the high load sample set and the normal load sample set, and use the distribution difference metric as the contribution score of the corresponding preset key performance indicator. The contribution scores of all preset key performance indicators are normalized to obtain the preset weight coefficients corresponding to each preset key performance indicator.
5. The database migration method based on multiple prediction curves according to claim 1, characterized in that, The expected performance value at any point within the preset migration time period meets the following conditions: F i =D i1 ×W1+D i2 ×W2+D i3 ×W3, where W1>W2>W3, and W1>W2+W3, F i Let D be the expected performance value at time i. i1 Let D be the value of the prediction curve corresponding to the first historical period at time i. i2 Let D be the value of the prediction curve corresponding to the second historical period at time i. i3 W1 is the value of the prediction curve corresponding to the third historical period at time i, W2 is the preset weight of the prediction curve corresponding to the first historical period, W3 is the preset weight of the prediction curve corresponding to the second historical period, and W4 is the preset weight of the prediction curve corresponding to the third historical period.
6. The database migration method based on multiple prediction curves according to claim 1, characterized in that, The preset rate limiting strategy includes the following: The real-time deviation between the comprehensive value of the performance index and the target prediction baseline is calculated in real time. When the real-time deviation exceeds the preset first deviation threshold, or when the cumulative value of the real-time deviation within the first preset time exceeds the preset cumulative deviation threshold, a fast suppression mechanism is triggered. When it is detected that the target prediction baseline will enter the risk window within the second preset time period in the future, the current flow limit will be gradually reduced by the preset first adjustment step size, and the monitoring frequency of each preset key performance indicator will be increased. If an upward trend in the overall performance index is detected at the actual start of the risk window, a rapid suppression mechanism is triggered; otherwise, a slow start recovery mechanism is triggered. After the rapid suppression mechanism is triggered, each preset key performance indicator is continuously monitored. Within M consecutive monitoring periods, the absolute value of the real-time deviation between the comprehensive value of the performance indicator and the target prediction baseline in each monitoring period is less than the preset second deviation threshold, and the sequence of real-time deviations shows a non-positive trend, triggering the slow start recovery mechanism, where M is an integer greater than 1.
7. The database migration method based on multiple prediction curves according to claim 6, characterized in that, The rapid inhibition mechanism includes the following: When the conditions for triggering the fast suppression mechanism are met, the current rate limiting upper limit is lowered to a safe value according to the exponential decay function; wherein, the exponential decay function meets the following conditions: U1 = L + (CL) × exp(-α × λ), where U1 is the upper limit of the current limit adjusted to the safe value, L is the preset lower limit of the current limit, C is the current upper limit of the current limit before the adjustment, α is the preset attenuation coefficient, and λ is the adjustment factor. The adjustment factor is determined by a basic component that is positively correlated with the deviation value of the current measured comprehensive value of the performance index exceeding the target prediction baseline, and a correction component that is correlated with the instantaneous slope of the target prediction baseline. Based on a preset suppression time window, the rate limiting recovery operation is prohibited within the suppression time window after the downsizing operation is performed; If, within or after the suppression time window, the deviation between the corresponding comprehensive value of the performance index and the target prediction baseline exceeds the previous monitoring period for N consecutive monitoring periods, and the deviation value corresponding to the last monitoring period exceeds the preset deviation threshold, then the current upper limit of the flow limit will continue to be adjusted downward until the lower limit of the flow limit is reached or the migration task will be suspended, where N is an integer greater than 1.
8. The database migration method based on multiple prediction curves according to claim 6, characterized in that, The slow start recovery mechanism includes the following: When the slow start recovery mechanism is triggered, the current rate limit is increased and restored according to a linearly increasing function; wherein the linearly increasing function meets the following conditions: U2 = K + β × (SK), where U2 is the increased rate limit, K is the current rate limit before the increase, S is the preset original rate limit, and β is the increment step coefficient, and 0 < β < 1. After each upgrade operation, the preset key performance indicators are re-detected based on the preset observation time interval. If the comprehensive value of the corresponding performance indicator is detected to exceed the preset recovery warning line, the upgraded rate limit will be rolled back to the value before the upgrade. If two consecutive boost operations trigger rollback operations, the subsequent observation interval will be extended, or the slow start recovery mechanism will be paused to await user confirmation.
9. A non-transitory computer-readable storage medium, wherein the storage medium stores at least one instruction or at least one program segment, characterized in that, The at least one instruction or the at least one program segment is loaded and executed by the processor to implement the database migration method based on multiple prediction curves as described in any one of claims 1-8.
10. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 9.