Resource providing method and device
By setting up a flexible resource allocation mechanism on a hybrid resource server, the problem of difficult to quickly meet user needs when resources are short of resources in the existing technology is solved, and higher resource flexibility and application experience are achieved.
Patent Information
- Application Number
- CN202210307899.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-03-25
AI Technical Summary
In the prior art, each type of server can only support a single cloud server product, which makes it difficult to quickly meet user needs when resources are short of resources, reducing the flexibility of the server to provide product resources, and thus affecting the application experience.
Through the settings of the hybrid resource server, determine the number of resources required by the target product, and allocate the corresponding resources from the hybrid resource server, and even allocate when there are free resources on the special resource server to ensure flexible allocation of resources.
Without affecting the normal operation of other products, resources can be temporarily popped up to meet users' resource needs, improving the flexibility of the server to provide product resources, and thus improving the product application experience.
Smart Images

Figure CN114625540B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing technology, and in particular, to a resource providing method and device. Background Art
[0002] With the development of network technology, servers can be classified according to the resource requirements of cloud server products to obtain servers that serve different types of cloud server products.
[0003] In the prior art, each type of server can only support a single cloud server product.
[0004] However, if a certain type of cloud server product resource required by the user is in short supply, it will be difficult to obtain the required resources in a short period of time, which reduces the flexibility of the server in providing product resources and thus affects the product application experience. Summary of the invention
[0005] The embodiments of the present application provide a resource provision method and device to improve the flexibility of a server in providing product resources.
[0006] In a first aspect, an embodiment of the present application provides a resource providing method, including:
[0007] Determine the amount of first resources required for the target product;
[0008] Determining the quantity of second resources that can be provided by a hybrid resource server, wherein the hybrid resource server can provide services for a plurality of products including the target product;
[0009] If the second resource quantity is not less than the first resource quantity, product resources corresponding to the first resource quantity are allocated to the target product from the hybrid resource server.
[0010] Optionally, determining the first resource quantity required for the target product includes:
[0011] Determine the initial amount of resources required for the target product;
[0012] Determine the quantity of third resources that can be provided by the dedicated resource server corresponding to the target product;
[0013] The initial resource quantity is subtracted from the third resource quantity to obtain a first resource quantity.
[0014] Optionally, determining the quantity of the second resource that the hybrid resource server can provide includes:
[0015] If the first resource quantity is not zero, determining a plurality of hybrid resource servers corresponding to the target product;
[0016] A sum operation is performed on the quantities of resources that can be provided by the multiple hybrid resource servers to obtain a second quantity of resources.
[0017] Optionally, before determining the quantity of second resources that the hybrid resource server can provide, the method further includes:
[0018] Determining at least one hybrid resource server that can provide product resources required by the target product;
[0019] The environment of the at least one hybrid resource server is deployed according to a preset deployment rule.
[0020] Optionally, the performing environment deployment on the at least one hybrid resource server according to a preset deployment rule includes:
[0021] The bus, instruction set, virtualization version and large page resources are configured for the at least one hybrid resource server.
[0022] Optionally, after allocating product resources corresponding to the first resource quantity to the target product from the hybrid resource server, the method further includes:
[0023] If it is monitored that the dedicated resource server corresponding to the target product can provide the product resources of the first resource quantity, the product resources corresponding to the first resource quantity are allocated to the target product from the dedicated resource server.
[0024] Optionally, after determining the quantity of the second resources that the hybrid resource server can provide, the method further includes:
[0025] If the second resource quantity is lower than the first resource quantity and is not zero, allocating product resources corresponding to the second resource quantity to the target product from the hybrid resource server;
[0026] Monitoring whether there are idle product resources in the dedicated resource server and / or the hybrid resource server;
[0027] If there are no idle product resources in the dedicated resource server and / or the hybrid resource server after the monitoring duration exceeds a preset duration threshold, a product resource shortage prompt is generated.
[0028] Optionally, before determining the first resource quantity required for the target product, the method further includes:
[0029] The product types that each resource server can provide may be determined according to the software environment and / or hardware environment of each resource server, wherein the product types that can be provided include specialized products and mixed products.
[0030] Optionally, after allocating product resources corresponding to the first resource quantity to the target product, the method further includes:
[0031] Monitoring the operating status of product resources allocated to the target product;
[0032] If there is an abnormality in the running state, a resource abnormality prompt is generated.
[0033] In a second aspect, an embodiment of the present application provides a resource providing device, including:
[0034] A determination module, used to determine the quantity of the first resource required by the target product;
[0035] The determination module is further configured to determine the quantity of second resources that can be provided by the hybrid resource server, wherein the hybrid resource server can provide services for multiple products including the target product;
[0036] an allocation module, configured to allocate product resources corresponding to the first resource quantity to the target product from the hybrid resource server if the second resource quantity is not less than the first resource quantity.
[0037] The embodiment of the present application provides a resource provision method and device. After adopting the above scheme, the first resource quantity required by the target product can be determined first, and then the second resource quantity that the resource server can provide can be determined. If the second resource quantity is not less than the first resource quantity, the product resources corresponding to the first resource quantity can be directly allocated to the target product from the hybrid resource server. Through the setting of the hybrid resource server, when the resources of the special resource server required by the target product are insufficient, the hybrid resource server can be used to provide idle resources for the target product. Without affecting the normal operation of other products, resources can be temporarily popped up to meet the user's resource needs, thereby improving the flexibility of the server in providing product resources and thereby improving the application experience of the product. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0039] Figure 1 A schematic diagram of the architecture of an application system for the resource provision method provided in an embodiment of the present application;
[0040] Figure 2 A schematic diagram of a process for providing resources according to an embodiment of the present application;
[0041] Figure 3 A schematic diagram of the principle of the resource conversion process provided in the embodiment of the present application;
[0042] Figure 4 A schematic diagram of the principle of the resource provision method provided in the embodiment of the present application;
[0043] Figure 5 A schematic diagram of the principle of hybrid resource deployment provided in an embodiment of the present application;
[0044] Figure 6 A schematic diagram of the structure of a resource providing device provided in an embodiment of the present application;
[0045] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0047] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present 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 data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can also include other sequential instances in addition to those illustrated or described. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0048] When providing services to users through servers, services can be provided to users in the form of cloud server products. Among them, servers can be classified according to different characteristics such as server performance, price, and configuration, and servers that meet different types of cloud server products can be obtained to meet different application scenarios. Exemplary, cloud server products can be cloud storage space. In the process of preparing inventory for cloud server products, procurement and preparation will be carried out based on multiple aspects of evaluation such as user resource needs and feedback from the market on the sale of related products. At the same time, cost issues such as inventory backlog and unsalable products will also be considered. Therefore, the inventory of resources is generally maintained in a state of dynamic balance. In the face of sudden surges in user demand, there will be a temporary shortage of resources, and each server can only support a single cloud server product. However, from the hardware selection of the physical server to the deployment of the software environment, and finally to the formation of a cloud server product, the entire time cycle is relatively long. If the resources of a certain type of cloud server product required by the user are temporarily in short supply, it is difficult to obtain resources in a short time to meet user needs. Secondly, when the physical server where the cloud server product is located issues a downtime warning or crashes, the cloud server product needs to be migrated to other healthy physical servers as soon as possible. If the physical server resources are insufficient, the cloud server product migration will fail, and inventory resources need to be replenished through physical server replenishment, relocation, maintenance, and online operations, which increases the fault repair time and reduces the flexibility of the server in providing product resources, thereby affecting the user's application experience of the product.
[0049] In addition, in the face of a sudden surge in user demand, there will be a temporary shortage of resources. In the prior art, in order to solve the temporary shortage of resources, the solutions that can be adopted are:
[0050] Method 1: By migrating and adjusting the sold cloud server products, that is, integrating the server resource fragments, we can obtain the cloud server product inventory that can be sold. However, this method will affect the stable operation of the server, and the cloud server product inventory that can be freed up is limited.
[0051] Method 2: Actively recycle some product resources, implement accelerated recycling measures for some product resources that are being recycled, or try to obtain possible product resources to fill the resource shortage. Although the above two methods can obtain some cloud server resources, they may also affect the user's service experience.
[0052] Method 3: Improve the efficiency of physical server launch and relocation. However, the time required for physical server installation and relocation is at least in hours, which is unacceptable in terms of time for users' temporary resource needs.
[0053] Based on the above technical problems, through the setting of a hybrid resource server, when the resources of the special resource server required by the target product are insufficient, the hybrid resource server can provide the target product with idle product resources, thereby achieving the technical effect of being able to temporarily pop up resources to meet the user's resource needs without affecting the normal operation of other products, and improving the flexibility of the server in providing product resources, while also improving the product application experience.
[0054] Figure 1 A schematic diagram of the architecture of an application system of the resource providing method provided in the embodiment of the present application, such as Figure 1 As shown, the application system includes: a central server 101, a dedicated resource server 102 and a hybrid resource server 103, wherein the dedicated resource server 102 can only provide services for one product, and the hybrid resource server 103 can provide services for multiple products.
[0055] The central server 101 can first determine the initial number of resources required for the target product, then determine the number of first resources to be provided based on the number of resources that can be provided by the dedicated resource server 102, and then determine the number of second resources that can be provided by the hybrid resource server 103. If the second number of resources is not less than the first number of resources, product resources corresponding to the first number of resources can be allocated to the target product from the hybrid resource server.
[0056] In addition, the resource server can be determined as a dedicated resource server or a hybrid resource server according to the specific configuration of the resource server. Optionally, the hybrid resource server can also have a corresponding target product, and other products that can provide resources can be determined based on comprehensive considerations such as transformation costs, thereby achieving the purpose of providing resources for other products in addition to the target product. In addition, the dedicated resource server can also be transformed into a hybrid resource server, but after comprehensive consideration of factors such as transformation costs, it is more suitable for providing services for a single target product.
[0057] Among them, the dedicated resource server 102 and the hybrid resource server 103 can be cloud servers deployed on physical servers. Correspondingly, a cloud server can be a computing service provided for cloud computing, which is manifested as a simulated server on which operating systems and applications can be installed and run. A physical server can be a physical machine hardware facility, a separate server, or a server cluster, which can mainly include independent resources such as a central processing unit, memory, and disk. The physical server, combined with the deployment of the software environment, can provide various basic resources for the cloud server and is the operating environment of the cloud server. The central server 101 can be a physical server.
[0058] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0059] Figure 2 1 is a flow chart of a resource providing method provided in an embodiment of the present application. The method in this embodiment can be executed by the central server 101. Figure 2 As shown, the method of this embodiment may include:
[0060] S201: Determine the quantity of a first resource required for a target product.
[0061] In this embodiment, when implementing related products, resources are needed to implement them. For example, resources may include physical servers, bandwidth occupancy, rack space occupancy, computer room occupancy, etc. Therefore, when implementing related products, the number of resources required for the related products may be determined first, and then corresponding resources may be provided for the related products according to the remaining number of resources, thereby implementing the related products.
[0062] Further, determining the quantity of the first resource required for the target product may specifically include:
[0063] Determine the initial amount of resources required for the target product.
[0064] Determine the quantity of third resources that can be provided by the dedicated resource server corresponding to the target product.
[0065] The initial resource quantity is subtracted from the third resource quantity to obtain a first resource quantity.
[0066] Specifically, the first resource quantity represents the number of resources that need to be provided by the hybrid resource server, and the specific value is related to the number of resources that the dedicated resource server corresponding to the target product can currently provide. Different target products can correspond to different dedicated resource servers. When the dedicated resource server corresponding to the target product cannot meet the product resource requirements of the target product, the hybrid resource server that can meet the requirements of multiple products can provide product resources for the target product. That is, the initial number of resources required by the target product can be determined first, and then the third number of resources that can be provided by the dedicated resource server corresponding to the target product can be determined, and then the initial number of resources and the third number of resources are subtracted to obtain the first number of resources. Exemplarily, if the initial number of resources required by the target product is 10, and the third number of resources that can be provided by the dedicated resource server is 6, then the first number of resources can be 10-6=4.
[0067] In addition, if the dedicated resource server corresponding to the target product is currently relatively idle and can provide a large number of resources, the value of the first resource quantity may be zero.
[0068] In addition, there are multiple implementations for determining the initial resource quantity required for the target product. For example, in one implementation, a resource request sent by a target user terminal may be received, wherein the resource request includes a target product identifier corresponding to the target product and the initial resource quantity of the product resources required for the target product.
[0069] In another implementation, a touch input operation of the user may be received to determine the initial resource quantity of the product resources required for the target product.
[0070] The product resources required for the target product may be product resources of the same type or product resources of different types, and the initial resource quantity is the sum of all types of product resources.
[0071] S202: Determine the number of second resources that the hybrid resource server can provide, wherein the hybrid resource server can provide services for multiple products including the target product.
[0072] In this embodiment, the hybrid resource server can provide product resources for different products. Therefore, when the hybrid resource server is required to provide product resources, the remaining resource quantity that the hybrid resource server can provide, ie, the second resource quantity, can be determined first.
[0073] In addition, different products may require different hybrid resource requirements. For example, the same hybrid resource server may provide 10 resources for product A, or 20 resources for product B. Therefore, when determining the second resource quantity that the hybrid resource server can provide, the resource quantity that the hybrid resource server can provide for the target product is determined.
[0074] Optionally, when the first resource quantity is not zero, the second resource quantity that the hybrid resource server can provide can be determined. That is, when the dedicated resource server of the target product cannot meet the resource demand of the target product, the second resource quantity that the hybrid resource server can provide can be determined.
[0075] Further, determining the quantity of the second resource that the hybrid resource server can provide may specifically include:
[0076] If the first resource quantity is not zero, a plurality of hybrid resource servers corresponding to the target product are determined.
[0077] A sum operation is performed on the quantities of resources that can be provided by the multiple hybrid resource servers to obtain a second quantity of resources.
[0078] Specifically, the hybrid resource server may be multiple servers. When the first resource quantity is not zero, it indicates that the dedicated resource server of the target product cannot meet the resource demand of the target product. Then, the resource quantity that each hybrid resource server can provide can be determined, and then the resource quantity that each hybrid resource server can provide can be summed to obtain the second resource quantity.
[0079] Which products each hybrid resource server can provide resources for can be pre-set according to actual application scenarios. Which products each dedicated resource server can provide resources for can also be pre-set according to actual application scenarios, which will not be discussed in detail here.
[0080] S203: If the second resource quantity is not less than the first resource quantity, product resources corresponding to the first resource quantity are allocated to the target product from the hybrid resource server.
[0081] In this embodiment, after obtaining the first resource quantity and the second resource quantity, the first resource quantity and the second resource quantity can be compared, that is, the resource quantity required by the target product and the resource quantity that the hybrid resource server can provide can be compared. If the second resource quantity is higher than or equal to the first resource quantity, it means that the resource quantity that the hybrid resource server can provide can meet the resource quantity required by the target product, and the product resources corresponding to the first resource quantity can be directly allocated to the target product from the hybrid resource server.
[0082] After adopting the above scheme, we can first determine the first resource quantity required by the target product, and then determine the second resource quantity that the resource server can provide. If the second resource quantity is not less than the first resource quantity, we can directly allocate product resources corresponding to the first resource quantity to the target product from the hybrid resource server. Through the setting of the hybrid resource server, when the special resource server resources required by the target product are insufficient, the hybrid resource server can be used to provide idle product resources for the target product. Without affecting the normal operation of other products, resources can be temporarily popped up to meet the resource needs of the current user, thereby improving the flexibility of the cloud server in providing product resources and thus improving the application experience of the product.
[0083] based on Figure 2 The method, the examples of this specification also provide some specific implementation plans of the method, which are described below.
[0084] In another embodiment, before determining the number of second resources that the hybrid resource server can provide, the method further includes:
[0085] At least one hybrid resource server that can provide product resources required by the target product is determined.
[0086] The environment of the at least one hybrid resource server is deployed according to a preset deployment rule.
[0087] In this embodiment, when it is determined that a hybrid resource server is required to provide product resources for a target product, a hybrid resource server that can provide product resources for the target product can be determined first, wherein the number of hybrid resource servers can be one or more. Then, an environment deployment can be performed on the determined hybrid resource servers so that each hybrid resource server can provide product resources for the target product.
[0088] Furthermore, the environment deployment of the determined hybrid resource server may include setting the software and hardware environment so that it can meet the environmental requirements of the target product. Specifically, the environment deployment of the at least one hybrid resource server according to the preset deployment rules may include:
[0089] The bus, instruction set, virtualization version and large page resources are configured for the at least one hybrid resource server.
[0090] For example, the software environment settings may include the settings of the virtualized version (i.e., the version that is compatible with multiple products), the configuration of large page resources, the resource allocation of the control agent, etc. The hardware environment settings may include enabling the HT (HyperTransport) bus, the support of the instruction set, etc. The specific setting process may adopt the existing method, which will not be discussed in detail here.
[0091] In another embodiment, after allocating product resources corresponding to the first resource quantity to the target product from the hybrid resource server, the method further includes:
[0092] If it is monitored that the dedicated resource server corresponding to the target product can provide the product resources of the first resource quantity, the product resources corresponding to the first resource quantity are allocated to the target product from the dedicated resource server.
[0093] In this embodiment, after product resources are allocated to the target product through the hybrid resource server, the product resources that can be provided by the special resource server corresponding to the target product can be monitored in real time, or the product resources that can be provided by the special resource server corresponding to the target product can be monitored at preset time intervals. If it is monitored that the special resource server corresponding to the target product can provide product resources of the first resource quantity, product resources corresponding to the first resource quantity are allocated to the target product from the special resource server.
[0094] For example, Figure 3 The schematic diagram of the resource conversion process provided in the embodiment of the present application is as follows: Figure 3As shown, in this embodiment, there are six products B and three idle resources in the hybrid resource server. Through elastic rotation of resources, the hybrid resource server can contain six products B and three products A. When there are idle resources in the dedicated resource server of product A later, resources can be provided to product A through the dedicated resource server, that is, after elastic balancing of resources, the hybrid resource server is restored to a state containing six products B and three idle resources. Among them, the hybrid resource server can be a server that provides resources for product B, but the server also has the function of providing hybrid resources.
[0095] Alternatively, if it is monitored that the dedicated resource server corresponding to the target product has idle product resources, but the number of product resources that can be provided is less than the first resource quantity, the idle number of product resources can be allocated to the target product from the dedicated resource server.
[0096] Optionally, if it is monitored that the dedicated resource server corresponding to the target product has idle product resources, but the number of available product resources is less than the first resource number, a product resource transfer prompt can be generated for the operation and maintenance personnel, and then it can be determined whether it is necessary to allocate idle product resources from the dedicated resource server to the target product based on the touch operation of the operation and maintenance personnel. Among them, the product resource transfer prompt can include two touch buttons, one touch button indicates that idle product resources need to be allocated from the dedicated resource server to the target product; the other touch button indicates that idle product resources do not need to be allocated from the dedicated resource server to the target product, thereby improving the application experience of the operation and maintenance personnel.
[0097] In summary, the product resources provided by the hybrid resource server are temporary resources. When the special resource server corresponding to the target product has idle product resources, the special resource server provides product resources for the target product, which improves the resource completeness of the special resource server and ensures the stable operation of the target product.
[0098] In another embodiment, after determining the number of second resources that the hybrid resource server can provide, the method may further include:
[0099] If the second resource quantity is lower than the first resource quantity and is not zero, product resources corresponding to the second resource quantity are allocated to the target product from the hybrid resource server.
[0100] Monitor whether there are idle product resources in the dedicated resource server and / or the hybrid resource server.
[0101] If there are no idle product resources in the dedicated resource server and / or the hybrid resource server after the monitoring duration exceeds a preset duration threshold, a product resource shortage prompt is generated.
[0102] In this embodiment, after determining the second resource quantity, the second resource quantity may be lower than the first resource quantity and not zero, indicating that the hybrid resource server can provide resources for the target product, but the resources provided by the hybrid resource server cannot fully meet the resource requirements of the target product. In this case, product resources corresponding to the second resource quantity can be allocated to the target product from the hybrid resource server.
[0103] In addition, after allocating product resources corresponding to the second resource quantity to the target product, it is possible to monitor in real time whether there are idle product resources in the special resource server and / or the hybrid resource server, or monitor at preset time intervals whether there are idle product resources in the special resource server and / or the hybrid resource server. If it is monitored that there are idle product resources in the special resource server or the hybrid resource server, the idle product resources can be allocated to the target product.
[0104] In addition, there may be a situation where there are no idle product resources in the special resource server and / or the hybrid resource server after the monitoring time exceeds the preset time threshold, then a prompt of insufficient product resources can be directly generated, avoiding the user's long waiting time and improving the user's experience. Among them, there are three situations in which there are no idle product resources in the special resource server and / or the hybrid resource server, namely, there are no idle product resources in the special resource server, there are no idle product resources in the hybrid resource server, and there are no idle product resources in both the special resource server and the hybrid resource server, and the aforementioned three situations correspond to the monitoring of whether there are idle product resources in the special resource server and / or the hybrid resource server. That is, if only the special resource server is monitored for idle product resources, it can be determined whether there are idle product resources in the special resource server; if only the hybrid resource server is monitored for idle product resources, it can be determined whether there are idle product resources in the hybrid resource server; if the special resource server and the hybrid resource server are monitored for idle product resources, it can be determined whether there are idle product resources in the special resource server and the hybrid resource server.
[0105] In summary, by monitoring whether the resource server has idle resources and allocating idle resources to the target product when idle resources are detected, the timeliness of resource allocation is improved and the idle rate of resources is reduced.
[0106] In another embodiment, before determining the first resource quantity required for the target product, the method may further include:
[0107] The product types that each resource server can provide may be determined according to the software environment and / or hardware environment of each resource server, wherein the product types that can be provided include specialized products and mixed products.
[0108] In this embodiment, different resource servers can provide different types of products. According to the software environment of the resource server, it can be determined whether the resource server can provide a dedicated product or a mixed product. If the type of product that the resource server can provide is a dedicated product, it means that the resource server can only provide resources for one product. If the type of product that the resource server can provide is a mixed product, it means that the resource server can provide resources for multiple products, thereby improving the flexibility of resource allocation.
[0109] In addition, when determining which servers can support mixed products, you can determine whether the hardware conditions of the server are common to multiple products. For example, the hardware conditions required by product A and product B are the same, such as the same processor model, disk capacity, number, and read and write speed. Alternatively, you can also determine whether the software environment is common to multiple products, such as the kernel version is common to multiple products, and the virtualization version is compatible.
[0110] In addition, the specific product for which the resource server can provide resources can be determined based on the actual application scenario, which will not be discussed in detail here.
[0111] Furthermore, in another embodiment, after allocating product resources corresponding to the first resource quantity to the target product, the method may further include:
[0112] The operating status of the product resources allocated to the target product is monitored.
[0113] If there is an abnormality in the running state, a resource abnormality prompt is generated.
[0114] In this embodiment, after product resources are allocated to the target product, in order to ensure the normal implementation of the target product, the operating status of the product resources allocated to the target product can also be monitored, that is, the operating status of bandwidth, hardware devices, etc. can be monitored. If there is an abnormality in the operating status, a resource abnormality prompt can be generated to remind the operation and maintenance personnel to handle the abnormality in time, shortening the fault duration and ensuring the normal operation of the product.
[0115] Figure 4 A schematic diagram of the principle of the resource provision method provided in the embodiment of the present application, such as Figure 4As shown, in this embodiment, the initial resource quantity required by the target product can be determined first, and then it can be determined whether there are sufficient resources in the special resource server. If so, the product resources of the initial resource quantity are directly allocated to the target product, and the allocation is completed. If not, the first resource quantity required by the target product is determined, and the elastic rotation mode is entered to perform mixed product deployment. That is, the hybrid resource server corresponding to the target product is first determined, and then the software environment and hardware environment of the hybrid resource server are deployed, and then the switch supporting hybrid product deployment is turned on, and the second resource quantity that can be provided by the hybrid resource server is determined, and resources are allocated to the target product according to the first resource quantity and the second resource quantity until the allocation is completed.
[0116] Figure 5 A schematic diagram of the principle of hybrid resource deployment provided in the embodiment of the present application is shown in FIG. Figure 5 As shown, in this embodiment, the user terminal has a demand for product resources corresponding to cloud server product A (i.e., product A). If the original resources supporting this type of cloud server product A are insufficient, the hybrid resource server can be converted to hybrid deployment through elastic rotation, and the inventory of cloud server product A can be temporarily popped up. Among them, the hybrid resource server can also be a server supporting cloud server product B (i.e., product B), and it has the function of hybrid deployment. Under the premise of not affecting other product services, it can temporarily pop up resources to meet the product resource requirements of the current product, which reduces the fluctuation of the application of cloud server products as a whole, improves the product experience, and does not affect the existing allocated resources, and improves the utilization rate of idle resources. In addition, the processing time of this method is at the second level, which is much lower than the processing time of the redeployment server solution, and improves the efficiency of resource allocation.
[0117] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method. Figure 6 A schematic diagram of the structure of the resource providing device provided in the embodiment of the present application, such as Figure 6 As shown, the device provided in this embodiment may include:
[0118] The determination module 601 is used to determine the first resource quantity required by the target product.
[0119] In this embodiment, the determining module 601 is further used for:
[0120] Determine the initial amount of resources required for the target product.
[0121] Determine the quantity of third resources that can be provided by the dedicated resource server corresponding to the target product.
[0122] The initial resource quantity is subtracted from the third resource quantity to obtain a first resource quantity.
[0123] The determination module 601 is further configured to determine the quantity of second resources that can be provided by the hybrid resource server, wherein the hybrid resource server can provide services for multiple products including the target product.
[0124] In this embodiment, the determining module 601 is further used for:
[0125] If the first resource quantity is not zero, a plurality of hybrid resource servers corresponding to the target product are determined.
[0126] A sum operation is performed on the quantities of resources that can be provided by the multiple hybrid resource servers to obtain a second quantity of resources.
[0127] The allocation module 602 is configured to allocate product resources corresponding to the first resource quantity to the target product from the hybrid resource server if the second resource quantity is not less than the first resource quantity.
[0128] In another embodiment, the determining module 601 is further configured to:
[0129] At least one hybrid resource server that can provide product resources required by the target product is determined.
[0130] The environment of the at least one hybrid resource server is deployed according to a preset deployment rule.
[0131] In another embodiment, the determining module 601 is further configured to:
[0132] The bus, instruction set, virtualization version and large page resources are configured for the at least one hybrid resource server.
[0133] In another embodiment, the determining module 601 is further configured to:
[0134] If it is monitored that the dedicated resource server corresponding to the target product can provide the product resources of the first resource quantity, the product resources corresponding to the first resource quantity are allocated to the target product from the dedicated resource server.
[0135] In another embodiment, the determining module 601 is further configured to:
[0136] If the second resource quantity is lower than the first resource quantity and is not zero, product resources corresponding to the second resource quantity are allocated to the target product from the hybrid resource server.
[0137] Monitor whether there are idle product resources in the dedicated resource server and / or the hybrid resource server.
[0138] If there are no idle product resources in the dedicated resource server and / or the hybrid resource server after the monitoring duration exceeds a preset duration threshold, a product resource shortage prompt is generated.
[0139] In another embodiment, the determining module 601 is further configured to:
[0140] The product types that each resource server can provide may be determined according to the software environment and / or hardware environment of each resource server, wherein the product types that can be provided include specialized products and mixed products.
[0141] In another embodiment, the determining module 601 is further configured to:
[0142] The operating status of the product resources allocated to the target product is monitored.
[0143] If there is an abnormality in the running state, a resource abnormality prompt is generated.
[0144] The device provided in the embodiment of the present application can realize the above-mentioned Figure 2 The implementation principle and technical effect of the method in the embodiment shown are similar and will not be described in detail here.
[0145] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the device 700 provided in this embodiment includes: a processor 701 and a memory connected to the processor in communication. The processor 701 and the memory 702 are connected via a bus 703 .
[0146] In a specific implementation process, the processor 701 executes the computer-executable instructions stored in the memory 702, so that the processor 701 executes the method in the above method embodiment.
[0147] The specific implementation process of the processor 701 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0148] In the above Figure 7In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0149] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.
[0150] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0151] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the resource providing method of the above method embodiment is implemented.
[0152] An embodiment of the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the resource providing method as described above is implemented.
[0153] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0154] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0155] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A resource providing method, It is characterized in that include: Determine the initial amount of resources required for the target product; Determine the quantity of third resources that can be provided by the dedicated resource server corresponding to the target product; Subtract the initial resource quantity from the third resource quantity to obtain a first resource quantity; Determining the quantity of second resources that can be provided by a hybrid resource server, wherein the hybrid resource server can provide services for a plurality of products including the target product; If the second resource quantity is not less than the first resource quantity, product resources corresponding to the first resource quantity are allocated to the target product from the hybrid resource server.
2. The method according to claim 1, It is characterized in that The determining the quantity of the second resource that the hybrid resource server can provide includes: If the first resource quantity is not zero, determining a plurality of hybrid resource servers corresponding to the target product; A sum operation is performed on the quantities of resources that can be provided by the multiple hybrid resource servers to obtain a second quantity of resources.
3. The method according to claim 1, It is characterized in that Before determining the quantity of the second resource that the hybrid resource server can provide, the method further includes: Determining at least one hybrid resource server that can provide product resources required by the target product; The environment of the at least one hybrid resource server is deployed according to a preset deployment rule.
4. The method according to claim 3, It is characterized in that The step of performing environment deployment on the at least one hybrid resource server according to a preset deployment rule includes: The bus, instruction set, virtualization version and large page resources are configured for the at least one hybrid resource server.
5. The method according to any one of claims 1 to 4, It is characterized in that After allocating product resources corresponding to the first resource quantity to the target product from the hybrid resource server, the method further includes: If it is monitored that the dedicated resource server corresponding to the target product can provide the product resources of the first resource quantity, the product resources corresponding to the first resource quantity are allocated to the target product from the dedicated resource server.
6. The method according to any one of claims 1 to 4, It is characterized in that After determining the amount of second resources that the hybrid resource server can provide, the method further includes: If the second resource quantity is lower than the first resource quantity and is not zero, allocating product resources corresponding to the second resource quantity to the target product from the hybrid resource server; Monitoring whether there are idle product resources in the dedicated resource server and / or the hybrid resource server; If there are no idle product resources in the dedicated resource server and / or the hybrid resource server after the monitoring duration exceeds a preset duration threshold, a product resource shortage prompt is generated.
7. The method according to claim 3, It is characterized in that Before determining the first resource quantity required for the target product, the method further includes: The product types that each resource server can provide may be determined according to the software environment and / or hardware environment of each resource server, wherein the product types that can be provided include specialized products and mixed products.
8. The method according to any one of claims 1 to 4, It is characterized in that After allocating product resources corresponding to the first resource quantity to the target product, the method further includes: Monitoring the operating status of product resources allocated to the target product; If there is an abnormality in the running state, a resource abnormality prompt is generated.
9. A resource providing device, It is characterized in that include: A determination module is used to determine the initial amount of resources required for the target product; Determine the quantity of third resources that can be provided by the dedicated resource server corresponding to the target product; Subtract the initial resource quantity from the third resource quantity to obtain a first resource quantity; The determination module is further configured to determine the quantity of second resources that can be provided by the hybrid resource server, wherein the hybrid resource server can provide services for multiple products including the target product; an allocation module, configured to allocate product resources corresponding to the first resource quantity to the target product from the hybrid resource server if the second resource quantity is not less than the first resource quantity.
Citation Information
Patent Citations
Method and apparatus for allocating server resource, electronic device and storage medium
US20210218690A1