CN114697226A - Resource scheduling method, system, device and storage medium - Google Patents

Resource scheduling method, system, device and storage medium Download PDF

Info

Publication number
CN114697226A
CN114697226A CN202210351157.3A CN202210351157A CN114697226A CN 114697226 A CN114697226 A CN 114697226A CN 202210351157 A CN202210351157 A CN 202210351157A CN 114697226 A CN114697226 A CN 114697226A
Authority
CN
China
Prior art keywords
bandwidth
internet
instance
gateway
time period
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.)
Pending
Application number
CN202210351157.3A
Other languages
Chinese (zh)
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.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Cloud Computing 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 Alibaba Cloud Computing Ltd filed Critical Alibaba Cloud Computing Ltd
Priority to CN202210351157.3A priority Critical patent/CN114697226A/en
Publication of CN114697226A publication Critical patent/CN114697226A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/83Admission control; Resource allocation based on usage prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y30/00IoT infrastructure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/147Network analysis or design for predicting network behaviour
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/82Miscellaneous aspects
    • H04L47/823Prediction of resource usage
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/101Server selection for load balancing based on network conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a resource scheduling method, a system, equipment and a storage medium. The method comprises the following steps: determining whether the bandwidth resources of the first Internet of things gateway are in a balanced use state or not according to the historical bandwidth use information of the first Internet of things gateway; when the first Internet of things gateway bandwidth resource is not in a balanced use state, determining a target example from a plurality of examples operated by the first Internet of things gateway; wherein the target instance is an instance such that the first internet of things gateway bandwidth resource is not in a balanced usage state; determining whether a second networking gateway is suitable for receiving the target instance according to historical bandwidth utilization information of the second networking gateway and historical bandwidth utilization information of the target instance; and when the second networking gateway is determined to be suitable for receiving the target instance, migrating the target instance to the second networking gateway. The scheme is favorable for improving the use balance degree of the bandwidth resources of the gateway of the Internet of things.

Description

Resource scheduling method, system, device and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a resource scheduling method, system, device, and storage medium.
Background
With the development of the internet of things technology, the internet of things technology is used in more and more fields to realize cloud-up and big data analysis of data, such as industrial internet of things, agricultural internet of things, home internet of things and the like.
Currently, internet of things terminals of many tenants access a Virtual Private Cloud (VPC) of a Cloud through an internet of things oriented card. In order to realize that the internet of things terminal accesses the virtual private cloud of the cloud end through the internet of things directional card, an internet of things gateway is required to be arranged at the cloud end, and the internet of things gateway can be specifically an internet of things virtual gateway. The Internet of things gateway is configured with a binding relationship between an Internet of things card and a VPC (virtual private network) which the Internet of things card needs to visit directionally; the internet of things terminal sends the flow packet to the internet of things gateway through an operator network based on the internet of things card, and the internet of things gateway forwards the flow packet to the target VPC according to the binding relationship configured in advance, so that the private network of the internet of things terminal can access the cloud service in the VPC. The terminal of the internet of things can establish connection with the gateway of the internet of things through a dedicated APN (Access Point Name) provided by an operator network, and then transmits a traffic packet based on the connection. That is to say, the internet of things gateway realizes the connection from the internet of things terminal to the VPC through the dedicated APN.
Currently, the internet of things gateway is a shared gateway, which needs to provide network access or forwarding service for multiple tenants. In order to avoid mutual interference among multiple tenants, dedicated processing resources, such as bandwidth resources, are allocated to each of the multiple tenants.
Disclosure of Invention
In view of the above, the present application has been made to provide a data processing method, system, device and storage medium that solve the above problems, or at least partially solve the above problems.
Accordingly, in an embodiment of the present application, a resource scheduling method is provided, where the method includes:
determining whether the bandwidth resources of the first Internet of things gateway are in a balanced use state or not according to historical bandwidth use information of the first Internet of things gateway;
when the first Internet of things gateway bandwidth resource is not in a balanced use state, determining a target example from a plurality of examples operated by the first Internet of things gateway; wherein the target instance is an instance such that the first internet of things gateway bandwidth resource is not in a balanced usage state;
determining whether a second networking gateway is suitable for receiving the target instance according to historical bandwidth utilization information of the second networking gateway and historical bandwidth utilization information of the target instance;
and when the second networking gateway is determined to be suitable for receiving the target instance, migrating the target instance to the second networking gateway.
In another embodiment of the present application, a resource scheduling method is provided, where the method further includes:
inputting the current use bandwidth of a first instance operated by a first internet-of-things gateway into a trained bandwidth prediction model so as to predict the predicted use bandwidth of the first instance in a future preset time period by the bandwidth prediction model;
determining the estimated limit bandwidth of the first instance in the future preset time period according to the predicted use bandwidth of the first instance in the future preset time period;
and sending a resource allocation instruction to the first internet of things gateway according to the estimated limited bandwidth of the first instance in the future preset time period, so that the first internet of things gateway allocates bandwidth resources for the first instance.
In another embodiment of the present application, a resource scheduling system is provided, including: the gateway controller and the plurality of Internet of things gateways; the plurality of internet of things gateways comprise a first internet of things gateway and a second internet of things gateway;
wherein the gateway controller is configured to:
determining whether the bandwidth resources of the first Internet of things gateway are in a balanced use state or not according to the historical bandwidth use information of the first Internet of things gateway;
when the first Internet of things gateway bandwidth resource is not in a balanced use state, determining a target example from a plurality of examples operated by the first Internet of things gateway; wherein the target instance is an instance such that the first internet of things gateway bandwidth resource is not in a balanced usage state;
determining whether the second networking gateway is suitable for receiving the target instance according to the historical bandwidth utilization information of the second networking gateway and the historical bandwidth utilization information of the target instance;
and when the second networking gateway is determined to be suitable for receiving the target instance, migrating the target instance to the second networking gateway.
In yet another embodiment of the present application, an electronic device is provided. The electronic device includes: a memory and a processor, wherein,
the memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory to implement any of the foregoing resource scheduling methods.
In a further embodiment of the present application, there is provided a computer-readable storage medium storing a computer program, which when executed by a computer, is capable of implementing the resource scheduling method of any one of the above.
In the technical scheme provided by the embodiment of the application, when the bandwidth resources of the internet of things gateway are not in a balanced use state, an unbalanced target instance in a plurality of instances on the internet of things gateway can be migrated to other internet of things gateways suitable for receiving the target instance. That is to say, the example migration scheme provided by the embodiment of the application is beneficial to improving the usage balance degree of the bandwidth resources of the gateway of the internet of things. Therefore, bandwidth resource capacity reduction can be subsequently performed on certain internet of things gateways with high resource use balance degree and low resource utilization rate, so that bandwidth resources are saved, the resource utilization rate is improved, and negative effects on traffic emergencies due to capacity reduction are avoided.
In the technical scheme provided by the embodiment of the application, the bandwidth prediction model is obtained by training based on historical bandwidth use record information of a plurality of instances, and the bandwidth prediction model predicts the predicted use bandwidth of a future preset time period based on the bandwidth data acquired in real time. Therefore, the change of the flow can be sensed in real time, the dynamic allocation of the bandwidth resources is convenient, and the packet loss rate caused by the flow burst can be reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a resource scheduling system according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a resource scheduling method according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a resource scheduling method according to an embodiment of the present application;
FIG. 4 is a signaling diagram provided in accordance with an embodiment of the present application;
FIG. 5 is an illustration provided in accordance with an embodiment of the present application;
fig. 6 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below according to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Further, in some flows described in the specification, claims, and above-described figures of the present application, a number of operations are included that occur in a particular order, which operations may be performed out of order or in parallel as they occur herein. The sequence numbers of the operations, e.g., 101, 102, etc., are used merely to distinguish between the various operations, and do not represent any order of execution per se. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit the types of "first" and "second".
By taking the internet of things terminal connected with the cloud terminal through the internet of things directional card as an example, the required network bandwidth (which can be called the average bandwidth) is small at ordinary times, but the required network bandwidth (which can be called the peak bandwidth) is large when the version is upgraded or is in holidays and active days, and is far higher than the required bandwidth at ordinary times. In order to cope with the network traffic emergency of the internet of things, the peak bandwidth needs to be set as the limit bandwidth (note: the limit bandwidth refers to the maximum bandwidth allowed to be used). In addition, most internet of things gateways have wide difference in used bandwidth in different time periods, such as: in a day, the usage bandwidth of the internet of things gateway is large in some time periods, such as: the used bandwidth accounts for 80% of the total bandwidth of the internet of things gateway, and the used bandwidth of the internet of things gateway in other time periods is smaller, for example: the used bandwidth only accounts for 20% of the total bandwidth of the gateway of the internet of things. That is, most of the bandwidth resources of the internet of things gateway are idle for some period of time. Therefore, in the service scenario of single-share isolation of multiple tenants, the shared gateway product has the problems of low utilization rate of the whole network bandwidth resources, high long-term resource cost and the like.
The applicant finds out in the process of researching the technical scheme provided by the embodiment of the application that: a plurality of instances are generally operated on the internet of things gateway, and one instance corresponds to one tenant. Network burst traffic of different tenants does not occur simultaneously. Therefore, the example migration can be performed on the plurality of internet of things gateways, so that the utilization rates of the bandwidth resources of the internet of things gateways at different time periods are relatively close, and the bandwidth resources of the internet of things gateways can be used in a balanced manner. Therefore, bandwidth resource capacity reduction can be carried out on certain internet of things gateways with low resource utilization rate subsequently, so that bandwidth resources are saved, and traffic emergency of most instances can be dealt with. The scheme for example migration will be described in detail in the following examples.
Before introducing the resource scheduling method provided by the embodiment of the present application, a system architecture related to the embodiment of the present application is introduced.
Fig. 1 shows a schematic diagram of a resource scheduling system provided in an embodiment of the present application. As shown in fig. 1, the resource scheduling system includes a gateway controller 10 and a plurality of internet of things gateways 20. The plurality of internet of things gateways 20 may include a first internet of things gateway 20a and a second internet of things gateway 20 b. Wherein the content of the first and second substances,
the gateway controller 10 is configured to: determining whether the first Internet of things gateway bandwidth resource is in a balanced use state according to historical bandwidth use information of the first Internet of things gateway; when the first Internet of things gateway bandwidth resource is not in a balanced use state, determining a target example from a plurality of examples operated by the first Internet of things gateway; wherein the target instance is an instance such that the first internet of things gateway bandwidth resource is not in a balanced usage state; determining whether a second networking gateway is suitable for receiving the target instance according to historical bandwidth utilization information of the second networking gateway and historical bandwidth utilization information of the target instance; and when the second networking gateway is determined to be suitable for receiving the target instance, migrating the target instance to the second networking gateway.
The gateway controller 10 may specifically be formed by a cloud server or a cloud cluster. Each internet of things gateway can be specifically formed by a cloud server or a cloud cluster. The cloud cluster comprises a plurality of cloud servers. The number of cloud servers in the cloud cluster can be set according to actual needs, and the embodiment of the application is not particularly limited to this.
In one example, as shown in fig. 1, the system may further include: the internet of things terminal 30, the operator network 40 and the cloud network 50.
The specific implementation of the above-mentioned system parts and the interaction process between them will be described in detail in the following embodiments.
Fig. 2 shows a flowchart of a resource scheduling method according to an embodiment of the present application. The execution subject of the method can be the gateway controller in the resource control system. As shown in fig. 2, the method includes:
101. and determining whether the bandwidth resources of the first Internet of things gateway are in a balanced use state or not according to the historical bandwidth use information of the first Internet of things gateway.
102. When the first Internet of things gateway bandwidth resource is not in a balanced use state, a target instance is determined from a plurality of instances operated by the first Internet of things gateway.
Wherein the target instance is an instance such that the first internet of things gateway bandwidth resource is not in a balanced usage state.
103. And determining whether the second networking gateway is suitable for receiving the target instance according to the historical bandwidth utilization information of the second networking gateway and the historical bandwidth utilization information of the target instance.
104. And when the second networking gateway is determined to be suitable for receiving the target instance, migrating the target instance to the second networking gateway.
In the foregoing 101, the historical bandwidth usage information of the first internet of things gateway may be determined according to historical bandwidth usage record information of each of a plurality of instances in which the first internet of things gateway operates. In practical application, the gateway of the internet of things in the resource scheduling system can report the current use bandwidth of each instance running on the gateway controller once every preset time interval (for example, 1 minute); and the gateway controller records the current bandwidth usage of each instance reported by the gateway of the Internet of things to form historical bandwidth usage record information corresponding to each instance. In the embodiment of the application, the instances may have a migration situation, and therefore, a plurality of usage bandwidths recorded in the historical bandwidth usage record information of one instance are reported by one or more internet of things gateways. Generally, the longer the time is, the smaller the reference meaning is for recording information. Thus, the historical bandwidth usage record information for each instance may be historical bandwidth usage record information for a recent period of time, such as: historical bandwidth usage record information for three months or one month in the near future.
In an example, the historical bandwidth usage information of the first internet of things gateway may include historical bandwidth usage record information for each of a plurality of instances in which the first internet of things gateway is operating.
In another example, historical bandwidth usage record information of each example in a plurality of examples operated by the first internet of things gateway may be counted to obtain historical bandwidth usage information of the first internet of things gateway. Specifically, the historical bandwidth usage information of the first internet of things gateway may include: historical bandwidth usage of each instance in the plurality of instances in which the first internet of things gateway is operated in a plurality of time periods, historical bandwidth usage of the first internet of things gateway in a plurality of time periods, and the like. The plurality of time periods may be obtained by dividing one cycle. The duration of one period and the granularity of division may be set according to actual needs, which is not specifically limited in the embodiment of the present application. For example: a period may be a month, a worship, a day, etc. Taking one day as an example, the one day can be divided by hours, so that 24 time periods can be obtained; taking one worship as an example of one period, one worship can be divided by days, and thus, 7 time periods can be obtained.
And determining the historical bandwidth of each instance in each time period in a plurality of time periods according to the historical bandwidth usage record information of each instance, wherein the historical bandwidth of each instance can be the historical peak bandwidth of each instance. The historical use bandwidth of the first internet of things gateway in the multiple time periods can be determined according to the historical use bandwidth of each instance in the multiple time periods in which the first internet of things gateway operates, and specifically, the sum of the historical use bandwidths of the multiple instances in the first time period is used as the historical use bandwidth of the first internet of things gateway in the first time period. The historical bandwidth utilization rate of the first internet of things gateway in multiple time periods can be determined according to the historical utilization bandwidth of the first internet of things gateway in multiple time periods and the total bandwidth of the first internet of things gateway, and specifically, the ratio of the historical utilization bandwidth of the first internet of things gateway in the first time period to the total bandwidth of the first internet of things gateway is used as the historical bandwidth utilization rate of the first internet of things gateway in the first time period. Wherein the first time period refers to any one of a plurality of time periods.
And determining whether the first Internet of things gateway bandwidth resource is in a balanced use state or not according to the historical bandwidth use information of the first Internet of things gateway. The balanced use state may be set according to actual needs, which is not specifically limited in the embodiment of the present application. For example: the balanced usage state means that the difference in bandwidth usage is maintained within a preset range, which may be less than or equal to 50%.
In the above 102, the instances are created for tenants (i.e., users), and each instance is configured to provide a gateway service for at least one internet of things terminal device of the corresponding tenant, where the gateway service may include: the service is forwarded. Wherein the forwarding service involves network address translation.
In practical application, after receiving an instance creation request of a tenant, a first Internet of things gateway creates a corresponding instance on the first Internet of things gateway according to an Internet Protocol (IP) address of an Internet Protocol (Internet Protocol) card carried in the instance creation request and a virtual private network (VPC) address to which the instance is to be bound, and establishes a binding relationship among the instance, the IP address of the Internet of things card and the VPC address. Thus, after receiving the flow packet, the subsequent first internet of things gateway can determine the target instance according to the internet of things network card IP address carried in the flow packet and the binding relationship; according to the target VPC address carried in the flow packet and the binding relationship, whether the target VPC address is the VPC address bound by the target instance can be determined; if yes, distributing the flow packet to the target instance so that the target instance forwards the flow packet to the target VPC; if not, the traffic packet is ignored.
In an implementation scheme, a first instance can be determined from a plurality of instances in a traversal mode; determining whether bandwidth resources of the first Internet of things gateway can be in a balanced use state after the first instance is deleted according to historical bandwidth use information of the rest instances except the first instance in the multiple instances; if yes, taking the first example as the target example; otherwise, the traversal is continued until the target instance is determined.
And when the bandwidth resources of the first Internet of things gateway are in a balanced use state, determining that instance migration is not needed for the first Internet of things gateway.
In the above 103, the determination manner of the historical bandwidth usage information of the second internet-of-things gateway is similar to the determination manner of the historical bandwidth usage information of the first internet-of-things gateway, and reference may be made to the above corresponding contents, and details are not described here.
In one example, the historical bandwidth usage information of the second networked gateway may include historical bandwidth usage record information for each of a plurality of other instances in which the second networked gateway is operating. In another example, the historical bandwidth usage record information of each instance in a plurality of other instances operated by the second networked gateway may be counted to obtain the historical bandwidth usage information of the second networked gateway. Specifically, the historical bandwidth usage information of the second networked gateway may include: historical bandwidth usage of each instance in a plurality of other instances operated by the second internet-of-things gateway over a plurality of time periods, historical bandwidth usage of the first internet-of-things gateway over a plurality of time periods, and the like.
Whether the second networked gateway is suitable for receiving the target instance may be considered in combination with one or more of the following ways:
in a first mode, according to the historical bandwidth usage information of the second networking gateway and the historical bandwidth usage information of the target instance, whether the second networking gateway has free bandwidth resources to receive the target instance can be determined.
And secondly, determining whether the second networking gateway can be in a balanced use state after receiving the target instance according to the historical bandwidth use information of the second networking gateway and the historical bandwidth use information of the target instance.
The process of determining whether the second internet-of-things gateway can be in the balanced use state after receiving the target instance may refer to the process of determining whether the first internet-of-things gateway is in the balanced use state, and details are not described herein.
In an example, the second networked gateway may be determined to be eligible to receive the target instance if the second networked gateway has spare bandwidth resources to receive the target instance. Therefore, the balanced use degree of the first internet of things gateway can be improved on the premise of not adding bandwidth resources.
In another example, if the second networked gateway is capable of being in a balanced use state after receiving the target instance, it may be determined that the second networked gateway is suitable for receiving the target instance. Therefore, the second internet of things gateway can reach a balanced use state, and the balanced use degree of the first internet of things gateway can be improved. However, it should be noted that in this example, in some cases, it may be necessary to expand the bandwidth resource of the second networking gateway, so that the second networking gateway can successfully receive and normally operate the target instance.
In yet another example, the second networked gateway is determined to be suitable for receiving the target instance if the second networked gateway has spare bandwidth resources to receive the target instance and the second networked gateway is able to be in a balanced use state after receiving the target instance. Therefore, on the premise of not adding bandwidth resources, the second internet of things gateway can reach a balanced use state, and the balanced use degree of the first internet of things gateway can be improved.
In 104, when it is determined that the second network-connected gateway is suitable for receiving the target instance, the target instance is migrated to the second network-connected gateway.
And when the second networking gateway is determined not to be suitable for receiving the target instance, determining not to transfer the target instance to the second networking gateway.
In practical application, the resource scheduling system may include a plurality of internet of things gateways, and the plurality of internet of things gateways include the first internet of things gateway. Determining a second internet-of-things gateway from other internet-of-things gateways except the first internet-of-things gateway in the plurality of internet-of-things gateways in a traversing mode; and executing the step 103; when the second networking gateway is determined to be suitable for receiving the target example, the target example is transferred to the second face-covering gateway; and when the second networking gateway is determined to be not suitable for receiving the target instance, continuously determining a new second networking gateway from other networking gateways except the first networking gateway in the plurality of networking gateways in a traversal mode, and continuously executing the step 103 until the new second networking gateway is determined to be suitable for receiving the target instance. And migrating the target instance to the new second networking gateway.
In the technical scheme provided by the embodiment of the application, when the bandwidth resources of the internet of things gateway are not in a balanced use state, an unbalanced target instance in a plurality of instances on the internet of things gateway can be migrated to other internet of things gateways suitable for receiving the target instance. That is to say, the example migration scheme provided by the embodiment of the application is beneficial to improving the usage balance degree of the bandwidth resources of the gateway of the internet of things. Therefore, bandwidth resource capacity reduction can be subsequently performed on certain internet of things gateways with high resource use balance degree and low resource utilization rate, so that bandwidth resources are saved, the resource utilization rate is improved, and negative effects on traffic emergencies due to capacity reduction are avoided.
It should be noted that, after the target instance is migrated to the second internet-of-things gateway, if the first internet-of-things gateway has not reached the balanced usage state, the resource scheduling scheme may be further executed for the first internet-of-things gateway until the second internet-of-things gateway suitable for receiving the new target instance cannot be found, or until the first internet-of-things gateway can reach the balanced usage state, or until the maximum number of cycles is reached. The maximum number of cycles may be set according to actual needs, which is not specifically limited in the embodiment of the present application. After the circulation is finished, the same resource scheduling scheme can be continuously executed for other internet of things gateways in the resource scheduling system, specifically, a new first internet of things gateway can be determined from at least one unprocessed internet of things gateway which is not in a balanced use state in the resource scheduling system, and the processing of the steps is executed for the new first internet of things gateway. Since instance migration may affect the network access experience to some extent, the resource scheduling scheme described above may be limited to be performed in a time period with a small amount of network access, for example: performed 2 to 3 am. And stopping executing the resource scheduling scheme after the time elapses.
In one implementation, the historical bandwidth usage information of the first internet of things gateway includes: the historical use bandwidth of the first internet of things gateway in a plurality of time periods, namely the historical use bandwidth of the first internet of things gateway in each time period in the plurality of time periods. In the foregoing 101, "determining whether bandwidth resources of a first internet of things gateway are in a balanced usage state according to historical bandwidth usage information of the first internet of things gateway" may be implemented by using the following steps:
1011. and determining the historical bandwidth utilization rate of the first Internet of things gateway in the multiple time periods according to the historical bandwidth of the first Internet of things gateway in the multiple time periods and the total bandwidth of the first Internet of things gateway.
1012. And determining whether the bandwidth resources of the first Internet of things gateway are in a balanced use state according to the historical bandwidth utilization rate of the first Internet of things gateway in the multiple time periods.
In the above 1011, the plurality of time periods includes a first time period, and the first time period refers to any one of the plurality of time periods. And taking the ratio of the historical use bandwidth of the first internet of things gateway in the first time period to the total bandwidth of the first internet of things gateway as the historical bandwidth use rate of the first internet of things gateway in the first time period.
For example: the plurality of instances comprise an instance A and an instance B, the historical use bandwidths of the instance A and the instance B in the first time period are a1 and B1, wherein a1 and B1 are summed to obtain a1+ B1, and the sum is used as the historical use bandwidth of the first IOT gateway in the first time period; the total bandwidth of the first internet of things gateway is c; and taking (a1+ b1)/c as the historical bandwidth utilization rate of the first internet of things gateway in the first time period.
In 1012, it is determined whether the bandwidth resource of the first internet of things gateway is in a balanced usage state according to the distribution of the bandwidth usage rates of the first internet of things gateway in the multiple time periods.
In an embodiment, in the above 1012, "determining whether the bandwidth resource of the first internet of things gateway is in a balanced usage state according to the historical bandwidth usage rate of the first internet of things gateway in the multiple time periods" may specifically be implemented by:
s11, determining a time period pair according to the time periods; the pair of time periods includes a first time period and a second time period.
S12, determining the difference of the historical bandwidth utilization rate of the time period to the corresponding historical bandwidth utilization rate according to the historical bandwidth utilization rate of the first Internet of things gateway in the first time period and the historical bandwidth utilization rate of the first Internet of things gateway in the second time period.
And S13, if the difference of the usage rate of the corresponding historical bandwidth in the time period is greater than or equal to a first preset difference threshold, determining that the first Internet of things gateway bandwidth resource is not in a balanced usage state.
In S11, any two time segments of the plurality of time segments may be combined into one time segment pair.
In the step S12, a difference between the historical bandwidth usage rate of the first internet of things gateway in the first time period and the historical bandwidth usage rate in the second time period is used as a difference between the historical bandwidth usage rates of the time periods.
In the above S13, the size of the first preset difference threshold may be set according to actual needs, which is not specifically limited in this embodiment of the present application. For example: the first preset difference threshold may be 50%.
In one implementable approach, the pair of time periods is plural. In the above 102, "when the bandwidth resource of the first internet of things gateway is not in a balanced usage state, determine a target instance from multiple instances in which the first internet of things gateway operates", may be implemented by adopting the following steps:
1021. and determining a target time period pair from the time period pairs according to the historical bandwidth utilization rate difference of the time period pairs.
Wherein, the difference of the target time period to the corresponding historical bandwidth utilization rate is greater than or equal to the first preset difference threshold; the pair of target time periods includes a first target time period and a second target time period.
1022. And determining the target instance from the multiple instances according to the historical use bandwidth of each instance in the multiple instances in the first target time period and the historical use bandwidth of each instance in the multiple instances in the second target time period.
In 1021, the pair of time segments in which the difference in historical bandwidth usage is the largest may be determined as the pair of target time segments.
1022, determining a difference between the historical use bandwidths of the instances in the first target time period and the second target time period according to the historical use bandwidths of the instances in the first target time period and the second target time period; and determining a target example from a plurality of examples according to the historical use bandwidth difference of each example between the first target time period and the second target time period.
The multiple instances comprise a first instance, and the first instance refers to any one of the multiple instances. And taking the difference between the historical use bandwidth of the first instance in the first target time period and the historical use bandwidth of the first instance in the second target time period as the historical use bandwidth difference of the first instance between the first target time period and the second target time period.
In an example, the ratio of the historical usage bandwidth difference of each example between the first target time period and the second target time period to the total bandwidth of the first internet of things gateway can be calculated, and any one of at least one example with the ratio being greater than a preset value is taken as a target example. The preset value can be set according to actual needs.
In another example, the instance with the largest difference in historical bandwidth usage is determined as the target instance.
The example with the largest difference of the historical use bandwidths contributes most to the fact that the first internet of things gateway bandwidth resources are not in a balanced use state.
Further, the historical bandwidth usage information of the second networked gateway includes: historical bandwidth usage by the second networked gateway over a plurality of time periods; the historical bandwidth usage information of the target instance includes: historical bandwidth usage of the target instance over the plurality of time periods. In 103, "determining whether the second networking gateway is suitable for receiving the target instance according to the historical bandwidth usage information of the second networking gateway and the historical bandwidth usage information of the target instance" may be implemented by adopting the following steps:
1031. and determining the estimated bandwidth utilization rate of the second networking gateway in the plurality of time periods after receiving the target instance according to the historical bandwidth of the second networking gateway in the plurality of time periods, the historical bandwidth of the target instance in the plurality of time periods and the total bandwidth of the second networking gateway.
1032. And determining whether the second networking gateway is suitable for receiving the target instance or not according to the estimated bandwidth utilization rate of the second networking gateway in the plurality of time periods after the second networking gateway receives the target instance.
1031 above, the plurality of periods includes a first period, and the first period is any one of the plurality of periods. Taking the sum of the historical use bandwidth of the second networking gateway in the first time period and the historical use bandwidth of the target instance in the first time period as the estimated use bandwidth of the second networking gateway in the first time period after receiving the target instance; and taking the ratio of the estimated use bandwidth of the second networking gateway in the first time period after receiving the target instance to the total bandwidth of the second networking gateway as the estimated bandwidth use rate of the second networking gateway in the first time period after receiving the target instance.
In an implementation manner, the above 1032 "determining whether the second networking gateway is suitable for receiving the target instance according to the estimated bandwidth utilization of the second networking gateway at the plurality of time periods after receiving the target instance" may be implemented by adopting the following steps:
and S21, determining the maximum estimated bandwidth utilization rate from the estimated bandwidth utilization rates of the second networking gateway in the multiple time periods after the second networking gateway receives the target instance.
And S22, if the maximum estimated bandwidth utilization rate is less than or equal to a preset bandwidth utilization rate, determining whether the bandwidth resources of the second networking gateway can be in a balanced use state after receiving the target instance according to the estimated bandwidth utilization rates of the second networking gateway in the multiple time periods after receiving the target instance.
S23, if the bandwidth resource of the second networking gateway can be in a balanced use state after the second networking gateway receives the target instance, determining that the second networking gateway is suitable for receiving the target instance.
In the above S22, the size of the preset bandwidth utilization rate may be set according to actual needs, and the preset bandwidth utilization rate is less than or equal to 100%. And if the maximum predicted bandwidth utilization rate is less than or equal to the preset bandwidth utilization rate, the second networking gateway has enough idle resources to receive the target instance.
The specific implementation process of determining whether the bandwidth resource of the second internet-of-things gateway can be in the balanced use state after receiving the target instance according to the estimated bandwidth usage of the second internet-of-things gateway in the multiple time periods after receiving the target instance may refer to the specific implementation process of determining whether the first internet-of-things gateway is in the balanced use state in the embodiments, and is not described in detail herein.
In this embodiment, the second networking gateway is in a balanced use state after receiving the target instance, and the second networking gateway can meet the requirement of network traffic forwarding of all instances on the second networking gateway without performing resource expansion on the second networking gateway, thereby improving the resource utilization rate of the second networking gateway. Moreover, the first internet of things gateway may be in a balanced use state after migrating the target instance, and after migrating the target instance causing unbalanced use, the overall bandwidth utilization rate of the first internet of things gateway may be kept at a level lower than a preset bandwidth utilization rate threshold (for example, 50%), so that the first internet of things gateway may be appropriately scaled, not only does not affect the operation of each instance, but also saves resources and improves the resource utilization rate.
After the instance migration process is completed for the resource scheduling system, whether the reduction processing needs to be performed on each internet of things gateway can be determined according to historical bandwidth use information of a plurality of instances currently running on each internet of things gateway. Specifically, according to historical use bandwidths of each instance in a plurality of instances currently running on each internet of things gateway in a plurality of time periods, the historical use bandwidths of each internet of things gateway in the plurality of time periods are re-determined; according to the re-determined historical use bandwidth of each Internet of things gateway in a plurality of time periods and the total bandwidth of each Internet of things gateway, re-determining the historical bandwidth use rate of each Internet of things gateway in a plurality of time periods; and determining whether expansion capacity processing needs to be carried out on each Internet of things gateway or not according to the re-determined maximum historical bandwidth utilization rate of each Internet of things gateway. For example: when the maximum historical bandwidth utilization rate is less than 50%, capacity reduction processing can be carried out; when the maximum historical bandwidth utilization rate is greater than 1, capacity expansion processing is needed. The capacity reduction instruction can be sent to the corresponding gateway of the Internet of things; and after receiving the capacity reduction instruction, the gateway of the Internet of things performs capacity reduction processing on the bandwidth resource of the first gateway of the Internet of things.
It should be noted that, taking the example that the internet of things gateway includes the cloud cluster, the capacity expansion or capacity reduction processing is performed, that is, the cloud cluster is subjected to the adding and deleting operations of the cloud server. The product of the historical use bandwidth of each instance in each time period and a first preset limiting coefficient (for example, 1.1) larger than 1 can be used as the limiting bandwidth of each instance in each time period. And summing the limited bandwidth of each instance in the multiple instances currently operated by the first Internet of things gateway in the first time period to obtain the total limited bandwidth of the first Internet of things gateway in the first time period. If the ratio of the maximum total limit bandwidth of the first internet-of-things gateway in the total limit bandwidths of the multiple time periods to the total bandwidth of the first internet-of-things gateway is less than or equal to a first preset ratio threshold (for example, 50%), capacity reduction processing is determined; and if the ratio of the maximum total limited bandwidth to the total bandwidth of the first internet of things gateway is greater than or equal to a second preset ratio threshold (for example, 1), determining capacity expansion processing. Whether the capacity expansion or the capacity reduction is performed, the product of the maximum total limit bandwidth and a second preset limit coefficient (e.g., 1.1) larger than 1 may be used as the target total bandwidth.
The first preset limiting coefficient, the second preset limiting coefficient, the first preset ratio threshold and the second preset ratio threshold may be set according to actual needs, which is not specifically limited in the embodiment of the present application. Note: the limited bandwidth referred to in the embodiments of the present application may also be referred to as a bandwidth quota, which may be understood as the maximum bandwidth that can be used.
In addition, the limited bandwidth of each instance in each time period can be sent to the internet of things gateway where each instance is located, so that the internet of things gateway allocates corresponding bandwidth resources for each instance in each time period. In an example, the historical bandwidth may be specifically a historical peak bandwidth.
Therefore, when the traffic emergency which once occurs again in the follow-up process, each gateway of the internet of things can normally respond, and the phenomena of packet loss and the like cannot occur.
The resource allocation scheme in the above embodiment can cope with the traffic burst situation that occurs once, and when the traffic burst exceeds the limited bandwidth or the total bandwidth again, the phenomena such as packet loss and the like still occur. In order to solve the problem, the method may further include:
105. inputting the current used bandwidth of the first instance into a trained bandwidth prediction model so as to predict the predicted used bandwidth of the first instance in a future preset time period by the bandwidth prediction model.
Wherein the bandwidth prediction model is trained based on historical bandwidth usage record information for a plurality of instances.
106. And determining the estimated limit bandwidth of the first instance in the future preset time period according to the predicted use bandwidth of the first instance in the future preset time period.
107. And sending a resource allocation instruction to the first internet of things gateway according to the estimated limited bandwidth of the first instance in the future preset time period, so that the first internet of things gateway allocates bandwidth resources for the first instance.
In the above 105, the multiple instances include a first instance, and the first instance refers to any one of the multiple instances. The bandwidth prediction model may be a bandwidth prediction model based on a machine learning algorithm, wherein the machine learning algorithm may include: GBRT (Gradient assisted Regression Trees). The historical bandwidth usage records of the above examples may specifically be of the last half year, the last three months, the last month. The historical bandwidth usage record information of the above examples includes: the historical use of bandwidth by each instance at each historical point in time. A preset time interval is set between any two adjacent time points, for example: for 1 min. The bandwidth prediction model may be trained based on historical bandwidth usage record information for each of the plurality of instances. The internal construction and training process in the bandwidth prediction model can refer to the corresponding contents in the prior art. It should be noted that, in addition to being trained based on the historical bandwidth usage record information of the multiple instances, the bandwidth prediction model may also be trained based on historical bandwidth usage records of other instances on other internet-of-things gateways.
The current usage bandwidth of each instance may specifically be the usage bandwidth of each instance within a current preset time period (e.g., 1 min).
The current bandwidth usage of each of the plurality of instances may be input into a trained bandwidth prediction model to predict a predicted bandwidth usage of each instance for a future predetermined time period (e.g., the next 5min) by the bandwidth prediction model.
In 106, the product of the predicted usage bandwidth of the first instance in the future preset time period and the first preset limiting system (e.g., 1.1) can be used as the predicted limiting bandwidth of the first instance in the future preset time period.
In 107, the resource allocation command may carry the estimated bandwidth limit of the first instance in the future preset time period. And the first internet of things gateway allocates bandwidth resources for the first instance according to the pre-estimated limited bandwidth.
Optionally, the method may further include:
108. when the predicted usage bandwidth of the first instance in the future preset time period is greater than the current actual limiting bandwidth of the first instance, or when the ratio of the predicted usage bandwidth to the current actual limiting bandwidth is less than or equal to a fifth preset ratio threshold (e.g., 70%), the above steps 106 and 107 are triggered to be executed.
When the predicted usage bandwidth of the first instance in the future preset time period is greater than the current actual limit bandwidth of the first instance, it is indicated that the bandwidth resources allocated for the first instance at present are not enough to be used, and the bandwidth resources need to be increased; when the ratio of the predicted used bandwidth to the current actual limited bandwidth is less than or equal to a fifth predetermined ratio threshold (e.g., 70%), it indicates that there is more bandwidth resources currently allocated for the first instance, and there is a surplus, which requires reducing the bandwidth resources.
And when the predicted use bandwidth of the first instance in the future preset time period is less than or equal to the current actual limit bandwidth of the first instance, and the ratio of the predicted use bandwidth to the current actual limit bandwidth is greater than a fifth preset ratio threshold, continuing to use the current actual limit bandwidth of the first instance as the predicted limit bandwidth of the first instance in the future preset time period. When the predicted usage bandwidth of the first instance in the future preset time period is less than or equal to the current actual limit bandwidth of the first instance, and the ratio of the predicted usage bandwidth to the current actual limit bandwidth is greater than a fifth preset ratio threshold, it is indicated that the bandwidth resources currently allocated for the first instance are suitable, and therefore, bandwidth resources do not need to be reallocated for the first instance.
In practical applications, regarding other examples than the first example in the multiple examples, the steps 105, 106, 107, and 108 may also be used to implement the bandwidth dynamic adjustment. In practical application, for multiple instances, the dynamic bandwidth adjustment of the multiple instances can be completed only by sending a resource allocation instruction to the first internet of things gateway once.
Optionally, the method may further include:
109. and determining whether the bandwidth resource of the first internet of things gateway needs to be subjected to capacity expansion processing or not according to the estimated limit bandwidth of each instance in the multiple instances in the future preset time period and the total bandwidth of the first internet of things gateway.
According to the sum of the estimated limited bandwidths of the multiple instances in the future preset time period, the sum is used as the estimated total limited bandwidth of the first internet of things gateway in the future preset time period; and determining whether the bandwidth resource of the first Internet of things gateway needs to be subjected to expansion and contraction capacity processing or not according to the estimated total limited bandwidth and the total bandwidth of the first Internet of things gateway. Specifically, if the ratio of the estimated total limited bandwidth to the total bandwidth of the first internet of things gateway is less than or equal to a third preset ratio threshold (for example, 50%), capacity reduction processing is determined; and if the ratio of the estimated total limited bandwidth to the total bandwidth of the first internet of things gateway is greater than a fourth preset ratio threshold (for example, 1), determining capacity expansion processing. And if the ratio of the estimated total limited bandwidth to the total bandwidth of the first internet of things gateway is larger than a third preset proportion threshold and smaller than or equal to a fourth preset proportion threshold, determining that the capacity expansion and contraction processing is not performed.
Whether the capacity expansion or the capacity reduction is carried out, the target total bandwidth can be determined according to the estimated total limit bandwidth. Specifically, the product of the estimated total bandwidth limit and the second predetermined limit coefficient may be used as the target total bandwidth. Generating a capacity expansion and contraction instruction according to the target total bandwidth; and sending the scaling instruction to the first Internet of things gateway so as to perform scaling processing according to the instruction by the first Internet of things gateway.
In the technical scheme provided by the embodiment of the application, the bandwidth prediction model is obtained by training based on the historical bandwidth use record information of each instance, and the bandwidth prediction model predicts the predicted use bandwidth of the future preset time period based on the bandwidth data acquired in real time. Therefore, the change of the flow can be sensed in real time, the dynamic expansion and contraction of the bandwidth resources are facilitated, and the packet loss rate caused by the flow burst can be reduced.
The first internet of things gateway can perform bandwidth resource allocation after the capacity expansion and reduction processing is performed. The first internet of things gateway can allocate corresponding bandwidth resources to each instance according to the pre-estimated limit bandwidth of each instance in the future preset time period. The bandwidth resources allocated to each instance can only serve the instance subsequently, but cannot serve other instances, and therefore resource isolation among the instances is achieved. The bandwidth resources may include CPU resources and memory resources.
Further, the method may further include:
110. and receiving the bandwidth adjustment requirement set by the user for the first instance.
111. And determining the target use bandwidth of the first instance in the future time period to be adjusted according to the bandwidth adjustment requirement.
112. And if the future preset time period is intersected with the future time period to be adjusted, determining the estimated limited bandwidth of the first instance in the future preset time period according to the target use bandwidth of the first instance in the time period to be adjusted.
The product of the target usage bandwidth of the first instance in the time period to be adjusted and a first preset limiting coefficient can be used as the estimated limiting bandwidth of the first instance in the future preset time period.
113. If the future preset time period and the future time period to be adjusted do not intersect, the step of determining the bandwidth limit of the first instance in the future preset time period according to the predicted use bandwidth of the first instance in the future preset time period is triggered.
The product of the predicted usage bandwidth of the first instance over the future preset time period and a first preset limiting coefficient may be used as the limiting bandwidth of the first instance over the future preset time period.
The bandwidth adjustment requirement may include an indication of a time period and an indication of bandwidth usage. The indicated time period may be taken as the future time period to be adjusted, or the start of the indicated time period may be subtracted by a preset start threshold (e.g., 3min) as the future time period to be adjusted. Thus, the start of the future time period to be adjusted may be earlier than the start of the indication time period. The indicated usage bandwidth is taken as the target usage bandwidth.
For example, the time period is indicated to be 10 o 'clock to 11 o' clock at 3 month and 3 day of 2022 year, and the usage bandwidth is indicated to be 1000MB/s, then the time period to be adjusted is indicated to be 57 o 'clock to 11 o' clock at 3 month and 3 day of 2022 year, and the target usage bandwidth is 1000 MB/s.
In the above 111, for example: the future preset time period is from 9 points 55 to 10 points in 3 months and 3 days in 2022, the time period to be adjusted is from 9 points 57 to 11 points in 3 months and 3 days in 2022, and the future preset time period and the future time period to be adjusted are intersected.
For another example: the future preset time period is from 9 o 'clock 50 to 9 o' clock 55 at 3 month and 3 day of 2022 year, the future time period to be adjusted is from 9 o 'clock 57 to 11 o' clock at 3 month and 3 day of 2022 year, and the future preset time period and the future time period to be adjusted are not intersected.
Fig. 5 illustrates the configured bandwidth limits for instances on an internet of things gateway at different time periods.
In this embodiment, bandwidth requirements transmitted by a user (i.e., a tenant) are received to schedule bandwidth resources, so that the actual use condition of the user is better fitted.
Fig. 3 is a flowchart illustrating a resource scheduling method according to another embodiment of the present application. The execution subject of the method can be the gateway controller in the resource scheduling system. As shown in fig. 3, the method may include:
201. inputting the current use bandwidth of a first instance operated by a first internet-of-things gateway into a trained bandwidth prediction model so as to predict the predicted use bandwidth of the first instance in a future preset time period by the bandwidth prediction model.
202. And determining the estimated limit bandwidth of the first instance in the future preset time period according to the predicted use bandwidth of the first instance in the future preset time period.
203. And sending a resource allocation instruction to the first internet of things gateway according to the estimated limited bandwidth of the first instance in the future preset time period, so that the first internet of things gateway allocates bandwidth resources for the first instance.
In the technical scheme provided by the embodiment of the application, the bandwidth prediction model is obtained by training based on the historical bandwidth use record information of each instance, and the bandwidth prediction model predicts the predicted use bandwidth of the future preset time period based on the bandwidth data acquired in real time. Therefore, the change of the flow can be sensed in real time, the dynamic allocation of the bandwidth resources is facilitated, and the packet loss rate caused by the flow burst can be reduced.
Further, the method can also comprise the following steps:
204. and determining whether the bandwidth resource of the first Internet of things gateway needs to be subjected to capacity expansion or not according to the estimated limit bandwidth of each instance in the multiple instances operated by the first Internet of things gateway in the future preset time period and the total bandwidth of the first Internet of things gateway.
Wherein the plurality of instances includes a first instance. After the capacity expansion and reduction processing, the bandwidth resource allocation can be carried out.
In this example, the capacity expansion and reduction of the bandwidth resources can be performed on the gateway of the internet of things, which is beneficial to improving the resource utilization rate and reducing the packet loss rate caused by traffic burst.
Here, it should be noted that: the content of each step in the method provided by the embodiment of the present application, which is not described in detail in the foregoing embodiment, may refer to the corresponding content in the foregoing embodiment, and is not described herein again. In addition, the method provided in the embodiment of the present application may further include, in addition to the above steps, other parts or all of the steps in the above embodiments, and specific reference may be made to corresponding contents in the above embodiments, which is not described herein again.
The resource scheduling scheme provided by the embodiment of the application can be applied to: the intelligent mobile terminal device comprises the mobile terminal device, a car networking device, intelligent wearing, intelligent security and protection, a mobile terminal device, intelligent industry, intelligent agriculture, a sharing device and medical service, wherein the mobile terminal device is arranged in any one scene of the internet of things or a mixed scene of more than two scenes of the internet of things. The internet of things terminal may include: camera, smart car, cell-phone, unmanned aerial vehicle etc..
The resource scheduling scheme provided in the embodiment of the present application will be described with reference to fig. 4 as follows:
step 1, the client 60 sends an instance creation request to the gateway controller 10 in response to an input operation by a user.
And step 2, the gateway controller 10 determines the initial limited bandwidth according to the internet of things card information carried in the instance creation request.
Specifically, the initial limited bandwidth is determined according to the number of the internet of things cards.
And step 3, the gateway controller 10 sends an instance creating instruction carrying the initial bandwidth limit to the internet of things gateway 20.
And 4, the gateway 20 of the internet of things creates corresponding examples aiming at the users.
And step 5, the internet of things terminal 30 of the user sends a traffic packet to the internet of things gateway 20.
And 6, the corresponding instance of the user on the internet of things gateway 20 is responsible for forwarding the traffic packet to the cloud internet of things platform 50.
And 7, reporting the use bandwidth of each instance once per minute by the gateway 20 of the Internet of things so as to record the use bandwidth by the gateway controller.
And step 8, the gateway controller 10 determines the example to be scheduled and the target internet of things gateway to be scheduled.
The specific implementation process of step 8 may participate in the corresponding content in the above embodiments, and is not described herein again.
And 9, the gateway controller 10 sends an instruction related to instance migration to the gateway of the internet of things.
Specifically, an instance creation instruction can be sent to a target internet of things gateway; and after receiving the successful establishment message fed back by the target Internet of things gateway, sending an instance deleting instruction to the Internet of things gateway where the instance to be scheduled originally is located so as to delete the target instance to be scheduled by the Internet of things gateway.
Step 10, the client 60 sends the bandwidth adjustment requirement input by the user to the gateway controller 10.
And step 11, the gateway controller 10 estimates the estimated limited bandwidth of each instance by combining the prediction result of the bandwidth prediction model and the bandwidth adjustment requirement.
For a specific process, reference may be made to corresponding contents in the above embodiments, which are not described herein again.
And step 12, the gateway controller 10 determines whether the expansion and contraction capacity processing needs to be carried out on the gateway of the internet of things according to the estimation result.
For a specific process, reference may be made to corresponding contents in the above embodiments, which are not described herein again.
And step 13, when the capacity expansion and reduction processing is needed, the gateway controller 10 sends a capacity expansion and reduction instruction to the internet of things gateway 20.
And step 14, the gateway controller 10 sends a resource allocation instruction to the internet of things gateway 20 according to the estimated limited bandwidth of each example.
And step 15, the gateway 20 of the internet of things reallocates resources.
In summary, the embodiments of the present application provide a segmented peak shifting scheduling scheme and a bandwidth resource elastic scaling scheme based on tenant configuration and implementing bandwidth awareness.
Fig. 6 shows a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 6, the electronic device includes a memory 1101 and a processor 1102. The memory 1101 may be configured to store other various data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device. The memory 1101 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The memory 1101 is used for storing programs;
the processor 1102 is coupled to the memory 1101, and configured to execute the program stored in the memory 1101, so as to implement the resource scheduling method provided by the foregoing method embodiments.
Further, as shown in fig. 6, the electronic device further includes: communication components 1103, display 1104, power components 1105, audio components 1106, and the like. Only some of the components are schematically shown in fig. 6, and the electronic device is not meant to include only the components shown in fig. 6.
Accordingly, the present application further provides a computer-readable storage medium storing a computer program, where the computer program can implement the steps or functions of the resource scheduling method provided by the foregoing method embodiments when executed by a computer.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present application.

Claims (14)

1. A resource scheduling method comprises the following steps:
determining whether the bandwidth resources of the first Internet of things gateway are in a balanced use state or not according to historical bandwidth use information of the first Internet of things gateway;
when the first Internet of things gateway bandwidth resource is not in a balanced use state, determining a target example from a plurality of examples operated by the first Internet of things gateway; wherein the target instance is an instance such that the first internet of things gateway bandwidth resource is not in a balanced usage state;
determining whether a second networking gateway is suitable for receiving the target instance according to historical bandwidth utilization information of the second networking gateway and historical bandwidth utilization information of the target instance;
and when the second networking gateway is determined to be suitable for receiving the target instance, migrating the target instance to the second networking gateway.
2. The method of claim 1, wherein the historical bandwidth usage information of the first internet of things gateway comprises: historical use bandwidth of the first internet of things gateway in a plurality of time periods;
determining whether the bandwidth resources of the first internet of things gateway are in a balanced use state according to historical bandwidth use information of the first internet of things gateway, wherein the method comprises the following steps:
determining historical bandwidth utilization rates of the first Internet of things gateway in the multiple time periods according to the historical utilization bandwidth of the first Internet of things gateway in the multiple time periods and the total bandwidth of the first Internet of things gateway;
and determining whether the first Internet of things gateway bandwidth resource is in a balanced use state according to the historical bandwidth use rate of the first Internet of things gateway in the multiple time periods.
3. The method of claim 2, wherein determining whether the first internet of things gateway bandwidth resource is in a balanced usage state based on historical bandwidth usage of the first internet of things gateway over the plurality of time periods comprises:
determining a time period pair according to the plurality of time periods; the time period pair comprises a first time period and a second time period;
determining the difference of the historical bandwidth utilization rate of the time period to the corresponding historical bandwidth utilization rate according to the historical bandwidth utilization rate of the first internet of things gateway in the first time period and the historical bandwidth utilization rate of the first internet of things gateway in the second time period;
and if the difference of the historical bandwidth utilization rate corresponding to the time period is greater than or equal to a first preset difference threshold value, determining that the first Internet of things gateway bandwidth resource is not in a balanced utilization state.
4. The method of claim 3, wherein the pair of time periods is plural;
when the bandwidth resources of the first internet of things gateway are not in a balanced use state, determining a target instance from a plurality of instances operated by the first internet of things gateway, including:
determining a target time period pair from the time period pairs according to the historical bandwidth utilization rate difference corresponding to the time period pairs; wherein, the difference of the target time period to the corresponding historical bandwidth utilization rate is greater than or equal to the first preset difference threshold; the target time period pair comprises a first target time period and a second target time period;
and determining the target instance from the multiple instances according to the historical use bandwidth of each instance in the multiple instances in the first target time period and the historical use bandwidth of each instance in the multiple instances in the second target time period.
5. The method of claim 4, wherein determining the target instance from the plurality of instances based on historical bandwidth usage of each of the plurality of instances over the first target time period and the historical bandwidth usage over the second target time period comprises:
determining the historical use bandwidth difference of each instance between the first target time period and the second target time period according to the historical use bandwidth of each instance in the plurality of instances in the first target time period and the historical use bandwidth of each instance in the second target time period;
and determining the example with the largest difference of the historical use bandwidths as the target example.
6. The method of any of claims 1-5, wherein the historical bandwidth usage information of the second networked gateway comprises: historical bandwidth usage by the second networked gateway over a plurality of time periods; the historical bandwidth usage information of the target instance includes: historical bandwidth usage of the target instance over the plurality of time periods;
determining whether a second networked gateway is suitable for receiving the target instance according to historical bandwidth usage information of the second networked gateway and historical bandwidth usage information of the target instance, including:
according to the historical use bandwidths of the second networking gateway in the multiple time periods, the historical use bandwidths of the target instance in the multiple time periods and the total bandwidth of the second networking gateway, determining the estimated bandwidth use rates of the second networking gateway in the multiple time periods after receiving the target instance;
and determining whether the second networking gateway is suitable for receiving the target instance according to the estimated bandwidth utilization rate of the second networking gateway in the plurality of time periods after the target instance is received.
7. The method of claim 6, wherein determining whether the second networked gateway is suitable for receiving the target instance based on its estimated bandwidth usage over the plurality of time periods after receiving the target instance comprises:
determining the maximum estimated bandwidth utilization rate from the estimated bandwidth utilization rates of the second networking gateway in the multiple time periods after the second networking gateway receives the target instance;
if the maximum estimated bandwidth utilization rate is less than or equal to a preset bandwidth utilization rate, determining whether the bandwidth resources of the second networking gateway can be in a balanced use state after receiving the target instance according to the estimated bandwidth utilization rates of the second networking gateway in the multiple time periods after receiving the target instance;
and if the bandwidth resources of the second networking gateway can be in a balanced use state after the second networking gateway receives the target instance, determining that the second networking gateway is suitable for receiving the target instance.
8. The method of any of claims 1-5, wherein the plurality of instances includes a first instance; the method further comprises the following steps:
inputting the current used bandwidth of the first instance into a trained bandwidth prediction model to predict the predicted used bandwidth of the first instance in a future preset time period by the bandwidth prediction model;
determining the estimated limit bandwidth of the first instance in the future preset time period according to the predicted use bandwidth of the first instance in the future preset time period;
and sending a resource allocation instruction to the first internet of things gateway according to the estimated limited bandwidth of the first instance in the future preset time period, so that the first internet of things gateway allocates bandwidth resources for the first instance.
9. The method of claim 8, further comprising:
and determining whether the bandwidth resource of the first internet of things gateway needs to be subjected to capacity expansion processing or not according to the estimated limit bandwidth of each instance in the multiple instances in the future preset time period and the total bandwidth of the first internet of things gateway.
10. The method of claim 8, further comprising:
receiving a bandwidth adjustment requirement set by a user for the first instance;
determining a target use bandwidth of the first instance in a future time period to be adjusted according to the bandwidth adjustment requirement;
if the future preset time period is intersected with the future time period to be adjusted, determining the estimated limit bandwidth of the first instance in the future preset time period according to the target use bandwidth of the first instance in the time period to be adjusted;
if the future preset time period and the future time period to be adjusted do not intersect, the step of determining the bandwidth limit of the first instance in the future preset time period according to the predicted use bandwidth of the first instance in the future preset time period is triggered.
11. A resource scheduling method further comprises:
inputting the current use bandwidth of a first instance operated by a first internet-of-things gateway into a trained bandwidth prediction model so as to predict the predicted use bandwidth of the first instance in a future preset time period by the bandwidth prediction model;
determining the estimated limit bandwidth of the first instance in the future preset time period according to the predicted use bandwidth of the first instance in the future preset time period;
and sending a resource allocation instruction to the first internet of things gateway according to the estimated limited bandwidth of the first instance in the future preset time period, so that the first internet of things gateway allocates bandwidth resources for the first instance.
12. A resource scheduling system, comprising: the gateway controller and the plurality of Internet of things gateways; the plurality of internet of things gateways comprise a first internet of things gateway and a second internet of things gateway;
wherein the gateway controller is configured to:
determining whether the first Internet of things gateway bandwidth resource is in a balanced use state according to the historical bandwidth use information of the first Internet of things gateway;
when the first Internet of things gateway bandwidth resource is not in a balanced use state, determining a target example from a plurality of examples operated by the first Internet of things gateway; wherein the target instance is an instance such that the first internet of things gateway bandwidth resource is not in a balanced usage state;
determining whether the second networking gateway is suitable for receiving the target instance according to the historical bandwidth utilization information of the second networking gateway and the historical bandwidth utilization information of the target instance;
and when the second networking gateway is determined to be suitable for receiving the target instance, migrating the target instance to the second networking gateway.
13. An electronic device, comprising: a memory and a processor, wherein,
the memory is used for storing programs;
the processor, coupled to the memory, is configured to execute the program stored in the memory to implement the resource scheduling method of any one of claims 1 to 11.
14. A computer-readable storage medium storing a computer program, wherein the computer program is capable of implementing the resource scheduling method of any one of claims 1 to 11 when executed by a computer.
CN202210351157.3A 2022-04-02 2022-04-02 Resource scheduling method, system, device and storage medium Pending CN114697226A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210351157.3A CN114697226A (en) 2022-04-02 2022-04-02 Resource scheduling method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210351157.3A CN114697226A (en) 2022-04-02 2022-04-02 Resource scheduling method, system, device and storage medium

Publications (1)

Publication Number Publication Date
CN114697226A true CN114697226A (en) 2022-07-01

Family

ID=82141366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210351157.3A Pending CN114697226A (en) 2022-04-02 2022-04-02 Resource scheduling method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN114697226A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874542A (en) * 2018-06-07 2018-11-23 桂林电子科技大学 Kubernetes method for optimizing scheduling neural network based
CN110389838A (en) * 2019-07-24 2019-10-29 北京邮电大学 A kind of Real-Time Scheduling suitable for virtual resource and online migration management-control method
CN111400045A (en) * 2020-03-16 2020-07-10 杭州海康威视系统技术有限公司 Load balancing method and device
CN111880939A (en) * 2020-08-07 2020-11-03 曙光信息产业(北京)有限公司 Container dynamic migration method and device and electronic equipment
CN112433813A (en) * 2020-11-19 2021-03-02 北京浪潮数据技术有限公司 Resource scheduling method, system, equipment and computer readable storage medium
US20210329069A1 (en) * 2020-04-20 2021-10-21 Cisco Technology, Inc. Distributed resilient load-balancing for multipath transport protocols

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874542A (en) * 2018-06-07 2018-11-23 桂林电子科技大学 Kubernetes method for optimizing scheduling neural network based
CN110389838A (en) * 2019-07-24 2019-10-29 北京邮电大学 A kind of Real-Time Scheduling suitable for virtual resource and online migration management-control method
CN111400045A (en) * 2020-03-16 2020-07-10 杭州海康威视系统技术有限公司 Load balancing method and device
US20210329069A1 (en) * 2020-04-20 2021-10-21 Cisco Technology, Inc. Distributed resilient load-balancing for multipath transport protocols
CN111880939A (en) * 2020-08-07 2020-11-03 曙光信息产业(北京)有限公司 Container dynamic migration method and device and electronic equipment
CN112433813A (en) * 2020-11-19 2021-03-02 北京浪潮数据技术有限公司 Resource scheduling method, system, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
EP3419247B1 (en) Method and device for storage resource allocation for video cloud storage
US20180375957A1 (en) Access scheduling method and apparatus for terminal, and computer storage medium
US20140304713A1 (en) Method and apparatus for distributed processing tasks
CN104092756A (en) Cloud storage system resource dynamic allocation method based on DHT mechanism
CN109085999A (en) data processing method and processing system
CN111092921B (en) Data acquisition method, device and storage medium
CN108924203B (en) Data copy self-adaptive distribution method, distributed computing system and related equipment
CN113055469B (en) Cloud container storage control method and system, electronic equipment and storage medium
CN104348798A (en) Network assigning method and device, scheduling server, and system
CN111831232A (en) Data storage method and device, storage medium and electronic device
CN111917586A (en) Container bandwidth adjusting method, server and storage medium
CN111131841A (en) Live indirect access method and device, electronic equipment and storage medium
KR101402367B1 (en) Efficient and cost-effective distributed call admission control
CN110149377A (en) A kind of video service node resource allocation methods, system, device and storage medium
CN113835822A (en) Cross-cloud-platform virtual machine migration method and device, storage medium and electronic device
CN110515728B (en) Server scheduling method and device, electronic equipment and machine-readable storage medium
CN113095781A (en) Temperature control equipment control method, equipment and medium based on edge calculation
US20240106890A1 (en) Peer-to-peer network scheduling method and system
CN109413117B (en) Distributed data calculation method, device, server and computer storage medium
CN116069493A (en) Data processing method, device, equipment and readable storage medium
CN108124021B (en) Method, device and system for obtaining Internet Protocol (IP) address and accessing website
CN110286854B (en) Method, device, equipment and storage medium for group member management and group message processing
CN114697226A (en) Resource scheduling method, system, device and storage medium
CN115421930B (en) Task processing method, system, device, equipment and computer readable storage medium
Xing et al. Geographic-based service request scheduling model for mobile cloud computing

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