Data storage space capacity control method and device, equipment, medium and product
By calculating the relative proximity and space evaluation index of the data storage space, the adjustment capacity is automatically determined, which solves the problem of manual monitoring dependence in the existing technology, realizes automatic intelligent adjustment of the data storage space, and improves the efficiency of capacity adjustment.
Patent Information
- Application Number
- CN202410490835.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2024-10-18
AI Technical Summary
The existing technology requires manual monitoring of the usage of data storage space and relies on manual experience for capacity adjustment, resulting in low capacity adjustment efficiency and affecting data storage and business performance.
By obtaining the relative proximity of the data storage space, using space evaluation indicators such as data call frequency, importance and backup and recovery complexity, combined with the approximate ideal point sorting algorithm to calculate the relative proximity, automatically determine the adjustment capacity, and monitor the space utilization in real time to Implement automatic capacity control.
It realizes automatic and intelligent adjustment of data storage space capacity, improves capacity adjustment efficiency, reduces manual intervention, and improves data storage space management efficiency.
Smart Images

Figure CN118796113A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data storage space capacity control method, device, equipment, medium and product. Background Art
[0002] With the development of science and technology, the application of various data is becoming more and more extensive, and the management of data storage space is becoming more and more important. In the prior art, the capacity of the data storage space (i.e., the size of the space) is usually pre-set by manual allocation, and when adjustment is needed (for example, space expansion is needed), the capacity of the data storage space is usually also adjusted by manual allocation. The problem with the prior art is that it is necessary to manually monitor the usage of the data storage space in real time and adjust the capacity of the data storage space based on experience. If the monitoring personnel do not pay attention in time or lack experience, it is impossible to control the capacity of the data storage space in time, which is not conducive to improving the efficiency of data storage space capacity adjustment, thereby affecting data storage, and may further affect business performance.
[0003] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention
[0004] The present invention provides a data storage space capacity control method, device, equipment, medium and product to solve the technical problems in the prior art that manual monitoring of data storage space usage is required and capacity adjustment of data space depends on manual experience, which is not conducive to improving the efficiency of data storage space capacity adjustment. The present invention realizes automatic adjustment of data storage space capacity and improves the efficiency of data storage space capacity adjustment.
[0005] The present invention provides a data storage space capacity control method, comprising:
[0006] Acquire a relative proximity corresponding to each data storage space, wherein the relative proximity is used to characterize the degree of proximity between the current space capacity of the data storage space and an ideal solution of the space capacity;
[0007] Determining, according to the relative proximity, an adjustment capacity corresponding to each of the data storage spaces;
[0008] According to the adjustment capacity corresponding to each of the data storage spaces, the space capacity of each of the data storage spaces is controlled respectively.
[0009] According to a data storage space capacity control method provided by the present invention, the obtaining of the relative proximity corresponding to each data storage space includes:
[0010] Respectively obtain space evaluation indicators corresponding to each of the data storage spaces, wherein the space evaluation indicators include data call frequency, data importance and data backup and recovery complexity;
[0011] According to the space evaluation index corresponding to each of the data storage spaces, the relative proximity corresponding to each of the data storage spaces is obtained by calculation through an approximate ideal point sorting algorithm.
[0012] According to a data storage space capacity control method provided by the present invention, before obtaining the relative proximity corresponding to each data storage space, the method further includes:
[0013] Real-time monitoring of the space utilization rate corresponding to each of the data storage spaces;
[0014] If the space utilization rate exceeds a preset space utilization threshold, the step of obtaining the relative proximity corresponding to each of the data storage spaces is performed.
[0015] According to a data storage space capacity control method provided by the present invention, determining the adjustment capacity corresponding to each data storage space according to the relative proximity comprises:
[0016] If the relative proximity corresponding to the data storage space is less than a preset proximity threshold, data cleaning is performed on the data storage space;
[0017] If the relative proximity corresponding to the data storage space is not less than a preset proximity threshold, the adjustment capacity corresponding to the data storage space is determined according to the relative proximity corresponding to the data storage space, the overall remaining available storage capacity and the preset single minimum expansion capacity.
[0018] According to a data storage space capacity control method provided by the present invention, the adjustment capacity corresponding to the data storage space is determined according to the relative proximity corresponding to the data storage space, the overall remaining available storage capacity and the preset single minimum expansion capacity, including:
[0019] Adding the relative proximities corresponding to all the data storage spaces to obtain a total proximity;
[0020] For each data storage space, calculate the proximity ratio corresponding to the data storage space according to the relative proximity corresponding to the data storage space and the total proximity;
[0021] The product of the overall remaining available storage capacity and the proximity ratio is calculated as the candidate expansion space capacity corresponding to the data storage space, and the larger one of the candidate expansion space capacity and the single minimum expansion capacity is used as the adjustment capacity corresponding to the data storage space.
[0022] According to a data storage space capacity control method provided by the present invention, before controlling the space capacity of each data storage space according to the adjustment capacity corresponding to each data storage space, the method further includes:
[0023] Determining the capacity expansion priority corresponding to each of the data storage spaces according to the relative proximity corresponding to each of the data storage spaces;
[0024] The controlling the space capacity of each data storage space according to the adjustment capacity corresponding to each data storage space comprises:
[0025] According to the priority and adjustment capacity corresponding to each of the data storage spaces, the space capacity of each of the data storage spaces is controlled in turn.
[0026] The present invention also provides a data storage space capacity control device, comprising:
[0027] A relative proximity acquisition module, used to acquire the relative proximity corresponding to each data storage space, wherein the relative proximity is used to characterize the degree of proximity between the current space capacity of the data storage space and the ideal solution of the space capacity;
[0028] An adjustment capacity determination module, configured to determine an adjustment capacity corresponding to each of the data storage spaces according to the relative proximity;
[0029] The capacity control module is used to control the space capacity of each data storage space according to the adjustment capacity corresponding to each data storage space.
[0030] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-mentioned data storage space capacity control methods when executing the program.
[0031] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned data storage space capacity control methods is implemented.
[0032] The present invention also provides a computer program product, comprising a computer program, which implements any of the above-mentioned data storage space capacity control methods when executed by a processor.
[0033] The present invention provides a data storage space capacity control method, device, equipment, medium and product, which obtains the relative proximity corresponding to each data storage space, wherein the relative proximity is used to characterize the degree of proximity between the current space capacity of the data storage space and the ideal solution of the space capacity; according to the relative proximity, the adjustment capacity corresponding to each data storage space is determined; according to the adjustment capacity corresponding to each data storage space, the space capacity of each data storage space is controlled respectively. In this way, the relative proximity corresponding to the data storage space can be automatically obtained, so that the adjustment capacity corresponding to each data storage space is automatically determined according to the relative proximity, and the space capacity of the data storage space is automatically controlled according to the adjustment capacity, without relying on manual monitoring and adjustment, and automatic intelligent adjustment of the data storage space capacity can be achieved, which is conducive to improving the efficiency of data storage space capacity control. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 It is a schematic diagram of the corresponding relationship between the logical and physical storage structures of a database provided by the present invention;
[0036] Figure 2 This is one of the flow diagrams of the data storage space capacity control method provided by the present invention;
[0037] Figure 3 It is a schematic diagram of the distribution relationship between a database table space and a table provided by an embodiment of the present invention;
[0038] Figure 4 It is a schematic diagram of a processing flow of intelligent allocation when table space is insufficient provided by the present invention;
[0039] Figure 5 This is a second flow chart of a method for controlling the capacity of data storage space provided by the present invention;
[0040] Figure 6 It is a structural schematic diagram of the data storage space capacity control device provided by the present invention;
[0041] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] At present, the application of database is becoming more and more extensive. Database is a warehouse for storing data, supporting real-time reading and writing of business data. The stable operation of various businesses in the support system of various businesses also depends on the support of database. In the database, multiple data storage spaces (such as table spaces) can be divided to store different data (such as data tables).
[0044] Figure 1 It is a schematic diagram of the corresponding relationship between the logical and physical storage structures of a database provided by the present invention, such as Figure 1 As shown in the figure, in a commonly used database of a system, all data is stored in the table space from a logical structure point of view, and there are logical structures such as segments, zones, and blocks under the table space. From a physical structure point of view, it is placed in the data file. During the system operation and maintenance process, problems such as program execution errors, data cannot be written, and storage errors often occur. The most common reason is insufficient storage allocation or unreasonable table space allocation.
[0045] In one application scenario, the automatic tablespace expansion function of a few mainstream databases can be used. Specifically, the syntax for turning on the automatic expansion function is: alter database datafile' corresponding data file path information' autoextend on; the syntax for turning off the automatic expansion function is: alter database datafile' corresponding data file path information' autoextend off. However, the above solution does not combine the intelligent expansion strategy of the business. The automatic expansion of the tablespace will cause problems such as excessive data files, database congestion, and poor file I / O performance. Currently, most database administrators do not turn on the automatic expansion function of the tablespace. However, with the increase in system business volume, the improvement of system carrying capacity and requirements, the manual allocation of tablespaces cannot meet the system requirements in terms of timeliness and efficiency. In particular, the tablespace of key tables is prone to insufficient space due to the inability to intelligently allocate space, which in turn causes the inability to store key data in a timely manner, resulting in large economic losses.
[0046] In one application scenario, the existing production system tablespace is managed by manual allocation. The usage rate of all production database tablespaces is monitored. When the usage rate exceeds the threshold, the database administrator (DBA) is notified in the form of an alarm. The DBA generally adopts the strategy of expanding the tablespace to add data files or cleaning the tablespace (it is necessary to contact the business manager to verify which ones can be cleaned up). If the data tablespace cannot be automatically expanded, it will cause: First, there will be no remaining space to be used, resulting in the inability to write or import data. Second, it is necessary to manually monitor the usage of key tablespaces in real time and add data files in time when the tablespace is insufficient. If there is a possibility of key data loss during cleaning, manual intervention, cost and risk will be very high. Third, if the temporary tablespace or rollback segment tablespace is insufficient, it will cause frequent flushing of sorted data or front mirror data, resulting in performance degradation.
[0047] However, the automatic expansion solution of tablespace based on the automatic expansion function syntax has the following disadvantages: First, when the tablespace is insufficient, each time data is written, it is necessary to expand the data file, make an operating system-level adjustment, and adjust the values of various data dictionaries (such as the number of zones and other parameters), which is very resource-consuming and greatly consumes system performance. Second, if the database tablespace is allowed to expand automatically, a certain data file will become abnormally large as the amount of data continues to increase. Third, the automatic expansion of the tablespace will cause problems such as database jamming and poor file I / O performance when the business volume is large. Fourth, the automatic expansion of the tablespace, especially the expansion without any size restriction, will cause the utilization rate of a certain space to reach 100%, causing the database to hang and affecting the production system. Fifth, unreasonable addition of tablespace (automatically adding a quota of data files every time it is insufficient without giving the tablespace according to the criticality of the business data information, etc.) will lead to a waste of resources.
[0048] In order to solve at least one of the above-mentioned problems, an embodiment of the present invention provides a data storage space capacity control method. Figure 2-Figure 5 The data storage space capacity control method provided by the present invention is described as follows: Figure 2 As shown, the method comprises the steps of:
[0049] S210, obtaining a relative proximity corresponding to each data storage space, wherein the relative proximity is used to represent the degree of proximity between the current space capacity of the data storage space and an ideal solution of the space capacity;
[0050] S220, determining an adjustment capacity corresponding to each of the data storage spaces according to the relative proximity;
[0051] S230 , respectively controlling the space capacity of each of the data storage spaces according to the adjustment capacity corresponding to each of the data storage spaces.
[0052] The method provided by the present invention can realize automatic acquisition of the relative proximity corresponding to the data storage space, thereby automatically determining the adjustment capacity corresponding to each data storage space according to the relative proximity, and automatically controlling the space capacity of the data storage space according to the adjustment capacity, without relying on manual monitoring and adjustment, and can realize automatic intelligent adjustment of the data storage space capacity, which is beneficial to improving the efficiency of data storage space capacity control.
[0053] Among them, the data storage space is a data storage space that requires space capacity control. In the embodiment of the present invention, the data storage space is taken as a table space as an example for specific description. In actual use, the data storage space can also be other types of data storage space, which is not specifically limited here.
[0054] The current capacity of the data storage space is the current data space size of each table space, and the ideal solution of the space capacity is the ideal solution of the space capacity of each table space. Specifically, the ideal solution is the best solution envisioned, and its various attribute values reach the best values among the alternative solutions. That is, the ideal solution of the space capacity is the optimal space capacity under ideal conditions. Among them, the ideal solution of the space capacity can be pre-set according to actual needs, and can also be calculated and determined according to the actual conditions of each data storage space (i.e., table space). In an embodiment of the present invention, the ideal solution of the space capacity is calculated and determined according to the approximate ideal point sorting method.
[0055] After determining the adjustment capacity corresponding to the data storage space, the capacity of the data storage space can be adjusted according to the adjustment capacity. It should be noted that the value of the adjustment capacity can be a positive number, a negative number or 0. When the value of the adjustment capacity is a positive number, it indicates that the capacity of the data storage space needs to be increased, that is, the space capacity is expanded. When the value of the adjustment capacity is a negative number, it indicates that the capacity of the data storage space needs to be reduced, that is, the space capacity is reduced. When the value of the adjustment capacity is 0, it indicates that the capacity of the data storage space does not need to be adjusted. In the embodiment of the present invention, the value of the adjustment capacity is a positive number or 0 as an example for specific description, but it is not a specific limitation.
[0056] Specifically, this embodiment provides a method for intelligently allocating tablespace in a database, which calculates various factors affecting the tablespace through an approximate ideal point sorting algorithm to obtain the influencing factors of various factors, and determines whether the tablespace needs to be expanded based on the size of the influencing factors. If expansion is required, the system automatically calculates the size required to be expanded to achieve intelligent allocation of the tablespace. The use of logical judgment breaks through the limitations of automatic expansion of tablespace, avoids resource waste and unnecessary performance consumption; at the same time, it can automatically decide whether the tablespace needs to be expanded based on the actual situation of the production system to reduce manual intervention and achieve intelligent operation and maintenance.
[0057] The management of tablespace includes two expansion methods: expanding tablespace to add data files or clearing tablespace. Specifically, the main influencing factors for the question of whether to expand or clear tablespace are as follows: the call frequency of data tables on the tablespace, the importance of data, the retention policy of each data table, the complexity of backup and recovery, etc. In the embodiment of the present invention, the importance of each business table on the tablespace, the call frequency and the retention policy of the data table are comprehensively considered, and the influencing factors of each factor are obtained by calculating through the approximate ideal point sorting algorithm. The size of the influencing factor is used to determine whether the tablespace needs to be expanded. If expansion is required, the system automatically selects the size to be expanded to realize intelligent allocation of tablespace.
[0058] Figure 3 Schematic diagram of the distribution relationship between a database table space and a table provided by an embodiment of the present invention. Figure 3 As shown in the table, there are five tablespaces in the database TABLEPLCE, namely BILLITEM (bill), CDR (call record), SERVICE (service), RATEPLAN (rate) and SETTLE (settlement rules). The data tables stored in each tablespace are as follows Figure 3 Specifically, each data table has its corresponding evaluation coefficient of data importance, data call frequency index, and consumption coefficient of data backup and recovery, etc. Based on these indicators, the influencing factor F of the call frequency of the data table on the table space, the influencing factor W of the importance level of the stored data, and the influencing factor K of the complexity required for backup and recovery can be calculated using a near-ideal sorting algorithm.
[0059] In an application scenario, before obtaining the relative proximity corresponding to each data storage space, the method further includes:
[0060] Real-time monitoring of the space utilization rate corresponding to each of the data storage spaces;
[0061] If the space utilization rate exceeds a preset space utilization threshold, the step of obtaining the relative proximity corresponding to each of the data storage spaces is performed.
[0062] Among them, the above-mentioned preset space utilization threshold is a space utilization threshold for triggering an alarm that is pre-set for the table space (i.e., data storage space). Specifically, a unified space utilization threshold can be set for each data storage space, or different space utilization thresholds can be set for each data storage space.
[0063] In this embodiment, different space utilization rates are set for each tablespace to achieve more precise control. For example, the space utilization threshold of the CDR tablespace is 95%. When the actual space utilization rate exceeds the threshold, the next step of obtaining the relative proximity of each tablespace is triggered.
[0064] Figure 4 Schematic diagram of a processing flow of intelligent allocation when table space is insufficient provided by the present invention, such as Figure 4 As shown, when the table space is insufficient (that is, when the actual space utilization exceeds the space utilization threshold), it is necessary to calculate various factors at the current moment according to the algorithm, such as the retention strategy DMBT_BAK_TABLE of each data table on the CDR table space (this table records the preservation period and cleanup strategy of each business table), the influencing factor F of the call frequency of the data table on the table space, the influencing factor W of the importance level of the data, and the influencing factor K of the complexity required for backup and recovery, so as to perform subsequent calculations to determine the decision on table space expansion.
[0065] Specifically, obtaining the relative proximity corresponding to each data storage space includes:
[0066] Respectively obtain space evaluation indicators corresponding to each of the data storage spaces, wherein the space evaluation indicators include data call frequency, data importance and data backup and recovery complexity;
[0067] According to the space evaluation index corresponding to each of the data storage spaces, the relative proximity corresponding to each of the data storage spaces is obtained by calculation through an approximate ideal point sorting algorithm.
[0068] Among them, the above-mentioned space evaluation indicators are used to characterize the importance of data storage space. The specific space evaluation indicators can be set and adjusted according to actual needs. In this embodiment, the space evaluation indicators include data call frequency (i.e., the call frequency of the data table in the table space), data importance (i.e., the importance of the data table in the table space) and data backup and recovery complexity (i.e., the complexity of backup and recovery of the data table in the table space), but they are not specifically limited.
[0069] The approaching ideal point ranking algorithm is an algorithm that evaluates and ranks each evaluated object by measuring the relative distance between the indicator evaluation value vector of each evaluated object and the ideal solution and negative ideal solution of the evaluation, and at the same time calculates the comprehensive evaluation index of each evaluated object.
[0070] When processing based on the approximate ideal point sorting algorithm, it is necessary to first determine the normalized decision matrix. Specifically, the data is first dimensionless, where the jth indicator a of the i-th evaluated object is ij The dimensionless processing formula is shown in the following formula (1):
[0071]
[0072] Among them, a min(i) represents the minimum value of the index j of different objects, a max(i) The maximum value of the index j representing different objects. According to formula (1), the corresponding normalized decision matrix B can be obtained as follows: ij ) i×j .
[0073] Furthermore, it is necessary to determine the weight coefficient of the indicator (using the coefficient of variation method as an example). For each object (taking the i-th evaluated object as an example), first calculate the mean of the indicator evaluation under different indicators. and standard deviation S i Then calculate the coefficient of variation of each indicator (i.e. the ratio of standard deviation to mean), and take its absolute value as V i .
[0074] Pair V i After normalization, we get the weight W of each indicator (the influencing factor F of the call frequency of the data table in the table space, the influencing factor S of the importance level of the data, and the influencing factor K of the complexity required for backup and recovery) i =V i / ∑V i Then the normalized decision matrix B and the weights form the weighted normalized matrix R = WB = (r ij ).
[0075] The ideal solution x is determined based on the following formulas (2) and (3): + and negative ideal solution x - :
[0076]
[0077]
[0078] Among them, the value of i ranges from 1 to m, representing m different evaluation objects (that is, m table spaces), and the value of j ranges from 1 to n, representing n different indicators.
[0079] According to the following formula (4) and formula (5), the ideal solution d is calculated for each object under evaluation. + The distance to the negative ideal solution d - :
[0080]
[0081]
[0082] Then, the relative closeness between the measured object and the ideal solution is calculated based on the following formula (6) as its comprehensive evaluation index:
[0083]
[0084] Among them, c j is the closeness between the evaluation index (impact factor) and the fuzzy ideal solution, c j The closer to the ideal solution, the larger the impact factor value.
[0085] Figure 5 This is a flow chart of a data storage space capacity control method provided by the present invention. In this embodiment, combined with Figure 5 The specific processing flow is described below. Figure 5 As shown, in an application scenario, a data table is created in advance, and the table space capacity is controlled based on the following processing flow:
[0086] Step S301, create a data table according to the production system needs, and refer to the system planning to specify the table space.
[0087] Step S302: normal production operation, data writing.
[0088] Step S303, evaluate the usage of the table space, give a utilization alarm, and deploy monitoring on the system to prevent excessive table space utilization from affecting data storage and writing and to prevent frequent invocation of computing strategies from affecting system performance.
[0089] Step S304, determining whether the table space utilization rate at the current moment exceeds a threshold.
[0090] Step S305: The alarm threshold is not reached, and the storage area operates normally. The intelligent allocation table space logic is in a dormant state.
[0091] Step S306: If the table space utilization rate at the current moment exceeds the threshold, the intelligent allocation process is activated and calculation is started according to the approaching ideal point sorting method.
[0092] Step S307, calculate the weight coefficient of each indicator and obtain a calculation matrix.
[0093] Specifically, taking the case where the utilization of three data table spaces exceeds the threshold as an example, the indicator value matrix B of each table is shown in Table 1:
[0094] Table 1
[0095]
[0096] Calculate the weight coefficient of each indicator. Specifically, calculate the standard deviation and average value of each indicator, as shown in Table 2:
[0097] Table 2
[0098] index Standard Deviation Average value Call frequency index F 2.246 3.33 Data importance index S 1.49 2.67 Backup and recovery complexity index K 3.08 4.33
[0099] The coefficient of variation of each indicator is calculated, as shown in Table 3:
[0100] Table 3
[0101] index Coefficient of variation V Call frequency index F 0.6745 Data importance index S 0.5581 Backup and recovery complexity index K 0.7113
[0102] Furthermore, according to W i =V i / ∑V i Calculate the weight coefficient of each indicator, as shown in Table 4:
[0103] Table 4
[0104] index Weight coefficient W Call frequency index F 0.3469 Data importance index S 0.2871 Backup and recovery complexity index K 0.366
[0105] According to the normalized decision matrix B and weights, a weighted normalized matrix R = WB = (r ij ) to obtain the calculation matrix, as shown in Table 5:
[0106] Table 5
[0107]
[0108] Step S308: Generate an ideal solution, a negative ideal solution, and the distance between each table space and the ideal solution according to the calculation matrix. Specifically, the ideal solution and the negative ideal solution are calculated according to formula (2) and formula (3), respectively. The ideal solution x + is (2.0008, 1.4355, 3.294), negative ideal solution x - is (0.3469, 0.2871, 0.366).
[0109] According to formula (4) and formula (5), the distance between the evaluation object and the ideal solution and the distance between the evaluation object and the negative ideal solution are calculated. The distance between each table space and the ideal solution and the negative ideal solution is shown in Table 6:
[0110] Table 6
[0111] Data table space <![CDATA[d + ]]> <![CDATA[d - ]]> Tablespace 1 1.3253 3.0137 Tablespace 2 2.7491 1.6114 Tablespace 3 3.1452 1.6539
[0112] According to formula (6), the relative closeness between the object under evaluation (i.e., table space) and the ideal solution is calculated, as shown in Table 7:
[0113] Table 7
[0114]
[0115]
[0116] Among them, c j is the closeness between the evaluation index (impact factor) and the fuzzy ideal solution, c j The closer to the ideal solution, the larger the impact factor value is. Therefore, according to the approximate ideal method, the space expansion priority is [tablespace 1]>[tablespace 2]>[tablespace 3].
[0117] Step S309, if the relative closeness to the ideal solution does not reach the rated value (such as 60), the configuration dictionary table of the table space is automatically cleaned up to remove invalid or expired data. Taking the above three tables as an example, table spaces 2 and 3 cannot reach the rated value 60 of the closeness to the ideal solution, and thus they will not be automatically expanded.
[0118] Specifically, determining the adjustment capacity corresponding to each data storage space according to the relative proximity includes:
[0119] If the relative proximity corresponding to the data storage space is less than a preset proximity threshold, data cleaning is performed on the data storage space;
[0120] If the relative proximity corresponding to the data storage space is not less than a preset proximity threshold, the adjustment capacity corresponding to the data storage space is determined according to the relative proximity corresponding to the data storage space, the overall remaining available storage capacity and the preset single minimum expansion capacity.
[0121] Step S310, if the closeness to the ideal solution reaches a rated value (such as 60), the table space is automatically expanded. Taking the above three tables as an example, table space 1 needs to be automatically expanded. The table space expansion calculation method is shown in step S311.
[0122] Specifically, determining the adjustment capacity corresponding to the data storage space according to the relative proximity corresponding to the data storage space, the overall remaining available storage capacity, and the preset single minimum expansion capacity includes:
[0123] Adding the relative proximities corresponding to all the data storage spaces to obtain a total proximity;
[0124] For each data storage space, calculate the proximity ratio corresponding to the data storage space according to the relative proximity corresponding to the data storage space and the total proximity;
[0125] The product of the overall remaining available storage capacity and the proximity ratio is calculated as the candidate expansion space capacity corresponding to the data storage space, and the larger one of the candidate expansion space capacity and the single minimum expansion capacity is used as the adjustment capacity corresponding to the data storage space.
[0126] In this embodiment, step S311 calculates the size of the table space that can be expanded:
[0127] First, calculate the proportion of the ideal solution proximity of the current automatically extended tablespace to the total ideal solution proximity of all tablespaces to be extended, P, P = c j / ∑C.
[0128] According to the overall remaining available table space A, the space proportion P, and the single minimum expansion space size M, the expandable table space size S is calculated, where S=MAX(A*P, M).
[0129] After the capacity is controlled according to the calculated expandable table space size, step S312 is executed, that is, regression judgment is continued and table space utilization is monitored.
[0130] It should be noted that, before controlling the space capacity of each data storage space according to the adjustment capacity corresponding to each data storage space, the method further includes:
[0131] Determining the capacity expansion priority corresponding to each of the data storage spaces according to the relative proximity corresponding to each of the data storage spaces;
[0132] The controlling the space capacity of each data storage space according to the adjustment capacity corresponding to each data storage space comprises:
[0133] According to the priority and adjustment capacity corresponding to each of the data storage spaces, the space capacity of each of the data storage spaces is controlled in turn.
[0134] For example, if all three tablespaces in Table 7 need to be capacity controlled, the corresponding adjustment capacity is calculated for tablespace 1, tablespace 2, and tablespace 3 in order to perform capacity control. It should be noted that after capacity adjustment for tablespace 1, when capacity control is performed for tablespace 2, the overall remaining available storage capacity used for calculation is the overall remaining available storage capacity updated after processing tablespace 1. In this way, capacity control can be performed on each tablespace, and the expansion of more important tablespaces can be prioritized to improve data storage security.
[0135] In summary, in this embodiment, the existing table space allocation strategy is integrated to calculate the various factors that affect the table space through the approximate ideal point sorting method to obtain the influencing factors of various factors. The size of the influencing factors is used to determine whether the table space needs to be expanded. If expansion is required, the system automatically selects the size that needs to be expanded to achieve intelligent allocation of the table space. The problem that the table space cannot be expanded intelligently can be solved. The performance consumption caused by the frequent automatic expansion of the table space due to unreasonable space allocation each time the expansion is automatically completed can be solved. The problem that the table space can only be allocated at a fixed quota each time is solved by giving the influencing factors of each data file in combination with the business, so as to realize the intelligent allocation of table space, improve resource utilization, and reduce the failure rate caused by table space limitations.
[0136] In addition, the table space utilization rate in the comprehensive production system is combined with the influencing factors of various factors affecting the expansion of the table space to automatically decide whether the table space needs to be expanded, reducing manual intervention; using logical judgment, when it is determined that the table space needs to be expanded, the size of the expandable space is calculated, breaking through the limitations of blindly and automatically expanding the table space, avoiding resource waste and unnecessary performance consumption; when allocating table space intelligently, based on the value of the influencing factors of the table space factors, the expansion priority of each table space is determined, considering the importance of the data, and allocating storage space more scientifically and reasonably. In this way, the rational use of database resources can be achieved, especially for business system databases with high business real-time requirements, which can effectively improve the utilization efficiency and operation speed of database resources, thereby providing enterprises with more stable and reliable business services. According to different business needs and data set characteristics, the corresponding database expansion influencing factors can be selected, and appropriate database resources can be automatically allocated, which can greatly reduce the cost and errors of manual intervention, and improve operation and maintenance efficiency and data processing timeliness.
[0137] The following is a description of the data storage space capacity control device provided by the present invention. The data storage space capacity control device described below and the data storage space capacity control method described above can be referred to in correspondence with each other. Figure 6 As shown, the data storage space capacity control device provided by the present invention includes:
[0138] A relative proximity acquisition module 610 is used to acquire the relative proximity corresponding to each data storage space, wherein the relative proximity is used to represent the degree of proximity between the current space capacity of the data storage space and the ideal solution of the space capacity;
[0139] An adjustment capacity determination module 620, configured to determine an adjustment capacity corresponding to each of the data storage spaces according to the relative proximity;
[0140] The capacity control module 630 is used to control the space capacity of each of the data storage spaces according to the adjustment capacity corresponding to each of the data storage spaces.
[0141] The data storage space capacity control device provided by the present invention can automatically obtain the relative proximity corresponding to the data storage space, thereby automatically determining the adjustment capacity corresponding to each data storage space according to the relative proximity, and automatically control the space capacity of the data storage space according to the adjustment capacity. It does not need to rely on manual monitoring and adjustment, and can realize automatic and intelligent adjustment of the data storage space capacity, which is beneficial to improving the efficiency of data storage space capacity control.
[0142] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the data storage space capacity control method, the method comprising: obtaining the relative proximity corresponding to each data storage space, wherein the relative proximity is used to characterize the degree of proximity between the current space capacity of the data storage space and the ideal solution of the space capacity; determining the adjustment capacity corresponding to each data storage space according to the relative proximity; and controlling the space capacity of each data storage space according to the adjustment capacity corresponding to each data storage space.
[0143] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0144] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the data storage space capacity control method provided by the above-mentioned methods, and the method includes: obtaining the relative proximity corresponding to each data storage space, wherein the relative proximity is used to characterize the degree of proximity between the current space capacity of the data storage space and the ideal solution of the space capacity; determining the adjustment capacity corresponding to each data storage space according to the relative proximity; and performing space capacity control on each data storage space according to the adjustment capacity corresponding to each data storage space.
[0145] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the data storage space capacity control method provided by the above-mentioned methods, the method comprising: obtaining the relative proximity corresponding to each data storage space, wherein the relative proximity is used to characterize the degree of proximity between the current space capacity of the data storage space and the ideal solution of the space capacity; determining the adjustment capacity corresponding to each of the data storage spaces based on the relative proximity; and performing space capacity control on each of the data storage spaces based on the adjustment capacity corresponding to each of the data storage spaces.
[0146] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0147] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for controlling data storage space capacity, characterized in that: include: Acquire a relative proximity corresponding to each data storage space, wherein the relative proximity is used to characterize the degree of proximity between the current space capacity of the data storage space and an ideal solution of the space capacity; Determining, according to the relative proximity, an adjustment capacity corresponding to each of the data storage spaces; According to the adjustment capacity corresponding to each of the data storage spaces, the space capacity of each of the data storage spaces is controlled respectively.
2. The data storage space capacity control method according to claim 1, characterized in that: The obtaining of the relative proximity corresponding to each data storage space includes: Respectively obtain space evaluation indicators corresponding to each of the data storage spaces, wherein the space evaluation indicators include data call frequency, data importance and data backup and recovery complexity; According to the space evaluation index corresponding to each of the data storage spaces, the relative proximity corresponding to each of the data storage spaces is obtained by calculation through an approximate ideal point sorting algorithm.
3. The data storage space capacity control method according to claim 1, characterized in that: Before obtaining the relative proximity corresponding to each data storage space, the method further includes: Real-time monitoring of the space utilization rate corresponding to each of the data storage spaces; If the space utilization rate exceeds a preset space utilization threshold, the step of obtaining the relative proximity corresponding to each of the data storage spaces is performed.
4. The data storage space capacity control method according to claim 1, characterized in that: Determining the adjustment capacity corresponding to each of the data storage spaces according to the relative proximity includes: If the relative proximity corresponding to the data storage space is less than a preset proximity threshold, data cleaning is performed on the data storage space; If the relative proximity corresponding to the data storage space is not less than a preset proximity threshold, the adjustment capacity corresponding to the data storage space is determined according to the relative proximity corresponding to the data storage space, the overall remaining available storage capacity and the preset single minimum expansion capacity.
5. The data storage space capacity control method according to claim 4, characterized in that: The determining the adjustment capacity corresponding to the data storage space according to the relative proximity corresponding to the data storage space, the overall remaining available storage capacity, and the preset single minimum expansion capacity includes: Adding the relative proximities corresponding to all the data storage spaces to obtain a total proximity; For each data storage space, calculate the proximity ratio corresponding to the data storage space according to the relative proximity corresponding to the data storage space and the total proximity; The product of the overall remaining available storage capacity and the proximity ratio is calculated as the candidate expansion space capacity corresponding to the data storage space, and the larger one of the candidate expansion space capacity and the single minimum expansion capacity is used as the adjustment capacity corresponding to the data storage space.
6. The data storage space capacity control method according to any one of claims 1 to 5, characterized in that: Before controlling the space capacity of each of the data storage spaces according to the adjustment capacity corresponding to each of the data storage spaces, the method further includes: Determining the capacity expansion priority corresponding to each of the data storage spaces according to the relative proximity corresponding to each of the data storage spaces; The controlling the space capacity of each data storage space according to the adjustment capacity corresponding to each data storage space comprises: According to the priority and adjustment capacity corresponding to each data storage space, the space capacity of each data storage space is controlled in turn.
7. A data storage space capacity control device, characterized in that: include: A relative proximity acquisition module, used to acquire the relative proximity corresponding to each data storage space, wherein the relative proximity is used to characterize the degree of proximity between the current space capacity of the data storage space and the ideal solution of the space capacity; An adjustment capacity determination module, configured to determine an adjustment capacity corresponding to each of the data storage spaces according to the relative proximity; The capacity control module is used to control the space capacity of each data storage space according to the adjustment capacity corresponding to each data storage space.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the data storage space capacity control method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data storage space capacity control method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the data storage space capacity control method according to any one of claims 1 to 6 is implemented.
