Executor control method, electronic equipment, storage medium and program product

By monitoring the execution body resource information, dynamic capacity expansion, current limit and derating, the response delay problem of mimicry defense systems in insufficient resources or high concurrency scenarios is solved, the system's compressive resistance and stability are improved, and the security is enhanced.

CN119065850APending Publication Date: 2024-12-03BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411201006.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In the case of insufficient resources or high concurrency, existing mimic defense technology may cause the execution body to respond delay or failure, especially in resource attacks or high concurrency, which affects the duration of the judgment feedback and the response speed of the final vote. There is a mimic escape event risk.

Method used

By monitoring the resource information of the execution body, comparing the resource occupancy rate with the capacity expansion threshold, dynamically expanding or limiting the current, reassigning resources, giving priority to the execution request to the execution body that does not reach the capacity expansion threshold, and de-capacity or canceling when resources are insufficient Current limit ensures that the system can respond quickly when resources are insufficient.

Benefits of technology

It improves the compressive resistance of the executor, ensures rapid response in the absence of resources, enhances the stability and security of the mimic defense system, and avoids delays or response failures caused by insufficient resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065850A_ABST
    Figure CN119065850A_ABST
Patent Text Reader

Abstract

The invention provides an executor management and control method, electronic equipment, a storage medium and a program product. The method comprises the steps of obtaining resource information of an executor; comparing the resource occupancy rate of the execution body in the resource information of the execution body with a capacity expansion threshold value, and determining a target execution body; under the condition that the available resources of the executive body meet the capacity expansion condition, capacity expansion is conducted on the target executive body, and a capacity expansion flag bit is set for the target executive body, or under the condition that the available resources of the executive body do not meet the capacity expansion condition, flow limiting is conducted on the target executive body, and a flow limiting flag bit is set for the target executive body; under the condition that the resource occupancy rate of the execution body with the capacity expansion flag bit in the execution bodies is lower than a capacity reduction threshold value, resources of the execution bodies are redistributed, and the execution request is preferentially distributed to the execution bodies which do not reach the capacity expansion threshold value; and the execution body runs the execution request according to the redistributed resources. And the anti-pressure capability of the execution body is improved, so that response can be quickly made under the condition that resources are insufficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of heterogeneous execution body control, and in particular to an execution body control method, electronic device, storage medium and program product. Background Art

[0002] The endless security issues in the cyberspace environment can be solved through mimetic defense. Mimetic defense changes the staticness and determinism of the target system through dynamics and randomness. Through heterogeneous redundant multi-mode voting design, it can identify and block unknown attacks and unknown threats, thereby enhancing the security of cyberspace.

[0003] In common network devices, fast-response applications are required to improve efficiency and operational experience. Existing mimicry protection technology performs verification checks on the voter based on vulnerability attacks at multiple levels. When attacked by resource-based attacks or in high-concurrency scenarios, the overall mimicry resources are insufficient, which will affect the decision feedback time and the final vote response speed, and there is a possibility of mimicry escape events. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a management and control method of an execution body, an electronic device, a storage medium and a computer program product, so as to solve the problem of delay or response failure of the execution body when resources are insufficient.

[0005] The embodiment of the present application adopts the following technical solution: a method for controlling an execution body, comprising:

[0006] Obtaining resource information of an executable body, wherein the executable body is a heterogeneous executable body;

[0007] Comparing the resource occupancy rate of the executable body in the resource information of the executable body with the expansion threshold, and determining the target executable body;

[0008] If the available resources of the executable body meet the expansion conditions, the target executable body is expanded and an expansion flag is set for the target executable body; or, if the available resources of the executable body do not meet the expansion conditions, the target executable body is limited and a current limiting flag is set for the target executable body;

[0009] When the resource occupancy rate of the executable body with the expansion flag in the executable body is lower than the capacity reduction threshold, the resources of the executable body are reallocated, and the execution request is preferentially distributed to the executable body that has not reached the expansion threshold;

[0010] The execution body runs the execution request according to the reallocated resources.

[0011] In some embodiments, obtaining resource information of an executable body includes:

[0012] Obtain the CPU occupancy information, memory occupancy information and storage space occupancy information of all executable bodies;

[0013] The CPU usage information, memory usage information and storage space usage information are stored.

[0014] In some embodiments, comparing the resource occupancy rate of the executable body in the resource information of the executable body with the expansion threshold to determine the target executable body includes:

[0015] determining a first number of executables among the executables as distributed executables;

[0016] The resource occupancy rate of each distribution executor is compared with the expansion threshold respectively, and the distribution executor that reaches the expansion threshold is determined as the first target executor; wherein the resource occupancy rate of a second number of the distribution executors among the distribution executors reaches the expansion threshold, and the second number is less than half of the first number.

[0017] In some embodiments, the method further comprises:

[0018] The resource occupancy rate of each of the distribution execution bodies is compared with the expansion threshold respectively, and all the distribution execution bodies are determined as second target execution bodies; wherein the resource occupancy rate of a third number of the distribution execution bodies among the distribution execution bodies reaches the expansion threshold, and the third number is greater than or equal to half of the first number.

[0019] In some embodiments, comparing the resource occupancy rate of the executable body in the resource information of the executable body with the expansion threshold to determine the target executable body includes:

[0020] The resource occupancy rate of each of the execution bodies is compared with the expansion threshold respectively. If there is an execution body whose resource occupancy rate reaches the expansion threshold among the execution bodies, the execution body reaching the expansion threshold is determined as the third target execution body.

[0021] In some embodiments, the method further comprises:

[0022] When the available resources of the executable body do not meet the expansion condition, determining whether there is an executable body that does not reach the expansion threshold;

[0023] In the case where there is an execution body that does not reach the expansion threshold, randomly distribute the execution request to the execution body that does not reach the expansion threshold;

[0024] In the case that there is no executor that does not reach the expansion threshold, current limiting is performed on the third target executor.

[0025] In some embodiments, when the resource occupancy rate of the executable body having the capacity expansion flag in the executable body is lower than the capacity reduction threshold, the method further includes:

[0026] Reducing the capacity of the execution body having the expansion flag bit and the resource occupancy rate being lower than the reduction threshold;

[0027] Compare the resource size of the reduced capacity executive with the initial resource size;

[0028] When the resource size of the executable body after the capacity reduction is smaller than the initial resource size, the resource of the executable body after the capacity reduction is set as the initial resource;

[0029] Remove the expansion flag of the executable that is set as the initial resource.

[0030] In some embodiments, when the resource occupancy rate of the executable body having the capacity expansion flag in the executable body is lower than the capacity reduction threshold, the method further includes:

[0031] In the case that there is an executable body with a current limiting flag bit among the executable bodies, comparing the resource occupancy rate of the executable body with the current limiting flag bit within a set time with the capacity reduction threshold;

[0032] When the resource occupancy rate of the execution body with the current limiting flag is less than the capacity reduction threshold, the current limiting flag is released.

[0033] In some embodiments, the method further comprises:

[0034] When both the capacity expansion flag and the current limiting flag exist in one execution body, the current limiting flag is released first.

[0035] The present application also provides an electronic device, including: a memory and a processor, wherein an executable program is stored in the memory, and the processor executes the executable program to implement the steps of any method described in the above embodiments.

[0036] The present application also provides a storage medium, which carries one or more computer programs / instructions. When the one or more computer programs / instructions are executed by a processor, the steps of the method described in any of the above embodiments are implemented.

[0037] The present application also provides a computer program product, including a computer program / instruction, which implements the steps of any method described in the above embodiments when executed by a processor.

[0038] The beneficial effects of the embodiments of the present application are:

[0039] By summarizing the resource information of the executor and comparing the resource information of the executor with the expansion threshold, the target executor is expanded or limited; by comparing the resource information of the executor with the reduction threshold with the resource information of the executor with the expansion flag, the resources of the executor are reallocated, thereby improving the pressure resistance of the executor and enabling a quick response when resources are insufficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0041] Figure 1 A flowchart of the control method of the execution body of this application;

[0042] Figure 2 This is a structural diagram of the mimicry defense system of this application;

[0043] Figure 3 For this application Figure 1 A flowchart of an embodiment of step S10;

[0044] Figure 4 For this application Figure 1 A flowchart of an embodiment of step S20;

[0045] Figure 5 For this application Figure 1 A flowchart of an embodiment of step S40;

[0046] Figure 6 For this application Figure 1 A flowchart of another embodiment of step S40;

[0047] Figure 7 This is a structural block diagram of the electronic device of this application. DETAILED DESCRIPTION

[0048] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0049] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0050] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0051] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0052] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0053] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0054] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0055] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0056] To solve the problems in the background technology, the present application provides a method for controlling an executor, which can be applied to a domain mimic defense system. In the field of cyberspace security, mimic defense aims to respond to unknown threats in cyberspace through dynamic heterogeneous redundant construction. Of course, it is understandable that the method can also be applied to other systems. Among them, the executor can be a heterogeneous executor, and multiple heterogeneous processors are usually used as heterogeneous executors. Heterogeneous executors are a core concept in the mimic defense architecture. Specifically, a heterogeneous executor refers to a system in which there are multiple executors (or functional bodies), which are different in internal structure but present the same or similar functions to the outside. This design enables the system to have the characteristics of dynamic heterogeneous redundancy, that is, the system can respond to different security threats and business needs by dynamically adjusting the combination and state of the executor. Heterogeneous executors can present uncertain disturbances to the outside through dynamic online and offline, replacement and other operations, thereby increasing the difficulty and cost of the attacker's attack. There are redundant functions between multiple heterogeneous executors, and even if some executors fail or are attacked, the system can still maintain the stable operation of the overall function. The system uses a mimetic arbitration mechanism to judge the outputs of multiple executors and select the best or most consistent results as the final output, thereby eliminating possible errors or attack effects. The system can schedule and allocate resources based on factors such as the performance weight, heterogeneity, and service quality of the executor to optimize system performance. Through the redundancy and dynamic adjustment of heterogeneous executors, the system can achieve load balancing and avoid performance bottlenecks caused by overloading a single executor.

[0057] The resource quota used by the executable mainly includes three aspects: CPU (central processing unit), memory, and storage space, covering common resource quotas and usage control. When the allocated memory is exhausted, the executable will exit abnormally in various forms. The CPU will only be forced to execute when there is competition in time. After being restricted, the consequence is not that the program runs abnormally or exits abnormally, but that the performance is reduced. When the storage space is insufficient, the executable cannot be executed, and new files or directories cannot be created, and it crashes.

[0058] Combination Figure 1 , the control methods of the executive body include:

[0059] S10, obtaining resource information of an executable body, wherein the executable body is a heterogeneous executable body.

[0060] For example, taking the mimicry defense system as an example, the mimicry is composed of multiple mimicry components, such as Figure 2As shown in the figure, the mimic defense system includes heterogeneous executors, input distributors, output voters, feedback controllers, etc. Among them, the heterogeneous executors are responsible for heterogeneous executors according to different levels and allocating related resources. The input distributor is responsible for copying and distributing the request message sent by the client to multiple heterogeneous executors. The output voter is responsible for comparing and judging the response information received from each heterogeneous executor. The feedback controller is responsible for scheduling and cleaning the heterogeneous executors.

[0061] The present application can obtain resource information of each heterogeneous executor through the monitoring manager. In one embodiment, the resource information of the heterogeneous executor may include resource information corresponding to the CPU, memory, and storage space of the executor. By aggregating resource information, the execution input distributor, heterogeneous executor, and output voter are dynamically managed and controlled so that the output arbiter can make a fast output response, and the heterogeneous executor can maintain a more stable and fast response, thereby avoiding abnormal operation and the like.

[0062] For example, a heterogeneous executor has a default resource allocation of S, including CPU, memory, and storage space (e.g., 1-core CPU, 2G memory, and 10G storage space). Collect the resources S1, S2, ... Sn occupied by each heterogeneous executor, and the remaining available resources availalbe_resource is the difference between the total resources of the executor total_resource and the resources occupied by all heterogeneous executors (S1+S2+...+Sn).

[0063] S20, comparing the resource occupancy rate of the executable body in the resource information of the executable body with the expansion threshold, and determining a target executable body.

[0064] Exemplarily, the resource information of the heterogeneous executors is summarized and judged, and then the target executor is determined. For example, the expansion threshold can be set to I, and the reduction threshold can be set to J. For example, I can be 80%, and J can be 50%. Of course, the numerical values ​​of the above expansion threshold and reduction threshold can be set according to specific circumstances and needs. This is only used as an example and does not constitute a limitation on the scope of protection of the claims. The default resources S of the heterogeneous executor, S can be a 2-core CPU, 8G memory and 200G storage space, the specified time is T (for example, T can be 10 minutes), and the available resources of n heterogeneous executors are A, A=total_resource-(S1+S2+...+Sn).

[0065] The resource occupancy rate of the executable body in the resource information of the executable body is compared with the capacity expansion threshold I, and then the target executable body is determined from all heterogeneous executable bodies, so as to perform corresponding capacity expansion or current limiting operations on the target executable body.

[0066] S30. When the available resources of the execution entity meet the expansion conditions, expand the target execution entity and set an expansion flag for the target execution entity; or when the available resources of the execution entity do not meet the expansion conditions, throttle the target execution entity and set a throttling flag for the target execution entity.

[0067] Exemplarily, in one embodiment, there are n heterogeneous execution entities in the mimic defense system. Within a specified time T, if x execution entities less than half of the heterogeneous execution entities reach the expansion threshold I and the available resources can be expanded (A >= x * 0.5S), perform an expansion operation on the heterogeneous execution entities (target execution entities) that reach the expansion threshold I and set an expansion flag for them. If the available resources cannot be expanded (A < x * 0.5S), perform a throttling operation on the heterogeneous execution entities (target execution entities) that reach the expansion threshold I and add a throttling flag to them.

[0068] Within the specified time T, if half or more of the execution entities reach the expansion threshold I, perform an expansion operation on all heterogeneous execution entities (target execution entities). When the available resources can be expanded (A >= n * 0.5S), add an expansion flag to all heterogeneous execution entities. If the available resources cannot be expanded (A < n * 0.5S), perform a throttling operation on all heterogeneous execution entities (target execution entities) and add a throttling flag to them.

[0069] Among them, the expansion operation includes stopping each heterogeneous execution entity, reallocating resources, and restarting the execution entity after the resource reallocation. For example, when reallocating resources, the resources can be expanded from S to 1.5S. Of course, they can also be expanded to 1.2S or 1.6S. The specific expansion ratio can be set according to specific needs. This is only an example and does not constitute a limitation on the protection scope of the claims.

[0070] The throttling operation may include that the input distributor sets corresponding traffic according to the current resource situation of the heterogeneous execution entity. When the output arbiter encounters data returned by an execution entity with a throttling flag, it can ignore requests outside the traffic.

[0071] S40. When the resource occupancy rate of the execution entity with the expansion flag in the execution entity is lower than the degradation threshold, reallocate the resources of the execution entity and preferentially distribute execution requests to the execution entity that has not reached the expansion threshold.

[0072] Exemplarily, within the specified time T, if there is an executable body with an expansion flag in the executable body, it means that the executable body has been expanded at least once. At this time, it can be determined whether it is lower than the capacity reduction threshold J within the specified time T. If the resource occupancy rate of the executable body with the expansion flag is lower than the capacity reduction threshold J, it can be reduced. The capacity reduction operation includes stopping the executable body, reallocating resources to the executable body, and restarting the executable body after the resources are reconfigured. Dynamic adjustment of the executable body resources is achieved, solving the problem of delays or response failures of the executable body when resources are insufficient. For example, resources can be reallocated, and the capacity can be reduced from the current resource S to 0.8S, or it can be reduced to 0.6S or 0.5S. If its resource occupancy rate after capacity reduction is less than the initial resource value S0, it can return from the current resource to the initial resource value S0, and its expansion operation can be released.

[0073] The monitoring manager can also send execution requests to the distributor, and then distribute the execution requests to the executors that have not reached the expansion threshold through the input distributor to solve the problem of insufficient memory affecting the operation of the executors.

[0074] S50: The execution body runs the execution request according to the reallocated resources.

[0075] Exemplarily, after the resources are reallocated, the execution body receives the reallocated execution request and runs according to the reallocated resources, so that the running execution body can allocate resources more evenly, so that the execution body can run more quickly and stably.

[0076] The embodiment of the present application summarizes the resource information of the execution body, and expands or limits the target execution body according to the comparison between the resource information of the execution body and the expansion threshold; and reallocates the resources of the execution body according to the comparison between the resource information of the execution body with the expansion flag and the reduction threshold, thereby improving the pressure resistance of the execution body and enabling a quick response in the case of insufficient resources. For the mimic defense system, the resource control scope is improved and the overall security of the mimic is enhanced.

[0077] In addition, the embodiment of the present application not only manages and controls the mimic resources, but also can transfer resources to a certain extent when the resources of the mimic defense system and the resources of other applications of the device are preempted, thereby enhancing the liquidity of resources and improving the utilization rate of resources by the device.

[0078] In some embodiments, Figure 3 As shown, the resource information of the executable is obtained, including:

[0079] S101, obtaining the CPU occupancy information, memory occupancy information and storage space occupancy information of all execution bodies.

[0080] Exemplarily, the monitoring manager can monitor the resource information related to the executor, such as the occupancy information of the central processing unit, the occupancy information of the memory, and the occupancy information of the storage space, etc., and then summarize the above resource information of the monitored executor, and dynamically manage the input distributor, executor and output voter based on the above resource information to improve the stability of the mimicry defense system.

[0081] S102, storing the occupancy information of the central processing unit, the occupancy information of the memory, and the occupancy information of the storage space.

[0082] Exemplarily, the CPU occupancy information, memory occupancy information and storage space occupancy information can be stored in a set location to facilitate the aggregation of the above resource information, and a vote on resource reallocation can be made based on the relationship between the stored resource information.

[0083] For example, weights can be set for the impact of CPU occupancy information, memory occupancy information, and storage space occupancy information on the running speed of the executable body, and a comprehensive judgment can be made based on the weights and the occupancy rate of resource information to better achieve the reallocation of executable body resources.

[0084] In some embodiments, Figure 4 As shown, comparing the resource occupancy rate of the executable body in the resource information of the executable body with the expansion threshold to determine the target executable body includes:

[0085] S201, determining a first number of executable bodies in the executable bodies as distributed executable bodies.

[0086] Exemplarily, in the selective distribution mode, the execution bodies s1, s2, s3, and s4 can be designated as distribution execution bodies. Here, the first number is 4. Of course, it can be understood that other execution bodies can also be designated as distribution execution bodies, and 5 or 6 execution bodies can also be designated as distribution execution bodies. The first number and the designation of the distribution execution bodies can be set according to specific needs. This is only used as an example and does not constitute a limitation on the scope of protection of the claims.

[0087] Continuing with the above embodiment, the execution request can be distributed to the four designated online distribution execution bodies, and then the resource information of the four distribution execution bodies is monitored and stored, and the stored resource information is summarized and judged.

[0088] S202, respectively compare the resource occupancy rate of each of the distribution execution bodies with the expansion threshold, and determine the distribution execution body that reaches the expansion threshold as the first target execution body; wherein, a second number of the distribution execution bodies among the distribution execution bodies have a resource occupancy rate that reaches the expansion threshold, and the second number is less than half of the first number.

[0089] Exemplarily, an expansion threshold I is set, a reduction threshold J is set (for example, I is 80%, J is 50%), the default resource S of the executor (for example, S is 0.5 core CPU, 256M memory and 20G storage space), a specified time T (for example, T is 10 minutes), and the available resource A of the executor (for example, A is total_resource-(S1+S2+...+Sn)). Within the specified time T, if all the resources of the executors have reached the expansion threshold I, no operation is performed. If within the specified time T, there are less than half of the distribution executors whose resource occupancy rate reaches the expansion threshold I, the executor that reaches the expansion threshold I is determined as the first target executor. And if the available resources can be expanded, the distribution executor that reaches the expansion threshold I can be expanded. For example, the default resource S is expanded to 1.5S, and the expansion flag of the distribution executor is increased to indicate that the distribution executor has been expanded. Of course, the expansion ratio here can also be 1.2 or 1.6, etc., and the specific setting can be based on actual conditions.

[0090] In some embodiments, the method further comprises:

[0091] The resource occupancy rate of each of the distribution execution bodies is compared with the expansion threshold respectively, and all the distribution execution bodies are determined as second target execution bodies; wherein the resource occupancy rate of a third number of the distribution execution bodies among the distribution execution bodies reaches the expansion threshold, and the third number is greater than or equal to half of the first number.

[0092] Exemplarily, if within the specified time T, the resource occupancy rate of half or more of the executors does not reach the expansion threshold I, then all executors are determined as second target executors. Then the expansion operation is performed on all executors. When the available resources can be expanded (A>=4*0.5S), all executors are expanded from the default resource S to 1.5S, and the expansion flag is set for all executors. When the available resources cannot be expanded (A<4*0.5S), all executors are current-limited, and the current-limit flag of all executors is increased.

[0093] In some embodiments, comparing the resource occupancy rate of the executable body in the resource information of the executable body with the expansion threshold to determine the target executable body includes:

[0094] The resource occupancy rate of each of the execution bodies is compared with the expansion threshold respectively. If there is an execution body whose resource occupancy rate reaches the expansion threshold among the execution bodies, the execution body reaching the expansion threshold is determined as the third target execution body.

[0095] For example, for the random distribution mode, 4 are randomly designated as distribution execution bodies from s1 to sn, where n is a positive integer greater than or equal to 4. Each distribution randomly designates an execution body as the distribution execution body. For example, in the first random distribution, s1, s3, s5, and s8 are randomly distributed, where n is a positive integer greater than or equal to 8; in the second distribution, s1, s2, s4, and s7 are randomly distributed. Of course, other execution bodies can also be randomly distributed, and this is just an example.

[0096] Randomly distribute the execution request to the four executors from s1 to sn, monitor and store the resource information of all executors, and summarize and judge the stored resource information. Set the expansion threshold I, set the reduction threshold J (for example: I is 80%, J is 50%), the default resource S of the executor (for example: S is 0.5 core CPU, 256M memory and 20G storage space), specify the time T (for example: T is 10 minutes), and the available resource A of the executor (for example: A is total_resource-(S1+S2+...+Sn)). Within the specified time T, if the resources of all executors do not reach the expansion threshold I, no operation will be performed. Within the specified time T, if there is an executor that reaches the expansion threshold I, the executor that reaches the expansion threshold I will be determined as the third target executor, and when the available resources can be expanded (A>=0.5S), the executor that reaches the expansion threshold I will be expanded, for example, from the default resource S to 1.5S, and its expansion flag will be increased.

[0097] In the selective scheduling mode, when half or more of the executors reach the threshold, all executors are expanded. In the random scheduling mode, when the memory is insufficient, the execution request is distributed to the executors that have not reached the threshold through the input distributor, which supports the executors' ability to withstand pressure in high-concurrency scenarios and solves the problem of delays or response failures when the executors are short of resources. The dynamic control capability of the executors in the mimic defense system is increased to improve the system stability.

[0098] In some embodiments, the method further comprises:

[0099] When the available resources of the execution body do not meet the expansion condition, it is determined whether there is an execution body that does not reach the expansion threshold.

[0100] Exemplarily, if all executables have reached the expansion threshold, there is no executable that has not reached the expansion threshold.

[0101] In the case that there is an execution body that does not reach the expansion threshold, the execution request is randomly distributed to the execution body that does not reach the expansion threshold.

[0102] For example, if at least one of all the executors does not reach the expansion threshold, the execution request is distributed to the executor that does not reach the expansion threshold through the input distributor. When the memory is insufficient under random scheduling, the request is distributed to the executor that does not reach the threshold through the distributor. This supports the stress resistance of the executor in high-concurrency scenarios and solves the problem of delay or response failure when the executor is short of resources.

[0103] For example, if the available resources cannot be expanded (A<0.5S), first determine whether there is an executor that has not reached the expansion threshold I within the specified time T. If so, the execution request is randomly forwarded to the executor that has not reached the expansion threshold I through the input distributor, and the output arbiter is changed according to the forwarded executor.

[0104] In the case that there is no executor that does not reach the expansion threshold, current limiting is performed on the third target executor.

[0105] For example, if there is no executable body that does not reach the expansion threshold I, a current limiting operation is performed on it, and its current limiting flag is increased. This prevents the mimic defense system from being overloaded or crashing due to excessive access. By limiting the number of requests for executable body resources within a certain period of time, the stability and reliability of the system can be ensured.

[0106] In some embodiments, Figure 5 As shown, when the resource occupancy rate of the executable body having the expansion flag in the executable body is lower than the capacity reduction threshold, the method further includes:

[0107] S401, reducing the capacity of the execution body having the expansion flag bit and the resource occupancy rate of which is lower than the capacity reduction threshold.

[0108] Exemplarily, when there is an executable with an expansion flag, and its resource occupancy rate does not reach the capacity reduction threshold J within the specified time T, a capacity reduction operation is performed on it. For example, the capacity is reduced from the current resource S to 0.8S. The resource allocation of the executable is reduced to reduce its load and energy consumption.

[0109] S402, comparing the resource size of the executable body after the capacity reduction with the initial resource size.

[0110] Exemplarily, in combination with the above embodiment, when the initial resource size is S0 and the resource size of the executable body after capacity reduction is 0.8S, the resource size of the executable body after capacity reduction is smaller than the initial resource size.

[0111] S403: When the resource size of the executable body after the capacity reduction is smaller than the initial resource size, the resources of the executable body after the capacity reduction are set as the initial resources.

[0112] For example, if the resources of the reduced-capacity executable body are smaller than the initial resource size, it may affect the running performance of the executable body and its basic running speed and running capacity cannot be guaranteed. At this time, the resources of the reduced-capacity executable body can be set to the initial resources to ensure its basic running performance.

[0113] S404, cancel the expansion flag bit of the executable body set as the initial resource.

[0114] Exemplarily, when the resources of the reduced-capacity execution body are set as initial resources, an expansion operation is performed on the execution body to enable it to run with the initial resources.

[0115] In some embodiments, Figure 6 As shown, when the resource occupancy rate of the executable body having the expansion flag in the executable body is lower than the capacity reduction threshold, the method further includes:

[0116] S405: When there is an executable body with a current limiting flag bit among the executable bodies, compare the resource occupancy rate of the executable body with the current limiting flag bit within a set time with the capacity reduction threshold.

[0117] S406: When the resource occupancy rate of the execution body with the current limiting flag is less than the capacity reduction threshold, remove the current limiting flag.

[0118] Exemplarily, when there is an execution body with a current limiting flag, it is determined whether its resource occupancy rate within the specified time T is lower than the capacity reduction threshold J. If the resource occupancy rate of the execution body with the current limiting flag is lower than the capacity reduction threshold J, its current limiting operation is triggered and its current limiting flag is released so that it can ensure basic operating capabilities.

[0119] In some embodiments, the method further comprises:

[0120] When both the capacity expansion flag and the current limiting flag exist in an execution body, the current limiting flag is removed first, so as to restore the running performance of the execution body as soon as possible.

[0121] Based on the same inventive concept, the embodiment of the present application also provides an electronic device, such as Figure 7 As shown, the electronic device includes: a memory and a processor, wherein the memory stores executable programs / instructions, and the processor executes the executable programs / instructions to implement the steps of the method described above.

[0122] The processor may be a general purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The general purpose processor may be a microprocessor or any conventional processor.

[0123] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0124] An embodiment of the present application further provides a storage medium, wherein the storage medium carries one or more computer programs, and when the one or more computer programs are executed by a processor, the steps of the above method are implemented.

[0125] The storage medium in this embodiment may be included in the electronic device / system; or it may exist independently without being assembled into the electronic device / system. The above storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present application is implemented.

[0126] According to an embodiment of the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0127] Based on the same inventive concept, an embodiment of the present application further provides a computer program product, including a computer program / instruction, which implements any of the methods described in the above embodiments when executed by a processor.

[0128] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, electronic equipment, computer-readable storage media or computer program products. Therefore, the present application may adopt the form of complete hardware embodiments, complete software embodiments or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media that include computer-usable program code. When implemented by software, these functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0129] Multiple embodiments of the present application are described in detail above, but the present application is not limited to these specific embodiments. Those skilled in the art can make various variations and modifications to the embodiments based on the concept of the present application, and these variations and modifications should all fall within the scope of protection required by the present application.

Claims

1. A method for controlling an execution body, characterized in that: include: Obtaining resource information of an executable body, wherein the executable body is a heterogeneous executable body; Comparing the resource occupancy rate of the executable body in the resource information of the executable body with the expansion threshold, and determining the target executable body; If the available resources of the executable body meet the expansion conditions, the target executable body is expanded and an expansion flag is set for the target executable body; or, if the available resources of the executable body do not meet the expansion conditions, the target executable body is limited and a current limiting flag is set for the target executable body; When the resource occupancy rate of the executable body with the expansion flag in the executable body is lower than the capacity reduction threshold, the resources of the executable body are reallocated, and the execution request is preferentially distributed to the executable body that has not reached the expansion threshold; The execution body runs the execution request according to the reallocated resources.

2. The method for controlling an executive body according to claim 1, characterized in that: Get resource information of the executable, including: Obtain the CPU occupancy information, memory occupancy information and storage space occupancy information of all executable bodies; The CPU usage information, memory usage information and storage space usage information are stored.

3. The method for controlling an executive body according to claim 1, characterized in that: Comparing the resource occupancy rate of the executable body in the resource information of the executable body with the expansion threshold to determine the target executable body includes: determining a first number of executables among the executables as distributed executables; The resource occupancy rate of each distribution executor is compared with the expansion threshold respectively, and the distribution executor that reaches the expansion threshold is determined as the first target executor; wherein the resource occupancy rate of a second number of the distribution executors among the distribution executors reaches the expansion threshold, and the second number is less than half of the first number.

4. The method for controlling an executive body according to claim 3, characterized in that: The method further comprises: The resource occupancy rate of each of the distribution execution bodies is compared with the expansion threshold respectively, and all the distribution execution bodies are determined as second target execution bodies; wherein the resource occupancy rate of a third number of the distribution execution bodies among the distribution execution bodies reaches the expansion threshold, and the third number is greater than or equal to half of the first number.

5. The method for controlling an executive body according to claim 1, characterized in that: Comparing the resource occupancy rate of the executable body in the resource information of the executable body with the expansion threshold to determine the target executable body includes: The resource occupancy rate of each of the execution bodies is compared with the expansion threshold respectively. If there is an execution body whose resource occupancy rate reaches the expansion threshold among the execution bodies, the execution body reaching the expansion threshold is determined as the third target execution body.

6. The method for controlling an executive body according to claim 5, characterized in that: The method further comprises: When the available resources of the executable body do not meet the expansion condition, determining whether there is an executable body that does not reach the expansion threshold; In the case where there is an executable body that does not reach the expansion threshold, randomly distribute the execution request to the executable body that does not reach the expansion threshold; In the case that there is no executor that does not reach the expansion threshold, current limiting is performed on the third target executor.

7. The method for controlling an executive body according to claim 1, characterized in that: When the resource occupancy rate of the executable body having the capacity expansion flag in the executable body is lower than the capacity reduction threshold, the method further includes: Reducing the capacity of the execution body having the expansion flag bit and the resource occupancy rate being lower than the reduction threshold; Compare the resource size of the reduced capacity executive with the initial resource size; When the resource size of the executable body after the capacity reduction is smaller than the initial resource size, the resource of the executable body after the capacity reduction is set as the initial resource; Remove the expansion flag of the executable that is set as the initial resource.

8. The method for controlling an executive body according to claim 1, characterized in that: When the resource occupancy rate of the executable body having the capacity expansion flag in the executable body is lower than the capacity reduction threshold, the method further includes: In the case that there is an executable body with a current limiting flag bit among the executable bodies, comparing the resource occupancy rate of the executable body with the current limiting flag bit within a set time with the capacity reduction threshold; When the resource occupancy rate of the execution body with the current limiting flag is less than the capacity reduction threshold, the current limiting flag is released.

9. The method for controlling an executive body according to claim 1, characterized in that: The method further comprises: When both the capacity expansion flag and the current limiting flag exist in one execution body, the current limiting flag is released first.

10. An electronic device, characterized in that: include: A memory and a processor, wherein an executable program is stored in the memory, and the processor executes the executable program to implement the steps of the method according to any one of claims 1 to 9.

11. A storage medium, characterized in that: The storage medium carries one or more computer programs / instructions, and when the one or more computer programs / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method as claimed in any one of claims 1 to 9 are implemented.