Resource processing method of server and electronic equipment
By combining the resource usage information, business attribute information and resource usage weight information at the current moment, the resource processing indication information of the target server is determined, and the problem of insufficient accuracy of resource adjustment caused by relying on thresholds in the prior art is solved, and the precise processing of server resources and early expansion or reduction of capacity is achieved.
Patent Information
- Application Number
- CN202411941328.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-22
AI Technical Summary
When dynamically adjusting server resources, the prior art relies heavily on set usage thresholds and cannot effectively adapt to complex and changeable business scenarios, resulting in poor accuracy of resource expansion or reduction.
By obtaining the usage information of various resources of the target server at the current moment, combining the business attribute information and resource usage weight information, the relevant usage information of the resource is determined, and then resource processing instructions are generated to achieve accurate expansion or reduction of server resources.
It realizes the precise processing of server resources, can expand or reduce capacity in advance, adapt to complex and changeable business scenarios, and improves the accuracy of the judgment results of resource expansion or reduction.
Smart Images

Figure CN119862036A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a resource processing method of a server and an electronic device. Background Art
[0002] Dynamic adjustment of server resources refers to the process of increasing or decreasing server resources in real time or near real time based on application load, user demand or business changes. Through dynamic adjustment, the performance and responsiveness of the application can be ensured not to be affected.
[0003] In the prior art, it is usually implemented based on a usage threshold set for server resources. When it is determined that the server resource usage exceeds the usage threshold, the resources are expanded, and when the server resource usage is lower than the usage threshold, the resources can be appropriately reduced.
[0004] However, the above method is heavily dependent on the set usage threshold and cannot effectively adapt to complex and changing business scenarios, resulting in poor accuracy in resource expansion or reduction. Summary of the invention
[0005] The purpose of the present application is to provide a server resource processing method and electronic device to address the deficiencies in the above-mentioned prior art, so as to facilitate accurate processing of server resources and enable early expansion or reduction of capacity.
[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides a resource processing method of a server, comprising:
[0008] Get the usage information of various resources of the target server at the current moment;
[0009] Determine relevant usage information of each resource according to usage information of each resource at the current moment, business attribute information and resource usage weight information of the target server, wherein the relevant usage information is used to indicate resource usage of the resource before the current moment, at the current moment or after the current moment;
[0010] Determine resource processing instruction information of the target server at the current moment according to the relevant usage information of each resource, wherein the resource processing instruction information is used to indicate expansion or reduction of each resource;
[0011] According to the resource processing indication information of the target server at the current moment, various resources of the target server are expanded or reduced.
[0012] Optionally, determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the service attribute information and the resource usage weight information of the target server includes:
[0013] Determining whether the target server has a business demand within a preset time according to the business attribute information;
[0014] If there is no business demand, then determine the relevant usage information of each resource according to the usage information of each resource at the current moment, the first weight information of the target server at the current moment, and the first weight information of the target server at the next moment of the current moment; or determine the relevant usage information of each resource according to the usage information of each resource at the next moment described in the historical date;
[0015] If there is a business demand, the relevant usage information of the various resources is determined based on the usage information of the various resources at the current moment, the actual resource usage weight information of the target server at the current moment, the target first weight information of the target server, the target second weight information of the target server and the business weight ratio information; the target first weight information is the first weight information of the target server at the business online time indicated by the business demand in the historical date; the target second weight is the second weight information of the target server under the business type indicated by the business demand.
[0016] Optionally, determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the first weight information of the target server at the current moment, and the first weight information of the target server at a moment next to the current moment includes:
[0017] Determine estimated usage information of the target resource at a next moment according to usage information of the target resource at a current moment, first weight information of the target server at a current moment, and first weight information of the target server at a next moment;
[0018] The estimated usage information of the target resource at the next moment is used as the relevant usage information of the target resource.
[0019] Optionally, determining the relevant usage information of each resource according to the usage information of each resource at the next moment in the historical date includes:
[0020] The usage information of the target resource at the next moment in the historical date is used as the relevant usage information of the target resource; the historical date is one of the following: the day before the current moment, the week before the current moment, the month before the current moment, or the year before the current moment.
[0021] Optionally, it also includes:
[0022] If there is no business demand, the usage information of each resource at the current moment is used as the relevant usage information of each resource.
[0023] Optionally, determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the actual resource usage weight information of the target server at the current moment, the target first weight information of the target server, the target second weight information of the target server, and the business weight ratio information includes:
[0024] Determine the usage ratio information of the target resource according to the usage information of the target resource at the current moment and the actual resource usage weight information of the target server at the current moment;
[0025] Determine the actual resource usage weight information of the target server at the time when the service goes online according to the target first weight information of the target server, the target second weight information of the target server and the service weight ratio information;
[0026] Determine estimated usage information of the target resource at the time when the service goes online according to the actual resource usage weight information of the target server and the usage ratio information of the target resource at the time when the service demand goes online;
[0027] The estimated usage information of the target resource at the time when the service goes online is used as the relevant usage information of the target resource.
[0028] Optionally, before determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the actual resource usage weight information of the target server at the current moment, the target first weight information of the target server, the target second weight information of the target server and the business weight proportion information, the method further includes:
[0029] Determine the time and type of service launch based on business requirements;
[0030] Determine, according to the service online time, the first weight information of the service online time of the target server in the historical date, and use the first weight information of the service online time of the target server in the historical date as the target first weight information of the target server;
[0031] According to the business type, second weight information of the target server under the business type is determined, and the second weight information of the target server under the business type is used as the target second weight information of the target server.
[0032] Optionally, the related usage information of each resource determines the resource processing indication information of the target server at the current moment, including:
[0033] If the relevant usage information of the target resource is greater than the preset usage upper limit, determining the resource processing instruction information of the target server at the current moment includes: expanding the capacity of the target resource;
[0034] If the relevant usage information of the target resource is less than the preset usage lower limit, determining the resource processing instruction information of the target server at the current moment includes: reducing the capacity of the target resource.
[0035] Optionally, before determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the service attribute information and the resource usage weight information of the target server, the method further includes:
[0036] Generate first weight information of the target server at each time according to the application type of the target server and the time unit;
[0037] According to the business type, second weight information of the target server under each business type is generated.
[0038] In a second aspect, an embodiment of the present application further provides a resource processing device of a server, including: an acquisition module, a determination module, and a processing module;
[0039] The acquisition module is used to obtain the usage information of various resources of the target server at the current moment;
[0040] The determination module is used to determine the relevant usage information of each resource according to the usage information of each resource at the current moment, the service attribute information and the resource usage weight information of the target server, wherein the relevant usage information is used to indicate the resource usage of the resource before the current moment, at the current moment or after the current moment;
[0041] The determination module is used to determine resource processing instruction information of the target server at the current moment according to the relevant usage information of each resource, and the resource processing instruction information is used to indicate expansion or reduction of each resource;
[0042] The processing module is used to expand or reduce the capacity of various resources of the target server according to the resource processing indication information of the target server at the current moment.
[0043] Optionally, the determination module is specifically configured to determine whether the target server has a business demand within a preset time according to the business attribute information;
[0044] If there is no business demand, then determine the relevant usage information of each resource according to the usage information of each resource at the current moment, the first weight information of the target server at the current moment, and the first weight information of the target server at the next moment of the current moment; or determine the relevant usage information of each resource according to the usage information of each resource at the next moment described in the historical date;
[0045] If there is a business demand, the relevant usage information of the various resources is determined based on the usage information of the various resources at the current moment, the actual resource usage weight information of the target server at the current moment, the target first weight information of the target server, the target second weight information of the target server and the business weight ratio information; the target first weight information is the first weight information of the target server at the business online time indicated by the business demand in the historical date; the target second weight is the second weight information of the target server under the business type indicated by the business demand.
[0046] Optionally, the determination module is specifically used to determine the estimated usage information of the target resource at the next moment according to the usage information of the target resource at the current moment, the first weight information of the target server at the current moment, and the first weight information of the target server at the next moment;
[0047] The estimated usage information of the target resource at the next moment is used as the relevant usage information of the target resource.
[0048] Optionally, the determination module is specifically used to use the usage information of the target resource at the next moment in the historical date as the relevant usage information of the target resource; the historical date is one of the following: the day before the current moment, the week before the current moment, the month before the current moment, or the year before the current moment.
[0049] Optionally, the determination module is further configured to use the usage information of each resource at the current moment as the relevant usage information of each resource if there is no business demand.
[0050] Optionally, the determination module is specifically used to determine the usage ratio information of the target resource according to the usage information of the target resource at the current moment and the actual resource usage weight information of the target server at the current moment;
[0051] Determine the actual resource usage weight information of the target server at the time when the service goes online according to the target first weight information of the target server, the target second weight information of the target server and the service weight ratio information;
[0052] Determine estimated usage information of the target resource at the time when the service goes online according to the actual resource usage weight information of the target server and the usage ratio information of the target resource at the time when the service demand goes online;
[0053] The estimated usage information of the target resource at the time when the service goes online is used as the relevant usage information of the target resource.
[0054] Optionally, the determination module is further used to determine the service launch time and service type according to the service requirements;
[0055] Determine, according to the service online time, the first weight information of the service online time of the target server in the historical date, and use the first weight information of the service online time of the target server in the historical date as the target first weight information of the target server;
[0056] According to the business type, second weight information of the target server under the business type is determined, and the second weight information of the target server under the business type is used as the target second weight information of the target server.
[0057] Optionally, the determining module is specifically configured to determine the resource processing indication information of the target server at the current moment if the relevant usage information of the target resource is greater than a preset usage upper limit, including: expanding the capacity of the target resource;
[0058] If the relevant usage information of the target resource is less than the preset usage lower limit, determining the resource processing instruction information of the target server at the current moment includes: reducing the capacity of the target resource.
[0059] Optionally, it also includes: a generation module;
[0060] The generating module is used to generate the first weight information of the target server at each time according to the application type of the target server and the time unit;
[0061] According to the business type, second weight information of the target server under each business type is generated.
[0062] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to implement the resource processing method of the server provided in the first aspect.
[0063] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the resource processing method of the server provided in the first aspect is executed.
[0064] The beneficial effects of this application are:
[0065] The present application provides a resource processing method and electronic device for a server, including: obtaining usage information of various resources of a target server at the current moment; determining relevant usage information of various resources according to usage information of various resources at the current moment, business attribute information and resource usage weight information of the target server; determining resource processing indication information of the target server at the current moment according to relevant usage information of various resources; and expanding or reducing the capacity of various resources of the target server according to the resource processing indication information of the target server at the current moment. This scheme combines the resource usage information, business attribute information and resource usage weight information allocated to the server at the current moment to conduct a comprehensive analysis to accurately estimate the resource usage information at future moments, so that the resource can be expanded or reduced in advance according to the estimated resource usage information at future moments. In addition, the judgment of resource expansion or reduction no longer depends solely on the threshold, but can be more reasonably and accurately estimated according to the business scenario or the weight information of the server, which can adapt to complex and changeable application scenarios and improve the accuracy of the judgment result of resource expansion or reduction. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0067] Figure 1 A schematic diagram of the architecture of a resource processing system of a server provided in an embodiment of the present application;
[0068] Figure 2 A schematic diagram of a flow chart of a resource processing method of a server provided in an embodiment of the present application;
[0069] Figure 3 A flowchart of another server resource processing method provided in an embodiment of the present application;
[0070] Figure 4 A flowchart of another method for processing resources of a server provided in an embodiment of the present application;
[0071] Figure 5A flowchart of another server resource processing method provided in an embodiment of the present application;
[0072] Figure 6 A flowchart of another method for processing resources of a server provided in an embodiment of the present application;
[0073] Figure 7 A flowchart of another server resource processing method provided in an embodiment of the present application;
[0074] Figure 8 A schematic diagram of a resource processing device of a server provided in an embodiment of the present application;
[0075] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0076] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0077] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0078] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0079] Currently, the methods that have been implemented to dynamically adjust server resources are roughly as follows:
[0080] 1. Set corresponding scaling rules based on server indicator thresholds. These rules are usually set based on server performance indicators (such as CPU utilization, memory usage, network bandwidth, etc.). For example, set the CPU utilization threshold to 80%. When the CPU utilization exceeds the set threshold, the system automatically adds new server instances; when the CPU utilization is lower than the set threshold, the instance is reduced.
[0081] 2. Elastic scaling based on load balancing. Through this technology, traffic can be automatically distributed to multiple server instances to ensure high availability of the application. For example, LVS (load) + nginx instance. For every additional 5,000 client connections, an nginx is automatically added to the backend. This can smooth the overall server resources.
[0082] 3. Elastic scaling based on containerization technology can package applications and their dependencies into an independent operating environment, thereby achieving rapid deployment, expansion, and uninstallation. Cloud platforms such as Huawei Cloud provide container-based elastic scaling solutions, which realize dynamic allocation and dynamic scaling of cloud server resources through container orchestration technology (such as Kubernetes).
[0083] However, in general, existing technologies mainly rely on threshold implementation, and for changeable and complex business scenarios, elastic scaling is relatively lagging, and it is difficult to achieve early expansion and reduction of capacity.
[0084] Based on this, this solution provides a server resource processing method, which combines the resource usage information, business attribute information, and the business weight and unit time weight assigned to the server at the current moment, and realizes accurate expansion or reduction of server resources through step-by-step analysis and judgment. At the same time, combined with the estimated information at future moments, it realizes early expansion or reduction, overcoming the problem of processing delays.
[0085] Figure 1 A schematic diagram of the architecture of a resource processing system of a server provided in an embodiment of the present application, such as Figure 1 As shown, the system may include multiple terminal access servers, a log collection service cluster and a processing server. Users access and use applications through the terminal access servers. The log server cluster includes multiple collection servers for collecting and storing resource usage information reported by each terminal access server. The processor server is used to obtain the resource usage information of the specified terminal access server from the collection server, and through the method provided by this solution, expand or reduce the capacity of the specified terminal access server at the appropriate time.
[0086] Normally, each terminal access server can report the usage information of various resources to the collection server every hour. When an abnormal situation occurs three times in a row with an interval of 2 seconds between each report, it is assumed that the terminal access server connection is abnormal. The terminal access server can be marked as abnormal first. After that, the terminal access server can be checked for abnormalities to determine whether the terminal access server has hardware damage or network connection abnormalities. If it is a network connection abnormality, after the network is repaired, the usage information of various resources continues to be reported to the collection server every hour.
[0087] Of course, in some implementations, the system may not include a processing server. The collection server not only collects resource usage information of the terminal access server, but also executes the method according to the resource usage information of the terminal access server to expand or reduce the resource capacity of the terminal access server.
[0088] Figure 2 A schematic diagram of a resource processing method of a server provided in an embodiment of the present application; Figure 2 As shown, the method may include:
[0089] S101, obtaining usage information of various resources of the target server at the current moment.
[0090] The target server can be any terminal access server, and the usage information of various resources of the target server at the current moment can be obtained from the log collection service cluster. The various resources here can include but are not limited to: CPU (Central Processing Unit), memory, disk, bandwidth, etc. Resource usage information can refer to the usage of resources, for example: 80G of memory is used, etc.
[0091] S102: Determine relevant usage information of each resource according to usage information of each resource at the current moment, business attribute information, and resource usage weight information of the target server.
[0092] The related usage information is used to indicate the resource usage before the current moment, at the current moment, or after the current moment.
[0093] The service attribute information is used to indicate whether a service is online, and if a service is online, it also indicates the service online time and service type.
[0094] In this embodiment, the resource usage weight information of the target server mainly includes two kinds of weight information, one is the weight information allocated according to the time unit, and the other is the weight information allocated according to the service type.
[0095] Different servers have different busyness at different times depending on the applications they execute, so the resource usage weights at different times can be set differently. When the server is busy, the corresponding time unit weight information can be set larger, and when the server is idle, the corresponding time unit weight information can be set smaller.
[0096] Different business types require different resources. Based on this, the business weight information allocated by the server under different business types may also be different. When there is no business, the business weight information of the server may be set to be smaller.
[0097] In some embodiments, the relevant usage information of each resource can be determined by combining the usage information of each resource at the current moment, the service attribute information, and the resource usage weight information of the target server. The relevant usage information can be the resource usage information of each resource at the current moment, or the resource usage information of the next moment corresponding to the current moment in the historical date, or the resource usage information of the next moment after the current moment or the future service online moment.
[0098] This solution estimates resource usage information for future moments by combining the current resource usage information, business attribute information, and server resource usage weight information, thereby improving the reliability of the estimation results.
[0099] By estimating resource usage information in the future, capacity expansion or reduction can be implemented in advance, overcoming resource shortages caused by information lags.
[0100] S103: Determine resource processing instruction information of the target server at the current moment according to relevant usage information of each resource.
[0101] The resource processing instruction information is used to instruct the expansion or reduction of each resource.
[0102] Optionally, the resource processing indication information of the target server at the current moment may be determined according to the relevant usage information of each resource and the usage threshold information set for each resource.
[0103] The resource processing indication information may indicate the expansion or reduction of each resource. Each resource is expanded or reduced separately, and some resources may be expanded and some may be reduced.
[0104] S104: Expand or reduce the capacity of various resources of the target server according to the resource processing instruction information of the target server at the current moment.
[0105] According to the processing method of each resource indicated in the resource processing instruction information, the resources of the target server can be expanded or reduced accordingly.
[0106] In summary, the resource processing method of the server provided in this embodiment includes: obtaining the usage information of various resources of the target server at the current moment; determining the relevant usage information of various resources according to the usage information of various resources at the current moment, business attribute information and resource usage weight information of the target server; determining the resource processing indication information of the target server at the current moment according to the relevant usage information of various resources; and expanding or reducing the capacity of various resources of the target server according to the resource processing indication information of the target server at the current moment. This scheme combines the resource usage information, business attribute information and resource usage weight information allocated to the server at the current moment to conduct a comprehensive analysis to accurately estimate the resource usage information at future moments, so that the resources can be expanded or reduced in advance according to the estimated resource usage information at future moments. In addition, the judgment of resource expansion or reduction no longer depends solely on the threshold, but can be more reasonably and accurately estimated according to the business scenario or the weight information of the server, which can adapt to complex and changeable application scenarios and improve the accuracy of the judgment results of resource expansion or reduction.
[0107] Figure 3 A flow chart of another server resource processing method provided in an embodiment of the present application; Optionally, in step S102, determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the business attribute information and the resource usage weight information of the target server may include:
[0108] S201. Determine whether a target server has a business demand within a preset time according to business attribute information.
[0109] The preset time can be a future time after the current moment. According to the business attribute information, it can be determined whether the target server has a business demand to go online in the future. Of course, the future time here can be the time of the day when the current moment is located to ensure the real-time nature of the information. When the future moment is many days after the current moment, the information is difficult to be referenced due to the large span between the current moment and the future time.
[0110] For example, assuming that the current time is 8:00 a.m. on October 1, 2024, the preset time can be 8:01 to 24:00 on October 1, 2024.
[0111] When there is no service demand online, the service attribute information directly indicates that there is no service demand online. When there is a service demand online, the service attribute information may indicate that there is a service demand online, and may also indicate what service is online at what time.
[0112] S202. If there is no business demand, determine the relevant usage information of each resource based on the usage information of each resource at the current moment, the first weight information of the target server at the current moment, and the first weight information of the target server at the next moment of the current moment; or determine the relevant usage information of each resource based on the usage information of each resource at the next moment in the historical date.
[0113] When it is determined that there is no business demand, a step-by-step judgment can be performed. First, the resource usage information at the current moment is used as the relevant usage information to determine the resource processing indication information of the target server. If the resource usage information at the current moment is normal, the resource usage information at the next moment after the current moment can be further used as the relevant usage information. Among them, the resource usage information at the next moment can be calculated based on the resource usage information at the current moment and the first weight information of the target server at the current moment and the first weight information of the target server at the next moment. The first weight information may refer to the weight information per unit time, and the first weight information of the target server at different unit times may be different.
[0114] If the resource usage information at the next moment is still normal, the resource usage information at the next moment in the historical date can be used as the relevant usage information.
[0115] For example, the access traffic of a certain video software surges at 7 pm every day, which has formed a certain pattern. Then, the resource usage information at 7 pm yesterday has a certain reference significance for estimating the resource usage information at 7 pm today.
[0116] S203. If there is a business demand, determine the relevant usage information of each resource based on the usage information of each resource at the current moment, the actual resource usage weight information of the target server at the current moment, the target first weight information of the target server, the target second weight information of the target server and the business weight ratio information.
[0117] The target first weight information is the first weight information of the target server at the service online time indicated by the service demand in the historical date; the target second weight is the second weight information of the target server under the service type indicated by the service demand.
[0118] When there is a business demand, it is necessary to combine the business weight information of the business online time indicated by the business demand and the unit time weight information and business weight ratio information of the business online time in the historical date to determine the actual weight information of the business online time, and then combine the usage information of various resources at the current time and the actual resource usage weight information of the target server at the current time to determine the relevant usage information of the resources.
[0119] Figure 4 A flow chart of another method for processing resources of a server provided in an embodiment of the present application; Optionally, in step S202, determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the first weight information of the target server at the current moment, and the first weight information of the target server at the next moment of the current moment may include:
[0120] S301. Determine estimated usage information of the target resource at the next moment according to usage information of the target resource at the current moment, first weight information of the target server at the current moment, and first weight information of the target server at the next moment.
[0121] The target resource may be any one of various resources such as CPU, memory, disk, bandwidth, etc. This embodiment takes memory resources as an example.
[0122] Assuming that the current time is 18:00, the next time is 19:00, the memory usage information at the current time is that the memory used is a, the first weight information of the target server at 18:00 is 5, and the first weight information of the target server at 19:00 is 9. The formula: a / 5*9 can be used to calculate the estimated memory usage at 19:00.
[0123] S302: Use the estimated usage information of the target resource at the next moment as the relevant usage information of the target resource.
[0124] In this case, the calculated memory usage at 19 points may be used as relevant memory usage information.
[0125] The calculation method for several other resources is the same.
[0126] Optionally, in step S202, determining the relevant usage information of each resource according to the usage information of each resource at the current moment in the historical date may include:
[0127] The usage information of the target resource at the next moment in the historical date is used as the relevant usage information of the target resource; the historical date is one of the following: the day before the current moment, the week before the current moment, the month before the current moment, or the year before the current moment.
[0128] In some cases, assuming that the current time is 18:00 and the next time after the current time is 19:00, then the memory usage information at 19:00 in the historical date can be used as the relevant memory usage information.
[0129] The historical date may be yesterday, last week, last month or last year. When the expansion condition is satisfied based on the resource usage information at 19:00 yesterday, the resource usage information at 19:00 last day (the same day means the same day as the current time) will no longer be obtained. If the expansion condition is not satisfied based on the resource usage information at 19:00 yesterday, the resource usage information at 19:00 last day will be used. By analogy, if the resource usage information at 19:00 last day satisfies the expansion condition, the resource usage information at 19:00 last day will not be obtained. In other words, the historical date is a date determined from yesterday, last week, last month or last year in sequence according to its proximity to the current time, rather than yesterday, last week, last month or last year as the historical date at the same time.
[0130] Since the historical date is a period that has already passed, the resource usage information can be directly extracted from the collection server.
[0131] Optionally, the method may further include: if there is no business demand, using the usage information of each resource at the current moment as the relevant usage information of each resource.
[0132] In one implementation, when there is no business demand, the usage information of various resources at the current moment can be first used as the relevant usage information of various resources, that is, the resource usage information at the current moment is preferentially used to determine whether to expand or shrink the capacity at present. When the conditions for expansion or shrinkage are not met at the current moment, the resource information at future moments is estimated to perform expansion or shrinkage in advance.
[0133] Next, we will use a specific example to illustrate the overall process when there is no business demand:
[0134] Taking memory resources as an example, when there is no business demand, you can first obtain the current memory usage to determine whether the current memory usage exceeds the upper limit of the memory usage threshold. If it exceeds, it is determined that the memory of the target server needs to be expanded at the current moment.
[0135] If the memory usage at the current moment does not exceed the upper limit of the memory usage threshold, the estimated memory usage at the next moment is determined based on the memory usage at the current moment, the first weight information of the target server at the current moment, and the first weight information of the target server at the next moment. If the estimated memory usage at the next moment exceeds the upper limit of the memory usage threshold, it is determined that the memory of the target server needs to be expanded at the current moment to achieve early expansion.
[0136] If the estimated memory usage at the next moment does not exceed the upper limit of the memory usage threshold, the memory usage at the next moment of yesterday is determined. If the memory usage at the next moment of yesterday exceeds the upper limit of the memory usage threshold, it is determined that the memory of the target server needs to be expanded at the current moment; if the memory usage at the next moment of yesterday does not exceed the upper limit of the memory usage threshold, the memory usage at the next moment of the same day last week is determined. If the memory usage at the next moment of the same day last week exceeds the upper limit of the memory usage threshold, it is determined that the memory of the target server needs to be expanded at the current moment, and the determination ends; if the memory usage at the next moment of the same day last week does not exceed the upper limit of the memory usage threshold, the memory usage at the next moment of the same day last month is determined. The memory usage at the next moment of the day is determined. If the memory usage at the next moment of the same day of the previous month exceeds the upper limit of the memory usage threshold, it is determined that the memory of the target server needs to be expanded at the current moment, and the judgment is terminated; if the memory usage at the next moment of the same day of the previous month does not exceed the upper limit of the memory usage threshold, the memory usage at the next moment of the same day last year is determined. If the memory usage at the next moment of the same day last year exceeds the upper limit of the memory usage threshold, it is determined that the memory of the target server needs to be expanded at the current moment, and the judgment is terminated; if the memory usage at the next moment of the same day last year does not exceed the upper limit of the memory usage threshold, the judgment is also terminated, and the memory resources of the target server are not expanded.
[0137] It is worth noting that, assuming that the next moment here is 19:00 on Friday, October 1, 2024, then the next moment yesterday refers to 19:00 yesterday, the next moment on the same day last week refers to 19:00 last Friday, the next moment on the same day last month refers to 19:00 on September 1, 2024, and the next moment on the same day last year refers to 19:00 on October 1, 2023.
[0138] Of course, these are just some examples. In actual applications, the historical date and the next moment can be selected within a small range.
[0139] Figure 5 A flow chart of another resource processing method of a server provided in an embodiment of the present application; Optionally, in step S203, the relevant usage information of each resource is determined according to the usage information of each resource at the current moment, the actual resource usage weight information of the target server at the current moment, the target first weight information of the target server, the target second weight information of the target server, and the business weight ratio information, which may include:
[0140] S501. Determine usage ratio information of the target resource according to usage information of the target resource at the current moment and actual resource usage weight information of the target server at the current moment.
[0141] In the case of business demands, the resource usage information needs to be calculated in combination with the second weight information, namely the business weight information.
[0142] Here, memory is still used as an example of a target resource. First, the memory usage ratio can be determined according to the memory usage information at the current moment and the actual resource usage weight information of the target server at the current moment.
[0143] Among them, the actual resource usage weight information is determined based on the allocated first weight information, the second weight information and the proportion of business weight. Instead of directly using the allocated first weight information or the second weight information, this is because in scenarios with business demands, the ratio between the business weight and the unit time weight will be set according to the specific scenarios, so as to calculate the actual comprehensive weight based on the weight ratio. And in scenarios with business demands, the proportion of business weight information, that is, the second weight information, is usually higher than the unit time weight, that is, higher than the first weight information.
[0144] S502: Determine actual resource usage weight information of the target server at the time of service launch according to the target first weight information of the target server, the target second weight information of the target server, and the service weight ratio information.
[0145] Then, based on the business weight ratio, as well as the target first weight information and target second weight information of the target server, the actual resource usage weight information of the target server at the time of business launch can be determined first. This actual resource usage weight information is a combination of the comprehensive weight between the first weight information and the second weight information.
[0146] It is worth noting that in step S501, the calculation method of the actual resource usage weight information of the target server at the current moment is the same as the principle of the actual resource usage weight information of the target server at the time of business launch, except that the target first weight information and target second weight information used in determining the actual resource usage weight information of the target server at the current moment are related to the current moment.
[0147] S503: Determine estimated usage information of the target resource at the time when the service goes online according to the actual resource usage weight information of the target server and the usage ratio information of the target resource at the time when the service demand goes online.
[0148] Based on the actual resource usage weight information and memory usage ratio of the target server at the time when the business demand goes online, the estimated usage information of the target resources at the time when the business goes online can be determined.
[0149] It is worth noting that the determination of the target resource usage ratio information can be obtained by comparing the target resource usage information at any time before the business demand goes online with the actual resource usage weight information of the target server at any time, that is, the any time can be the current time or other time. However, whether it is the current time or other time, the determined target resource usage ratio information is the same.
[0150] S504: Use the estimated usage information of the target resource at the time of service launch as the relevant usage information of the target resource.
[0151] In this scenario, the estimated usage information of the target resource at the time of service launch can be used as the relevant usage information of the target resource. Therefore, it can be determined whether to expand the capacity of the target server in advance to cope with the surge in resource usage caused by the upcoming service launch.
[0152] Figure 6 A flow chart of another resource processing method of a server provided in an embodiment of the present application; optionally, in step S203, before determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the actual resource usage weight information of the target server at the current moment, the target first weight information of the target server, the target second weight information of the target server, and the business weight ratio information, the method may further include:
[0153] S601. Determine the service launch time and service type according to the service requirements.
[0154] The business demand may include two types of information: the time when the business goes online and the type of business. For example, assuming that the current time is 15:00 on October 1, 2024, the business demand may be: at 20:00 on October 1, 2024, business a will go online on the target server. Based on the business demand, the time when the business goes online can be determined to be 20:00 on October 1, 2024, and the business type can also be determined based on business a.
[0155] S602: Determine the first weight information of the target server's business online time in a historical date according to the business online time, and use the first weight information of the target server's business online time in a historical date as the target first weight information of the target server.
[0156] The historical date here may be yesterday, or of course last week, last month, etc. Taking yesterday as an example, the first weight information of the target server at 20:00 on September 30, 2024 may be used as the target first weight information of the target server.
[0157] S603: Determine the second weight information of the target server under the business type according to the business type, and use the second weight information of the target server under the business type as the target second weight information of the target server.
[0158] According to the service type, the second weight information of the target server under service a may be directly used as the target second weight information of the target server.
[0159] The following is a specific example to illustrate the process of handling business demands:
[0160] Taking memory resources as an example, assuming that there is a business demand, the business weight ratio is 3 / 4, and the specific business weight ratio can be adjusted according to the scenario. At 20:00 today, business a will be launched on the target server. At 20:00 yesterday, the first weight information of the target server was 4, and the second weight information of the target server under business a was 8. It can be determined that the first target weight information of the target server is 4, and the second target weight information is 8. Therefore, the following formula can be used: current memory usage information / actual resource usage weight information of the target server at the current time)*(4*1 / 4+8*3 / 4) to calculate the estimated memory usage information of the target server at 21:00 today.
[0161] Optionally, the estimated usage information of the target resource at the time of service launch calculated may be compared with the upper limit of the memory usage threshold. If the upper limit of the memory usage threshold is exceeded, the resource processing indication information of the target server is determined to be the need to expand the memory.
[0162] Optionally, in step S103, determining the resource processing indication information of the target server at the current moment based on the relevant usage information of each resource may include: if the relevant usage information of the target resource is greater than the preset usage upper limit, determining the resource processing indication information of the target server at the current moment includes: expanding the capacity of the target resource.
[0163] In the above embodiment, the resource expansion is described in detail by taking the determined indication information as the resource expansion. In actual application, when the determined resource usage information exceeds the preset resource usage upper limit, the resource needs to be expanded.
[0164] If the relevant usage information of the target resource is less than the preset usage lower limit, determining the resource processing instruction information of the target server at the current moment includes: reducing the capacity of the target resource.
[0165] When the determined resource usage information does not exceed the upper limit of resource usage, it may be less than the preset lower limit of resource usage. In this case, the resources can be scaled down to reduce idle resources and release more resources to expand other scarce resources.
[0166] The preset upper usage limit and the preset lower usage limit corresponding to each resource may be different and are set according to the specific situation of each resource.
[0167] Taking memory as an example, when the relevant usage information of the memory is lower than 50% of the total memory, the memory can be reduced in capacity, and when the relevant usage information of the memory is higher than 90% of the total memory, the memory can be expanded in capacity.
[0168] In some embodiments, the present solution also provides a specific expansion strategy. When expanding resources, the resources can be expanded by 1 / 4 of the current usage each time. If the resources are still insufficient after the expansion, the expansion will continue to be recursively expanded in this way to avoid wasting resources caused by a large amount of expansion at one time.
[0169] Similarly, when scaling down resources, you can also scale down resources by 1 / 4 of the current usage each time, and scale down recursively.
[0170] For example, assuming that 40 is currently used, then when expanding for the first time, you can expand 1 / 4 of 40, that is, expand 10, and the total memory after expansion is 50. If the memory is still not enough at this time, continue to expand 1 / 4 of 50, that is, expand 12.5, and the total memory after expansion is 62.5.
[0171] Figure 7 A flow chart of another server resource processing method provided in an embodiment of the present application; optionally, in step S102, before determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the business attribute information and the resource usage weight information of the target server, it also includes:
[0172] S701. Generate first weight information of the target server at each time according to the application type of the target server and the time unit.
[0173] In some embodiments, the busyness or idleness of the target server at each time may be determined according to the application type of the target server, thereby generating first weight information of the target server at each time according to the busyness or idleness.
[0174] For example, a server for video processing is usually idle from 0:00 to 5:00 a.m., so the first weight information for 0:00 to 5:00 a.m. can be set to 1. The server is usually at its peak from 19:00 to 22:00 p.m., so the first weight information for 19:00 to 22:00 can be set to 8.
[0175] For servers that perform offline T+1 data warehouse tasks (need to process the previous day's data in the early morning), the server is in peak hours from 0:00 to 5:00 at night, and the first weight information from 0:00 to 5:00 can be set to 9. If the server is idle during the day, the first weight information from 13:00 to 18:00 can be set to 1.
[0176] The first weight information can be set between 1-10.
[0177] In some cases, if the server is in a resource reuse situation, the first weight setting rules of the server under different task types can be integrated to perform weight complementation.
[0178] For example, if the server is used for both video processing and offline T+1 data warehouse tasks, the server is active both during the day and at night. In this case, the first weight information of the server's active moments during the day and at night can be set larger.
[0179] S702: Generate second weight information of the target server under each business type according to the business type.
[0180] Different business types have different resource usage. For business types with larger resource usage, the second weight information that can be set is larger.
[0181] For example, during sports competitions, there is a surge in user activation and a surge in user video playback rates. For sports competitions, the second weight information of the server can be set to 9. If there is no business demand, the second weight information can be set to 1.
[0182] Of course, the specific configuration of the first weight information and the second weight information can be flexibly adjusted according to the actual situation of the business or the server.
[0183] In summary, the resource processing method of the server provided in this embodiment includes: obtaining the usage information of various resources of the target server at the current moment; determining the relevant usage information of various resources according to the usage information of various resources at the current moment, business attribute information and resource usage weight information of the target server; determining the resource processing indication information of the target server at the current moment according to the relevant usage information of various resources; and expanding or reducing the capacity of various resources of the target server according to the resource processing indication information of the target server at the current moment. This scheme combines the resource usage information, business attribute information and resource usage weight information allocated to the server at the current moment to conduct a comprehensive analysis to accurately estimate the resource usage information at future moments, so that the resources can be expanded or reduced in advance according to the estimated resource usage information at future moments. In addition, the judgment of resource expansion or reduction no longer depends solely on the threshold, but can be more reasonably and accurately estimated according to the business scenario or the weight information of the server, which can adapt to complex and changeable application scenarios and improve the accuracy of the judgment results of resource expansion or reduction.
[0184] The following describes the apparatus, device, storage medium, etc. used to execute the resource processing method of the server provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.
[0185] Figure 8 A schematic diagram of a resource processing device of a server provided in an embodiment of the present application, the functions implemented by the resource processing device of the server correspond to the steps performed by the above method. The device can be understood as the above server, or the processor of the server, or can be understood as a component independent of the above server or processor that implements the functions of the present application under the control of the server, such as Figure 8 As shown, the device may include: an acquisition module 100, a determination module 200, and a processing module 300;
[0186] The acquisition module 100 is used to obtain the usage information of various resources of the target server at the current moment;
[0187] The determination module 200 is used to determine the relevant usage information of each resource according to the usage information of each resource at the current moment, the service attribute information and the resource usage weight information of the target server, wherein the relevant usage information is used to indicate the resource usage before the current moment, at the current moment or after the current moment;
[0188] The determination module 200 is used to determine the resource processing indication information of the target server at the current moment according to the relevant usage information of each resource, and the resource processing indication information is used to indicate the expansion or reduction of each resource;
[0189] The processing module 300 is used to expand or reduce the capacity of various resources of the target server according to the resource processing indication information of the target server at the current moment.
[0190] Optionally, the determination module 200 is specifically used to determine whether the target server has a business demand within a preset time according to the business attribute information;
[0191] If there is no business demand, then determine the relevant usage information of each resource based on the usage information of each resource at the current moment, the first weight information of the target server at the current moment, and the first weight information of the target server at the next moment of the current moment; or determine the relevant usage information of each resource based on the usage information of each resource at the next moment in the historical date;
[0192] If there is a business demand, the relevant usage information of each resource is determined based on the usage information of each resource at the current moment, the actual resource usage weight information of the target server at the current moment, the target first weight information of the target server, the target second weight information of the target server and the business weight ratio information; the target first weight information is the first weight information of the target server at the business online time indicated by the business demand in the historical date; the target second weight is the second weight information of the target server under the business type indicated by the business demand.
[0193] Optionally, the determination module 200 is specifically used to determine the estimated usage information of the target resource at the next moment according to the usage information of the target resource at the current moment, the first weight information of the target server at the current moment, and the first weight information of the target server at the next moment;
[0194] The estimated usage information of the target resource at the next moment is used as the relevant usage information of the target resource.
[0195] Optionally, the determination module 200 is specifically used to use the usage information of the target resource at the next moment in the historical date as the relevant usage information of the target resource; the historical date is one of the following: the day before the current moment, the week before the current moment, the month before the current moment, or the year before the current moment.
[0196] Optionally, the determination module 200 is further configured to use the usage information of each resource at the current moment as the relevant usage information of each resource if there is no business demand.
[0197] Optionally, the determination module 200 is specifically used to determine the usage ratio information of the target resource according to the usage information of the target resource at the current moment and the actual resource usage weight information of the target server at the current moment;
[0198] Determine the actual resource usage weight information of the target server at the time of service launch according to the target first weight information of the target server, the target second weight information of the target server and the service weight ratio information;
[0199] Determine the estimated usage information of the target resource at the time of service launch based on the actual resource usage weight information of the target server and the usage ratio information of the target resource at the time of service launch;
[0200] The estimated usage information of the target resources at the time of service launch is used as the relevant usage information of the target resources.
[0201] Optionally, the determination module 200 is further used to determine the service launch time and service type according to the service requirements;
[0202] Determine the first weight information of the target server's business online time in the historical date according to the business online time, and use the first weight information of the target server's business online time in the historical date as the target first weight information of the target server;
[0203] According to the business type, second weight information of the target server under the business type is determined, and the second weight information of the target server under the business type is used as the target second weight information of the target server.
[0204] Optionally, the determination module 200 is specifically configured to determine the resource processing indication information of the target server at the current moment if the relevant usage information of the target resource is greater than a preset usage upper limit, including: expanding the capacity of the target resource;
[0205] If the relevant usage information of the target resource is less than the preset usage lower limit, determining the resource processing instruction information of the target server at the current moment includes: reducing the capacity of the target resource.
[0206] Optionally, it also includes: a generation module;
[0207] A generating module, used for generating first weight information of the target server at each time according to the application type of the target server and the time unit;
[0208] According to the business type, second weight information of the target server under each business type is generated.
[0209] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0210] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0211] The above modules can be connected or communicated with each other via a wired connection or a wireless connection. The wired connection may include a metal cable, an optical cable, a hybrid cable, etc., or any combination thereof. The wireless connection may include a connection in the form of a LAN, a WAN, Bluetooth, a ZigBee, or NFC, or any combination thereof. Two or more modules may be combined into a single module, and any one module may be divided into two or more units. Those skilled in the art will clearly understand that for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application.
[0212] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, which may be a computing device with data processing capabilities.
[0213] The device includes: a processor 801 and a storage medium 802 .
[0214] The storage medium 802 is used to store programs, and the processor 801 calls the programs stored in the storage medium 802 to execute the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.
[0215] Among them, the storage medium 802 stores program code, and when the program code is executed by the processor 801, the processor 801 executes various steps in the resource processing method of the server according to various exemplary embodiments of the present application described in the above "Exemplary Method" section of this specification.
[0216] Processor 801 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.
[0217] Storage medium 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Storage medium may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type storage medium, random access storage medium (Random Access Memory, RAM), static random access storage medium (Static Random Access Memory, SRAM), programmable read-only storage medium (Programmable Read Only Memory, PROM), read-only storage medium (Read Only Memory, ROM), electrically erasable programmable read-only storage medium (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic storage medium, disk, optical disk, etc. Storage medium is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The storage medium 802 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0218] Optionally, the present application also provides a program product, such as a computer-readable storage medium, including a program, which is used to execute the above method embodiment when executed by a processor.
[0219] In the several embodiments provided in the present application, it should be understood that the disclosed 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, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0220] 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 solution of this embodiment.
[0221] In addition, each functional unit in each embodiment of the present application 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 hardware plus software functional units.
[0222] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only storage medium (English: Read-Only Memory, referred to as: ROM), random access storage medium (English: Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program code.
Claims
1. A resource processing method of a server, characterized in that: include: Get the usage information of various resources of the target server at the current moment; Determine relevant usage information of each resource according to usage information of each resource at the current moment, business attribute information and resource usage weight information of the target server, wherein the relevant usage information is used to indicate resource usage of the resource before the current moment, at the current moment or after the current moment; Determine resource processing instruction information of the target server at the current moment according to the relevant usage information of each resource, wherein the resource processing instruction information is used to indicate expansion or reduction of each resource; According to the resource processing indication information of the target server at the current moment, various resources of the target server are expanded or reduced.
2. The method according to claim 1, characterized in that Determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the service attribute information and the resource usage weight information of the target server includes: Determining whether the target server has a business demand within a preset time according to the business attribute information; If there is no business demand, then determine the relevant usage information of each resource according to the usage information of each resource at the current moment, the first weight information of the target server at the current moment, and the first weight information of the target server at the next moment of the current moment; or determine the relevant usage information of each resource according to the usage information of each resource at the next moment described in the historical date; If there is a business demand, the relevant usage information of the various resources is determined based on the usage information of the various resources at the current moment, the actual resource usage weight information of the target server at the current moment, the target first weight information of the target server, the target second weight information of the target server and the business weight ratio information; the target first weight information is the first weight information of the target server at the business online time indicated by the business demand in the historical date; the target second weight is the second weight information of the target server under the business type indicated by the business demand.
3. The method according to claim 2, characterized in that Determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the first weight information of the target server at the current moment, and the first weight information of the target server at the next moment of the current moment includes: Determine estimated usage information of the target resource at a next moment according to usage information of the target resource at a current moment, first weight information of the target server at a current moment, and first weight information of the target server at a next moment; The estimated usage information of the target resource at the next moment is used as the relevant usage information of the target resource.
4. The method according to claim 2, characterized in that: Determining the relevant usage information of each resource according to the usage information of each resource at the next moment in the historical date includes: The usage information of the target resource at the next moment in the historical date is used as the relevant usage information of the target resource; the historical date is one of the following: the day before the current moment, the week before the current moment, the month before the current moment, or the year before the current moment.
5. The method according to claim 2, characterized in that: Also includes: If there is no business demand, the usage information of each resource at the current moment is used as the relevant usage information of each resource.
6. The method according to claim 2, characterized in that Determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the actual resource usage weight information of the target server at the current moment, the target first weight information of the target server, the target second weight information of the target server and the business weight ratio information, includes: Determine the usage ratio information of the target resource according to the usage information of the target resource at the current moment and the actual resource usage weight information of the target server at the current moment; Determine the actual resource usage weight information of the target server at the time when the service goes online according to the target first weight information of the target server, the target second weight information of the target server and the service weight ratio information; Determine estimated usage information of the target resource at the time when the service goes online according to the actual resource usage weight information of the target server and the usage ratio information of the target resource at the time when the service demand goes online; The estimated usage information of the target resource at the time when the service goes online is used as the relevant usage information of the target resource.
7. The method according to claim 2, characterized in that Before determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the actual resource usage weight information of the target server at the current moment, the target first weight information of the target server, the target second weight information of the target server and the business weight proportion information, the method further includes: Determine the time and type of service launch based on business requirements; Determine, according to the service online time, the first weight information of the service online time of the target server in the historical date, and use the first weight information of the service online time of the target server in the historical date as the target first weight information of the target server; According to the business type, second weight information of the target server under the business type is determined, and the second weight information of the target server under the business type is used as the target second weight information of the target server.
8. The method according to any one of claims 1 to 7, characterized in that: The relevant usage information of each resource determines the resource processing instruction information of the target server at the current moment, including: If the relevant usage information of the target resource is greater than the preset usage upper limit, determining the resource processing instruction information of the target server at the current moment includes: expanding the capacity of the target resource; If the relevant usage information of the target resource is less than the preset usage lower limit, determining the resource processing instruction information of the target server at the current moment includes: reducing the capacity of the target resource.
9. The method according to claim 1, characterized in that: Before determining the relevant usage information of each resource according to the usage information of each resource at the current moment, the service attribute information and the resource usage weight information of the target server, the method further includes: Generate first weight information of the target server at each time according to the application type of the target server and the time unit; According to the business type, second weight information of the target server under each business type is generated.
10. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the program instructions to implement the resource processing method of the server as described in any one of claims 1 to 9.