Method and device for controlling data volume in database disk and storage medium

By comprehensively analyzing the historical data volume, business needs and operation behavior of the database disk, and determining the data volume control strategy, the problem of accuracy and low efficiency of the database disk data volume control is solved, and more reasonable and secure data management is achieved.

CN119415036APending Publication Date: 2025-02-11PING AN INT FINANCIAL LEASING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411534995.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The prior art has problems with low accuracy and efficiency in the control of data volume in database disks, which can easily lead to the false deletion of important data and the untimely control of disk data volume.

Method used

By obtaining the historical data volume, expected business demand information, user operation behavior information, current data volume, disk storage space and data attribute information at multiple historical time points, we determine the data volume control strategy, including data cleaning, archiving and compression, and use these The policy controls the amount of data in the database disk in real time.

Benefits of technology

It improves the accuracy and efficiency of the control of the amount of data in the database disk, avoids the error deletion of important data, ensures reasonable control of the amount of data, and avoids disk corruption and data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415036A_ABST
    Figure CN119415036A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for controlling the data volume in a database disk and a storage medium. Comprising the following steps: in response to a real-time control signal in a controlled database disk, acquiring historical data volume of a plurality of historical time points in the controlled database disk, expected business demand information, operation behavior information for data in the controlled database disk, current data volume of the controlled database disk, disk storage space and data attribute information; determining a historical change trend of data in the controlled database disk based on the historical data volume of each historical time point, and predicting a predicted data change trend of the controlled database disk in a future preset time period based on the historical change trend, the expected business demand information and the operation behavior information; and determining a data volume control strategy based on the current data volume, the predicted data change trend, the disk storage space and the data attribute information, and controlling the data volume in the controlled database disk by using the data volume control strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a method, device and storage medium for controlling the amount of data in a database disk. Background Art

[0002] The database disk capacity is unlimited, and the system function becomes slower and slower as the amount of data increases. For example, in the medical insurance system, the increasing amount of medical insurance data will affect the speed of patient reimbursement, and in serious cases, the disk will be damaged. In another example, in the car rental system, the increasing amount of rental data in the disk will affect the system working speed. Based on this, it is particularly important to control the amount of data in the database disk.

[0003] At present, usually people check the remaining disk space periodically, and when the remaining space is small, they directly select some data in the disk for deletion. However, this way of controlling the disk data volume is likely to delete more important data in the disk due to negligence of the staff or uneven technical level, resulting in low accuracy of disk data volume control. At the same time, when manually selecting the data to be deleted, if the data volume is large, it will take a long time, resulting in low efficiency of disk data volume control. Summary of the invention

[0004] The present invention provides a method, device and storage medium for controlling the amount of data in a database disk, which are mainly capable of improving the control efficiency and control accuracy of the amount of data in the database disk and ensuring the storage effect of important data.

[0005] According to a first aspect of the present invention, there is provided a method for controlling the amount of data in a database disk, comprising:

[0006] In response to a real-time control signal of the data volume in the controlled database disk, the historical data volume at multiple historical time points in the controlled database disk, expected business demand information for the controlled database disk in a future preset time period, user operation behavior information for the data in the controlled database disk, the current data volume corresponding to the controlled database disk, the disk storage space of the controlled database disk, and data attribute information of the data in the controlled database disk are obtained;

[0007] Based on the amount of historical data at each of the historical time points, determine the historical change trend of the data in the controlled database disk, and based on the historical change trend, the expected business demand information, and the operation behavior information, predict the predicted data change trend of the controlled database disk within the future preset time period;

[0008] Based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information, a data volume control strategy corresponding to the controlled database disk is determined, and the data volume in the controlled database disk is controlled using the data volume control strategy.

[0009] Optionally, the data volume control strategy includes a data cleaning control strategy, a data archiving control strategy, and a data compression control strategy; the determining the data volume control strategy corresponding to the controlled database disk based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information includes:

[0010] Based on the current data volume, the predicted data change trend, and the disk storage space, respectively determine a first cleaning score corresponding to the data cleaning control strategy, a first archiving score corresponding to the data archiving control strategy, and a first compression score corresponding to the data compression control strategy;

[0011] Based on the data attribute information, respectively determine a second cleaning score corresponding to the data cleaning control strategy, a second archiving score corresponding to the data archiving control strategy, and a second compression score corresponding to the data compression control strategy;

[0012] Determine cleaning weight coefficients corresponding to the first cleaning score and the second cleaning score, respectively, archiving weight coefficients corresponding to the first archiving score and the second archiving score, respectively, and compression weight coefficients corresponding to the first compression score and the second compression score, respectively;

[0013] Based on the cleaning weight coefficient, the first cleaning score and the second cleaning score are added to obtain a comprehensive cleaning score corresponding to the data cleaning control policy; based on the archiving weight coefficient, the first archiving score and the second archiving score are added to obtain a comprehensive archiving score corresponding to the data archiving control policy; based on the compression weight coefficient, the first compression score and the second compression score are added to obtain a comprehensive compression score corresponding to the data compression control policy;

[0014] The highest score is determined among the comprehensive cleaning score, the comprehensive archiving score, and the comprehensive compression score, and the control strategy corresponding to the highest score is determined as the data volume control strategy corresponding to the controlled database disk.

[0015] Optionally, the data attribute information includes the importance, usage frequency, data type, timeliness, redundancy, recovery capability, and occupied space of various data in the controlled database disk;

[0016] The step of controlling the amount of data in the controlled database disk by using the data amount control strategy includes:

[0017] In the case where the data volume control strategy is a data cleaning control strategy, based on the importance, usage frequency, data type, timeliness, redundancy, and recovery capability of various data in the controlled database disk, determining the cleanability evaluation parameters of each data;

[0018] Based on the cleanability evaluation parameter, target cleanup data to be cleaned up is determined in each of the data, and the target cleanup data in the controlled database disk is cleaned up to control the amount of data in the controlled database disk;

[0019] In the case where the data volume control strategy is a data archiving control strategy, based on the usage frequency, data type, timeliness, and occupied space of various data in the controlled database disk, determining the archiving evaluation parameters of each data;

[0020] Based on the archivability evaluation parameter, target archived data to be archived is determined in each of the data, and the target archived data in the controlled database disk is archived to control the amount of data in the controlled database disk;

[0021] In the case where the data volume control strategy is a data compression control strategy, based on the importance, usage frequency, data type, and occupied space of various data in the controlled database disk, a compressibility evaluation parameter of each data is determined;

[0022] Based on the compressibility evaluation parameter, the target compressed data to be compressed is determined in each of the data, and the target compressed data in the controlled database disk is compressed to control the amount of data in the controlled database disk.

[0023] Optionally, before determining the data volume control strategy corresponding to the controlled database disk based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information, the method further includes:

[0024] Based on the current data volume, the predicted data change trend, and the disk storage space, it is determined whether the controlled database disk meets the preset conditions for data volume control, wherein the method for determining whether the controlled database disk meets the preset conditions for data volume control includes:

[0025] Based on the current data volume and the predicted data change trend, determine the predicted data volume within the future preset time period, and based on the data occupied space of the predicted data volume and the disk storage space, determine the usage rate of the controlled database disk within the future preset time period, if the usage rate is greater than a preset threshold, determine that the controlled database disk meets the preset conditions for data volume control, otherwise, determine that the controlled database disk does not meet the preset conditions for data volume control;

[0026] If the controlled database disk meets the preset condition, the data volume control strategy corresponding to the controlled database disk is determined based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information.

[0027] Optionally, the predicting the predicted data change trend of the controlled database disk within the future preset time period based on the historical change trend, the expected business demand information, and the operation behavior information includes:

[0028] The historical change trend, the expected business demand information, and the operation behavior information are input into a preset trend prediction model to perform trend prediction, and obtain the predicted data change trend of the controlled database disk within the future preset time period.

[0029] Optionally, before inputting the historical change trend, the expected business demand information, and the operation behavior information into a preset trend prediction model for trend prediction to obtain the predicted data change trend of the controlled database disk within the future preset time period, the method further includes:

[0030] constructing at least one preset initial trend prediction model;

[0031] Collecting a sample data set, wherein the sample data set includes a sample data volume change trend of a sample disk in a first historical time period, sample business demand information for the sample disk in a second historical time period, sample operation behavior information of a user for data in the sample disk, and an actual data volume change trend of the sample disk in the second historical period, wherein the first historical period is before the second historical period and is adjacent to the second historical period;

[0032] Based on the number of models of the preset initial trend prediction model, dividing the sample data set into multiple training sets and multiple test sets;

[0033] The corresponding preset initial trend prediction model is trained using each group of training sets, and the trained preset initial trend prediction model is tested using each group of test sets, and the trained preset initial trend prediction model that meets the test conditions is used as the preset trend prediction model.

[0034] Optionally, before determining the historical change trend of the data in the controlled database disk based on the historical data volume at each historical time point, the method further includes:

[0035] Sorting the historical data volume at each of the historical time points in ascending order of data volume to obtain the sorted historical data volume;

[0036] Determine the median corresponding to the sorted historical data volume, and determine a first intermediate value between the minimum value in the sorted historical data volume and the median, and determine the first intermediate value as the lower quartile corresponding to the historical data volume;

[0037] Determine a second intermediate value between the maximum value in the sorted historical data volume and the median, and determine the second intermediate value as the upper quartile corresponding to the historical data volume;

[0038] Calculate the distance between the upper quartile and the lower quartile to obtain the interquartile range corresponding to the historical data volume;

[0039] Calculating the lower limit value of abnormality detection of the historical data volume according to the lower quartile and the interquartile range;

[0040] Calculating an upper limit value of abnormality detection of the historical data volume according to the upper quartile and the interquartile range;

[0041] In the historical data volume at each of the historical time points, the data volume outside the abnormality detection lower limit value to the abnormality detection upper limit value is determined as the abnormal data volume, and the abnormal data volume in the historical data volume is removed to obtain the historical cleansed data volume;

[0042] The determining of the historical change trend of the data in the controlled database disk based on the historical data volume at each historical time point includes:

[0043] Based on the historical cleaning data volumes, a historical change trend of the data in the controlled database disk is determined.

[0044] According to a second aspect of the present invention, there is provided a device for controlling the amount of data in a database disk, comprising:

[0045] an acquisition unit, configured to respond to a real-time control signal of the data volume in a controlled database disk, acquire the historical data volume at multiple historical time points in the controlled database disk, expected business demand information for the controlled database disk in a future preset time period, user operation behavior information for the data in the controlled database disk, the current data volume corresponding to the controlled database disk, the disk storage space of the controlled database disk, and data attribute information of the data in the controlled database disk;

[0046] a determination unit, configured to determine a historical change trend of the data in the controlled database disk based on the amount of historical data at each of the historical time points, and to predict a predicted data change trend of the controlled database disk within the future preset time period based on the historical change trend, the expected business demand information, and the operation behavior information;

[0047] A control unit is used to determine the data volume control strategy corresponding to the controlled database disk based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information, and use the data volume control strategy to control the data volume in the controlled database disk.

[0048] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above method for controlling the amount of data in a database disk.

[0049] According to a fourth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method for controlling the amount of data in a database disk when executing the program.

[0050] According to a method, device and storage medium for controlling the amount of data in a database disk provided by the present invention, compared with the current method of manually periodically checking the remaining space of the disk and directly manually selecting certain data in the disk for deletion when the remaining space is small, the present invention determines the historical change trend of the data in the controlled database disk through the historical data volume at multiple historical time points in the controlled database disk, and predicts the predicted data change trend of the controlled database disk in the future preset time period based on the historical change trend, the expected business demand information for the controlled database disk in the future preset time period, and the user's operation behavior information for the data in the controlled database disk, and then determines the data volume control strategy corresponding to the controlled database disk based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information of the data in the disk, and uses the data volume control strategy to control the data volume in the controlled database disk, thereby controlling the historical change trend of the data in the controlled disk. The predicted data change trend of the data in the disk in the future period is determined by comprehensively analyzing the information of the current data volume, the predicted data change trend, the disk storage space, and the data attribute information of the data in the disk. This can avoid the problem of low prediction accuracy caused by predicting the future data change trend only based on the historical data volume. Therefore, the embodiment of the present invention can accurately predict the data change trend of the data in the disk in the future period. Then, the current data volume in the disk, the predicted data change trend, the disk storage space, and the data attribute information of the data in the disk are comprehensively analyzed to determine the data volume control strategy corresponding to the controlled database disk. Finally, the data volume control strategy is used to control the data volume in the disk. This can avoid the use of the unified method of manual deletion to control the disk data volume, resulting in untimely control and loss caused by mistaken deletion of some important data. Therefore, the embodiment of the present invention can reasonably control the disk data volume, avoid disk damage, ensure the effective preservation of important data in the disk, and improve the control efficiency of the disk data volume. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0052] Figure 1 A flow chart of a method for controlling the amount of data in a database disk provided by an embodiment of the present invention is shown;

[0053] Figure 2 A flow chart of another method for controlling the amount of data in a database disk provided by an embodiment of the present invention is shown;

[0054] Figure 3 A schematic diagram showing the structure of a device for controlling the amount of data in a database disk provided by an embodiment of the present invention is shown;

[0055] Figure 4 A schematic diagram showing the structure of another device for controlling the amount of data in a database disk provided by an embodiment of the present invention;

[0056] Figure 5 A schematic diagram of the physical structure of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0057] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0058] Currently, the remaining disk space is manually checked periodically. When the remaining space is small, some data in the disk is directly selected for deletion. This results in low accuracy in disk data volume control. At the same time, if the amount of data is large, it will take a long time, resulting in low efficiency in disk data volume control.

[0059] In order to solve the above problems, an embodiment of the present invention provides a method for controlling the amount of data in a database disk, such as Figure 1 As shown, the method includes:

[0060] 101. In response to a real-time control signal of the data volume in a controlled database disk, obtain the historical data volume of the controlled database disk at multiple historical time points, expected business demand information for the controlled database disk in a future preset time period, user operation behavior information for the data in the controlled database disk, the current data volume corresponding to the controlled database disk, the disk storage space of the controlled database disk, and data attribute information of the data in the controlled database disk.

[0061] Among them, the future preset time period is set according to actual needs, such as the next 5 days, the next 10 days, etc.; the expected business demand information refers to the future business growth plan of the enterprise using the controlled database disk, business type, user growth trend, future data type, data security needs, etc.; the operation behavior information refers to the frequency and scale of the user's query, write, delete and other operations on the controlled database disk; the data attribute information includes the importance, frequency of use, data type, timeliness, redundancy, recovery capability, occupied space, etc. of various data in the controlled database disk.

[0062] For the embodiment of the present invention, when a real-time control signal of the data volume in the controlled database disk is received, for example, when the data volume in the database disk in the medical insurance system needs to be controlled, the real-time control signal of the medical insurance data volume is triggered. After receiving the real-time control signal of the data volume, the historical data volume at multiple historical time points in the controlled database disk, the expected business demand information for the controlled database disk in the future preset time period, the user's operation behavior information for the data in the controlled database disk, the current data volume corresponding to the controlled database disk, the disk storage space of the controlled database disk, and the data attribute information of the data in the controlled database disk are first obtained in the medical insurance database. Then, the disk data volume is controlled by comprehensively analyzing the historical data volume, the expected business demand information, the operation behavior information, the current data volume, the disk storage space, and the data attribute information, which can improve the control accuracy of the disk data volume and avoid the accidental deletion of important data. At the same time, the embodiment of the present invention can avoid the situation of being unable to control when the disk data volume is large by monitoring and controlling the disk data volume in real time, avoid the damage of the disk due to the excessive data volume, and ensure the stable operation of the system, such as the medical insurance system.

[0063] It should be noted that the historical data volume, expected business demand information, operation behavior information, current data volume, disk storage space, and data attribute information obtained in this embodiment are not privacy data, but data related to disk data volume control (non-privacy data) that can be obtained.

[0064] 102. Based on the amount of historical data at each historical time point, determine the historical change trend of the data in the controlled database disk, and based on the historical change trend, expected business demand information, and operation behavior information, predict the predicted data change trend of the controlled database disk in a future preset time period.

[0065] For the embodiments of the present invention, based on the historical data volume at each historical time point, the changing trend of the historical data volume of the data in the controlled database disk over time, that is, the historical changing trend, can be determined. Then, based on the historical changing trend, expected business demand information, and operation behavior information, the changing trend of the data volume of the controlled database disk in a future preset time period is predicted, that is, the predicted data changing trend. By predicting the data changing trend of the disk in the future, the data volume in the disk can be reasonably planned, and storage resources can be more reasonably allocated to avoid resource waste. By predicting the changing trend of future data, the storage strategy can also be dynamically adjusted, such as increasing or decreasing the number of disks, optimizing the storage structure, etc., to improve storage efficiency and avoid the problem of disk uncontrollable when the disk data volume is very large.

[0066] 103. Based on the current data volume, predicted data change trend, disk storage space, and data attribute information, determine the data volume control strategy corresponding to the controlled database disk, and use the data volume control strategy to control the data volume in the controlled database disk.

[0067] Among them, data volume control strategies include data cleaning control strategies, data archiving control strategies, data compression control strategies, etc.

[0068] According to the embodiment of the present invention, after predicting the data change trend of the controlled database disk in the future, the current data volume, disk storage space, predicted data change trend, and data attribute information of the data in the controlled database disk are analyzed in real time. Based on the real-time analysis result, the real-time data volume control strategy corresponding to the controlled database disk is determined, and finally the data in the controlled database disk is controlled in real time using the real-time data volume control strategy. Thus, by analyzing the future change trend of the data in the disk and controlling the current data in the disk in advance according to the future change trend, the economic losses caused by the untimely control of the data volume in the disk can be avoided. At the same time, by comprehensively analyzing the current data volume, predicted data change trend, disk storage space, and data attribute information to determine the data volume control strategy corresponding to the controlled database disk, the accuracy of the data volume control strategy can be improved. By adopting a reasonable control strategy to control the disk data volume, the problem of poor control effect caused by disk data control based on a single data deletion method can be avoided, and the problem of low disk data volume control efficiency caused by manual control can also be solved. Therefore, the embodiment of the present invention can improve the control efficiency of the disk data volume.

[0069] According to a method for controlling the amount of data in a database disk provided by the present invention, compared with the current method of manually periodically checking the remaining space of the disk and directly manually selecting certain data in the disk for deletion when the remaining space is small, the present invention determines the historical change trend of the data in the controlled database disk through the historical data volume at multiple historical time points in the controlled database disk, and predicts the predicted data change trend of the controlled database disk in the future preset time period based on the historical change trend, the expected business demand information for the controlled database disk in the future preset time period, and the user's operation behavior information for the data in the controlled database disk, and then determines the data volume control strategy corresponding to the controlled database disk based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information of the data in the disk, and uses the data volume control strategy to control the data volume in the controlled database disk, thereby controlling the data volume in the controlled database disk by controlling the historical change trend of the data in the controlled disk, the expected business demand information for the controlled database disk in the future preset time period, and the user's operation behavior information for the data in the controlled database disk. A comprehensive analysis is performed on the business demand information and the operation behavior information to determine the predicted data change trend of the data in the disk in the future, which can avoid the problem of low prediction accuracy caused by predicting the future data change trend based only on the historical data volume. Therefore, the embodiment of the present invention can accurately predict the data change trend of the data in the disk in the future. Then, a comprehensive analysis is performed on the current data volume in the disk, the predicted data change trend, the disk storage space, and the data attribute information of the data in the disk to determine the data volume control strategy corresponding to the controlled database disk. Finally, the data volume control strategy is used to control the data volume in the disk, which can avoid the use of a unified method of manual deletion to control the disk data volume, resulting in untimely control and loss caused by mistaken deletion of some important data. Therefore, the embodiment of the present invention can reasonably control the disk data volume, avoid disk damage, ensure the effective preservation of important data in the disk, and improve the control efficiency of the disk data volume.

[0070] Further, in order to better illustrate the above process of controlling the amount of data in the database disk, as a refinement and extension of the above embodiment, the embodiment of the present invention provides another method for controlling the amount of data in the database disk, such as Figure 2 As shown, the method includes:

[0071] 201. In response to a real-time control signal of the data volume in a controlled database disk, obtain the historical data volume of the controlled database disk at multiple historical time points, expected business demand information for the controlled database disk in a future preset time period, user operation behavior information for the data in the controlled database disk, the current data volume corresponding to the controlled database disk, the disk storage space of the controlled database disk, and data attribute information of the data in the controlled database disk.

[0072] Specifically, when a real-time control signal of the data volume in the controlled database disk is received, the historical data volume at multiple historical time points in the controlled database disk, the expected business demand information for the controlled database disk in a preset time period in the future, the user's operation behavior information for the data in the controlled database disk, the current data volume corresponding to the controlled database disk, the disk storage space of the controlled database disk, and the data attribute information of the data in the controlled database disk are obtained in real time. Then, based on the above information, a data volume control strategy is determined, and the data volume control strategy is used to control the data volume in the controlled database disk.

[0073] 202. Based on the amount of historical data at each historical time point, determine the historical change trend of the data in the controlled database disk, and based on the historical change trend, expected business demand information, and operation behavior information, predict the predicted data change trend of the controlled database disk in a future preset time period.

[0074] For the embodiment of the present invention, in order to improve the accuracy of determining the historical change trend of data in the controlled database disk, it is first necessary to clean the historical data volume at each historical time point, that is, to eliminate the influence of abnormal data volume in the historical data volume on the historical change trend. Based on this, the method includes: sorting the historical data volume at each historical time point in order from small to large data volume to obtain the sorted historical data volume; determining the median corresponding to the sorted historical data volume, and determining the first intermediate value between the minimum value in the sorted historical data volume and the median, and determining the first intermediate value as the lower quartile corresponding to the historical data volume; determining the median of the sorted historical data volume a second intermediate value between the maximum value and the median, and determining the second intermediate value as the upper quartile corresponding to the historical data volume; calculating the distance between the upper quartile and the lower quartile to obtain the interquartile range corresponding to the historical data volume; calculating the lower limit value of anomaly detection of the historical data volume according to the lower quartile and the interquartile range; calculating the upper limit value of anomaly detection of the historical data volume according to the upper quartile and the interquartile range; in the historical data volume at each historical time point, determining the data volume outside the lower limit value of anomaly detection to the upper limit value of anomaly detection as the abnormal data volume, and eliminating the abnormal data volume in the historical data volume to obtain the historical cleaned data volume.

[0075] Specifically, firstly, the amount of historical data at each historical time point is sorted in order from small to large to obtain the sorted amount of historical data, and then the median Q2 of each sorted amount of historical data is determined, that is, the middle value in the data set, and based on the median, the lower quartile Q1 corresponding to the amount of historical data is determined, that is, the middle number between the minimum value and the median of each sorted amount of historical data; then, based on the median, the upper quartile Q3 corresponding to each sorted amount of historical data is determined, that is, the middle number between the median and the maximum value of each sorted amount of historical data; and the interquartile range IQR corresponding to each sorted amount of historical data is determined, that is, the distance between the lower quartile and the upper quartile; then, the upper limit value of anomaly detection upper=Q3+1.5*IQR and the lower limit value of anomaly detection lower=Q1 corresponding to each sorted amount of historical data are calculated. -1.5*IQR, and finally determine the data other than lower-upper in each sorted historical data volume, and determine the data other than lower-upper as abnormal data volume, and eliminate the abnormal data volume in each historical data volume to obtain the historical cleaned data volume, and finally determine the historical change trend of the data in the controlled database disk based on the historical cleaned data volume, so that before determining the change trend of the historical data, the historical data volume is cleaned, which can avoid the interference of abnormal data volume on the data change trend, thereby improving the accuracy of determining the historical change trend of the data in the controlled database disk.

[0076] Furthermore, after determining the historical change trend of the data in the controlled database disk, it is also necessary to predict the predicted data change trend of the controlled database disk within a future preset time period based on the historical change trend, expected business demand information, and operational behavior information. Based on this, step 202 specifically includes: inputting the historical change trend, the expected business demand information, and the operational behavior information into a preset trend prediction model for trend prediction, and obtaining the predicted data change trend of the controlled database disk within the future preset time period.

[0077] Specifically, the preset trend prediction model can be a model built based on a neural network architecture. In order to improve the prediction accuracy of the preset trend prediction model, it is first necessary to train and build the preset trend prediction model. Based on this, the method includes: building at least one preset initial trend prediction model; collecting a sample data set, wherein the sample data set includes a sample data volume change trend of a sample disk in a first historical time period, sample business demand information for the sample disk in a second historical time period, sample operation behavior information of a user for data in the sample disk, and an actual data volume change trend of the sample disk in the second historical period, wherein the first historical time period is before the second historical time period and is adjacent to the second historical time period; based on the number of models of the preset initial trend prediction model, dividing the sample data set into multiple training sets and multiple test sets; using each training set to train the corresponding preset initial trend prediction model, using each test set to test the trained preset initial trend prediction model, and using the trained preset initial trend prediction model that meets the test conditions as the preset trend prediction model.

[0078] Among them, sample business demand information refers to the business growth plan, business type, user growth trend, future data type, data security requirements, etc. of the enterprise to which the sample disk belongs during the second historical time period; sample operation behavior information refers to the frequency and scale of user operations such as querying, writing, and deleting data on the sample disk; sample data attribute information includes the importance, frequency of use, data type, timeliness, redundancy, recovery capability, and occupied space of various data on the sample disk.

[0079] Specifically, if a preset initial trend prediction model 1, a preset initial trend prediction model 2, and a preset initial trend prediction model 3 are constructed, the sample data set is divided into 3 training sets and 3 test sets. The preset initial trend prediction model 1 is trained using the training set 1, the preset initial trend prediction model 2 is trained using the training set 2, and the preset initial trend prediction model 3 is trained using the training set 3. The trained preset initial trend prediction model 1 is tested using the test set 1, the trained preset initial trend prediction model 2 is tested using the test set 2, and the trained preset initial trend prediction model 3 is tested using the test set 3. Finally, the model with the highest prediction accuracy is selected from each of the trained preset initial trend prediction models as the preset trend prediction model. Thus, the initial model is trained through the sample data set to obtain the preset trend prediction model, which can make the constructed preset trend prediction model more suitable for the prediction of the data change trend of the scenario, that is, improve the prediction accuracy of the predicted data change trend, thereby improving the control accuracy of the data amount on the disk.

[0080] Furthermore, after the preset trend prediction model is constructed, it is necessary to use the preset trend prediction model to predict the data volume change trend of the controlled database disk in the future preset time period. Based on this, the method includes: determining the trend feature vector corresponding to the historical change trend, the demand feature vector corresponding to the expected business demand information, and the operation feature vector corresponding to the operation behavior information; cross-processing the trend feature vector, the demand feature vector, and the operation feature vector to obtain a trend cross feature vector; inputting the trend cross feature vector into the preset trend prediction model for trend prediction, and obtaining the controlled database disk in the future preset time period. The prediction data change trend within, wherein the method of cross-processing the trend feature vector, the demand feature vector, and the operation feature vector to obtain the trend cross feature vector includes: performing feature-level cross-processing on the trend feature vector, the demand feature vector, and the operation feature vector to obtain a feature cross vector; performing element-level cross-processing on the trend feature vector, the demand feature vector, and the operation feature vector to obtain an element cross vector; performing low-order cross-processing on the trend feature vector, the demand feature vector, and the operation feature vector to obtain a low-order cross vector; combining the feature cross vector, the element cross vector, and the low-order cross vector to obtain the trend cross feature vector.

[0081] Specifically, word embedding and other methods are used to determine the trend feature vector corresponding to the historical change trend, the demand feature vector corresponding to the expected business demand information, and the operation feature vector corresponding to the operation behavior information. Then, in order to make full use of the relationship between the data, extract more implicit features, and take into account both high-order and low-order processing, so that the data can be used more fully and the prediction results obtained later are more accurate to meet the needs of actual application scenarios, it is necessary to cross-process the trend feature vector, demand feature vector, and operation feature vector. The specific cross-processing method is as follows: if the trend feature vector is (a1, a2), the demand feature vector is (b1, b2), and the operation feature vector is (c1, c2), the specific cross-processing method includes: cross-feature-level cross-over between different feature vectors, that is, after doing Hadamard product on all elements between the vectors, convolution is performed under certain weights. In exchange, the characteristic cross vector is f(w*(a1*b1*c1,a2*b2*c2,a3*b3*c3)); at the same time, all characteristic vector data are cross-linked at the element level, that is, each element between the vectors is cross-producted, and different weight values ​​are assigned to the results of each product, and then a linear transformation is performed, and the obtained element cross vector is f(w1*a1*b1*c1,w2*a2*b2*c2,w3*a3*b3*c3); in addition, all characteristic vectors are subjected to low-order cross processing, and weight coefficients are assigned to the results after the cross processing, and then a linear transformation is performed, and the obtained low-order cross vector is f(w2(a1,a2,b1,b2,c1,c2)); finally, the above characteristic cross vectors, element cross vectors, and low-order cross vectors are combined together, such as horizontal splicing, to obtain a trend cross characteristic vector. It should be noted that the above examples are only illustrative and do not limit the embodiments of the present application. Therefore, by cross-processing the trend feature vector, demand feature vector, and operation feature vector, different features can be automatically or explicitly combined to generate new feature combinations. These combined features may contain complex nonlinear relationships between the original features, so that the model can capture more detailed and rich information in the data, that is, it can make full use of the relationship between various data, extract more implicit features, and take into account both high-order and low-order processing, so that data utilization is more complete, and the data change trend results obtained later are more accurate, meeting the needs of actual application scenarios.

[0082] Furthermore, the trend cross feature vector is input into the prediction trend prediction model for trend prediction, and the prediction trend prediction model can output the predicted data change trend of the controlled database disk within a preset time period in the future.

[0083] 203. Based on the current data volume, the predicted data change trend, and the disk storage space, determine whether the controlled database disk meets the preset conditions for data volume control.

[0084] For the embodiment of the present invention, in order to save computing resources and avoid blindly performing data volume control, it is first necessary to determine whether the controlled database disk needs to perform data volume control. Based on this, step 203 specifically includes: based on the current data volume and the predicted data change trend, determining the predicted data volume in the future preset time period, based on the data occupied space of the predicted data volume and the disk storage space, determining the utilization rate of the controlled database disk in the future preset time period, if the utilization rate is greater than the preset threshold, it is determined that the controlled database disk meets the preset conditions for data volume control, otherwise, it is determined that the controlled database disk does not meet the preset conditions for data volume control.

[0085] The preset threshold is set according to actual needs. Specifically, first, according to the current data volume and the predicted data change trend, the predicted data volume of the disk in the future preset time period is predicted, the current data volume of the disk is added to the predicted data volume to obtain the overall data volume, the disk occupied space of the overall data volume is determined, and the disk occupied space is divided by the disk storage space to obtain the utilization rate of the controlled database disk in the future preset time period. If the utilization rate is high, that is, greater than the preset threshold, it is determined that the data volume in the disk needs to be controlled. If the utilization rate is low, that is, less than or equal to the preset threshold, it is determined that there is still a lot of storage space in this case, that is, the data volume in the disk does not need to be controlled. Therefore, by determining in advance whether the disk needs to be controlled, it can avoid wasting time and computing resources by calculating the data volume control strategy to control the data volume of the disk when the data volume in the disk does not need to be controlled.

[0086] 204. If the controlled database disk meets the preset conditions, a data volume control strategy corresponding to the controlled database disk is determined based on the current data volume, predicted data change trend, disk storage space, and data attribute information.

[0087] For the embodiment of the present invention, in the case where the amount of data in the controlled database disk needs to be controlled, it is necessary to predetermine the data amount control strategy corresponding to the controlled database disk. Based on this, step 204 specifically includes: based on the current data amount, the predicted data change trend, and the disk storage space, respectively determine the first cleaning score corresponding to the data cleaning control strategy, the first archiving score corresponding to the data archiving control strategy, and the first compression score corresponding to the data compression control strategy; based on the data attribute information, respectively determine the second cleaning score corresponding to the data cleaning control strategy, the second archiving score corresponding to the data archiving control strategy, and the second compression score corresponding to the data compression control strategy; determine the cleaning weight coefficients corresponding to the first cleaning score and the second cleaning score, the first archiving score and the second compression score, respectively. the archiving weight coefficients corresponding to the archiving scores, and the compression weight coefficients corresponding to the first compression score and the second compression score; based on the cleaning weight coefficient, the first cleaning score and the second cleaning score are added to obtain the comprehensive cleaning score corresponding to the data cleaning control strategy; based on the archiving weight coefficient, the first archiving score and the second archiving score are added to obtain the comprehensive archiving score corresponding to the data archiving control strategy; based on the compression weight coefficient, the first compression score and the second compression score are added to obtain the comprehensive compression score corresponding to the data compression control strategy; the highest score is determined among the comprehensive cleaning score, the comprehensive archiving score, and the comprehensive compression score, and the control strategy corresponding to the highest score is determined as the data volume control strategy corresponding to the controlled database disk.

[0088] Among them, the data cleaning control strategy mainly cleans up certain data in the disk that needs to be cleaned, the data archiving control strategy mainly archives the data that can be archived in the disk, and the data compression control strategy mainly compresses the data that can be compressed in the disk, so as to reduce the amount of data in the disk.

[0089] Specifically, the current data volume, predicted data change trend, and disk storage space can be input into the big model, and the first cleaning score corresponding to the data cleaning control strategy, the first archiving score corresponding to the data archiving control strategy, and the first compression score corresponding to the data compression control strategy can be determined through the big model. Similarly, the data attribute information can be analyzed based on the big model to determine the second cleaning score corresponding to the data cleaning control strategy, the second archiving score corresponding to the data archiving control strategy, and the second compression score corresponding to the data compression control strategy. If the actual needs set the cleaning weight coefficient of the first cleaning score to 0.4, the cleaning weight coefficient corresponding to the second cleaning score to 0.6, and the archiving weight coefficient of the first archiving score to 0.7, the archiving weight coefficient corresponding to the second archiving score to 0.3, and the first compression score to 0.4, the second archiving weight coefficient corresponding to the data compression control strategy can be set according to the actual needs. The compression weight coefficient of the compression score is 0.35, and the compression weight coefficient corresponding to the second compression score is 0.65. If the first cleaning score is 75 points, the second cleaning score is 65 points, the first archiving score is 85 points, the second archiving score is 65 points, the first compression score is 45 points, and the second compression score is 95 points, then the calculated comprehensive cleaning score is 69 points, the comprehensive archiving score is 79 points, and the comprehensive compression score is 77.5 points. Finally, the data archiving control strategy corresponding to the comprehensive archiving score is determined as the final data volume control strategy for data volume control of the disk, and the data archiving control strategy is used to control the data volume in the disk. Therefore, the data volume control strategy is determined by comprehensively analyzing the current data volume, predicted data change trend, disk storage space, and data attribute information, which can improve the control accuracy of the data volume in the disk.

[0090] 205. Use the data volume control strategy to control the data volume in the controlled database disk.

[0091] For the embodiment of the present invention, after determining the effective data volume control strategy corresponding to the controlled database disk, it is necessary to use the data volume control strategy to control the data volume in the disk. Based on this, step 205 specifically includes: when the data volume control strategy is a data cleaning control strategy, based on the importance, usage frequency, data type, timeliness, redundancy, and recovery capability of various data in the controlled database disk, determining the cleanability evaluation parameters of each of the data; based on the cleanability evaluation parameters, determining the target cleanup data that needs to be cleaned in each of the data, and cleaning the target cleanup data in the controlled database disk to achieve control of the data volume in the controlled database disk; when the data volume control strategy is a data archiving control strategy, based on various data in the controlled database disk The frequency of use of the data, the data type, the timeliness, the occupied space, and the archivable evaluation parameters of each of the data are determined; based on the archivable evaluation parameters, the target archived data that needs to be archived is determined in each of the data, and the target archived data in the controlled database disk is archived to control the data volume in the controlled database disk; when the data volume control strategy is a data compression control strategy, based on the importance, frequency of use, data type, and occupied space of various data in the controlled database disk, the compressible evaluation parameters of each of the data are determined; based on the compressible evaluation parameters, the target compressed data that needs to be compressed is determined in each of the data, and the target compressed data in the controlled database disk is compressed to control the data volume in the controlled database disk.

[0092] Specifically, if the data volume control strategy is a data cleaning control strategy, the cleanability evaluation parameters of various data in the disk are determined according to the importance, frequency of use, data type, timeliness, redundancy, and recovery capability in the attribute information of various data in the controlled disk. For example, if the importance of the data is higher, the corresponding cleanability evaluation parameter is lower; if the frequency of use of the data is higher, the corresponding cleanability evaluation parameter is lower; if the timeliness of the data is lower (that is, the validity period of the data is shorter), the corresponding cleanability evaluation parameter is higher; if the redundancy of the data is greater, the cleanability evaluation parameter of the redundant data is higher; if the recovery capability of the data is greater, the corresponding cleanability evaluation parameter is higher; then, the target cleanability evaluation parameter whose cleanability evaluation parameter among various data is greater than a preset parameter threshold (set according to actual needs) is determined, and the data corresponding to the target cleanability evaluation parameter is deleted from the disk, thereby achieving control of the data volume on the disk. The embodiment of the present invention selects data that can be deleted by performing a comprehensive analysis of the importance, usage frequency, data type, timeliness, redundancy, and recovery capability of various data, thereby avoiding irreparable losses caused by deleting important data and irrecoverable data, thereby improving the accuracy of data deletion and further improving the accuracy of controlling the amount of disk data.

[0093] Further, if the data volume control strategy is a data archiving control strategy, the archivable evaluation parameters of various data in the disk are determined according to the usage frequency, data type, timeliness, and occupied space in the attribute information of various data in the controlled disk. For example, if the data is used more frequently, the corresponding archivable evaluation parameter is lower; if the data has a lower timeliness (i.e., the data has a shorter validity period), the corresponding archivable evaluation parameter is higher; if the data occupies a larger space, the corresponding archivable evaluation parameter is higher. Then, the target archivable evaluation parameter whose archivable evaluation parameter is greater than a preset parameter threshold (set according to actual needs) among various data is determined, and the data corresponding to the target archivable evaluation parameter is archived, and the archived data is deleted from the disk, thereby realizing the control of the data volume on the disk. The embodiment of the present invention selects the data that can be archived by comprehensively analyzing the usage frequency, data type, timeliness, and occupied space of various data, which can avoid the defect that the frequently used data cannot be used in time due to archiving, thereby improving the archiving accuracy of the data, and further improving the control accuracy of the disk data volume.

[0094] Further, if the data volume control strategy is a data compression control strategy, the compressible evaluation parameters of various data in the disk are determined according to the importance, usage frequency, data type, and occupied space in the attribute information of various data in the controlled disk. For example, if the importance of the data is higher, the corresponding compressible evaluation parameter is lower. If the usage frequency of the data is more, the corresponding compressible evaluation parameter is lower. If the occupied space of the data is larger (i.e., the validity period of the data is shorter), the corresponding compressible evaluation parameter is higher. At the same time, some types of data are stipulated not to be compressed. Then, the target compressible evaluation parameter whose compressible evaluation parameter in various data is greater than the preset parameter threshold (set according to actual needs) is determined, and the data corresponding to the target compressible evaluation parameter is compressed to reduce the occupied space of the data volume in the disk. The embodiment of the present invention selects the data that can be compressed by comprehensively analyzing the importance, usage frequency, data type, and occupied space of various data, which can avoid the inability to access the important data and the data with higher usage frequency in time after compression, thereby improving the compression accuracy of the data, and further improving the control accuracy of the disk data volume.

[0095] According to another method for controlling the amount of data in a database disk provided by the present invention, compared with the current method of manually periodically checking the remaining space of the disk and directly manually selecting certain data in the disk for deletion when the remaining space is small, the present invention determines the historical change trend of the data in the controlled database disk through the historical data volume at multiple historical time points in the controlled database disk, and predicts the predicted data change trend of the controlled database disk in the future preset time period based on the historical change trend, the expected business demand information for the controlled database disk in the future preset time period, and the user's operation behavior information for the data in the controlled database disk, and then determines the data volume control strategy corresponding to the controlled database disk based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information of the data in the disk, and uses the data volume control strategy to control the data volume in the controlled database disk, thereby controlling the amount of data in the controlled database disk by controlling the historical change trend of the data in the controlled disk, the predicted business demand information for the controlled database disk in the future preset time period, and the user's operation behavior information for the data in the controlled database disk. The predicted data change trend of the data in the disk in the future is determined by comprehensively analyzing the business demand information and the operation behavior information in the future, which can avoid the problem of low prediction accuracy caused by predicting the future data change trend only based on the historical data volume. Therefore, the embodiment of the present invention can accurately predict the data change trend of the data in the disk in the future. Then, the current data volume in the disk, the predicted data change trend, the disk storage space, and the data attribute information of the data in the disk are comprehensively analyzed to determine the data volume control strategy corresponding to the controlled database disk. Finally, the data volume control strategy is used to control the data volume in the disk, which can avoid the use of the unified method of manual deletion to control the disk data volume, resulting in untimely control and loss caused by mistaken deletion of some important data. Therefore, the embodiment of the present invention can reasonably control the disk data volume, avoid disk damage, ensure the effective preservation of important data in the disk, and improve the control efficiency of the disk data volume.

[0096] Further, as Figure 1 The specific implementation of the present invention provides a device for controlling the amount of data in a database disk, such as Figure 3 As shown, the device includes: an acquisition unit 31, a determination unit 32, and a control unit 33.

[0097] The acquisition unit 31 can be used to respond to a real-time control signal of the data volume in the controlled database disk, and acquire the historical data volume in the controlled database disk at multiple historical time points, expected business demand information for the controlled database disk in a future preset time period, user operation behavior information for the data in the controlled database disk, the current data volume corresponding to the controlled database disk, the disk storage space of the controlled database disk, and data attribute information of the data in the controlled database disk.

[0098] The determination unit 32 can be used to determine the historical change trend of the data in the controlled database disk based on the historical data volume at each historical time point, and predict the predicted data change trend of the controlled database disk within the future preset time period based on the historical change trend, the expected business demand information, and the operation behavior information.

[0099] The control unit 33 can be used to determine the data volume control strategy corresponding to the controlled database disk based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information, and use the data volume control strategy to control the data volume in the controlled database disk.

[0100] In a specific application scenario, the data volume control strategy includes a data cleaning control strategy, a data archiving control strategy, and a data compression control strategy; in order to determine the data volume control strategy corresponding to the controlled database disk, such as Figure 4 As shown, the control unit 33 includes a determination module 331 and an addition module 332 .

[0101] The determination module 331 can be used to determine the first cleaning score corresponding to the data cleaning control strategy, the first archiving score corresponding to the data archiving control strategy, and the first compression score corresponding to the data compression control strategy based on the current data volume, the predicted data change trend, and the disk storage space.

[0102] The determination module 331 may also be used to determine, based on the data attribute information, a second cleaning score corresponding to the data cleaning control policy, a second archiving score corresponding to the data archiving control policy, and a second compression score corresponding to the data compression control policy.

[0103] The determination module 331 can also be used to determine the cleaning weight coefficients corresponding to the first cleaning score and the second cleaning score, the archiving weight coefficients corresponding to the first archiving score and the second archiving score, and the compression weight coefficients corresponding to the first compression score and the second compression score.

[0104] The adding module 332 can be used to add the first cleaning score and the second cleaning score based on the cleaning weight coefficient to obtain a comprehensive cleaning score corresponding to the data cleaning control strategy, add the first archiving score and the second archiving score based on the archiving weight coefficient to obtain a comprehensive archiving score corresponding to the data archiving control strategy, and add the first compression score and the second compression score based on the compression weight coefficient to obtain a comprehensive compression score corresponding to the data compression control strategy.

[0105] The determination module 331 may be specifically used to determine the highest score among the comprehensive cleaning score, the comprehensive archiving score, and the comprehensive compression score, and determine the control strategy corresponding to the highest score as the data volume control strategy corresponding to the controlled database disk.

[0106] In a specific application scenario, the data attribute information includes the importance, usage frequency, data type, timeliness, redundancy, recovery capability, and occupied space of various data in the controlled database disk; in order to control the amount of data in the controlled database disk, the control unit 33 also includes a cleaning module 333, an archiving module 334, and a compression module 335.

[0107] The determination module 331 can also be used to determine the cleanability evaluation parameters of each data based on the importance, usage frequency, data type, timeliness, redundancy, and recovery capability of various data in the controlled database disk when the data volume control strategy is a data cleansing control strategy.

[0108] The cleaning module 333 can be used to determine the target cleaning data that needs to be cleaned in each of the data based on the cleanability evaluation parameters, and clean the target cleaning data in the controlled database disk to control the amount of data in the controlled database disk.

[0109] The determination module 331 can also be used to determine the archivability evaluation parameters of each data based on the usage frequency, data type, timeliness, and occupied space of various data in the controlled database disk when the data volume control strategy is a data archiving control strategy.

[0110] The archiving module 334 can also be used to determine the target archiving data that needs to be archived in each of the data based on the archivable evaluation parameters, and archive the target archiving data in the controlled database disk to control the amount of data in the controlled database disk.

[0111] The determination module 331 can also be used to determine the compressibility evaluation parameters of each data based on the importance, usage frequency, data type, and occupied space of various data in the controlled database disk when the data volume control strategy is a data compression control strategy.

[0112] The compression module 335 can also be used to determine the target compressed data that needs to be compressed in each of the data based on the compressibility evaluation parameters, and compress the target compressed data in the controlled database disk to control the amount of data in the controlled database disk.

[0113] In a specific application scenario, in order to determine whether the controlled database disk meets the preset conditions for data volume control, the device further includes: a determination unit 34 .

[0114] The judgment unit 34 can be used to judge whether the controlled database disk meets the preset conditions for data volume control based on the current data volume, the predicted data change trend, and the disk storage space, wherein the method for judging whether the controlled database disk meets the preset conditions for data volume control includes: determining the predicted data volume in the future preset time period based on the current data volume and the predicted data change trend, and determining the usage rate of the controlled database disk in the future preset time period based on the data occupied space of the predicted data volume and the disk storage space; if the usage rate is greater than a preset threshold, it is judged that the controlled database disk meets the preset conditions for data volume control; otherwise, it is judged that the controlled database disk does not meet the preset conditions for data volume control.

[0115] The control unit 33 can be specifically used to determine the data volume control strategy corresponding to the controlled database disk based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information if the controlled database disk meets the preset conditions.

[0116] In a specific application scenario, in order to predict the predicted data change trend of the controlled database disk within a future preset time period, the determination unit 32 can be specifically used to input the historical change trend, the expected business demand information, and the operation behavior information into a preset trend prediction model for trend prediction, and obtain the predicted data change trend of the controlled database disk within the future preset time period.

[0117] In a specific application scenario, in order to construct a preset trend prediction model, the device further includes: a construction unit 35.

[0118] The construction unit 35 can be used to construct at least one preset initial trend prediction model; collect a sample data set, wherein the sample data set includes a sample data volume change trend of a sample disk in a first historical time period, sample business demand information for the sample disk in a second historical time period, sample operation behavior information of a user for data in the sample disk, and an actual data volume change trend of the sample disk in the second historical period, wherein the first historical time period is before the second historical time period and is adjacent to the second historical time period; based on the number of models of the preset initial trend prediction model, divide the sample data set into multiple training sets and multiple test sets; use each training set to train a corresponding preset initial trend prediction model, use each test set to test the trained preset initial trend prediction model, and use the trained preset initial trend prediction model that meets the test conditions as the preset trend prediction model.

[0119] In a specific application scenario, in order to clean the amount of historical data, the device further includes: a cleaning unit 36.

[0120] The cleaning unit 36 ​​can be used to sort the historical data volume of each historical time point in the order of data volume from small to large to obtain the sorted historical data volume; determine the median corresponding to the sorted historical data volume, and determine the first intermediate value between the minimum value in the sorted historical data volume and the median, and determine the first intermediate value as the lower quartile corresponding to the historical data volume; determine the second intermediate value between the maximum value in the sorted historical data volume and the median, and determine the second intermediate value as the upper quartile corresponding to the historical data volume; calculate the distance between the upper quartile and the lower quartile to obtain the interquartile range corresponding to the historical data volume; calculate the lower limit value of abnormality detection of the historical data volume according to the lower quartile and the interquartile range; calculate the upper limit value of abnormality detection of the historical data volume according to the upper quartile and the interquartile range; in the historical data volume of each historical time point, determine the data volume outside the lower limit value of abnormality detection to the upper limit value of abnormality detection as the abnormal data volume, and eliminate the abnormal data volume in the historical data volume to obtain the historical cleaning data volume.

[0121] In a specific application scenario, in order to determine the historical change trend of the data in the controlled database disk, the determination unit 32 may be specifically configured to determine the historical change trend of the data in the controlled database disk based on the historical cleansing data volumes.

[0122] It should be noted that for other corresponding descriptions of the functional modules involved in the device for controlling the amount of data in a database disk provided in an embodiment of the present invention, reference can be made to Figure 1 The corresponding description of the method shown will not be repeated here.

[0123] Based on the above Figure 1 The method shown, accordingly, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented: in response to a real-time control signal of the data volume in the controlled database disk, the historical data volume at multiple historical time points in the controlled database disk, the expected business demand information for the controlled database disk in a future preset time period, the user's operation behavior information for the data in the controlled database disk, the current data volume corresponding to the controlled database disk, the disk storage space of the controlled database disk, and the data attribute information of the data in the controlled database disk are obtained; based on the historical data volume at each of the historical time points, the historical change trend of the data in the controlled database disk is determined, and based on the historical change trend, the expected business demand information, and the operation behavior information, the predicted data change trend of the controlled database disk in the future preset time period is predicted; based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information, the data volume control strategy corresponding to the controlled database disk is determined, and the data volume in the controlled database disk is controlled by using the data volume control strategy.

[0124] Based on the above Figure 1 The method shown and Figure 3 The embodiment of the device shown in the figure, the embodiment of the present invention also provides a physical structure diagram of a computer device, such as Figure 5As shown, the computer device includes: a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43 and the processor 41 implements the following steps when executing the program: in response to a real-time control signal of the data volume in the controlled database disk, obtain the historical data volume at multiple historical time points in the controlled database disk, the expected business demand information for the controlled database disk in a preset time period in the future, the user's operation behavior information for the data in the controlled database disk, the current data volume corresponding to the controlled database disk, and the controlled database disk disk storage space of the controlled database disk, and data attribute information of the data in the controlled database disk; based on the historical data volume at each of the historical time points, determine the historical change trend of the data in the controlled database disk, and based on the historical change trend, the expected business demand information, and the operation behavior information, predict the predicted data change trend of the controlled database disk within the future preset time period; based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information, determine the data volume control strategy corresponding to the controlled database disk, and use the data volume control strategy to control the data volume in the controlled database disk.

[0125] Through the technical solution of the present invention, the present invention determines the historical change trend of the data in the controlled database disk through the historical data volume at multiple historical time points in the controlled database disk, and predicts the predicted data change trend of the controlled database disk in the future preset time period based on the historical change trend, the expected business demand information for the controlled database disk in the future preset time period, and the user's operation behavior information for the data in the controlled database disk. Then, based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information of the data in the disk, the data volume control strategy corresponding to the controlled database disk is determined, and the data volume control strategy is used to control the data volume in the controlled database disk, thereby determining the future change trend of the data in the disk through comprehensive analysis of the historical change trend of the data in the controlled disk, the expected business demand information, and the operation behavior information. Predicting data change trends over a period of time can avoid the problem of low prediction accuracy caused by predicting future data change trends based only on historical data volume. Therefore, the embodiment of the present invention can accurately predict the data change trend of data on the disk over a period of time in the future. Then, a comprehensive analysis is performed on the current data volume on the disk, the predicted data change trend, the disk storage space, and the data attribute information of the data on the disk to determine the data volume control strategy corresponding to the controlled database disk. Finally, the data volume control strategy is used to control the data volume on the disk. This can avoid the use of a unified method of manual deletion to control the disk data volume, resulting in untimely control and loss caused by accidental deletion of some important data. Therefore, the embodiment of the present invention can reasonably control the disk data volume, avoid disk damage, ensure the effective preservation of important data on the disk, and improve the control efficiency of the disk data volume.

[0126] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0127] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for controlling the amount of data in a database disk, characterized in that: include: In response to a real-time control signal of the data volume in the controlled database disk, the historical data volume at multiple historical time points in the controlled database disk, expected business demand information for the controlled database disk in a future preset time period, user operation behavior information for the data in the controlled database disk, the current data volume corresponding to the controlled database disk, the disk storage space of the controlled database disk, and data attribute information of the data in the controlled database disk are obtained; Based on the amount of historical data at each of the historical time points, determine the historical change trend of the data in the controlled database disk, and based on the historical change trend, the expected business demand information, and the operation behavior information, predict the predicted data change trend of the controlled database disk within the future preset time period; Based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information, a data volume control strategy corresponding to the controlled database disk is determined, and the data volume in the controlled database disk is controlled using the data volume control strategy.

2. The method according to claim 1, characterized in that The data volume control strategy includes a data cleaning control strategy, a data archiving control strategy, and a data compression control strategy; the data volume control strategy corresponding to the controlled database disk is determined based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information, including: Based on the current data volume, the predicted data change trend, and the disk storage space, respectively determine a first cleaning score corresponding to the data cleaning control strategy, a first archiving score corresponding to the data archiving control strategy, and a first compression score corresponding to the data compression control strategy; Based on the data attribute information, respectively determine a second cleaning score corresponding to the data cleaning control strategy, a second archiving score corresponding to the data archiving control strategy, and a second compression score corresponding to the data compression control strategy; Determine cleaning weight coefficients corresponding to the first cleaning score and the second cleaning score, respectively, archiving weight coefficients corresponding to the first archiving score and the second archiving score, respectively, and compression weight coefficients corresponding to the first compression score and the second compression score, respectively; Based on the cleaning weight coefficient, the first cleaning score and the second cleaning score are added to obtain a comprehensive cleaning score corresponding to the data cleaning control policy; based on the archiving weight coefficient, the first archiving score and the second archiving score are added to obtain a comprehensive archiving score corresponding to the data archiving control policy; based on the compression weight coefficient, the first compression score and the second compression score are added to obtain a comprehensive compression score corresponding to the data compression control policy; The highest score is determined among the comprehensive cleaning score, the comprehensive archiving score, and the comprehensive compression score, and the control strategy corresponding to the highest score is determined as the data volume control strategy corresponding to the controlled database disk.

3. The method according to claim 1, characterized in that The data attribute information includes the importance, usage frequency, data type, timeliness, redundancy, recovery capability, and occupied space of various data in the controlled database disk; The step of controlling the amount of data in the controlled database disk by using the data amount control strategy includes: In the case where the data volume control strategy is a data cleaning control strategy, based on the importance, usage frequency, data type, timeliness, redundancy, and recovery capability of various data in the controlled database disk, determining the cleanability evaluation parameters of each data; Based on the cleanability evaluation parameter, target cleanup data to be cleaned up is determined in each of the data, and the target cleanup data in the controlled database disk is cleaned up to control the amount of data in the controlled database disk; In the case where the data volume control strategy is a data archiving control strategy, based on the usage frequency, data type, timeliness, and occupied space of various data in the controlled database disk, determining the archiving evaluation parameters of each data; Based on the archivability evaluation parameter, target archived data to be archived is determined in each of the data, and the target archived data in the controlled database disk is archived to control the amount of data in the controlled database disk; In the case where the data volume control strategy is a data compression control strategy, based on the importance, usage frequency, data type, and occupied space of various data in the controlled database disk, a compressibility evaluation parameter of each data is determined; Based on the compressibility evaluation parameter, the target compressed data to be compressed is determined in each of the data, and the target compressed data in the controlled database disk is compressed to control the amount of data in the controlled database disk.

4. The method according to claim 1, characterized in that Before determining the data volume control strategy corresponding to the controlled database disk based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information, the method further includes: Based on the current data volume, the predicted data change trend, and the disk storage space, it is determined whether the controlled database disk meets the preset conditions for data volume control, wherein the method for determining whether the controlled database disk meets the preset conditions for data volume control includes: Based on the current data volume and the predicted data change trend, determine the predicted data volume within the future preset time period, and based on the data occupied space of the predicted data volume and the disk storage space, determine the usage rate of the controlled database disk within the future preset time period, if the usage rate is greater than a preset threshold, determine that the controlled database disk meets the preset conditions for data volume control, otherwise, determine that the controlled database disk does not meet the preset conditions for data volume control; If the controlled database disk meets the preset condition, the data volume control strategy corresponding to the controlled database disk is determined based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information.

5. The method according to claim 1, characterized in that: The predicting of the predicted data change trend of the controlled database disk within the future preset time period based on the historical change trend, the expected business demand information, and the operation behavior information includes: The historical change trend, the expected business demand information, and the operation behavior information are input into a preset trend prediction model to perform trend prediction, and obtain the predicted data change trend of the controlled database disk within the future preset time period.

6. The method according to claim 5, characterized in that Before inputting the historical change trend, the expected business demand information, and the operation behavior information into a preset trend prediction model for trend prediction to obtain the predicted data change trend of the controlled database disk within the future preset time period, the method further includes: constructing at least one preset initial trend prediction model; Collecting a sample data set, wherein the sample data set includes a sample data volume change trend of a sample disk in a first historical time period, sample business demand information for the sample disk in a second historical time period, sample operation behavior information of a user for data in the sample disk, and an actual data volume change trend of the sample disk in the second historical period, wherein the first historical period is before the second historical period and is adjacent to the second historical period; Based on the number of models of the preset initial trend prediction model, dividing the sample data set into multiple training sets and multiple test sets; The corresponding preset initial trend prediction model is trained using each group of training sets, and the trained preset initial trend prediction model is tested using each group of test sets, and the trained preset initial trend prediction model that meets the test conditions is used as the preset trend prediction model.

7. The method according to claim 1, characterized in that Before determining the historical change trend of the data in the controlled database disk based on the historical data volume at each historical time point, the method further includes: Sorting the historical data volume at each of the historical time points in ascending order of data volume to obtain the sorted historical data volume; Determine the median corresponding to the sorted historical data volume, and determine a first intermediate value between the minimum value in the sorted historical data volume and the median, and determine the first intermediate value as the lower quartile corresponding to the historical data volume; Determine a second intermediate value between the maximum value in the sorted historical data volume and the median, and determine the second intermediate value as the upper quartile corresponding to the historical data volume; Calculate the distance between the upper quartile and the lower quartile to obtain the interquartile range corresponding to the historical data volume; Calculating the lower limit value of abnormality detection of the historical data volume according to the lower quartile and the interquartile range; Calculating an upper limit value of abnormality detection of the historical data volume according to the upper quartile and the interquartile range; In the historical data volume at each of the historical time points, the data volume outside the abnormality detection lower limit value to the abnormality detection upper limit value is determined as the abnormal data volume, and the abnormal data volume in the historical data volume is removed to obtain the historical cleansed data volume; The determining of the historical change trend of the data in the controlled database disk based on the historical data volume at each historical time point includes: Based on the historical cleaning data volumes, a historical change trend of the data in the controlled database disk is determined.

8. A device for controlling the amount of data in a database disk, characterized in that: include: an acquisition unit, configured to respond to a real-time control signal of the data volume in a controlled database disk, acquire the historical data volume at multiple historical time points in the controlled database disk, expected business demand information for the controlled database disk in a future preset time period, user operation behavior information for the data in the controlled database disk, the current data volume corresponding to the controlled database disk, the disk storage space of the controlled database disk, and data attribute information of the data in the controlled database disk; a determination unit, configured to determine a historical change trend of the data in the controlled database disk based on the amount of historical data at each of the historical time points, and to predict a predicted data change trend of the controlled database disk within the future preset time period based on the historical change trend, the expected business demand information, and the operation behavior information; A control unit is used to determine the data volume control strategy corresponding to the controlled database disk based on the current data volume, the predicted data change trend, the disk storage space, and the data attribute information, and use the data volume control strategy to control the data volume in the controlled database disk.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.