A resource allocation method based on event response
By detecting the number of request events and the historical central processor utilization rate, determining the feature parameters of event request triggering, and selecting appropriate resource allocation methods, the problem of not being able to dynamically adjust resource allocation in the prior art is solved, and resource utilization and flexibility are improved.
Patent Information
- Application Number
- CN202510258592.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-03-06
AI Technical Summary
The existing technology cannot monitor the system load in real time, the number of requested events, etc., which leads to the inability to dynamically adjust resource allocation, thereby reducing resource utilization.
By detecting the number of request events and historical central processor utilization, the event request trigger feature parameters are determined, and then a Class I or Class II resource allocation method is selected. Specifically, under the first type of resource allocation method, the resource allocation ratio is adjusted according to the load power and the number of request events; under the second type of resource allocation method, the memory ratio is adjusted according to the average length of jamming.
Dynamic adjustment and refined management of resource allocation are realized, and the flexibility of resource utilization and resource allocation is improved.
Smart Images

Figure CN119759586B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a resource allocation method based on event response. Background Art
[0002] Incident response generally refers to the preparations an organization makes to deal with unexpected events such as cybersecurity threats, security breaches or cyberattacks, as well as the measures taken after the incident. Its purpose is to prevent cyberattacks from happening, minimize the costs and business interruptions caused by cyberattacks, and ensure that the organization has sufficient resilience to avoid lasting damage caused by attacks.
[0003] Resource allocation refers to the process of rationally allocating computing resources (such as CPU, GPU, memory, etc.) in a server or computing cluster to different tasks, users, or applications. This process aims to improve overall computing efficiency and performance, ensure that resources are used efficiently, and meet the needs of different tasks and users. By comprehensively considering the priority of tasks, resource requirements, system load, and specific requirements of users, and adopting technical means such as dynamic scheduling strategies and load balancing algorithms, reasonable allocation and efficient use of resources can be achieved.
[0004] Chinese patent publication number: CN112101727A, discloses a resource allocation method, device, equipment and storage medium, relates to the field of data processing technology, can achieve uniform resource allocation and improve the accuracy of resource allocation. The method includes: in response to a resource allocation request for a target event sent by a client, obtaining target behavior data of a target user related to the resource allocation granularity of the target event; analyzing each of the target behavior data according to a preset weight analysis model to obtain the influence weight value of each of the target behavior data on the resource allocation of the target event; and allocating resources for the target event to the target user according to the influence weight value of each of the target behavior data on the resource allocation of the target event. It can be seen that although the prior art needs to allocate resources based on the target behavior data of the target user and the preset weight analysis model, it is impossible to monitor the system load in real time, the number of requested events is too high, and the resource allocation cannot be dynamically adjusted, resulting in low resource utilization. Summary of the invention
[0005] To this end, the present invention provides a resource allocation method based on event response to overcome the problem in the prior art that the system load is too high, the number of request events is too large, etc., and resource allocation cannot be dynamically adjusted, resulting in low resource utilization.
[0006] To achieve the above object, the present invention provides a resource allocation method based on event response, comprising:
[0007] In response to a user sending a request event, detecting the number of request events within a first preset time period and the historical CPU utilization rate of each request event, and determining an event request triggering characteristic parameter according to the historical CPU utilization rate of each request event;
[0008] Determining the type of initial resource allocation for the request event based on the event request trigger characteristic parameter, the type of initial resource allocation including a first resource allocation mode and a second resource allocation mode;
[0009] Under a type of resource allocation mode, when the load power of the system within the second preset time period is detected and it is determined according to the load power that the resource allocation of the request event does not meet the preset standard, the corresponding resource allocation optimization strategy is determined according to the number of request events, including reducing the resource allocation ratio corresponding to each of the request events to a corresponding value, or reallocating resources after sorting the request events;
[0010] Under the second type of resource allocation method, the average freeze duration of the request event within the second preset duration is obtained, and when it is determined that the resource allocation of the request event does not meet the preset standard based on the average freeze duration, the corresponding memory share of the request event is increased to the corresponding value.
[0011] Furthermore, the process of calculating the event request triggering characteristic parameters includes:
[0012] Solve the product of the historical CPU utilization rate of the request event and each computing power influencing factor to obtain the request trigger feature component;
[0013] Solving the mean of the request trigger feature components corresponding to each request event to obtain the event request trigger feature parameter;
[0014] The trigger influencing factors include the number of cores of the central processing unit, the main frequency of a single core of the central processing unit, and the number of floating-point operations of the central processing unit.
[0015] Further, the process of determining the type of initial resource allocation based on the event request triggering characteristic parameter includes:
[0016] Compare the event request trigger characteristic parameter with the preset event request trigger threshold;
[0017] If the event request trigger characteristic parameter is less than the preset event request trigger threshold, the second type of resource allocation method is used to allocate resources for the request event;
[0018] If the event request trigger characteristic parameter is greater than or equal to the preset event request trigger threshold, a resource allocation method is used to allocate resources to the request event;
[0019] Among them, one type of resource allocation method is a resource allocation method in which resources are allocated according to the requirements of the request event before the request event is executed, and the resource allocation does not change during the execution of the request event;
[0020] The second type of resource allocation method is a resource allocation method that dynamically allocates resources according to the current resource allocation situation and the needs of the request event when the request event needs resources during the running process.
[0021] Furthermore, under the first type of resource allocation mode, it is determined whether the resource allocation of the request event meets a preset standard according to the load power, wherein:
[0022] If the load power is less than the preset load power, determining that the resource allocation of the request event meets the preset standard;
[0023] If the load power is greater than or equal to the preset load power, it is determined that the resource allocation of the request event does not meet the preset standard, and a corresponding resource allocation optimization strategy is determined according to the number of the request events.
[0024] Furthermore, a corresponding resource allocation optimization strategy is determined according to the number of the request events, wherein:
[0025] If the number of the request events is less than the preset number, reducing the resource allocation ratio corresponding to each of the request events to a corresponding value according to the difference between the number of the request events and the preset number;
[0026] If the number of the request events is greater than or equal to the preset number, the request events are sorted and resources are reallocated.
[0027] Furthermore, the ordering method of the request events includes:
[0028] reallocating resources for each of the request events according to the priority of each of the request events;
[0029] Under the condition that the priorities of the request events are the same, reallocating resources according to the load power of each request event;
[0030] The priority is based on the importance of each of the request events.
[0031] Furthermore, several resource adjustment methods are provided for reducing the resource allocation ratio corresponding to the request event, wherein:
[0032] If the quantity difference is less than the first preset quantity difference, the first preset resource adjustment coefficient is used to reduce the resource allocation ratio corresponding to the request event to a corresponding value;
[0033] If the quantity difference is greater than or equal to the first preset quantity difference and less than the second preset quantity difference, the resource allocation ratio corresponding to the request event is reduced to a corresponding value using the second preset resource adjustment coefficient;
[0034] If the quantity difference is greater than or equal to the second preset quantity difference, then using a third preset resource adjustment coefficient to reduce the resource allocation ratio corresponding to the request event to a corresponding value;
[0035] The quantity difference is the difference between the quantity of the requested events and a preset quantity.
[0036] Furthermore, under the first preset condition, there are several resource correction methods for correcting the resource allocation ratio corresponding to the request event, wherein:
[0037] If the execution time difference is less than the first preset event execution difference, the resource corresponding to the request event is corrected to a corresponding value using the first preset correction coefficient;
[0038] If the execution time difference is greater than or equal to the first preset event execution difference and less than the second preset event execution difference, the resource corresponding to the request event is corrected to a corresponding value using a second preset correction coefficient;
[0039] If the execution time difference is greater than or equal to the second preset event execution difference, the resource corresponding to the request event is corrected to a corresponding value using a third preset correction coefficient;
[0040] The first preset condition is that the resource allocation ratio corresponding to the request event has been adjusted and the adjusted average execution time of the event exceeds the preset average execution time; the execution time difference is the difference between the adjusted average execution time of the event and the preset average execution time.
[0041] Furthermore, under the second type of resource allocation mode, whether the resource allocation of the request event meets the preset standard is determined according to the average freeze duration of the request event within the second preset duration, wherein:
[0042] If the average freeze duration is less than the preset average freeze duration, it is determined that the resource allocation of the request event meets the preset standard;
[0043] If the average freeze duration is greater than or equal to the preset average freeze duration, it is determined that the resource allocation of the request event does not meet the preset standard, and the corresponding memory share of the request event is increased to a corresponding value based on the difference between the average freeze duration and the preset average freeze duration.
[0044] Furthermore, the increase in the corresponding memory usage of the request event is positively correlated with the difference in the freeze duration, wherein the difference in the freeze duration is the difference between the average freeze duration and the preset average freeze duration.
[0045] Compared with the prior art, the beneficial effects of the present invention are: the present invention responds to user request events in real time, determines the resource allocation method of the request event according to the event request trigger characteristic parameters, and the resource allocation method of the request event includes a first-class resource allocation method and a second-class resource allocation method, thereby improving the adaptability of the resource allocation method; under the first-class resource allocation method, the rationality of the allocation of resources corresponding to each request event is checked according to the load power and the number of request events to avoid excessive allocation of resources; under the second-class resource allocation method, whether the resource allocation meets the standards is judged by detecting the average freeze duration of the request event, thereby realizing refined management of resource allocation and improving resource utilization.
[0046] Furthermore, the present invention improves the flexibility of resource allocation by determining the type of initial resource allocation according to event request trigger characteristic parameters, evaluating the resource demand of the request event in real time, and flexibly selecting a type one resource allocation method or a type two resource allocation method.
[0047] Furthermore, the present invention is provided with a method for determining whether the resource allocation of the request event meets a preset standard according to the load power, thereby avoiding excessive or insufficient allocation of resources corresponding to the request event, thereby ensuring effective utilization of resources.
[0048] Furthermore, the present invention intelligently evaluates resource requirements of request events by setting event request triggering characteristic parameters, thereby improving the accuracy of resource allocation.
[0049] Furthermore, the present invention determines the corresponding resource allocation optimization strategy according to the number of request events, thereby realizing refined management of resource allocation.
[0050] Furthermore, the present invention provides several resource adjustment methods for reducing the resources corresponding to the request event, and each adjustment method reduces the resource allocation ratio corresponding to the request event to a different extent, thereby achieving precise control of the reduction extent of the resource allocation ratio corresponding to the request event.
[0051] Furthermore, the present invention is provided with a method for determining whether the resource allocation of the request event meets the preset standard according to the average freeze duration of the request event within a second preset duration. The freeze duration generally refers to the time period of response delay or interface unsmoothness that occurs when the computer is executing a task. By increasing the corresponding memory share of the request event and reducing the freeze duration, the user experience is optimized.
[0052] Furthermore, the present invention realizes precise control of the increase in the memory share corresponding to the request event by setting the increase in the memory share corresponding to the request event to be positively correlated with the difference in the freeze duration. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 This is a flow chart of a resource allocation method based on event response according to an embodiment of the present invention;
[0054] Figure 2 A flow chart for determining the type of initial resource allocation for an embodiment of the present invention;
[0055] Figure 3 This is a flow chart of an embodiment of the present invention for determining whether resource allocation of a request event meets a preset standard according to load power;
[0056] Figure 4 This is a flowchart of an embodiment of the present invention for determining whether resource allocation of a request event meets a preset standard based on an average freeze duration of the request event within a second preset duration. DETAILED DESCRIPTION
[0057] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0058] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0059] See also Figure 1 , Figure 2 , Figure 3 as well as Figure 4 As shown, they are respectively a flowchart of a resource allocation method based on event response according to an embodiment of the present invention; a flowchart of determining the type of initial resource allocation according to an embodiment of the present invention; a flowchart of determining whether the resource allocation of a request event meets the preset standard according to load power according to an embodiment of the present invention; a flowchart of determining whether the resource allocation of a request event meets the preset standard according to the average freeze duration of the request event within a second preset duration according to an embodiment of the present invention.
[0060] An embodiment of the present invention provides a resource allocation method based on event response, including:
[0061] Step S1, in response to a user sending a request event, detecting the number of request events within a first preset time length of 1 minute and the historical CPU utilization rate of each request event, and determining an event request triggering characteristic parameter according to the historical CPU utilization rate of each request event;
[0062] Step S2, determining the type of initial resource allocation for the request event based on the event request trigger characteristic parameter, the type of initial resource allocation including a first resource allocation mode and a second resource allocation mode;
[0063] Step S3, under a type of resource allocation mode, detecting the load power of the system within a second preset time length, and determining, according to the load power, that the resource allocation of the request event does not meet the preset standard, determining the corresponding resource allocation optimization strategy according to the number of request events, including reducing the resource allocation ratio corresponding to each of the request events to a corresponding value, or reallocating resources after sorting the request events;
[0064] Step S4, under the second type of resource allocation method, obtain the average freeze duration of the request event within the second preset duration, and when it is determined that the resource allocation of the request event does not meet the preset standard based on the average freeze duration, increase the corresponding memory share of the request event to the corresponding value.
[0065] In this embodiment, the value range of the first preset time length is (30s, 2min), and preferably, the first preset time length is selected as 1min.
[0066] Specifically, the event request trigger characteristic parameter is obtained by the following formula:
[0067]
[0068] In the formula, F is the event request trigger characteristic parameter; N is the number of cores of the CPU; f is the single-core main frequency of the CPU; O is the floating-point operation number of the CPU; η i is the historical CPU utilization of the i-th request event; n is the total number of request events; i=1, 2, 3, …, n.
[0069] It can be understood that the process of calculating the event request triggering characteristic parameters includes:
[0070] The product of the historical CPU utilization rate of the request event and each computing power influencing factor is solved to obtain the event request triggering feature component;
[0071] Solving the mean of the request trigger feature components corresponding to each request event to obtain the event request trigger feature parameter;
[0072] The trigger influencing factors include the number of cores of the central processing unit, the main frequency of a single core of the central processing unit, and the number of floating-point operations of the central processing unit.
[0073] Specifically, the process of determining the type of initial resource allocation based on the event request triggering characteristic parameter includes:
[0074] Compare the event request trigger characteristic parameter with the preset event request trigger threshold;
[0075] If the event request trigger characteristic parameter is less than the preset event request trigger threshold 2TFLOPS, then use the second type of resource allocation method to allocate resources for the request event;
[0076] If the event request trigger characteristic parameter is greater than or equal to the preset event request trigger threshold, a resource allocation method is used to allocate resources to the request event;
[0077] Among them, one type of resource allocation method is a resource allocation method in which resources are allocated according to the requirements of the request event before the request event is executed, and the resource allocation does not change during the execution of the request event;
[0078] The second type of resource allocation method is a resource allocation method that dynamically allocates resources according to the current resource allocation situation and the needs of the request event when the request event needs resources during the running process.
[0079] In this embodiment, the preset event request trigger threshold is 2TFLOPS. The preset event request trigger threshold is obtained by taking the average value of the event request trigger characteristic parameters to ensure that the system can maintain efficient and stable operation when processing a large number of request events. However, the above value is not limited to this, and technical personnel in this field can also adjust the value according to actual needs.
[0080] In this embodiment, resource allocation refers to allocating computing resources such as CPU, GPU and memory to each request event to meet the computing resource requirements of different request events.
[0081] Specifically, under the first type of resource allocation mode, it is determined whether the resource allocation of the request event meets the preset standard according to the load power, wherein:
[0082] If the load power is less than the preset load power of 320W, it is determined that the resource allocation of the request event meets the preset standard;
[0083] If the load power is greater than or equal to the preset load power, it is determined that the resource allocation of the request event does not meet the preset standard, and a corresponding resource allocation optimization strategy is determined according to the number of the request events.
[0084] The load power in this embodiment is the total power consumed by the CPU, GPU, hard disk and memory.
[0085] Specifically, the corresponding resource allocation optimization strategy is determined according to the number of the request events, wherein:
[0086] If the number of the request events is less than the preset number of 30, then the resource allocation ratio corresponding to each of the request events is reduced to a corresponding value according to the difference between the number of the request events and the preset number;
[0087] If the number of the request events is greater than or equal to the preset number, the request events are sorted and resources are reallocated.
[0088] Specifically, the ordering method of the request events includes:
[0089] reallocating resources for each of the request events according to the priority of each of the request events;
[0090] Under the condition that the priorities of the request events are the same, reallocating resources according to the load power of each request event;
[0091] The priority is based on the importance of each of the request events.
[0092] In this embodiment, the importance of the request event can be ranked according to whether it involves sensitive information such as personal privacy and financial information, and the number of types of sensitive information involved in the request event. The more types of sensitive information involved in the request event, the higher the importance of the request event and the higher the priority of the request event. The importance of the request event can also be ranked according to whether the request event has time requirements, such as scheduled reporting, real-time data analysis, etc. It can be understood that the evaluation criteria for the importance of the request event are not specifically limited, and it is only necessary to meet the priority sorting requirements of the request event.
[0093] Specifically, there are several resource adjustment methods for reducing the resource allocation ratio corresponding to the request event, among which:
[0094] If the quantity difference is less than the first preset quantity difference of 5, the first preset resource adjustment coefficient of 0.98 is used to reduce the resource allocation ratio corresponding to the request event to the corresponding value;
[0095] If the quantity difference is greater than or equal to the first preset quantity difference and less than the second preset quantity difference, the resource allocation ratio corresponding to the request event is reduced to a corresponding value using the second preset resource adjustment coefficient 0.96;
[0096] If the quantity difference is greater than or equal to the second preset quantity difference, the resource allocation ratio corresponding to the request event is reduced to a corresponding value using a third preset resource adjustment coefficient of 0.94;
[0097] The quantity difference is the difference between the quantity of the requested events and a preset quantity.
[0098] Specifically, under the first preset condition, there are several resource correction methods for correcting the resource allocation ratio corresponding to the request event, wherein:
[0099] If the execution time difference is less than the first preset event execution difference of 4.3 seconds, the resource corresponding to the request event is corrected to the corresponding value using the first preset correction coefficient 1.02;
[0100] If the execution time difference is greater than or equal to the first preset event execution difference and less than the second preset event execution difference of 6 seconds, the resource corresponding to the request event is corrected to the corresponding value using the second preset correction coefficient 1.04;
[0101] If the execution time difference is greater than or equal to the second preset event execution difference, the resource corresponding to the request event is corrected to the corresponding value using the third preset correction coefficient 1.06;
[0102] The first preset condition is that the resource allocation ratio corresponding to the request event has been adjusted and the adjusted average execution time of the event exceeds the preset average execution time of 8.5 seconds; the execution time difference is the difference between the adjusted average execution time of the event and the preset average execution time.
[0103] In this embodiment, the execution duration refers to the total duration taken for the request event to be executed from the beginning to the end.
[0104] Specifically, under the second type of resource allocation mode, whether the resource allocation of the request event meets the preset standard is determined according to the average freeze duration of the request event within the second preset duration, wherein:
[0105] If the average freeze duration is less than the preset average freeze duration of 0.77 seconds, it is determined that the resource allocation of the request event meets the preset standard;
[0106] If the average freeze duration is greater than or equal to the preset average freeze duration, it is determined that the resource allocation of the request event does not meet the preset standard, and the corresponding memory share of the request event is increased to a corresponding value based on the difference between the average freeze duration and the preset average freeze duration.
[0107] In this embodiment, the freeze duration refers to the duration of a response delay or pause that occurs during the execution of a request event.
[0108] Specifically, the increase in the corresponding memory share of the request event is positively correlated with the difference in the freeze duration, where the positive correlation is, for example, a linear positive correlation or a nonlinear positive correlation, and the linear slope of the linear positive correlation is not specifically limited. It can be understood that the larger the difference in the freeze duration, the greater the increase in the corresponding memory share of the request event; the freeze duration difference is the difference between the average freeze duration and the preset average freeze duration.
[0109] Embodiment 1: A user sends 5 request events and obtains the historical CPU utilization of each request event, which are 23%, 35%, 34%, 20%, and 45%, respectively. An event request trigger characteristic parameter F=2.512TFLOPS is obtained. If the obtained event request trigger characteristic parameter is greater than a preset event request trigger threshold of 2TFLOPS, it is determined to use a class of resource allocation methods to allocate resources to the request event.
[0110] Under the first type of resource allocation mode, a load power of 300 W is obtained, and the obtained load power is less than a preset load power of 320 W, so it is determined that the resource allocation of the request event meets the preset standard.
[0111] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0112] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A resource allocation method based on event response, characterized in that: include: In response to a user sending a request event, detecting the number of request events within a first preset time period and the historical CPU utilization rate of each request event, and determining an event request triggering characteristic parameter according to the historical CPU utilization rate of each request event; Determining the type of initial resource allocation for the request event based on the event request trigger characteristic parameter, the type of initial resource allocation including a first resource allocation mode and a second resource allocation mode; Under a type of resource allocation mode, when the load power of the system within the second preset time period is detected and it is determined according to the load power that the resource allocation of the request event does not meet the preset standard, the corresponding resource allocation optimization strategy is determined according to the number of request events, including reducing the resource allocation ratio corresponding to each of the request events to a corresponding value, or reallocating resources after sorting the request events; Under the second resource allocation method, the average freeze duration of the request event within the second preset duration is obtained, and when it is determined that the resource allocation of the request event does not meet the preset standard according to the average freeze duration, the corresponding memory share of the request event is increased to the corresponding value; The process of calculating the event request trigger feature parameters includes: Solve the product of the historical CPU utilization rate of the request event and each computing power influencing factor to obtain the request trigger feature component; Solving the mean of the request trigger feature components corresponding to each request event to obtain the event request trigger feature parameter; The trigger influencing factors include the number of cores of the CPU, the single-core main frequency of the CPU, and the floating-point operations of the CPU; The process of determining the type of initial resource allocation based on the event request triggering characteristic parameter includes: Compare the event request trigger characteristic parameter with the preset event request trigger threshold; If the event request trigger characteristic parameter is less than the preset event request trigger threshold, the second type of resource allocation method is used to allocate resources for the request event; If the event request trigger characteristic parameter is greater than or equal to the preset event request trigger threshold, a resource allocation method is used to allocate resources to the request event; Among them, one type of resource allocation method is a resource allocation method in which resources are allocated according to the requirements of the request event before the request event is executed, and the resource allocation does not change during the execution of the request event; The second type of resource allocation method is a resource allocation method that dynamically allocates resources according to the current resource allocation situation and the needs of the request event when the request event needs resources during the running process.
2. The resource allocation method based on event response according to claim 1, characterized in that: In the first resource allocation mode, it is determined whether the resource allocation of the request event meets the preset standard according to the load power, wherein: If the load power is less than the preset load power, determining that the resource allocation of the request event meets the preset standard; If the load power is greater than or equal to the preset load power, it is determined that the resource allocation of the request event does not meet the preset standard, and a corresponding resource allocation optimization strategy is determined according to the number of the request events.
3. The resource allocation method based on event response according to claim 2, characterized in that: Determine the corresponding resource allocation optimization strategy according to the number of request events, wherein: If the number of the request events is less than the preset number, reducing the resource allocation ratio corresponding to each of the request events to a corresponding value according to the difference between the number of the request events and the preset number; If the number of the request events is greater than or equal to the preset number, the request events are sorted and resources are reallocated.
4. The resource allocation method based on event response according to claim 3, characterized in that: The ordering method of the request events includes: reallocating resources for each of the request events according to the priority of each of the request events; Under the condition that the priorities of the request events are the same, reallocating resources according to the load power of each request event; The priority is sorted based on the importance of each of the request events.
5. The resource allocation method based on event response according to claim 4, characterized in that: There are several resource adjustment methods for reducing the resource allocation ratio corresponding to the request event, among which: If the quantity difference is less than the first preset quantity difference, the first preset resource adjustment coefficient is used to reduce the resource allocation ratio corresponding to the request event to a corresponding value; If the quantity difference is greater than or equal to the first preset quantity difference and less than the second preset quantity difference, the resource allocation ratio corresponding to the request event is reduced to a corresponding value using the second preset resource adjustment coefficient; If the quantity difference is greater than or equal to the second preset quantity difference, then using a third preset resource adjustment coefficient to reduce the resource allocation ratio corresponding to the request event to a corresponding value; The quantity difference is the difference between the quantity of the requested events and a preset quantity.
6. The resource allocation method based on event response according to claim 5, characterized in that: Under the first preset condition, there are several resource correction methods for the correction of the resource allocation ratio corresponding to the request event, wherein: If the execution time difference is less than the first preset event execution difference, the resource corresponding to the request event is corrected to a corresponding value using the first preset correction coefficient; If the execution time difference is greater than or equal to the first preset event execution difference and less than the second preset event execution difference, the resource corresponding to the request event is corrected to a corresponding value using a second preset correction coefficient; If the execution time difference is greater than or equal to the second preset event execution difference, the resource corresponding to the request event is corrected to a corresponding value using a third preset correction coefficient; The first preset condition is that the resource allocation ratio corresponding to the request event has been adjusted and the adjusted average execution time of the event exceeds the preset average execution time; the execution time difference is the difference between the adjusted average execution time of the event and the preset average execution time.
7. The resource allocation method based on event response according to claim 6, characterized in that: Under the second resource allocation mode, whether the resource allocation of the request event meets the preset standard is determined according to the average freeze duration of the request event within the second preset duration, wherein: If the average freeze duration is less than the preset average freeze duration, it is determined that the resource allocation of the request event meets the preset standard; If the average freeze duration is greater than or equal to the preset average freeze duration, it is determined that the resource allocation of the request event does not meet the preset standard, and the corresponding memory share of the request event is increased to a corresponding value based on the difference between the average freeze duration and the preset average freeze duration.
8. The method for resource allocation based on event response according to claim 7, characterized in that: The increase in the corresponding memory usage of the request event is positively correlated with the difference in the freeze duration, wherein the difference in the freeze duration is the difference between the average freeze duration and the preset average freeze duration.
Citation Information
Patent Citations
Resource allocation method and device, equipment and storage medium
CN112101727A
Image frame drawing method and device and terminal equipment
CN118135054A
Processing method and device of computing power and network service, and storage medium
CN119030972A