Method, apparatus, storage medium and electronic device for allocating storage resources
Through the automated resource planning method, the business demand information of the application server is obtained and storage resources are allocated based on the resource planning model, which solves the problem of low human planning efficiency and achieves efficient and reasonable storage resource allocation.
Patent Information
- Application Number
- CN202211223151.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-08
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-10-08
AI Technical Summary
In the prior art, the efficiency of artificially planning storage resources is low, resulting in high labor costs and slow planning speed, and the performance of the storage server cannot be effectively considered, resulting in wasting storage resources.
By obtaining the service demand information of the application server for the storage server, determining the service type, and determining the target impact characteristics that affect storage resource access based on the service type. These characteristics are analyzed based on the resource planning model, resource allocation strategies are determined, and storage resources are automatically allocated.
It realizes storage resource allocation without manual participation, reduces human planning costs, improves the planning efficiency and utilization of storage resources, ensures the reasonable allocation of storage resources, and meets high efficiency and reliability.
Smart Images

Figure CN115525230B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data management, and in particular, to a method, apparatus, storage medium, and electronic device for allocating storage resources. Background Art
[0002] With the advent of the big data era, the demand scale of storage resources in data centers has reached the PB or even EB level. Therefore, storage resource planning has become particularly important. In addition, more and more applications have put forward online and storage requirements. Even with the introduction of cloud computing, which reduces the operation and maintenance management ability of storage servers for storage resources, factors such as the security, stability, and performance of storage resources still need to be considered. Moreover, since a large number of traditional environments cannot be migrated to the cloud, the traditional method of manually planning storage resources can no longer meet the existing huge and complex demand. And the traditional method of manually planning storage resources is inefficient, with too much investment in manpower resulting in high labor costs, and the manual planning speed is slow, unable to effectively and comprehensively consider the performance of storage servers, thus causing waste of storage resources. Therefore, it is of great significance to improve the planning efficiency of storage resources.
[0003] In response to the above problems, no effective solution has been proposed yet. Summary of the Invention
[0004] Embodiments of the present invention provide a method, apparatus, storage medium, and electronic device for allocating storage resources, so as to at least solve the technical problem of low resource planning efficiency existing in the manual planning of storage resources in related technologies.
[0005] According to one aspect of the embodiments of the present invention, a method for allocating storage resources is provided, including: obtaining service demand information of a current application server for storage resources in a storage server; determining a service type corresponding to the service demand information; determining at least one target impact feature of the storage server according to the service type, where the at least one target impact feature is an influencing factor that affects the current application server's access to the storage resources in the storage server; analyzing the at least one target impact feature based on a resource planning model to determine a resource allocation strategy for allocating resources to the current application server, where the resource planning model is trained based on historical service demand information of at least one application server and the impact features corresponding to the historical service demand information; and allocating storage resources to the current application server based on the resource allocation strategy.
[0006] Further, a resource planning model is generated through the following method: obtaining historical service demand information corresponding to at least one application server and historical impact features corresponding to a storage server, where the historical impact features are impact factors corresponding to the at least one application server accessing storage resources in the storage server during a historical time period; performing data preprocessing on the historical impact features to obtain the preprocessed historical impact features; performing phased analysis processing on the preprocessed historical impact features to obtain data streams of at least one phase; training a preset dynamic programming model based on the data streams of at least one phase and the historical service demand information to obtain a resource planning model.
[0007] Further, the method for allocating storage resources further includes: screening the historical impact features based on the historical service demand information corresponding to at least one application server to obtain target historical impact features, where the target historical impact features include at least one of the following: the remaining storage capacity of the storage server's disk, the port response time of the storage server, and the bandwidth information corresponding to the storage server; grouping the target historical impact features based on the performance parameters of the storage server to obtain grouped feature data, where each group of feature data corresponds to a performance parameter, and the performance parameters include at least storage capacity, controller, front-end port, back-end port, and storage disk; performing clustering processing on the grouped feature data to obtain the performance state corresponding to each group of feature data, where the performance state indicates whether the group of feature data can keep the storage server in a stable performance state; performing scaling processing on the feature data corresponding to the performance state based on the performance state to obtain the preprocessed historical impact features.
[0008] Further, the storage resource allocation method further includes: Step 1, determining first initial feature data and second initial feature data from the feature data in the current group; Step 2, calculating the distances between the other feature data in the current group and the first initial feature data and the second initial feature data, and clustering the other feature data based on the distances to obtain a first data set and a second data set; Step 3, calculating the sum of the distances between the feature data in the first data set and the first initial feature data to obtain a first distance sum; calculating the sum of the distances between the feature data in the second data set and the second initial feature data to obtain a second distance sum; Step 4, when the first distance sum and / or the second distance sum do not satisfy a preset criterion function, updating the first initial feature data and / or the second initial feature data, and repeating Steps 1 to 4 until the first distance sum and the second distance sum satisfy the preset criterion function; Step 5, calculating the ratio of the first data volume to the second data volume, where the first data volume is the number of data included in the first data set, and the second data volume is the number of data included in the second data set; Step 6, when the ratio is greater than or equal to a preset ratio, determining that the feature data of the current group makes the storage server in a stable performance state; when the ratio is less than the preset ratio, determining that the feature data of the current group makes the storage server in a non-stable performance state.
[0009] Further, the storage resource allocation method further includes: determining the attribute information corresponding to the preprocessed historical influence features; dividing the preprocessed historical influence features into at least one stage according to the attribute information to obtain data streams of at least one stage.
[0010] Further, the storage resource allocation method further includes: obtaining at least one stage corresponding feature requirement information from the data streams of at least one stage, where the feature requirement information characterizes the demand for storage resources by at least one application server in the current stage; determining the resource allocation decision for the corresponding stage according to the feature requirement information; combining the resource allocation decisions corresponding to at least one stage to obtain a plurality of policy sequence groups; determining a target policy sequence group from the plurality of policy sequence groups; training a preset dynamic programming model based on the target policy sequence group and the historical business requirement information to obtain a resource planning model.
[0011] Further, the storage resource allocation method further includes: after analyzing at least one target influence feature based on the resource planning model and determining the resource allocation policy for allocating resources to the current application server, obtaining the target resource allocation policy obtained by the target object through analyzing the business requirement information; comparing the target resource allocation policy with the resource allocation policy to obtain a comparison result; determining whether to update the resource planning model according to the comparison result.
[0012] According to another aspect of the embodiments of the present invention, there is also provided an allocation device for storage resources, including: an acquisition module, configured to acquire service requirement information of a current application server for storage resources in a storage server; a service determination module, configured to determine a service type corresponding to the service requirement information; a feature determination module, configured to determine at least one target impact feature of the storage server according to the service type, where the at least one target impact feature is an impact factor affecting the current application server to access the storage resources in the storage server; an analysis module, configured to analyze the at least one target impact feature based on a resource planning model to determine a resource allocation strategy for allocating resources to the current application server, where the resource planning model is trained based on historical service requirement information of at least one application server and impact features corresponding to the historical service requirement information; and a resource allocation module, configured to allocate storage resources to the current application server based on the resource allocation strategy.
[0013] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the above-mentioned storage resource allocation method when running.
[0014] According to another aspect of the embodiments of the present invention, there is also provided an electronic device, which includes one or more processors; a memory, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, enable the one or more processors to implement a program for running, where the program is configured to execute the above-mentioned storage resource allocation method when running.
[0015] In the embodiments of the present invention, by analyzing the service requirements of the application server and automatically allocating storage resources based on the analysis results, after acquiring the service requirement information of the current application server for the storage resources in the storage server, the service type corresponding to the service requirement information is determined, and at least one target impact feature affecting the current application server to access the storage resources in the storage server is determined according to the service type. Then, the at least one target impact feature is analyzed based on the resource planning model to determine a resource allocation strategy for allocating resources to the current application server. Finally, storage resources are allocated to the current application server based on the resource allocation strategy. Wherein, the resource planning model is trained based on historical service requirement information of at least one application server and impact features corresponding to the historical service requirement information.
[0016] In the above process, during the process of allocating storage resources by the storage server, no manual participation is required, which reduces the cost of manually planning storage resources and improves the planning efficiency of storage resources. In addition, the allocation of storage resources is related to the business requirements of the application server, that is, the storage server takes into account the business requirements of the application server when allocating storage resources, thereby improving the utilization rate of storage resources. Moreover, during the process of allocating storage resources, the impact characteristics corresponding to different business types are considered, and based on this impact characteristic, a resource allocation strategy is determined, thereby ensuring the reasonable allocation of storage resources and meeting the efficiency and reliability of storage resources.
[0017] It can be seen that the solution provided by this application achieves the purpose of allocating storage resources in the storage server, thereby realizing the technical effect of improving the planning efficiency of storage resources, and further solving the technical problem of low resource planning efficiency existing in the related technology in the process of manually planning storage resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present invention, and constitute a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:
[0019] Figure 1 is a flowchart of a method for allocating storage resources according to an embodiment of the present invention;
[0020] Figure 2 is a flowchart block diagram of an alternative method for allocating storage resources according to an embodiment of the present invention;
[0021] Figure 3 is a schematic diagram of the stages of an alternative data stream according to an embodiment of the present invention;
[0022] Figure 4 is a schematic diagram of the generation of an alternative strategy sequence group according to an embodiment of the present invention;
[0023] Figure 5 is a schematic diagram of an alternative storage resource allocation device according to an embodiment of the present invention;
[0024] Figure 6 is a schematic diagram of an alternative electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0025] To enable those skilled in the art to better understand the solution of the present invention, the following will clearly and completely describe the technical solution in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0027] It should be noted that the relevant information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set between the present system and relevant users or institutions. Before obtaining relevant information, a request for acquisition needs to be sent to the aforementioned users or institutions through the interface, and after receiving the consent information feedback from the aforementioned users or institutions, the relevant information can be obtained.
[0028] Embodiment 1
[0029] According to an embodiment of the present invention, a method embodiment of a method for allocating storage resources is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described here can be executed in a different order from here.
[0030] In addition, it should also be noted that a storage server storing storage resources can be used as the execution subject of the method provided in this embodiment. Among them, the storage server can be used as an external storage of the application server to provide storage resources for the application server.
[0031] Figure 1 is a flowchart of an optional method for allocating storage resources according to an embodiment of the present invention, as Figure 1As shown in the figure, the method includes the following steps:
[0032] Step S102: Obtain the business demand information of the current application server for the storage resources in the storage server.
[0033] In step S102, the current application server is any one of multiple application servers that access the storage resources in the storage server. Among them, the corresponding business demands of different application servers may be different. For example, for an application server handling deposit business, its corresponding business demand is to be able to quickly read the storage resources in the storage server or quickly write data into the storage server; for another example, for an application server handling loan business, its corresponding business demand is to be able to obtain the customer information of the customers handling the loan business from the storage server and analyze the customer information.
[0034] In an optional embodiment, when the current application server needs to access the storage resources in the storage server, the current server sends an access request to the storage server. After receiving the above access request, the storage server determines the server identifier corresponding to the current application server according to the access request, and by identifying the server identifier, the business demand information of the current application server can be determined.
[0035] Step S104: Determine the business type corresponding to the business demand information.
[0036] In step S104, the business type may include but is not limited to OLTP (On-Line Transaction Processing) business and OLAP (On-Line Analytical Processing) business. Among them, for OLTP business, when the application server accesses the storage server, the real-time requirement for the storage server is relatively high, and the storage server can determine whether to allocate storage resources to the application server by analyzing the average I / O (Input / Output) response time. For OLAP business, when the application server accesses the storage server, the storage server needs to perform complex statistical query operations, and the storage server can determine whether to allocate storage resources to the application server by analyzing the network bandwidth.
[0037] It should be noted that the above average I / O response time represents the average response delay processed by the input / output ports of the storage server and is used to measure the I / O processing ability of the storage server; the above network bandwidth represents the amount of data that the storage server can process per second and is used to measure the throughput of the storage server.
[0038] In an alternative embodiment, the storage server can analyze the service requirement information to determine the service type. For example, for an application server handling deposit services, its corresponding service requirement is to be able to quickly read the storage resources of the storage server or quickly write data into the storage server. Then, the storage server can determine that the service type is an OLTP service. Another example is that for an application server handling loan services, its corresponding service requirement is to be able to obtain the customer information of the customers handling the loan service from the storage server and analyze the customer information. Then, the storage server can determine that the service type is an OLAP service.
[0039] Step S106: Determine at least one target impact feature of the storage server according to the service type, where the at least one target impact feature is an influencing factor that affects the current application server's access to the storage resources in the storage server.
[0040] In step S106, the influencing factors that affect the current application server's access to the storage resources in the storage server may include, but are not limited to, the remaining storage capacity of the disks of the storage server, the port response time of the storage server, and the bandwidth information corresponding to the storage server. Among them, the corresponding impact features are different for different service types. For example, for the OLTP service, its corresponding impact feature is the port response time of the storage server; for the OLAP service, its corresponding impact feature is the bandwidth information corresponding to the storage server. Therefore, after the storage server determines the service type corresponding to the application server, it can determine the target impact feature corresponding to this service type.
[0041] It should be noted that in practical applications, users can also customize the impact features of services. For example, users can set the target impact features corresponding to the OLAP service to be the bandwidth information corresponding to the storage server and the remaining storage capacity of the disks of the storage server.
[0042] Step S108: Analyze the at least one target impact feature based on the resource planning model to determine the resource allocation strategy for allocating resources to the current application server, where the resource planning model is trained based on the historical service requirement information of at least one application server and the impact features corresponding to the historical service requirement information.
[0043] In step S108, the storage server inputs the target impact feature analyzed in step S106 into the resource planning model, and then can obtain the resource allocation strategy for allocating resources to the current application server. Among them, the resource allocation strategy is the optimal storage resource planning strategy, which can not only ensure that the current application server can access the storage resources in the storage server, but also avoid the problem of resource waste caused by unreasonable storage resource allocation.
[0044] Optionally, after inputting the target impact feature into the resource planning model, the resource planning model can perform data analysis in stages according to the default data flow or according to custom rules to ensure the rationality of the resource allocation strategy.
[0045] Step S110: Allocate storage resources to the current application server based on the resource allocation strategy.
[0046] In step S110, after determining the resource allocation strategy, the storage server can allocate storage resources to the current application server according to the resource allocation strategy so that the application server can access the storage resources.
[0047] Based on the solution defined in the above steps S102 to S110, it can be known that in the embodiment, the method of analyzing the service requirements of the application server and automatically allocating storage resources based on the analysis results is adopted. After obtaining the service requirement information of the current application server for the storage resources in the storage server, the service type corresponding to the service requirement information is determined, and at least one target impact feature affecting the current application server's access to the storage resources in the storage server is determined according to the service type. Then, based on the resource planning model, at least one target impact feature is analyzed to determine the resource allocation strategy for allocating resources to the current application server. Finally, storage resources are allocated to the current application server based on the resource allocation strategy. Among them, the resource planning model is trained based on the historical service requirement information of at least one application server and the impact features corresponding to the historical service requirement information.
[0048] It is easy to notice that in the above process, during the process of allocating storage resources by the storage server, no manual participation is required, which reduces the cost of manually planning storage resources and improves the planning efficiency of storage resources. In addition, the allocation of storage resources is related to the service requirements of the application server, that is, the storage server takes into account the service requirements of the application server when allocating storage resources, thereby improving the utilization rate of storage resources. Moreover, during the process of allocating storage resources, the impact features corresponding to different service types are considered, and the resource allocation strategy is determined based on the impact features, thereby ensuring the reasonable allocation of storage resources and meeting the efficiency and reliability of storage resources.
[0049] It can be seen that the solution provided by this application achieves the purpose of allocating the storage resources in the storage server, thereby realizing the technical effect of improving the planning efficiency of storage resources, and further solving the technical problem of low resource planning efficiency existing in the related technology of manually planning storage resources.
[0050] In an alternative embodiment, Figure 2 shows the flowchart of the method provided in this embodiment. From Figure 2It can be seen that the process block diagram mainly includes a modeling layer, a planning layer, and an evaluation layer. Among them, a resource planning model can be constructed through the modeling module; the storage server can allocate storage resources to the current application server through the planning layer; and the adjustment of the resource planning model can be realized through the evaluation layer.
[0051] It should be noted that the solutions defined in the above steps S102 to S110 are deployed in the planning layer.
[0052] As Figure 2 shown, the construction process of the resource planning model mainly includes four steps: data acquisition, data preprocessing, data analysis, and model construction. Specifically, the storage server first obtains the historical business demand information corresponding to at least one application server and the historical impact characteristics corresponding to the storage server. Then, it performs data preprocessing on the historical impact characteristics to obtain the preprocessed historical impact characteristics, and performs phased analysis and processing on the preprocessed historical impact characteristics to obtain at least one stage of data flow. Finally, based on at least one stage of data flow and historical business demand information, a preset dynamic programming model is trained to obtain a resource planning model. Among them, the historical impact characteristics are the influencing factors corresponding to at least one application server when accessing the storage resources in the storage server during the historical time period.
[0053] Optionally, as Figure 2 shown, the storage server can obtain historical impact characteristics such as the performance capacity of the storage server from the centralized management platform, and collect the historical business demand information of the application server to generate sample data. Then, the storage server can perform operations such as feature reduction, data grouping, clustering division, and data standardization on the sample data to achieve the preprocessing of the sample data. After that, the storage server performs phased analysis on the preprocessed sample data according to the direction of the data flow, so as to obtain the data flow of each stage. Finally, the storage server trains a preset dynamic programming model according to the data flow of each stage and historical business demand information, and a resource planning model can be obtained.
[0054] In an optional embodiment, during the process of performing data preprocessing on the historical impact characteristics to obtain the preprocessed historical impact characteristics, the storage server performs the following steps:
[0055] Step S11, feature reduction, that is, screening the historical impact characteristics based on the historical business demand information corresponding to at least one application server to obtain the target historical impact characteristics. Among them, the target historical impact characteristics include at least one of the following: the remaining disk storage capacity of the storage server, the port response time of the storage server, and the bandwidth information corresponding to the storage server.
[0056] In step S11, the storage server divides the impact features corresponding to the storage server into relevant features and irrelevant features according to historical business requirements, deletes the records of the irrelevant features, and only retains the records of the relevant features, that is, only retains the impact features such as the remaining storage capacity of the storage server, the port response time of the storage server, and the bandwidth information corresponding to the storage server. In addition, the user can also perform feature reduction on the impact features according to the custom business.
[0057] Step S12, data grouping, that is, the storage server groups the target historical impact features based on the performance parameters of the storage server to obtain the grouped feature data. Among them, each group of feature data corresponds to a performance parameter, and the performance parameters at least include storage capacity, controller, front-end port, back-end port, and storage disk.
[0058] Optionally, the storage server can group single variable values (i.e., the above performance parameters), group the variables according to certain planning rules, and by default, a single variable is a group. For example, the single storage capacity of the storage server is taken as a group, and the single front-end port is taken as a group. In addition, the user can also bind two or four ports into a group according to the preset planning rules. The specific binding method is not specifically limited in this application.
[0059] Step S13, clustering division, that is, the storage server performs clustering processing on the grouped feature data to obtain the performance state corresponding to each group of feature data, where the performance state represents whether this group of feature data can make the storage server in a performance stable state.
[0060] Step S14, data standardization, that is, the storage server performs scaling processing on the feature data corresponding to the performance state based on the performance state to obtain the preprocessed historical impact features.
[0061] Optionally, the storage server can scale the feature data so that the scaled feature data falls within a specific interval (for example, the interval [0,1]), where the scaling ratio can be determined by the following formula:
[0062]
[0063] In the above formula, f(x) represents the scaling ratio, x i represents the feature data, and va represents the attribute threshold corresponding to the feature data, where the attribute threshold can be determined by the performance state.
[0064] In an optional embodiment, the storage server can implement the clustering of the feature data through the following steps:
[0065] Step 1: Determine the first initial feature data and the second initial feature data from the feature data in the current group. For example, the storage server randomly selects two feature data, O1 and O2, from the feature data in the current group as the initial center points of two data sets respectively.
[0066] Step 2: Calculate the distances between the other feature data in the current group and the first initial feature data and the second initial feature data, and cluster the other feature data based on the distances to obtain a first data set and a second data set. That is, the storage server clusters the other feature data into the first data set and the second data set respectively according to the principle that the distances between the other feature data and the two initial center points are the closest. Among them, the center point of the first data set is O1, and the center point of the second data set is O2.
[0067] Step 3: Calculate the sum of the distances between the feature data in the first data set and the first initial feature data to obtain a first distance sum; calculate the sum of the distances between the feature data in the second data set and the second initial feature data to obtain a second distance sum. That is, the feature data corresponding to the minimum sum of the distances from all the feature data in the current data set to the initial feature data is the new center point of the current data set.
[0068] Step 4: When the first distance sum and / or the second distance sum do not satisfy the preset criterion function, update the first initial feature data and / or the second initial feature data, and repeat Steps 1 to 4 until the first distance sum and the second distance sum satisfy the preset criterion function, that is, until the center points corresponding to each data set no longer change.
[0069] Step 5: Calculate the ratio of the first data volume to the second data volume, where the first data volume is the number of data included in the first data set, and the second data volume is the number of data included in the second data set.
[0070] Step 6: When the ratio is greater than or equal to the preset ratio, determine that the feature data of the current group makes the storage server in a performance stable state; when the ratio is less than the preset ratio, determine that the feature data of the current group makes the storage server in a non-performance stable state.
[0071] It should be noted that the above clustering algorithm can perform K-MEDOIDS clustering on the sample data of a small data set of the performance parameters of a storage server with noise and independent points, and divide the historical data into performance stable segment data and performance steep increase segment data according to the classification of the performance data.
[0072] In an alternative embodiment, such as Figure 2As shown, after preprocessing the historical impact features to obtain the preprocessed historical impact features, the storage server continues to perform phased analysis processing on the preprocessed historical impact features to obtain data streams for at least one phase. Specifically, the storage server determines the attribute information corresponding to the preprocessed historical impact features, and divides the preprocessed historical impact features into at least one phase according to the attribute information to obtain data streams for at least one phase.
[0073] Optionally, the storage server can determine the correlation between data of different performance modules of the storage server according to the data characteristics in the dataset, and perform statistical analysis on the preprocessed data. Using the phased analysis method, according to the nature and characteristics of the data, and following certain rules, the data is divided into several phases to analyze its internal structure and mutual relationship. Among them, Figure 3 shows a schematic diagram of the phases of an optional data stream. From Figure 3 it can be seen that the phases of the data stream at least include: phases such as the storage capacity of the storage server, the performance of the front-end port, the performance of the controller, the performance of the back-end port, and the performance of the storage pool. And the above several phases are executed in sequence, that is, the storage capacity, controller performance, front-end port performance, back-end port performance, and storage disk performance of the storage server are analyzed in sequence through the data stream. In addition, from Figure 3 it can be seen that the application server communicates with the switch through the network link, and the switch communicates with the storage server through the network link, thus realizing the communication between the application server and the storage server.
[0074] In an optional embodiment, as Figure 2 shown, after performing phased analysis on the preprocessed historical impact features, the storage server trains a preset dynamic programming model based on the data streams for at least one phase and the historical business requirement information to obtain a resource planning model. Specifically, the storage server obtains the feature requirement information corresponding to at least one phase from the data streams for at least one phase, determines the resource allocation decision for the corresponding phase according to the feature requirement information, then combines the resource allocation decisions corresponding to at least one phase to obtain multiple policy sequence groups, determines the target policy sequence group from the multiple policy sequence groups, and finally trains the preset dynamic programming model based on the target policy sequence group and the historical business requirement information to obtain a resource planning model. Among them, the feature requirement information represents the demand for storage resources by at least one application server in the current phase.
[0075] It should be noted that from Figure 3It can be known that the data stream is determined during the analysis process of the storage server. However, in the actual decision-making process, multiple stages can be combined with each other to obtain various resource allocation strategies. For example, the stages of the data stream corresponding to Resource Allocation Strategy 1 are the storage capacity of the storage server and the performance of the front-end ports, while the stages of the data stream corresponding to Resource Allocation Strategy 2 are the storage capacity of the storage server, the performance of the controller, and the performance of the back-end ports.
[0076] Optionally, Figure 4 Fig. shows a schematic diagram of generating an optional strategy sequence group. In Figure 4 , k = 1, 2,..., n represents the stage variable. For example, k = 1 represents the stage corresponding to the storage capacity of the storage server; k = 2 represents the stage corresponding to the performance of the controller; k = 3 represents the stage corresponding to the performance of the front-end ports; k = 4 represents the stage corresponding to the performance of the back-end ports; k = 5 represents the stage corresponding to the performance of the storage disks. In addition, in Figure 4 , d i is the characteristic demand quantity (i.e., characteristic demand information) of the i-th stage, vb i is the characteristic threshold of the i-th stage, x i is the state variable of the i-th stage, and x i satisfies the following formula:
[0077]
[0078] wherein, x i has a default value of 0.05.
[0079] In addition, in Figure 4 , x k,p represents the allowable state set of the p-th resource decision variable at the k-th stage. Among them, x k,p can not only describe the state of the process but also satisfy the property of no aftereffect.
[0080] In addition, the storage server also determines the allowable state set (i.e., the range of allowable values of the state variable). For example, if the state variable is the characteristic demand quantity / characteristic threshold and the resource decision variable is the disk units of different storage servers, the allowable state set is the disk units with a disk capacity utilization rate < 90%.
[0081] In addition, in Figure 4 , the decision variable For example, the decision variable can be a disk unit that meets a storage capacity of 1T; the state transition equation is:
[0082]
[0083] The determined stage index is
[0084] The stage index function is the minimum value of the stage index, that is, the stage index function satisfies the following formula:
[0085] V k,p (x k,1 ,u k,1 ,x k,2 …x k,n )=min(V k,p (x k,p ,u k,p ))
[0086] The optimal value function group f k (x k ) is the idle occupancy ratio group from the starting point to achieving the established goal, then f k (x k )=V k,p (x k,1 ,u k,1 ,x k,2 …x k,n )+f k+1 (x k+1 ), k = 1, … n; The free termination condition is: f k+1 (x k+1 )=0. After calculating f k (x k ), the optimal target policy sequence group {u k,p (x k )} can be obtained by using the stage index function.
[0087] In an alternative embodiment, as Figure 2 shown, after analyzing at least one target impact feature based on the resource planning model to determine the resource allocation strategy for allocating resources to the current application server, the storage server obtains the target resource allocation strategy obtained by analyzing the target object based on the service demand information, compares the target resource allocation strategy with the resource allocation strategy to obtain a comparison result, and then determines whether to update the resource planning model according to the comparison result.
[0088] Optionally, as Figure 2 shown, the target object analyzes the service demand of the application server through manual planning to obtain the target resource allocation strategy. Then, the storage server compares the target resource allocation strategy with the resource allocation strategy to determine whether the actual environment meets the actual requirements, that is, to determine whether the resource allocation strategy determined by the resource planning model is reasonable. If the resource allocation strategy determined by the resource planning model is unreasonable, the storage server updates the resource planning model according to the target resource allocation strategy; if the resource allocation strategy determined by the resource planning model is reasonable, the storage server allocates storage resources to the current application server based on the resource allocation strategy.
[0089] As can be seen from the above, based on the problem of low efficiency in the existing storage resource planning, the present application provides a method that is simple to implement, has a low implementation cost, and can effectively plan storage resources. This method can effectively allocate storage resources according to requirements. Among them, this method uses the performance, capacity, and demand of storage resources as reference values, not only reasonably allocates storage resources to avoid continuous high utilization of a single resource, but also combines the characteristics of requirements to meet the high efficiency and reliability of business storage resources. In addition, this method can balance storage resources, improve the utilization rate of storage resources, and reduce the hardware failure rate. This method can also reduce the manual planning cost, realize the resource planning for different business requirements and different storage systems, and has strong adaptability and universality.
[0090] Embodiment 2
[0091] According to an embodiment of the present invention, there is also provided an embodiment of an allocation device for storage resources, wherein, Figure 5 is a schematic diagram of an optional allocation device for storage resources according to an embodiment of the present invention, as Figure 5 shown, the device includes: an acquisition module 501, a service determination module 503, a feature determination module 505, an analysis module 507, and a resource allocation module 509.
[0092] Among them, the acquisition module 501 is used to acquire the service demand information of the current application server for the storage resources in the storage server; the service determination module 503 is used to determine the service type corresponding to the service demand information; the feature determination module 505 is used to determine at least one target influence feature of the storage server according to the service type, where at least one target influence feature is an influencing factor that affects the current application server's access to the storage resources in the storage server; the analysis module 507 is used to analyze at least one target influence feature based on the resource planning model to determine the resource allocation strategy for allocating resources to the current application server, where the resource planning model is trained based on the historical service demand information of at least one application server and the influence features corresponding to the historical service demand information; the resource allocation module 509 is used to allocate storage resources to the current application server based on the resource allocation strategy.
[0093] Optionally, the allocation device for storage resources further includes a model generation module, which includes: a first acquisition module, a preprocessing module, an analysis module, and a model training module. Among them, the first acquisition module is used to acquire the historical business requirement information corresponding to at least one application server and the historical impact features corresponding to the storage server, where the historical impact features are the impact factors corresponding to at least one application server when accessing the storage resources in the storage server during the historical time period; the preprocessing module is used to perform data preprocessing on the historical impact features to obtain the preprocessed historical impact features; the analysis module is used to perform phased analysis processing on the preprocessed historical impact features to obtain data streams of at least one stage; the model training module is used to train a preset dynamic programming model based on the data streams of at least one stage and the historical business requirement information to obtain a resource planning model.
[0094] Optionally, the preprocessing module includes: a feature screening module, a feature grouping module, a feature clustering module, and a data scaling module. Among them, the feature screening module is used to screen the historical impact features based on the historical business requirement information corresponding to at least one application server to obtain target historical impact features, where the target historical impact features include at least one of the following: the remaining disk storage capacity of the storage server, the port response time of the storage server, and the bandwidth information corresponding to the storage server; the feature grouping module is used to group the target historical impact features based on the performance parameters of the storage server to obtain grouped feature data, where each group of feature data corresponds to a performance parameter, and the performance parameters include at least storage capacity, controller, front-end port, back-end port, and storage disk; the feature clustering module is used to perform clustering processing on the grouped feature data to obtain the performance state corresponding to each group of feature data, where the performance state indicates whether the group of feature data can keep the storage server in a stable performance state; the data scaling module is used to perform scaling processing on the feature data corresponding to the performance state based on the performance state to obtain the preprocessed historical impact features.
[0095] Optionally, the feature clustering module is used to execute the following method: Step 1, determine the first initial feature data and the second initial feature data from the feature data in the current group; Step 2, calculate the distances between the other feature data in the current group and the first initial feature data and the second initial feature data, and cluster the other feature data based on the distances to obtain a first data set and a second data set; Step 3, calculate the sum of the distances between the feature data in the first data set and the first initial feature data to obtain a first distance sum; calculate the sum of the distances between the feature data in the second data set and the second initial feature data to obtain a second distance sum; Step 4, when the first distance sum, and / or the second distance sum does not satisfy the preset criterion function, update the first initial feature data and / or the second initial feature data, and repeat Steps 1 to 4 until the first distance sum and the second distance sum satisfy the preset criterion function; Step 5, calculate the ratio of the first data volume to the second data volume, where the first data volume is the number of data included in the first data set, and the second data volume is the number of data included in the second data set; Step 6, when the ratio is greater than or equal to the preset ratio, determine that the feature data of the current group makes the storage server in a performance stable state; when the ratio is less than the preset ratio, determine that the feature data of the current group makes the storage server in a non-performance stable state.
[0096] Optionally, the analysis module includes: a first determination module and a stage division module. Among them, the first determination module is used to determine the attribute information corresponding to the preprocessed historical influence features; the stage division module is used to divide the preprocessed historical influence features into at least one stage according to the attribute information to obtain data streams of at least one stage.
[0097] Optionally, the model training module includes: a second acquisition module, a second determination module, a decision combination module, a third determination module, and a target training module. Among them, the second acquisition module is used to obtain the feature requirement information corresponding to at least one stage from the data streams of at least one stage, where the feature requirement information represents the demand for storage resources by at least one application server in the current stage; the second determination module is used to determine the resource allocation decision corresponding to the corresponding stage according to the feature requirement information; the decision combination module is used to combine the resource allocation decisions corresponding to at least one stage to obtain a plurality of policy sequence groups; the third determination module is used to determine the target policy sequence group from the plurality of policy sequence groups; the target training module is used to train the preset dynamic programming model based on the target policy sequence group and the historical business requirement information to obtain a resource planning model.
[0098] Optionally, the allocation device for storage resources further includes: a third acquisition module, a comparison module, and a fourth determination module. Among them, the third acquisition module is configured to, after analyzing at least one target impact feature based on a resource planning model and determining a resource allocation policy for allocating resources to the current application server, acquire a target resource allocation policy obtained by analyzing a target object based on service requirement information; the comparison module is configured to compare the target resource allocation policy with the resource allocation policy to obtain a comparison result; the fourth determination module is configured to determine whether to update the resource planning model according to the comparison result.
[0099] Embodiment 3
[0100] On the other hand, according to an embodiment of the present invention, there is also provided a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the above-mentioned allocation method for storage resources when running.
[0101] Embodiment 4
[0102] On the other hand, according to an embodiment of the present invention, there is also provided an electronic device, wherein Figure 6 is a schematic diagram of an optional electronic device according to an embodiment of the present invention, as Figure 6 shown, the electronic device includes one or more processors; a memory for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement for running the program, wherein the program is configured to execute the above-mentioned allocation method for storage resources when running.
[0103] The above serial numbers of the embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0104] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0105] In the several embodiments provided in the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of units can be a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces, and the indirect coupling or communication connection of units or modules can be in an electrical or other form.
[0106] The unit described as a separating component may or may not be physically separated, and the component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed over multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0107] In addition, each functional unit in various embodiments of the present invention may be integrated into a processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0108] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present invention. The foregoing storage medium includes: USB flash drive, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk or optical disc and other various media that can store program codes.
[0109] The above is only the preferred embodiment of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.
Claims
1. A method for allocating storage resources, characterized in that, it includes: obtaining service demand information of the current application server for storage resources in the storage server; determining the service type corresponding to the service demand information; determining at least one target impact feature of the storage server according to the service type, wherein the at least one target impact feature is an impact factor affecting the current application server's access to the storage resources in the storage server; analyzing the at least one target impact feature based on a resource planning model to determine a resource allocation strategy for allocating resources to the current application server, wherein the resource planning model is trained based on historical service demand information of at least one application server and impact features corresponding to the historical service demand information; the resource planning model is obtained through the following steps: obtaining historical service demand information corresponding to the at least one application server and historical impact features corresponding to the storage server; performing data preprocessing on the historical impact features to obtain preprocessed historical impact features; performing staged analysis processing on the preprocessed historical impact features to obtain data streams of at least one stage; training a preset dynamic programming model based on the data streams of the at least one stage and the historical service demand information to obtain the resource planning model; wherein, the preprocessing at least includes: feature screening, feature grouping, feature clustering, and data scaling, wherein the feature screening is used to screen the historical impact features based on the historical service demand information, the feature grouping is used to group the features after the feature screening based on the performance parameters of the storage server, the feature clustering is used to perform clustering processing on the grouped feature data to obtain the performance state corresponding to each group of feature data, and the data scaling is used to scale the feature data corresponding to the performance state to a preset interval; Among them, clustering the grouped feature data to obtain the performance state corresponding to each group of feature data includes: Step 1, determining the first initial feature data and the second initial feature data from the feature data in the current group; Step 2, calculating the distances between the other feature data in the current group and the first initial feature data and the second initial feature data, and clustering the other feature data based on the distances to obtain a first data set and a second data set; Step 3, calculating the sum of the distances between the feature data in the first data set and the first initial feature data to obtain a first distance sum; calculating the sum of the distances between the feature data in the second data set and the second initial feature data to obtain a second distance sum; Step 4, when the first distance sum and / or the second distance sum do not meet the preset criterion function, updating the first initial feature data and / or the second initial feature data, and repeating Steps 1 to 4 until the first distance sum and the second distance sum meet the preset criterion function; Step 5, calculating the ratio of the first data volume to the second data volume, where the first data volume is the number of data included in the first data set, and the second data volume is the number of data included in the second data set; Step 6, when the ratio is greater than or equal to the preset ratio, determining that the feature data of the current group makes the storage server in a performance stable state; when the ratio is less than the preset ratio, determining that the feature data of the current group makes the storage server in a non-performance stable state; Allocating the storage resources to the current application server based on the resource allocation strategy.
2. The method according to claim 1, wherein, performing data preprocessing on the historical impact features to obtain the preprocessed historical impact features, including: screening the historical impact features based on the historical service demand information corresponding to the at least one application server to obtain target historical impact features, where the target historical impact features include at least one of the following: the remaining disk storage capacity of the storage server, the port response time of the storage server, the bandwidth information corresponding to the storage server; grouping the target historical impact features based on the performance parameters of the storage server to obtain grouped feature data, where each group of feature data corresponds to one of the performance parameters, and the performance parameters at least include storage capacity, controller, front-end port, back-end port, storage disk; performing clustering processing on the grouped feature data to obtain the performance state corresponding to each group of feature data, where the performance state indicates whether the group of feature data can make the storage server in a performance stable state; performing scaling processing on the feature data corresponding to the performance state based on the performance state to obtain the preprocessed historical impact features.
3. The method according to claim 1, wherein, performing phased analysis processing on the preprocessed historical impact features to obtain data streams of at least one phase, including: Determine the attribute information corresponding to the preprocessed historical impact features; Divide the preprocessed historical impact features into the at least one stage according to the attribute information to obtain the data stream of the at least one stage.
4. The method according to claim 1, characterized in that training a preset dynamic programming model based on the data stream of the at least one stage and the historical service requirement information to obtain the resource planning model, including: obtaining the feature requirement information corresponding to the at least one stage from the data stream of the at least one stage, wherein the feature requirement information represents the requirement of the at least one application server for the storage resources in the current stage; determining the resource allocation decision for the corresponding stage according to the feature requirement information; combining the resource allocation decisions corresponding to the at least one stage to obtain a plurality of policy sequence groups; determining a target policy sequence group from the plurality of policy sequence groups; training the preset dynamic programming model based on the target policy sequence group and the historical service requirement information to obtain the resource planning model.
5. The method according to claim 1, characterized in that after analyzing the at least one target impact feature based on the resource planning model and determining the resource allocation policy for allocating resources to the current application server, the method further includes: obtaining the target resource allocation policy obtained by analyzing the target object based on the service requirement information; comparing the target resource allocation policy with the resource allocation policy to obtain a comparison result; determining whether to update the resource planning model according to the comparison result.
6. An apparatus for allocating storage resources, characterized in that comprising: an acquisition module for acquiring the service requirement information of the current application server for the storage resources in the storage server; a service determination module for determining the service type corresponding to the service requirement information; a feature determination module for determining at least one target impact feature of the storage server according to the service type, wherein the at least one target impact feature is an influencing factor for the current application server to access the storage resources in the storage server; an analysis module for analyzing the at least one target impact feature based on the resource planning model to determine the resource allocation policy for allocating resources to the current application server, wherein the resource planning model is trained based on the historical service requirement information of at least one application server and the impact features corresponding to the historical service requirement information; The allocation device of the storage resources further includes a model generation module, and the model generation module includes: a first acquisition module, configured to acquire the historical service demand information corresponding to the at least one application server and the historical impact characteristics corresponding to the storage server; a preprocessing module, configured to perform data preprocessing on the historical impact characteristics to obtain the preprocessed historical impact characteristics, where the preprocessing at least includes: feature screening, feature grouping, feature clustering, and data scaling, where the feature screening is used to screen the historical impact characteristics based on the historical service demand information, the feature grouping is used to group the features after the feature screening based on the performance parameters of the storage server, the feature clustering is used to perform clustering processing on the grouped feature data to obtain the performance states corresponding to each group of feature data, and the data scaling is used to scale the feature data corresponding to the performance states to a preset interval; an analysis module, configured to perform phased analysis processing on the preprocessed historical impact characteristics to obtain data streams of at least one phase; a model training module, configured to train a preset dynamic programming model based on the data streams of the at least one phase and the historical service demand information to obtain the resource planning model; Among them, the preprocessing module includes: Step 1, determining first initial feature data and second initial feature data from the feature data in the current group; Step 2, calculating the distances between other feature data in the current group and the first initial feature data and the second initial feature data, and clustering the other feature data based on the distances to obtain a first data set and a second data set; Step 3, calculating the sum of the distances between the feature data in the first data set and the first initial feature data to obtain a first distance sum; calculating the sum of the distances between the feature data in the second data set and the second initial feature data to obtain a second distance sum; Step 4, when the first distance sum and / or the second distance sum do not satisfy a preset criterion function, updating the first initial feature data and / or the second initial feature data, and repeating Steps 1 to 4 until the first distance sum and the second distance sum satisfy the preset criterion function; Step 5, calculating the ratio of the first data volume to the second data volume, where the first data volume is the number of data included in the first data set, and the second data volume is the number of data included in the second data set; Step 6, when the ratio is greater than or equal to a preset ratio, determining that the feature data of the current group makes the storage server in a performance stable state; when the ratio is less than the preset ratio, determining that the feature data of the current group makes the storage server in a non-performance stable state; A resource allocation module, configured to allocate the storage resources to the current application server based on the resource allocation strategy.
7. A computer-readable storage medium, characterized in that, a computer program is stored in the computer-readable storage medium, where the computer program is set to execute the storage resource allocation method described in any one of claims 1 to 5 when running.
8. An electronic device, characterized in that, the electronic device includes one or more processors; A memory for storing one or more programs, which when executed by the one or more processors cause the one or more processors to implement a method for running a program, wherein the program is configured to execute the method for allocating the storage resources described in any one of claims 1 to 5 when running.
Citation Information
Patent Citations
Data storage resource assignment
US20160179405A1
Method and system for ai based automated capacity planning in data center
US20220261295A1