Server resource allocation method and device, equipment, storage medium and product
By determining the allocation probability based on the pheromone concentration and allocating service transaction requests, the problem of inefficient server resource allocation in the prior art is solved, the rational allocation and efficient utilization of server resources are realized, and the efficiency of processing service transaction requests is improved.
Patent Information
- Application Number
- CN202411915661.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-04
AI Technical Summary
The existing server resource allocation method is difficult to adapt to complex service transaction scenarios, resulting in inefficient service transaction request processing, and purchasing high-configuration servers to solve the problem of resource shortage is high cost and resource waste is serious.
By obtaining the service transaction requests within the current time period, they are allocated to the preset task set, and the allocation probability is determined based on the pheromone concentration between the task set and the server node, the target server node is determined, and the service transaction requests are allocated to the corresponding target server node for processing.
It realizes the rational allocation and efficient utilization of server resources, improves the efficiency of service transaction request processing, avoids resource waste, and reduces the cost of purchasing high-configuration servers.
Smart Images

Figure CN119759576A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a server resource allocation method, device, equipment, storage medium and product. Background Art
[0002] In recent years, with the continuous development of transaction methods, the number and types of service transaction requests have been gradually increasing. In order to ensure the processing efficiency of service transaction requests, the demand for server resources is also gradually increasing. At the same time, the allocation method of server resources is also particularly important.
[0003] However, the existing server resource allocation method is difficult to adapt to today's relatively complex service transaction scenarios, which can easily cause the demand for server resources of service transaction requests to exceed the server resources that the transaction server can provide, resulting in the service transaction requests not being processed in a timely manner or being processed slowly, seriously affecting the user experience. In order to solve the problem of server resource shortage, it is usually chosen to purchase a higher-configuration server to replace the existing server to meet the demand for server resources. However, purchasing a higher-configuration server is often expensive and requires more financial resources, and eliminating the existing server will also lead to a waste of resources.
[0004] Therefore, how to improve the existing server resource allocation method to achieve reasonable allocation and efficient use of service resources, thereby improving the processing efficiency of service transaction requests, has become a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] The present invention provides a server resource allocation method, device, equipment, storage medium and product to achieve reasonable allocation and efficient utilization of server resources and improve the processing efficiency of service transaction requests.
[0006] According to one aspect of the present invention, there is provided a server resource allocation method, comprising:
[0007] Obtain service transaction requests initiated by each transaction initiator in the current time period;
[0008] Allocating each of the service transaction requests to at least one preset task set to obtain the service transaction requests under each of the task sets;
[0009] Determining the allocation probability between each of the task sets and each of the server nodes according to the current pheromone concentration between each of the task sets and each of the server nodes;
[0010] Determining the target server nodes corresponding to the task sets according to the allocation probabilities between the task sets and the server nodes;
[0011] The service transaction requests in each of the task sets are distributed to corresponding target server nodes for request processing.
[0012] According to another aspect of the present invention, there is provided a server resource allocation device, comprising:
[0013] The request acquisition module is used to obtain the service transaction requests initiated by each transaction initiator in the current time period;
[0014] A request allocation module, used to allocate each of the service transaction requests to at least one preset task set, and obtain the service transaction requests under each of the task sets;
[0015] An allocation probability determination module, used to determine the allocation probability between each of the task sets and each of the server nodes according to the current pheromone concentration between each of the task sets and each of the server nodes;
[0016] A target server node determination module, used to determine the target server node corresponding to each of the task sets according to the allocation probability between each of the task sets and each of the server nodes;
[0017] The request processing module is used to distribute the service transaction requests in each of the task sets to the corresponding target server nodes for request processing.
[0018] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0019] at least one processor; and
[0020] a memory communicatively connected to the at least one processor; wherein,
[0021] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the server resource allocation method described in any embodiment of the present invention.
[0022] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the server resource allocation method described in any embodiment of the present invention when executed.
[0023] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the server resource allocation method described in any embodiment of the present invention is implemented.
[0024] The technical solution of the embodiment of the present invention obtains the service transaction requests initiated by each transaction initiator in the current time period; allocates each service transaction request to at least one pre-set task set to obtain the service transaction requests under each task set; determines the allocation probability between each task set and each server node according to the current pheromone concentration between each task set and each server node; determines the target server node corresponding to each task set according to the allocation probability between each task set and each server node; allocates the service transaction requests in each task set to the corresponding target server node for request processing. This technical solution can determine the allocation probability between each task set and each server node according to the information concentration between each task set and each server node, and determine the target server node corresponding to each task set, thereby improving the rationality and utilization of the allocation of server resources; further, the service transaction requests in each task set are allocated to the corresponding target server node for request processing, which can improve the processing efficiency of the service transaction requests.
[0025] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0027] Figure 1 is a flow chart of a server resource allocation method provided according to Embodiment 1 of the present invention;
[0028] Figure 2 is a flow chart of a server resource allocation method provided according to Embodiment 2 of the present invention;
[0029] Figure 3 is a structural diagram of a server resource allocation device provided according to Embodiment 3 of the present invention;
[0030] Figure 4It is a structural schematic diagram of an electronic device for implementing the server resource allocation method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] Embodiment 1
[0034] Figure 1 A flowchart of a server resource allocation method is provided for the first embodiment of the present invention. This embodiment is applicable to the case where server resources are allocated for processing a large number of service transaction requests in a financial business scenario. The method can be executed by a server resource allocation device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0035] S110: Obtain service transaction requests initiated by each transaction initiator in the current time period.
[0036] Among them, the service transaction request can be a request initiated by the transaction party to perform a specific transaction operation type based on the actual transaction activities. The transaction operation type may include online payment, order inquiry, and online transfer, etc.
[0037] Specifically, the transaction operations requested to be executed by the transaction parties in the current time period can be obtained. The current time period can be a predetermined time interval, such as one hour or one minute, which can be set by technical personnel based on experience. For example, if the set time period is 30 seconds, service requests for executing various types of transaction operations initiated by each transaction party can be obtained within 30 seconds.
[0038] S120: Allocate each service transaction request to at least one preset task set to obtain the service transaction request under each task set.
[0039] The task set may be a request set for recording requests for various transaction operation tasks. The specific task set may be a request set with a fixed number that is pre-set by a technician according to the task characteristics of the transaction operation tasks.
[0040] Exemplarily, there may be task set a, task set b and task set c, where task set a may be a request set for recording requests for data query services, task set b may be a request set for recording requests for transfer services, and task set c may be a request set for recording requests for payment services. Specifically, the service transaction requests may be assigned to corresponding task sets according to the transaction operation types corresponding to the service transaction requests initiated by the transaction parties, thereby obtaining task sets corresponding to the service transaction requests. If an order query service request initiated by the transaction party is obtained, the service request may be assigned to task set a. Furthermore, after the service transaction requests assigned to each task set are processed, the task set exists in the form of an empty set and waits to receive the service transaction requests for the next time period.
[0041] Optionally, different task sets correspond to different task processing characteristics; accordingly, each service transaction request is assigned to at least one pre-set task set to obtain the service transaction request under each task set, including: according to the transaction characteristics of each service transaction request and based on the task processing characteristics of each task set, each service transaction request is assigned to at least one pre-set task set to obtain the service transaction request under each task set; wherein the transaction characteristics include at least the initiator identifier of the transaction initiator to which the service transaction request belongs, the transaction processing complexity and the transaction type.
[0042] The initiator identifier may be data that uniquely identifies the identity information of the transaction initiator, and may include the initiator's user ID (Identifier) and IP (Internet Protocol) address, etc.
[0043] The task processing characteristics may include at least task identification, task type, task processing complexity, and task urgency.
[0044] Exemplarily, continuing the above example, if the service transaction request A obtained is to authenticate the identity of the transaction party, it can be determined that the task type corresponding to the service transaction request A is a data query business, and the task urgency is general. Then the service transaction request A can be assigned to the task set a. Specifically, according to the service transaction request initiated by each transaction party, the transaction characteristics of each service transaction request can be obtained, and the obtained transaction characteristics can be matched with the task processing characteristics of each task set. The matching result of the transaction characteristics and the task processing characteristics is obtained, and the service transaction request is assigned to the corresponding task set according to the matching result.
[0045] This technical solution can match the transaction characteristics of the service transaction request with the task processing characteristics of the task set, and then allocate the service transaction request to the task set corresponding to the value, thereby improving the rationality of the allocation and scheduling of the service transaction request.
[0046] S130 , determining the allocation probability between each task set and each server node according to the current pheromone concentration between each task set and each server node.
[0047] The pheromone concentration may be used to indicate the degree of matching between the task set and each server node, and may be a matching value calculated based on the load conditions of the task set and each server node, the task completion efficiency, or the performance resources of the server node. The specific current pheromone concentration may be the original pheromone concentration pre-set by the technician based on experience and the actual conditions of each server node, or may be a calculated matching value. Furthermore, the pheromone concentration between each task set and each server node may be dynamically adjusted in real time based on the real-time allocation conditions between each task set and each server node in the current time period.
[0048] The allocation probability may be used to represent the probability value of allocating each task set to each server node, and may be specifically determined according to the current pheromone concentration value between each task set and each server node.
[0049] For example, if there are task set e and task set f, and there are also a first server node and a second server node. Among them, the current pheromone concentration between task set d and the first server node can be 70%, and the current pheromone concentration between task set e and the first server node can be 20%; the current pheromone concentration between task set e and the first server node can be 60%, and the current pheromone concentration between task set e and the second server node can be 80%. Furthermore, according to the current pheromone concentration between each task set and each service node, it can be determined that the allocation probability between task set e and the first server node is 78%, and the allocation probability between task set e and the second service node is 22%; it can also be determined that the allocation probability between task set f and the first server node is 57%, and the allocation probability between task set f and the second service node is 43%.
[0050] S140: Determine the target server nodes corresponding to the task sets according to the allocation probabilities between the task sets and the server nodes.
[0051] The target server nodes corresponding to the task sets may be determined by calculating the allocation probabilities between the task sets and the service nodes, and then determining the target server nodes corresponding to the task sets according to the allocation probabilities between the server nodes.
[0052] Exemplarily, continuing the above example, if the probability of allocation between task set e and the first server node is 78%, and the probability of allocation between task set e and the second service node is 22%; the probability of allocation between task set f and the first server node is 57%, and the probability of allocation between task set f and the second service node is 43%. Among them, the maximum probability of allocation between task set e and the first server node is 78%, then the first server can be determined as the target server node corresponding to task set e; the maximum probability of allocation between task set f and the first server node is 57%, then the first server node can also be determined as the target server node corresponding to task set f. Specifically, the server node with the largest calculated allocation probability between each task set and each server node can be used as the target server node, and this embodiment does not impose specific restrictions on this.
[0053] S150: Allocate the service transaction requests in each task set to the corresponding target server node for request processing.
[0054] Specifically, after determining the service node with the highest allocation probability between each service node and each task set as the target server node, the task set can be allocated to the corresponding target server node, and then the service transaction request under the task set can be processed by the target server node.
[0055] Optionally, after allocating the service transaction requests in each task set to the corresponding target server node for request processing, it also includes: for any task set and any server node, obtaining the historical pheromone concentration between the task set and the server node in a historical time period; and updating the current pheromone concentration between the task set and the server node based on the current pheromone concentration and the historical pheromone concentration of the task set and the server node.
[0056] The historical pheromone concentration may be the original pheromone concentration, or may be the matching value between the task set and each server node calculated in a historical time period.
[0057] Among them, the service transaction request in any task set obtained in the current time period can be used to determine the target server node and allocate the service transaction request based on the current pheromone concentration between the server nodes. Furthermore, after the service transaction request is sent to the target service node, the load of the target server will increase and more performance resources of the server node will be occupied, thereby causing the efficiency of completing the target server task to decrease, thereby leading to the update of the current pheromone concentration between the task set and the target server node. Specifically, the current pheromone concentration between the task set and the server node can be updated based on the current pheromone concentration and the historical pheromone concentration between the task set and the server node. The calculation formula can be as follows:
[0058]
[0059] Among them, τ ij (t+1) can represent the current pheromone concentration value between the updated task set i and the server node j, τ(i,j) can represent the historical pheromone concentration between the task set i and the server node j, ρ can represent the volatility factor of the pheromone, and the value range of ρ can be between 0 and 1; 1-ρ can be represented as the remaining pheromone concentration. It can be the amount of pheromone released when the kth task set calls server node j at time t.
[0060] This technical solution can update the current pheromone concentration between the task set and each server node after allocating the task set to the corresponding server node, thereby realizing real-time scheduling between the task set and server resources, thereby improving the utilization of service resources and the processing efficiency of service transaction requests.
[0061] In an optional solution of this embodiment, one or more optional solutions of this embodiment can be combined. Optionally, the performance parameter data of the host physical machine to which each server node belongs is obtained; according to the performance parameter data of each host physical machine, it is determined whether there is a migratable node in each server node; if so, a target physical machine is selected from at least one migratable physical machine; and the migratable node is migrated to the target physical machine.
[0062] The performance parameter data may be performance resource data for processing service transaction requests, and may specifically include CPU (Central Processing Unit), memory, and network bandwidth, etc. The host physical machine may be a physical machine currently deployed by the server node. The migratable physical machine may be a physical machine whose performance parameter data can meet the performance parameter data requirements of the migratable server node.
[0063] Among them, determining whether there is a migratable node among the server nodes can specifically be to determine whether the performance resources required for each server node to process the corresponding task set exceed the performance parameters of the current physical machine. Exemplarily, continuing the above example, if the network bandwidth of the host physical machine to which the first server node belongs is 50 megabits, and the network bandwidth required for the first service node to process the corresponding task set is 60 megabits, then the first server node can be determined as a migratable node, and the physical machine with a network bandwidth exceeding 60 megabits can be determined as a migratable physical machine. Furthermore, if there is a migratable physical machine m, the physical machine m can determine the target physical machine, and migrate the first server node to the physical machine m.
[0064] This technical solution can migrate server nodes when it is determined that the host physical machine to which the server node belongs has a performance bottleneck, thereby solving the problem that the performance of the host physical machine is difficult to meet the needs of the server node and improving the processing efficiency of service transaction requests.
[0065] The technical solution of the embodiment of the present invention obtains the service transaction requests initiated by each transaction initiator in the current time period; allocates each service transaction request to at least one pre-set task set to obtain the service transaction requests under each task set; determines the allocation probability between each task set and each server node according to the current pheromone concentration between each task set and each server node; determines the target server node corresponding to each task set according to the allocation probability between each task set and each server node; allocates the service transaction requests in each task set to the corresponding target server node for request processing. This technical solution can determine the allocation probability between each task set and each server node according to the information concentration between each task set and each server node, and determine the target server node corresponding to each task set, thereby improving the rationality and utilization of the allocation of server resources; further, the service transaction requests in each task set are allocated to the corresponding target server node for request processing, which can improve the processing efficiency of the service transaction requests.
[0066] Embodiment 2
[0067] Figure 2 This is a flow chart of a server resource allocation method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment further optimizes the above server resource allocation method.
[0068] Furthermore, the step "determine the allocation probability between each task set and each server node according to the current pheromone concentration between each task set and each server node" is refined into "determine the task response speed between any task set and any server node; determine the allocation probability between the task set and the server node according to the current pheromone concentration and task response speed between the task set and the server node." to improve the way to allocate server resources. Figure 2 As shown, the method includes:
[0069] S210: Obtain service transaction requests initiated by each transaction initiator in the current time period.
[0070] S220: Allocate each service transaction request to at least one preset task set to obtain the service transaction request under each task set.
[0071] S230: For any task set and any server node, determine a task response speed between the task set and the server node.
[0072] The task response speed may refer to the time required for each server node to process the corresponding service transaction request in each task set and return the processing result, which may be determined based on the load of each service node and the performance resources of the server node.
[0073] S240: Determine the allocation probability between the task set and the server node according to the current pheromone concentration and task response speed between the task set and the server node.
[0074] Specifically, according to the current pheromone concentration and task response speed between the task set and the server node, the formula for determining the allocation probability between the task set and the server node can be:
[0075]
[0076] Among them, P ij It can represent the allocation probability between task set i and server node j, α can represent the importance factor of pheromone, β can represent the impact factor of expected value, and μ can represent the server node scheduled by the task set at the current moment. ij (t) may be the value of the pheromone concentration left when the task set i calls the server node j at time t; η ij (t) can be the response speed of server node j to task set i at time t, alllow k (k=1, 2, m) may represent the kth task set and all server nodes scheduled in the current time period.
[0077] This technical solution can calculate the distribution probability between the task set and the server node according to the current pheromone concentration and task response speed between the task set and the server node. The task set can be distributed to a service node with a higher matching degree to process the service transaction request, thus realizing the reasonable allocation and efficient utilization of server resources and improving the processing efficiency of service transaction requests.
[0078] S250: Determine the target server nodes corresponding to the task sets according to the allocation probabilities between the task sets and the server nodes.
[0079] Optionally, the target server nodes corresponding to each task set are determined based on the allocation probabilities between each task set and each server node, including: for any task set, determining the allocation probability between the task set and each server node; selecting a target probability that meets a preset probability judgment condition from the allocation probabilities between the task set and each server node, and using the server node corresponding to the target probability as the target server node.
[0080] The probability judgment condition may be to determine whether the allocation probability between the task set and each server node exceeds the allocation probability threshold according to a preset allocation probability threshold.
[0081] For example, the probability judgment condition can be set to an allocation probability threshold of more than 60%, and then if the task set B is obtained, the allocation probabilities between the task set B and the first service node and the second server node can be calculated respectively. If the allocation probability between the task set B and the first service node is calculated to be 15%, and the allocation probability between the task set B and the second server node is 85%, then the target probability can be determined to be 85%. Furthermore, the second server node corresponding to the target allocation probability of 85% can be determined as the target server node.
[0082] This technical solution can determine the target allocation probability in the allocation probability threshold between the task set and each service node according to the preset allocation probability threshold, and then determine the target server node from the server node corresponding to the target allocation probability, thereby improving the allocation efficiency and utilization rate of server resources.
[0083] S260: Allocate the service transaction requests in each task set to the corresponding target server node for request processing.
[0084] The technical solution of the embodiment of the present invention obtains the service transaction requests initiated by each transaction initiator in the current time period; allocates each service transaction request to at least one pre-set task set to obtain the service transaction requests under each task set; determines the allocation probability between the task set and the server node according to the current pheromone concentration and task response speed between each task set and each server node; and further determines the target server node corresponding to each task set; allocates the service transaction requests in each task set to the corresponding target server node for request processing. The technical solution can realize real-time adjustment of the allocation probability between the task set and the server node according to the current pheromone concentration and task response speed between the task set and each server node, thereby improving the rationality and utilization of the allocation of server resources, thereby improving the processing efficiency of service transaction requests.
[0085] Embodiment 3
[0086] Figure 3The present invention provides a server resource allocation device according to the third embodiment of the present invention. The server resource allocation device provided in the embodiment of the present invention can be applied to the situation where server resources are allocated for processing a large number of service transaction requests in a financial business scenario. The server resource allocation device can be implemented in the form of hardware and / or software, such as Figure 3 As shown, it specifically includes: a transaction request acquisition module 310, a transaction request allocation module 320, an allocation probability determination module 330, a target server node determination module 340 and a transaction request processing module 350. Among them,
[0087] The transaction request acquisition module 310 is used to acquire the service transaction requests initiated by each transaction initiator in the current time period.
[0088] The transaction request allocation module 320 is used to allocate each of the service transaction requests to at least one preset task set to obtain the service transaction requests under each of the task sets.
[0089] The allocation probability determination module 330 is used to determine the allocation probability between each of the task sets and each of the server nodes according to the current pheromone concentration between each of the task sets and each of the server nodes.
[0090] The target server node determination module 340 is used to determine the target server node corresponding to each of the task sets according to the allocation probability between each of the task sets and each of the server nodes.
[0091] The transaction request processing module 350 is used to distribute the service transaction requests in each of the task sets to the corresponding target server nodes for request processing.
[0092] This technical solution can determine the allocation probability between each task set and each server node according to the information density between each task set and each server node, and determine the target server node corresponding to each task set, thereby realizing the reasonable allocation and efficient utilization of server resources; further, the service transaction requests in each task set are allocated to the corresponding target server node for request processing, thereby improving the processing efficiency of the service transaction requests.
[0093] Optionally, the transaction request allocation module 320 is specifically configured to allocate each of the service transaction requests to at least one preset task set according to the transaction characteristics of each of the service transaction requests and based on the task processing characteristics of each of the task sets, so as to obtain the service transaction requests under each of the task sets;
[0094] Among them, different task sets correspond to different task processing characteristics; the transaction characteristics at least include the initiator identifier of the transaction initiator to which the service transaction request belongs, the transaction processing complexity and the transaction type.
[0095] Optionally, the allocation probability determination module 330 is specifically used to determine, for any task set and any server node, a task response speed between the task set and the server node;
[0096] The allocation probability between the task set and the server node is determined according to the current pheromone concentration and the task response speed between the task set and the server node.
[0097] Optionally, the target server node determination module 340 is specifically used to determine, for any task set, the allocation probability between the task set and each of the server nodes; select a target probability that meets a preset probability judgment condition from the allocation probability between the task set and each of the server nodes, and use the server node corresponding to the target probability as the target server node.
[0098] Optionally, the device further comprises:
[0099] The pheromone concentration updating module is used for, after allocating the service transaction requests in each of the task sets to the corresponding target server nodes for request processing, further comprising:
[0100] For any task set and any server node, obtain the historical pheromone concentration between the task set and the server node in the historical time period;
[0101] According to the current pheromone concentrations of the task set and the server node and the historical pheromone concentrations, the current pheromone concentration between the task set and the server node is updated.
[0102] Optionally, the device further comprises:
[0103] A server node migration module is used to obtain performance parameter data of a host physical machine to which each server node belongs;
[0104] Determining whether there is a migratable node in each of the server nodes according to the performance parameter data of each of the host physical machines;
[0105] If yes, then select a target physical machine from at least one migratable physical machine;
[0106] Migrate the migratable node to the target physical machine.
[0107] The server resource allocation device provided in the embodiment of the present invention can execute the server resource allocation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0108] Embodiment 4
[0109] Figure 4 A schematic diagram of the structure of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0110] like Figure 4 As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In RAM43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, ROM42 and RAM43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0111] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0112] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as a server resource allocation method.
[0113] In some embodiments, the server resource allocation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the server resource allocation method described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the server resource allocation method in any other appropriate manner (e.g., by means of firmware).
[0114] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0115] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0116] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0117] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0118] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0119] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0120] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0121] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A server resource allocation method, characterized in that: include: Obtain service transaction requests initiated by each transaction initiator in the current time period; Allocating each of the service transaction requests to at least one preset task set to obtain the service transaction requests under each of the task sets; Determining the allocation probability between each of the task sets and each of the server nodes according to the current pheromone concentration between each of the task sets and each of the server nodes; Determining the target server nodes corresponding to the task sets according to the allocation probabilities between the task sets and the server nodes; The service transaction requests in each of the task sets are distributed to corresponding target server nodes for request processing.
2. The method according to claim 1, characterized in that Different task sets correspond to different task processing characteristics; accordingly, allocating each of the service transaction requests to at least one pre-set task set to obtain the service transaction requests under each of the task sets includes: According to the transaction characteristics of each of the service transaction requests and based on the task processing characteristics of each of the task sets, each of the service transaction requests is assigned to at least one pre-set task set to obtain the service transaction requests under each of the task sets; The transaction characteristics at least include an initiator identifier of a transaction initiator to which the service transaction request belongs, transaction processing complexity, and transaction type.
3. The method according to claim 1, characterized in that The determining, according to the current pheromone concentration between each task set and each server node, the allocation probability between each task set and each server node, comprises: For any task set and any server node, determine the task response speed between the task set and the server node; The allocation probability between the task set and the server node is determined according to the current pheromone concentration and the task response speed between the task set and the server node.
4. The method according to claim 3, characterized in that: The determining the target server nodes corresponding to the task sets respectively according to the allocation probabilities between the task sets and the server nodes respectively includes: For any task set, determining the allocation probability between the task set and each of the server nodes; A target probability that meets a preset probability judgment condition is selected from the allocation probabilities between the task set and each of the server nodes, and a server node corresponding to the target probability is used as a target server node.
5. The method according to claim 1, characterized in that After allocating the service transaction requests in each of the task sets to the corresponding target server nodes for request processing, the method further includes: For any task set and any server node, obtain the historical pheromone concentration between the task set and the server node in the historical time period; According to the current pheromone concentrations of the task set and the server node and the historical pheromone concentrations, the current pheromone concentration between the task set and the server node is updated.
6. The method according to claim 1, characterized in that The method further comprises: Obtaining performance parameter data of the host physical machine to which each of the server nodes belongs; Determining whether there is a migratable node among the server nodes according to the performance parameter data of each of the host physical machines; If yes, then select a target physical machine from at least one migratable physical machine; Migrate the migratable node to the target physical machine.
7. A server resource allocation device, characterized in that: include: A transaction request acquisition module is used to acquire service transaction requests initiated by each transaction initiator in the current time period; A transaction request allocation module, used to allocate each of the service transaction requests to at least one preset task set, and obtain the service transaction requests under each of the task sets; An allocation probability determination module, used to determine the allocation probability between each of the task sets and each of the server nodes according to the current pheromone concentration between each of the task sets and each of the server nodes; A target server node determination module, used to determine the target server node corresponding to each of the task sets according to the allocation probability between each of the task sets and each of the server nodes; The transaction request processing module is used to distribute the service transaction requests in each of the task sets to the corresponding target server nodes for request processing.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the server resource allocation method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the server resource allocation method according to any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the server resource allocation method according to any one of claims 1 to 6.