Resource allocation method and apparatus, electronic device, and storage medium
By receiving resource request requests, determining storage demand, obtaining status data of available resource pools, and rationally allocating storage demand to target resource pools according to preset resource allocation strategies and parameters, the problem of low efficiency in cloud storage resource allocation is solved, achieving more efficient resource allocation.
Patent Information
- Application Number
- CN202311648777.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-01
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-12-01
AI Technical Summary
Existing cloud storage resources are inefficiently allocated and cannot meet the rapidly growing business demands.
By receiving resource request requests, determining the storage demand, obtaining the status data of available resource pools, and rationally allocating the storage demand to the target resource pool according to the preset resource allocation strategy and allocation parameters.
It has improved the flexibility and intelligence of resource allocation, and enhanced the efficiency of resource allocation.
Smart Images

Figure CN118796422B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud storage technology, and in particular to a resource allocation method, apparatus, electronic device and storage medium. Background Technology
[0002] In cloud storage resource allocation scenarios, the user's required storage resources are assessed manually, and a fixed storage area matching the user's needs is manually allocated from a resource pool for the user to use.
[0003] However, with the rapid growth in demand for cloud storage services, the efficiency of resource allocation is low when using manual methods to allocate and schedule storage resources.
[0004] Therefore, there is an urgent need for a more efficient resource allocation method. Summary of the Invention
[0005] This application aims to at least partially address one of the technical problems in the related art.
[0006] Therefore, the first objective of this application is to propose a resource allocation method to improve the efficiency of resource allocation.
[0007] The second objective of this application is to propose a resource allocation device.
[0008] The third objective of this application is to propose an electronic device.
[0009] The fourth objective of this application is to provide a computer-readable storage medium.
[0010] The fifth objective of this application is to provide a computer program product.
[0011] To achieve the above objectives, a resource allocation method is proposed in the first aspect of this application, comprising:
[0012] In response to receiving a resource request for a target business, determine the storage requirement based on the demand indicators corresponding to the target business in the resource request;
[0013] Obtain the current status data of each available resource pool, and determine the allocation parameters of each available resource pool based on the status data of each available resource pool;
[0014] Based on the preset resource allocation strategy and the allocation parameters of each available resource pool, the storage demand is allocated, and the target resource pool in the available resource pool and the target storage amount allocated to the target resource pool are determined.
[0015] To achieve the above objectives, a second aspect of this application provides a resource allocation apparatus, comprising:
[0016] The determination module is used to respond to a resource request request for a target business and determine the storage requirement based on the demand indicators corresponding to the target business in the resource request request;
[0017] The monitoring module is used to obtain the current status data of each available resource pool, so as to determine the allocation parameters of each available resource pool based on the status data of each available resource pool;
[0018] The allocation module is used to allocate storage demand according to the preset resource allocation strategy and the allocation parameters of each available resource pool, and to determine the target resource pool in the available resource pool and the target storage amount allocated to the target resource pool.
[0019] To achieve the above objectives, a third aspect of this application provides an electronic device comprising:
[0020] At least one processor; and
[0021] A memory that is communicatively connected to at least one processor; wherein,
[0022] The memory stores instructions that can be executed by at least one processor, which enables the at least one processor to perform the methods of the above embodiments.
[0023] To achieve the above objectives, a fourth aspect of this application provides a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the method according to the above embodiments.
[0024] To achieve the above objectives, a fifth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the methods of the above embodiments.
[0025] The resource allocation method, apparatus, electronic device, and storage medium provided in this application, in response to receiving a resource request for a target service, determine the storage requirement based on the demand indicators corresponding to the target service in the resource request, and acquire the status data of each available resource pool. Based on the status data of each available resource pool, the allocation parameters for each available resource pool are determined. Then, according to a preset resource allocation strategy and the allocation parameters of each available resource pool, the storage requirement is allocated, and the target resource pool and its allocated target storage volume are determined within the available resource pools. Thus, by determining the storage requirement and rationally allocating it according to the preset resource allocation strategy and the allocation parameters of each available resource pool, the target resource pool and its allocated target storage volume are determined within the available resource pools. This improves the flexibility and intelligence of resource allocation, thereby increasing the efficiency of resource allocation.
[0026] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0027] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0028] Figure 1 This is a flowchart illustrating a resource allocation method provided in an embodiment of this application.
[0029] Figure 2 A flowchart illustrating another resource allocation method provided in an embodiment of this application;
[0030] Figure 3 This is a schematic diagram of another resource allocation device provided in an embodiment of this application. Detailed Implementation
[0031] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0032] The resource allocation method and apparatus of embodiments of this application are described below with reference to the accompanying drawings.
[0033] The resource allocation method of this application embodiment is executed by the resource allocation device (hereinafter referred to as the scheduling device) provided in this application embodiment. The device can be configured in computer equipment or terminal equipment to improve the accuracy of resource allocation.
[0034] Figure 1 This is a flowchart illustrating a resource allocation method provided in an embodiment of this application.
[0035] like Figure 1 As shown, this resource allocation method includes the following steps:
[0036] Step 101: In response to receiving a resource request for the target business, determine the storage requirement based on the demand indicators corresponding to the target business in the resource request.
[0037] The target business can be video storage (such as video surveillance storage), voice storage, file storage, or other businesses that require storage resources.
[0038] In this application, when a user successfully logs into the client corresponding to resource allocation, the client can display the services it supports on the display interface. The user can select a displayed service in the client, fill in the corresponding requirement indicators in the preset input boxes, and click the confirmation button to trigger a request for storage resources. After detecting that the confirmation button has been triggered, the client obtains and confirms the service selected by the user as the target service, and simultaneously obtains the requirement indicators corresponding to the target service. Then, based on the target service and its corresponding requirement indicators, the client generates a resource request request and sends the resource request request to the allocation device. Thus, the allocation device can receive the resource request request.
[0039] Furthermore, different services may have different required metrics. For example, the required metrics for video surveillance storage services might include video resolution, storage duration, number of video access channels, the permission level of the target user initiating the resource request, and video format. The required metrics for voice storage services might include the daily storage size and storage duration. These required metrics for each service can be pre-set in the system. When a user selects a service in the client, the client can display prompts and preset input boxes for the required metrics, allowing the user to input these metrics. The permission level of the target user initiating the resource request can be determined by the client in the system, without requiring user input.
[0040] In this application, after receiving a resource request, the allocation device can parse the request to obtain the demand indicators corresponding to the target service. Then, based on these demand indicators, the storage requirement is calculated and determined.
[0041] Optionally, when the target business is voice storage, the storage requirement can be determined by the product of the daily volume of voice resources to be stored and the storage duration.
[0042] Optionally, if the target service is video surveillance storage, a preset bitstream association table can be queried based on the video resolution and video format to determine the target bitstream corresponding to the video resolution and video format, and to determine the redundancy coefficient corresponding to the permission level of the target user. Then, based on the target bitstream, redundancy coefficient, storage duration, and number of video access channels, the storage requirement can be determined.
[0043] For example, if the target business is video surveillance storage, the process for determining the storage requirements is as follows:
[0044] A pre-built table relating video resolution, video format, and bitrate (i.e., a pre-defined bitrate relation table) is constructed within the system. See Table 1 for an example.
[0045] Table 1: Relationship Table
[0046]
[0047] Bitrate refers to the amount of data a video file uses per unit of time. The bitrate directly affects the video's clarity. At the same resolution, a higher bitrate results in a lower compression ratio and higher picture quality (i.e., video clarity).
[0048] Redundancy coefficients are pre-set for each permission level in the system. For example, the redundancy coefficient for permission level 5A is 30%, and the redundancy coefficient for permission level 4A is 25%. Therefore, by setting different redundancy coefficients according to permission levels, while ensuring user storage needs, it is possible to avoid insufficient storage capacity in case of unforeseen circumstances.
[0049] 1. Based on the video resolution and video format, query the preset bitstream association table to determine the target bitstream corresponding to the video resolution and video format.
[0050] 2. Query and determine the redundancy coefficient corresponding to the target user's permission level.
[0051] 3. The storage requirement is calculated using the following formula:
[0052] Storage requirement = Bitrate / 8 × Number of video access channels × Storage duration (days) × 24 hours × 3600 seconds × Redundancy factor
[0053] The number of video access channels refers to the number of cameras ordered by the target user. Generally, one camera terminal corresponds to one channel.
[0054] Step 102: Obtain the status data of each available resource pool, and determine the allocation parameters of each available resource pool based on the status data of each available resource pool.
[0055] The available resource pool consists of deployed resources that are capable of providing services. This pool includes infrastructure for providing public services, such as platform management clusters, egress devices, and security equipment. Based on this infrastructure, it is further divided into different clusters according to product type (i.e., different types of resources). These different resource types are the specific products (or devices) that provide services on the available resource pool, such as servers, network equipment, and storage devices. Except for storage devices, all other devices are used for controlling and transmitting stored data, ensuring the normal operation of the storage service.
[0056] Status data includes resource availability, performance data, and alarm data. Resource availability includes the total amount of storage resources in the available resource pool, the remaining resources, and the allocated resources. Performance data includes the resource utilization rate and energy consumption of each device in the available resource pool. Alarm data includes alarm type and alarm time.
[0057] In this application, any monitoring device can be used to monitor all devices (storage devices, servers, network devices, etc.) in each available resource pool, collecting status data for each available resource pool. The allocation device can interact with the monitoring device to obtain the status data for each available resource pool. Then, based on the status data of each available resource pool, the allocation parameters for each available resource pool can be determined.
[0058] The method for determining each allocation parameter can be found in the following formula:
[0059] Allocation rate = Allocated resources / Total resources
[0060]
[0061] Resource cost: refers to the cost of supplying computing power resources, which is generally related to the pricing of the resource supplier.
[0062] Resource cost = Storage demand × Unit storage cost
[0063] Power Usage Effectiveness (PUE) = Energy consumption of the computing device / Total energy consumption
[0064] Total energy consumption includes all energy consumption of the data center where the available resource pool resides. Computing equipment energy consumption includes the energy consumption of computing equipment used for data processing, storage, and communication. The available resource pool is deployed in a fixed-location data center. The data center includes not only computing equipment but also infrastructure equipment that provides the basic environment required for data center operation, such as lighting and cooling equipment. A PUE closer to 1 indicates higher energy efficiency.
[0065] The fault score is used to indicate the health status of the available resource pool. The fault score is determined as follows: determine the number of faults of each fault type that occur in the available resource pool within the current preset time period; subtract the product of the number of faults corresponding to each fault type and its corresponding score from the initial score to determine the fault score of the available resource pool.
[0066] For example, assuming the preset time period is the previous month, the fault types can include Level 1 fault, Level 2 fault, Level 3 fault, and Level 4 fault. The initial score is 100. The score for Level 1 fault is 20 points, the score for Level 2 fault is 10 points, the score for Level 3 fault is 5 points, and the score for Level 4 fault is 2 points.
[0067] Fault score = 100 - Number of Level 1 faults × 20 - Number of Level 2 faults × 10
[0068] - Number of failures for Level 3 faults × 5 - Number of failures for Level 4 faults × 2
[0069] It is understandable that the higher the fault score, the more stable the corresponding available resource pool is.
[0070] Step 103: Based on the preset resource allocation strategy and the allocation parameters of each available resource pool, allocate the storage demand and determine the target resource pool in the available resource pool and the target storage amount allocated to the target resource pool.
[0071] In this application, the allocation parameters for each available resource pool can be normalized to obtain normalized allocation parameters. Then, based on the normalized allocation parameters for each available resource pool, a comprehensive score can be determined for each available resource pool. For example, the comprehensive score can be determined using the following formula:
[0072] Overall score = (1-V) 归一化分配率 )*W 分配率权重 +(1-V 归一化负载率 )*W 负载率权重
[0073] +(1-V 归一化资源成本 )*W 资源成本权重 +V 归一化PUE *W PUE权重 +V 归一化故障得分 *W 故障得分权重
[0074] Subsequently, among the available resource pools where the remaining resources exceed the storage demand, the available resource pool with the highest comprehensive score is identified as the target resource pool, and the storage space corresponding to the storage demand in the target resource pool is allocated to the target service applied for by the target user (i.e., the target storage volume corresponding to the target resource pool is determined as the storage demand).
[0075] Optionally, the overall scores of each available resource pool can be sorted. If the sum of the remaining resources of the N available resource pools with the highest overall scores is greater than or equal to the storage requirement, and the sum of the remaining resources of the N-1 available resource pools with the highest overall scores is less than the storage requirement, then the N available resource pools with the highest overall scores are determined as target resource pools. The remaining resources of the N-1 target resource pools with the highest overall scores are then determined as their corresponding target storage amount. The storage requirement is then subtracted from the target storage amount of the N-1 target resource pools with the highest overall scores to determine the target storage amount of the Nth target resource pool with the highest overall score. Here, N is an integer, greater than or equal to 0.
[0076] In this application, in response to receiving a resource request for a target service, the storage requirement is determined based on the demand indicators corresponding to the target service in the resource request. Status data of each available resource pool is then obtained to determine the allocation parameters for each available resource pool. Subsequently, the storage requirement is allocated according to a preset resource allocation strategy and the allocation parameters of each available resource pool, thus determining the target resource pool and the target storage amount allocated to it. Therefore, by determining the storage requirement and rationally allocating it according to the preset resource allocation strategy and the allocation parameters of each available resource pool, the target resource pool and the target storage amount allocated to it are determined. This improves the flexibility and intelligence of resource allocation, thereby increasing the efficiency of resource allocation.
[0077] Figure 2 This is a flowchart illustrating a resource allocation method provided in an embodiment of this application.
[0078] like Figure 2 As shown, this resource allocation method includes the following steps:
[0079] Step 201: In response to receiving a resource request for the target business, determine the storage requirement based on the demand indicators corresponding to the target business in the resource request.
[0080] Step 202: Obtain the current status data of each available resource pool, so as to determine the allocation parameters of each available resource pool based on the status data of each available resource pool.
[0081] The specific implementation process of steps 201-202 in this application can be found in the detailed description of any embodiment of this application, and will not be repeated here.
[0082] Step 203: Determine the first allocation ratio corresponding to the current allocation, and determine the first allocation amount by multiplying the first allocation ratio and the storage demand.
[0083] In this application, storage requirements can be allocated multiple times. An allocation count flag can be set in the system. The initial value of the allocation count flag is 0. Each time a resource allocation for the storage requirement is completed, the allocation count flag is incremented by 1. When the allocation count flag equals a preset maximum allocation count, it indicates that the resource allocation for the storage requirement has been completed, and the allocation can stop. Furthermore, the proportion of resources allocated for each storage requirement can be different. For example, the initial allocation could be 40% of the storage requirement, the second allocation could be 20%, and the third allocation could be 20%. The allocation ratio corresponding to each allocation count flag can be preset in the system.
[0084] Therefore, when allocating storage resources based on storage demand, we can first determine the allocation count identifier corresponding to the current allocation, and then query and obtain the allocation ratio corresponding to the allocation count identifier (i.e., the first allocation ratio corresponding to the current allocation). Afterwards, the product of the first allocation ratio and the storage demand is determined as the first allocation amount.
[0085] Step 204: Determine the comprehensive score of each available resource pool based on the allocation parameters corresponding to each available resource pool.
[0086] The specific implementation process of step 204 in this application can be found in the detailed description of any embodiment of this application, and will not be repeated here.
[0087] Step 205: Based on the comprehensive score of each available resource pool and the first allocation amount, determine the target resource pool in the available resource pool and the target storage amount allocated to the target resource pool.
[0088] In this application, the available resource pool with the highest comprehensive score among the available resource pools with remaining storage resources greater than the first allocation amount is determined as the target resource pool, and the storage space corresponding to the first allocation amount in the target resource pool is allocated to the target service applied for by the target user.
[0089] Alternatively, the overall scores of each available resource pool can be sorted. If the sum of the remaining resources of the N available resource pools with the highest overall scores is greater than or equal to the first allocation, and the sum of the remaining resources of the N-1 available resource pools with the highest overall scores is less than the first allocation, then the N available resource pools with the highest overall scores are determined as target resource pools. The remaining resources of the N-1 target resource pools with the highest overall scores are then determined as their corresponding target storage amount. The first allocation amount is subtracted from the target storage amount of the N-1 target resource pools with the highest overall scores to determine the target storage amount of the Nth target resource pool with the highest overall score. Here, N is an integer, greater than or equal to 0.
[0090] Step 206: In response to the situation where the utilization rate of the storage resources corresponding to the first allocation in the target resource pool is greater than or equal to a preset threshold, the status data of each available resource pool is reacquired to redetermine the allocation parameters and comprehensive score of each available resource pool. Based on the redetermined comprehensive score of each available resource pool and the second allocation corresponding to the next allocation, the expanded target resource pool and the target storage amount allocated to the expanded target resource pool are determined until the allocation of all storage requirements is completed.
[0091] In this application, after the initial allocation of resources based on storage demand, the allocated storage resources can be used to process the storage data sent by the target user. During the use of the storage resources corresponding to the first allocation, these resources can be monitored. When the utilization rate of the storage resources corresponding to the first allocation in the target resource pool is greater than or equal to a preset threshold, it indicates that the storage resources corresponding to the first allocation in the target resource pool are about to be exhausted. At this point, the status data of each available resource pool can be re-acquired to redetermine the allocation parameters and overall score of each available resource pool. Based on the redetermined overall score of each available resource pool and the second allocation corresponding to the next allocation, the expanded target resource pool and the target storage amount allocated to the expanded target resource pool are determined to meet the storage needs of the target user. The utilization rate is the ratio between the amount of storage resources used in the storage resources corresponding to the first allocation and the first allocation amount.
[0092] Optionally, if the utilization rate of the storage resources corresponding to the first allocation in the target resource pool is less than a preset threshold, it indicates that the storage resources corresponding to the first allocation in the target resource pool can still support the target user for a period of time, and it is not necessary to allocate resources for the target business for the time being.
[0093] In this application, a first allocation ratio corresponding to the current allocation can be determined. The product of the first allocation ratio and the storage demand is determined as the first allocation amount. Weighted summation of allocation parameters is performed to determine the comprehensive score of each available resource pool. Then, based on the comprehensive score of each available resource pool and the first allocation amount, the target resource pool and the target storage amount allocated to the target resource pool are determined. If the utilization rate of the storage resources corresponding to the first allocation amount in the target resource pool is greater than or equal to a preset threshold, the status data of each available resource pool is reacquired to redetermine the allocation parameters and comprehensive score of each available resource pool. Based on the redetermined comprehensive score of each available resource pool and the second allocation amount corresponding to the next allocation, the expanded target resource pool and the target storage amount allocated to the expanded target resource pool are determined until the allocation of all storage demands is completed. Therefore, by allocating resources in batches according to resource demands, resource occupancy is avoided, thereby improving resource utilization.
[0094] To implement the above embodiments, this application also proposes a resource allocation device.
[0095] Figure 3 This is a schematic diagram of a resource allocation device provided in an embodiment of this application.
[0096] like Figure 3 As shown, the resource allocation device includes a determination module 310, a monitoring module 320, and an allocation module 330.
[0097] The determination module 310 is used to respond to receiving a resource request for a target service and determine the storage requirement based on the demand indicators corresponding to the target service in the resource request.
[0098] The monitoring module 320 is used to obtain the current status data of each available resource pool, so as to determine the allocation parameters of each available resource pool based on the status data of each available resource pool;
[0099] The allocation module 330 is used to allocate storage demand according to a preset resource allocation strategy and allocation parameters of each available resource pool, and to determine the target resource pool in the available resource pool and the target storage amount allocated to the target resource pool.
[0100] Furthermore, in one possible implementation of the embodiments of this application, the allocation parameters include one or more of the following: allocation rate, load rate, resource cost, PUE, and fault score.
[0101] Furthermore, in one possible implementation of this application embodiment, the monitoring module 320 is used for:
[0102] Determine the number of failures of each type that occur in the available resource pool within the current preset time period;
[0103] The fault score of the available resource pool is determined by subtracting the product of the number of faults and the corresponding score for each fault type from the initial score.
[0104] Furthermore, in one possible implementation of this application embodiment, the allocation module 330 is used for:
[0105] Determine the first allocation ratio corresponding to the current allocation, and determine the first allocation amount by multiplying the first allocation ratio and the storage demand.
[0106] Based on the allocation parameters corresponding to each available resource pool, determine the comprehensive score of each available resource pool;
[0107] Based on the comprehensive score and first allocation amount of each available resource pool, the target resource pool and the target storage amount allocated to the target resource pool are determined.
[0108] In response to the situation where the utilization rate of the storage resources corresponding to the first allocation in the target resource pool is greater than or equal to a preset threshold, the status data of each available resource pool is reacquired to redetermine the comprehensive score of each available resource pool. Based on the redetermined comprehensive score of each available resource pool and the second allocation corresponding to the next allocation, the target resource pool to be expanded and the target storage amount allocated to the expanded target resource pool are determined until the allocation of all storage requirements is completed.
[0109] Furthermore, in one possible implementation of this application embodiment, when the target service is video surveillance storage service, the requirement indicators include video clarity, storage duration, number of video access channels, permission level of the target user initiating the resource request, and video format. The aforementioned determining module 310 is used for:
[0110] Based on the video resolution and video format, query the preset bitstream association table to determine the target bitstream corresponding to the video resolution and video format;
[0111] Determine the redundancy coefficient corresponding to the permission level;
[0112] The storage requirement is determined based on the target bitstream, redundancy coefficient, storage duration, and number of video access channels.
[0113] It should be noted that the foregoing explanation of the resource allocation method embodiment also applies to the resource allocation device of this embodiment, and will not be repeated here.
[0114] In this application, in response to receiving a resource request for a target service, the storage requirement is determined based on the demand indicators corresponding to the target service in the resource request. Status data of each available resource pool is then obtained to determine the allocation parameters for each available resource pool. Subsequently, the storage requirement is allocated according to a preset resource allocation strategy and the allocation parameters of each available resource pool, thus determining the target resource pool and the target storage amount allocated to it. Therefore, by determining the storage requirement and rationally allocating it according to the preset resource allocation strategy and the allocation parameters of each available resource pool, the target resource pool and the target storage amount allocated to it are determined. This improves the flexibility and intelligence of resource allocation, thereby increasing the efficiency of resource allocation.
[0115] To implement the above embodiments, this application also proposes an electronic device, including: a processor and a memory communicatively connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method provided in the foregoing embodiments.
[0116] To implement the above embodiments, this application also proposes a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided in the foregoing embodiments.
[0117] To implement the above embodiments, this application also proposes a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the foregoing embodiments.
[0118] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0119] It should be noted that personal information collected from users should be used for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. Furthermore, such collection / sharing should only be conducted after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign an agreement / authorization that includes authorization of relevant user information before the user uses the function. In addition, any necessary steps must be taken to protect and safeguard access to such personal information data and ensure that others with access to personal information data comply with their privacy policies and procedures.
[0120] This application is intended to provide an implementation scheme for users to selectively prevent the use or access to their personal information data. Specifically, this application is intended to provide hardware and / or software to prevent or block access to such personal information data. Once personal information data is no longer needed, risks can be minimized by restricting data collection and deleting data. Furthermore, where applicable, such personal information is de-identified to protect user privacy.
[0121] In the foregoing descriptions of the embodiments, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0122] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0123] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0124] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0125] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0126] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0127] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0128] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A resource allocation method, characterized in that, The method includes: In response to receiving a resource request for a target service, the storage requirement is determined based on the demand indicators corresponding to the target service in the resource request. Obtain the status data of each available resource pool, and determine the allocation parameters of each available resource pool based on the status data of each available resource pool; Based on the preset resource allocation strategy and the allocation parameters of each available resource pool, the storage demand is allocated, and the target resource pool in the available resource pool and the target storage amount allocated to the target resource pool are determined. The step of allocating the storage demand according to a preset resource allocation strategy and allocation parameters for each available resource pool, and determining the target resource pool and the target storage amount allocated to the target resource pool, includes: Determine the first allocation ratio corresponding to the current allocation, and determine the first allocation amount by multiplying the first allocation ratio and the storage demand. Based on the allocation parameters corresponding to each available resource pool, a comprehensive score for each available resource pool is determined; Based on the comprehensive score of each available resource pool and the first allocation amount, the target resource pool in the available resource pool and the target storage amount allocated to the target resource pool are determined; In response to the situation where the utilization rate of the storage resources corresponding to the first allocation amount in the target resource pool is greater than or equal to a preset threshold, the status data of each available resource pool is reacquired to redetermine the comprehensive score of each available resource pool. Based on the redetermined comprehensive score of each available resource pool and the second allocation amount corresponding to the next allocation, the expanded target resource pool and the target storage amount allocated to the expanded target resource pool are determined until the allocation of all the storage requirements is completed.
2. The method as described in claim 1, characterized in that, The allocation parameters include one or more of the following: allocation rate, load rate, resource cost, PUE, and fault score.
3. The method as described in claim 2, characterized in that, The step of determining the allocation parameters for each available resource pool based on the status data of each available resource pool includes: Determine the number of failures of each type that occur in the available resource pool within the current preset time period; The fault score of the available resource pool is determined by subtracting the product of the number of faults and the corresponding score for each fault type from the initial score.
4. The method as described in claim 1, characterized in that, When the target service is video surveillance storage, the demand indicators include video resolution, storage duration, number of video access channels, the permission level of the target user initiating the resource request, and video format. Determining the storage demand based on the demand indicators corresponding to the target service in the resource request includes: Based on the video resolution and the video format, a preset bitstream association table is queried to determine the target bitstream corresponding to the video resolution and the video format; Determine the redundancy coefficient corresponding to the permission level; The storage requirement is determined based on the target bitstream, the redundancy coefficient, the storage duration, and the number of video access channels.
5. A resource allocation device, characterized in that, The device includes: The determination module is used to respond to receiving a resource request request for a target service and determine the storage requirement based on the requirement indicators corresponding to the target service in the resource request request; The monitoring module is used to obtain the current status data of each available resource pool, so as to determine the allocation parameters of each available resource pool based on the status data of each available resource pool; The allocation module is used to allocate the storage demand according to a preset resource allocation strategy and the allocation parameters of each available resource pool, and to determine the target resource pool in the available resource pool and the target storage amount allocated to the target resource pool. The step of allocating the storage demand according to a preset resource allocation strategy and allocation parameters for each available resource pool, and determining the target resource pool and the target storage amount allocated to the target resource pool, includes: Determine the first allocation ratio corresponding to the current allocation, and determine the first allocation amount by multiplying the first allocation ratio and the storage demand. Based on the allocation parameters corresponding to each available resource pool, a comprehensive score for each available resource pool is determined; Based on the comprehensive score of each available resource pool and the first allocation amount, the target resource pool in the available resource pool and the target storage amount allocated to the target resource pool are determined; In response to the situation where the utilization rate of the storage resources corresponding to the first allocation amount in the target resource pool is greater than or equal to a preset threshold, the status data of each available resource pool is reacquired to redetermine the comprehensive score of each available resource pool. Based on the redetermined comprehensive score of each available resource pool and the second allocation amount corresponding to the next allocation, the expanded target resource pool and the target storage amount allocated to the expanded target resource pool are determined until the allocation of all the storage requirements is completed.
6. The apparatus as claimed in claim 5, characterized in that, The allocation parameters include one or more of the following: allocation rate, load rate, resource cost, PUE, and fault score.
7. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-4.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-4.
9. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-4.
Citation Information
Patent Citations
Server resource allocation method and edge data center
CN112286695A
Database resource pool allocation method and device, equipment, medium and program product
CN115408141A