Intelligent server resource allocation method and device, equipment and medium
By dynamically adjusting resource configuration according to the traffic scenario of the business line channel during server resource allocation, the problem of low resource allocation efficiency in the existing technology is solved, and maximum utilization of system resources and cost reduction under different traffic scenarios are achieved.
Patent Information
- Application Number
- CN202410951828.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-10-29
Smart Images

Figure CN118860652A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and medium for intelligent allocation of server resources. Background Art
[0002] With the development of Internet technology, the application market contains a variety of APP application software. Each application software requires a back-end server to provide data processing support to support the use of the entire application. Especially in the period of increasing business traffic, more server resources need to be deployed to support the normal processing of business data in the application software; however, in the stage of less business traffic, there is no need to deploy more server resources. Therefore, the configuration of server system resources needs to be reasonably adjusted according to the changes in business traffic.
[0003] The technical method for backend server resource allocation in the prior art method is that each business line channel is configured with more server terminals to ensure the normal execution of business during daily traffic peaks. However, when the traffic data to be processed by some business line channels is in the off-peak period, the business line channels do not need to be configured with more server terminals, which results in a waste of system resources. In the prior art method, when a business line channel is configured with more backend server terminals, the operation and maintenance personnel can suspend the operation of the terminal equipment and then reduce the capacity of the server terminal, but this device resource adjustment method requires increased operation and maintenance manpower costs. Therefore, the resource allocation method for servers in the prior art method has the problem of low allocation efficiency. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, equipment and medium for intelligent allocation of server resources, aiming to solve the problem of low allocation efficiency in the resource allocation method for servers in the prior art methods.
[0005] In a first aspect, an embodiment of the present invention provides a method for intelligently allocating server resources, wherein the method comprises:
[0006] Allocate corresponding initial resources to each service line channel and configure them according to the preset initialization configuration information;
[0007] If a service processing request is received, determine the traffic scenario corresponding to the current service processed by the server according to the service processing request, and obtain the target channel corresponding to the current traffic scenario of the service processing request according to the dynamic adjustment rule; the target channel is the service line channel that needs to be tilted when allocating resources;
[0008] Determine basic resources of non-target channels according to the target channels; the non-target channels are other business line channels except the target channels;
[0009] Allocate corresponding system optimization resources to each target channel according to the basic resources of the non-target channels and the channel coefficients of each target channel in the initialization configuration information;
[0010] The resources allocated to each of the business line channels are updated and configured according to the basic resources of the non-target channels and the system optimization resources corresponding to the target channels.
[0011] In a second aspect, an embodiment of the present invention further provides a server resource intelligent allocation device, wherein the device is used to execute the server resource intelligent allocation method as described in the first aspect above, and the device includes:
[0012] An initial resource configuration unit, used to allocate corresponding initial resources to each service line channel and configure them according to preset initialization configuration information;
[0013] A target channel acquisition unit is used to determine the traffic scenario corresponding to the server processing the current business according to the business processing request if a business processing request is received, and acquire the target channel corresponding to the current traffic scenario of the business processing request according to the dynamic adjustment rule; the target channel is the business line channel that needs to be tilted when allocating resources;
[0014] A basic resource determination unit, configured to determine basic resources of non-target channels according to the target channel; the non-target channels are other service line channels except the target channel;
[0015] A system optimization resource acquisition unit, used to allocate corresponding system optimization resources to each target channel according to the basic resources of the non-target channels and the channel coefficients of each target channel in the initialization configuration information;
[0016] The resource update configuration unit is used to update the configuration of the resources allocated to each of the service line channels according to the basic resources of the non-target channels and the system optimization resources corresponding to the target channels.
[0017] In a third aspect, an embodiment of the present invention further provides a computer device, wherein the device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0018] Memory, used to store computer programs;
[0019] The processor is used to implement the steps of the server resource intelligent allocation method described in the first aspect when executing the program stored in the memory.
[0020] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method for intelligent allocation of server resources as described in the first aspect above are implemented.
[0021] The embodiment of the present invention provides a method, device, equipment and medium for intelligent allocation of server resources, the method comprising: allocating initial resources to each service line channel and configuring them, obtaining the target channel corresponding to the current traffic scenario of the service processing request according to the dynamic adjustment rules and determining the basic resources of the non-target channel, further allocating system optimization resources to each target channel according to the basic resources and initialization configuration information, and updating the configuration of the resources allocated to each service line channel according to the basic resources and system optimization resources. The above-mentioned intelligent allocation method of server resources can determine the corresponding target channel according to different traffic scenarios, and allocate resources to the service line channel according to the channel coefficient in the initialization configuration information and update the configuration, and can dynamically adjust the system resource configuration according to different traffic scenarios to maximize the utilization of the system resources of the server terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0023] Figure 1 A method flow chart of a method for intelligent allocation of server resources provided by an embodiment of the present invention;
[0024] Figure 2 A schematic diagram of an application scenario of the method for intelligent allocation of server resources provided by an embodiment of the present invention;
[0025] Figure 3 A schematic block diagram of a server resource intelligent allocation device provided in an embodiment of the present invention;
[0026] Figure 4 It is a schematic block diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.
[0028] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0029] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0030] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0031] The embodiment of the present invention provides a method for intelligent allocation of server resources, which is applied to a resource management module. The resource management module may be a virtual management module configured in a server terminal. The server terminal is configured with processing resources, memory resources, transmission channel resources, etc. that can be allocated. After the corresponding resource management module is created in the server terminal, the corresponding processing resources, memory resources and transmission channel resources can be allocated to the resource management module. The resource management module executes the stored software program to implement the above-mentioned method for intelligent allocation of server resources. The server terminal is a server device configured in an enterprise or institution for processing business flow data. The server terminal may be a cluster server, a parallel processing server or other server device. Please refer to Figure 2 As shown in the figure, the resource management module can also be a virtual management module separately configured in the terminal device 20. The terminal device 20 establishes a network connection with each server terminal 10 to realize the transmission of data information. The terminal device 20 executes the stored software program to realize the above-mentioned server resource intelligent allocation method. The terminal device 20 can generate corresponding resource configuration instructions and send them to one or more server terminals 10, so that each server terminal 10 updates the local resource configuration according to the resource configuration instructions. Among them, the terminal device 20 can be a laptop, desktop computer, tablet computer or mobile phone. Figure 1 As shown, the method includes steps S110 to S150.
[0032] S110. Allocate corresponding initial resources to each service line channel and configure them according to preset initialization configuration information.
[0033] According to the preset initialization configuration information, the corresponding initial resources are allocated to each service line channel and configured. The initialization configuration information can be pre-configured, and the initialization configuration information can be used to initialize each service line channel, that is, to allocate the corresponding initial resources to each service line channel and configure it.
[0034] In a specific embodiment, step S110 includes sub-steps: obtaining the total amount of available resources of at least one resource type; calculating the allocation ratio corresponding to each business line channel according to the channel coefficient corresponding to the business line channel in the initialization configuration information; and allocating the total amount of available resources of each resource type according to the allocation ratio to determine the initial resources of each business line channel and configure them.
[0035] Specifically, the total amount of available resources of each resource type in the server terminal can be obtained. The server terminal contains at least one resource type, and the resource type can be processing resources (directly related to the CPU), memory resources (directly related to the main memory medium), transmission channel resources, etc. For example, for the resource type of transmission channel resources, the overall QPS supported by the downstream system is 2000. QPS is the query rate per second, which is a measure of the amount of traffic processed by a specific query server within a specified time; QPS = number of requests / second. It can be determined that the total amount of available resources corresponding to the resource type of transmission channel resources is 2000.
[0036] The initialization configuration information includes the channel coefficients corresponding to each service line channel and each resource type. For each resource type, the channel coefficients corresponding to the service line channel and the resource type can be obtained respectively. For example, for a certain service system, there are two service lines, service line 1 and service line 2. Service line 1 includes one service line channel, and service line 2 includes four service line channels. The channel coefficients corresponding to each service line channel and the resource type of transmission channel resource are shown in Table 1.
[0037] Table 1
[0038] Channel Name Business Line 1-High Business Line 2-Emergency Business Line 2-High Business Line 2-Medium Business Line 2 - Low Channel coefficient 5 10 5 3 2
[0039] The corresponding allocation ratio can be calculated based on the channel coefficient of each business line channel. The allocation ratio can be calculated using formula (1):
[0040]
[0041] Among them, X i is the channel coefficient of the i-th business line channel, F i is the allocation ratio of the i-th business line channel, and N is the total number of business line channels.
[0042] The corresponding allocation ratio corresponding to each resource type can be calculated to allocate the total available resources of the resource type. For example, the allocation ratio of "Business Line 2-Emergency" to the resource type of transmission channel resources is 0.4, and the resource quota corresponding to the transmission channel resources allocated to "Business Line 2-Emergency" according to the allocation ratio is 2000×0.4=800.
[0043] Through the above method, the total available resources of each resource type can be allocated according to the allocation ratio of each resource type, so as to determine the resource quota corresponding to each business line channel and each resource type as the initial resource of the business line channel. The business line channel can be resource configured according to the initial resource of the business line channel, and the resource configuration is to send the calculated resource quota to the server terminal for local configuration update, so that the server terminal reconfigures the system resources according to the resource quota.
[0044] S120: If a business processing request is received, determine the traffic scenario corresponding to the server processing the current business according to the business processing request, and obtain the target channel corresponding to the current traffic scenario of the business processing request according to the dynamic adjustment rule; the target channel is the business line channel that needs to be tilted when allocating resources. There can be one or more target channels corresponding to the current traffic scenario of the current business processing request. The target channel is also the business line channel that is in an active state during the process of processing based on the current business processing request. In order to concentrate system resources to process the currently received business processing request, it is necessary to tilt resources to the target channel that is in an active state and processes the current business processing request, so as to ensure that the target channel can efficiently and quickly complete the processing of the business processing request.
[0045] In a specific embodiment, step S120 includes sub-steps: obtaining the corresponding scenario strategy in the dynamic adjustment rule according to the current traffic scenario; and filtering out the business line channel matching the business flow node as the corresponding target channel according to the business flow node included in the scenario strategy.
[0046] First, the scenario strategy corresponding to the dynamic adjustment rule can be obtained according to the current traffic scenario. After the server receives the business processing request, it starts to perform the corresponding business processing based on the business processing request. The current traffic scenario is the traffic scenario corresponding to the current business processing performed by the server; different traffic scenarios correspond to different business processing processes, and different business processing processes require corresponding business line channels to process business data. For example, if the business processing request is a marketing business request, then the current traffic scenario corresponding to the marketing business request can be a marketing scenario, and the scenario strategy corresponding to the marketing scenario can be obtained from the dynamic adjustment rule. Among them, the current traffic scenario can be a certain traffic scenario, or it can be formed by a combination of multiple traffic scenarios.
[0047] The scenario strategy includes business flow nodes, and multiple business flow nodes are combined into a business processing flow. For example, the business flow nodes corresponding to the marketing scenario are user behavior collection, Flink real-time tasks, and user-triggered marketing strategies. Based on the business flow nodes included in the scenario strategy, the business line channels that match the business flow nodes can be selected as the corresponding target channels.
[0048] For example, the business line channels that match the business flow nodes included in the above marketing scenario are business line 1-high, business line 2-urgent and business line 2-medium, and the above three matching business line channels can be correspondingly determined as target channels.
[0049] S130: Determine basic resources of non-target channels according to the target channel.
[0050] Determine the basic resources of non-target channels based on target channels. Furthermore, non-target channels can be determined based on target channels. Non-target channels are channels of other business lines except target channels. Then, the basic resources of non-target channels are further determined. Basic resources are the minimum amount of resources required to ensure the operation of each non-target channel, that is, to keep the non-target channel running at the lowest data processing speed to avoid abnormal operation of non-target channels caused by sudden business data traffic.
[0051] In a specific embodiment, step S130 includes sub-steps: obtaining other business line channels except the target channel in the business line channel as non-target channels; determining the basic resources of each non-target channel according to the minimum resource quota corresponding to each resource type.
[0052] Specifically, other service line channels except the target channel can be obtained and determined as non-target channels. The minimum resource quota corresponding to each resource type is further obtained, and the basic resources of the non-target channels are determined according to the minimum resource quota corresponding to each resource type.
[0053] For example, if the minimum resource quota corresponding to the transmission channel resource is "10", it can be determined that the minimum resource quota corresponding to the transmission channel resource in the basic resources of the non-target channel is "10".
[0054] The minimum resource quota corresponding to the non-target channel and each resource type is obtained, and they can be combined into the basic resources corresponding to the non-target channel.
[0055] S140 . Allocate corresponding system optimization resources to each target channel according to basic resources of non-target channels and channel coefficients of each target channel in initialization configuration information.
[0056] According to the basic resources of the non-target channels and the channel coefficients of each target channel in the initialization configuration information, corresponding system optimization resources are allocated to each target channel. In the above steps, resource allocation for non-target channels has been completed. Further, according to the basic resources of the non-target channels and the channel coefficients of each target channel, corresponding system optimization resources can be allocated to each target channel. The channel coefficients of the target channels can be directly obtained from the initialization configuration information. The channel coefficients corresponding to the same target channel and different resource types may not be equal.
[0057] In a specific embodiment, step S140 includes sub-steps: calculating the allocated resource amount of each resource type based on the basic resources of each non-target channel; determining the unallocated resource amount of each resource type based on the total available resources of each resource type and the corresponding allocated resource amount; calculating the optimized allocation ratio corresponding to each target channel based on the channel coefficient corresponding to the target channel in the initialization configuration information; and allocating the unallocated resource amount of each resource type according to the optimized allocation ratio to determine the system optimized resources for each business line channel.
[0058] First, the allocated resource amount of each resource type is calculated based on the basic resources of the non-target channel. For example, for the resource type of transmission channel resources, the minimum resource amount of business line 2-high and business line 2-low has been determined to be "10", so the allocated resource amount of the resource type of transmission channel resources is 10+10=20.
[0059] According to the total amount of available resources of each resource type and the corresponding amount of allocated resources, the amount of unallocated resources of each resource type can be determined accordingly. The amount of unallocated resources of a resource type = the total amount of available resources of the resource type - the amount of allocated resources. For example, if the total amount of available resources of the transmission channel resources is "2000" and the amount of allocated resources is "20", then the amount of unallocated resources of the transmission channel resources can be calculated to be 2000-20=1980.
[0060] Furthermore, the optimized allocation ratio corresponding to each target channel is calculated according to the channel coefficient corresponding to the target channel in the initialization configuration information, wherein the optimized allocation ratio can be calculated using formula (2):
[0061]
[0062] Among them, R i is the channel coefficient of the i-th target channel, Y i is the optimized allocation ratio of the i-th target channel, and M is the total number of target channels. Generally speaking, the value of M is not greater than N, where N is the total number of business line channels.
[0063] Furthermore, the channel occupancy time corresponding to the target channel can be obtained, and the optimized allocation ratio corresponding to the channel occupancy time and channel coefficient of each target channel can be calculated using formula (3):
[0064]
[0065] Among them, R i is the channel coefficient of the i-th target channel, P i is the optimized allocation ratio of the i-th target channel, M is the total number of target channels, t i is the channel occupancy time of each target channel, t i The unit is seconds, t i The value of M is an integer not less than 1. Generally speaking, the value of M is not greater than N, where N is the total number of service line channels.
[0066] Then, the optimized allocation ratio corresponding to each target channel can be calculated for each resource type. Further, the unallocated resource amount of each resource type is allocated according to the calculated optimized allocation ratio. The process of allocating the unallocated resource amount is similar to the process of allocating the total available resources in the above step S110, which will not be described in detail here.
[0067] Obtaining the allocation quota corresponding to the target channel and each resource type can be combined into the system optimization resource of the target channel. Then, through the above technical method, the system optimization resource of each target channel can be correspondingly determined.
[0068] S150: Update the configuration of the resources allocated to each of the service line channels according to the basic resources of the non-target channels and the system optimization resources corresponding to the target channels.
[0069] The resources allocated to each of the business line channels are updated and configured according to the basic resources of the non-target channels and the system optimization resources corresponding to the target channels. After obtaining the basic resources of the non-target channels and the system optimization resources of the target channels, the resources allocated to each of the business line channels can be updated and configured according to the basic resources and the system optimization resources. Updating and configuring the system resources of the business line channels is to send the calculated basic resources and system optimization resources to the server terminal for local configuration update, so that the server terminal reconfigures the system resources according to the basic resources and the system optimization resources.
[0070] In a specific embodiment, after step S150, it also includes the steps of: determining whether the business traffic corresponding to the current traffic scenario has been processed; if the business traffic corresponding to the current traffic scenario has been processed, allocating corresponding initial resources to each business line channel according to the initialization configuration information and configuring again.
[0071] Furthermore, it is also possible to determine whether the business traffic corresponding to the current business traffic scenario has been processed. If so, the system resources configured for the business line channel can be restored, that is, the corresponding initial resources are allocated to each business line channel according to the initialization configuration information, and the system resources are configured again based on the initial resources of each business line channel.
[0072] In a specific embodiment, the above method also includes: periodically monitoring the resource consumption ratio of each business line channel according to a preset monitoring period; determining whether the resource consumption ratio of the business line channel meets the preset resource allocation conditions; if the resource allocation conditions are met, determining the business line channel that does not have idle channel resources as the target channel and returning to execute the step of determining the basic resources of the non-target channel based on the target channel.
[0073] Furthermore, the resource consumption ratio of each business line channel can be monitored periodically. Resource consumption ratio = used resource amount / configured resource quota. If the configured resource quota corresponding to the transmission channel resources allocated to a business line channel is "555", and the used resource amount corresponding to the transmission channel resources of the business line channel is 463, then the corresponding resource consumption ratio is 0.834.
[0074] Determine whether the resource consumption ratio of each business line channel meets the pre-configured resource allocation conditions, where the resource allocation conditions include a judgment threshold (for example, the judgment threshold can be set to 0.8); if the resource consumption ratio of the business line channel corresponding to a certain resource type is greater than the judgment threshold, then it is determined that the resource allocation conditions are met, which means that a business data processing bottleneck has occurred in the current business line channel; if the resource consumption ratio of any business line channel corresponding to each resource type is not greater than the judgment threshold, then it is determined that the resource allocation conditions are not met.
[0075] If the resource allocation condition is met, the business line channels can be classified to re-determine the target channels and non-target channels. For example, for a certain resource type, it can be determined whether the resource consumption ratio of the business line channel corresponding to the resource type is greater than the preset idle judgment threshold (such as the idle judgment threshold is set to 0.4). If the resource consumption ratio of the business line channel corresponding to a certain resource type is greater than the idle judgment threshold, the business line channel is determined to be a target channel, that is, the business line channel is in a non-idle state, and the business line channel does not contain idle system resources. After determining the target channel, exclude the target channel in the business line channel, and the remaining business line channels are determined as non-target channels, and then return to execute step S130 to re-configure the system resources for the business line channel.
[0076] In the server resource intelligent allocation method disclosed in the above embodiment, the method includes: allocating initial resources to each business line channel and configuring them, obtaining the target channel corresponding to the current traffic scenario of the business processing request according to the dynamic adjustment rules and determining the basic resources of the non-target channel, further allocating system optimization resources to each target channel according to the basic resources and initialization configuration information, and updating the configuration of the resources allocated to each business line channel according to the basic resources and system optimization resources. The above server resource intelligent allocation method can determine the corresponding target channel according to different traffic scenarios, and allocate resources to the business line channel according to the channel coefficient in the initialization configuration information and update the configuration, and can dynamically adjust the system resource configuration according to different traffic scenarios to maximize the utilization of the system resources of the server terminal.
[0077] The embodiment of the present invention also provides a server resource intelligent allocation device, which can be configured in a terminal device or a server terminal, and is used to execute any embodiment of the aforementioned server resource intelligent allocation method. Figure 3 , Figure 3 A schematic block diagram of a server resource intelligent allocation device provided in an embodiment of the present invention.
[0078] like Figure 3 As shown, the server resource intelligent allocation device 100 includes an initial resource configuration unit 110 , a target channel acquisition unit 120 , a basic resource determination unit 130 , a system optimization resource acquisition unit 140 and a resource update configuration unit 150 .
[0079] The initial resource configuration unit 110 is used to allocate corresponding initial resources to each service line channel and configure them according to preset initialization configuration information.
[0080] The target channel acquisition unit 120 is used to determine the traffic scenario corresponding to the server processing the current business according to the business processing request when a business processing request is received, and obtain the target channel corresponding to the current traffic scenario of the business processing request according to the dynamic adjustment rules; the target channel is the business line channel that needs to be tilted when allocating resources.
[0081] The basic resource determining unit 130 is configured to determine basic resources of non-target channels according to the target channels.
[0082] The system optimization resource acquisition unit 140 is used to allocate corresponding system optimization resources to each target channel according to the basic resources of the non-target channels and the channel coefficients of each target channel in the initialization configuration information.
[0083] The resource update configuration unit 150 is used to update the configuration of the resources allocated to each of the service line channels according to the basic resources of the non-target channels and the system optimization resources corresponding to the target channels.
[0084] The server resource intelligent allocation device provided in the embodiment of the present invention applies the above-mentioned server resource intelligent allocation method to allocate initial resources to each business line channel and configure it, obtain the target channel corresponding to the current traffic scenario of the business processing request according to the dynamic adjustment rules and determine the basic resources of the non-target channel, further allocate system optimization resources to each target channel according to the basic resources and initialization configuration information, and update the configuration of the resources allocated to each business line channel according to the basic resources and system optimization resources. The above-mentioned server resource intelligent allocation method can determine the corresponding target channel according to different traffic scenarios, and allocate resources to the business line channel according to the channel coefficient in the initialization configuration information and update the configuration, and can dynamically adjust the system resource configuration according to different traffic scenarios to maximize the utilization of the system resources of the server terminal.
[0085] The server resource intelligent allocation device can be implemented in the form of a computer program. Figure 4 Runs on the computer device shown.
[0086] See also Figure 4 , Figure 4 The computer device provided by the embodiment of the present invention is a schematic block diagram. The computer device may be a terminal device or a server terminal for executing the server resource intelligent allocation method to intelligently allocate system resources of the server terminal.
[0087] See also Figure 4 The computer device 500 includes a processor 502 , a memory and a communication interface 505 connected via a communication bus 501 , wherein the memory may include a storage medium 503 and an internal memory 504 .
[0088] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 may execute a method for intelligently allocating server resources, wherein the storage medium 503 may be a volatile storage medium or a non-volatile storage medium.
[0089] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0090] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute the server resource intelligent allocation method.
[0091] The communication interface 505 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will appreciate that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device 500 to which the solution of the present invention is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0092] The processor 502 is used to run the computer program 5032 stored in the memory to implement the corresponding functions in the above-mentioned server resource intelligent allocation method.
[0093] Those skilled in the art will understand that Figure 4 The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Figure 4 The embodiments shown are consistent and will not be described again here.
[0094] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0095] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps included in the above-mentioned server resource intelligent allocation method are implemented.
[0096] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0097] In the several embodiments provided by the present invention, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. Units with the same function may also be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.
[0098] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0099] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0100] If 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 the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer-readable storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned computer-readable storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk or an optical disk.
[0101] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for intelligent allocation of server resources, characterized in that: The method comprises: Allocate corresponding initial resources to each service line channel and configure them according to the preset initialization configuration information; If a service processing request is received, determine the traffic scenario corresponding to the current service processed by the server according to the service processing request, and obtain the target channel corresponding to the current traffic scenario of the service processing request according to the dynamic adjustment rule; the target channel is the service line channel that needs to be tilted when allocating resources; Determine basic resources of non-target channels according to the target channels; the non-target channels are other business line channels except the target channels; Allocate corresponding system optimization resources to each target channel according to the basic resources of the non-target channels and the channel coefficients of each target channel in the initialization configuration information; The resources allocated to each of the business line channels are updated and configured according to the basic resources of the non-target channels and the system optimization resources corresponding to the target channels.
2. The method for intelligent allocation of server resources according to claim 1, characterized in that: The allocating corresponding initial resources to each service line channel and configuring them according to the preset initialization configuration information includes: Get the total amount of available resources of at least one resource type; Calculate the allocation ratio corresponding to each service line channel according to the channel coefficient corresponding to the service line channel in the initialization configuration information; The total amount of available resources of each resource type is allocated according to the allocation ratio to determine and configure the initial resources of each service line channel.
3. The method for intelligent allocation of server resources according to claim 1 or 2, characterized in that: The determining, according to the service processing request, a traffic scenario corresponding to the server processing the current service, and acquiring, according to a dynamic adjustment rule, a target channel corresponding to the current traffic scenario of the service processing request, includes: Acquire the scenario strategy corresponding to the dynamic adjustment rule according to the current traffic scenario; According to the business flow nodes included in the scenario strategy, a business line channel matching the business flow nodes is screened out as the corresponding target channel.
4. The method for intelligent allocation of server resources according to claim 3, characterized in that: The determining of the basic resources of the non-target channel according to the target channel includes: Acquire other service line channels except the target channel from the service line channels as non-target channels; The basic resource of each non-target channel is determined according to the minimum resource quota corresponding to each resource type.
5. The method for intelligent allocation of server resources according to claim 1 or 2, characterized in that: The allocating corresponding system optimization resources to each target channel according to the basic resources of the non-target channels and the channel coefficients of each target channel in the initialization configuration information includes: Calculate the allocated resource amount of each resource type according to the basic resources of each non-target channel; Determine the unallocated resource amount of each resource type based on the total available resources of each resource type and the corresponding allocated resource amount; Calculate the optimized allocation ratio corresponding to each target channel according to the channel coefficient corresponding to the target channel in the initialization configuration information; The unallocated resource amount of each resource type is allocated respectively according to the optimized allocation ratio to determine the system optimized resources of each service line channel.
6. The method for intelligent allocation of server resources according to claim 1, characterized in that: The method further comprises: Perform periodic monitoring of the resource consumption ratio of each business line channel according to the preset monitoring cycle; Determine whether the resource consumption ratio of the service line channel meets the preset resource allocation conditions; If the resource allocation condition is met, the service line channel without idle channel resources is determined as the target channel and the process returns to the step of determining basic resources of non-target channels according to the target channel.
7. The method for intelligent allocation of server resources according to claim 1, characterized in that: After updating and configuring the resources allocated to each of the service line channels according to the basic resources of the non-target channels and the system optimization resources corresponding to the target channels, the method further includes: Determine whether all business flows corresponding to the current flow scenario have been processed; If the business traffic corresponding to the current traffic scenario has been processed, the corresponding initial resources are allocated to each business line channel according to the initialization configuration information and configured again.
8. A server resource intelligent allocation device, characterized in that: The device is used to execute the server resource intelligent allocation method according to any one of claims 1 to 7, and the device includes: An initial resource configuration unit, used to allocate corresponding initial resources to each service line channel and configure them according to preset initialization configuration information; A target channel acquisition unit is used to determine the traffic scenario corresponding to the server processing the current business according to the business processing request if a business processing request is received, and acquire the target channel corresponding to the current traffic scenario of the business processing request according to the dynamic adjustment rule; the target channel is the business line channel that needs to be tilted when allocating resources; A basic resource determination unit, configured to determine basic resources of non-target channels according to the target channel; the non-target channels are other service line channels except the target channel; A system optimization resource acquisition unit, used to allocate corresponding system optimization resources to each target channel according to the basic resources of the non-target channels and the channel coefficients of each target channel in the initialization configuration information; The resource update configuration unit is used to update the configuration of the resources allocated to each of the service line channels according to the basic resources of the non-target channels and the system optimization resources corresponding to the target channels.
9. A computer device, characterized in that: The device includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor is used to implement the steps of the server resource intelligent allocation method described in any one of claims 1-7 when executing the program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for intelligent allocation of server resources as described in any one of claims 1 to 7 are implemented.
