Resource allocation method, electronic equipment and computer readable storage medium
By obtaining tag information and preset scheduling policies, selecting suitable physical servers and allocating cloud server instances to target objects, the problem of competing among virtual resource instances is solved, the rational allocation and efficient utilization of resources is achieved, and service stability and response speed are improved.
Patent Information
- Application Number
- CN202410130765.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-30
- Publication Date
- 2025-08-01
AI Technical Summary
In the prior art, there is a competition among virtual resource instances, resulting in waste of resources and reducing service stability and response speed.
By obtaining tag information, determining the target virtual resource view, and selecting the appropriate target physical server based on the preset scheduling strategy, allocating the target cloud server instance to the target object, realizing reasonable allocation of resources.
It avoids resource competition among instances, improves service stability and response speed, and achieves efficient utilization of resources.
Smart Images

Figure CN120407134A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of computer technology and cloud computing technology. Specifically, it relates to a resource allocation method, an electronic device, and a computer-readable storage medium. Background Art
[0002] A physical machine (Network Computer, NC) is an actual hardware device used to provide computing, storage, and network resources. An instance is a virtual resource allocated to a user, and an instance can be a virtual machine (VM), a container, etc. The physical machine divides its resources into multiple virtual resources through virtualization technology and can allocate these virtual resources to different virtual machine instances.
[0003] Currently, when the task requirements of a user exceed the corresponding virtual resources, there will be a phenomenon of instance contention. Instances will compete with each other for resources, resulting in waste of some resources, inability to make full use of them, affecting the stability and response speed of the service, and at the same time increasing the risk of user business damage and affecting the user's business operation.
[0004] In response to the above problems, no effective solution has been proposed yet. Summary of the Invention
[0005] Embodiments of the present application provide a resource allocation method, an electronic device, and a computer-readable storage medium to at least solve the technical problem in the related art that there is a phenomenon of mutual contention for virtual resources among instances, resulting in resource waste and reduction of service stability and response speed.
[0006] According to one aspect of the embodiments of the present application, a resource allocation method is provided, including: obtaining tag information, where the tag information is used to characterize the behavioral attributes of a target object; determining a target virtual resource view associated with the tag information, where the target virtual resource view is used to display the virtual resource management relationship in a target application scenario; selecting a target physical server corresponding to the tag information based on a preset scheduling policy and the target virtual resource view, where the preset scheduling policy is used to determine the scheduling relationship between different physical servers; and allocating a corresponding target cloud server instance for the tag information by using the target physical server.
[0007] According to another aspect of the embodiments of the present application, a resource allocation method is further provided, including: obtaining a cloud server instance purchase request through a first application programming interface, where the request data carried in the cloud server instance purchase request includes: tag information, and the tag information is used to characterize the behavior attributes of a target object; returning a cloud server instance purchase response through a second application programming interface, where the response data carried in the cloud server instance purchase response includes: a target cloud server instance, the target cloud server instance is allocated for the tag information by using a target physical server, the target physical server is selected based on a preset scheduling policy and a target virtual resource view, the preset scheduling policy is used to determine the scheduling relationship between different physical servers, the target virtual resource view is determined by the tag information, and the target virtual resource view is used to display the virtual resource management relationship in a target application scenario.
[0008] According to another aspect of the embodiments of the present application, a resource allocation method is further provided, including: obtaining a cloud server instance purchase conversation request of a current input, where the information carried in the cloud server instance purchase conversation request includes: tag information, and the tag information is used to characterize the behavior attributes of a target object; in response to the cloud server instance purchase conversation request, returning a cloud server instance purchase conversation reply, where the information carried in the cloud server instance purchase conversation reply includes: a target cloud server instance, the target cloud server instance is allocated for the tag information by using a target physical server, the target physical server is selected based on a preset scheduling policy and a target virtual resource view, the preset scheduling policy is used to determine the scheduling relationship between different physical servers, the target virtual resource view is determined by the tag information, and the target virtual resource view is used to display the virtual resource management relationship in a target application scenario; and displaying the target cloud server instance in a graphical user interface.
[0009] According to another aspect of the embodiments of the present application, an electronic device is further provided, including: a memory storing an executable program; and a processor configured to run the program, where when the program runs, it executes any one of the above resource allocation methods.
[0010] According to another aspect of the embodiments of the present application, a computer-readable storage medium is further provided, the computer-readable storage medium includes a stored executable program, where when the executable program runs, it controls a device where the computer-readable storage medium is located to execute any one of the above resource allocation methods.
[0011] In the embodiments of the present application, by obtaining label information for characterizing the behavioral attributes of a target object, then determining a target virtual resource view to be presented to the target object according to the behavior of the target object, and then selecting a target physical server corresponding to the label information according to a preset scheduling policy and a target virtual view for displaying the virtual resource management relationship in a target application scenario, that is, selecting a target physical machine that meets the needs of the target object and can provide better services for this need. Finally, allocating a corresponding target cloud server instance for the behavior of the target object according to the selected target physical server, that is, allocating a corresponding cloud server product. Thus, the purpose of reasonably allocating cloud server instances based on label information is achieved. By virtualizing physical resources into multiple virtual resource views to meet the resource needs of different objects, instance contention is avoided, thereby realizing the technical effects of avoiding resource waste, improving service stability and response speed, and further solving the technical problem in the related art that there is a phenomenon of mutual contention for virtual resources among instances, resulting in resource waste, reduced service stability and response speed.
[0012] It is easy to note that the above general description and the following detailed description are only for exemplifying and explaining the present application, and do not constitute a limitation to the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation to the present application. In the drawings:
[0014] Figure 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a resource allocation method according to Embodiment 1 of the present application;
[0015] Figure 2 is a flowchart of a resource allocation method according to Embodiment 1 of the present application;
[0016] Figure 3 is a schematic diagram of dividing virtual resource views according to Embodiment 1 of the present application;
[0017] Figure 4 is a schematic diagram of the interaction of a scheduling system according to Embodiment 1 of the present application;
[0018] Figure 5 is a schematic diagram of a user purchase process according to Embodiment 1 of the present application;
[0019] Figure 6 is a corresponding relationship diagram of an application scenario, an inventory view and a resource pool according to Embodiment 1 of the present application;
[0020] Figure 7It is a flowchart of a resource allocation method according to Embodiment 2 of the present application;
[0021] Figure 8 It is a flowchart of a resource allocation method according to Embodiment 3 of the present application;
[0022] Figure 9 It is a schematic structural diagram of a resource allocation device according to Embodiment 4 of the present application;
[0023] Figure 10 It is a schematic structural diagram of another resource allocation device according to Embodiment 4 of the present application;
[0024] Figure 11 It is a schematic structural diagram of yet another resource allocation device according to Embodiment 4 of the present application;
[0025] Figure 12 It is a structural block diagram of a computer terminal according to an embodiment of the present application. Detailed implementation manners
[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0028] First, some nouns or terms that appear in the process of describing the embodiments of the present application are applicable to the following explanations:
[0029] Resource view: It refers to an information display method or interface centered on resources, used to express the resource management relationships with different usage scenarios.
[0030] Virtual resource technology: It abstracts based on physical resources and realizes the ability to virtualize one physical resource into multiple resource views.
[0031] Sold inventory: The remaining quantity of product specifications that customers can see on the console page.
[0032] Physical server: The physical machine hardware facilities, including independent resources such as the Central Processing Unit (CPU), memory, and disk. The physical server, combined with the deployment of the software environment, can provide various basic resources for cloud servers and is the operating environment of cloud servers.
[0033] Cloud server: A computing service provided by cloud computing, manifested as an emulated server on which customers can install and run operating systems and applications.
[0034] Cloud server products: Classify cloud servers according to different characteristics such as the performance, price, and configuration of cloud servers to meet different business usage scenarios of customers.
[0035] The related technology has the following defects in displaying the inventory of the resource library through the inventory view.
[0036] Defect 1: There is a phenomenon of instance contention, resulting in waste of some resources, inability to make full use, affecting the stability and response speed of the service, and at the same time increasing the risk of user business damage and affecting the user's business operation.
[0037] In response to the above defects, no effective solution has been proposed before this application.
[0038] Embodiment 1
[0039] According to the embodiment of the present application, a resource allocation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0040] The method embodiment provided by the first embodiment of the present application can be executed in a mobile terminal, a computer terminal, or a similar computing device. Figure 1 It is a hardware structure block diagram of a computer terminal (or mobile device) for implementing the resource allocation method according to Embodiment 1 of the present application. As Figure 1As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (illustrated as 102a, 102b, ……, 102n in the figure) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply, and / or a camera. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 may further include more or fewer components than Figure 1 shown in, or have a different configuration from Figure 1 that shown.
[0041] It should be noted that the above one or more processors 102 and / or other data processing circuits are generally referred to as "data processing circuits" herein. The data processing circuit may be embodied in software, hardware, firmware, or any combination thereof, in whole or in part. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any one of the other elements in the computer terminal 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit is a processor control (such as the selection of a variable resistance terminal path connected to an interface).
[0042] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the resource allocation method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the above-mentioned resource allocation method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories may be connected to the computer terminal 10 through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0043] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0044] The display can be, for example, a touch-screen Liquid Crystal Display (LCD), which enables users to interact with the user interface of the computer terminal 10 (or mobile device).
[0045] Under the above operating environment, the present application provides a resource allocation method as Figure 2 shown. Figure 2 It is a flowchart of a resource allocation method according to Embodiment 1 of the present application. As Figure 2 shown, the method may include the following steps:
[0046] Step S21, obtain label information, where the label information is used to characterize the behavioral attributes of the target object;
[0047] Step S22, determine the target virtual resource view associated with the label information, where the target virtual resource view is used to display the virtual resource management relationship in the target application scenario;
[0048] Step S23, based on the preset scheduling policy and the target virtual resource view, select the target physical server corresponding to the label information, where the preset scheduling policy is used to determine the scheduling relationship between different physical servers;
[0049] Step S24, use the target physical server to allocate the corresponding target cloud server instance for the label information.
[0050] In the embodiment of the present application, the label information is used to characterize the behavioral attributes of the target object. If the target object is a user, the label information is used to characterize the user's behavioral attributes, which may include information such as the user's characteristics, behaviors, preferences, interests, etc., that is, it can be understood as a user portrait. Exemplarily, the label information may include the user's historical purchase behavior information and the user's current purchase behavior information, such as the historical information of the user's purchase instances and the behavior information of the user's current purchase instances, etc., which are not limited herein.
[0051] The target application scenario can be understood as an application scenario associated with the behavioral attributes of the target object. For example, the corresponding target application scenario can be determined based on the purchase behavior of the target object. Exemplarily, according to the purchase behavior of a user, the target application scenario can be divided into short-cycle scenarios, emergency scenarios, daily scenarios, etc., which are not limited herein.
[0052] Taking a purchase instance as an example, a short-cycle scenario means that the target object uses the purchased instance for a short time, that is, the instance is required to provide services within a short cycle, rather than a long-term or continuous demand. For example, if a user purchases a Spot Instance (SPOT) product, the corresponding scenario can be determined as a short-cycle scenario based on the user's purchase behavior. An emergency scenario means that the user purchases the instance in a sudden or urgent situation and needs the instance to solve the immediate problems of a specific user. A daily scenario means that the instance purchased by the user needs to provide services in a long-term or continuous manner.
[0053] The embodiments of this application propose a virtual resource view, that is, a physical resource is divided and virtualized into multiple virtual resource views, and different virtual resource views are used to meet the different resource needs of the target object. It can be understood that the purchase behavior of the target object can reflect the resource needs of the target object.
[0054] The target virtual resource view is used to display the virtual resource management relationship in the target application scenario, that is, it is used to display the virtual resources that can meet the needs of the target object. The virtual resource management relationship can be understood as the management relationship of the virtual resources obtained from the underlying physical resources through virtualization technology. In the embodiments of this application, the virtual resources used to provide services in different application scenarios are different, and the virtual resource management relationships in different application scenarios are displayed through different virtual resource views, so as to meet the different resource needs of the target object.
[0055] The virtual resource view may include virtual resources obtained through virtualization technology, such as a Central Processing Unit (CPU), Memory (MEM), Graphics Processing Unit (GPU), Disk Storage (DISK), etc., which are not limited herein.
[0056] In the embodiments of this application, different target object needs correspond to different virtual resource views. Exemplarily, if a user purchases a SPOT product, the associated target application scenario is a short-cycle scenario, so the corresponding target virtual resource view is determined as View A. It can be understood that what the user who purchases the SPOT product can see is View A of the virtual resource view that is used to display the virtual resources that can meet the needs of this user.
[0057] It can be understood that if a large number of instances are running on physical machine B and physical machine B is under excessive load pressure, the load pressure on physical machine B can be reduced by migrating the instances to physical machine C with less load pressure. The preset scheduling policy is used to determine the scheduling relationship between different physical machines (i.e., physical servers). Based on this preset scheduling policy, it is possible to determine the physical machine among multiple physical machines that can provide better services, that is, to determine which physical machine to preferentially select.
[0058] Exemplarily, the target physical machine that provides services when creating an instance for the first time can be determined according to the preset scheduling policy and the target virtual resource view. If the load pressure becomes excessive during the process of a physical machine providing services, it is also possible to determine the target physical machine with less load pressure to which the instance is to be migrated based on the preset scheduling policy and the target virtual resource view.
[0059] The target physical machine can be understood as the physical machine that can provide better services determined based on the preset scheduling policy and the target virtual resource view. In the embodiments of the present application, through the virtual resource management relationship in the target application scenario corresponding to the label information shown by the preset scheduling policy and the target virtual resource view, it is possible to determine, based on the virtual resources shown in the preset scheduling policy and the target virtual resource view, the target physical machine that can better run the virtual resources, and then select the target physical machine to allocate the corresponding target cloud server instance for the label information.
[0060] In the embodiments of the present application, by obtaining the label information used to characterize the behavior attributes of the target object, then determining the target virtual resource view to be shown to the target object according to the behavior of the target object, and then selecting the target physical server corresponding to the label information according to the preset scheduling policy and the target virtual view used to show the virtual resource management relationship in the target application scenario, that is, selecting the target physical machine that suits the needs of the target object and can provide better services for this need, and finally allocating the corresponding target cloud server instance for the behavior of the target object according to the selected target physical server, that is, allocating the corresponding cloud server product. Thus, it is possible to show different virtual resource views to different target objects according to the behavior attributes of the target object, so as to meet the resource needs of different target objects. And because the virtual resource views corresponding to target objects with different behavior attributes are different, that is, the target physical machines used to provide services are different, it is possible to avoid the situation of instance contention, avoid resource waste, and improve the stability and response speed of the service.
[0061] The above resource allocation method provided by the embodiments of the present application can be, but is not limited to, applied to application scenarios involving instance purchases in fields such as e-commerce services, education services, legal services, medical services, conference services, social network services, financial product services, logistics services, and navigation services. For example: instance purchase scenarios for providing e-commerce services, instance purchase scenarios for providing education services, instance purchase scenarios for providing medical services, etc., which are not limited here. In addition, the applicable scenarios of the method provided by the present application include, but are not limited to, public clouds, private clouds, etc., which are not limited here.
[0062] By adopting the embodiments of the present application, by obtaining label information for characterizing the behavior attributes of the target object, then determining the target virtual resource view to be presented to the target object according to the behavior of the target object, and then selecting the target physical server corresponding to the label information according to the preset scheduling policy and the target virtual view for displaying the virtual resource management relationship in the target application scenario, that is, selecting the target physical machine that meets the needs of the target object and can provide better services for this need. Finally, the corresponding target cloud server instance is allocated for the behavior of the target object according to the selected target physical server, that is, the corresponding cloud server product is allocated. Thus, the purpose of reasonably allocating cloud server instances based on label information is achieved. By virtualizing physical resources into multiple virtual resource views to meet the resource needs of different objects, instance contention is avoided, thereby realizing the technical effects of avoiding resource waste, improving the stability and response speed of services, and further solving the technical problem in the related art that there is a phenomenon of mutual contention for virtual resources among instances, resulting in resource waste, reduced service stability and response speed.
[0063] In an alternative embodiment, in step S21, obtaining the label information includes the following method steps:
[0064] Step S211, display the inventory view in the target application scenario, where the inventory view is used to display the remaining quantity of the resource inventory to be traded, and the inventory view includes at least one of the basic inventory view and the inventory view provided by virtual resources;
[0065] Step S212, in response to a trigger operation based on the inventory view, obtain the label information from the portrait parameters carried in the cloud server instance purchase request.
[0066] The inventory view is used to display the remaining quantity of the resource inventory to be traded, which can be understood as the remaining quantity of the instances that the target object can purchase. The inventory view can include a basic inventory view and other inventory views. The basic inventory view can be understood as the default view, and other inventory views can include the inventory view provided by virtual resources or the inventory view provided by other means, which are not limited here.
[0067] In the embodiments of the present application, the physical resource view of physical resources is divided and virtualized into multiple virtual resource views to meet different resource requirements of users. Therefore, the inventory view can be a basic inventory view, or an inventory view provided by virtual resources, or a combination of a basic inventory view and an inventory view provided by virtual resources.
[0068] Among them, the basic inventory view can be understood as a view for displaying basic resources, such as a view for displaying general resources such as CPU resources, GPU resources, and memory resources. The inventory view provided by virtual resources can be understood as a view of virtual resources divided according to different application scenarios. Exemplarily, if the application scenario is a short-cycle scenario, the inventory view provided by virtual resources is a view that provides virtual resources for this short-cycle scenario.
[0069] In the embodiments of the present application, when obtaining tag information, when the target object performs a purchase behavior, the corresponding target application scenario can be determined based on the purchase behavior of the target object. Exemplarily, a portrait tag can also be added to each purchase behavior.
[0070] After determining the target application scenario, the inventory view in this target application scenario can be displayed to the target object, that is, the remaining amount of the resource inventory to be traded is displayed. The target object can purchase an instance based on the inventory view. After receiving a cloud server instance purchase request initiated by the target object based on the inventory view, that is, after receiving a trigger operation based on the inventory view, tag information is obtained from the portrait parameters carried in the cloud server instance purchase request. Exemplarily, from the portrait parameters carried in the cloud server instance purchase request, the parameter value (value) whose key is the scheduling portrait can be selected, and the tag information is determined based on this parameter value.
[0071] Exemplarily, the scheduling portrait can include a scheduling policy portrait, a resource portrait, which is not limited herein. The scheduling policy portrait can be understood as a model for analyzing and describing the scheduling policy according to factors such as scheduling requirements, resource conditions, and time limits. The resource portrait can be understood as a model for describing and analyzing resources according to information such as the attributes, types, and statuses of resources.
[0072] In an alternative embodiment, the resource allocation method further includes the following method steps:
[0073] Step S25: Perform resource abstraction on the physical resources to be processed to obtain multiple copies of virtual resources, where the physical resources to be processed are physical resources provided by at least one physical server;
[0074] Step S26: Obtain a virtual resource view based on multiple virtual resources, where the multiple virtual resource views are used to respectively display the virtual resource management relationships in different application scenarios, and different application scenarios respectively correspond to different resource requirements.
[0075] Step S27: Establish association relationships between different tag information and the multiple virtual resource views respectively, where there is an association between the tag information and the target virtual resource view.
[0076] In the embodiment of the present application, physical resources to be processed can be resource-abstracted to obtain multiple virtual resources. It can be understood that the physical resources to be processed can be physical resources provided by at least one physical server. Then, information display is performed on the multiple abstracted virtual resources to obtain multiple virtual resource views, that is, the virtual resource management relationships in different application scenarios are respectively displayed through the multiple virtual resource views, so as to virtualize the physical resources into multiple virtual resource views to meet the different resource requirements of the target object.
[0077] Exemplarily, the physical resources to be processed can be abstracted into 10 virtual resources. Each virtual resource corresponds to the resource requirements in one application scenario, and the 10 virtual resources in the above different application scenarios are respectively displayed through 10 virtual resource views, so as to achieve the technical effect of meeting different user resource requirements according to different virtual resource views.
[0078] After obtaining multiple virtual resource views, association relationships can be respectively established between different tag information and the multiple virtual resource views, and the tag information is associated with the virtual resource view corresponding to the application scenario, so that the virtual resource view corresponding to the tag information can be determined in advance. When the target object behavior attributes of multiple target objects are the same, the same virtual resource view can be reused, and the target virtual resource view corresponding to the tag information can be quickly determined according to the pre-determined association relationship.
[0079] In an optional embodiment, in step S22, determining the target virtual resource view associated with the tag information includes the following method steps:
[0080] Step S221: Determine the target virtual resource view corresponding to the tag information based on the pre-established association relationship.
[0081] In the embodiment of the present application, when determining the target virtual resource view associated with the tag information, the target virtual resource view corresponding to the tag information can be determined according to the pre-established association relationship, so that the target virtual resource view corresponding to the tag information can be quickly determined according to the pre-determined association relationship, and the response time is improved.
[0082] In an alternative embodiment, in step S23, based on a preset scheduling policy and a target virtual resource view, the target physical server corresponding to the tag information is selected, including the following method steps:
[0083] Step S231, use the target virtual resource view to obtain candidate physical servers corresponding to the tag information;
[0084] Step S232, select the target physical server corresponding to the tag information from the candidate physical servers based on the preset scheduling policy.
[0085] In the embodiment of the present application, when selecting the target physical server corresponding to the tag information based on the preset scheduling policy and the target virtual resource view, the target virtual resource view associated with the tag information can be used to obtain candidate physical servers corresponding to the tag information. Exemplarily, the candidate physical servers may include at least one physical server. It can be understood that the candidate physical server is the server that can meet the user's resource requirements.
[0086] After determining the candidate physical servers, select the target physical server corresponding to the tag information from the candidate physical servers based on the preset scheduling policy, that is, select the target physical server that can better provide services among multiple physical servers.
[0087] Exemplarily, a physical server scorer can be used to score multiple candidate physical servers, and the physical server with the highest score is selected as the target physical server according to the scores of each physical server, which is not limited here.
[0088] In an alternative embodiment, in step S231, using the target virtual resource view to obtain candidate physical servers corresponding to the tag information includes the following method steps:
[0089] Step S2311, use the target virtual resource view to determine the resource production source;
[0090] Step S2312, load candidate physical servers based on the resource production source.
[0091] It can be understood that the resource production sources of different resources may be different, that is, the ways of producing resources may be different. Exemplarily, the resource production source may include normal deployment, production through mixed operation, production through reuse, and other sources, which is not limited here.
[0092] In the embodiments of the present application, when obtaining candidate physical servers corresponding to tag information by using the target virtual resource view, the resource production source can be determined by using the target virtual resource view associated with the tag information. It can be understood that the target virtual resource view may include multiple virtual resources, and these multiple virtual resources may correspond to multiple resource production sources. After determining the resource production source, the corresponding candidate physical servers can be loaded based on the resource production source.
[0093] In an alternative embodiment, the resource allocation method further includes the following method steps:
[0094] Step S2313: Divide the physical resources to be processed into multiple resource pools based on different resource production sources of the physical resources to be processed, where the multiple resource pools respectively correspond to different application scenarios, and different application scenarios respectively correspond to different resource requirements.
[0095] In the embodiments of the present application, the physical resources to be processed can also be divided into multiple resource pools based on different resource production sources of the physical resources to be processed. It can be understood that one resource pool corresponds to one virtual resource obtained by division, and different resource pools respectively correspond to different application scenarios to meet different resource requirements of users.
[0096] Exemplarily, the multiple resource pools may include a normal resource pool, a mixed deployment pool, a reuse pool, and other resource pools, etc., which are not limited here. Among them, the production source of resources in the normal resource pool is normally deployed, and the production source of resources in the mixed deployment pool is produced by mixed deployment. It can be understood as a resource pool where different types of resources are managed and allocated together, so that flexible deployment and allocation can be carried out according to needs to meet different requirements. The production source of resources in the reuse pool is produced by reuse, and the production source of resources in other resource pools is produced by other production methods. It can be understood as a resource pool where resources are reused and recycled. The resources in the reuse pool can be used and allocated multiple times to achieve the maximum utilization and benefit of resources, reduce waste and consumption of resources, and improve the sustainable utilization of resources.
[0097] In an alternative embodiment, in step S2312, loading candidate physical servers based on the resource production source includes the following method steps:
[0098] Step S23121: Determine the target resource pool corresponding to the resource production source from multiple resource pools;
[0099] Step S23122: Load candidate physical servers based on the target resource pool.
[0100] In an embodiment of the present application, when loading candidate physical servers based on the resource production source, the target resource pool corresponding to the resource production source can be determined from multiple divided resource pools. It can be understood that the resource production source is determined based on the target virtual resource view associated with the tag information. Therefore, the target resource pool corresponding to the resource production source is the resource pool associated with the tag information. Thus, candidate physical servers can be loaded based on this target resource pool.
[0101] It can be understood that the target resource pool may include at least one resource pool. For example, it may only include a normal resource pool, or only include a mixed pool, or include both a normal resource pool and a mixed pool, which is determined according to the actual situation and is not limited here.
[0102] In an alternative embodiment, the available resource range corresponding to the target virtual resource view is equal to the available resource range corresponding to the inventory view in the target application scenario. Among them, the target virtual resource view is visible to the first target object and invisible to the second target object. The first target object is the target object corresponding to the tag information, and the second target object is the target object corresponding to the remaining tag information other than the tag information.
[0103] In an embodiment of the present application, the available resource range corresponding to the target virtual resource view presented to the target object is equal to the available resource range corresponding to it in the inventory view. That is, the inventory view seen by the target object on the console and the application programming interface (API) side is the same as the resource view faced by the final scheduling, which can achieve the technical effect of what you see is what you get for the target object regarding the resource inventory.
[0104] In an embodiment of the present application, the target virtual resource view is only presented to the first target object associated with this target virtual resource view, that is, only presented to the first target object corresponding to the tag information associated with this target virtual resource view. It can also be understood as only presented to the first target object in the target application scenario presented by this target virtual resource view, rather than the second target object in this target application scenario being invisible to this target virtual resource view.
[0105] Figure 3 It is a schematic diagram of dividing a virtual resource view according to Embodiment 1 of the present application. For the underlying physical resources, the underlying physical resources can be resource-abstracted through virtual resource technology, and the underlying physical resource view can be virtualized into multiple virtual resource views and presented to users in the form of virtual resource views. As Figure 3As shown, the physical resource views of the CPU, GPU, MEM, and disk (DISK) will be abstracted into a restricted supply view, a resource reuse view, an operation and maintenance fallback view, and a general resource view based on different application scenarios through virtualization technology. Figure Four In the virtual resource views, the sizes of the virtual resources of the CPU, GPU, MEM, and DISK allocated in the different virtual resource views obtained by abstraction are different. Among them, according to the user's behavior, the target application scenario can be determined. The restricted supply view and the resource reuse view will be shown to users who meet the short-cycle scenario, the operation and maintenance fallback view will be shown to users who meet the emergency scenario, and the general resource view will be shown to users who meet the daily scenario.
[0106] Figure 4 FIG. is an interaction schematic diagram of a scheduling system according to Embodiment 1 of the present application. As Figure 4 shown, after the user performs a purchase behavior, the console will determine the label information according to the user's purchase behavior. The console can determine the target application scenario based on the label information and information such as the product to be purchased by the user. Then, the console passes the user's portrait parameters to the scheduling system. The scheduling system will perform inventory scheduling based on the portrait parameters and display the remaining inventory to the user. After that, the scheduling system determines the corresponding target virtual resource view based on the label information, determines the candidate physical servers based on the corresponding resource pool, and loads the preset scheduling policy based on the label information. Finally, the target physical server is determined from the candidate physical servers according to the preset scheduling policy, and the target cloud server instance is allocated based on the target physical server to meet the user service requirements.
[0107] Figure 5 FIG. is a schematic diagram of a user purchase process according to Embodiment 1 of the present application. As Figure 5 shown, taking the user's application scenario as the short-cycle scenario as an example. After the user performs a purchase behavior, the user can see the inventory view corresponding to the purchase behavior, that is, the basic inventory view and the temporary mixed inventory view corresponding to the short-cycle scenario. Then, the user initiates a purchase based on the inventory seen, that is, creates an instance. After receiving the user's purchase request, the scheduling system will determine the associated target virtual resource view according to the label information and display it to the user. Among them, the scheduling system can obtain the resource production source corresponding to the label information through a preset table for recording the resource pools corresponding to different application scenarios, that is, obtain the normal resource pool and the mixed pool corresponding to the short-cycle scenario. Then the scheduling system loads the available physical machines according to the resource production source, that is, the candidate physical servers, for example, loads NC1, NC2, NC3, and NC4. Finally, the scheduling system selects NC1 as the target physical server from NC1, NC2, NC3, and NC4 based on the preset scheduling policy and the target virtual resource view, and allocates the target cloud server instance based on the target physical server to meet the user service requirements.
[0108] Figure 6 It is a corresponding relationship diagram of an application scenario, an inventory view, and a resource pool according to Embodiment 1 of the present application. As Figure 6 shown, the application scenario can include, for example, a normal demand scenario of ordinary users, an operation and maintenance migration scenario, a short-term resource demand scenario of ordinary users, an Elastic Compute Infrastructure (ECI) / SPOT short-term resource demand scenario, and various other resource demand scenarios (such as Figure 6 other resource demand 3 scenario and other resource demand n scenario in
[0109] Users in different application scenarios can see different inventory views. For example, users in the normal demand scenario of ordinary users can see the default view, that is, the basic inventory view. Users in the operation and maintenance migration scenario can see the default view and the temporary mixed view. Users in the short-term resource demand scenario of ordinary users can see the default view, the reuse view, and the temporary mixed view. Users in the ECI / SPOT short-term resource demand scenario can see the default view and the reuse view. Users in other resource demand 3 scenario can see view-3 and view-4. Users in other resource demand n scenario can see view-n.
[0110] The corresponding relationship between resources and resource pools in the inventory view can be, for example, that the resource pool corresponding to the default view is the normal resource pool, the resource pool corresponding to the temporary mixed view is the temporary mixed pool, the resource pool corresponding to the reuse view is the reuse pool, the resource pool corresponding to view-3 is resource pool 4, the resource pools corresponding to view-4 and view-5 are resource pool 5, and the resource pools corresponding to view-n are resource pool 6 and resource pool n. Among them, the resource production source of the normal resource pool is through normal deployment, the resource production source of the temporary mixed pool is through mixed production, the resource production source of the reuse pool is through reuse production, the resource production source of resource pool 4 is source 4, the resource production source of resource pool 5 is source 5, the resource production source of resource pool 6 is source 6, and the resource production source of resource pool n is source n.
[0111] It can be seen that according to the solution provided in the embodiment of the present application, physical resources are virtualized into multiple virtual resources through virtual resource technology, and multiple virtual resources are virtualized into multiple virtual resource views to meet different user usage scenarios. By establishing the association between the user-visible inventory and the underlying resource view, the virtual view, the selling inventory, and the scheduling system are linked, that is, the user-visible view, the scheduling decision-making system, and the resource view management are linked, so as to achieve what the user sees is what they get for resources.
[0112] In addition, the present application can also improve the turnover of resources by time-sharing multiplexing for unfulfilled resources or resources in an idle state, achieving resource reuse. Based on the present application, fragmented resources caused by product isolation can be provided to short-cycle users through mixed operation, avoiding idle waste of resources without affecting the overall machine sales of the original products. In addition, resources with higher costs can be used for backup scheduling and operation and maintenance scenarios. Although they cannot be generally supplied, they can solve the urgent needs of specific customers. At the same time, the products sold in the present application are fully mixed and operated, and the restricted mixed resources are supplied to the customers in greatest need, thereby maximizing the value of the resources.
[0113] It is easy to understand that the beneficial effects of the resource allocation method provided by the present application include the following points.
[0114] Beneficial effect (1): It avoids the phenomenon of virtual resources being scrambled among instances, saves resources, and improves service stability and response speed.
[0115] Beneficial effect (2): It can achieve what you see is what you get for the user's resource inventory, that is, the inventory view seen by the user on the console and API interface side is the same as the resource view faced by the final scheduling.
[0116] Beneficial effect (3): It realizes resource reuse and can maximize the value of resources.
[0117] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties. And the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation entrances are provided for users to choose to authorize or refuse.
[0118] In addition, it should also be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0119] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the technical solution of the present application, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0120] Embodiment 2
[0121] Under the operating environment as in Embodiment 1, the present application provides a resource allocation method as Figure 7 shown, Figure 7 which is a flowchart of a resource allocation method according to Embodiment 2 of the present application. As Figure 7 shown, the method includes:
[0122] Step S71, obtaining a cloud server instance purchase request through a first application programming interface. Among them, the request data carried in the cloud server instance purchase request includes: label information, and the label information is used to depict the behavioral attributes of the target object.
[0123] Step S72, returning a cloud server instance purchase response through a second application programming interface. Among them, the response data carried in the cloud server instance purchase response includes: a target cloud server instance, and the target cloud server instance is obtained by allocating the target physical server for the label information. The target physical server is selected based on a preset scheduling policy and a target virtual resource view. The preset scheduling policy is used to determine the scheduling relationship between different physical servers, and the target virtual resource view is determined by the label information. The target virtual resource view is used to display the virtual resource management relationship in the target application scenario.
[0124] The cloud server instance purchase request can be understood as a purchase request for a cloud server instance initiated by a user. The request data carried in the cloud server instance purchase request includes: label information, and the label information is used to depict the behavioral attributes of the target object. If the target object is a user, the label information is used to depict the user's behavioral attributes, which may include information such as the user's characteristics, behaviors, preferences, and interests, that is, it can be understood as a user portrait. Exemplarily, the label information may include the user's historical purchase behavior information and the user's current purchase behavior information, etc., such as the historical information of the user's purchased instances and the user's current behavior information of purchasing instances, etc., which are not limited herein.
[0125] The cloud server instance purchase response can be understood as the response information feedback to the user about the purchased target cloud server instance. The response data carried in the cloud server instance purchase response includes: the target cloud server instance.
[0126] The target physical server is selected based on a preset scheduling policy and the target virtual resource view, and the target cloud server instance is obtained by allocating label information using the target physical server.
[0127] In the embodiments of the present application, the target application scenario can be understood as an application scenario associated with the behavioral attributes of the target object. For example, the corresponding target application scenario can be determined according to the user's purchase behavior. Exemplarily, according to the user's purchase behavior, the target application scenario can be divided into short-cycle scenarios, emergency scenarios, and daily scenarios, etc., which are not limited herein.
[0128] Among them, the short-cycle scenario means that the user uses the purchased instance for a short time, that is, the instance is required to provide services within a short cycle, rather than a long-term or continuous demand. For example, if the user purchases a Spot Instance product, the corresponding scenario can be determined as a short-cycle scenario according to the user's purchase behavior. The emergency scenario means that the user purchases the instance in a sudden or urgent situation and needs the instance to solve the immediate problems of a specific user. The daily scenario means that the instance purchased by the user needs to provide services in a long-term or continuous manner.
[0129] The embodiments of the present application propose a virtual resource view, that is, a physical resource is divided and virtualized into multiple virtual resource views, and different virtual resource views are used to meet the different resource requirements of the target object. It can be understood that the purchase behavior of the target object can reflect the resource requirements of the target object.
[0130] The target virtual resource view is used to display the virtual resource management relationship in the target application scenario, that is, to display the virtual resources that can meet the needs of the target object. The virtual resource management relationship can be understood as the management relationship of virtual resources obtained from the underlying physical resources through virtualization technology. In the embodiments of the present application, the virtual resources used to provide services in different application scenarios are different, and the virtual resource management relationships in different application scenarios are displayed through different virtual resource views, so as to meet the different resource requirements of users.
[0131] The virtual resource view may include virtual resources such as a Central Processing Unit (CPU), Memory (MEM), Graphics Processing Unit (GPU), and Disk Storage (DISK) obtained through virtualization technology, which are not limited herein.
[0132] In the embodiments of the present application, different target object requirements correspond to different virtual resource views. Exemplarily, if a user purchases a SPOT product, the associated target application scenario is a short-cycle scenario. Therefore, the corresponding target virtual resource view is determined to be View A. It can be understood that what a user who purchases a SPOT product can see is View A of the virtual resource view that can meet the needs of this user.
[0133] It can be understood that if there are many instances running on Physical Machine B and Physical Machine B has an overloaded situation, the instances can be migrated to Physical Machine C with less load pressure, thereby reducing the load pressure on Physical Machine B. The preset scheduling policy is used to determine the scheduling relationship between different physical machines (i.e., physical servers). Based on this preset scheduling policy, it is possible to determine the physical machine that can provide better services among multiple physical machines, that is, to determine which physical machine to preferentially select.
[0134] Exemplarily, the target physical machine that provides services when creating an instance for the first time can be determined according to the preset scheduling policy and the target virtual resource view. If there is an overloaded situation during the process of a physical machine providing services, it is also possible to determine the target physical machine with less load pressure to which the instance is to be migrated based on the preset scheduling policy and the target virtual resource view.
[0135] The target physical machine can be understood as the physical machine that can provide better services determined based on the preset scheduling policy and the target virtual resource view. In the embodiments of the present application, through the virtual resource management relationship in the target application scenario corresponding to the label information shown by the preset scheduling policy and the target virtual resource view, it is possible to determine the target physical machine that can better run the virtual resource based on the virtual resources shown in the preset scheduling policy and the target virtual resource view, and then select this target physical machine to allocate the corresponding target cloud server instance for the label information.
[0136] In an embodiment of the present application, a cloud server instance purchase request is obtained through a first application programming interface. The request data carried in the cloud server instance purchase request includes: tag information, which is used to depict the behavioral attributes of a target object. Then, a cloud server instance purchase response is returned through a second application programming interface. The response data carried in the cloud server instance purchase response includes: a target cloud server instance, which is obtained by allocating the tag information using a target physical server. The target physical server is selected based on a preset scheduling policy and a target virtual resource view. The preset scheduling policy is used to determine the scheduling relationship between different physical servers. The target virtual resource view is determined by the tag information and is used to display the virtual resource management relationship in a target application scenario. Thus, different virtual resource views can be presented to different target objects according to the behavioral attributes of the target object, thereby meeting the resource requirements of different target objects. Moreover, since the virtual resource views corresponding to target objects with different behavioral attributes are different, that is, the target physical machines used to provide services are different, the situation of instance contention can be avoided, resource waste can be avoided, and the stability and response speed of the service can be improved.
[0137] The above resource allocation method provided by the embodiments of the present application can be, but is not limited to, applied to application scenarios involving instance purchase in fields such as e-commerce services, education services, legal services, medical services, conference services, social network services, financial product services, logistics services, and navigation services. For example: instance purchase scenarios for providing e-commerce services, instance purchase scenarios for providing education services, instance purchase scenarios for providing medical services, etc., which are not limited here. In addition, the applicable scenarios of the method provided by the present application include, but are not limited to, public clouds, private clouds, etc., which are not limited here.
[0138] By adopting the embodiment of the present application, a cloud server instance purchase request is obtained through a first application programming interface. Among them, the request data carried in the cloud server instance purchase request includes: tag information, which is used to characterize the behavioral attributes of the target object. Then, a cloud server instance purchase response is returned through a second application programming interface. Among them, the response data carried in the cloud server instance purchase response includes: a target cloud server instance, which is allocated for the tag information by using a target physical server. The target physical server is selected based on a preset scheduling policy and a target virtual resource view. The preset scheduling policy is used to determine the scheduling relationship between different physical servers. The target virtual resource view is determined by the tag information and is used to display the virtual resource management relationship in the target application scenario. Thus, the purpose of reasonably allocating cloud server instances based on tag information is achieved. By virtualizing physical resources into multiple virtual resource views to meet the resource requirements of different objects, instance contention is avoided, thereby realizing the technical effects of avoiding resource waste, improving the stability and response speed of services, and further solving the technical problem that there is a phenomenon of mutual contention for virtual resources among instances in the related art, resulting in resource waste, reduced service stability, and reduced response speed.
[0139] It should be noted that the preferred implementation manner of this embodiment can refer to the relevant description in Embodiment 1, which will not be elaborated here.
[0140] Embodiment 3
[0141] In the operating environment as in Embodiment 1, the present application provides a Figure 8 resource allocation method as shown.
[0142] Figure 8 is a flowchart of a resource allocation method according to Embodiment 3 of the present application. As Figure 8 shown, the method includes:
[0143] Step S81: Obtain a currently input cloud server instance purchase dialogue request. Among them, the portrait parameters carried in the cloud server instance purchase dialogue request include: tag information, which is used to characterize the behavioral attributes of the target object;
[0144] Step S82: In response to the cloud server instance purchase dialogue request, return a cloud server instance purchase dialogue reply. Among them, the information carried in the cloud server instance purchase dialogue reply includes: a target cloud server instance, which is allocated for the tag information by using a target physical server. The target physical server is selected based on a preset scheduling policy and a target virtual resource view. The preset scheduling policy is used to determine the scheduling relationship between different physical servers. The target virtual resource view is determined by the tag information and is used to display the virtual resource management relationship in the target application scenario;
[0145] Step S83, display the target cloud server instance within the graphical user interface.
[0146] The cloud server instance purchase dialogue request can be understood as a dialogue request for purchasing a cloud server instance initiated by the user. The portrait parameters carried in the cloud server instance purchase dialogue request include: label information, which is used to depict the behavioral attributes of the target object. If the target object is the user, the label information is used to depict the user's behavioral attributes, and can include information such as the user's characteristics, behaviors, preferences, interests, etc., that is, it can be understood as a user portrait. Exemplarily, the label information can include the user's historical purchase behavior information and the user's current purchase behavior information, such as the historical information of the user's purchased instances and the user's current behavior information of purchasing instances, which is not limited here.
[0147] The cloud server instance purchase dialogue reply can be a reply to the user regarding the purchase of the cloud server instance. The information carried in the cloud server instance purchase dialogue reply includes: the target cloud server instance, which is allocated using the target physical server based on the label information.
[0148] In the embodiments of the present application, the target application scenario can be understood as an application scenario associated with the behavioral attributes of the target object. For example, the corresponding target application scenario can be determined based on the purchase behavior of the target object. Exemplarily, according to the user's purchase behavior, the target application scenario can be divided into short-cycle scenarios, emergency scenarios, and daily scenarios, etc., which is not limited here.
[0149] Among them, the short-cycle scenario means that the user's use of the purchased instance is short in time, that is, the instance is required to provide services within a short cycle, rather than a long-term or continuous demand. For example, if the user purchases a Spot Instance product, the corresponding scenario can be determined as a short-cycle scenario based on the user's purchase behavior. The emergency scenario means that the user purchases the instance in a sudden or urgent situation, and the instance is required to solve the immediate problem of a specific user. The daily scenario means that the instance purchased by the user needs to provide services in a long-term or continuous manner.
[0150] The embodiments of the present application propose a virtual resource view, that is, a physical resource is divided and virtualized into multiple virtual resource views, and different virtual resource views are used to meet the different resource requirements of the target object. It can be understood that the purchase behavior of the target object can reflect the resource requirements of the target object.
[0151] The target virtual resource view is used to display the virtual resource management relationship in the target application scenario, that is, to display the virtual resources that can meet the needs of the target object. The virtual resource management relationship can be understood as the management relationship of the virtual resources obtained from the underlying physical resources through virtualization technology. In the embodiments of the present application, the virtual resources used to provide services in different application scenarios are different. Different virtual resource views are used to display the virtual resource management relationships in different application scenarios, so as to meet the different resource needs of the target object.
[0152] The virtual resource view may include virtual resources obtained through virtualization technology, such as a Central Processing Unit (CPU), Memory (MEM), Graphics Processing Unit (GPU), Disk Storage (DISK), etc., which are not limited here.
[0153] In the embodiments of the present application, different target object requirements correspond to different virtual resource views. Exemplarily, if a user purchases a SPOT product, the associated target application scenario is a short-cycle scenario. Therefore, the corresponding target virtual resource view is determined as View A. It can be understood that what the user who purchases the SPOT product can see is View A of the virtual resource view that can display the virtual resources that meet the needs of the user.
[0154] It can be understood that if there are many instances running on Physical Machine B and Physical Machine B has an overloaded situation, the instances can be migrated to another Physical Machine C with less load pressure, so as to reduce the load pressure on Physical Machine B. The preset scheduling policy is used to determine the scheduling relationship between different physical machines (i.e., physical servers). Based on this preset scheduling policy, it is possible to determine the physical machine that can better provide services among multiple physical machines, that is, to determine which physical machine to preferentially select.
[0155] Exemplarily, the target physical machine that provides services when an instance is first created can be determined according to the preset scheduling policy and the target virtual resource view. If there is an overloaded situation during the process of a physical machine providing services, the target physical machine with less load pressure to which the instance is to be migrated can also be determined based on the preset scheduling policy and the target virtual resource view.
[0156] The target physical machine can be understood as a physical machine that can better provide services determined based on a preset scheduling policy and a target virtual resource view. In the embodiments of the present application, through the preset scheduling policy and the virtual resource management relationship in the target application scenario corresponding to the label information shown in the target virtual resource view, the target physical machine that can better run the virtual resource can be determined based on the virtual resources shown in the preset scheduling policy and the target virtual resource view, and then the target physical machine is selected to allocate the corresponding target cloud server instance for the label information.
[0157] In the embodiments of the present application, when performing a human-computer interaction dialogue, by obtaining the current cloud server instance purchase dialogue request, where the information carried in the cloud server instance purchase dialogue request includes: label information, and the label information is used to characterize the user behavior attributes. Then, in response to the cloud server instance purchase dialogue request, a cloud server instance purchase dialogue reply is returned, where the information carried in the cloud server instance purchase dialogue reply includes: a target cloud server instance, the target cloud server instance is obtained by allocating for the label information using a target physical server, the target physical server is selected based on a preset scheduling policy and a target virtual resource view, the preset scheduling policy is used to determine the scheduling relationship between different physical servers, the target virtual resource view is determined by the label information, and the target virtual resource view is used to show the virtual resource management relationship in the target application scenario. Finally, after determining the target cloud server instance, the target cloud server instance is displayed in the graphical user interface to provide feedback to the user. Thus, different virtual resource views can be shown to different users according to the user behavior attributes, so as to meet the different user resource requirements. And, since the virtual resource views corresponding to users with different behavior attributes are different, that is, the target physical machines used to provide services are different, the situation of instance contention can be avoided, resource waste can be avoided, and the stability and response speed of the service can be improved.
[0158] The above resource allocation method provided by the embodiments of the present application can be, but is not limited to, applied to application scenarios involving instance purchase in fields such as e-commerce services, education services, legal services, medical services, conference services, social network services, financial product services, logistics services, and navigation services. For example: instance purchase scenarios for providing e-commerce services, instance purchase scenarios for providing education services, instance purchase scenarios for providing medical services, etc., which are not limited here. In addition, the applicable scenarios of the method provided by the present application include, but are not limited to, public clouds, private clouds, etc., which are not limited here.
[0159] By adopting the embodiment of the present application, a cloud server instance purchase dialogue request currently input is obtained. Among them, the portrait parameters carried in the cloud server instance purchase dialogue request include: tag information, which is used to depict the behavioral attributes of the target object. Then, in response to the cloud server instance purchase dialogue request, a cloud server instance purchase dialogue reply is returned. Among them, the information carried in the cloud server instance purchase dialogue reply includes: a target cloud server instance, which is obtained by allocating the tag information using a target physical server. The target physical server is selected based on a preset scheduling policy and a target virtual resource view. The preset scheduling policy is used to determine the scheduling relationship between different physical servers. The target virtual resource view is determined by the tag information and is used to display the virtual resource management relationship in the target application scenario. Finally, after the target cloud server instance is determined, the target cloud server instance is displayed in the graphical user interface to provide feedback to the user. Thus, the purpose of reasonably allocating cloud server instances based on tag information is achieved. By virtualizing physical resources into multiple virtual resource views to meet the resource requirements of different objects, instance contention is avoided, thereby achieving the technical effects of avoiding resource waste, improving the stability and response speed of the service, and further solving the technical problem in the related art that there is a phenomenon of mutual contention for virtual resources between instances, resulting in resource waste, reduced service stability, and reduced response speed.
[0160] It should be noted that the preferred implementation manner of this embodiment can refer to the relevant description in Embodiment 1, which will not be elaborated here.
[0161] Embodiment 4
[0162] According to the embodiment of the present application, an apparatus embodiment for implementing the above resource allocation method is also provided. Figure 9 is a structural schematic diagram of a resource allocation apparatus according to Embodiment 4 of the present application, as Figure 9 shown. The apparatus includes:
[0163] A first acquisition module 901, configured to acquire tag information, where the tag information is used to depict the behavioral attributes of the user;
[0164] A determination module 902, configured to determine a target virtual resource view associated with the tag information, where the target virtual resource view is used to display the virtual resource management relationship in the target application scenario;
[0165] A selection module 903, configured to select a target physical server corresponding to the tag information based on a preset scheduling policy and the target virtual resource view, where the preset scheduling policy is used to determine the scheduling relationship between different physical servers;
[0166] An allocation module 904, configured to allocate a corresponding target cloud server instance for the tag information using the target physical server.
[0167] Optionally, the above-mentioned first acquisition module 901 is further configured to: display an inventory view in a target application scenario, where the inventory view is used to display the remaining quantity of resources in stock to be traded, and the inventory view includes at least one of a basic inventory view and an inventory view provided by virtual resources; in response to a trigger operation based on the inventory view, obtain tag information from the portrait parameters carried in the cloud server instance purchase request.
[0168] Optionally, it further includes: a processing module, configured to: perform resource abstraction on the physical resources to be processed to obtain multiple virtual resources, where the physical resources to be processed are physical resources provided by at least one physical server; obtain multiple virtual resource views based on the multiple virtual resources, where the multiple virtual resource views are used to respectively display the virtual resource management relationships in different application scenarios, and different application scenarios respectively correspond to different resource requirements; establish association relationships between different tag information and the multiple virtual resource views respectively, where there is an association between the tag information and the target virtual resource view.
[0169] Optionally, the above-mentioned determination module 902 is further configured to: determine the target virtual resource view corresponding to the tag information based on the pre-established association relationship.
[0170] Optionally, the above-mentioned selection module 903 is further configured to: use the target virtual resource view to obtain the candidate physical servers corresponding to the tag information; select the target physical server corresponding to the tag information from the candidate physical servers based on a preset scheduling policy.
[0171] Optionally, the above-mentioned selection module 903 is further configured to: use the target virtual resource view to determine the resource production source; load the candidate physical servers based on the resource production source.
[0172] Optionally, it further includes: a partitioning module, configured to: partition the physical resources to be processed into multiple resource pools based on different resource production sources of the physical resources to be processed, where the multiple resource pools respectively correspond to different application scenarios, and different application scenarios respectively correspond to different resource requirements.
[0173] Optionally, the above-mentioned selection module 903 is further configured to: determine the target resource pool corresponding to the resource production source from the multiple resource pools; load the candidate physical servers based on the target resource pool.
[0174] Optionally, the available resource range corresponding to the target virtual resource view is equal to the available resource range corresponding to the inventory view in the target application scenario, where the target virtual resource view is visible to the first user and invisible to the second user, the first user is the user corresponding to the tag information, and the second user is the user corresponding to the remaining tag information other than the tag information.
[0175] By adopting the embodiment of the present application, by obtaining the tag information used to characterize the behavior attributes of the target object, then according to the behavior of the target object, the target virtual resource view to be displayed to the target object can be determined. After that, according to the preset scheduling policy and the target virtual view used to display the virtual resource management relationship in the target application scenario, the target physical server corresponding to the tag information can be selected, that is, the target physical machine that suits the needs of the target object and can provide better services for this need is selected. Finally, according to the selected target physical server, the corresponding target cloud server instance is allocated for the behavior of the target object, that is, the corresponding cloud server product is allocated. Thus, the purpose of reasonably allocating cloud server instances based on tag information is achieved. By virtualizing physical resources into multiple virtual resource views to meet the resource needs of different objects, instance contention is avoided, thereby realizing the technical effects of avoiding resource waste, improving the stability and response speed of services, and further solving the technical problem that there is a phenomenon of mutual contention for virtual resources among instances in the related art, resulting in resource waste, reduced service stability and response speed.
[0176] It should be noted here that the above-mentioned first acquisition module 901, determination module 902, selection module 903, and allocation module 904 correspond to steps S21 to S24 in Embodiment 1. The instances and application scenarios implemented by the four modules and the corresponding steps are the same, but are not limited to the content disclosed in the above-mentioned Embodiment 1. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (for example, memory 104) and processed by one or more processors (for example, processors 102a, 102b,..., 102n). The above-mentioned modules can also be part of the device and can run in the computer terminal 10 provided in Embodiment 1.
[0177] According to the embodiment of the present application, another device embodiment for implementing the above resource allocation method is also provided. Figure 10 It is a schematic structural diagram of another resource allocation device according to Embodiment 4 of the present application, as Figure 10 shown, the device includes:
[0178] A second acquisition module 1001, configured to obtain a cloud server instance purchase request through a first application programming interface. The request data carried in the cloud server instance purchase request includes: tag information, and the tag information is used to characterize the user behavior attributes;
[0179] The first return module 1002 is configured to return a cloud server instance purchase response through a second application programming interface. The response data carried in the cloud server instance purchase response includes: a target cloud server instance, which is allocated for the label information by a target physical server. The target physical server is selected based on a preset scheduling policy and a target virtual resource view. The preset scheduling policy is used to determine the scheduling relationship between different physical servers. The target virtual resource view is determined by the label information and is used to display the virtual resource management relationship in a target application scenario.
[0180] In the embodiment of the present application, a cloud server instance purchase request is obtained through a first application programming interface. The request data carried in the cloud server instance purchase request includes: label information, which is used to characterize the behavior attributes of a target object. Then, a cloud server instance purchase response is returned through a second application programming interface. The response data carried in the cloud server instance purchase response includes: a target cloud server instance, which is allocated for the label information by a target physical server. The target physical server is selected based on a preset scheduling policy and a target virtual resource view. The preset scheduling policy is used to determine the scheduling relationship between different physical servers. The target virtual resource view is determined by the label information and is used to display the virtual resource management relationship in a target application scenario. Thus, the purpose of reasonably allocating cloud server instances based on label information is achieved. By virtualizing physical resources into multiple virtual resource views to meet the resource requirements of different objects, instance contention is avoided, thereby realizing the technical effects of avoiding resource waste, improving the stability and response speed of services, and further solving the technical problem in the related art that there is a phenomenon of mutual contention for virtual resources between instances, resulting in resource waste, reduced service stability, and reduced response speed.
[0181] It should be noted here that the above-mentioned second acquisition module 1001 and the first return module 1002 correspond to steps S71 and S72 in Embodiment 2. The instances and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the content disclosed in the above-mentioned Embodiment 1. It should be noted that the above-mentioned module or unit can be a hardware component or a software component stored in a memory (for example, memory 104) and processed by one or more processors (for example, processors 102a, 102b,..., 102n). The above-mentioned module can also be part of a device and can run in the computer terminal 10 provided in Embodiment 1.
[0182] According to an embodiment of the present application, there is also provided another device embodiment for implementing the above resource allocation method. Figure 11 is a schematic structural diagram of another resource allocation device according to Embodiment 4 of the present application, as Figure 11As shown, the device includes:
[0183] A third acquisition module 1101, configured to acquire a currently input cloud server instance purchase dialogue request, where the portrait parameters carried in the cloud server instance purchase dialogue request include: tag information, and the tag information is used to depict the user behavior attributes;
[0184] A second return module 1102, configured to return a cloud server instance purchase dialogue reply in response to the cloud server instance purchase dialogue request, where the information carried in the cloud server instance purchase dialogue reply includes: a target cloud server instance, the target cloud server instance is obtained by allocating the tag information using a target physical server, the target physical server is selected based on a preset scheduling policy and a target virtual resource view, the preset scheduling policy is used to determine the scheduling relationship between different physical servers, the target virtual resource view is determined by the tag information, and the target virtual resource view is used to display the virtual resource management relationship in a target application scenario;
[0185] A display module 1103, configured to display the target cloud server instance in a graphical user interface.
[0186] By adopting the embodiment of the present application, by acquiring the currently input cloud server instance purchase dialogue request, where the portrait parameters carried in the cloud server instance purchase dialogue request include: tag information, and the tag information is used to depict the user behavior attributes. Then, in response to the cloud server instance purchase dialogue request, a cloud server instance purchase dialogue reply is returned, where the information carried in the cloud server instance purchase dialogue reply includes: a target cloud server instance, the target cloud server instance is obtained by allocating the tag information using a target physical server, the target physical server is selected based on a preset scheduling policy and a target virtual resource view, the preset scheduling policy is used to determine the scheduling relationship between different physical servers, the target virtual resource view is determined by the tag information, and the target virtual resource view is used to display the virtual resource management relationship in a target application scenario. Finally, after determining the target cloud server instance, the target cloud server instance is displayed in the graphical user interface to provide feedback to the user, thereby achieving the purpose of reasonably allocating cloud server instances based on tag information. By virtualizing physical resources into multiple virtual resource views to meet the resource requirements of different objects, instance contention is avoided, thereby realizing the technical effects of avoiding resource waste, improving the stability and response speed of the service, and further solving the technical problem in the related art that there is a phenomenon of mutual contention for virtual resources between instances, resulting in resource waste, reduced service stability and response speed.
[0187] It should be noted that the above-mentioned third acquisition module 1101, second return module 1102, and display module 1103 correspond to steps S51 to S83 in Embodiment 3. The examples and application scenarios implemented by the three modules and the corresponding steps are the same, but are not limited to the content disclosed in the above-mentioned Embodiment 1. It should be noted that the above-mentioned module or unit may be a hardware component or software component stored in a memory (for example, memory 104) and processed by one or more processors (for example, processors 102a, 102b,..., 102n). The above-mentioned module may also be part of a device and may run in the computer terminal 10 provided in Embodiment 1.
[0188] It should be noted that the preferred implementation schemes involved in the above-mentioned embodiments of the present application are the same as the schemes, application scenarios, and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.
[0189] Embodiment 5
[0190] An embodiment of the present application may provide a computer terminal, and the computer terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the above-mentioned computer terminal may also be replaced with a terminal device such as a mobile terminal.
[0191] Optionally, in this embodiment, the above-mentioned computer terminal may be located in at least one of multiple network devices in a computer network.
[0192] In this embodiment, the above-mentioned computer terminal may execute program codes of the following steps in the resource allocation method: obtaining tag information, where the tag information is used to depict the behavior attributes of a target object; determining a target virtual resource view associated with the tag information, where the target virtual resource view is used to display the virtual resource management relationship in a target application scenario; selecting a target physical server corresponding to the tag information based on a preset scheduling policy and the target virtual resource view, where the preset scheduling policy is used to determine the scheduling relationship between different physical servers; and allocating a corresponding target cloud server instance for the tag information by using the target physical server.
[0193] Optionally, Figure 12 is a structural block diagram of a computer terminal according to an embodiment of the present application. As Figure 12 shown, the computer terminal 12 may include: one or more (only one is shown in the figure) processors 1202, a memory 1204, a storage controller, and a peripheral interface, where the peripheral interface is connected to a radio frequency module, an audio module, and a display.
[0194] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the resource allocation method and device in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored therein, that is, implements the above-mentioned resource allocation method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory may further include a memory remotely provided with respect to the processor, and these remote memories can be connected to the computer terminal 12 through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof.
[0195] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: obtain label information, where the label information is used to characterize the behavioral attributes of the target object; determine the target virtual resource view associated with the label information, where the target virtual resource view is used to display the virtual resource management relationship in the target application scenario; based on the preset scheduling policy and the target virtual resource view, select the target physical server corresponding to the label information, where the preset scheduling policy is used to determine the scheduling relationship between different physical servers; use the target physical server to allocate the corresponding target cloud server instance for the label information.
[0196] Optionally, the above processor can also execute the program code of the following steps: display the inventory view in the target application scenario, where the inventory view is used to display the remaining amount of the resource inventory to be traded, and the inventory view includes at least one of the basic inventory view and the inventory view provided by the virtual resources; in response to the trigger operation based on the inventory view, obtain the label information from the portrait parameters carried in the cloud server instance purchase request.
[0197] Optionally, the above processor can also execute the program code of the following steps: perform resource abstraction on the physical resources to be processed to obtain multiple virtual resources, where the physical resources to be processed are the physical resources provided by at least one physical server; obtain multiple virtual resource views based on the multiple virtual resources, where the multiple virtual resource views are used to respectively display the virtual resource management relationships in different application scenarios, and different application scenarios respectively correspond to different resource requirements; establish association relationships between different label information and the multiple virtual resource views respectively, where there is an association between the label information and the target virtual resource view.
[0198] Optionally, the above processor can also execute the program code of the following steps: determine the target virtual resource view corresponding to the label information based on the pre-established association relationship.
[0199] Optionally, the above-mentioned processor may also execute the program code of the following steps: obtaining candidate physical servers corresponding to the label information by using the target virtual resource view; selecting a target physical server corresponding to the label information from the candidate physical servers based on a preset scheduling policy.
[0200] Optionally, the above-mentioned processor may also execute the program code of the following steps: determining the resource production source by using the target virtual resource view; loading candidate physical servers based on the resource production source.
[0201] Optionally, the above-mentioned processor may also execute the program code of the following steps: dividing the physical resources to be processed into multiple resource pools based on different resource production sources of the physical resources to be processed, where the multiple resource pools respectively correspond to different application scenarios, and different application scenarios respectively correspond to different resource requirements.
[0202] Optionally, the above-mentioned processor may also execute the program code of the following steps: determining a target resource pool corresponding to the resource production source from the multiple resource pools; loading candidate physical servers based on the target resource pool.
[0203] Optionally, the available resource range corresponding to the target virtual resource view is equal to the available resource range corresponding to the inventory view in the target application scenario, where the target virtual resource view is visible to a first target object and invisible to a second target object, the first target object is the target object corresponding to the label information, and the second target object is the target object corresponding to the remaining label information other than the label information.
[0204] By adopting the embodiments of the present application, by obtaining the label information used to characterize the behavior attributes of the target object, then the target virtual resource view to be presented to the target object can be determined according to the behavior of the target object. After that, according to the preset scheduling policy and the target virtual view used to display the virtual resource management relationship in the target application scenario, the target physical server corresponding to the label information can be selected, that is, the target physical machine that suits the needs of the target object and can provide better services for the needs is selected. Finally, according to the selected target physical server, a corresponding target cloud server instance is allocated for the behavior of the target object, that is, a corresponding cloud server product is allocated, thereby achieving the purpose of reasonably allocating cloud server instances based on the label information. By virtualizing physical resources into multiple virtual resource views to meet the resource requirements of different objects, instance contention is avoided, thereby achieving the technical effects of avoiding resource waste, improving the stability and response speed of services, and further solving the technical problem in the related art that there is a phenomenon of mutual contention for virtual resources among instances, resulting in resource waste, reduced service stability and response speed.
[0205] Those of ordinary skill in the art can understand Figure 12The structure shown is only schematic, and the computer terminal 12 can also be a smart phone (such as an Android phone, an iOS phone, etc.) ) , a tablet computer, a palm computer, and terminal devices such as Mobile Internet Devices (MID) and PAD. Figure 12 It does not limit the structure of the above electronic devices. For example, the computer terminal 12 may also include more or fewer components (such as a network interface, a display device, etc.) than those shown Figure 12 in the figure, or have a configuration different from that shown Figure 12 .
[0206] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium. The storage medium may include: a flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disc, etc.
[0207] Embodiment 6
[0208] An embodiment of the present application also provides a computer-readable storage medium. Optionally, in this embodiment, the above computer-readable storage medium can be used to save the program code executed by the resource allocation method provided in the above Embodiment 1.
[0209] Optionally, in this embodiment, the above computer-readable storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
[0210] Optionally, in this embodiment, the computer-readable storage medium is set to store program code for performing the following steps: obtaining tag information, where the tag information is used to characterize the behavior attributes of the target object; determining the target virtual resource view associated with the tag information, where the target virtual resource view is used to display the virtual resource management relationship in the target application scenario; based on a preset scheduling policy and the target virtual resource view, selecting the target physical server corresponding to the tag information, where the preset scheduling policy is used to determine the scheduling relationship between different physical servers; using the target physical server to allocate the corresponding target cloud server instance for the tag information.
[0211] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: presenting an inventory view in a target application scenario, where the inventory view is used to present the remaining quantity of resources in stock to be traded, and the inventory view includes at least one of a basic inventory view and an inventory view provided by virtual resources; in response to a trigger operation based on the inventory view, obtaining tag information from the portrait parameters carried in the purchase request from the cloud server instance.
[0212] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining multiple virtual resources based on the physical resources to be processed, where the physical resources to be processed are physical resources provided by at least one physical server; presenting information of the multiple virtual resources to obtain multiple virtual resource views, where the multiple virtual resource views are used to respectively present the virtual resource management relationships in different application scenarios, and different application scenarios respectively correspond to different resource requirements; establishing an association relationship between different tag information and the multiple virtual resource views respectively, where there is an association between the tag information and the target virtual resource view.
[0213] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining a target virtual resource view corresponding to the tag information based on the pre-established association relationship.
[0214] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining candidate physical servers corresponding to the tag information by using the target virtual resource view; selecting a target physical server corresponding to the tag information from the candidate physical servers based on a preset scheduling policy.
[0215] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining the resource production source by using the target virtual resource view; loading candidate physical servers based on the resource production source.
[0216] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: dividing the physical resources to be processed into multiple resource pools based on different resource production sources of the physical resources to be processed, where the multiple resource pools respectively correspond to different application scenarios, and different application scenarios respectively correspond to different resource requirements.
[0217] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: determining a target resource pool corresponding to the resource production source from the multiple resource pools; loading candidate physical servers based on the target resource pool.
[0218] Optionally, the available resource range corresponding to the target virtual resource view is equal to the available resource range corresponding to the inventory view in the target application scenario, where the target virtual resource view is visible to the first target object and invisible to the second target object. The first target object is the target object corresponding to the label information, and the second target object is the target object corresponding to the remaining label information other than the label information.
[0219] The serial numbers of the embodiments of the present application above are only for description and do not represent the advantages or disadvantages of the embodiments.
[0220] In the above embodiments of the present application, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0221] In the several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the units or modules can be in an electrical or other form.
[0222] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to 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.
[0223] In addition, the functional units in the various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0224] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs.
[0225] The above are only the preferred embodiments of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can still be made, and these improvements and refinements should also be regarded as the protection scope of this application.
Claims
1. A resource allocation method, characterized in that, Including: Obtain label information, where the label information is used to characterize the behavioral attributes of the target object; Determine the target virtual resource view associated with the label information, where the target virtual resource view is used to display the virtual resource management relationship in the target application scenario; Based on the preset scheduling policy and the target virtual resource view, select the target physical server corresponding to the label information, where the preset scheduling policy is used to determine the scheduling relationship between different physical servers; Use the target physical server to allocate the corresponding target cloud server instance for the label information.
2. The resource allocation method according to claim 1, wherein Obtaining the label information includes: Display the inventory view in the target application scenario, where the inventory view is used to display the remaining amount of the resource inventory to be traded, and the inventory view includes at least one of the basic inventory view and the inventory view provided by the virtual resources; In response to the trigger operation based on the inventory view, obtain the label information from the portrait parameters carried in the cloud server instance purchase request.
3. The resource allocation method according to claim 1, characterized in that The resource allocation method further includes: Perform resource abstraction on the physical resources to be processed to obtain multiple virtual resources, where the physical resources to be processed are the physical resources provided by at least one physical server; Obtain multiple virtual resource views based on the multiple virtual resources, where the multiple virtual resource views are used to respectively display the virtual resource management relationships in different application scenarios, and different application scenarios respectively correspond to different resource requirements; Establish association relationships between different label information and the multiple virtual resource views respectively, where there is an association between the label information and the target virtual resource view.
4. The resource allocation method according to claim 3, wherein Determining the target virtual resource view associated with the label information includes: Based on the pre-established association relationship, determine the target virtual resource view corresponding to the label information.
5. The resource allocation method according to claim 1, wherein Based on the preset scheduling policy and the target virtual resource view, selecting the target physical server corresponding to the label information includes: Use the target virtual resource view to obtain the candidate physical servers corresponding to the label information; Select the target physical server corresponding to the label information from the candidate physical servers based on the preset scheduling policy.
6. The resource allocation method according to claim 5, wherein Using the target virtual resource view to obtain the candidate physical servers corresponding to the label information includes: Use the target virtual resource view to determine the resource production source; Load the candidate physical servers based on the resource production source.
7. The resource allocation method according to claim 6, wherein The resource allocation method further includes: Based on the different resource production sources of the physical resources to be processed, divide the physical resources to be processed into multiple resource pools, where the multiple resource pools respectively correspond to different application scenarios, and different application scenarios respectively correspond to different resource requirements.
8. The resource allocation method according to claim 7, wherein Loading the candidate physical servers based on the resource production source includes: Determine the target resource pool corresponding to the resource production source from the multiple resource pools; Load the candidate physical servers based on the target resource pool.
9. The resource allocation method according to claim 7, wherein The available resource range corresponding to the target virtual resource view is equal to the available resource range corresponding to the inventory view in the target application scenario. Among them, the target virtual resource view is visible to the first target object and invisible to the second target object. The first target object is the target object corresponding to the label information, and the second target object is the target object corresponding to the remaining label information other than the label information.
10. A resource allocation method, characterized in that, Including: Obtain a cloud server instance purchase request through a first application programming interface. Among them, the request data carried in the cloud server instance purchase request includes: label information, which is used to characterize the behavioral attributes of the target object; Return a cloud server instance purchase response through a second application programming interface. Among them, the response data carried in the cloud server instance purchase response includes: a target cloud server instance, which is allocated for the label information by using a target physical server. The target physical server is selected based on a preset scheduling policy and a target virtual resource view. The preset scheduling policy is used to determine the scheduling relationship between different physical servers. The target virtual resource view is determined by the label information, and the target virtual resource view is used to display the virtual resource management relationship in the target application scenario.
11. A resource allocation method, characterized in that, Including: Obtain the currently input cloud server instance purchase dialogue request. Among them, the portrait parameters carried in the cloud server instance purchase dialogue request include: label information, which is used to characterize the behavioral attributes of the target object; In response to the cloud server instance purchase dialogue request, return a cloud server instance purchase dialogue reply. Among them, the information carried in the cloud server instance purchase dialogue reply includes: a target cloud server instance, which is allocated for the label information by using a target physical server. The target physical server is selected based on a preset scheduling policy and a target virtual resource view. The preset scheduling policy is used to determine the scheduling relationship between different physical servers. The target virtual resource view is determined by the label information, and the target virtual resource view is used to display the virtual resource management relationship in the target application scenario; Display the target cloud server instance in the graphical user interface.
12. An electronic device, characterized in that, Including: A memory storing an executable program; A processor for running the program. Among them, when the program runs, it executes the resource allocation method described in any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program. Among them, when the executable program runs, it controls the device where the computer-readable storage medium is located to execute the resource allocation method described in any one of claims 1 to 11.