Container-based industrial Internet of Things edge computing resource allocation method and system
By monitoring and dynamically allocating resources in resource containers, the problem of unreasonable resource allocation in the existing technology is solved, and more efficient resource use and task processing is achieved.
Patent Information
- Application Number
- CN202211219581.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2042-09-30
AI Technical Summary
The existing industrial IoT edge computing resource allocation method requires pre-evaluation of the performance of the system platform, which can easily lead to insufficient physical resources, unreasonable resource allocation, and affect resource utilization and task processing efficiency.
By monitoring the running load of the resource container, when the load exceeds the threshold, calculate the required resources to be replenished, and compare it with the remaining allocable resources of the resource container whose running load is less than the threshold, determine the resource container to be divided, and hang the remaining resources of the resource container. Loading into a container with excessive load can realize dynamic allocation of resources.
It realizes dynamic resource allocation of resource containers when executing tasks, avoids the problem of insufficient physical resources, and improves resource utilization and task processing efficiency.
Smart Images

Figure CN115686827B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computers, and in particular to a container-based industrial Internet of Things edge computing resource allocation method and system. Background Art
[0002] At present, edge computing in the industrial Internet of Things refers to processing and analyzing data at the edge nodes of the network. It is a method of computing and storing data at a physical location closer to data generation. It aggregates and preprocesses the traffic uploaded to the data center, so that industrial applications are not restricted by access bandwidth and cost limitations, and meet the strict requirements of industrial applications for real-time, reliability and security.
[0003] The current technical architecture uses a fixed method to allocate resources for container use. Consider the initial position of the container set to provide matching resources, and then set the threshold value in the configuration file to provide adaptive functions for capabilities so that resources can be scaled horizontally or vertically accordingly. Horizontal expansion means increasing the number of containers, and vertical expansion means allocating more resources to each container. On the other hand, the use of threshold strategies requires comprehensive knowledge of how to set threshold parameters and requires prior understanding of the application load in the container. In edge computing scenarios, containers are load balanced on heterogeneous clouds and edge servers to further achieve combined optimization of multiple objectives.
[0004] However, in the existing resource allocation and scheduling methods, it is necessary to conduct a subjective and rough evaluation of the performance of the system platform in advance to determine the physical resource quota that needs to be allocated, and then create a virtual machine. Then, according to the strategy, the task is scheduled to the virtual machine for processing. After manually conducting a subjective and rough evaluation of the system platform to be deployed, it is easy to cause insufficient physical resources and affect the normal operation of the system platform, resulting in unreasonable resource allocation, which will affect the resource utilization rate and task processing efficiency. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a container-based industrial Internet of Things edge computing resource allocation method and system, aiming to solve the technical problems raised in the above background technology.
[0006] To achieve the above object, the present invention provides the following technical solutions.
[0007] In a first aspect, in an embodiment of the present invention, a container-based industrial Internet of Things edge computing resource allocation method is provided, and the resource allocation method comprises the following steps:
[0008] In response to the resource allocation request, monitoring whether there is an operating load of a resource container exceeding a threshold;
[0009] If so, calculate the resources to be supplemented required by the resource container whose running load exceeds the threshold to meet the task running, obtain the resource container whose running load is less than the threshold, calculate the remaining allocatable resources of each resource container whose running load is less than the threshold, compare the resources to be supplemented with each of the remaining allocatable resources, and determine a resource container to be split according to the comparison result;
[0010] The remaining allocatable resources of the resource container to be split are mounted to the resource container whose running load exceeds the threshold, and the tasks are continued to be executed in the mounted resource container.
[0011] In one embodiment of the present invention, the step of calculating the resources to be supplemented required by the resource container whose running load exceeds the threshold to meet the task running includes:
[0012] Acquire a property value of a resource container whose running load exceeds a threshold, wherein the property value includes a basic resource volume of the resource container and a running resource volume required by a container application deployed on the resource container;
[0013] The resources to be supplemented are calculated according to the basic resource volume and the running resource volume, and the resources to be supplemented are the difference between the sum of the running resource volume and the running threshold and the basic resource volume.
[0014] In an embodiment provided by the present invention, the step of obtaining a resource container whose running load is less than a threshold comprises:
[0015] Obtaining attribute values of the resource container, the attribute values including the basic resource volumes of the resource container and the running resource volumes required by the container application deployed on the resource container;
[0016] The resource container whose difference between the running resource volume and the basic resource volume is less than the threshold is used as the resource container whose running load is less than the threshold.
[0017] In one embodiment provided by the present invention, the step of calculating the remaining allocatable resources of each resource container whose running load is less than a threshold comprises:
[0018] The difference between the basic resource volume and the running resource volume in the current resource container is calculated, and the remaining resource volume after deducting the running threshold from the difference is used as the remaining allocatable resource.
[0019] In an embodiment of the present invention, the step of comparing the resource to be supplemented with each of the remaining allocatable resources and determining a resource container to be divided according to the comparison result includes:
[0020] Compare the resource to be supplemented with each of the remaining allocatable resources one by one;
[0021] taking at least one resource container whose remaining allocatable resources are greater than the resources to be supplemented as a candidate resource container group;
[0022] Calculating a fault tolerance value of each resource container in the candidate resource container group, where the fault tolerance value is a difference between remaining allocatable resources and resources to be supplemented, and sorting the at least one resource container according to the fault tolerance value;
[0023] The resource container to be divided is determined based on the sorting result.
[0024] In an embodiment provided by the present invention, the step of determining the resource container to be split based on the ranking result includes: taking the resource container ranked first as the resource container to be split.
[0025] In an embodiment provided by the present invention, the step of mounting the remaining allocatable resources of the resource container to be split into the resource container whose running load exceeds the threshold comprises:
[0026] In response to the resource unloading request, unloading the resource volume of the remaining allocatable resources of the resource container to be divided to form a new expansion volume;
[0027] In response to the resource expansion request, the new expansion volume is mounted to the resource container whose running load exceeds a threshold.
[0028] In a second aspect, in an embodiment of the present invention, a container-based industrial Internet of Things edge computing resource allocation system is provided, and the allocation system includes:
[0029] An operation monitoring module, the monitoring module being used to monitor whether an operation load of a resource container exceeds a threshold in response to a resource allocation request;
[0030] A container selection module, wherein the container selection module is used to, when the execution result of the monitoring module is yes, calculate the resources to be supplemented required by the resource container whose running load exceeds the threshold to meet the task running, obtain the resource container whose running load is less than the threshold, calculate the remaining allocatable resources of each resource container whose running load is less than the threshold, compare the resources to be supplemented with each of the remaining allocatable resources, and determine a resource container to be split according to the comparison result;
[0031] A task execution module is used to mount the remaining allocatable resources of the resource container to be split into the resource container whose running load exceeds the threshold, and continue to execute tasks in the mounted resource container.
[0032] In a third aspect, in an embodiment of the present invention, a computer device is provided, the computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor;
[0033] Among them, when the processor executes the computer-readable instructions, it implements the container-based industrial Internet of Things edge computing resource allocation method provided in the first aspect.
[0034] In a fourth aspect, the present invention also provides a computer-readable storage medium;
[0035] The computer-readable storage medium stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the container-based industrial Internet of Things edge computing resource allocation method provided in the first aspect.
[0036] Compared with the prior art, the container-based industrial Internet of Things edge computing resource allocation method and system provided by the present invention, when there is a resource container whose operating load exceeds a threshold, calculates the resource container whose operating load exceeds the threshold to meet the resources to be supplemented required for task operation, obtains resource containers whose operating load is less than the threshold, calculates the remaining allocatable resources of each resource container whose operating load is less than the threshold, compares the resources to be supplemented with each of the remaining allocatable resources, and determines a resource container to be divided according to the comparison result; mounts the remaining allocatable resources of the resource container to be divided into the resource container whose operating load exceeds the threshold, and continues to execute the task in the mounted resource container, so as to realize dynamic allocation of resources of each resource container when executing tasks, and solves the problem that the traditional method easily causes insufficient physical resources and affects the normal operation of the system platform, causes unreasonable resource allocation, and affects the resource utilization rate and task processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention.
[0038] Figure 1 A system architecture diagram of the present invention for implementing a container-based industrial Internet of Things edge computing resource allocation method;
[0039] Figure 2 This is a flowchart of the implementation of the container-based industrial Internet of Things edge computing resource allocation method of the present invention;
[0040] Figure 3 A sub-flow chart of the resource allocation method provided by the present invention;
[0041] Figure 4 Another sub-flow chart of the resource allocation method provided by the present invention;
[0042] Figure 5 Another sub-flow chart of the resource allocation method provided by the present invention;
[0043] Figure 6 Another sub-flow chart of the resource allocation method provided by the present invention;
[0044] Figure 7 This is a structural block diagram of the container-based industrial Internet of Things edge computing resource allocation system of the present invention;
[0045] Figure 8 The present invention provides a structural block diagram of a computer device. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] In addition, the technical features of the various embodiments or single embodiments provided by the present invention may be arbitrarily combined with each other to form a feasible technical solution. Such combination is not restricted by the sequence of steps and / or the structural composition pattern, but must be based on the ability of ordinary technicians in the field to implement it. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0048] It is understandable that in the current resource allocation and scheduling method of industrial Internet of Things edge computing, it is necessary to conduct a subjective and rough evaluation of the performance of the system platform in advance to determine the physical resource quota that needs to be allocated, and then create a virtual machine. Then, according to the strategy, the task is scheduled to the virtual machine for processing. After a subjective and rough evaluation of the system platform to be deployed, it is easy to cause insufficient physical resources and affect the normal operation of the system platform, resulting in unreasonable resource allocation, which will affect the resource utilization rate and task processing efficiency.
[0049] To solve the above problems, the present invention provides a container-based industrial Internet of Things edge computing resource allocation method and system. When there is a resource container whose operating load exceeds a threshold, the resource container whose operating load exceeds the threshold is calculated to meet the resources to be supplemented required for task operation, and the resource container whose operating load is less than the threshold is obtained. The remaining allocatable resources of each resource container whose operating load is less than the threshold are calculated, and the resources to be supplemented are compared with each of the remaining allocatable resources. A resource container to be divided is determined according to the comparison result; the remaining allocatable resources of the resource container to be divided are mounted to the resource container whose operating load exceeds the threshold, and the task is continued to be executed in the mounted resource container. This can realize the dynamic allocation of resources of each resource container when executing tasks, and solves the problem that the traditional method easily causes insufficient physical resources and affects the normal operation of the system platform, causes unreasonable resource allocation, and affects the resource utilization rate and task processing efficiency.
[0050] Figure 1 The system architecture diagram of the present invention for implementing a container-based industrial Internet of Things edge computing resource allocation method is shown exemplarily.
[0051] like Figure 1 As shown, the container resource allocation method provided by the present application can be applied to Figure 1 In the application environment shown, the terminal 101 communicates with the server 102 through a network. The terminal 101 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server 102 may be implemented as a server cluster consisting of multiple servers.
[0052] Example 1
[0053] like Figure 2 As shown, in an embodiment of the present invention, a container-based industrial Internet of Things edge computing resource allocation method is provided to solve the problem that the traditional method is prone to cause insufficient physical resources and affect the normal operation of the system platform, resulting in unreasonable resource allocation, which will affect the resource utilization rate and task processing efficiency.
[0054] In the embodiment of the present invention, the resource allocation method comprises the following steps:
[0055] Step S201: In response to a resource allocation request, monitor whether a running load of a resource container exceeds a threshold;
[0056] In the specific implementation of step S201 provided by the present invention, the operating load of each resource container is monitored in real time, and it is determined whether the operating load of the currently monitored resource container exceeds a threshold. If it exceeds the threshold, a response is required; if it does not exceed the threshold, no response is required.
[0057] It can be understood that, in the embodiment of the present invention, the threshold value in the operating load exceeding the threshold value is a set value, which can be set as needed and is not specifically limited.
[0058] Step S202: If yes, calculate the resources to be supplemented required by the resource containers whose running load exceeds the threshold to meet the task running, obtain the resource containers whose running load is less than the threshold, calculate the remaining allocatable resources of each resource container whose running load is less than the threshold, compare the resources to be supplemented with each of the remaining allocatable resources, and determine a resource container to be split according to the comparison result;
[0059] Among them, in the specific implementation of step S202 provided by the present invention, when the running load of the resource container in step S201 exceeds the threshold, step S202 is executed. Specifically, it is necessary to further calculate the resource containers whose running load exceeds the threshold to meet the resources to be supplemented when the task is running, and call the resource containers whose running load is less than the threshold to calculate the remaining allocatable resources that can be used, so as to provide the remaining allocatable resources of other resource containers to the containers that need to be supplemented for use, so as to meet the normal operation requirements of the resource containers without exceeding the threshold.
[0060] Step S203: Mount the remaining allocatable resources of the resource container to be split into the resource container whose running load exceeds the threshold, and continue to execute the task in the mounted resource container.
[0061] In the use of step S203 provided in the embodiment of the present invention, the resource demand of the resource container in the running state is met by dynamically mounting and allocating the resources of different resource containers.
[0062] Therefore, in the container-based industrial Internet of Things edge computing resource allocation method provided by the present invention, when there is a resource container whose operating load exceeds a threshold, the resource container whose operating load exceeds the threshold is calculated to meet the resources to be supplemented required for the task to be run, and the resource container whose operating load is less than the threshold is obtained, and the remaining allocatable resources of each resource container whose operating load is less than the threshold are calculated, and the resources to be supplemented are compared with each of the remaining allocatable resources, and a resource container to be divided is determined according to the comparison result; the remaining allocatable resources of the resource container to be divided are mounted to the resource container whose operating load exceeds the threshold, and the task is continued to be executed in the mounted resource container, so that the dynamic allocation of resources of each resource container when executing the task can be realized, which solves the problem that the traditional method easily causes insufficient physical resources and affects the normal operation of the system platform, causes unreasonable resource allocation, and affects the resource utilization rate and task processing efficiency.
[0063] Further, such as Figure 3 As shown, in an embodiment of the present invention, the step of calculating the resource containers whose running load exceeds the threshold to meet the resources to be supplemented when the task is running includes:
[0064] Step S301: Acquire the attribute value of the resource container whose running load exceeds the threshold, wherein the attribute value includes the basic resource volume of the resource container and the running resource volume required by the container application deployed on the resource container;
[0065] Step S302: Calculate the resources to be supplemented according to the basic resource volume and the running resource volume, where the resources to be supplemented are the sum of the running resource volume and the running threshold minus the difference between the basic resource volume and the running threshold.
[0066] It can be understood that in step S302 provided by the present invention, by setting the operation threshold, a certain margin space is reserved when the resource container is running, thereby ensuring the stability of the resource container during operation and reducing downtime and freezes.
[0067] like Figure 4 As shown, in this embodiment of the present invention, the step of obtaining a resource container whose running load is less than a threshold includes:
[0068] Step S401: Acquire attribute values of a resource container, where the attribute values include a basic resource volume of the resource container and a running resource volume required by a container application deployed on the resource container;
[0069] Step S402: The resource container whose difference between the running resource volume and the basic resource volume is less than the threshold is used as the resource container whose running load is less than the threshold.
[0070] In one embodiment provided by the present invention, the step of calculating the remaining allocatable resources of each resource container whose running load is less than a threshold comprises:
[0071] The difference between the basic resource volume and the running resource volume in the current resource container is calculated, and the remaining resource volume after deducting the running threshold from the difference is used as the remaining allocatable resource.
[0072] Similarly, in an embodiment of the present invention, during the configuration of the remaining allocatable resources, by setting the operating threshold, a certain amount of margin space is reserved when the resource container is running, thereby ensuring the stability of the resource container during operation and reducing downtime and freezes.
[0073] like Figure 5 As shown, in the embodiment of the present invention, the step of comparing the resource to be supplemented with each of the remaining allocatable resources and determining a resource container to be divided according to the comparison result includes:
[0074] Step S501: Compare the resource to be supplemented with each of the remaining allocatable resources one by one;
[0075] Step S502: taking at least one resource container whose remaining allocatable resources are greater than the resources to be supplemented as a candidate resource container group;
[0076] Step S503: Calculate the fault tolerance value of each resource container in the candidate resource container group, where the fault tolerance value is the difference between the remaining allocatable resources and the resources to be supplemented, and sort the at least one resource container according to the fault tolerance value;
[0077] Step S504: Determine the resource container to be divided based on the sorting result.
[0078] In the specific implementation of step S504 provided by the present invention, sorting is performed based on the size of the fault tolerance value, and the fault tolerance values are arranged in order from small to large to sort the multiple candidate resource container groups, and the top resource container to be split is further removed according to the sorting result.
[0079] Among them, in the embodiment of the present invention, the step of determining the resource container to be split based on the sorting result includes: taking the resource container ranked first as the resource container to be split, specifically, taking the candidate resource container with the smallest fault tolerance value as the resource container to be split.
[0080] like Figure 6 As shown, in this embodiment of the present invention, the step of mounting the remaining allocatable resources of the resource container to be split into the resource container whose running load exceeds the threshold includes:
[0081] Step S601: in response to a resource unloading request, unloading the resource volume of the remaining allocatable resources of the resource container to be divided to form a new expansion volume;
[0082] Step S602: In response to the resource expansion request, the new expansion volume is mounted to the resource container whose running load exceeds the threshold.
[0083] Example 2
[0084] like Figure 7 As shown, in an embodiment of the present invention, a container-based industrial Internet of Things edge computing resource allocation system is provided, and the allocation system 700 includes:
[0085] An operation monitoring module 701, the monitoring module is used to monitor whether there is an operation load of a resource container exceeding a threshold in response to a resource allocation request;
[0086] A container selection module 702, wherein the container selection module is used to, when the execution result of the monitoring module is yes, calculate the resources to be supplemented required by the resource container whose running load exceeds the threshold to meet the task running, obtain the resource container whose running load is less than the threshold, calculate the remaining allocatable resources of each resource container whose running load is less than the threshold, compare the resources to be supplemented with each of the remaining allocatable resources, and determine a resource container to be split according to the comparison result;
[0087] The task execution module 703 is used to mount the remaining allocatable resources of the resource container to be split into the resource container whose running load exceeds the threshold, and continue to execute the task in the mounted resource container.
[0088] Example 3
[0089] like Figure 8 As shown, in Embodiment 3 provided by the present invention, a computer device is provided.
[0090] Specifically, in an embodiment of the present invention, the computer device 800 includes a memory 801 and a processor 802, and the memory 801 stores a computer program. When the computer program is executed by the processor 802, the processor 802 executes the acne removal efficacy evaluation method based on oil determination as provided in the above-mentioned Example 1.
[0091] In the third embodiment of the present invention, the resource allocation method comprises the following steps:
[0092] Step S201: In response to a resource allocation request, monitor whether a running load of a resource container exceeds a threshold;
[0093] Step S202: If yes, calculate the resources to be supplemented required by the resource containers whose running load exceeds the threshold to meet the task running, obtain the resource containers whose running load is less than the threshold, calculate the remaining allocatable resources of each resource container whose running load is less than the threshold, compare the resources to be supplemented with each of the remaining allocatable resources, and determine a resource container to be split according to the comparison result;
[0094] Step S203: Mount the remaining allocatable resources of the resource container to be split into the resource container whose running load exceeds the threshold, and continue to execute the task in the mounted resource container.
[0095] In addition, the computer device 800 provided in the embodiment of the present invention may also have a communication interface 803 for receiving control instructions.
[0096] Example 4
[0097] In another preferred embodiment of the present invention, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the processor executes the acne-removing efficacy evaluation method based on oil determination as provided in the above-mentioned Example 1.
[0098] In the fourth embodiment of the present invention, the resource allocation method comprises the following steps:
[0099] Step S201: In response to a resource allocation request, monitor whether a running load of a resource container exceeds a threshold;
[0100] Step S202: If yes, calculate the resources to be supplemented required by the resource containers whose running load exceeds the threshold to meet the task running, obtain the resource containers whose running load is less than the threshold, calculate the remaining allocatable resources of each resource container whose running load is less than the threshold, compare the resources to be supplemented with each of the remaining allocatable resources, and determine a resource container to be split according to the comparison result;
[0101] Step S203: Mount the remaining allocatable resources of the resource container to be split into the resource container whose running load exceeds the threshold, and continue to execute the task in the mounted resource container.
[0102] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0103] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0104] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0105] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0106] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0107] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0108] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
[0109] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A container-based industrial Internet of Things edge computing resource allocation method, characterized in that: The resource allocation method comprises the following steps: monitoring whether there is a resource container whose operating load exceeds a threshold in response to a resource allocation request; If so, calculate the resources to be supplemented required by the resource container whose running load exceeds the threshold to meet the task running, obtain the resource container whose running load is less than the threshold, calculate the remaining allocatable resources of each resource container whose running load is less than the threshold, compare the resources to be supplemented with each of the remaining allocatable resources, and determine a resource container to be split according to the comparison result; Mounting the remaining allocatable resources of the resource container to be split to the resource container whose running load exceeds the threshold, and continuing to execute the task in the mounted resource container; The step of calculating the resources to be supplemented required by the resource container whose running load exceeds the threshold to meet the task running includes: obtaining the attribute value of the resource container whose running load exceeds the threshold, the attribute value including the basic resource volume of the resource container and the running resource volume required by the container application deployed on the resource container; Calculating the resources to be supplemented according to the basic resource volume and the running resource volume, the resources to be supplemented being the sum of the running resource volume and the running threshold minus the difference between the basic resource volume; The step of obtaining a resource container whose running load is less than a threshold comprises: obtaining a property value of the resource container, wherein the property value comprises a basic resource volume of the resource container and a running resource volume required by a container application deployed on the resource container; The resource container whose difference between the running resource volume and the basic resource volume is less than the threshold is used as the resource container whose running load is less than the threshold; The step of calculating the remaining allocatable resources of each resource container whose operating load is less than the threshold comprises: calculating the difference between the basic resource volume and the operating resource volume in the current resource container, and taking the remaining resource volume after deducting the operating threshold from the difference as the remaining allocatable resources; The step of comparing the resource to be supplemented with each of the remaining allocatable resources and determining a resource container to be divided according to the comparison result comprises: comparing the resource to be supplemented with each of the remaining allocatable resources one by one; taking at least one resource container whose remaining allocatable resources are greater than the resources to be supplemented as a candidate resource container group; Calculating a fault tolerance value of each resource container in the candidate resource container group, where the fault tolerance value is a difference between remaining allocatable resources and resources to be supplemented, and sorting the at least one resource container according to the fault tolerance value; Determine the resource container to be split based on the sorting result; The step of determining the resource container to be split based on the sorting result includes: taking the resource container ranked first as the resource container to be split; The step of mounting the remaining allocatable resources of the resource container to be split into the resource container whose running load exceeds the threshold comprises: in response to a resource unloading request, unloading the resource volume of the remaining allocatable resources of the resource container to be split to form a new expansion volume; In response to the resource expansion request, the new expansion volume is mounted to the resource container whose running load exceeds a threshold.
2. The container-based industrial IoT edge computing resource allocation system is characterized by: The allocation system is used to execute the allocation method according to claim 1, and the allocation system comprises: an operation monitoring module, the monitoring module is used to monitor whether there is an operation load of a resource container exceeding a threshold in response to a resource allocation request; A container selection module, wherein the container selection module is used to, when the execution result of the monitoring module is yes, calculate the resources to be supplemented required by the resource container whose running load exceeds the threshold to meet the task running, obtain the resource container whose running load is less than the threshold, calculate the remaining allocatable resources of each resource container whose running load is less than the threshold, compare the resources to be supplemented with each of the remaining allocatable resources, and determine a resource container to be split according to the comparison result; A task execution module is used to mount the remaining allocatable resources of the resource container to be split into the resource container whose running load exceeds the threshold, and continue to execute tasks in the mounted resource container.
3. Computer equipment, characterized in that The computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor; Wherein, when the processor executes the computer-readable instructions, the container-based industrial Internet of Things edge computing resource allocation method as described in claim 1 is implemented.
4. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the container-based industrial Internet of Things edge computing resource allocation method as described in claim 1.
Citation Information
Patent Citations
Container resource allocation method and device, computer equipment and storage medium
CN110597623A
Container resources management method and device for power application in power terminal
CN113157390A