WO2024045744A1 - Resource planning method and apparatus, and related device - Google Patents

Resource planning method and apparatus, and related device Download PDF

Info

Publication number
WO2024045744A1
WO2024045744A1 PCT/CN2023/098468 CN2023098468W WO2024045744A1 WO 2024045744 A1 WO2024045744 A1 WO 2024045744A1 CN 2023098468 W CN2023098468 W CN 2023098468W WO 2024045744 A1 WO2024045744 A1 WO 2024045744A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
cloud service
time period
amount
cloud
Prior art date
Application number
PCT/CN2023/098468
Other languages
French (fr)
Chinese (zh)
Inventor
刘云涛
宋利伟
黄鹏飞
杨昌鹏
Original Assignee
华为云计算技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为云计算技术有限公司 filed Critical 华为云计算技术有限公司
Publication of WO2024045744A1 publication Critical patent/WO2024045744A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Definitions

  • the present application relates to the field of data processing technology, and in particular to a resource planning method, device and related equipment.
  • cloud services With the development of network technology, more and more users choose to use cloud services. After a user subscribes to a cloud service from a cloud service provider, the user can use the resources provided by the cloud service provider to achieve his or her own purposes. For example, for users who subscribe to cloud storage services, users can store data in the storage space provided by the cloud service provider. For users who subscribe to cloud live broadcast services, users can upload live broadcast data to the live broadcast server provided by the cloud service provider, and then send the live broadcast data to users watching the live broadcast through the downlink bandwidth provided by the cloud service provider.
  • cloud service providers can often provide multiple types of cloud services.
  • a cloud service provider can provide both cloud storage services and cloud live streaming services. No matter what type of cloud service you use, you need to use the resources of the cloud service provider. Since the total amount of resources owned by a cloud service provider is often limited, the cloud service provider needs to determine the amount of resources that each type of cloud service can use.
  • this application provides a resource planning method to reasonably plan the amount of resources that each cloud service can use to ensure the normal operation of the cloud service.
  • This application also provides corresponding devices, computing device clusters, computer-readable storage media, and computer program products.
  • this application provides a resource planning method, which can be applied to a resource planning device.
  • the resource planning device may first obtain the first characteristic, and the first characteristic is used to indicate the usage of the first resource by the first cloud service in the first historical time period.
  • the resource planning device predicts the demand for the first resource by the first cloud service in the second time period in the future based on the usage of the first resource by the first cloud service in the first historical time period.
  • the demand of the first resource by the first cloud service in the second time period in the future may be called the second characteristic.
  • the resource planning device determines the first allocated resource amount according to the second characteristic, and the first allocated resource amount is the resource amount of the first resource allocated for the first cloud service in the second time period.
  • the resource planning device can predict the future demand of the first resource by the first cloud service based on the historical demand of the first resource by the first cloud service, and automatically determine the need for the first resource in the second time period in the future. How many first resources are allocated by a cloud service. In this way, automatic resource planning can be realized and the rationality of cloud service resource planning can be improved. Moreover, since the above process can be completed by the resource planning device without manual participation, the frequency of cloud service resource planning can be increased, thereby improving the flexibility of resource planning.
  • the resource planning device may plan the resource amount of the first resource allocated to the first cloud service in multiple time periods in the future according to the first characteristic. Specifically, the resource planning device may determine the demand for the first resource by the first cloud service in the third time period in the future based on the first characteristic. The demand of the first resource by the first cloud service in the third time period in the future is called the third characteristic. Next, the resource planning module determines the second resource allocation according to the third characteristic The second resource allocation amount is the resource amount of the first resource allocated to the first cloud service in the third time period. The third time period and the second time period are different time periods. Optionally, the sum of the duration of the second time period and the duration of the third time period is less than or equal to the duration of the first time period. In this way, the resource demand of multiple time periods in the future is determined based on the resource demand of the first time period, and the resource amount of the first resource allocated to the first and range can be flexibly adjusted.
  • the second time period and the third time period may be divided according to the demand for the first resource.
  • the resource planning device may determine the demand for the first resource by the first cloud service in a longer period of time in the future based on the first characteristic. If the first cloud service has a greater demand for the first resource during a certain period of time and has a smaller demand for the first resource during another period of time, the resource planning device may divide the two periods of time into different time periods. That is to say, the difference between the demand of the first resource by the first cloud service in the second time period and the demand of the first resource by the first cloud service in the third time period is greater than the preset threshold.
  • the time period is divided according to the difference between the resource requirements, and on the premise of ensuring that the resource amount of the first resource allocated to the first cloud service can meet the needs of the first cloud service, it is avoided that the resource amount allocated to the first cloud service is Repeated adjustment of the resource amount of the first resource.
  • the resource planning device can be used to plan resources that have a greater impact on cloud services. That is to say, if the first cloud service runs based on multiple resources, then the first resource planned by the resource planning device is the resource that has the greatest impact on the first cloud service. That is, if the first cloud service runs based on the first resource and the second resource, then the impact of the resource amount of the first resource on the first cloud service is greater than the impact of the resource amount of the second resource on the first cloud service. .
  • the first resource includes any one or more of the following: network bandwidth resources, Elastic Internet Protocol (Elastic Internet Protocol, EIP) address resources, storage space resources, and computing resources.
  • Elastic Internet Protocol Elastic Internet Protocol, EIP
  • the resource planning device is further configured to plan the attributes of the first resource allocated to the first cloud service based on the demand of the first cloud service for the first resource. For example, assume that the first resource is a network bandwidth resource. Then when determining the first resource allocation amount, the resource planning device can not only determine the target bandwidth amount based on the first cloud service's demand for network bandwidth resources in the second time period, but also determine the target bandwidth amount based on the cloud service characteristics of the first cloud service. target line. The target line is a line that can satisfy the cloud service characteristics of the first cloud service. Next, the resource planning device determines the first allocated resource amount according to the target line and the target bandwidth amount.
  • the first cloud service can use the bandwidth of the target line during the second time period, and the maximum bandwidth that the first cloud service can use does not exceed the target bandwidth amount.
  • the first cloud service's demand for the resource amount of the network bandwidth resource can be satisfied, and the first cloud service's demand for the resource attribute of the network bandwidth resource can also be satisfied.
  • the first cloud service is more cost-sensitive, that is, the first and scope cloud service characteristics indicate that the first cloud service is a cost-sensitive cloud service. Then when determining the target line, the resource planning device can select the candidate line with the lowest cost and the remaining bandwidth quality not less than the target bandwidth amount as the target line from multiple alternative lines. In this way, the operating cost of the first cloud service can be reduced on the basis of ensuring that the first cloud service has sufficient network bandwidth resources.
  • this application also provides a resource planning device.
  • the device includes: a feature acquisition module, configured to acquire a first feature.
  • the first feature indicates that the first cloud service has used the first resource in a first historical time period. usage;
  • a feature prediction module configured to determine a second feature based on the first feature, the second feature indicating the demand for the first resource by the first cloud service in a second time period in the future;
  • a resource allocation module configured to determine according to the second characteristic Determine a first allocated resource amount, which is the resource amount of the first resource allocated for the first cloud service in the second time period.
  • the feature prediction module is further configured to determine a third feature based on the first feature, and the third feature indicates that the first cloud service will predict the performance of the first cloud service in a third time period in the future.
  • the demand situation of the first resource; the resource allocation module is also used to determine a second allocated resource amount according to the third characteristic, and the second allocated resource amount is the amount of the first cloud resource in the third time period.
  • the demand of the first resource by the first cloud service in the second time period is different from the demand of the first resource by the first cloud service in the third time period.
  • the difference between the demand situations of the first resource is greater than the preset threshold.
  • the first cloud service runs based on a first resource and a second resource, and the amount of the first resource has a greater impact on the first cloud service than the second resource. The impact of the amount of resources on the first cloud service.
  • the first resource includes any one or more of the following: network bandwidth resources, EIP address resources, storage space resources, and computing resources.
  • the first resource includes a network bandwidth resource
  • the resource allocation module is specifically configured to be based on the demand for the network bandwidth resource by the first cloud service in the second time period. Determine the target bandwidth amount according to the situation; determine the target line according to the cloud service characteristics of the first cloud service; determine the first allocated resource amount according to the target line and the target bandwidth amount, and the first allocated resource amount indicates the The target line allocates network bandwidth resources of the target bandwidth amount to the first cloud service within the second time period.
  • the cloud service characteristics of the first cloud service indicate that the first cloud service is a cost-sensitive cloud service
  • the resource allocation module is specifically used to select costs from multiple alternative lines.
  • the candidate line that is the lowest and has a remaining bandwidth greater than the target bandwidth is used as the target line.
  • the present application provides a computing device cluster.
  • the computing device includes at least one computing device.
  • the at least one computing device includes at least one processor and at least one memory; the at least one memory is used to store instructions.
  • the at least one processor executes the instruction stored in the at least one memory, so that the computing device cluster executes the resource planning method in the above-mentioned first aspect or any possible implementation of the first aspect.
  • the memory can be integrated into the processor or independent of the processor.
  • the at least one computing device may also include a bus. Among them, the processor is connected to the memory through a bus.
  • the memory may include readable memory and random access memory.
  • the present application provides a computer-readable storage medium that stores instructions that, when run on at least one computing device, cause the at least one computing device to execute the above-mentioned first aspect. Or the method described in any implementation of the first aspect.
  • the present application provides a computer program product containing instructions that, when run on at least one computing device, cause the at least one computing device to execute the above-mentioned first aspect or any implementation of the first aspect. the method described.
  • Figure 1 is a schematic diagram of an exemplary application scenario provided by an embodiment of the present application.
  • Figure 2 is a schematic flow chart of a resource planning method provided by an embodiment of the present application.
  • Figure 3 is a schematic structural diagram of a computing device provided by an embodiment of the present application.
  • Figure 4 is a schematic structural diagram of a computing device cluster provided by an embodiment of the present application.
  • Cloud service providers can provide one or more types of cloud services to users. Each type of cloud service consumes certain resources.
  • the resources consumed by the cloud service may include, for example, computing processing resources, bandwidth resources, storage resources, etc. It can be understood that the resources that a cloud service provider can provide depend on the equipment and other hardware conditions of the cloud service provider, so the total amount of resources that a cloud service provider can provide is relatively fixed.
  • cloud service providers can plan the resources they can provide and determine the amount of resources that each type of cloud service can use. In this way, after a user subscribes to a certain type of cloud service, a cloud service can be created based on the resources allocated to that type of cloud service, thereby providing the user with the corresponding cloud service.
  • embodiments of the present application provide a resource planning method, which can be executed by a resource planning device to achieve the purpose of determining resources planned for cloud services to ensure the normal operation of cloud services.
  • the resource planning device obtains the first feature.
  • the first characteristic is used to indicate the usage of the first resource by the first cloud service in the first historical time period.
  • the first resource is a resource that needs to be consumed during the operation of the first cloud service, and may include, for example, network bandwidth resources, storage space resources, computing resources, and EIP address resources.
  • the demand of the first resource by the first cloud service in the second time period in the future can be predicted, and the predicted demand of the first resource by the first cloud service in the second time period is called the second feature.
  • a first allocated resource amount may be determined, and the first allocated resource amount is the resource amount of the first resource allocated for the first cloud service in the second time period.
  • the resource planning device can predict the future demand for resources by the cloud service based on the historical demand for resources by the cloud service, and automatically determine how many resources need to be allocated to the cloud service in the second time period in the future. In this way, automatic resource planning can be realized and the rationality of cloud service resource planning can be improved. And, due to the above process It can be completed by the resource planning device without manual participation, which can increase the frequency of cloud service resource planning, thus improving the flexibility of resource planning.
  • the above resource planning device can be deployed in the cloud and used to plan resources that can be used by each cloud service in multiple cloud services.
  • the resource planning device 110 may be a computing device or a computing device cluster located in the cloud 100 .
  • the cloud 100 can provide the first cloud service and the second cloud service to the outside world.
  • the user 210 can subscribe to the first cloud service through the client 310
  • the user 220 can subscribe to the second cloud service through the client 320. Both the first cloud service and the second cloud service are implemented based on the resources provided in the cloud 100 .
  • the client 310 may be, for example, an application running on the user-side device corresponding to the first cloud service, or may be an externally provided web browser on the cloud 100 corresponding to the first cloud service, or the like.
  • the client 320 may be, for example, an application running on the user-side device corresponding to the second cloud service, or may be an externally provided web browser on the cloud 100 corresponding to the second cloud service, or the like.
  • the resource planning device 100 may include a feature acquisition module 111, a feature prediction module 112, and a resource allocation module 112.
  • the feature acquisition module 111 is used to acquire the usage of resources by cloud services in the cloud 100 within a historical time period, and send the usage of resources by the cloud services to the feature prediction module 112 as the first feature.
  • the feature prediction module 112 is configured to predict the resource demand of the cloud service in the future time period based on the first feature, and send the resource demand of the cloud service in the future time period as the second feature to the resource allocation module 113 .
  • the resource allocation module 113 is configured to allocate resources to the cloud service according to the second characteristic. For example, if the first characteristic includes the usage of the first resource by the first cloud service in the first historical time period, the resource allocation module 113 may be used to determine the amount of resources allocated to the first cloud service in the second time period in the future. .
  • the first cloud service can run based on the allocated resources. That is, if the user 210 subscribes to the first cloud service in the second time period, the resources in the cloud 100 can be used to provide the user 210 with the first cloud service, and the cloud 100 is used to provide the first cloud service in the second time period.
  • the total amount of resources for the service does not exceed the amount of resources determined by the resource allocation module 113.
  • the above resource planning device can be implemented by software, or can be implemented by hardware.
  • the resource planning device may include code running on a computing instance.
  • the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container.
  • the above computing instance may be one or more.
  • the resource planning apparatus may include code running on multiple hosts/virtual machines/containers. It should be noted that multiple hosts/virtual machines/containers used to run the code can be distributed in the same region (region) or in different regions. Furthermore, multiple hosts/virtual machines/containers used to run the code can be distributed in the same availability zone (AZ) or in different AZs. Each AZ includes one data center or multiple AZs. geographically close data centers. Among them, usually a region can include multiple AZs.
  • the multiple hosts/VMs/containers used to run the code can be distributed in the same virtual private cloud (VPC), or across multiple VPCs.
  • VPC virtual private cloud
  • Cross-region communication between two VPCs in the same region and between VPCs in different regions requires a communication gateway in each VPC, and the interconnection between VPCs is realized through the communication gateway. .
  • the resource planning device may include at least one computing device, such as a server.
  • the resource planning device may also be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD).
  • ASIC application-specific integrated circuit
  • PLD programmable logic device
  • the above-mentioned PLD can be implemented by a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
  • CPLD complex programmable logical device
  • FPGA field-programmable gate array
  • GAL general array logic
  • Multiple computing devices included in the resource planning device may be distributed in the same region or in different regions. Multiple computing devices included in the resource planning device may be distributed in the same AZ or in different AZs. Similarly, multiple computing devices included in the resource planning apparatus may be distributed in the same VPC or in multiple VPCs.
  • the plurality of computing devices may be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
  • FIG 2 is a schematic flow chart of a resource planning method in an embodiment of the present application. This method can be applied to the application scenario shown in Figure 1 above, or can also be applied to other applicable application scenarios.
  • the following description takes the application scenario shown in Figure 1 as an example.
  • for the functions of each module please refer to the relevant descriptions of the following embodiments.
  • the resource planning method shown in Figure 2 may specifically include:
  • the feature acquisition module 111 acquires the first feature.
  • the feature acquisition module 111 running on the cloud 100 can acquire the resource usage of one or more cloud services running on the cloud 100. Specifically, for the first cloud service running on the cloud 100, the feature acquisition module 111 can acquire the usage of the first resource by the first cloud service in the first historical time period. In this embodiment, the usage of the first resource by the first cloud service in the first historical time period is called the first characteristic.
  • the first resources are resources required when the first cloud service is running.
  • the first resource may include any one or more of network bandwidth resources, EIP address resources, storage space resources, and computing resources.
  • the computing resources may be, for example, memory resources or central processing unit (CPU) resources.
  • the length of the first time period can be set according to needs to provide a period for the resource planning module 110 to re-carry out resource planning. That is to say, the feature acquisition module 111 can periodically acquire the usage of the first resource by the first cloud service within the period, using the duration of the first time period as the period duration.
  • the first time period may be 24 hours. That is, the resource planning device can obtain the use of the first resource by the first cloud service on the nth day at the end of the nth day, and determine the use of the first resource by the first cloud service on the nth day based on the use of the first resource by the first cloud service on the nth day. + How many resources need to be allocated to the first cloud service for 1 day. where n is a positive integer.
  • the first resource may be a resource that has a greater impact on the first cloud service. If fewer first resources are allocated to the first cloud service, the scale of the first cloud service provided by the cloud 100 may be smaller, or the service quality of the first cloud service provided by the cloud 100 may be poor. That is, if the first cloud service runs based on the first resource and the second resource, the impact of the amount of the first resource allocated to the first cloud service on the first cloud service is greater than the impact of the amount of the first resource allocated to the first cloud service. The impact of the resource amount of the second resource on the first cloud service.
  • the following uses specific examples to illustrate the corresponding relationship between the first resource and the first cloud service.
  • the first cloud service is an object storage service (OBS).
  • OBS object storage service
  • the user 210 can upload the data to be stored to the cloud 100 through the network, and the data will be stored by the cloud.
  • the storage device in the terminal 100 stores.
  • the main factor limiting the service quality of the object storage service is the uplink bandwidth resources allocated to the object storage service. The greater the upstream bandwidth allocated to the object storage service, the faster the user 210 can upload data to be stored. Therefore, the first resource corresponding to the object storage service may be an uplink bandwidth resource.
  • the first cloud service is a cloud live broadcast service.
  • user 210 uses the cloud live broadcast service, user 210 can send live broadcast data to cloud 100, and cloud 100 can send the live broadcast data to users watching the live broadcast.
  • the main factor limiting the service quality of the cloud live broadcast service is the downlink bandwidth resources allocated to the cloud live broadcast service. The greater the downlink bandwidth allocated to the cloud live broadcast service, the better the quality of live broadcast data transmission, and the smoother the live broadcast will be seen by users watching the live broadcast. Therefore, the first resource corresponding to the cloud live broadcast service may be the downlink bandwidth resource.
  • the first cloud service is a cloud computing service.
  • user 210 can send data to cloud 100, and cloud 100 can call the computing resources of cloud 100 to calculate the data, and send the calculated data to user 210.
  • the main factor that limits the service quality of a cloud computing service is the computing resources allocated to the cloud computing service. The more computing resources allocated to cloud computing services, the faster the data calculation process will be. Therefore, the first resource corresponding to the cloud computing service may be a computing resource.
  • the cloud 100 may not provide the cloud services in the above three examples, or may provide other cloud services. Moreover, the corresponding relationship between the first cloud service and the first resource can be flexibly adjusted according to the actual situation.
  • the first characteristic is used to indicate the usage of the first resource by the first cloud service in the first time period.
  • the first characteristic may specifically be the average usage of the first resource by the first cloud service in the first time period, or it may be the maximum usage of the first resource by the first cloud service in the first time period. .
  • the first characteristic in order to more flexibly adjust the resource amount of the first resource allocated to the first cloud service, can be used to indicate the pair of the first cloud service in multiple sub-time periods in the first time period.
  • the usage of primary resources That is to say, the first time period may be divided into multiple sub-time periods, and the first characteristic includes the usage of the first resource by the first cloud service in each sub-time period of the multiple sub-time periods.
  • the first characteristic is also used to indicate a change pattern of the resource amount of the first resource used by the first cloud service in the first time period.
  • the first characteristic may be used to indicate the usage of the first resource by the first cloud service every hour (or every minute) in the nth day.
  • Resource usage That is to say, when providing the first cloud service to the user, the feature acquisition module 111 or other modules in the cloud 100 can store the usage of the first resource by the first cloud service every hour (or every minute). It can be understood that the feature acquisition module 111 or other modules in the cloud 100 can also store the usage of the first resource by the first cloud service at other frequencies.
  • the first cloud service in the embodiment shown in FIG. 2 can be executed by any one or more computing devices in the cloud 100 .
  • the feature acquisition module 111 may respectively acquire the resources used by the first cloud service on the computing device from each computing device running the first cloud service in the cloud 100 .
  • the feature acquisition module 111 may send the first feature to the feature prediction module 112 .
  • the feature prediction module 112 predicts the second feature according to the first feature.
  • the feature prediction module 112 may predict the second feature based on the first feature.
  • the second characteristic is used to indicate the demand of the first resource by the first cloud service in the second time period in the future. That is to say, after the pattern of using the first resource by the first cloud service is obtained through the feature acquisition module 111, the resource The source planning device 110 can predict future demand for the first resource by the first cloud service through the feature prediction module 112, thereby determining the amount of resources allocated to the first cloud service based on the demand for the first resource by the first cloud service.
  • the feature prediction module 112 may determine the second feature based on the overall pattern of usage of the first resource by the first cloud service in the first time period.
  • the feature prediction module 112 may determine the above-mentioned average value or maximum value as the demand for the first resource by the first cloud service in the second time period. That is, the demand for the first resource by the first cloud service in the second time period indicated by the second characteristic is equal to the usage of the first resource by the first cloud service during the first time period indicated by the first characteristic. match.
  • the feature prediction module 112 may perform a fine-grained analysis on the usage of the first resource by the first cloud service in the first time period, and determine the second feature based on the analysis results.
  • the feature prediction module 112 may be based on the change in usage of the first resource by the first cloud service. According to the law, the possible change law of the usage of the first resource of the first cloud service in the future is predicted, and the second characteristic is determined accordingly.
  • the duration of the first time period may be greater than the duration of the second time period. Assume that the duration of the first time period is the first duration, and the duration of the second time period is the second duration. Then when determining the second feature, the feature prediction module can first determine the sub-time period in the first time period corresponding to the second time period based on the time mapping relationship, and calculate the first resource in this sub-time period according to the first cloud service. The change pattern of usage determines the second characteristic.
  • the time mapping relationship is used to indicate the corresponding relationship between time periods in which the change patterns of the usage of the first resource are similar. That is, the feature prediction module 112 can select the change rule corresponding to the second time period from the predicted change rules according to the time mapping relationship.
  • the second time period is the time period between 19:00-20:00 on the n+1th day.
  • n is a positive integer.
  • the feature prediction module 112 can first determine from the first feature based on the second time period the first cloud service's response to the first resource during the period from 19:00 to 20:00 in the evening of the nth day. The changing pattern of usage. Then, the feature prediction module 112 predicts the first cloud service's usage of the first resource during the period of 19:00-20:00 on the nth day based on the change pattern of the first cloud service on the n+1th night.
  • the second feature is obtained from the possible change pattern of the usage of the first resource during the period from 19:00 to 20:00.
  • the characteristic prediction module 112 may determine the first characteristic per hour on the n+1th day.
  • the demand for primary resources by cloud services may also determine a third feature based on the first feature, and the third feature indicates the demand for the first resource by the first cloud service in a third time period in the future.
  • the third time period and the second time period respectively correspond to the sub-time periods in the first time period.
  • the third time period may be the time period between 18:00 and 19:00 in the evening of the n+1th day.
  • the feature prediction module 112 can predict the demand for the first resource by the first service in multiple time periods in the future based on the first feature.
  • the allocated resource amount corresponding to each time period is calculated in subsequent step S203, and the first resource allocated to the first cloud service is allocated according to the allocated resource amount, it may cause the cloud 100 to allocate the first resource to the first cloud service. Frequent changes in the resource amount of the first resource may affect the resource allocation of the cloud 100 and affect the normal operation of the first cloud service and/or other cloud services.
  • multiple adjacent time periods may be merged into one time period, thereby reducing the frequency of changes in the resource amount of the first resource of the first cloud service. Specifically, it can be determined whether two adjacent time periods can be merged based on the similarity of the demand for the first resource for the first cloud service in the time period.
  • the feature prediction module 112 can determine whether the first cloud service's demand for the first resource in the second time period is consistent with the first cloud service's demand for the first resource in the third time period. Whether the difference in demand for the first resource is greater than a preset threshold. If the difference between the first cloud service's demand for the first resource in the second time period and the first cloud service's demand for the first resource in the third time period is greater than the preset threshold, it means that the first cloud service is in The demand for the first resource is quite different between the second time period and the third time period, and the second time period and the third time period cannot be combined.
  • the feature prediction module 112 may merge the second time period and the third time period.
  • the feature prediction module 112 may use the greater demand for the first resource in the second time period and the third time period as the first cloud in the combined time period.
  • the demand for the primary resource by the service may be used.
  • the feature prediction module 112 determines the demand for downlink bandwidth of the cloud live broadcast service on the n+1th day based on the first feature.
  • the demand for downlink bandwidth for the cloud live broadcast service from 0:00-4:00 on the n+1st day is three gigabytes per second (GB/s).
  • the demand for downlink bandwidth from 4:00-8:00 on day n+1 is 3.1GB/s
  • the cloud live broadcast service’s demand for downlink bandwidth from 8:00-12:00 on day n+1 is 5GB/s.
  • the difference between the demand for downlink bandwidth of the cloud live broadcast service from 0:00-4:00 on the n+1 day and the demand for downlink bandwidth by the cloud live broadcast service from 4:00-8:00 on the n+1 day is 0.1GB/s, which is less than the preset threshold 1GB/s, then the feature prediction module 112 can determine the demand for downlink bandwidth of the cloud live broadcast service from 0:00-8:00 on the n+1th day to be 3.1GB/s.
  • the difference between the cloud live broadcast service’s demand for downlink bandwidth from 4:00-8:00 on day n+1 and the cloud live broadcast service’s demand for downlink bandwidth from 8:00-12:00 on day n+1 is 1.9GB/s, which is greater than the preset threshold 1GB/s, then the feature prediction module 112 determines that the time period of 4:00-8:00 on the n+1th day is the same as the time period of 8:00-12:00 on the n+1st day. Time periods cannot be merged.
  • the above action of merging time periods may also be performed by the resource allocation unit 112.
  • the feature prediction module 112 may send the second feature to the resource allocation module 113, so that the resource allocation module 113 provides the first resource for the first cloud service based on the second feature. Cloud services allocate the first resources. In the same way, the feature prediction module 112 can also send the third feature to the resource allocation module 113.
  • the resource allocation module 113 determines the first allocated resource amount according to the second characteristic.
  • the resource allocation module 113 may determine the first allocated resource amount according to the second feature.
  • the first allocated resource amount is the resource amount of the first resource allocated to the first cloud service in the second time period. That is to say, during the second time period, the first cloud service uses at most the first resource of the first allocated resource amount in the cloud 100 .
  • the feature prediction module 112 can also determine the second allocated resource amount based on the third feature. Second allocation of funds
  • the source amount is the resource amount of the first resource allocated to the first cloud service in the third time period. I won’t go into details here.
  • the second characteristic is used to indicate the demand of the first resource by the first cloud service in the second time period.
  • the resource allocation module 113 may use the demand as the first allocated resource.
  • the resource allocation module 113 may use the sum of the demand amount and the preset redundancy amount as the first allocated resource amount. In this way, even if the user's subscription to the first cloud service increases during the second time period, the first allocated resource amount determined based on the second characteristic and the preset redundancy amount may allow the cloud 100 to provide more first cloud services.
  • the resource allocation module 113 may determine characteristics of the first allocated resource amount based on characteristics of the first cloud service.
  • the first allocated resource amount is used to indicate the network bandwidth that can be used by the first cloud service.
  • the current cloud can often provide multiple different lines, each of which has certain network bandwidth resources.
  • the resource allocation module 113 can use multiple lines provided by the cloud 100 as alternative lines.
  • the resource allocation module 113 may determine the target bandwidth amount required by the first cloud service in the second time period according to the second characteristic. Next, the resource allocation module 113 determines the alternative lines used by the first cloud service in the second time period based on the target bandwidth amount, the first cloud service's demand for lines, and the network bandwidth resources of each alternative line.
  • the alternative line selected by the resource allocation module 113 may also be called a target line.
  • the first cloud service can use the network bandwidth resources of the target line during the second time period, and the maximum bandwidth used by the first cloud service does not exceed the target bandwidth.
  • the resource allocation module 113 may make a selection based on the characteristics of the first cloud service.
  • the first cloud service is a cost-sensitive cloud service, that is, the first cloud service has higher cost requirements. Then, in order to reduce the cost of the first cloud service, the resource allocation module 113 can select the candidate line with the lowest cost and the remaining bandwidth amount greater than the target bandwidth amount as the target line from multiple alternative lines.
  • the first cloud service is a cloud storage service. Since cloud storage services often use data backup mechanisms when transmitting data, cloud storage services do not have high requirements for network quality. Moreover, the amount of data uploaded to the cloud in cloud storage services is often large. If high-cost lines are used to provide network bandwidth resources for cloud storage services, the cost of cloud storage services will increase significantly. Therefore, cloud storage services can be considered as cost-sensitive cloud services.
  • the resource allocation module 113 may first determine the target bandwidth amount required by the cloud storage service within the second time period. Then, the resource allocation module 113 can select the candidate line whose remaining bandwidth resources are not less than the target bandwidth amount and has the lowest cost from multiple candidate lines as the target line. In this way, the obtained first allocated resource amount is used to instruct the cloud storage service to use the network bandwidth resources of the target line within the second time period, and the network bandwidth resources that the cloud storage service can use do not exceed the target bandwidth amount.
  • the first cloud service is a performance-sensitive cloud service, that is, the first cloud service has higher requirements on network performance. Then, in order to improve the service quality of the first cloud service, the resource allocation module 113 selects the candidate line with the best network performance and the remaining bandwidth that is greater than the target bandwidth from multiple candidate lines as the target line.
  • the first cloud service is a cloud live broadcast service. Since users who watch live broadcasts have higher requirements for live broadcast quality, cloud live broadcast services often have higher requirements for network parameters such as delay, packet loss, and jitter. Therefore, cloud storage services have higher requirements for network quality. Therefore, the cloud live broadcast service can be regarded as a performance-sensitive cloud service.
  • the resource allocation module 113 may first determine the target bandwidth amount required by the cloud live broadcast service in the second time period. Then, the resource allocation module 113 can select an alternative line whose remaining bandwidth resources are not less than the target bandwidth amount and has the best network performance from multiple alternative lines as the target line. In this way, the obtained first allocated resource amount is used to instruct the cloud storage service to use the network bandwidth resources of the target line within the second time period, and the network bandwidth resources that the cloud storage service can use do not exceed the target bandwidth amount.
  • cloud 100 may include multiple clusters of computing devices located in different geographical locations.
  • the multiple alternative routes to cloud 100 may then be routes to different clusters of computing devices.
  • the resource allocation module 113 may use any alternative line as a target line.
  • the audience of cloud live broadcast services may be concentrated in specific areas. If the computing device cluster corresponding to the target line belongs to a different geographical area from the audience of the cloud live broadcast service, then cross-regional transmission may affect the service quality of the cloud live broadcast service.
  • the resource allocation module 113 may first select an alternative line that matches the cloud live broadcast service from the alternative lines provided by the cloud 100, and then determine the target line based on network performance parameters.
  • the resource allocation module 113 may send the first allocated resource amount to the network device in the cloud 100 for running the first cloud service, or send the first allocated resource amount to the management device in the cloud 100 . In this way, within the second time period, the cloud 100 can be controlled to run the first service with first resources that do not exceed the first allocated resource amount.
  • the resource planning module 110 can predict the demand of the first resource by the first cloud service in the second time period based on the usage of the first resource by the first cloud service in the first time period, and then predict According to the demand of the first cloud service for the first resource, the resource amount of the first resource that the first cloud service can use in the second time period is determined. In this way, on the one hand, there is no need to manually hold a meeting to determine the first resource allocated to the first cloud service; on the other hand, prediction is made based on the historical usage of the first resource, and the obtained second characteristics and the first allocated resource amount can satisfy the needs of the first cloud service usage needs, resource planning is more reasonable. In addition, the first resources allocated to the first cloud service can be quickly and flexibly adjusted. Compared with the traditional manual resource planning method, the frequency of resource re-planning can be increased and the changing rules of the cloud service business can be more flexibly adapted.
  • the cloud 100 can also provide the user 220 with a second cloud service.
  • the feature acquisition module 111 may also acquire the usage of the third resource by the second cloud service in the first historical time period.
  • the third resource and the first resource may be the same resource or different resources.
  • the third resource is the resource that has the highest impact on the second cloud service. The introduction to resources can be found above and will not be repeated here.
  • the resource planning device (including the above-mentioned feature acquisition module 111, feature prediction module 112 and resource planning module 113) involved in the resource planning process for cloud services may be configured on a computing device or a computing device.
  • software on a cluster of devices and, by running the software on a computing device or a cluster of computing devices, So that the computing device or the computing device cluster realizes the functions of the above resource planning device.
  • the resource planning devices involved in the resource planning process are introduced in detail.
  • Figure 3 shows a schematic structural diagram of a computing device.
  • the above-mentioned resource planning device 110 can be deployed on the computing device.
  • the computing device can be a computing device (such as a server) in a cloud environment, or a computing device in an edge environment. Or terminal equipment, etc. can be specifically used to implement the functions of the feature acquisition module 111, the feature prediction module 112 and the resource planning module 113 in the embodiment shown in Figure 2.
  • computing device 300 includes processor 310 , memory 320 , communication interface 330 , and bus 340 .
  • the processor 310, the memory 320 and the communication interface 330 communicate through the bus 340.
  • the bus 340 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
  • the bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in Figure 3, but it does not mean that there is only one bus or one type of bus.
  • the communication interface 330 is used to communicate with the outside, such as receiving requests from users to subscribe to cloud services.
  • the processor 310 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits.
  • the processor 310 may also be an integrated circuit chip with signal processing capabilities.
  • the functions of each unit in the resource planning device can be completed by instructions in the form of hardware integrated logic circuits or software in the processor 310 .
  • the processor 310 can also be a general-purpose processor, a digital signal processor (DSP), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, Discrete hardware components can implement or execute the methods, steps and logical block diagrams disclosed in the embodiments of this application.
  • DSP digital signal processor
  • FPGA field programmable gate array
  • the general processor can be a microprocessor or the processor can be any conventional processor, etc.
  • the method disclosed in combination with the embodiments of the present application can be directly implemented as a hardware decoding processor to complete the execution, or can be performed using decoding processing.
  • the combination of hardware and software modules in the device is executed.
  • the software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field.
  • the storage medium is located in the memory 320.
  • the processor 310 reads the information in the memory 320 and completes some or all functions of the resource planning device in combination with its hardware.
  • the memory 320 may include volatile memory, such as random access memory (RAM).
  • RAM random access memory
  • the memory 320 may also include non-volatile memory (non-volatile memory), such as read-only memory (ROM), flash memory, HDD or SSD.
  • the memory 320 stores executable code, and the processor 310 executes the executable code to perform the method executed by the resource planning device.
  • FIG 4 shows a schematic structural diagram of a computing device cluster.
  • the computing device cluster 40 shown in Figure 4 includes multiple computing devices, and the above resource planning device can be deployed in a distributed manner on the multiple computing devices in the computing device cluster 40.
  • the computing device cluster 40 includes multiple computing devices 400.
  • Each computing device 400 includes a memory 420, a processor 410, a communication interface 430, and a bus 440.
  • the memory 420, the processor 410, and the communication interface 430 pass through Bus 440 implements communication connections between each other.
  • Processor 410 may employ a CPU, GPU, ASIC, or one or more integrated circuits.
  • the processor 410 may also be an integrated circuit chip with signal processing capabilities. During the implementation process, part of the functions of the resource planning device may be implemented by instructions in the form of integrated logic circuits or software in the hardware of the processor 410 .
  • the processor 410 can also be a DSP, FPGA, general-purpose processor, other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute some of the methods, steps and logic block diagrams disclosed in the embodiments of this application.
  • the general processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the steps of the method disclosed in conjunction with the embodiments of the present application may be directly implemented as a hardware decoding processor, or may be executed using a decoding processor.
  • the combination of hardware and software modules in the code processor is executed.
  • the software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field.
  • the storage medium is located in the memory 420.
  • the processor 410 reads the information in the memory 40 and, combined with its hardware, can complete some functions of resource planning and configuration.
  • Memory 420 may include ROM, RAM, static storage devices, dynamic storage devices, hard disks (eg, SSD, HDD), etc.
  • the memory 420 may store program codes, for example, part or all of the program code used to implement the feature acquisition module 111 , part or all of the program code used to implement the feature prediction module 112 , part or all of the program code used to implement the resource planning module 113 wait.
  • the processor 410 executes part of the method executed by the resource planning device based on the communication interface 430. For example, some of the computing devices 400 may be used to execute the above.
  • the method executed by the feature acquisition module 111 and the feature prediction module 112, and another part of the computing device 400 is used to execute the method executed by the resource planning module 113.
  • the memory 420 may also store data, such as intermediate data or result data generated by the processor 410 during execution, such as the above-mentioned first features and second features, etc.
  • the communication interface 403 in each computing device 400 is used to communicate with the outside, such as interacting with other computing devices 400 and so on.
  • the bus 440 may be a peripheral component interconnection standard bus or an extended industry standard architecture bus, or the like.
  • the bus 440 within each computing device 400 in FIG. 4 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.
  • Any computing device may be a computing device (eg, a server) in a cloud environment, a computing device in an edge environment, or a terminal device.
  • embodiments of the present application also provide a computer-readable storage medium that stores instructions that, when run on one or more computing devices, cause the one or more computing devices to execute The method executed by each unit of the resource planning device in the above embodiment.
  • embodiments of the present application also provide a computer program product.
  • the computer program product When the computer program product is executed by one or more computing devices, the one or more computing devices execute any one of the foregoing resource planning methods.
  • the computer program product may be a software installation package. If any of the foregoing resource planning methods is required, the computer program product may be downloaded and executed on the computer.
  • the device embodiments described above are only illustrative.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physically separate.
  • the physical unit can be located in one place, or it can be distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • the connection relationship between units indicates that there are communication connections between them, which can be specifically implemented as one or more communication buses or signal lines.
  • the present application can be implemented by software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memories, Special components, etc. to achieve. In general, all functions performed by computer programs can be easily implemented with corresponding hardware. Moreover, the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special-purpose circuits. circuit etc. However, for this application, software program implementation is a better implementation in most cases. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or that contributes to the existing technology.
  • the computer software product is stored in a readable storage medium, such as a computer floppy disk. , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to cause a computer device (which can be a personal computer, training device, or network device, etc.) to execute the steps described in various embodiments of this application. method.
  • a computer device which can be a personal computer, training device, or network device, etc.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, the computer instructions may be transferred from a website, computer, training device, or data
  • the center transmits to another website site, computer, training equipment or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means.
  • wired such as coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless such as infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that a computer can store, or a data storage device such as a training device or a data center integrated with one or more available media.
  • the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (Solid State Disk, SSD)), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present application provides a resource planning method, which is used for reasonably planning the amount of resources that can be used by each cloud service so as to ensure the normal operations of the cloud services. The resource planning method comprises: acquiring a first feature, wherein the first feature indicates usage of first resources by a first cloud service within a historical first period of time; determining a second feature according to the first feature, wherein the second feature indicates demand of the first cloud service for the first resources within a future second period of time; and determining a first allocated resource amount according to the second feature, the first allocated resource amount being a resource amount of the first resources allocated to the first cloud service within the second period of time. In addition, the present application further provides a corresponding apparatus, a computing device cluster, a computer-readable storage medium, and a computer program product.

Description

一种资源规划的方法、装置及相关设备A resource planning method, device and related equipment
本申请要求于2022年09月02日提交中国国家知识产权局、申请号为202211071538.2、发明名称为“一种资源规划的方法、装置及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application submitted to the State Intellectual Property Office of China on September 2, 2022, with the application number 202211071538.2 and the invention title "A method, device and related equipment for resource planning". All its contents have been approved. This reference is incorporated into this application.
技术领域Technical field
本申请涉及数据处理技术领域,尤其涉及一种资源规划的方法、装置及相关设备。The present application relates to the field of data processing technology, and in particular to a resource planning method, device and related equipment.
背景技术Background technique
随着网络技术的发展,越来越多的用户选择使用云服务。在用户向云服务的提供方订阅了某项云服务之后,用户可以利用云服务的提供所提供的资源达到自身的目的。例如,对于订阅了云存储服务的用户,用户可以将数据存储到云服务的提供方所提供的存储空间中。对于订阅了云直播(live)服务的用户,用户可以将直播数据上传到云服务的提供方提供的直播服务器,再通过云服务的提供方提供的下行带宽将直播数据发送给观看直播的用户。With the development of network technology, more and more users choose to use cloud services. After a user subscribes to a cloud service from a cloud service provider, the user can use the resources provided by the cloud service provider to achieve his or her own purposes. For example, for users who subscribe to cloud storage services, users can store data in the storage space provided by the cloud service provider. For users who subscribe to cloud live broadcast services, users can upload live broadcast data to the live broadcast server provided by the cloud service provider, and then send the live broadcast data to users watching the live broadcast through the downlink bandwidth provided by the cloud service provider.
目前,云服务的提供方往往可以提供多种类型的云服务。例如,某个云服务的提供方可以既提供云存储服务,又提供云直播服务。而无论哪种类型的云服务,都需要使用云服务的提供方的资源。由于云服务的提供方所具有的资源总量往往是有限的,所以云服务的提供方需要确定每种类型的云服务能够使用的资源量。Currently, cloud service providers can often provide multiple types of cloud services. For example, a cloud service provider can provide both cloud storage services and cloud live streaming services. No matter what type of cloud service you use, you need to use the resources of the cloud service provider. Since the total amount of resources owned by a cloud service provider is often limited, the cloud service provider needs to determine the amount of resources that each type of cloud service can use.
发明内容Contents of the invention
有鉴于此,本申请提供了一种资源规划的方法,用于合理地规划每种云服务能够使用的资源量,以确保云服务的正常运行。本申请还提供了对应的装置、计算设备集群、计算机可读存储介质以及计算机程序产品。In view of this, this application provides a resource planning method to reasonably plan the amount of resources that each cloud service can use to ensure the normal operation of the cloud service. This application also provides corresponding devices, computing device clusters, computer-readable storage media, and computer program products.
第一方面,本申请提供了一种资源规划的方法,所述方法可以应用于资源规划装置。具体实现时,资源规划装置可以先获取第一特征,第一特征用于指示第一云服务在历史第一时间段内对第一资源的使用情况。接着,资源规划装置根据第一云服务在历史第一时间段内对第一资源的使用情况,预测第一云服务在未来第二时间段内对第一资源的需求情况。第一云服务在未来第二时间段内对第一资源的需求情况可以被称为第二特征。然后,资源规划装置根据第二特征确定第一分配资源量,第一分配资源量是第二时间段内为第一云服务分配的第一资源的资源量。In a first aspect, this application provides a resource planning method, which can be applied to a resource planning device. During specific implementation, the resource planning device may first obtain the first characteristic, and the first characteristic is used to indicate the usage of the first resource by the first cloud service in the first historical time period. Next, the resource planning device predicts the demand for the first resource by the first cloud service in the second time period in the future based on the usage of the first resource by the first cloud service in the first historical time period. The demand of the first resource by the first cloud service in the second time period in the future may be called the second characteristic. Then, the resource planning device determines the first allocated resource amount according to the second characteristic, and the first allocated resource amount is the resource amount of the first resource allocated for the first cloud service in the second time period.
这样,资源规划装置可以根据第一云服务对第一资源的历史需求情况,预测出第一云服务在未来对第一资源的需求情况,并自动地确定未来的第二时间段内需要为第一云服务分配多少第一资源。如此,既能够实现资源的自动规划,又可以提升云服务资源规划的合理性。并且,由于上述过程可以由资源规划装置完成,无需人工参与,可以提高云服务资源规划的频率,从而提升资源规划的灵活度。In this way, the resource planning device can predict the future demand of the first resource by the first cloud service based on the historical demand of the first resource by the first cloud service, and automatically determine the need for the first resource in the second time period in the future. How many first resources are allocated by a cloud service. In this way, automatic resource planning can be realized and the rationality of cloud service resource planning can be improved. Moreover, since the above process can be completed by the resource planning device without manual participation, the frequency of cloud service resource planning can be increased, thereby improving the flexibility of resource planning.
在一些可能的实施方式中,资源规划装置可以根据第一特征规划未来多个时间段内为第一云服务分配的第一资源的资源量。具体地,资源规划装置可以根据第一特征确定第一云服务在未来第三时间段内对第一资源的需求情况。第一云服务在未来第三时间段内对第一资源的需求情况被称为第三特征。接着,资源规划模块根据第三特征确定第二资源分配 量,第二资源分配量所第三时间段内为所述第一云服务分配的第一资源的资源量。其中,第三时间段与第二时间段为不同的时间段。可选地,第二时间段的时长与第三时间段的时长之和小于或等于第一时间段的时长。这样,根据第一时间段的资源需求情况确定未来多个时间段的资源需求情况,可以灵活地调整第一与范围分配到的第一资源的资源量。In some possible implementations, the resource planning device may plan the resource amount of the first resource allocated to the first cloud service in multiple time periods in the future according to the first characteristic. Specifically, the resource planning device may determine the demand for the first resource by the first cloud service in the third time period in the future based on the first characteristic. The demand of the first resource by the first cloud service in the third time period in the future is called the third characteristic. Next, the resource planning module determines the second resource allocation according to the third characteristic The second resource allocation amount is the resource amount of the first resource allocated to the first cloud service in the third time period. The third time period and the second time period are different time periods. Optionally, the sum of the duration of the second time period and the duration of the third time period is less than or equal to the duration of the first time period. In this way, the resource demand of multiple time periods in the future is determined based on the resource demand of the first time period, and the resource amount of the first resource allocated to the first and range can be flexibly adjusted.
在一些可能的实施方式中,第二时间段和第三时间段可以根据第一资源的需求量划分。具体地,资源规划装置可以根据第一特征确定第一云服务在未来较长时间段内对第一资源的需求情况。如果第一云服务在某段时间对第一资源的需求较多,而在另一段时间对第一资源的需求较少,那么资源规划装置可以将这两段时间划分为不同的时间段。也就是说,第一云服务在第二时间段内对第一资源的需求情况,与第一云服务在第三时间段内对第一资源的需求情况之间的差异大于预设阈值。这样,根据资源需求情况之间的差异划分时间段,在确保第一云服务分配到的第一资源的资源量能够满足第一云服务的需求的前提下,避免了第一云服务分配到的第一资源的资源量的反复调整。In some possible implementations, the second time period and the third time period may be divided according to the demand for the first resource. Specifically, the resource planning device may determine the demand for the first resource by the first cloud service in a longer period of time in the future based on the first characteristic. If the first cloud service has a greater demand for the first resource during a certain period of time and has a smaller demand for the first resource during another period of time, the resource planning device may divide the two periods of time into different time periods. That is to say, the difference between the demand of the first resource by the first cloud service in the second time period and the demand of the first resource by the first cloud service in the third time period is greater than the preset threshold. In this way, the time period is divided according to the difference between the resource requirements, and on the premise of ensuring that the resource amount of the first resource allocated to the first cloud service can meet the needs of the first cloud service, it is avoided that the resource amount allocated to the first cloud service is Repeated adjustment of the resource amount of the first resource.
在一些可能的实施方式中,资源规划装置可以用于规划对云服务影响较大的资源。也就是说,如果第一云服务基于多种资源运行,那么前述被资源规划装置所规划的第一资源,为对第一云服务影响最大的资源。即,如果第一云服务基于第一资源和第二资源运行,那么第一资源的资源量的多少对第一云服务的影响,大于第二资源的资源量的多少对第一云服务的影响。In some possible implementations, the resource planning device can be used to plan resources that have a greater impact on cloud services. That is to say, if the first cloud service runs based on multiple resources, then the first resource planned by the resource planning device is the resource that has the greatest impact on the first cloud service. That is, if the first cloud service runs based on the first resource and the second resource, then the impact of the resource amount of the first resource on the first cloud service is greater than the impact of the resource amount of the second resource on the first cloud service. .
在一些可能的实施方式中,第一资源包括以下任意一项或多项:网络带宽资源、弹性互联网协议(Elastic Internet Protocol,EIP)地址资源、存储空间资源和计算资源。In some possible implementations, the first resource includes any one or more of the following: network bandwidth resources, Elastic Internet Protocol (Elastic Internet Protocol, EIP) address resources, storage space resources, and computing resources.
在一些可能的实施方式中,资源规划装置还用于根据第一云服务对第一资源的需求情况,规划第一云服务分配到的第一资源的属性。例如,假设第一资源为网络带宽资源。那么在确定第一资源分配量时,资源规划装置不但可以根据第一云服务在第二时间段内对网络带宽资源的需求情况确定目标带宽量,而且可以根据第一云服务的云服务特征确定目标线路。目标线路为能够满足第一云服务的云服务特征的线路。接着,资源规划装置根据目标线路和目标带宽量确定第一分配资源量。这样,第一云服务在第二时间段内可以使用目标线路的带宽,且第一云服务能够使用的最大带宽不超过目标带宽量。如此,既能够满足第一云服务对网络带宽资源的资源量的需求,也可以满足第一云服务对网络带宽资源的资源属性的需求。In some possible implementations, the resource planning device is further configured to plan the attributes of the first resource allocated to the first cloud service based on the demand of the first cloud service for the first resource. For example, assume that the first resource is a network bandwidth resource. Then when determining the first resource allocation amount, the resource planning device can not only determine the target bandwidth amount based on the first cloud service's demand for network bandwidth resources in the second time period, but also determine the target bandwidth amount based on the cloud service characteristics of the first cloud service. target line. The target line is a line that can satisfy the cloud service characteristics of the first cloud service. Next, the resource planning device determines the first allocated resource amount according to the target line and the target bandwidth amount. In this way, the first cloud service can use the bandwidth of the target line during the second time period, and the maximum bandwidth that the first cloud service can use does not exceed the target bandwidth amount. In this way, the first cloud service's demand for the resource amount of the network bandwidth resource can be satisfied, and the first cloud service's demand for the resource attribute of the network bandwidth resource can also be satisfied.
在一些可能的实施方式中,第一云服务对于成本较为敏感,即第一与范围的云服务特征指示第一云服务为成本敏感型云服务。那么在确定目标线路时,资源规划装置可以从多条备选线路中选择成本最低且剩余带宽质量不小于目标带宽量的备选线路作为目标线路。如此,可以在保证第一云服务有足够的网络带宽资源的基础上,降低第一云服务的运行成本。In some possible implementations, the first cloud service is more cost-sensitive, that is, the first and scope cloud service characteristics indicate that the first cloud service is a cost-sensitive cloud service. Then when determining the target line, the resource planning device can select the candidate line with the lowest cost and the remaining bandwidth quality not less than the target bandwidth amount as the target line from multiple alternative lines. In this way, the operating cost of the first cloud service can be reduced on the basis of ensuring that the first cloud service has sufficient network bandwidth resources.
第二方面,本申请还提供了一种资源规划装置,所述装置包括:特征获取模块,用于获取第一特征,第一特征指示第一云服务在历史第一时间段内对第一资源的使用情况;特征预测模块,用于根据所述第一特征确定第二特征,所述第二特征指示所述第一云服务在未来第二时间段内对所述第一资源的需求情况;资源分配模块,用于根据所述第二特征确 定第一分配资源量,所述第一分配资源量为所述第二时间段内为所述第一云服务分配的第一资源的资源量。In a second aspect, this application also provides a resource planning device. The device includes: a feature acquisition module, configured to acquire a first feature. The first feature indicates that the first cloud service has used the first resource in a first historical time period. usage; a feature prediction module, configured to determine a second feature based on the first feature, the second feature indicating the demand for the first resource by the first cloud service in a second time period in the future; a resource allocation module, configured to determine according to the second characteristic Determine a first allocated resource amount, which is the resource amount of the first resource allocated for the first cloud service in the second time period.
在一些可能的实施方式中,所述特征预测模块,还用于根据所述第一特征确定第三特征,所述第三特征指示所述第一云服务在未来第三时间段内对所述第一资源的需求情况;所述资源分配模块,还用于根据所述第三特征确定第二分配资源量,所述第二分配资源量为所述第三时间段内为所述第一云服务分配的第一资源的资源量。In some possible implementations, the feature prediction module is further configured to determine a third feature based on the first feature, and the third feature indicates that the first cloud service will predict the performance of the first cloud service in a third time period in the future. The demand situation of the first resource; the resource allocation module is also used to determine a second allocated resource amount according to the third characteristic, and the second allocated resource amount is the amount of the first cloud resource in the third time period. The resource amount of the first resource allocated by the service.
在一些可能的实施方式中,所述第一云服务在所述第二时间段内对所述第一资源的需求情况,与所述第一云服务在所述第三时间段内对所述第一资源的需求情况之间的差异大于预设阈值。In some possible implementations, the demand of the first resource by the first cloud service in the second time period is different from the demand of the first resource by the first cloud service in the third time period. The difference between the demand situations of the first resource is greater than the preset threshold.
在一些可能的实施方式中,所述第一云服务基于第一资源和第二资源运行,所述第一资源的资源量的多少对所述第一云服务的影响,大于所述第二资源的资源量的多少对所述第一云服务的影响。In some possible implementations, the first cloud service runs based on a first resource and a second resource, and the amount of the first resource has a greater impact on the first cloud service than the second resource. The impact of the amount of resources on the first cloud service.
在一些可能的实施方式中,所述第一资源包括以下任意一项或多项:网络带宽资源、EIP地址资源、存储空间资源和计算资源。In some possible implementations, the first resource includes any one or more of the following: network bandwidth resources, EIP address resources, storage space resources, and computing resources.
在一些可能的实施方式中,所述第一资源包括网络带宽资源,所述资源分配模块,具体用于根据所述第一云服务在所述第二时间段内对所述网络带宽资源的需求情况确定目标带宽量;根据所述第一云服务的云服务特征确定目标线路;根据所述目标线路和所述目标带宽量确定所述第一分配资源量,所述第一分配资源量指示所述目标线路在所述第二时间段内为所述第一云服务分配所述目标带宽量的网络带宽资源。In some possible implementations, the first resource includes a network bandwidth resource, and the resource allocation module is specifically configured to be based on the demand for the network bandwidth resource by the first cloud service in the second time period. Determine the target bandwidth amount according to the situation; determine the target line according to the cloud service characteristics of the first cloud service; determine the first allocated resource amount according to the target line and the target bandwidth amount, and the first allocated resource amount indicates the The target line allocates network bandwidth resources of the target bandwidth amount to the first cloud service within the second time period.
在一些可能的实施方式中,所述第一云服务的云服务特征指示所述第一云服务为成本敏感型云服务,所述资源分配模块,具体用于从多条备选线路中选择成本最低,且剩余带宽量大于所述目标带宽量的备选线路作为所述目标线路。In some possible implementations, the cloud service characteristics of the first cloud service indicate that the first cloud service is a cost-sensitive cloud service, and the resource allocation module is specifically used to select costs from multiple alternative lines. The candidate line that is the lowest and has a remaining bandwidth greater than the target bandwidth is used as the target line.
第三方面,本申请提供一种计算设备集群,所述计算设备包括至少一个计算设备,所述至少一个计算设备包括至少一个处理器和至少一个存储器;所述至少一个存储器用于存储指令,所述至少一个处理器执行所述至少一个存储器存储的该指令,以使所述计算设备集群执行上述第一方面或第一方面任一种可能实现方式中的资源规划方法。需要说明的是,该存储器可以集成于处理器中,也可以是独立于处理器之外。所述至少一个计算设备还可以包括总线。其中,处理器通过总线连接存储器。其中,存储器可以包括可读存储器以及随机存取存储器。In a third aspect, the present application provides a computing device cluster. The computing device includes at least one computing device. The at least one computing device includes at least one processor and at least one memory; the at least one memory is used to store instructions. The at least one processor executes the instruction stored in the at least one memory, so that the computing device cluster executes the resource planning method in the above-mentioned first aspect or any possible implementation of the first aspect. It should be noted that the memory can be integrated into the processor or independent of the processor. The at least one computing device may also include a bus. Among them, the processor is connected to the memory through a bus. The memory may include readable memory and random access memory.
第四方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在至少一个计算设备上运行时,使得所述至少一个计算设备执行上述第一方面或第一方面的任一种实现方式所述的方法。In a fourth aspect, the present application provides a computer-readable storage medium that stores instructions that, when run on at least one computing device, cause the at least one computing device to execute the above-mentioned first aspect. Or the method described in any implementation of the first aspect.
第五方面,本申请提供了一种包含指令的计算机程序产品,当其在至少一个计算设备上运行时,使得所述至少一个计算设备执行上述第一方面或第一方面的任一种实现方式所述的方法。In a fifth aspect, the present application provides a computer program product containing instructions that, when run on at least one computing device, cause the at least one computing device to execute the above-mentioned first aspect or any implementation of the first aspect. the method described.
本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。 Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some implementations recorded in the present application. For example, those of ordinary skill in the art can also obtain other drawings based on these drawings.
图1为本申请实施例提供的一示例性应用场景的示意图;Figure 1 is a schematic diagram of an exemplary application scenario provided by an embodiment of the present application;
图2为本申请实施例提供的资源规划的方法的一种流程示意图;Figure 2 is a schematic flow chart of a resource planning method provided by an embodiment of the present application;
图3为本申请实施例提供的一种计算设备的结构示意图;Figure 3 is a schematic structural diagram of a computing device provided by an embodiment of the present application;
图4为本申请实施例提供的一种计算设备集群的结构示意图。Figure 4 is a schematic structural diagram of a computing device cluster provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请中的附图,对本申请提供的实施例中的方案进行描述。The solutions in the embodiments provided in this application will be described below with reference to the drawings in this application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。The terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the terms so used are interchangeable under appropriate circumstances, and are merely a way of distinguishing objects with the same attributes in describing the embodiments of the present application.
云服务的提供方可以向用户提供一种或多种类型的云服务。每种类型的云服务都需要消耗一定的资源。其中,云服务消耗的资源例如可以包括计算处理资源、带宽资源和存储资源等。可以理解的是,云服务的提供方能够提供的资源取决于云服务的提供方所具有的设备等硬件条件,所以云服务的提供方能够提供的资源总量是相对固定的。Cloud service providers can provide one or more types of cloud services to users. Each type of cloud service consumes certain resources. The resources consumed by the cloud service may include, for example, computing processing resources, bandwidth resources, storage resources, etc. It can be understood that the resources that a cloud service provider can provide depend on the equipment and other hardware conditions of the cloud service provider, so the total amount of resources that a cloud service provider can provide is relatively fixed.
因此,为了保证每种类型的云服务的服务质量,云服务的提供方可以对自身能够提供的资源进行规划,确定每种类型的云服务能够使用的资源量。这样,在用户订阅了某种类型的云服务之后,可以根据该类型的云服务分配到的资源创建云服务,从而为用户提供对应的云服务。Therefore, in order to ensure the service quality of each type of cloud service, cloud service providers can plan the resources they can provide and determine the amount of resources that each type of cloud service can use. In this way, after a user subscribes to a certain type of cloud service, a cloud service can be created based on the resources allocated to that type of cloud service, thereby providing the user with the corresponding cloud service.
为了保证资源规划的合理性,目前云服务的提供方可以通过业务会议的形式讨论资源如何分配。但是,人工进行资源规划存在效率低、资源规划不合理等问题。另外,由于业务会议往往涉及多种类型的云服务的相关人员,业务会议的召开频率相对较低,无法快速灵活地调整资源的分配情况。In order to ensure the rationality of resource planning, currently cloud service providers can discuss how to allocate resources through business meetings. However, manual resource planning has problems such as low efficiency and unreasonable resource planning. In addition, because business meetings often involve relevant personnel of multiple types of cloud services, the frequency of business meetings is relatively low, and resource allocation cannot be adjusted quickly and flexibly.
基于此,本申请实施例提供了一种资源规划的方法,该方法可以由资源规划装置执行,实现确定为云服务规划的资源的目的,以确保云服务的正常运行。具体地,资源规划装置获取第一特征。第一特征用于指示第一云服务在历史的第一时间段内对第一资源的使用情况。其中,第一资源为第一云服务运行过程中需要消耗的资源,例如可以包括网络带宽资源、存储空间资源、计算资源和EIP地址资源等。根据第一特征,可以对第一云服务在未来的第二时间段内对第一资源的需求情况进行预测,预测得到的第一云服务在第二时间段内对第一资源的需求情况被称为第二特征。根据第二特征,可以确定第一分配资源量,第一分配资源量为第二时间段内为第一云服务分配的第一资源的资源量。Based on this, embodiments of the present application provide a resource planning method, which can be executed by a resource planning device to achieve the purpose of determining resources planned for cloud services to ensure the normal operation of cloud services. Specifically, the resource planning device obtains the first feature. The first characteristic is used to indicate the usage of the first resource by the first cloud service in the first historical time period. The first resource is a resource that needs to be consumed during the operation of the first cloud service, and may include, for example, network bandwidth resources, storage space resources, computing resources, and EIP address resources. According to the first feature, the demand of the first resource by the first cloud service in the second time period in the future can be predicted, and the predicted demand of the first resource by the first cloud service in the second time period is called the second feature. According to the second feature, a first allocated resource amount may be determined, and the first allocated resource amount is the resource amount of the first resource allocated for the first cloud service in the second time period.
这样,资源规划装置可以根据云服务对资源的历史需求情况,预测出云服务在未来对资源的需求情况,并自动地确定未来的第二时间段内需要为云服务分配多少资源。如此,既能够实现资源的自动规划,又可以提升云服务资源规划的合理性。并且,由于上述过程 可以由资源规划装置完成,无需人工参与,可以提高云服务资源规划的频率,从而提升资源规划的灵活度。In this way, the resource planning device can predict the future demand for resources by the cloud service based on the historical demand for resources by the cloud service, and automatically determine how many resources need to be allocated to the cloud service in the second time period in the future. In this way, automatic resource planning can be realized and the rationality of cloud service resource planning can be improved. And, due to the above process It can be completed by the resource planning device without manual participation, which can increase the frequency of cloud service resource planning, thus improving the flexibility of resource planning.
作为一种示例,上述资源规划装置可以被部署于云端,用于规划多种云服务中每种云服务能够使用的资源。例如,在图1所示的应用场景中,资源规划装置110具体可以是位于云端100的计算设备或者计算设备集群。并且,该云端100可以对外提供第一云服务和第二云服务。例如,用户210可以通过客户端310订阅第一云服务,用户220可以通过客户端320订阅第二云服务。第一云服务和第二云服务都基于云端100中提供的资源实现。As an example, the above resource planning device can be deployed in the cloud and used to plan resources that can be used by each cloud service in multiple cloud services. For example, in the application scenario shown in FIG. 1 , the resource planning device 110 may be a computing device or a computing device cluster located in the cloud 100 . Moreover, the cloud 100 can provide the first cloud service and the second cloud service to the outside world. For example, the user 210 can subscribe to the first cloud service through the client 310, and the user 220 can subscribe to the second cloud service through the client 320. Both the first cloud service and the second cloud service are implemented based on the resources provided in the cloud 100 .
实际应用时,客户端310例如可以是运行在用户侧设备上与第一云服务对应的应用程序,或者可以是云端100上对应第一云服务的对外提供的网络浏览器等。同样,客户端320例如可以是运行在用户侧设备上与第二云服务对应的应用程序,或者可以是云端100上对应第二云服务的对外提供的网络浏览器等。资源规划装置100可以包括特征获取模块111、特征预测模块112和资源分配模块112。其中,特征获取模块111用于获取云端100中云服务在历史时间段内使用资源的情况,并将云服务使用资源的情况作为第一特征发送给特征预测模块112。特征预测模块112用于根据第一特征预测得到云服务在未来时间段内对资源的需求情况,并将云服务在未来时间段内对资源的需求情况作为第二特征发送给资源分配模块113。资源分配模块113用于根据第二特征为云服务分配资源。例如,如果第一特征包括第一云服务在历史第一时间段内对第一资源的使用情况,资源分配模块113可以用于确定未来的第二时间段内第一云服务分配到的资源量。这样,在第二时间段内,第一云服务可以基于被分配到的资源运行。即,如果用户210在第二时间段内订阅了第一云服务,那么可以利用云端100中的资源为用户210提供第一云服务,且云端100在第二时间段内用于提供第一云服务的资源总量,不超过资源分配模块113所确定的资源量。In actual application, the client 310 may be, for example, an application running on the user-side device corresponding to the first cloud service, or may be an externally provided web browser on the cloud 100 corresponding to the first cloud service, or the like. Similarly, the client 320 may be, for example, an application running on the user-side device corresponding to the second cloud service, or may be an externally provided web browser on the cloud 100 corresponding to the second cloud service, or the like. The resource planning device 100 may include a feature acquisition module 111, a feature prediction module 112, and a resource allocation module 112. Among them, the feature acquisition module 111 is used to acquire the usage of resources by cloud services in the cloud 100 within a historical time period, and send the usage of resources by the cloud services to the feature prediction module 112 as the first feature. The feature prediction module 112 is configured to predict the resource demand of the cloud service in the future time period based on the first feature, and send the resource demand of the cloud service in the future time period as the second feature to the resource allocation module 113 . The resource allocation module 113 is configured to allocate resources to the cloud service according to the second characteristic. For example, if the first characteristic includes the usage of the first resource by the first cloud service in the first historical time period, the resource allocation module 113 may be used to determine the amount of resources allocated to the first cloud service in the second time period in the future. . In this way, during the second time period, the first cloud service can run based on the allocated resources. That is, if the user 210 subscribes to the first cloud service in the second time period, the resources in the cloud 100 can be used to provide the user 210 with the first cloud service, and the cloud 100 is used to provide the first cloud service in the second time period. The total amount of resources for the service does not exceed the amount of resources determined by the resource allocation module 113.
实际应用时,上述资源规划装置可以通过软件实现,或者可以通过硬件实现。In actual application, the above resource planning device can be implemented by software, or can be implemented by hardware.
资源规划装置作为软件功能单元的一种举例,可以包括运行在计算实例上的代码。其中,计算实例可以包括物理主机(计算设备)、虚拟机、容器中的至少一种。进一步地,上述计算实例可以是一台或者多台。例如,资源规划装置可以包括运行在多个主机/虚拟机/容器上的代码。需要说明的是,用于运行该代码的多个主机/虚拟机/容器可以分布在相同的区域(region)中,也可以分布在不同的region中。进一步地,用于运行该代码的多个主机/虚拟机/容器可以分布在相同的可用区(availability zone,AZ)中,也可以分布在不同的AZ中,每个AZ包括一个数据中心或多个地理位置相近的数据中心。其中,通常一个region可以包括多个AZ。As an example of a software functional unit, the resource planning device may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the above computing instance may be one or more. For example, the resource planning apparatus may include code running on multiple hosts/virtual machines/containers. It should be noted that multiple hosts/virtual machines/containers used to run the code can be distributed in the same region (region) or in different regions. Furthermore, multiple hosts/virtual machines/containers used to run the code can be distributed in the same availability zone (AZ) or in different AZs. Each AZ includes one data center or multiple AZs. geographically close data centers. Among them, usually a region can include multiple AZs.
同样,用于运行该代码的多个主机/虚拟机/容器可以分布在同一个虚拟私有云(virtual private cloud,VPC)中,也可以分布在多个VPC中。其中,通常一个VPC设置在一个region内,同一region内两个VPC之间,以及不同region的VPC之间跨区通信需在每个VPC内设置通信网关,经通信网关实现VPC之间的互连。Likewise, the multiple hosts/VMs/containers used to run the code can be distributed in the same virtual private cloud (VPC), or across multiple VPCs. Among them, usually a VPC is set up in a region. Cross-region communication between two VPCs in the same region and between VPCs in different regions requires a communication gateway in each VPC, and the interconnection between VPCs is realized through the communication gateway. .
资源规划装置作为硬件功能单元的一种举例,资源规划装置可以包括至少一个计算设备,如服务器等。或者,资源规划装置也可以是利用专用集成电路(application-specific integrated circuit,ASIC)实现、或可编程逻辑器件(programmable logic device,PLD)实 现的设备等。其中,上述PLD可以是复杂程序逻辑器件(complex programmable logical device,CPLD)、现场可编程门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合实现。As an example of a hardware functional unit, the resource planning device may include at least one computing device, such as a server. Alternatively, the resource planning device may also be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). Current equipment, etc. The above-mentioned PLD can be implemented by a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
资源规划装置包括的多个计算设备可以分布在相同的region中,也可以分布在不同的region中。资源规划装置包括的多个计算设备可以分布在相同的AZ中,也可以分布在不同的AZ中。同样,资源规划装置包括的多个计算设备可以分布在同一个VPC中,也可以分布在多个VPC中。其中,所述多个计算设备可以是服务器、ASIC、PLD、CPLD、FPGA和GAL等计算设备的任意组合。Multiple computing devices included in the resource planning device may be distributed in the same region or in different regions. Multiple computing devices included in the resource planning device may be distributed in the same AZ or in different AZs. Similarly, multiple computing devices included in the resource planning apparatus may be distributed in the same VPC or in multiple VPCs. The plurality of computing devices may be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
接下来,对资源规划过程的各种非限定性的具体实施方式进行详细描述。Next, various non-limiting specific implementations of the resource planning process are described in detail.
参阅图2,为本申请实施例中资源规划的方法的一种流程示意图。该方法可以应用于上述图1所示的应用场景中,或者也可以是应用于其它可适用的应用场景中。下面以应用于图1所示的应用场景为例进行说明。并且,各个模块的功能,具体参见下述实施例的相关描述。Refer to Figure 2, which is a schematic flow chart of a resource planning method in an embodiment of the present application. This method can be applied to the application scenario shown in Figure 1 above, or can also be applied to other applicable application scenarios. The following description takes the application scenario shown in Figure 1 as an example. Moreover, for the functions of each module, please refer to the relevant descriptions of the following embodiments.
图2所示的资源规划的方法具体可以包括:The resource planning method shown in Figure 2 may specifically include:
S201:特征获取模块111获取第一特征。S201: The feature acquisition module 111 acquires the first feature.
运行于云端100的特征获取模块111可以获取云端100所运行的一个或多个云服务的资源使用情况。具体地,对于运行于云端100的第一云服务,特征获取模块111可以获取第一云服务在历史第一时间段内对第一资源的使用情况。在本实施例中,第一云服务在历史第一时间段内对第一资源的使用情况被称为第一特征。第一资源为第一云服务运行时所需的资源。例如,第一资源可以包括网络带宽资源、EIP地址资源、存储空间资源和计算资源中的任意一项或多项。其中,计算资源例如可以为内存资源或中央处理器(central processing unit,CPU)资源。The feature acquisition module 111 running on the cloud 100 can acquire the resource usage of one or more cloud services running on the cloud 100. Specifically, for the first cloud service running on the cloud 100, the feature acquisition module 111 can acquire the usage of the first resource by the first cloud service in the first historical time period. In this embodiment, the usage of the first resource by the first cloud service in the first historical time period is called the first characteristic. The first resources are resources required when the first cloud service is running. For example, the first resource may include any one or more of network bandwidth resources, EIP address resources, storage space resources, and computing resources. The computing resources may be, for example, memory resources or central processing unit (CPU) resources.
其中,第一时间段的时长可以根据需求设定,为资源规划模块110重新进行资源规划的周期。也就是说,特征获取模块111可以以第一时间段的时长为周期时长,周期性获取第一云服务在周期内对第一资源的使用情况。具体实现时,第一时间段的时长可以为24小时。即,资源规划装置可以在第n天结束时获取第一云服务在第n天使用的第一资源的情况,并根据第一云服务在第n天使用第一资源的情况,确定在第n+1天需要为第一云服务分配多少资源。其中n为正整数。The length of the first time period can be set according to needs to provide a period for the resource planning module 110 to re-carry out resource planning. That is to say, the feature acquisition module 111 can periodically acquire the usage of the first resource by the first cloud service within the period, using the duration of the first time period as the period duration. In specific implementation, the first time period may be 24 hours. That is, the resource planning device can obtain the use of the first resource by the first cloud service on the nth day at the end of the nth day, and determine the use of the first resource by the first cloud service on the nth day based on the use of the first resource by the first cloud service on the nth day. + How many resources need to be allocated to the first cloud service for 1 day. where n is a positive integer.
具体实现时,第一资源可以是对第一云服务影响较大的资源。如果分配给第一云服务的第一资源较少,云端100提供的第一云服务的规模可能较小,或者云端100提供的第一云服务的服务质量可能较差。即,如果第一云服务基于第一资源和第二资源运行,那么分配给第一云服务的第一资源的资源量的多少对第一云服务的影响,大于分配给第一云服务的第二资源的资源量的多少对第一云服务的影响。In specific implementation, the first resource may be a resource that has a greater impact on the first cloud service. If fewer first resources are allocated to the first cloud service, the scale of the first cloud service provided by the cloud 100 may be smaller, or the service quality of the first cloud service provided by the cloud 100 may be poor. That is, if the first cloud service runs based on the first resource and the second resource, the impact of the amount of the first resource allocated to the first cloud service on the first cloud service is greater than the impact of the amount of the first resource allocated to the first cloud service. The impact of the resource amount of the second resource on the first cloud service.
下面以具体的示例说明第一资源和第一云服务之间的对应关系。The following uses specific examples to illustrate the corresponding relationship between the first resource and the first cloud service.
在第一个示例中,第一云服务为对象存储服务(object storage service,OBS)。在用户210使用对象存储云服务时,用户210可以将待存储数据通过网络上传到云端100,并由云 端100中的存储设备存储。在这个过程中,限制对象存储服务的服务质量的主要因素是分配给对象存储服务的上行带宽资源。分配给对象存储服务的上行带宽越大,用户210上传待存储数据的速度也就越快。因此,对象存储服务对应的第一资源可以是上行带宽资源。In the first example, the first cloud service is an object storage service (OBS). When the user 210 uses the object storage cloud service, the user 210 can upload the data to be stored to the cloud 100 through the network, and the data will be stored by the cloud. The storage device in the terminal 100 stores. In this process, the main factor limiting the service quality of the object storage service is the uplink bandwidth resources allocated to the object storage service. The greater the upstream bandwidth allocated to the object storage service, the faster the user 210 can upload data to be stored. Therefore, the first resource corresponding to the object storage service may be an uplink bandwidth resource.
在第二个示例中,第一云服务为云直播服务。在用户210使用云直播服务时,用户210可以向云端100发送直播数据,云端100可以将直播数据发送给观看直播的用户。在这个过程中,限制云直播服务的服务质量的主要因素是分配给云直播服务的下行带宽资源。分配给云直播服务的下行带宽越大,直播数据的发送质量也就越好,观看直播的用户看到的直播也就越流畅。因此,云直播服务对应的第一资源可以是下行带宽资源。In the second example, the first cloud service is a cloud live broadcast service. When user 210 uses the cloud live broadcast service, user 210 can send live broadcast data to cloud 100, and cloud 100 can send the live broadcast data to users watching the live broadcast. In this process, the main factor limiting the service quality of the cloud live broadcast service is the downlink bandwidth resources allocated to the cloud live broadcast service. The greater the downlink bandwidth allocated to the cloud live broadcast service, the better the quality of live broadcast data transmission, and the smoother the live broadcast will be seen by users watching the live broadcast. Therefore, the first resource corresponding to the cloud live broadcast service may be the downlink bandwidth resource.
在第三个示例中,第一云服务为云计算服务。在用户210使用云计算服务时,用户210可以向云端100发送数据,云端100可以调用云端100的计算资源对数据进行计算,并将计算后的数据发送给用户210。在这个过程中。限制云计算服务的服务质量的主要因素是分配给云计算服务的计算资源。分配给云计算服务的计算资源越多,数据的计算过程也就越快。因此,云计算服务对应的第一资源可以是计算资源。In the third example, the first cloud service is a cloud computing service. When user 210 uses cloud computing services, user 210 can send data to cloud 100, and cloud 100 can call the computing resources of cloud 100 to calculate the data, and send the calculated data to user 210. During this process. The main factor that limits the service quality of a cloud computing service is the computing resources allocated to the cloud computing service. The more computing resources allocated to cloud computing services, the faster the data calculation process will be. Therefore, the first resource corresponding to the cloud computing service may be a computing resource.
可以理解的是,上述三个示例是为了便于理解给出。实际应用时,云端100可以不提供上述三个示例中的云服务,也可以提供其他云服务。并且,第一云服务和第一资源之间的对应关系可以根据实际情况灵活调整。It will be appreciated that the above three examples are given for ease of understanding. In actual application, the cloud 100 may not provide the cloud services in the above three examples, or may provide other cloud services. Moreover, the corresponding relationship between the first cloud service and the first resource can be flexibly adjusted according to the actual situation.
根据上文介绍,第一特征用于指示第一云服务在第一时间段内对第一资源的使用情况。实际应用时,第一特征具体可以是第一云服务在第一时间段内对第一资源的平均使用情况,也可以是第一云服务在第一时间段内对第一资源的最大使用情况。According to the above introduction, the first characteristic is used to indicate the usage of the first resource by the first cloud service in the first time period. In actual application, the first characteristic may specifically be the average usage of the first resource by the first cloud service in the first time period, or it may be the maximum usage of the first resource by the first cloud service in the first time period. .
或者,在一些可能的实现中,为了更加灵活地调节第一云服务分配到的第一资源的资源量,第一特征可以用于指示第一时间段中多个子时间段内第一云服务对第一资源的使用情况。也就是说,第一时间段可以被划分为多个子时间段,第一特征包括多个子时间段的每个子时间段中第一云服务对第一资源的使用情况。对于这种情况,第一特征还用于指示第一云服务在第一时间段内所使用的第一资源的资源量的变化规律。Or, in some possible implementations, in order to more flexibly adjust the resource amount of the first resource allocated to the first cloud service, the first characteristic can be used to indicate the pair of the first cloud service in multiple sub-time periods in the first time period. The usage of primary resources. That is to say, the first time period may be divided into multiple sub-time periods, and the first characteristic includes the usage of the first resource by the first cloud service in each sub-time period of the multiple sub-time periods. For this situation, the first characteristic is also used to indicate a change pattern of the resource amount of the first resource used by the first cloud service in the first time period.
例如,如果第一时间段为第一云服务在第n天内对第一资源的使用情况,那么第一特征可以用于指示第n天中每小时(或每分钟)第一云服务对第一资源的使用情况。也就是说,在为用户提供第一云服务时,特征获取模块111或云端100内其他模块可以每小时(或每分钟)存储第一云服务对第一资源的使用情况。可以理解的是,特征获取模块111或云端100内其他模块也可以其他频率存储第一云服务对第一资源的使用情况。For example, if the first time period is the usage of the first resource by the first cloud service in the nth day, then the first characteristic may be used to indicate the usage of the first resource by the first cloud service every hour (or every minute) in the nth day. Resource usage. That is to say, when providing the first cloud service to the user, the feature acquisition module 111 or other modules in the cloud 100 can store the usage of the first resource by the first cloud service every hour (or every minute). It can be understood that the feature acquisition module 111 or other modules in the cloud 100 can also store the usage of the first resource by the first cloud service at other frequencies.
需要说明的是,图2所示实施例中的第一云服务可以由云端100中任意一个或多个计算设备执行。在获取第一特征时,特征获取模块111可以分别从云端100中每个运行有第一云服务的计算设备上,获取第一云服务在该计算设备上使用的资源。It should be noted that the first cloud service in the embodiment shown in FIG. 2 can be executed by any one or more computing devices in the cloud 100 . When acquiring the first feature, the feature acquisition module 111 may respectively acquire the resources used by the first cloud service on the computing device from each computing device running the first cloud service in the cloud 100 .
在获取到第一特征之后,特征获取模块111可以向特征预测模块112发送第一特征。After obtaining the first feature, the feature acquisition module 111 may send the first feature to the feature prediction module 112 .
S202:特征预测模块112根据第一特征预测第二特征。S202: The feature prediction module 112 predicts the second feature according to the first feature.
特征预测模块112在接收到特征获取模块111发送的第一特征之后,可以根据第一特征预测第二特征。第二特征用于指示第一云服务在未来第二时间段内对第一资源的需求情况。也就是说,在通过特征获取模块111获取到第一云服务使用第一资源的规律之后,资 源规划装置110可以通过特征预测模块112预测未来第一云服务对第一资源的需求,从而根据第一云服务对第一资源的需求确定为第一云服务分配的资源量。After receiving the first feature sent by the feature acquisition module 111, the feature prediction module 112 may predict the second feature based on the first feature. The second characteristic is used to indicate the demand of the first resource by the first cloud service in the second time period in the future. That is to say, after the pattern of using the first resource by the first cloud service is obtained through the feature acquisition module 111, the resource The source planning device 110 can predict future demand for the first resource by the first cloud service through the feature prediction module 112, thereby determining the amount of resources allocated to the first cloud service based on the demand for the first resource by the first cloud service.
下面以具体的示例说明根据第一特征确定第二特征的方法。The method of determining the second feature based on the first feature will be described below with a specific example.
在第一个示例中,特征预测模块112可以根据第一云服务在第一时间段内对第一资源的使用情况的整体规律,确定第二特征。In a first example, the feature prediction module 112 may determine the second feature based on the overall pattern of usage of the first resource by the first cloud service in the first time period.
例如,如果第一特征是第一云服务在第一时间段内使用第一资源的平均值或最大值。相应地,特征预测模块112可以将上述平均值或最大值,确定为第二时间段内第一云服务对第一资源的需求量。即,第二特征所指示第一云服务在第二时间段内对第一资源的需求量,与第一特征所指示的第一云服务在第一时间段内对第一资源的使用量相匹配。For example, if the first characteristic is the average or maximum value of the first resource used by the first cloud service in the first time period. Correspondingly, the feature prediction module 112 may determine the above-mentioned average value or maximum value as the demand for the first resource by the first cloud service in the second time period. That is, the demand for the first resource by the first cloud service in the second time period indicated by the second characteristic is equal to the usage of the first resource by the first cloud service during the first time period indicated by the first characteristic. match.
在第二个示例中,特征预测模块112可以对第一云服务在第一时间段内对第一资源的使用情况进行细粒度分析,并根据分析结果确定第二特征。In a second example, the feature prediction module 112 may perform a fine-grained analysis on the usage of the first resource by the first cloud service in the first time period, and determine the second feature based on the analysis results.
例如,如果第一特征用于指示第一云服务在第一时间段内对第一资源的使用量的变化规律,那么特征预测模块112可以基于第一云服务的第一资源的使用量的变化规律,预测未来第一云服务的第一资源的使用量的可能的变化规律,并据此确定第二特征。For example, if the first feature is used to indicate the change pattern of the usage of the first resource by the first cloud service within the first time period, then the feature prediction module 112 may be based on the change in usage of the first resource by the first cloud service. According to the law, the possible change law of the usage of the first resource of the first cloud service in the future is predicted, and the second characteristic is determined accordingly.
在一些可能的实现中,第一时间段的时长可能大于第二时间段的时长。假设第一时间段的时长为第一时长,第二时间段的时长为第二时长。那么在确定第二特征时,特征预测模块可以先根据时间映射关系确定第一时间段中与第二时间段对应的子时间段,并根据第一云服务在这个子时间段内对第一资源的使用量的变化规律确定第二特征。In some possible implementations, the duration of the first time period may be greater than the duration of the second time period. Assume that the duration of the first time period is the first duration, and the duration of the second time period is the second duration. Then when determining the second feature, the feature prediction module can first determine the sub-time period in the first time period corresponding to the second time period based on the time mapping relationship, and calculate the first resource in this sub-time period according to the first cloud service. The change pattern of usage determines the second characteristic.
其中,时间映射关系用于指示第一资源的使用量的变化规律相近的时间段之间的对应关系。即,特征预测模块112可以根据时间映射关系,从预测出的变化规律中选择与第二时间段对应的变化规律。Wherein, the time mapping relationship is used to indicate the corresponding relationship between time periods in which the change patterns of the usage of the first resource are similar. That is, the feature prediction module 112 can select the change rule corresponding to the second time period from the predicted change rules according to the time mapping relationship.
例如,如果第一特征指示第一云服务在第n天连续24小时内对第一资源的使用情况,第二时间段为第n+1天晚上19:00-20:00之间的时间段,n为正整数。那么在确定第二特征时,特征预测模块112可以先根据第二时间段,从第一特征中确定第n天晚上19:00-20:00这段时间内,第一云服务对第一资源的使用量的变化规律。然后,特征预测模块112根据第一云服务在第n天晚上19:00-20:00这段时间内对第一资源的使用量的变化规律,预测第一云服务在第n+1天晚上19:00-20:00这段时间内对第一资源的使用量的可能的变化规律,得到第二特征。For example, if the first characteristic indicates the usage of the first resource by the first cloud service within 24 consecutive hours on the nth day, the second time period is the time period between 19:00-20:00 on the n+1th day. , n is a positive integer. Then when determining the second feature, the feature prediction module 112 can first determine from the first feature based on the second time period the first cloud service's response to the first resource during the period from 19:00 to 20:00 in the evening of the nth day. The changing pattern of usage. Then, the feature prediction module 112 predicts the first cloud service's usage of the first resource during the period of 19:00-20:00 on the nth day based on the change pattern of the first cloud service on the n+1th night. The second feature is obtained from the possible change pattern of the usage of the first resource during the period from 19:00 to 20:00.
在一些可能的实现方式中,如果第一特征指示第一云服务在第n天连续24小时内对第一资源的使用情况,那么特征预测模块112可以确定第n+1天每小时内第一云服务对第一资源的需求情况。也就是说,特征预测模块112还可以根据第一特征确定第三特征,第三特征指示第一云服务在在未来第三时间段内对第一资源的需求情况。第三时间段和第二时间段分别与第一时间段中的子时间段对应。例如,在上述的例子中,第三时间段可以是第n+1天晚上18:00-19:00之间的时间段。In some possible implementations, if the first characteristic indicates the usage of the first resource by the first cloud service within 24 consecutive hours on the nth day, then the characteristic prediction module 112 may determine the first characteristic per hour on the n+1th day. The demand for primary resources by cloud services. That is to say, the feature prediction module 112 may also determine a third feature based on the first feature, and the third feature indicates the demand for the first resource by the first cloud service in a third time period in the future. The third time period and the second time period respectively correspond to the sub-time periods in the first time period. For example, in the above example, the third time period may be the time period between 18:00 and 19:00 in the evening of the n+1th day.
在上述介绍中,特征预测模块112可以根据第一特征预测未来多个时间段内第一服务对第一资源的需求情况。但是,如果在后续步骤S203中计算每个时间段对应的分配资源量,并根据分配资源量为第一云服务分配的第一资源,可能导致云端100分配给第一云服务的 第一资源的资源量频繁变化,可能影响云端100的资源分配,影响第一云服务和/或其他云服务的正常运行。In the above introduction, the feature prediction module 112 can predict the demand for the first resource by the first service in multiple time periods in the future based on the first feature. However, if the allocated resource amount corresponding to each time period is calculated in subsequent step S203, and the first resource allocated to the first cloud service is allocated according to the allocated resource amount, it may cause the cloud 100 to allocate the first resource to the first cloud service. Frequent changes in the resource amount of the first resource may affect the resource allocation of the cloud 100 and affect the normal operation of the first cloud service and/or other cloud services.
为此,在一些可能的实现方式中,可以将相邻的多个时间段合并为一个时间段,从而减少第一云服务的第一资源的资源量的变化频率。具体地,可以根据时间段内为第一云服务对第一资源的需求情况的相似程度,判断相邻的两个时间段是否能够合并。To this end, in some possible implementations, multiple adjacent time periods may be merged into one time period, thereby reducing the frequency of changes in the resource amount of the first resource of the first cloud service. Specifically, it can be determined whether two adjacent time periods can be merged based on the similarity of the demand for the first resource for the first cloud service in the time period.
例如,如果上述第二时间段和第三时间段相邻,那么特征预测模块112可以判断第一云服务在第二时间段内对第一资源的需求情况,与第一云服务在第三时间段内对第一资源的需求情况之差是否大于预设阈值。如果第一云服务在第二时间段内对第一资源的需求情况,与第一云服务在第三时间段内对第一资源的需求情况之差大于预设阈值,说明第一云服务在第二时间段和第三时间段内对第一资源的需求情况差异较大,第二时间段和第三时间段无法合并。如果第一云服务在第二时间段内对第一资源的需求情况,与第一云服务在第三时间段内对第一资源的需求情况之差不大于预设阈值,说明第一云服务在第二时间段和第三时间段内对第一资源的需求情况差异较小,特征预测模块112可以合并第二时间段和第三时间段。For example, if the above-mentioned second time period and the third time period are adjacent, then the feature prediction module 112 can determine whether the first cloud service's demand for the first resource in the second time period is consistent with the first cloud service's demand for the first resource in the third time period. Whether the difference in demand for the first resource is greater than a preset threshold. If the difference between the first cloud service's demand for the first resource in the second time period and the first cloud service's demand for the first resource in the third time period is greater than the preset threshold, it means that the first cloud service is in The demand for the first resource is quite different between the second time period and the third time period, and the second time period and the third time period cannot be combined. If the difference between the first cloud service's demand for the first resource in the second time period and the first cloud service's demand for the first resource in the third time period is not greater than the preset threshold, it means that the first cloud service If the difference in demand for the first resource between the second time period and the third time period is small, the feature prediction module 112 may merge the second time period and the third time period.
在合并第二时间段和第三时间段时,特征预测模块112可以将第二时间段和第三时间段中更大的对第一资源的需求量,作为合并后的时间段中第一云服务对第一资源的需求量。When merging the second time period and the third time period, the feature prediction module 112 may use the greater demand for the first resource in the second time period and the third time period as the first cloud in the combined time period. The demand for the primary resource by the service.
举例说明。假设特征预测模块112根据第一特征确定了云直播服务在第n+1天对下行带宽的需求情况。其中,云直播服务在第n+1天0:00-4:00对下行带宽的需求量为三十亿字节每秒(Gigabyte per second,GB/s),云直播服务在第n+1天4:00-8:00对下行带宽的需求量为3.1GB/s,云直播服务在第n+1天8:00-12:00对下行带宽的需求量为5GB/s。for example. It is assumed that the feature prediction module 112 determines the demand for downlink bandwidth of the cloud live broadcast service on the n+1th day based on the first feature. Among them, the demand for downlink bandwidth for the cloud live broadcast service from 0:00-4:00 on the n+1st day is three gigabytes per second (GB/s). The demand for downlink bandwidth from 4:00-8:00 on day n+1 is 3.1GB/s, and the cloud live broadcast service’s demand for downlink bandwidth from 8:00-12:00 on day n+1 is 5GB/s.
由于云直播服务在第n+1天0:00-4:00对下行带宽的需求量,与云直播服务在第n+1天4:00-8:00对下行带宽的需求量之差为0.1GB/s,小于预设阈值1GB/s,那么特征预测模块112可以将云直播服务在第n+1天0:00-8:00对下行带宽的需求量确定为3.1GB/s。由于云直播服务在第n+1天4:00-8:00对下行带宽的需求量,与云直播服务在第n+1天8:00-12:00对下行带宽的需求量之差为1.9GB/s,大于预设阈值1GB/s,那么特征预测模块112确定第n+1天4:00-8:00这一时间段与第n+1天8:00-12:00这一时间段无法合并。The difference between the demand for downlink bandwidth of the cloud live broadcast service from 0:00-4:00 on the n+1 day and the demand for downlink bandwidth by the cloud live broadcast service from 4:00-8:00 on the n+1 day is 0.1GB/s, which is less than the preset threshold 1GB/s, then the feature prediction module 112 can determine the demand for downlink bandwidth of the cloud live broadcast service from 0:00-8:00 on the n+1th day to be 3.1GB/s. The difference between the cloud live broadcast service’s demand for downlink bandwidth from 4:00-8:00 on day n+1 and the cloud live broadcast service’s demand for downlink bandwidth from 8:00-12:00 on day n+1 is 1.9GB/s, which is greater than the preset threshold 1GB/s, then the feature prediction module 112 determines that the time period of 4:00-8:00 on the n+1th day is the same as the time period of 8:00-12:00 on the n+1st day. Time periods cannot be merged.
可选地,在一些可能的实现中,上述合并时间段的动作也可以由资源分配单元112执行。Optionally, in some possible implementations, the above action of merging time periods may also be performed by the resource allocation unit 112.
在确定了第一云服务在第一时间段内对第一资源的需求情况之后,特征预测模块112可以向资源分配模块113发送第二特征,以使资源分配模块113根据第二特征为第一云服务分配第一资源。同理,特征预测模块112还可以向资源分配模块113发送第三特征。After determining the demand for the first resource by the first cloud service within the first time period, the feature prediction module 112 may send the second feature to the resource allocation module 113, so that the resource allocation module 113 provides the first resource for the first cloud service based on the second feature. Cloud services allocate the first resources. In the same way, the feature prediction module 112 can also send the third feature to the resource allocation module 113.
S203:资源分配模块113根据第二特征确定第一分配资源量。S203: The resource allocation module 113 determines the first allocated resource amount according to the second characteristic.
在接收到特征预测模块112发送的第二特征之后,资源分配模块113可以根据第二特征确定第一分配资源量。第一分配资源量为第二时间段内为第一云服务分配的第一资源的资源量。也就是说,在第二时间段内,第一云服务最多使用云端100中第一分配资源量的第一资源。After receiving the second feature sent by the feature prediction module 112, the resource allocation module 113 may determine the first allocated resource amount according to the second feature. The first allocated resource amount is the resource amount of the first resource allocated to the first cloud service in the second time period. That is to say, during the second time period, the first cloud service uses at most the first resource of the first allocated resource amount in the cloud 100 .
同理,如果特征预测模块112还可以根据第三特征确定第二分配资源量。第二分配资 源量为第三时间段内为第一云服务分配的第一资源的资源量。这里不再赘述。Similarly, if the feature prediction module 112 can also determine the second allocated resource amount based on the third feature. Second allocation of funds The source amount is the resource amount of the first resource allocated to the first cloud service in the third time period. I won’t go into details here.
根据前文介绍可知,第二特征用于指示第一云服务在第二时间段内对第一资源的需求情况。具体地,如果第二特征用于指示第一云服务在第二时间段内对第一资源的需求量,那么资源分配模块113可以将该需求量作为第一分配资源量。或者,资源分配模块113可以将该需求量与预设冗余量之和作为第一分配资源量。这样,即使第二时间段内用户对第一云服务的对订阅量增加,基于第二特征和预设冗余量确定的第一分配资源量可以允许云端100提供更多的第一云服务。According to the foregoing introduction, it can be known that the second characteristic is used to indicate the demand of the first resource by the first cloud service in the second time period. Specifically, if the second characteristic is used to indicate the demand for the first resource by the first cloud service within the second time period, the resource allocation module 113 may use the demand as the first allocated resource. Alternatively, the resource allocation module 113 may use the sum of the demand amount and the preset redundancy amount as the first allocated resource amount. In this way, even if the user's subscription to the first cloud service increases during the second time period, the first allocated resource amount determined based on the second characteristic and the preset redundancy amount may allow the cloud 100 to provide more first cloud services.
在一些可能的实现方式中,资源分配模块113可以基于第一云服务的特征确定第一分配资源量的特征。In some possible implementations, the resource allocation module 113 may determine characteristics of the first allocated resource amount based on characteristics of the first cloud service.
例如,如果第一资源为网络带宽资源,那么第一分配资源量用于指示第一云服务能够使用的网络带宽。而目前的云端往往可以提供多条不同的线路,每条线路都具有一定的网络带宽资源。这样,在确定第一分配资源量时,资源分配模块113可以将云端100提供的多条线路作为备选线路。资源分配模块113可以根据第二特征确定第一云服务在第二时间段内需求的目标带宽量。接着,资源分配模块113根据目标带宽量、第一云服务对线路的需求情况,以及每条备选线路的网络带宽资源,确定第一云服务在第二时间段内使用的备选线路。其中,资源分配模块113所选择的备选线路又可以被称为目标线路。这样,第二时间段内第一云服务可以使用目标线路的网络带宽资源,且第一云服务使用的最大带宽量不超过目标带宽量。For example, if the first resource is a network bandwidth resource, the first allocated resource amount is used to indicate the network bandwidth that can be used by the first cloud service. The current cloud can often provide multiple different lines, each of which has certain network bandwidth resources. In this way, when determining the first allocated resource amount, the resource allocation module 113 can use multiple lines provided by the cloud 100 as alternative lines. The resource allocation module 113 may determine the target bandwidth amount required by the first cloud service in the second time period according to the second characteristic. Next, the resource allocation module 113 determines the alternative lines used by the first cloud service in the second time period based on the target bandwidth amount, the first cloud service's demand for lines, and the network bandwidth resources of each alternative line. Among them, the alternative line selected by the resource allocation module 113 may also be called a target line. In this way, the first cloud service can use the network bandwidth resources of the target line during the second time period, and the maximum bandwidth used by the first cloud service does not exceed the target bandwidth.
云端100提供的多条线路中可能存在网络性能较好(例如时延、丢包和抖动等参数)的线路,也存在带宽成本较低的线路。而网络性能好的线路往往成本较高。相应地,在选择线路时,资源分配模块113可以根据第一云服务的特点进行选择。Among the multiple lines provided by the cloud 100, there may be lines with better network performance (such as parameters such as delay, packet loss, and jitter), and there may also be lines with lower bandwidth costs. Lines with good network performance tend to be more expensive. Correspondingly, when selecting a line, the resource allocation module 113 may make a selection based on the characteristics of the first cloud service.
下面以两个示例介绍资源分配模块选择线路的方法。The following uses two examples to introduce the method of selecting lines by the resource allocation module.
在第一种示例中,第一云服务为成本敏感型云服务,即第一云服务对成本的要求较高。那么为了降低第一云服务的成本,资源分配模块113可以从多条备选线路中选择成本最低,且剩余带宽量大于目标带宽量的备选线路作为目标线路。In the first example, the first cloud service is a cost-sensitive cloud service, that is, the first cloud service has higher cost requirements. Then, in order to reduce the cost of the first cloud service, the resource allocation module 113 can select the candidate line with the lowest cost and the remaining bandwidth amount greater than the target bandwidth amount as the target line from multiple alternative lines.
举例说明。假设第一云服务为云存储服务。由于云存储业务在传输数据时往往会使用数据备份机制,因此云存储服务对网络质量的要求不高。而且云存储服务中上传云端的数据量往往较大。如果使用高成本的线路为云存储服务提供网络带宽资源,会导致云存储服务的成本显著上升。因此,可以将云存储服务视为成本敏感型云服务。for example. It is assumed that the first cloud service is a cloud storage service. Since cloud storage services often use data backup mechanisms when transmitting data, cloud storage services do not have high requirements for network quality. Moreover, the amount of data uploaded to the cloud in cloud storage services is often large. If high-cost lines are used to provide network bandwidth resources for cloud storage services, the cost of cloud storage services will increase significantly. Therefore, cloud storage services can be considered as cost-sensitive cloud services.
相应地,在确定云存储服务的第一分配资源量时,资源分配模块113可以先确定云存储服务在第二时间段内所需的目标带宽量。接着,资源分配模块113可以从多条备选线路中选取剩余带宽资源不小于目标带宽量,且成本最低的备选线路作为目标线路。如此,得到的第一分配资源量,用于指示云存储服务在第二时间段内使用目标线路的网络带宽资源,且云存储服务能使用的网络带宽资源不超过目标带宽量。Correspondingly, when determining the first allocated resource amount of the cloud storage service, the resource allocation module 113 may first determine the target bandwidth amount required by the cloud storage service within the second time period. Then, the resource allocation module 113 can select the candidate line whose remaining bandwidth resources are not less than the target bandwidth amount and has the lowest cost from multiple candidate lines as the target line. In this way, the obtained first allocated resource amount is used to instruct the cloud storage service to use the network bandwidth resources of the target line within the second time period, and the network bandwidth resources that the cloud storage service can use do not exceed the target bandwidth amount.
在第二种示例中,第一云服务为性能敏感型云服务,即第一云服务对网络性能的要求较高。那么为了提高第一云服务的服务质量,资源分配模块113从多条备选线路中选择网络性能最优,且剩余带宽量大于目标带宽量的备选线路作为目标线路。 In the second example, the first cloud service is a performance-sensitive cloud service, that is, the first cloud service has higher requirements on network performance. Then, in order to improve the service quality of the first cloud service, the resource allocation module 113 selects the candidate line with the best network performance and the remaining bandwidth that is greater than the target bandwidth from multiple candidate lines as the target line.
举例说明。假设第一云服务为云直播服务。由于观看直播的用户对直播的质量要求较高,云直播业务往往对网络的时延、丢包和抖动等参数有较高的要求,因此云存储服务对网络质量的要求较高。因此,可以将云直播服务可以视为性能敏感型云服务。for example. Assume that the first cloud service is a cloud live broadcast service. Since users who watch live broadcasts have higher requirements for live broadcast quality, cloud live broadcast services often have higher requirements for network parameters such as delay, packet loss, and jitter. Therefore, cloud storage services have higher requirements for network quality. Therefore, the cloud live broadcast service can be regarded as a performance-sensitive cloud service.
相应地,在确定云直播服务的第一分配资源量时,资源分配模块113可以先确定云直播服务在第二时间段内所需的目标带宽量。接着,资源分配模块113可以从多条备选线路中选取剩余带宽资源不小于目标带宽量,且网络性能最优的备选线路作为目标线路。如此,得到的第一分配资源量,用于指示云存储服务在第二时间段内使用目标线路的网络带宽资源,且云存储服务能使用的网络带宽资源不超过目标带宽量。Correspondingly, when determining the first allocated resource amount of the cloud live broadcast service, the resource allocation module 113 may first determine the target bandwidth amount required by the cloud live broadcast service in the second time period. Then, the resource allocation module 113 can select an alternative line whose remaining bandwidth resources are not less than the target bandwidth amount and has the best network performance from multiple alternative lines as the target line. In this way, the obtained first allocated resource amount is used to instruct the cloud storage service to use the network bandwidth resources of the target line within the second time period, and the network bandwidth resources that the cloud storage service can use do not exceed the target bandwidth amount.
在一些可能的实现中,云端100可能包括多个位于不同地理位置的计算设备集群。那么云端100的多条备选线路可能是到达不同计算设备集群的线路。这样,对于云存储服务考虑到使用云存储服务的用户可能不关心数据被存储到哪个计算设备集群,资源分配模块113可以将任一备选线路作为目标线路。In some possible implementations, cloud 100 may include multiple clusters of computing devices located in different geographical locations. The multiple alternative routes to cloud 100 may then be routes to different clusters of computing devices. In this way, for the cloud storage service, considering that users using the cloud storage service may not care which computing device cluster the data is stored in, the resource allocation module 113 may use any alternative line as a target line.
但是,对于云直播服务,云直播服务的受众可能是聚集于特定的区域。如果目标线路对应的计算设备集群,与云直播服务的受众属于不同的地理区域,那么跨区域传输可能影响云直播服务的服务质量。为此,在一些可能的实现方式中,资源分配模块113可以先从云端100所提供的备选线路中,选择与云直播服务匹配的备选线路,然后再根据网络性能参数确定目标线路。However, for cloud live broadcast services, the audience of cloud live broadcast services may be concentrated in specific areas. If the computing device cluster corresponding to the target line belongs to a different geographical area from the audience of the cloud live broadcast service, then cross-regional transmission may affect the service quality of the cloud live broadcast service. To this end, in some possible implementations, the resource allocation module 113 may first select an alternative line that matches the cloud live broadcast service from the alternative lines provided by the cloud 100, and then determine the target line based on network performance parameters.
在确定了第一分配资源量之后,资源分配模块113可以向云端100中用于运行第一云服务的网络设备发送第一分配资源量,或者向云端100中的管理设备发送第一分配资源量。这样,在第二时间段内,可以控制云端100以不超过第一分配资源量的第一资源运行第一服务。After determining the first allocated resource amount, the resource allocation module 113 may send the first allocated resource amount to the network device in the cloud 100 for running the first cloud service, or send the first allocated resource amount to the management device in the cloud 100 . In this way, within the second time period, the cloud 100 can be controlled to run the first service with first resources that do not exceed the first allocated resource amount.
在本实施例中,资源规划模块110可以根据第一云服务在第一时间段内对第一资源的使用情况,预测第一云服务在第二时间段内对第一资源的需求情况,再根据第一云服务对第一资源的需求,确定第一云服务在第二时间段内能够使用的第一资源的资源量。这样,一方面无需人工开会确定分配给第一云服务的第一资源,另一方面基于第一资源的历史使用情况进行预测,得到的第二特征和第一分配资源量可以满足第一云服务的使用需求,资源规划更加合理。并且,还可以快速灵活第调整第一云服务分配到的第一资源,相较于传统人工进行规划资源的方法,可以提高资源再规划的频率,更加灵活地适应云服务业务的变化规律。In this embodiment, the resource planning module 110 can predict the demand of the first resource by the first cloud service in the second time period based on the usage of the first resource by the first cloud service in the first time period, and then predict According to the demand of the first cloud service for the first resource, the resource amount of the first resource that the first cloud service can use in the second time period is determined. In this way, on the one hand, there is no need to manually hold a meeting to determine the first resource allocated to the first cloud service; on the other hand, prediction is made based on the historical usage of the first resource, and the obtained second characteristics and the first allocated resource amount can satisfy the needs of the first cloud service usage needs, resource planning is more reasonable. In addition, the first resources allocated to the first cloud service can be quickly and flexibly adjusted. Compared with the traditional manual resource planning method, the frequency of resource re-planning can be increased and the changing rules of the cloud service business can be more flexibly adapted.
在图1所示的应用场景中,云端100还可以为用户220提供第二云服务。相应地,特征获取模块111还可以获取第二云服务在历史第一时间段内对第三资源的使用情况。其中,第三资源和第一资源可以是相同的资源,也可以是不同的资源。可选地,第三资源为对第二云服务影响程度最高的资源。关于资源的介绍可以参见上文,这里不再赘述。In the application scenario shown in Figure 1, the cloud 100 can also provide the user 220 with a second cloud service. Correspondingly, the feature acquisition module 111 may also acquire the usage of the third resource by the second cloud service in the first historical time period. The third resource and the first resource may be the same resource or different resources. Optionally, the third resource is the resource that has the highest impact on the second cloud service. The introduction to resources can be found above and will not be repeated here.
上述图2所示实施例中,针对云服务的资源规划过程中所涉及到的资源规划装置(包括上述特征获取模块111、特征预测模块112和资源规划模块113)可以是配置于计算设备或者计算设备集群上的软件,并且,通过在计算设备或者计算设备集群上运行该软件,可 以使得计算设备或者计算设备集群实现上述资源规划装置所具有的功能。下面,基于硬件设备实现的角度,对资源规划的过程中所涉及的资源规划装置进行详细介绍。In the above embodiment shown in Figure 2, the resource planning device (including the above-mentioned feature acquisition module 111, feature prediction module 112 and resource planning module 113) involved in the resource planning process for cloud services may be configured on a computing device or a computing device. software on a cluster of devices and, by running the software on a computing device or a cluster of computing devices, So that the computing device or the computing device cluster realizes the functions of the above resource planning device. Next, based on the perspective of hardware device implementation, the resource planning devices involved in the resource planning process are introduced in detail.
图3示出了一种计算设备的结构示意图,上述资源规划装置110可以部署在该计算设备上,该计算设备可以是云环境中的计算设备(如服务器),或边缘环境中的计算设备,或终端设备等具体可以用于实现上述图2所示实施例中特征获取模块111、特征预测模块112和资源规划模块113的功能。Figure 3 shows a schematic structural diagram of a computing device. The above-mentioned resource planning device 110 can be deployed on the computing device. The computing device can be a computing device (such as a server) in a cloud environment, or a computing device in an edge environment. Or terminal equipment, etc. can be specifically used to implement the functions of the feature acquisition module 111, the feature prediction module 112 and the resource planning module 113 in the embodiment shown in Figure 2.
如图3所示,计算设备300包括处理器310、存储器320、通信接口330和总线340。处理器310、存储器320和通信接口330之间通过总线340通信。总线340可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图3中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。通信接口330用于与外部通信,例如接收用户发出的订阅云服务的请求等。As shown in FIG. 3 , computing device 300 includes processor 310 , memory 320 , communication interface 330 , and bus 340 . The processor 310, the memory 320 and the communication interface 330 communicate through the bus 340. The bus 340 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in Figure 3, but it does not mean that there is only one bus or one type of bus. The communication interface 330 is used to communicate with the outside, such as receiving requests from users to subscribe to cloud services.
其中,处理器310可以为中央处理器(central processing unit,CPU)、专用集成电路(application specific integrated circuit,ASIC)、图形处理器(graphics processing unit,GPU)或者一个或多个集成电路。处理器310还可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,资源规划装置中各个单元的功能可以通过处理器310中的硬件的集成逻辑电路或者软件形式的指令完成。处理器310还可以是通用处理器、数据信号处理器(digital signal process,DSP)、现场可编程逻辑门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件,分立门或者晶体管逻辑器件,分立硬件组件,可以实现或者执行本申请实施例中公开的方法、步骤及逻辑框图。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,结合本申请实施例所公开的方法可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器、闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器320,处理器310读取存储器320中的信息,结合其硬件完成资源规划装置中的部分或全部功能。The processor 310 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits. The processor 310 may also be an integrated circuit chip with signal processing capabilities. During the implementation process, the functions of each unit in the resource planning device can be completed by instructions in the form of hardware integrated logic circuits or software in the processor 310 . The processor 310 can also be a general-purpose processor, a digital signal processor (DSP), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, Discrete hardware components can implement or execute the methods, steps and logical block diagrams disclosed in the embodiments of this application. Among them, the general processor can be a microprocessor or the processor can be any conventional processor, etc. The method disclosed in combination with the embodiments of the present application can be directly implemented as a hardware decoding processor to complete the execution, or can be performed using decoding processing. The combination of hardware and software modules in the device is executed. The software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field. The storage medium is located in the memory 320. The processor 310 reads the information in the memory 320 and completes some or all functions of the resource planning device in combination with its hardware.
存储器320可以包括易失性存储器(volatile memory),例如随机存取存储器(random access memory,RAM)。存储器320还可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器,HDD或SSD。The memory 320 may include volatile memory, such as random access memory (RAM). The memory 320 may also include non-volatile memory (non-volatile memory), such as read-only memory (ROM), flash memory, HDD or SSD.
存储器320中存储有可执行代码,处理器310执行该可执行代码以执行前述资源规划装置所执行的方法。The memory 320 stores executable code, and the processor 310 executes the executable code to perform the method executed by the resource planning device.
具体地,在实现图2所示实施例的情况下,且图2所示实施例中所描述的特征获取模块111、特征预测模块112和资源规划模块113为通过软件实现的情况下,执行图2中的特征获取模块111、特征预测模块112和资源规划模块113功能所需的软件或程序代码存储在存储器320中,资源规划装置110与其它设备的交互通过通信接口330实现,处理器用于执行存储器320中的指令,实现资源规划装置所执行的方法。Specifically, when the embodiment shown in Figure 2 is implemented, and the feature acquisition module 111, feature prediction module 112 and resource planning module 113 described in the embodiment shown in Figure 2 are implemented by software, execute Figure 2 The software or program code required for the functions of the feature acquisition module 111, feature prediction module 112 and resource planning module 113 in 2 is stored in the memory 320. The interaction between the resource planning device 110 and other devices is realized through the communication interface 330, and the processor is used to execute The instructions in the memory 320 implement the method executed by the resource planning device.
图4示出的一种计算设备集群的结构示意图。其中,图4所示的计算设备集群40包括多个计算设备,上述资源规划装置可以分布式地部署在该计算设备集群40中的多个计算设 备上。如图4所示,计算设备集群40包括多个计算设备400,每个计算设备400包括存储器420、处理器410、通信接口430以及总线440,其中,存储器420、处理器410、通信接口430通过总线440实现彼此之间的通信连接。Figure 4 shows a schematic structural diagram of a computing device cluster. The computing device cluster 40 shown in Figure 4 includes multiple computing devices, and the above resource planning device can be deployed in a distributed manner on the multiple computing devices in the computing device cluster 40. Prepare. As shown in Figure 4, the computing device cluster 40 includes multiple computing devices 400. Each computing device 400 includes a memory 420, a processor 410, a communication interface 430, and a bus 440. The memory 420, the processor 410, and the communication interface 430 pass through Bus 440 implements communication connections between each other.
处理器410可以采用CPU、GPU、ASIC或者一个或多个集成电路。处理器410还可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,资源规划装置的部分功能可用通过处理器410中的硬件的集成逻辑电路或者软件形式的指令完成。处理器410还可以是DSP、FPGA、通用处理器、其他可编程逻辑器件,分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中公开的部分方法、步骤及逻辑框图。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器、闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器420,在每个计算设备400中,处理器410读取存储器40中的信息,结合其硬件可以完成资源规划置的部分功能。Processor 410 may employ a CPU, GPU, ASIC, or one or more integrated circuits. The processor 410 may also be an integrated circuit chip with signal processing capabilities. During the implementation process, part of the functions of the resource planning device may be implemented by instructions in the form of integrated logic circuits or software in the hardware of the processor 410 . The processor 410 can also be a DSP, FPGA, general-purpose processor, other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute some of the methods, steps and logic block diagrams disclosed in the embodiments of this application. The general processor may be a microprocessor or the processor may be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly implemented as a hardware decoding processor, or may be executed using a decoding processor. The combination of hardware and software modules in the code processor is executed. The software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field. The storage medium is located in the memory 420. In each computing device 400, the processor 410 reads the information in the memory 40 and, combined with its hardware, can complete some functions of resource planning and configuration.
存储器420可以包括ROM、RAM、静态存储设备、动态存储设备、硬盘(例如SSD、HDD)等。存储器420可以存储程序代码,例如,用于实现特征获取模块111的部分或者全部程序代码、用于实现特征预测模块112的部分或者全部程序代码、用于实现资源规划模块113的部分或者全部程序代码等。针对每个计算设备400,当存储器420中存储的程序代码被处理器410执行时,处理器410基于通信接口430执行资源规划装置所执行的部分方法,如其中一部分计算设备400可以用于执行上述特征获取模块111和特征预测模块112所执行的方法,另一部分计算设备400用于执行上述资源规划模块113所执行的方法。存储器420还可以存储数据,例如:处理器410在执行过程中产生的中间数据或结果数据,例如,上述第一特征和第二特征等。Memory 420 may include ROM, RAM, static storage devices, dynamic storage devices, hard disks (eg, SSD, HDD), etc. The memory 420 may store program codes, for example, part or all of the program code used to implement the feature acquisition module 111 , part or all of the program code used to implement the feature prediction module 112 , part or all of the program code used to implement the resource planning module 113 wait. For each computing device 400, when the program code stored in the memory 420 is executed by the processor 410, the processor 410 executes part of the method executed by the resource planning device based on the communication interface 430. For example, some of the computing devices 400 may be used to execute the above. The method executed by the feature acquisition module 111 and the feature prediction module 112, and another part of the computing device 400 is used to execute the method executed by the resource planning module 113. The memory 420 may also store data, such as intermediate data or result data generated by the processor 410 during execution, such as the above-mentioned first features and second features, etc.
每个计算设备400中的通信接口403用于与外部通信,例如与其它计算设备400进行交互等。The communication interface 403 in each computing device 400 is used to communicate with the outside, such as interacting with other computing devices 400 and so on.
总线440可以是外设部件互连标准总线或扩展工业标准结构总线等。为便于表示,图4中每个计算设备400内的总线440仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 440 may be a peripheral component interconnection standard bus or an extended industry standard architecture bus, or the like. For ease of presentation, the bus 440 within each computing device 400 in FIG. 4 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.
上述多个计算设备400之间通过通信网络建立通信通路,以实现资源规划装置的功能。任一计算设备可以是云环境中的计算设备(例如,服务器),或边缘环境中的计算设备,或终端设备。Communication paths are established between the above-mentioned plurality of computing devices 400 through a communication network to implement the function of the resource planning device. Any computing device may be a computing device (eg, a server) in a cloud environment, a computing device in an edge environment, or a terminal device.
此外,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在一个或者多个计算设备上运行时,使得该一个或者多个计算设备执行上述实施例资源规划装置的各个单元所执行的方法。In addition, embodiments of the present application also provide a computer-readable storage medium that stores instructions that, when run on one or more computing devices, cause the one or more computing devices to execute The method executed by each unit of the resource planning device in the above embodiment.
此外,本申请实施例还提供了一种计算机程序产品,所述计算机程序产品被一个或者多个计算设备执行时,所述一个或者多个计算设备执行前述资源规划的方法中的任一方法。 该计算机程序产品可以为一个软件安装包,在需要使用前述资源规划的方法的任一方法的情况下,可以下载该计算机程序产品并在计算机上执行该计算机程序产品。In addition, embodiments of the present application also provide a computer program product. When the computer program product is executed by one or more computing devices, the one or more computing devices execute any one of the foregoing resource planning methods. The computer program product may be a software installation package. If any of the foregoing resource planning methods is required, the computer program product may be downloaded and executed on the computer.
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,单元之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。In addition, it should be noted that the device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physically separate. The physical unit can be located in one place, or it can be distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between units indicates that there are communication connections between them, which can be specifically implemented as one or more communication buses or signal lines.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,训练设备,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by software plus necessary general hardware. Of course, it can also be implemented by dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memories, Special components, etc. to achieve. In general, all functions performed by computer programs can be easily implemented with corresponding hardware. Moreover, the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits or special-purpose circuits. circuit etc. However, for this application, software program implementation is a better implementation in most cases. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence or that contributes to the existing technology. The computer software product is stored in a readable storage medium, such as a computer floppy disk. , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to cause a computer device (which can be a personal computer, training device, or network device, etc.) to execute the steps described in various embodiments of this application. method.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、训练设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、训练设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的训练设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。 The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, the computer instructions may be transferred from a website, computer, training device, or data The center transmits to another website site, computer, training equipment or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store, or a data storage device such as a training device or a data center integrated with one or more available media. The available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (Solid State Disk, SSD)), etc.

Claims (17)

  1. 一种资源规划的方法,其特征在于,所述方法包括:A resource planning method, characterized in that the method includes:
    获取第一特征,第一特征指示第一云服务在历史第一时间段内对第一资源的使用情况;Obtain the first characteristic, which indicates the usage of the first resource by the first cloud service in the first historical time period;
    根据所述第一特征确定第二特征,所述第二特征指示所述第一云服务在未来第二时间段内对所述第一资源的需求情况;Determine a second characteristic based on the first characteristic, the second characteristic indicating the demand for the first resource by the first cloud service in a second time period in the future;
    根据所述第二特征确定第一分配资源量,所述第一分配资源量为所述第二时间段内为所述第一云服务分配的第一资源的资源量。The first allocated resource amount is determined according to the second characteristic, and the first allocated resource amount is the resource amount of the first resource allocated to the first cloud service in the second time period.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, further comprising:
    根据所述第一特征确定第三特征,所述第三特征指示所述第一云服务在未来第三时间段内对所述第一资源的需求情况;Determine a third characteristic based on the first characteristic, the third characteristic indicating the demand for the first resource by the first cloud service in a third time period in the future;
    根据所述第三特征确定第二分配资源量,所述第二分配资源量为所述第三时间段内为所述第一云服务分配的第一资源的资源量。A second allocated resource amount is determined according to the third characteristic, and the second allocated resource amount is the resource amount of the first resource allocated to the first cloud service in the third time period.
  3. 根据权利要求2所述的方法,其特征在于,在确定所述第二分配资源量之前,所述方法还包括:The method according to claim 2, characterized in that, before determining the second allocated resource amount, the method further includes:
    确定所述第一云服务在所述第二时间段内对所述第一资源的需求情况,与所述第一云服务在所述第三时间段内对所述第一资源的需求情况之间的差异大于预设阈值。Determine the difference between the demand of the first cloud service for the first resource in the second time period and the demand of the first resource by the first cloud service in the third time period. The difference between them is greater than the preset threshold.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述第一云服务基于第一资源和第二资源运行,所述第一资源的资源量的多少对所述第一云服务的影响,大于所述第二资源的资源量的多少对所述第一云服务的影响。The method according to any one of claims 1 to 3, characterized in that the first cloud service runs based on a first resource and a second resource, and the resource amount of the first resource has a significant impact on the first cloud service. The impact of the service is greater than the impact of the resource amount of the second resource on the first cloud service.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述第一资源包括以下任意一项或多项:The method according to any one of claims 1-4, characterized in that the first resource includes any one or more of the following:
    网络带宽资源、弹性互联网协议EIP地址资源、存储空间资源和计算资源。Network bandwidth resources, elastic Internet protocol EIP address resources, storage space resources and computing resources.
  6. 根据权利要求5所述的方法,其特征在于,所述第一资源包括网络带宽资源,所述根据所述第二特征确定第一分配资源量包括:The method according to claim 5, wherein the first resource includes a network bandwidth resource, and determining the first allocated resource amount according to the second characteristic includes:
    根据所述第一云服务在所述第二时间段内对所述网络带宽资源的需求情况确定目标带宽量;Determine the target bandwidth amount according to the demand of the first cloud service for the network bandwidth resource in the second time period;
    根据所述第一云服务的云服务特征确定目标线路;Determine the target line according to the cloud service characteristics of the first cloud service;
    根据所述目标线路和所述目标带宽量确定所述第一分配资源量,所述第一分配资源量指示所述目标线路在所述第二时间段内为所述第一云服务分配所述目标带宽量的网络带宽资源。The first allocated resource amount is determined according to the target line and the target bandwidth amount, and the first allocated resource amount indicates that the target line allocates the first cloud service to the first cloud service within the second time period. The target bandwidth amount of network bandwidth resources.
  7. 根据权利要求6所述的方法,其特征在于,所述第一云服务的云服务特征指示所述第一云服务为成本敏感型云服务,所述根据所述第一云服务的云服务特征确定目标线路包括:The method of claim 6, wherein the cloud service characteristics of the first cloud service indicate that the first cloud service is a cost-sensitive cloud service, and the cloud service characteristics according to the first cloud service Determining target routes includes:
    从多条备选线路中选择成本最低,且剩余带宽量大于所述目标带宽量的备选线路作为所述目标线路。An alternative line with the lowest cost and a remaining bandwidth greater than the target bandwidth is selected from multiple alternative lines as the target line.
  8. 一种资源规划的装置,其特征在于,所述装置包括:A resource planning device, characterized in that the device includes:
    特征获取模块,用于获取第一特征,第一特征指示第一云服务在历史第一时间段内对 第一资源的使用情况;A feature acquisition module, configured to acquire a first feature, which indicates that the first cloud service has The use of primary resources;
    特征预测模块,用于根据所述第一特征确定第二特征,所述第二特征指示所述第一云服务在未来第二时间段内对所述第一资源的需求情况;A feature prediction module, configured to determine a second feature based on the first feature, the second feature indicating the demand for the first resource by the first cloud service in a second time period in the future;
    资源分配模块,用于根据所述第二特征确定第一分配资源量,所述第一分配资源量为所述第二时间段内为所述第一云服务分配的第一资源的资源量。A resource allocation module, configured to determine a first allocated resource amount according to the second characteristic, where the first allocated resource amount is the resource amount of the first resource allocated to the first cloud service in the second time period.
  9. 根据权利要求8所述的装置,其特征在于,The device according to claim 8, characterized in that:
    所述特征预测模块,还用于根据所述第一特征确定第三特征,所述第三特征指示所述第一云服务在未来第三时间段内对所述第一资源的需求情况;The feature prediction module is further configured to determine a third feature based on the first feature, the third feature indicating the demand for the first resource by the first cloud service in a third time period in the future;
    所述资源分配模块,还用于根据所述第三特征确定第二分配资源量,所述第二分配资源量为所述第三时间段内为所述第一云服务分配的第一资源的资源量。The resource allocation module is further configured to determine a second allocated resource amount based on the third characteristic, where the second allocated resource amount is the first resource allocated for the first cloud service in the third time period. Resources.
  10. 根据权利要求9所述的装置,其特征在于,所述第一云服务在所述第二时间段内对所述第一资源的需求情况,与所述第一云服务在所述第三时间段内对所述第一资源的需求情况之间的差异大于预设阈值。The device according to claim 9, wherein the first cloud service's demand for the first resource in the second time period is different from the first cloud service's demand for the first resource in the third time period. The difference between the demand conditions for the first resource within the segment is greater than a preset threshold.
  11. 根据权利要求8-10任一项所述的装置,其特征在于,所述第一云服务基于第一资源和第二资源运行,所述第一资源的资源量的多少对所述第一云服务的影响,大于所述第二资源的资源量的多少对所述第一云服务的影响。The device according to any one of claims 8-10, characterized in that the first cloud service runs based on a first resource and a second resource, and the resource amount of the first resource has a significant impact on the first cloud service. The impact of the service is greater than the impact of the resource amount of the second resource on the first cloud service.
  12. 根据权利要求8-11任一项所述的装置,其特征在于,所述第一资源包括以下任意一项或多项:The device according to any one of claims 8-11, characterized in that the first resource includes any one or more of the following:
    网络带宽资源、弹性互联网协议EIP地址资源、存储空间资源和计算资源。Network bandwidth resources, elastic Internet protocol EIP address resources, storage space resources and computing resources.
  13. 根据权利要求12所述的装置,其特征在于,所述第一资源包括网络带宽资源,The device according to claim 12, wherein the first resource includes a network bandwidth resource,
    所述资源分配模块,具体用于根据所述第一云服务在所述第二时间段内对所述网络带宽资源的需求情况确定目标带宽量;根据所述第一云服务的云服务特征确定目标线路;根据所述目标线路和所述目标带宽量确定所述第一分配资源量,所述第一分配资源量指示所述目标线路在所述第二时间段内为所述第一云服务分配所述目标带宽量的网络带宽资源。The resource allocation module is specifically configured to determine the target bandwidth amount according to the demand of the network bandwidth resource by the first cloud service in the second time period; determine the target bandwidth amount according to the cloud service characteristics of the first cloud service. Target line; determine the first allocated resource amount according to the target line and the target bandwidth amount, the first allocated resource amount indicates that the target line serves the first cloud service within the second time period Allocate network bandwidth resources of the target bandwidth amount.
  14. 根据权利要求13所述的装置,其特征在于,所述第一云服务的云服务特征指示所述第一云服务为成本敏感型云服务,The device according to claim 13, wherein the cloud service characteristics of the first cloud service indicate that the first cloud service is a cost-sensitive cloud service,
    所述资源分配模块,具体用于从多条备选线路中选择成本最低,且剩余带宽量大于所述目标带宽量的备选线路作为所述目标线路。The resource allocation module is specifically configured to select an alternative line with the lowest cost and a remaining bandwidth amount greater than the target bandwidth amount from multiple alternative lines as the target line.
  15. 一种计算设备集群,其特征在于,所述计算设备集群包括至少一个计算设备,每个计算设备包括处理器以及存储器:A computing device cluster, characterized in that the computing device cluster includes at least one computing device, and each computing device includes a processor and a memory:
    所述存储器用于存储指令;The memory is used to store instructions;
    所述处理器用于根据所述指令,以使得所述计算设备集群执行权利要求1-7中任一项所述的方法。The processor is configured to cause the computing device cluster to execute the method according to any one of claims 1-7 according to the instructions.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算设备上运行时,使得所述计算设备执行如权利要求1-7任一项所述的方法。A computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when run on a computing device, the computing device causes the computing device to execute as described in any one of claims 1-7 Methods.
  17. 一种包含指令的计算机程序产品,当其在计算设备上运行时,使得所述计算设备执行如权利要求1-7任一项所述的方法。 A computer program product containing instructions that, when run on a computing device, cause the computing device to perform the method of any one of claims 1-7.
PCT/CN2023/098468 2022-09-02 2023-06-06 Resource planning method and apparatus, and related device WO2024045744A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211071538.2 2022-09-02
CN202211071538.2A CN117687767A (en) 2022-09-02 2022-09-02 Resource planning method, device and related equipment

Publications (1)

Publication Number Publication Date
WO2024045744A1 true WO2024045744A1 (en) 2024-03-07

Family

ID=90100318

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/098468 WO2024045744A1 (en) 2022-09-02 2023-06-06 Resource planning method and apparatus, and related device

Country Status (2)

Country Link
CN (1) CN117687767A (en)
WO (1) WO2024045744A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140337435A1 (en) * 2011-12-13 2014-11-13 Gerald Kaefer Device and Method for the Dynamic Load Management of Cloud Services
CN106375115A (en) * 2016-08-30 2017-02-01 东软集团股份有限公司 Resource distribution method and device
CN112085563A (en) * 2020-09-04 2020-12-15 浪潮云信息技术股份公司 CNN-based cloud hard disk resource management method
CN112311599A (en) * 2020-10-29 2021-02-02 北京金山云网络技术有限公司 Cloud resource allowance alarm method and device and server
CN114116206A (en) * 2021-11-11 2022-03-01 广东省电信规划设计院有限公司 Cloud resource management method and device and computer storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140337435A1 (en) * 2011-12-13 2014-11-13 Gerald Kaefer Device and Method for the Dynamic Load Management of Cloud Services
CN106375115A (en) * 2016-08-30 2017-02-01 东软集团股份有限公司 Resource distribution method and device
CN112085563A (en) * 2020-09-04 2020-12-15 浪潮云信息技术股份公司 CNN-based cloud hard disk resource management method
CN112311599A (en) * 2020-10-29 2021-02-02 北京金山云网络技术有限公司 Cloud resource allowance alarm method and device and server
CN114116206A (en) * 2021-11-11 2022-03-01 广东省电信规划设计院有限公司 Cloud resource management method and device and computer storage medium

Also Published As

Publication number Publication date
CN117687767A (en) 2024-03-12

Similar Documents

Publication Publication Date Title
US9442763B2 (en) Resource allocation method and resource management platform
CN108781229B (en) Method and server for controlling relocation of session of application
US10284495B2 (en) Slice management system and slice management method for dynamically adjusting resources allocated to a slice based on a resource utilization status
CN114342330A (en) Collecting and analyzing data about flows associated with DPI parameters
US8244874B1 (en) Edge-based resource spin-up for cloud computing
US20170126583A1 (en) Method and electronic device for bandwidth allocation based on online media services
US11030136B2 (en) Memory access optimization for an I/O adapter in a processor complex
CN110753131A (en) Microservice distributed current limiting method and device, storage medium and electronic equipment
US20170153906A1 (en) Virtual machine resource allocation based on user feedback
US10931548B1 (en) Collecting health monitoring data pertaining to an application from a selected set of service engines
CN105718397A (en) Arbitrating Bus Transactions On A Communications Bus Based On Bus Device Health Information And Related Power Management
US10983828B2 (en) Method, apparatus and computer program product for scheduling dedicated processing resources
WO2017075967A1 (en) Bandwidth allocation method and system for on-line media service
KR20180124419A (en) Application excution system based on distributed cloud, apparatus and control method thereof using the system
US20210337452A1 (en) Sharing geographically concentrated workload among neighboring mec hosts of multiple carriers
US9519441B1 (en) Automated storage provisioning and management using a centralized database
CN113302591A (en) Method and system for managing computing resources of cloud computing platform
CN114595043A (en) IO (input/output) scheduling method and device
WO2022062981A1 (en) Resource scheduling method and system, electronic device, and computer-readable storage medium
US10169817B2 (en) Dynamic storage bandwidth allocation
WO2024045744A1 (en) Resource planning method and apparatus, and related device
US10681398B1 (en) Video encoding based on viewer feedback
US20190042294A1 (en) System and method for implementing virtualized network functions with a shared memory pool
US10846125B2 (en) Memory access optimization in a processor complex
US11095570B2 (en) Scaling a number of segments in a stream of data based on communication load and trend direction

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23858783

Country of ref document: EP

Kind code of ref document: A1