Middleware load evaluation method and device, computer equipment and storage medium
By dynamically determining the hardware parameter weights and combining the current hardware parameters, the middleware load evaluation method is improved, the problem of insufficient accuracy of the existing methods is solved, and more accurate load evaluation is achieved.
Patent Information
- Application Number
- CN202510136647.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-06-17
AI Technical Summary
The middleware load evaluation method is not accurate and reliable enough, mainly because load evaluation relies on fixed thresholds and cannot effectively handle complex network and data flows.
By obtaining the current hardware parameters in the computer device and dynamically determining the hardware parameter weight based on historical performance data, the load evaluation results of the middleware are finally calculated based on the current parameters and weights.
It improves the accuracy of middleware load evaluation, can more accurately reflect the hardware load situation, reduce misjudgment, and enhance the reliability of the system.
Smart Images

Figure CN120162229A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a middleware load evaluation method, apparatus, computer device, and storage medium. Background Art
[0002] Middleware usually involves multiple components and layers, including complex network and data flows, resulting in variable factors and complex correlation relationships in load evaluation, making the evaluation method inaccurate and unreliable.
[0003] In traditional technologies, the load evaluation of middleware is usually based on a fixed threshold. When the load of the middleware is higher than the preset load threshold, it is determined that the middleware is overloaded. Although this method can complete the load evaluation of the middleware, there is a problem of inaccurate load evaluation. Summary of the Invention
[0004] Based on this, it is necessary to provide a middleware load evaluation method, apparatus, computer device, and storage medium that can improve the accuracy of load evaluation for the above technical problems.
[0005] In a first aspect, this application provides a middleware load evaluation method, including:
[0006] Obtain the current hardware parameters of at least one piece of hardware in a computer device during the current period;
[0007] According to each current hardware parameter and the historical hardware performance of the corresponding hardware in different historical periods, determine the current parameter weight of the corresponding hardware; the current hardware parameters include the current processor occupancy, the current memory occupancy, and the current disk occupancy; the historical hardware performance includes the historical processor occupancy rate, the historical memory occupancy rate, and the historical disk occupancy rate;
[0008] According to the current hardware parameters of each piece of hardware and the current parameter weight of the corresponding hardware, determine the load evaluation result of the middleware.
[0009] In one of the embodiments, determining the current parameter weight of the corresponding hardware according to each current hardware parameter and the historical hardware performance of the corresponding hardware in different historical periods includes:
[0010] For each piece of hardware, determine the current hardware performance of the hardware according to the current hardware parameter of the hardware and the total hardware capacity;
[0011] Determine the current parameter weight of the hardware according to the difference between the current hardware performance and the performance mean value; the performance mean value is the average value between the historical hardware performances of the hardware in different historical periods.
[0012] In one embodiment, determining the current parameter weight of the hardware according to the difference between the current hardware performance and the average performance includes:
[0013] When the current hardware performance is not greater than the average performance, use the historical parameter weight of the hardware determined in the previous period as the current weight parameter of the hardware in the current period;
[0014] When the current hardware performance is greater than the average performance, determine the current parameter weight of the hardware according to the difference between the current hardware performance and the preset performance threshold.
[0015] In one embodiment, determining the current parameter weight of the hardware according to the difference between the current hardware performance and the preset performance threshold includes:
[0016] When the current hardware performance is not greater than the preset performance threshold, use the sum of the historical parameter weight of the hardware determined in the previous period and the first preset weight as the current parameter weight of the hardware;
[0017] When the current hardware performance is greater than the preset performance threshold, use the sum of the historical parameter weight of the hardware determined in the previous period and the second preset weight as the current parameter weight of the hardware; the first preset weight is less than the second preset weight.
[0018] In one embodiment, determining the current hardware performance of the hardware according to the current hardware parameters and the total hardware capacity of the hardware includes:
[0019] Obtain the total hardware capacity of the hardware;
[0020] Use the quotient between the current hardware parameters and the total hardware capacity of the hardware as the current hardware performance of the hardware.
[0021] In one embodiment, determining the load evaluation result of the middleware according to the current hardware parameters of each hardware and the current parameter weight of the corresponding hardware includes:
[0022] Use the weighted sum of the current hardware parameters of each hardware and the current parameter weight of the corresponding hardware as the first load result of the computer device;
[0023] Use the difference between the first load result and the preset load result as the load evaluation result of the middleware; the preset load result is the load result of the computer device when the middleware stops running.
[0024] In a second aspect, the present application also provides a middleware load evaluation device, including:
[0025] A parameter acquisition module, configured to acquire the current hardware parameters of at least one piece of hardware in the computer device during the current period;
[0026] A weight determination module, configured to determine the current parameter weight of the corresponding hardware according to each current hardware parameter and the historical hardware performance of the corresponding hardware in different historical periods; the current hardware parameters include the current processor occupancy, the current memory occupancy, and the current disk occupancy; the historical hardware performance includes the historical processor occupancy rate, the historical memory occupancy rate, and the historical disk occupancy rate;
[0027] A load evaluation module, configured to determine the load evaluation result of the middleware according to the current hardware parameters of each hardware and the current parameter weight of the corresponding hardware.
[0028] Thirdly, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0029] Obtain the current hardware parameters of at least one piece of hardware in the computer device in the current period;
[0030] Determine the current parameter weight of the corresponding hardware according to each current hardware parameter and the historical hardware performance of the corresponding hardware in different historical periods; the current hardware parameters include the current processor occupancy, the current memory occupancy, and the current disk occupancy; the historical hardware performance includes the historical processor occupancy rate, the historical memory occupancy rate, and the historical disk occupancy rate;
[0031] Determine the load evaluation result of the middleware according to the current hardware parameters of each hardware and the current parameter weight of the corresponding hardware.
[0032] Fourthly, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0033] Obtain the current hardware parameters of at least one piece of hardware in the computer device in the current period;
[0034] Determine the current parameter weight of the corresponding hardware according to each current hardware parameter and the historical hardware performance of the corresponding hardware in different historical periods; the current hardware parameters include the current processor occupancy, the current memory occupancy, and the current disk occupancy; the historical hardware performance includes the historical processor occupancy rate, the historical memory occupancy rate, and the historical disk occupancy rate;
[0035] Determine the load evaluation result of the middleware according to the current hardware parameters of each hardware and the current parameter weight of the corresponding hardware.
[0036] Fifthly, the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0037] Obtain the current hardware parameters of at least one piece of hardware in the computer device during the current period;
[0038] Determine the current parameter weight of the corresponding hardware according to each current hardware parameter and the historical hardware performance of the corresponding hardware in different historical periods; the current hardware parameters include the current processor occupancy, the current memory occupancy, and the current disk occupancy; the historical hardware performance includes the historical processor occupancy rate, the historical memory occupancy rate, and the historical disk occupancy rate;
[0039] Determine the load evaluation result of the middleware according to the current hardware parameters of each hardware and the current parameter weight of the corresponding hardware.
[0040] The above middleware load evaluation method, device, computer device, and storage medium obtain the current hardware parameters of at least one piece of hardware in the computer device during the current period; determine the current parameter weight of the corresponding hardware according to each current hardware parameter and the historical hardware performance of the corresponding hardware in different historical periods; the current hardware parameters include the current processor occupancy, the current memory occupancy, and the current disk occupancy; the historical hardware performance includes the historical processor occupancy rate, the historical memory occupancy rate, and the historical disk occupancy rate; determine the load evaluation result of the middleware according to the current hardware parameters of each hardware and the current parameter weight of the corresponding hardware. In this embodiment, by determining the hardware parameters of each hardware, dynamically determining the parameter weight of the corresponding hardware, and finally according to the current hardware parameters of each hardware and the current parameter weight of the corresponding hardware, the load evaluation result can be determined more accurately. Description of the Drawings
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0042] Figure 1 It is an application environment diagram of a middleware load evaluation method provided in this embodiment;
[0043] Figure 2 It is a flowchart of the first middleware load evaluation method provided in this embodiment;
[0044] Figure 3 It is a flowchart of the second middleware load evaluation method provided in this embodiment;
[0045] Figure 4 It is a structural block diagram of a middleware load evaluation device provided in this embodiment;
[0046] Figure 5 Internal structure diagram of the first computer device provided in this embodiment;
[0047] Figure 6 Internal structure diagram of the second computer device provided in this embodiment. Detailed implementation manners
[0048] In order to make the objectives, technical solutions and advantages of this application clearer, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.
[0049] The middleware load evaluation method provided in the embodiments of this application can be applied to an application environment as Figure 1 shown. Among them, the terminal 102 communicates with the server 104 through a network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed in the cloud or other network servers. The computer device obtains the current hardware parameters of at least one piece of hardware in the computer device during the current period; determines the current parameter weights of the corresponding hardware according to the current hardware parameters and the historical hardware performances of the corresponding hardware in different historical periods; the current hardware parameters include the current processor occupancy, the current memory occupancy, and the current disk occupancy; the historical hardware performances include the historical processor occupancy rate, the historical memory occupancy rate, and the historical disk occupancy rate; determines the load evaluation result of the middleware according to the current hardware parameters of each piece of hardware and the current parameter weights of the corresponding hardware. Among them, the middleware runs in the computer device, and the computer device can be either a terminal or a server. The terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0050] In an exemplary embodiment, as Figure 2 shown, a middleware load evaluation method is provided. Taking the method applied to the computer device in Figure 1 as an example, it includes the following steps 201 to step 203. Among them:
[0051] Step 201, obtain the current hardware parameters of at least one piece of hardware in the computer device during the current period.
[0052] Among them, the hardware may include a processor (Central Processing Unit, CPU), memory, disk, network, etc. The hardware parameters include processor occupancy, memory occupancy, disk occupancy, number of processors, number of processor cores, processor main frequency, memory capacity, memory speed, disk throughput (Input / Output Per Second, IOPS), network bandwidth, etc. The current hardware parameters may include the current processor occupancy, current memory occupancy, current disk occupancy, etc. of the computer device during the current period.
[0053] Specifically, the computer device may obtain the current hardware parameters of each hardware in the computer device during the current period.
[0054] Step 202, determine the current parameter weight of the corresponding hardware according to the current hardware parameters of each hardware and the historical hardware performance of the corresponding hardware in different historical periods.
[0055] Among them, the hardware performance may include processor occupancy rate, memory occupancy rate, and disk occupancy rate. The historical hardware performance may include the historical processor occupancy rate, historical memory occupancy rate, and historical disk occupancy rate of the computer device during the historical period.
[0056] Specifically, for each hardware, set an initial parameter weight for the hardware; determine the current hardware performance of the hardware according to the current hardware parameters of the hardware and the total hardware capacity; if the current hardware performance is greater than the historical hardware performance, then use the sum value between the initial parameter weight and the preset parameter weight as the current parameter weight. If the current hardware performance is not greater than the historical hardware performance, then use the initial parameter weight as the current parameter weight.
[0057] In one embodiment, the implementation method for determining the current hardware performance of the hardware according to the current hardware parameters of the hardware and the total hardware capacity may also be: obtain the total hardware capacity of the hardware; use the quotient value between the current hardware parameters of the hardware and the total hardware capacity as the current hardware performance of the hardware.
[0058] Step 203, determine the load evaluation result of the middleware according to the current hardware parameters of each hardware and the current parameter weight of the corresponding hardware.
[0059] Specifically, use the weighted sum value between the current hardware parameters of each hardware and the current parameter weight of the corresponding hardware as the first load result of the computer device; use the difference between the first load result and the preset load result as the load evaluation result of the middleware; the preset load result is the load result of the computer device when the middleware stops running.
[0060] Exemplarily, determine the weighted sum value between the current hardware parameters of each hardware and the current parameter weights of the corresponding hardware as the first load result of the computer device; determine the difference between the first load result and the preset load result, and use this difference as the load evaluation result of the middleware.
[0061] For the above middleware load evaluation method, device, computer device, and storage medium, obtain the current hardware parameters of at least one hardware in the computer device during the current period; determine the current parameter weights of the corresponding hardware according to the current hardware parameters and the historical hardware performance of the corresponding hardware in different historical periods; the current hardware parameters include the current processor occupancy, the current memory occupancy, and the current disk occupancy; the historical hardware performance includes the historical processor occupancy rate, the historical memory occupancy rate, and the historical disk occupancy rate; determine the load evaluation result of the middleware according to the current hardware parameters of each hardware and the current parameter weights of the corresponding hardware. In this embodiment, by determining the hardware parameters of each hardware, dynamically determining the parameter weights of the corresponding hardware, and finally according to the current hardware parameters of each hardware and the current parameter weights of the corresponding hardware, the load evaluation result can be determined more accurately.
[0062] In one embodiment, determining the current parameter weights of the corresponding hardware according to the current hardware parameters and the historical hardware performance of the corresponding hardware in different historical periods includes: for each hardware, determine the current hardware performance according to the current hardware parameters of the hardware and the total hardware capacity; determine the current parameter weights of the hardware according to the difference between the current hardware performance and the performance mean value; the performance mean value is the average value between the historical hardware performances of the hardware in different historical periods.
[0063] Specifically, when the current hardware performance is not greater than the performance mean value, use the historical parameter weight of the hardware determined in the previous period as the current weight parameter of the hardware in the current period; when the current hardware performance is greater than the performance mean value, determine the current parameter weights of the hardware according to the difference between the current hardware performance and the preset performance threshold.
[0064] Specifically, when the current hardware performance is not greater than the preset performance threshold, use the sum value between the historical parameter weight of the hardware determined in the previous period and the first preset weight as the current parameter weight of the hardware; when the current hardware performance is greater than the preset performance threshold, use the sum value between the historical parameter weight of the hardware determined in the previous period and the second preset weight as the current parameter weight of the hardware; the first preset weight is less than the second preset weight.
[0065] Exemplarily, according to the magnitude and direction of the deviation between the current hardware performance and the performance mean value, the present embodiment can dynamically adjust the current parameter weights of each hardware. For example, if the occupancy rate of a certain hardware resource is much higher than the preset threshold, it may indicate that this resource is the bottleneck of the current load, so its weight can be increased.
[0066] In the present embodiment, for each hardware, according to the current hardware parameters and the total hardware capacity of the hardware, the current hardware performance of the hardware is determined; according to the difference between the current hardware performance and the performance mean value, the current parameter weight of the hardware is determined. The present embodiment can dynamically determine the current parameter weight to improve the accuracy of middleware load determination.
[0067] In one embodiment, the present embodiment provides an optional method for middleware load evaluation, and this method is described by taking its application to a computer device as an example. As Figure 3 shown, this method includes the following steps:
[0068] Step 301, obtain the current hardware parameters of at least one hardware in the computer device during the current period.
[0069] Step 302, for each hardware, obtain the total hardware capacity of the hardware, and use the quotient between the current hardware parameters and the total hardware capacity of the hardware as the current hardware performance of the hardware.
[0070] Among them, the current hardware parameters include the current processor occupancy, the current memory occupancy, and the current disk occupancy; the historical hardware performance includes the historical processor occupancy rate, the historical memory occupancy rate, and the historical disk occupancy rate.
[0071] Step 303, determine whether the current hardware performance is greater than the performance mean value. If not, execute Step 304; if so, execute Step 305.
[0072] Step 304, in the case where the current hardware performance is not greater than the performance mean value, use the historical parameter weight of the hardware determined in the previous period as the current weight parameter of the hardware during the current period.
[0073] Step 305, in the case where the current hardware performance is greater than the performance mean value, determine whether the current hardware performance is greater than the preset performance threshold. If so, execute Step 306; if not, execute Step 307.
[0074] Step 306, in the case where the current hardware performance is not greater than the preset performance threshold, use the sum of the historical parameter weight of the hardware determined in the previous period and the first preset weight as the current parameter weight of the hardware.
[0075] Step 307, when the current hardware performance is greater than the preset performance threshold, use the sum of the historical parameter weight of the hardware determined in the previous period and the second preset weight as the current parameter weight of the hardware.
[0076] Among them, the first preset weight is less than the second preset weight.
[0077] Step 308, use the weighted sum of the current hardware parameters of each hardware and the current parameter weight of the corresponding hardware as the first load result of the computer device.
[0078] Step 309, use the difference between the first load result and the preset load result as the load evaluation result of the middleware.
[0079] Among them, the preset load result is the load result of the computer device when the middleware stops running.
[0080] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0081] Based on the same inventive concept, the embodiments of the present application also provide a middleware load evaluation device for implementing the above-mentioned middleware load evaluation method. The implementation solutions provided by this device to solve problems are similar to the implementation solutions described in the above method. Therefore, the specific limitations in one or more of the following middleware load evaluation device embodiments can refer to the limitations on the middleware load evaluation method in the above text, and will not be repeated here.
[0082] In an exemplary embodiment, as Figure 4 shown, a middleware load evaluation device is provided, including: a parameter acquisition module 10, a weight determination module 11, and a load evaluation module 12, where:
[0083] The parameter acquisition module 10 is configured to acquire the current hardware parameters of at least one piece of hardware in the computer device during the current period;
[0084] A weight determination module 11, configured to determine the current parameter weight of each corresponding hardware according to each current hardware parameter and the historical hardware performance of the corresponding hardware in different historical periods; the current hardware parameters include the current processor occupancy, the current memory occupancy, and the current disk occupancy; the historical hardware performance includes the historical processor occupancy rate, the historical memory occupancy rate, and the historical disk occupancy rate.
[0085] A load evaluation module 12, configured to determine the load evaluation result of the middleware according to the current hardware parameters of each hardware and the current parameter weight of the corresponding hardware.
[0086] In one embodiment, the weight determination module 11 is further configured to, for each hardware, determine the current hardware performance of the hardware according to the current hardware parameter of the hardware and the total hardware capacity; determine the current parameter weight of the hardware according to the difference between the current hardware performance and the performance mean value; the performance mean value is the average value between the historical hardware performances of the hardware in different historical periods.
[0087] In one embodiment, the weight determination module 11 is further configured to, when the current hardware performance is not greater than the performance mean value, use the historical parameter weight of the hardware determined in the previous period as the current weight parameter of the hardware in the current period; when the current hardware performance is greater than the performance mean value, determine the current parameter weight of the hardware according to the difference between the current hardware performance and a preset performance threshold.
[0088] In one embodiment, the weight determination module 11 is further configured to, when the current hardware performance is not greater than the preset performance threshold, use the sum value of the historical parameter weight of the hardware determined in the previous period and a first preset weight as the current parameter weight of the hardware; when the current hardware performance is greater than the preset performance threshold, use the sum value of the historical parameter weight of the hardware determined in the previous period and a second preset weight as the current parameter weight of the hardware; the first preset weight is less than the second preset weight.
[0089] In one embodiment, the weight determination module 11 is further configured to obtain the total hardware capacity of the hardware; use the quotient value between the current hardware parameter of the hardware and the total hardware capacity as the current hardware performance of the hardware.
[0090] In one embodiment, the load evaluation module 12 is further configured to use the weighted sum value between the current hardware parameters of each hardware and the current parameter weight of the corresponding hardware as the first load result of the computer device; use the difference between the first load result and a preset load result as the load evaluation result of the middleware; the preset load result is the load result of the computer device when the middleware stops running.
[0091] Each module in the above middleware load evaluation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to each of the above modules.
[0092] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a middleware load evaluation method.
[0093] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 6As shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. The computer program, when executed by the processor, implements a middleware load evaluation method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0094] Those skilled in the art can understand that Figure 5 and Figure 6 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0095] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0096] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0097] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0098] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0099] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0100] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope described in this specification.
[0101] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A middleware load evaluation method, characterized in that: Applied to a computer device running middleware, the method comprises: Obtaining current hardware parameters of at least one hardware in the computer device within a current period; Determine the current parameter weight of the corresponding hardware according to each of the current hardware parameters and the historical hardware performance of the corresponding hardware in different historical periods; the current hardware parameters include the current processor occupancy, the current memory occupancy and the current disk occupancy; the historical hardware performance includes the historical processor occupancy rate, the historical memory occupancy rate and the historical disk occupancy rate; The load evaluation result of the middleware is determined according to the current hardware parameters of each of the hardware and the current parameter weight of the corresponding hardware.
2. The method according to claim 1, characterized in that Determining the current parameter weight of the corresponding hardware according to each of the current hardware parameters and the historical hardware performance of the corresponding hardware in different historical periods includes: For each hardware, determine the current hardware performance of the hardware according to the current hardware parameters and the total hardware capacity of the hardware; The current parameter weight of the hardware is determined according to the difference between the current hardware performance and the performance mean; the performance mean is the average value between the historical hardware performance of the hardware in different historical time periods.
3. The method according to claim 2, characterized in that The determining the current parameter weight of the hardware according to the difference between the current hardware performance and the performance mean includes: In the case where the current hardware performance is not greater than the performance mean, the historical parameter weight of the hardware determined in the previous period is used as the current weight parameter of the hardware in the current period; When the current hardware performance is greater than the performance mean, the current parameter weight of the hardware is determined according to the difference between the current hardware performance and a preset performance threshold.
4. The method according to claim 3, characterized in that The determining the current parameter weight of the hardware according to the difference between the current hardware performance and the preset performance threshold comprises: When the current hardware performance is not greater than the preset performance threshold, the sum of the historical parameter weight of the hardware determined in the previous period and the first preset weight is used as the current parameter weight of the hardware; When the current hardware performance is greater than a preset performance threshold, the sum of the historical parameter weight of the hardware determined in the previous period and a second preset weight is used as the current parameter weight of the hardware; the first preset weight is less than the preset second weight.
5. The method according to claim 2, characterized in that: Determining the current hardware performance of the hardware according to the current hardware parameters and the total hardware capacity of the hardware includes: Obtaining the total hardware capacity of the hardware; The quotient between the current hardware parameters of the hardware and the total capacity of the hardware is used as the current hardware performance of the hardware.
6. The method according to any one of claims 1 to 5, characterized in that: Determining the load evaluation result of the middleware according to the current hardware parameters of each of the hardware and the current parameter weight of the corresponding hardware includes: Taking the weighted sum of the current hardware parameters of each of the hardware and the current parameter weights of the corresponding hardware as the first load result of the computer device; The difference between the first load result and the preset load result is used as the load evaluation result of the middleware; the preset load result is the load result of the computer device when the middleware stops running.
7. A middleware load evaluation device, characterized in that: Applied to a computer device running middleware, the device comprises: A parameter acquisition module, used to acquire current hardware parameters of at least one hardware in the computer device within a current period; A weight determination module, for determining the current parameter weight of the corresponding hardware according to each of the current hardware parameters and the historical hardware performance of the corresponding hardware in different historical periods; the current hardware parameters include the current processor occupancy, the current memory occupancy and the current disk occupancy; the historical hardware performance includes the historical processor occupancy rate, the historical memory occupancy rate and the historical disk occupancy rate; The load evaluation module is used to determine the load evaluation result of the middleware according to the current hardware parameters of each of the hardware and the current parameter weight of the corresponding hardware.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. 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 according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.