CN111400045B - Load balancing method and device - Google Patents

Load balancing method and device Download PDF

Info

Publication number
CN111400045B
CN111400045B CN202010183135.1A CN202010183135A CN111400045B CN 111400045 B CN111400045 B CN 111400045B CN 202010183135 A CN202010183135 A CN 202010183135A CN 111400045 B CN111400045 B CN 111400045B
Authority
CN
China
Prior art keywords
internet
event data
key event
load node
flow information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010183135.1A
Other languages
Chinese (zh)
Other versions
CN111400045A (en
Inventor
徐立峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision System Technology Co Ltd
Original Assignee
Hangzhou Hikvision System Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision System Technology Co Ltd filed Critical Hangzhou Hikvision System Technology Co Ltd
Priority to CN202010183135.1A priority Critical patent/CN111400045B/en
Publication of CN111400045A publication Critical patent/CN111400045A/en
Application granted granted Critical
Publication of CN111400045B publication Critical patent/CN111400045B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5022Workload threshold
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/508Monitor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The embodiment of the application provides a load balancing method and device, wherein the method comprises the following steps: acquiring first current instantaneous flow information of various key event data from the to-be-accessed Internet of things equipment, and acquiring second current instantaneous flow information of various load nodes for processing the various key event data; according to fitting relations between various key event data and various resource state data of each load node, and a plurality of first current instantaneous flow information and a plurality of second current instantaneous flow information corresponding to each load node, determining predicted instantaneous values of various resource state data of each load node under the condition that the to-be-accessed internet-of-things device is accessed to each load node; selecting a target load node from load nodes with predicted instantaneous values of various resource state data lower than a preset state threshold value; and accessing the to-be-accessed Internet of things equipment into the target load node. By applying the technical scheme provided by the embodiment of the application, the load balancing is realized, and the waste of resources is reduced.

Description

Load balancing method and device
Technical Field
The application relates to the technical field of object coupling, in particular to a load balancing method and device.
Background
Along with the rapid development of big data technology and Internet of things technology, more and more Internet of things devices are connected to an Internet of things connection system. In the face of huge access pressures, distributed architecture is widely used in internet of things systems. In the distributed architecture, the load balancing technology is one of the most important links, and the effect of load balancing directly influences the access capability and the stable and reliable performance of the object coupling system.
Currently, load balancing methods for commodity coupling systems include: the resource status data such as the utilization rate of the central processing unit (Central Processing Unit, CPU), the utilization rate of the memory, the utilization rate of the bandwidth and the like are converted into a comprehensive performance index. The larger the comprehensive performance index of the load node is, the worse the effect of accessing the load node is, the smaller the comprehensive performance index of the load node is, and the better the effect of accessing the load node is; the Internet of things equipment is accessed or migrated into the load node with large comprehensive performance index.
However, in practical applications, the load node with a smaller overall performance index is not necessarily a better choice, and the load node with a larger overall performance index is not necessarily a worse choice. For example, a load node has a higher CPU consumption, a more abundant memory and bandwidth, but the overall performance index of the node is higher, and the load node is not necessarily the preferred choice when a new internet of things device is accessed or migrated, but the load node is the preferred choice for an internet of things device with a lower CPU consumption and a higher memory or bandwidth consumption. Therefore, by adopting the load balancing method in the related technology, the access of the internet of things equipment is subjected to load balancing, and the problems of uneven load and resource waste are also frequently caused.
Disclosure of Invention
The embodiment of the application aims to provide a load balancing method and device, so as to realize load balancing and reduce resource waste. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a load balancing method, where the method includes:
acquiring first current instantaneous flow information of various key event data from the to-be-accessed internet of things equipment, and acquiring second current instantaneous flow information of the various key event data processed by a plurality of load nodes;
determining a predicted instantaneous value of the plurality of resource state data of each load node under the condition that the to-be-accessed internet-of-things device is accessed to each load node according to fitting relations between the plurality of key event data and the plurality of resource state data of each load node and a plurality of first current instantaneous flow information and a plurality of second current instantaneous flow information corresponding to each load node;
selecting a target load node from load nodes of which the predicted instantaneous values of the various resource state data are lower than a preset state threshold value;
and accessing the to-be-accessed Internet of things equipment to the target load node.
Optionally, before determining the predicted instantaneous values of the plurality of resource status data of each load node in the case that the to-be-accessed internet of things device accesses each load node, the method further comprises:
Acquiring historical flow information of each load node for processing the various key event data in a preset time period and historical values of the various resource state data of each load node;
and fitting the historical values of the plurality of resource state data of each load node and the historical flow information of the plurality of key event data to obtain the fitting relation between the plurality of key event data and the plurality of resource state data of each load node.
Optionally, before acquiring the first current instantaneous flow information of the plurality of key event data from the to-be-accessed internet of things device, the method further includes:
acquiring current instantaneous values of the various resource state data of a first load node, and processing current instantaneous flow information of the various key event data by the first load node, wherein the first load node is a load node in which target resource state data with the current instantaneous values larger than a preset state threshold exists in the various resource state data;
determining target key event data affecting the target resource state data in the plurality of key event data and target flow information of the target key event data when the target resource state data reaches the preset state threshold according to fitting relations between the plurality of key event data and the plurality of resource state data of the first load node;
Determining to-be-migrated flow information according to the target flow information and the current instantaneous flow information of the target key event data processed by the first load node;
and according to the flow information to be migrated and third current instantaneous flow information of the plurality of key event data from each Internet of things device processed by the first load node, determining the to-be-accessed Internet of things device from each Internet of things device.
Optionally, the step of determining the to-be-accessed internet of things device from each internet of things device according to the to-be-migrated traffic information and the third current instantaneous traffic information of the plurality of key event data from each internet of things device processed by the first load node includes:
selecting a first type of Internet of things device which transmits the target key event data and does not transmit other key event data from all Internet of things devices from which the plurality of key event data processed by the first load node come;
and if the third current instantaneous flow information of the target key event data from the selected first type of Internet of things equipment is processed by the first load node and is more than or equal to the flow information to be migrated, taking the selected first type of Internet of things equipment as the to-be-accessed Internet of things equipment.
In a second aspect, an embodiment of the present application provides a load balancing apparatus, where the apparatus includes:
the first acquisition unit is used for acquiring first current instantaneous flow information of various key event data from the to-be-accessed Internet of things equipment and acquiring second current instantaneous flow information of the various key event data processed by the plurality of load nodes;
the first determining unit is used for determining a predicted instantaneous value of the plurality of resource state data of each load node under the condition that the to-be-accessed internet of things device is accessed to each load node according to the fitting relation between the plurality of key event data and the plurality of resource state data of each load node and a plurality of first current instantaneous flow information and a plurality of second current instantaneous flow information corresponding to each load node;
a selecting unit, configured to select a target load node from load nodes whose predicted instantaneous values of the plurality of resource status data are all lower than a preset status threshold;
and the access unit is used for accessing the to-be-accessed internet-of-things equipment to the target load node.
Optionally, the apparatus further includes:
the second obtaining unit is used for obtaining historical flow information of processing the various key event data by each load node in a preset time period and historical values of the various resource state data of each load node before determining the predicted instantaneous values of the various resource state data of each load node under the condition that the to-be-accessed internet of things equipment is accessed to each load node;
And the fitting unit is used for fitting the historical values of the plurality of resource state data of each load node and the historical flow information of the plurality of key event data to obtain the fitting relation between the plurality of key event data and the plurality of resource state data of each load node.
Optionally, the apparatus further includes:
the third obtaining unit is configured to obtain, before obtaining first current instantaneous flow information of multiple kinds of critical event data from an internet of things device to be accessed, current instantaneous values of multiple kinds of resource state data of a first load node, and current instantaneous flow information of the multiple kinds of critical event data processed by the first load node, where the first load node is a load node in which target resource state data with a current instantaneous value greater than a preset state threshold exists in the multiple kinds of resource state data;
the second determining unit is used for determining target key event data affecting the target resource state data in the plurality of key event data and target flow information of the target key event data when the target resource state data reaches the preset state threshold according to fitting relations between the plurality of key event data and the plurality of resource state data of the first load node;
The third determining unit is used for determining to-be-migrated flow information according to the target flow information and the current instantaneous flow information of the target key event data processed by the first load node;
and the fourth determining unit is used for determining the to-be-accessed internet-of-things device from each internet-of-things device according to the to-be-migrated flow information and third current instantaneous flow information of the plurality of key event data from each internet-of-things device processed by the first load node.
Optionally, the fourth determining unit is specifically configured to:
selecting a first type of Internet of things device which transmits the target key event data and does not transmit other key event data from all Internet of things devices from which the plurality of key event data processed by the first load node come;
and if the third current instantaneous flow information of the target key event data from the selected first type of Internet of things equipment is processed by the first load node and is more than or equal to the flow information to be migrated, taking the selected first type of Internet of things equipment as the to-be-accessed Internet of things equipment.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
A memory for storing a computer program;
and the processor is used for realizing any one of the load balancing method steps when executing the program stored in the memory.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having a computer program stored therein, which when executed by a processor implements any of the load balancing method steps described above.
In a fifth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the load balancing method steps described above.
The embodiment of the application has the beneficial effects that:
in the load balancing method and device provided by the embodiment of the application, the fitting relation between the flow information of the plurality of key event data and the plurality of resource state data of each load node is preset, and based on the fitting relation, the influence of which key event data or key event data is mainly affected by each resource state data can be clearly determined. In this way, after the first current instantaneous flow information of various key event data from the to-be-accessed internet of things device is obtained, a target load node suitable for the to-be-accessed internet of things device to be accessed can be accurately determined, wherein the target load node is: after various key event data sent by the to-be-accessed internet of things equipment are accessed, the predicted instantaneous values of various resource state data are lower than the load nodes of the preset state threshold, resources in target load nodes are not wasted, and the waste of resources is reduced while load balancing is realized.
Of course, it is not necessary for any one product or method of practicing the application to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an embodiment of an object coupling system;
fig. 2 is a schematic flow chart of a load balancing method according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for determining a fit relationship between key event data and resource status data according to an embodiment of the present application;
fig. 4 is a schematic flow chart of a method for determining an internet of things device to be accessed according to an embodiment of the present application;
FIG. 5a is a graph of key event data provided by an embodiment of the present application;
FIG. 5b is a graph of resource status data provided by an embodiment of the present application;
Fig. 6 is a schematic structural diagram of a load balancing device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The object coupling system shown in fig. 1 comprises a monitoring node 11, a management node 12 and load nodes 13-15. The object coupling system may include a plurality of load nodes, only 3 load nodes being illustrated herein by way of example and not limitation.
At the commodity connection system, the load nodes 13-15 are responsible for carrying and processing data from the various commodity connection devices. Management node 12 is responsible for managing the access of the things to load nodes 12-15. The monitoring node 11 is responsible for monitoring the operation of the load nodes 13-15, and when detecting the fault or overload of the load nodes 13-15, notifying the management node 12 to migrate the internet of things device.
In the related art, the load balancing method of the object coupling system comprises the following steps: converting the resource state data such as the utilization rate of the CPU, the utilization rate of the memory, the utilization rate of the bandwidth and the like into a comprehensive performance index; the Internet of things equipment is accessed or migrated into the load node with large comprehensive performance index. However, in practical applications, the load node with a smaller overall performance index is not necessarily a better choice, and the load node with a larger overall performance index is not necessarily a worse choice. By adopting the load balancing method in the related technology, the access of the internet of things equipment is subjected to load balancing treatment, and the problems of uneven load and resource waste can occur frequently.
In order to solve the above problems, the embodiment of the application provides a load balancing method applied to an object coupling system. In the method, fitting relations between various key event data and various resource state data of each load node are preset, and based on the fitting relations, the fact that which or some key event data are mainly influenced by each resource state data can be clearly determined. In this way, after the first current instantaneous flow information of various key event data from the to-be-accessed internet of things device is obtained, a target load node suitable for the to-be-accessed internet of things device to be accessed can be accurately determined, wherein the target load node is: after various key event data sent by the to-be-accessed internet of things equipment are accessed, the predicted instantaneous values of various resource state data are lower than the load nodes of the preset state threshold, resources in target load nodes are not wasted, and the waste of resources is reduced while load balancing is realized.
The following describes a load balancing method provided by the embodiment of the present application in detail through a specific embodiment.
Referring to fig. 2, fig. 2 is a schematic flow chart of a load balancing method according to an embodiment of the present application. The load balancing method may be applied to the monitoring node 11 as shown in fig. 1. For convenience of description, the monitoring nodes are used as execution bodies, and the description is not limited. The load balancing method comprises the following steps.
Step 201, obtaining a first current instantaneous flow information of various key event data from the to-be-accessed internet of things device, and obtaining a second current instantaneous flow information of various load nodes for processing the various key event data.
In the embodiment of the application, the to-be-accessed internet-of-things device can be the internet-of-things device of the new access object access system, and can also be the internet-of-things device of the object access system, which needs to migrate the load node. If the to-be-accessed internet of things device is the internet of things device of the new access object access system, the plurality of load nodes may be part or all of load nodes of the object access system. If the to-be-accessed internet of things device is an internet of things device needing to migrate load nodes in the internet of things system, the plurality of load nodes can be part or all of load nodes except the load nodes needing to migrate the to-be-accessed internet of things device in the internet of things system.
The key event data is data of a class of events which have a larger influence on each load node in the object coupling system. By way of example, key events include, but are not limited to, sending facial makeup data, sending cloud storage data, sending message queues, maintaining internet of things device access, intelligent analysis, and the like. Accordingly, the key event data includes, but is not limited to, face data to be sent to a facial makeup (an analysis server), audio and video data to be sent to cloud storage, various signaling messages to be processed, data to be analyzed, and the like.
There are a variety of preset critical event data. Each internet of things device transmits one or more kinds of the preset key event data. For example, 3 kinds of preset key event data are provided, and the internet of things device 1 sends one kind of key event data in the 3 kinds of key event data, that is, the current instantaneous flow information of the key event data sent by the internet of things device 1 is not 0, and the current instantaneous flow information of the other two kinds of key event data sent by the internet of things device 1 is 0; the internet of things device 2 has sent two kinds of critical event data in the 3 kinds of critical event data, that is, the current instantaneous flow information of the internet of things device 2 sending the two kinds of critical event data is not 0, and the current instantaneous flow information of the internet of things device 2 sending other kind of critical event data is 0.
Each load node of the commodity coupling system processes critical event data from one or more commodity coupling devices. Take a critical event data, a load node as an example.
In one embodiment, the load node periodically reports to the monitoring node current instantaneous traffic information of the critical event data from each of the plurality of things connected to the load node, and current instantaneous traffic information of the critical event data processed by the load node. At this time, the monitoring node may periodically obtain the current instantaneous flow information of the key event data from each internet of things device reported by the load node, and the current instantaneous flow information of the key event data processed by the load node.
In yet another embodiment, the load node periodically reports current instantaneous traffic information from such critical event data from each of the things connected to the load node to the monitoring node. At this time, the monitoring node may periodically obtain the current instantaneous flow information of the key event data from each internet of things device reported by the load node, and obtain the current instantaneous flow information of the key event data processed by the load node based on the current instantaneous flow information of the key event data from each internet of things device reported by the load node.
If the to-be-accessed internet of things equipment is the internet of things equipment needing to migrate the load node in the internet of things system, the monitoring node can take the current instantaneous flow information of the key event data from the internet of things equipment reported by the load node accessed by the to-be-accessed internet of things equipment as first current instantaneous flow information; and taking the current instantaneous flow information of the key event data processed by the load nodes reported by a plurality of load nodes in other load nodes as second current instantaneous flow information.
If the to-be-accessed internet of things equipment is the internet of things equipment of the new access internet of things access system, the monitoring node can take the current instantaneous flow information of the key event data processed by the load nodes reported by the load nodes as second current instantaneous flow information; in addition, the to-be-accessed internet of things device can directly report the first current instantaneous flow information of various key event data from the to-be-accessed internet of things device to the monitoring node, or the to-be-accessed internet of things device can report the first current instantaneous flow information of various key event data from the to-be-accessed internet of things device to the monitoring node through the load node.
Step 202, determining a predicted instantaneous value of the plurality of resource state data of each load node under the condition that the to-be-accessed internet of things device is accessed to each load node according to the fitting relation between the plurality of key event data and the plurality of resource state data of each load node, and the first current instantaneous flow information of the plurality of key event data and the second current instantaneous flow information of the plurality of key event data processed by each load node.
In the embodiment of the application, the resource status data includes, but is not limited to, the CPU usage, the memory usage, the bandwidth usage, the connection number, and the like. The fitting relationship is used for representing the conversion relationship between the key event data and the resource state data. The fitting relation can be preset for a user to quickly determine the predicted instantaneous values of various resource state data. The fitting relationship may also be obtained according to a historical value of the resource status data when each load node processes multiple kinds of critical event data and a historical flow information of each load node processes multiple kinds of critical event data when the to-be-accessed internet of things device needs to be accessed into the system, which will not be described in detail herein.
In the embodiment of the present application, after the monitoring node executes step 201, for one key event data, a first current instantaneous flow information is obtained, and for multiple key event data, multiple first current instantaneous flow information may be obtained. Taking a load node as an example, after the monitoring node executes step 201, for one key event data, a second current instantaneous flow information is obtained, and for multiple key event data, multiple second current instantaneous flow information may be obtained.
The monitoring node predicts and determines the predicted instantaneous value of the plurality of resource state data of each load node under the condition that the to-be-accessed internet-of-things device is accessed to each load node according to the fitting relation between the plurality of key event data and the plurality of resource state data of each load node and the plurality of first current instantaneous flow information and the plurality of second current instantaneous flow information corresponding to each load node.
For example, the plurality of load nodes includes load nodes 1-3. The resource status data includes CPU usage and bandwidth usage. The key event data includes data a, data B, and data C.
Fitting relations between preset various key event data and various resource state data of a plurality of load nodes are shown in the following table 1.
TABLE 1
In Table 1, P f Flow information representing data A, P c Flow information representing data B, P m Flow information representing data C, P cpu Indicating CPU utilization, P net Representing bandwidth usage.
Monitoring nodeBased on the first current instantaneous flow information and the second current instantaneous flow information corresponding to the load node 1, it can be determined that the load node 1 processes the total instantaneous flow information P of the data A after the to-be-accessed internet of things device is accessed to the load node 1 f1 The load node 1 processes the total instantaneous traffic information P of the data B c1 The load node 1 processes the total instantaneous traffic information P of the data C m1
The monitoring node can determine the total instantaneous flow information P of the data A processed by the load node 2 after the to-be-accessed internet of things device is accessed to the load node 2 based on the plurality of first instantaneous flow information and the plurality of second instantaneous flow information corresponding to the load node 2 f2 The load node 2 processes the total instantaneous traffic information P of the data B c2 The load node 2 processes the total instantaneous traffic information P of the data C m2
The monitoring node can determine the total instantaneous flow information P of the data A processed by the load node 3 after the to-be-accessed internet of things device is accessed to the load node 3 based on the plurality of first instantaneous flow information and the plurality of second instantaneous flow information corresponding to the load node 3 f3 The load node 3 processes the total instantaneous traffic information P of the data B c3 The load node 3 processes the total instantaneous traffic information P of the data C m3
P-based f1 、P c1 And P m1 And the fitting relation in table 1, it is possible to determine the predicted instantaneous value 11 of the CPU usage rate and the predicted instantaneous value 12 of the bandwidth usage rate of the load node 1 in the case where the internet of things device to be accessed accesses the load node 1.
P-based f2 、P c2 And P m2 And the fitting relation in table 1, it is possible to determine the predicted instantaneous value 21 of the CPU usage rate and the predicted instantaneous value 22 of the bandwidth usage rate of the load node 2 in the case where the internet of things device to be accessed accesses the load node 2.
P-based f3 、P c3 And P m3 And the fitting relation in table 1, it is possible to determine the predicted instantaneous value 31 of the CPU usage rate and the predicted instantaneous value 32 of the bandwidth usage rate of the load node 3 in the case where the internet of things device to be accessed accesses the load node 3.
Step 203, selecting a target load node from load nodes with predicted instantaneous values of various resource state data lower than a preset state threshold.
In the embodiment of the application, the preset state threshold value can be set according to actual requirements. For example, the preset state threshold may be 70%, 80%, 85%, 90%, etc.
In one embodiment, for each load node, a monitoring node detects whether predicted instantaneous values of various resource status data of the load node are below a preset status threshold. And if the load nodes are lower than the preset state threshold value, the monitoring node takes the load node as a candidate node. The monitoring node selects one candidate node from the candidate nodes as a target load node.
In one example, the monitoring node randomly selects one candidate node from the candidate nodes as the target load node.
The example of step 202 will be described. The monitoring node determines, in the case of an access to the load node 1-3 by the internet of things device to be accessed, a predicted instantaneous value 11 of the CPU utilization of the load node 1 and a predicted instantaneous value 12 of the bandwidth utilization, a predicted instantaneous value 21 of the CPU utilization of the load node 2 and a predicted instantaneous value 22 of the bandwidth utilization, a predicted instantaneous value 31 of the CPU utilization of the load node 3 and a predicted instantaneous value 32 of the bandwidth utilization. If the predicted instantaneous value 11 and the predicted instantaneous value 12 are both smaller than the preset state threshold, the predicted instantaneous value 21 is smaller than the preset state threshold, the predicted instantaneous value 22 is larger than the preset state threshold, and the predicted instantaneous value 31 and the predicted instantaneous value 32 are both smaller than the preset state threshold, the load node 1 and the load node 3 are determined to be candidate nodes. The monitoring node randomly selects a candidate node from the load node 1 and the load node 3, for example, the load node 1 is selected, and the load node 1 is taken as a target load node.
In yet another example, the monitoring node may calculate an overall performance index for each candidate node, and select a candidate node with the smallest overall performance index from the candidate nodes as the target load node.
In the embodiment of the application, the monitoring node can also determine the target load node from the candidate nodes in other modes. This is not particularly limited.
And 204, accessing the to-be-accessed Internet of things equipment into the target load node.
The example in step 203 will be described as an example. And the monitoring node selects the load node 1 as a target load node, and the to-be-accessed internet-of-things equipment is accessed to the load node 1.
In the embodiment of the application, the monitoring node accurately locates the reason of the load bottleneck based on the fitting relation between various key event data and various resource state data of each load node, thereby overcoming the invalid and redundant load balancing behavior caused by converting the resource state data such as CPU utilization rate, memory utilization rate, bandwidth utilization rate and the like into a comprehensive performance index in the related technology, avoiding the problems of uneven load and resource waste, realizing load balancing and reducing the resource waste.
In one embodiment of the present application, before determining a predicted instantaneous value of a plurality of resource status data of each load node in a case where an internet of things device to be accessed accesses each load node, a monitoring node determines a fitting relationship between the plurality of key event data and the plurality of resource status data of each load node according to a historical value of the resource status data when each load node processes the plurality of key event data and historical traffic information of the plurality of key event data when each load node processes the plurality of key event data. In particular, referring to the flowchart of the method for determining the fit relationship between key event data and resource status data shown in fig. 3, the method may include the following steps.
Step 301, obtaining historical flow information of each load node processing various key event data in a preset time period, and historical values of various resource state data of each load node.
The preset time period refers to a time period from the current time to the current time being a preset duration. The preset time length can be set according to actual requirements. The historical flow information may be historical instantaneous flow information and the historical value may be a historical instantaneous value. The historical flow information may be historical average flow information in a certain period, and the historical value may be historical average value in a certain period.
For example, the key event data includes data a, data B, and data C. The resource status data includes CPU usage, memory usage, and bandwidth usage. The historical flow information is historical instantaneous flow information, and the historical value is historical instantaneous value. The current time is t9, and the preset time period is t1-t9. Taking a load node as an example, in a time period of t1-t9, the load node respectively acquires historical instant flow information 1 of the load node processing data A, historical instant flow information 2 of the load node processing data B and historical instant flow information 3 of the load node processing data C at the moments of t1, t2, t3, t4, t5, t6, t7 and t 8; in addition, the load node obtains the historical instantaneous value 1 of the CPU usage rate of the load node at the time t1, t2, t3, t4, t5, t6, t7 and t8, the historical instantaneous value 2 of the memory usage rate of the load node, and the historical instantaneous value 3 of the bandwidth usage rate of the load node.
Step 302, fitting the historical values of the various resource state data of each load node and the historical flow information of the various key event data to obtain the fitting relation between the various key event data and the various resource state data of each load node.
In the embodiment of the application, for each load node, a monitoring node fits the historical values of various resource state data of the load node and the historical flow information of various key event data to obtain the fitting relation between various key event data and various resource state data of the load node.
In the embodiment of the application, the monitoring node analyzes the historical values of various resource state data of each load node and the historical flow information of various key event data in real time, and updates the fitting relation between the flow information of various key event data and various resource state data of each load node. The method can ensure that the fitting relation stored in the monitoring node is reasonable and accurate, and further realize load balancing according to the stored fitting relation.
In one embodiment of the application, the to-be-accessed Internet of things device is an Internet of things device requiring migration of load nodes in an Internet of things system. In this case, the monitoring node needs to determine the to-be-accessed internet of things device before acquiring the first current instantaneous traffic information from the plurality of key event data of the to-be-accessed internet of things device. Specifically, referring to a flowchart of a method for determining an internet of things device to be accessed shown in fig. 4. The method may include the following steps.
Step 401, obtaining current instantaneous values of various resource status data of the first load node, and processing current instantaneous flow information of various key event data by the first load node. The first load node is a load node in which target resource state data with a current instantaneous value larger than a preset state threshold value exists in various resource state data.
In the embodiment of the present application, the first load node may be any one or more load nodes of a plurality of load nodes.
In one embodiment, for each load node, the monitoring node may periodically detect whether the current instantaneous value of each resource status data of that load node is greater than a preset status threshold. If the current instantaneous value of one or more resource state data is larger than the preset state threshold value, the monitoring node determines that the load node is a first load node, the one or more resource state data is target resource state data, the current instantaneous value of the plurality of resource state data of the load node is obtained, and the current instantaneous flow information of the load node for processing a plurality of key event data is processed.
In another embodiment, for each load node, the load node may periodically detect whether the current instantaneous value of each resource status data of the load node is greater than a preset status threshold. If one or more kinds of current instantaneous values of the resource state data are larger than a preset state threshold value, the load node is used as a first load node, the current instantaneous values of the plurality of kinds of resource state data of the load node are reported to the monitoring node, and the load node processes the current instantaneous flow information of the plurality of kinds of key event data.
Step 402, determining target key event data affecting target resource state data in the plurality of key event data and target flow information of the target key event data when the target resource state data reaches a preset state threshold according to fitting relations between the plurality of key event data and the plurality of resource state data of the first load node.
In the embodiment of the application, the monitoring node determines target key event data affecting target resource state data in the plurality of key event data according to the fitting relation between the plurality of key event data and the plurality of resource state data of the first load node, and determines target flow information of the target key event data when the target resource state data reaches a preset state threshold.
For example, the preset state threshold is 80%. As shown in table 1, if the target resource status data of the load node 1 is CPU utilization, the fitting relation of the load node 1 in table 1 is based onCan determine the target key event as P f And the flow information of the represented data A is further used for determining the target flow information of the data A when the CPU utilization rate reaches 80%.
In the embodiment of the application, the monitoring node determines the fitting relation between the plurality of kinds of key event data and the plurality of kinds of resource state data of each load node in real time according to the historical value of the resource state data when each load node processes the plurality of kinds of key event data and the historical flow information of each load node processes the plurality of kinds of key event data. To reduce the amount of computation, the monitoring node may determine only the fit relationship between the plurality of key event data and the target resource status data based on steps 301-302.
Step 403, determining the to-be-migrated traffic information according to the target traffic information and the current instantaneous traffic information of the first load node processing the target key event data.
In one embodiment, the monitoring node may calculate a difference between the target traffic information and the current instantaneous traffic information of the first load node processing the target key event data, to obtain the traffic information to be migrated. For example, the target traffic information is 200 pieces, the current instantaneous traffic information of the first load node processing the target key event data is 280 pieces, and then the monitoring node determines that the traffic information to be migrated is 280-200=80 pieces.
In another embodiment, the monitoring node may calculate a difference between the target traffic information and the current instantaneous traffic information of the first load node processing the target key event data; and calculating the product of the difference and a preset coefficient to obtain the information of the flow to be migrated. For example, the preset coefficient is 1.2. And if the target flow information is 200 pieces and the current instantaneous flow information of the target key event data processed by the first load node is 280 pieces, the monitoring node determines that the flow information to be migrated is (280-200) 1.2=96 pieces.
In the embodiment of the application, the monitoring node can also determine the flow information to be migrated in other modes, which is not particularly limited.
And step 404, determining the to-be-accessed internet-of-things device from each internet-of-things device according to the to-be-migrated flow information and third current instantaneous flow information of the plurality of key event data from each internet-of-things device processed by the first load node.
In one embodiment, in each of the internet-of-things devices from which the plurality of key event data processed by the first load node are received, that is, the internet-of-things device connected to the first load node, there is a first type of internet-of-things device that sends the target key event data and does not send other key event data. The monitoring node may select a first type of internet-of-things device that transmits the target key event data and does not transmit other key event data from among the respective internet-of-things devices from which the plurality of key event data processed by the first load node are derived. If the third current instantaneous flow information of the target key event data from the selected first type of Internet of things equipment is processed by the first load node and is more than or equal to the flow information to be migrated, the monitoring node takes the selected first type of Internet of things equipment as the equipment to be accessed.
In the embodiment of the application, the first type of Internet of things equipment transmits the target key event data, but does not transmit other key event data. The first type of Internet of things equipment is migrated from the first load node to other load nodes, so that the overload of the first load node can be relieved, and meanwhile, the redundant and invalid behavior of migrating Internet of things equipment is reduced.
In another embodiment, if the first load node processes that the third current instantaneous traffic information of the target key event data from the selected first type of internet of things device is smaller than the traffic information to be migrated, the monitoring node selects the second type of internet of things device that transmits the target key event data and transmits other key event data. The monitoring node takes the selected first type of Internet of things equipment and the second type of Internet of things equipment as the to-be-accessed Internet of things equipment. Here, the first type of internet of things device and the second type of internet of things device satisfy the following first condition and second condition. Wherein, the first condition is: the sum of the third current instantaneous flow information of the target key event data sent by the first type of Internet of things equipment and the second type of Internet of things equipment is larger than or equal to the flow information to be migrated. The second condition is: and under the condition that the first condition is met, the second type Internet of things device sends the third current instantaneous flow information of other key event data to the minimum sum.
In the embodiment of the application, under the condition that the first type of Internet of things equipment is migrated from the first load node to other load nodes, the second type of Internet of things equipment which transmits the target key event data and transmits other key event data is selected, so that the overload condition of the first load node can be relieved, and the behavior of redundant and invalid migrated Internet of things equipment is reduced.
In still another embodiment, among the respective internet-of-things devices from which the plurality of key event data processed by the first load node are received, that is, among the internet-of-things devices connected to the first load node, there is no first type of internet-of-things device that transmits the target key event data and does not transmit other key event data. The monitoring node may select a third type of internet-of-things device that transmits the target key event data and transmits other key event data from the respective internet-of-things devices from which the plurality of key event data processed by the first load node are derived. And the monitoring node takes the selected third class of internet-of-things equipment as the to-be-accessed internet-of-things equipment.
Here, the third class of inline devices satisfies the following third condition and fourth condition. Wherein the third condition is: and the sum of third current instantaneous flow information of the target key event data sent by the third type of internet of things equipment is more than or equal to the flow information to be migrated. The fourth condition is: and if the third condition is met, the third type of internet of things device sends the third current instantaneous flow information of other key event data to the minimum sum.
The load balancing method provided by the embodiment of the application is described in detail below with reference to examples. For example, the key event data includes data a, data B, and data C. The resource status data includes CPU usage, memory usage, and bandwidth usage. The preset state threshold is 80%.
In step 1, at time t9, the monitoring node obtains the key event data and the resource status data of the load node as shown in the following table 2. CPU utilization and bandwidth utilization exceeding 80% can be obtained from table 2. That is, the CPU usage and the bandwidth usage are target resource status data.
TABLE 2
Step 2, the monitoring node obtains the key event data and the resource state data of the load nodes of t1-t8 as shown in the following table 3.
TABLE 3 Table 3
/>
The graph of the key event data is shown in fig. 5a based on the key event data in t1-t8, and the graph of the resource status data is shown in fig. 5b based on the resource status data in t1-t 8. In fig. 5a, the abscissa indicates time, and the ordinate indicates traffic information of key event data. In fig. 5b, the abscissa indicates time of day and the ordinate indicates resource status data.
Step 3, use P c Flow information representing data A, P f Flow information representing data B, P m Flow information representing data C, P cpu Indicating CPU utilization, P net Representing bandwidthAnd (5) the utilization rate. The monitoring nodes are fitted according to the following formula based on the data in table 3.
Fitting based on the above formula yields the following fitting relationship.
At this time, the monitoring node determines that the CPU usage is mainly related to data B, and the bandwidth usage is mainly related to transmitting data a and data B. That is, the target key event includes data a and data B.
And 4, the monitoring node obtains a fitting relation according to the step 3, and determines that the flow information of the data B is 200 when the CPU utilization rate of the load node reaches 80%, and the flow information of the data A and the data B is 160 when the bandwidth utilization rate of the load node reaches 80%.
Step 5, the monitoring node analyzes the data at the time t9 (as shown in table 2), and determines that the to-be-migrated flow information corresponding to the data B is 200-200=0 for the CPU utilization; for bandwidth usage, it is determined that the to-be-migrated traffic information corresponding to data a and data B is (20+200) -160=70. At this time, the monitoring node determines that the traffic information to be migrated is 70 pieces.
And 6, analyzing the data at the time t9 by the monitoring node to obtain the current instantaneous flow information of a plurality of key event data from each Internet of things device as shown in table 4.
TABLE 4 Table 4
Of the 4 pieces of internet of things devices, the device 1 and the device 2 only transmit the data a and the data B, the traffic information of the data a and the data B transmitted by the device 1 is 10+50=60 <70, and the traffic information of the data a and the data B transmitted by the device 2 is 0+80=80 >70. The monitoring node selection device 2 thus serves as an internet of things device to be moved out, i.e. an internet of things device to be connected to another load node.
And 7, after the monitoring node predicts the CPU utilization rate, the memory utilization rate and the bandwidth utilization rate of each load node after the equipment 2 is accessed to each load node according to the steps 2-4. If the CPU utilization, the memory utilization and the bandwidth utilization of a load node are all less than 80%, the monitoring node accesses the device 2 to the load node.
In the embodiment of the present application, if a plurality of load nodes capable of being connected to the device 2 are determined, the balanced states of the CPU utilization, the memory utilization, and the bandwidth utilization, and/or the balanced states of the number of access devices of the plurality of load nodes are comprehensively considered.
Corresponding to the load balancing method, the embodiment of the application also provides a load balancing device. Referring to fig. 6, fig. 6 is a schematic structural diagram of a load balancing apparatus according to an embodiment of the present application, where the apparatus includes: a first acquisition unit 601, a first determination unit 602, a selection unit 603, and an access unit 604.
A first obtaining unit 601, configured to obtain first current instantaneous flow information of multiple key event data from an internet of things device to be accessed, and obtain second current instantaneous flow information of multiple load nodes for processing multiple key event data;
a first determining unit 602, configured to determine, according to a fitting relationship between multiple key event data and multiple resource status data of each load node, and multiple first current instantaneous traffic information and multiple second current instantaneous traffic information corresponding to each load node, a predicted instantaneous value of multiple resource status data of each load node under a condition that an internet of things device to be accessed accesses each load node;
A selecting unit 603, configured to select a target load node from load nodes whose predicted instantaneous values of various resource status data are all lower than a preset status threshold;
and the access unit 604 is used for accessing the to-be-accessed internet of things device to the target load node.
In one embodiment, the load balancing apparatus may further include:
the second obtaining unit is used for obtaining historical flow information of processing various key event data of each load node and historical values of various resource state data of each load node in a preset time period before determining the predicted instantaneous values of the various resource state data of each load node under the condition that the to-be-accessed internet of things equipment is accessed to each load node;
and the fitting unit is used for fitting the historical values of the various resource state data of each load node and the historical flow information of the various key event data to obtain the fitting relation between the various key event data and the various resource state data of each load node.
In one embodiment, the load balancing apparatus may further include:
the third obtaining unit is used for obtaining current instantaneous values of various resource state data of the first load node and the current instantaneous flow information of various key event data processed by the first load node before obtaining the first current instantaneous flow information of various key event data from the to-be-accessed internet of things device, wherein the first load node is a load node in which target resource state data with the current instantaneous value larger than a preset state threshold exists in the various resource state data;
The second determining unit is used for determining target key event data affecting target resource state data in the plurality of key event data and target flow information of the target key event data when the target resource state data reaches a preset state threshold according to fitting relations between the plurality of key event data and the plurality of resource state data of the first load node;
the third determining unit is used for determining to-be-migrated flow information according to the target flow information and the current instantaneous flow information of the target key event data processed by the first load node;
and the fourth determining unit is used for determining the to-be-accessed internet-of-things device from each internet-of-things device according to the to-be-migrated flow information and third current instantaneous flow information of the plurality of key event data from each internet-of-things device processed by the first load node.
In one embodiment, the fourth determining unit may specifically be configured to:
selecting a first type of internet-of-things device which transmits target key event data and does not transmit other key event data from all internet-of-things devices from which a plurality of key event data processed by a first load node come;
and if the third current instantaneous flow information of the target key event data from the selected first type of Internet of things equipment is processed by the first load node and is more than or equal to the flow information to be migrated, taking the selected first type of Internet of things equipment as the to-be-accessed Internet of things equipment.
In the load balancing device provided by the embodiment of the application, the fitting relation between the flow information of the plurality of key event data and the plurality of resource state data of each load node is preset, and based on the fitting relation, the influence of which key event data or key event data is mainly affected by each resource state data can be clearly determined. In this way, after the first current instantaneous flow information of various key event data from the to-be-accessed internet of things device is obtained, a target load node suitable for the to-be-accessed internet of things device to be accessed can be accurately determined, wherein the target load node is: after various key event data sent by the to-be-accessed internet of things equipment are accessed, the predicted instantaneous values of various resource state data are lower than the load nodes of the preset state threshold, resources in target load nodes are not wasted, and the waste of resources is reduced while load balancing is realized.
Corresponding to the above load balancing method, the embodiment of the present application further provides an electronic device, as shown in fig. 7, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702 and the memory 703 complete communication with each other through the communication bus 704,
A memory 703 for storing a computer program;
the processor 701 is configured to implement any step of the load balancing method when executing the program stored in the memory 703.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include a random access Memory (Random Access Memory, RAM) or a Non-Volatile Memory (NVM), such as at least one magnetic disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In accordance with the load balancing method described above, in a further embodiment of the present application, there is also provided a computer-readable storage medium having stored therein a computer program that, when executed by a processor, implements any of the steps of the load balancing method described above.
In accordance with the load balancing method described above, in a further embodiment of the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the steps of the load balancing method described above.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, 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 may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, electronic devices, computer readable storage media and computer program product embodiments, the description is relatively simple as it is substantially similar to method embodiments, as relevant points are found in the partial description of method embodiments.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (6)

1. A method of load balancing, the method comprising:
acquiring first current instantaneous flow information of various key event data from the to-be-accessed internet of things equipment, and acquiring second current instantaneous flow information of the various key event data processed by a plurality of load nodes;
determining a predicted instantaneous value of the plurality of resource state data of each load node under the condition that the to-be-accessed internet-of-things device is accessed to each load node according to fitting relations between the plurality of key event data and the plurality of resource state data of each load node and a plurality of first current instantaneous flow information and a plurality of second current instantaneous flow information corresponding to each load node;
selecting a target load node from load nodes of which the predicted instantaneous values of the various resource state data are lower than a preset state threshold value;
the to-be-accessed Internet of things equipment is accessed to the target load node;
Before determining the predicted instantaneous values of the plurality of resource status data for each load node in the case that the to-be-accessed internet of things device accesses each load node, the method further comprises:
acquiring historical flow information of each load node for processing the various key event data in a preset time period and historical values of the various resource state data of each load node;
and fitting the historical values of the plurality of resource state data of each load node and the historical flow information of the plurality of key event data to obtain the fitting relation between the plurality of key event data and the plurality of resource state data of each load node.
2. The method of claim 1, further comprising, prior to obtaining the first current instantaneous traffic information from the plurality of critical event data of the internet of things device to be accessed:
acquiring current instantaneous values of the various resource state data of a first load node, and processing current instantaneous flow information of the various key event data by the first load node, wherein the first load node is a load node in which target resource state data with the current instantaneous values larger than a preset state threshold exists in the various resource state data;
Determining target key event data affecting the target resource state data in the plurality of key event data and target flow information of the target key event data when the target resource state data reaches the preset state threshold according to fitting relations between the plurality of key event data and the plurality of resource state data of the first load node;
determining to-be-migrated flow information according to the target flow information and the current instantaneous flow information of the target key event data processed by the first load node;
according to the flow information to be migrated and third current instantaneous flow information of the plurality of key event data from each Internet of things device processed by the first load node, determining the to-be-accessed Internet of things device from each Internet of things device;
the step of determining the to-be-accessed internet of things device from each internet of things device according to the to-be-migrated traffic information and the third current instantaneous traffic information of the plurality of key event data from each internet of things device processed by the first load node, includes:
selecting a first type of Internet of things device which transmits the target key event data and does not transmit other key event data from all Internet of things devices from which the plurality of key event data processed by the first load node come;
If the third current instantaneous flow information of the target key event data from the selected first type of Internet of things equipment is processed by the first load node and is more than or equal to the flow information to be migrated, the selected first type of Internet of things equipment is used as the to-be-accessed Internet of things equipment;
if the third current instantaneous flow information of the target key event data from the first type of the internet-of-things equipment processed by the first load node is smaller than the flow information to be migrated, selecting a second type of the internet-of-things equipment which sends the target key event data and sends other key event data from all the internet-of-things equipment from which the plurality of key event data processed by the first load node are received, and taking the selected first type of the internet-of-things equipment and the second type of the internet-of-things equipment as the to-be-accessed internet-of-things equipment; the selected first type of Internet of things equipment and second type of Internet of things equipment meet a first condition and a second condition, wherein the first condition is as follows: the sum of the third current instantaneous flow information of the target key event data sent by the selected first type of Internet of things equipment and the second type of Internet of things equipment is larger than or equal to the flow information to be migrated, and the second condition is that: under the condition that the first condition is met, the selected second type Internet of things device sends third current instantaneous flow information of other key event data to the minimum sum;
If the first type of Internet of things equipment which transmits the target key event data and does not transmit other key event data does not exist, selecting third type of Internet of things equipment which transmits the target key event data and transmits other key event data from all the Internet of things equipment from which the plurality of key event data are processed by the first load node, and taking the selected third type of Internet of things equipment as the to-be-accessed Internet of things equipment; the selected third class of the internet-of-things equipment meets a third condition and a fourth condition, wherein the third condition is as follows: the sum of the third current instantaneous flow information of the target key event data sent by the selected third type of internet of things equipment is greater than or equal to the flow information to be migrated, and the fourth condition is that: and under the condition that the third condition is met, the selected third class of internet-of-things equipment transmits the third current instantaneous flow information of other key event data to the minimum sum.
3. A load balancing apparatus, the apparatus comprising:
the first acquisition unit is used for acquiring first current instantaneous flow information of various key event data from the to-be-accessed Internet of things equipment and acquiring second current instantaneous flow information of the various key event data processed by the plurality of load nodes;
The first determining unit is used for determining a predicted instantaneous value of the plurality of resource state data of each load node under the condition that the to-be-accessed internet of things device is accessed to each load node according to the fitting relation between the plurality of key event data and the plurality of resource state data of each load node and a plurality of first current instantaneous flow information and a plurality of second current instantaneous flow information corresponding to each load node;
a selecting unit, configured to select a target load node from load nodes whose predicted instantaneous values of the plurality of resource status data are all lower than a preset status threshold;
the access unit is used for accessing the to-be-accessed internet-of-things equipment to the target load node;
the apparatus further comprises:
the second obtaining unit is used for obtaining historical flow information of processing the various key event data by each load node in a preset time period and historical values of the various resource state data of each load node before determining the predicted instantaneous values of the various resource state data of each load node under the condition that the to-be-accessed internet of things equipment is accessed to each load node;
and the fitting unit is used for fitting the historical values of the plurality of resource state data of each load node and the historical flow information of the plurality of key event data to obtain the fitting relation between the plurality of key event data and the plurality of resource state data of each load node.
4. A device according to claim 3, characterized in that the device further comprises:
the third obtaining unit is configured to obtain, before obtaining first current instantaneous flow information of multiple kinds of critical event data from an internet of things device to be accessed, current instantaneous values of multiple kinds of resource state data of a first load node, and current instantaneous flow information of the multiple kinds of critical event data processed by the first load node, where the first load node is a load node in which target resource state data with a current instantaneous value greater than a preset state threshold exists in the multiple kinds of resource state data;
the second determining unit is used for determining target key event data affecting the target resource state data in the plurality of key event data and target flow information of the target key event data when the target resource state data reaches the preset state threshold according to fitting relations between the plurality of key event data and the plurality of resource state data of the first load node;
the third determining unit is used for determining to-be-migrated flow information according to the target flow information and the current instantaneous flow information of the target key event data processed by the first load node;
The fourth determining unit is configured to determine, according to the to-be-migrated traffic information and third current instantaneous traffic information of the plurality of key event data from each internet of things device processed by the first load node, the to-be-accessed internet of things device from each internet of things device;
the fourth determining unit is specifically configured to:
selecting a first type of Internet of things device which transmits the target key event data and does not transmit other key event data from all Internet of things devices from which the plurality of key event data processed by the first load node come;
if the third current instantaneous flow information of the target key event data from the selected first type of Internet of things equipment is processed by the first load node and is more than or equal to the flow information to be migrated, the selected first type of Internet of things equipment is used as the to-be-accessed Internet of things equipment;
if the third current instantaneous flow information of the target key event data from the first type of the internet-of-things equipment processed by the first load node is smaller than the flow information to be migrated, selecting a second type of the internet-of-things equipment which sends the target key event data and sends other key event data from all the internet-of-things equipment from which the plurality of key event data processed by the first load node are received, and taking the selected first type of the internet-of-things equipment and the second type of the internet-of-things equipment as the to-be-accessed internet-of-things equipment; the selected first type of Internet of things equipment and second type of Internet of things equipment meet a first condition and a second condition, wherein the first condition is as follows: the sum of the third current instantaneous flow information of the target key event data sent by the selected first type of Internet of things equipment and the second type of Internet of things equipment is larger than or equal to the flow information to be migrated, and the second condition is that: under the condition that the first condition is met, the selected second type Internet of things device sends third current instantaneous flow information of other key event data to the minimum sum;
If the first type of Internet of things equipment which transmits the target key event data and does not transmit other key event data does not exist, selecting third type of Internet of things equipment which transmits the target key event data and transmits other key event data from all the Internet of things equipment from which the plurality of key event data are processed by the first load node, and taking the selected third type of Internet of things equipment as the to-be-accessed Internet of things equipment; the selected third class of the internet-of-things equipment meets a third condition and a fourth condition, wherein the third condition is as follows: the sum of the third current instantaneous flow information of the target key event data sent by the selected third type of internet of things equipment is greater than or equal to the flow information to be migrated, and the fourth condition is that: and under the condition that the third condition is met, the selected third class of internet-of-things equipment transmits the third current instantaneous flow information of other key event data to the minimum sum.
5. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
A processor for implementing the method steps of any of claims 1-2 when executing a program stored on a memory.
6. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-2.
CN202010183135.1A 2020-03-16 2020-03-16 Load balancing method and device Active CN111400045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010183135.1A CN111400045B (en) 2020-03-16 2020-03-16 Load balancing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010183135.1A CN111400045B (en) 2020-03-16 2020-03-16 Load balancing method and device

Publications (2)

Publication Number Publication Date
CN111400045A CN111400045A (en) 2020-07-10
CN111400045B true CN111400045B (en) 2023-09-05

Family

ID=71432426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010183135.1A Active CN111400045B (en) 2020-03-16 2020-03-16 Load balancing method and device

Country Status (1)

Country Link
CN (1) CN111400045B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114697226A (en) * 2022-04-02 2022-07-01 阿里云计算有限公司 Resource scheduling method, system, device and storage medium
CN114979153B (en) * 2022-04-07 2023-10-27 浙江大华技术股份有限公司 Load balancing method, computer equipment and storage device

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103870322A (en) * 2012-12-17 2014-06-18 联发科技股份有限公司 Method for controlling task migration, other-than-temporary computer readable medium, heterogeneous multi-core system
CN105868021A (en) * 2016-03-23 2016-08-17 浪潮通信信息系统有限公司 Task allocation method and apparatus
CN106020986A (en) * 2016-05-26 2016-10-12 中国建设银行股份有限公司 Data processing method and device
CN106776025A (en) * 2016-12-16 2017-05-31 郑州云海信息技术有限公司 A kind of computer cluster job scheduling method and its device
CN107370816A (en) * 2017-07-26 2017-11-21 郑州云海信息技术有限公司 A kind of dispositions method and device of Web applications
CN107590001A (en) * 2017-09-08 2018-01-16 北京京东尚科信息技术有限公司 Load-balancing method and device, storage medium, electronic equipment
CN107918561A (en) * 2017-11-17 2018-04-17 东北大学 A kind of method for allocating tasks in industrial allocation formula data collecting system
CN108965884A (en) * 2018-07-13 2018-12-07 网宿科技股份有限公司 A kind of distribution method and controlling equipment, transcoding device of transcoding task
CN109213437A (en) * 2016-07-22 2019-01-15 英特尔公司 The dynamic allocation technology of the layer of the memory resource of decomposition
CN109656691A (en) * 2017-10-11 2019-04-19 阿里巴巴集团控股有限公司 Processing method, device and the electronic equipment of computing resource
CN109918194A (en) * 2019-01-16 2019-06-21 深圳壹账通智能科技有限公司 Intelligent dilatation capacity reduction method, device, computer equipment and storage medium
CN110096349A (en) * 2019-04-10 2019-08-06 山东科技大学 A kind of job scheduling method based on the prediction of clustered node load condition
CN110308981A (en) * 2019-07-11 2019-10-08 河海大学常州校区 A kind of Swarm colony dispatching algorithm based on combination forecasting
CN110704542A (en) * 2019-10-15 2020-01-17 南京莱斯网信技术研究院有限公司 Data dynamic partitioning system based on node load

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8935702B2 (en) * 2009-09-04 2015-01-13 International Business Machines Corporation Resource optimization for parallel data integration
US20200042420A1 (en) * 2018-08-03 2020-02-06 International Business Machines Corporation Batch application performance prediction

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103870322A (en) * 2012-12-17 2014-06-18 联发科技股份有限公司 Method for controlling task migration, other-than-temporary computer readable medium, heterogeneous multi-core system
CN105868021A (en) * 2016-03-23 2016-08-17 浪潮通信信息系统有限公司 Task allocation method and apparatus
CN106020986A (en) * 2016-05-26 2016-10-12 中国建设银行股份有限公司 Data processing method and device
CN109213437A (en) * 2016-07-22 2019-01-15 英特尔公司 The dynamic allocation technology of the layer of the memory resource of decomposition
CN106776025A (en) * 2016-12-16 2017-05-31 郑州云海信息技术有限公司 A kind of computer cluster job scheduling method and its device
CN107370816A (en) * 2017-07-26 2017-11-21 郑州云海信息技术有限公司 A kind of dispositions method and device of Web applications
CN107590001A (en) * 2017-09-08 2018-01-16 北京京东尚科信息技术有限公司 Load-balancing method and device, storage medium, electronic equipment
CN109656691A (en) * 2017-10-11 2019-04-19 阿里巴巴集团控股有限公司 Processing method, device and the electronic equipment of computing resource
CN107918561A (en) * 2017-11-17 2018-04-17 东北大学 A kind of method for allocating tasks in industrial allocation formula data collecting system
CN108965884A (en) * 2018-07-13 2018-12-07 网宿科技股份有限公司 A kind of distribution method and controlling equipment, transcoding device of transcoding task
CN109918194A (en) * 2019-01-16 2019-06-21 深圳壹账通智能科技有限公司 Intelligent dilatation capacity reduction method, device, computer equipment and storage medium
CN110096349A (en) * 2019-04-10 2019-08-06 山东科技大学 A kind of job scheduling method based on the prediction of clustered node load condition
CN110308981A (en) * 2019-07-11 2019-10-08 河海大学常州校区 A kind of Swarm colony dispatching algorithm based on combination forecasting
CN110704542A (en) * 2019-10-15 2020-01-17 南京莱斯网信技术研究院有限公司 Data dynamic partitioning system based on node load

Also Published As

Publication number Publication date
CN111400045A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
CN110049130B (en) Service deployment and task scheduling method and device based on edge computing
CN109032801B (en) Request scheduling method, system, electronic equipment and storage medium
CN107872402B (en) Global flow scheduling method and device and electronic equipment
CN112988398B (en) Micro-service dynamic scaling and migration method and device
US9027025B2 (en) Real-time database exception monitoring tool using instance eviction data
CN111400045B (en) Load balancing method and device
CN111212330A (en) Method and device for determining network performance bottleneck value
WO2017028696A1 (en) Method and device for monitoring load of distributed storage system
CN108809848A (en) Load-balancing method, device, electronic equipment and storage medium
US20210058811A1 (en) Method and apparatus for detecting time series data
CN111045782A (en) Log processing method and device, electronic equipment and computer readable storage medium
CN111418187A (en) Scalable statistics and analysis mechanism in cloud networks
WO2017114180A1 (en) Component logical threads quantity adjustment method and device
CN106603256B (en) Flow control method and device
CN114827168A (en) Alarm aggregation reporting method and device, computer equipment and storage medium
CN112817772A (en) Data communication method, device, equipment and storage medium
US10248508B1 (en) Distributed data validation service
CN109213778B (en) Stream data sliding window gathering query method
CN113835905B (en) Message queue load balancing method and device, electronic equipment and medium
CN116361703A (en) Energy-saving control method and device for data center, electronic equipment and readable medium
JP2021506002A (en) Resource processing methods and systems, storage media, electronic devices
CN112749204B (en) Method and device for reading data
JP2016157367A (en) Distributed processing system
CN111158862B (en) Virtual machine scheduling method and device
Li et al. Research on Intelligent Scheduling Optimization Selection Algorithm for Medical Information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant