CN109039791B - Bandwidth management method and device and computer equipment - Google Patents

Bandwidth management method and device and computer equipment Download PDF

Info

Publication number
CN109039791B
CN109039791B CN201811276107.3A CN201811276107A CN109039791B CN 109039791 B CN109039791 B CN 109039791B CN 201811276107 A CN201811276107 A CN 201811276107A CN 109039791 B CN109039791 B CN 109039791B
Authority
CN
China
Prior art keywords
bandwidth
message
reserved
header information
idle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811276107.3A
Other languages
Chinese (zh)
Other versions
CN109039791A (en
Inventor
徐强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201811276107.3A priority Critical patent/CN109039791B/en
Publication of CN109039791A publication Critical patent/CN109039791A/en
Application granted granted Critical
Publication of CN109039791B publication Critical patent/CN109039791B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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/76Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions

Abstract

The specification provides a bandwidth management method, a bandwidth management device and computer equipment, wherein the method comprises the following steps: receiving a message; reading message header information in the message; distributing the message to a bandwidth channel adapted to the message header information; marking the message type of the message positioned in the bandwidth channel; and carrying out transmission control on the message according to the message type. The method can realize multiple configuration schemes, more reasonably allocate the bandwidth, avoid bandwidth exhaustion, simplify the configuration flow, and effectively help a network administrator to reasonably allocate bandwidth resources, thereby improving the network operation quality.

Description

Bandwidth management method and device and computer equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a bandwidth management method and apparatus, and a computer device.
Background
With the rapid development of network technologies, applications become more and more diverse and complex, and the number of packets increases dramatically, which may cause network congestion and even packet loss, resulting in poor quality of network applications and even unusable network applications.
Currently, a common management scheme is QoS (Quality of Service), a common QoS model is a DiffServ model, and the DiffServ model divides traffic in a network into multiple classes, each class enjoys different processing, and particularly different classes enjoy different priority processing when the network is congested.
In the DiffServ model, before an application program sends a message, the QoS requirement is informed to a network node by setting the QoS parameter information of the message.
After the flow enters the network, the network node provides service according to the established QoS parameter information, classifies the messages, gives differential service to different types of flow according to the classification, performs flow control and forwarding differently, and provides end-to-end QoS guarantee.
The QoS is to meet the requirements of users for different service qualities of different applications, allocate and schedule resources according to the requirements of the users, provide different service qualities for different flows, preferentially process messages with strong real-time performance and importance, provide lower processing priority for messages with weak real-time performance, provide service quality guarantee only for application programs, and have poor control accuracy and poor rationality of bandwidth allocation.
Disclosure of Invention
In order to overcome the problems in the related art, the specification provides a bandwidth management method, a bandwidth management device and computer equipment.
According to a first aspect of embodiments herein, there is provided a bandwidth management method, the method comprising:
receiving a message;
reading message header information in the message;
distributing the message to a bandwidth channel adapted to the message header information;
marking the message type of the message positioned in the bandwidth channel;
and carrying out transmission control on the message according to the message type.
According to a second aspect of embodiments herein, there is provided a bandwidth management apparatus comprising:
the message receiving module is used for receiving a message;
a message header information reading module, configured to read message header information in the message;
a bandwidth channel allocation module, configured to allocate the packet to a bandwidth channel adapted to the packet header information;
a message type marking module, configured to mark a message type for the message located in the bandwidth channel;
and the transmission control module is used for carrying out transmission control on the message according to the message type.
According to a third aspect of embodiments herein, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the following method when executing the program:
receiving a message;
reading message header information in the message;
distributing the message to a bandwidth channel adapted to the message header information;
marking the message type of the message positioned in the bandwidth channel;
and carrying out transmission control on the message according to the message type.
The technical scheme provided by the embodiment of the specification can have the following beneficial effects:
in the embodiment of the present specification, a message is received, message header information is read from the message, the message is allocated to a bandwidth channel adapted to the message header information, a message type is marked for the message located in the bandwidth channel, transmission control is performed on the message according to the message type, and corresponding bandwidth management is performed based on the bandwidth channel and the message type, so that multiple configuration schemes can be implemented, bandwidth is more reasonably allocated, bandwidth exhaustion is avoided, a configuration flow is simplified, a network administrator is effectively helped to reasonably allocate bandwidth resources, and thus network operation quality is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the specification.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
Fig. 1 is a flow diagram illustrating a bandwidth management method in accordance with an exemplary embodiment of the present description.
Fig. 2 is a flow chart illustrating a method of bandwidth channel allocation according to an exemplary embodiment of the present disclosure.
Fig. 3 is a flow diagram illustrating a bandwidth policy matching method in accordance with an exemplary embodiment of the present description.
Fig. 4 is a flowchart illustrating a message type marking method according to an exemplary embodiment of the present disclosure.
Fig. 5 is a hardware configuration diagram of a computer device in which the bandwidth management apparatus according to the embodiment of the present disclosure is located.
Fig. 6 is a block diagram of a bandwidth management device shown in accordance with an exemplary embodiment of the present description.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The following provides a detailed description of examples of the present specification.
As shown in fig. 1, fig. 1 is a flowchart illustrating a bandwidth management method according to an exemplary embodiment, including the following steps:
step 101, receiving a message.
In this embodiment, the network elements capable of supporting bandwidth management include hosts, routers, switches, and the like, and the roles of these network elements include:
allocating bandwidth channels to the messages, marking types, and providing different processing for different types of messages;
providing flow supervision and flow shaping, and limiting and adjusting the input and output speeds of the messages;
admission control is provided to determine whether messages are allowed to use network resources.
Step 102, reading message header information in the message.
The message (message) is a data unit exchanged and transmitted in the network, and is also a unit transmitted by the network. The message contains the complete data information to be sent, and the lengths of the messages do not need to be consistent.
The message is continuously encapsulated into packets, packets and frames for transmission in the transmission process, and the encapsulation mode is to add a header consisting of some control information, namely the message header.
In this embodiment, if a forwarded message is received, Header information required for allocating a bandwidth channel may be read from a Header (Header).
And 103, distributing the message to a bandwidth channel adapted to the message header information.
In this embodiment, the bandwidth channel may refer to a virtual channel through which the message passes.
Configuring a plurality of bandwidth channels in a network, wherein each bandwidth channel can be used for transmitting different types of flow, comparing message header information of a message with the setting of the bandwidth channel, and selecting a proper virtual channel, thereby distributing the message to the proper bandwidth channel.
In one embodiment of the present invention, as shown in fig. 2, step 103 may include the following steps:
in step S11, the current system time is queried.
Step S12, if the system time is within a preset effective time, searching for a bandwidth policy that takes effect within the effective time.
In this embodiment, a plurality of bandwidth policies may be set in advance according to the service requirements, and the packet may be guaranteed or limited by referring to the bandwidth channel.
The effective time, that is, the time when the bandwidth policy is effective, can be set in each bandwidth policy.
For example, a certain bandwidth policy is to prohibit access to the shopping website, the effective time of the bandwidth policy is 8:00-18:00 of a working day, namely 8:00-18:00 of the working day, the bandwidth policy is effective, and the access to the shopping website is prohibited.
At this time, the current system time may be read, and the effective time of each bandwidth policy is traversed, and the system time is compared with each effective time.
If the current system time is within the effective time, the bandwidth strategy is effective and can be used for matching with the message header information.
If the current system time is beyond the effective time, the bandwidth strategy is not effective and is not used for matching with the message header information.
And step S13, matching the message header information with a bandwidth strategy.
Step S14, if the header information of the packet is successfully matched with the bandwidth policy, the packet is allocated to a bandwidth channel corresponding to the bandwidth policy.
In this embodiment, the header information may be matched with the bandwidth policy, and whether the header information conforms to the setting of the bandwidth policy is determined.
And if so, distributing the message to a bandwidth channel indicated by the bandwidth strategy to limit the flow.
If not, the message is distributed to the bandwidth channel without speed limit and is directly sent from the network interface.
In one embodiment, two or more bandwidth policies are preset, and each bandwidth policy may configure a corresponding priority according to the traffic demand.
In this embodiment, the header information and the bandwidth policy may be sequentially matched according to the order of priority, and until the matching is successful, the bandwidth policy with a high priority is preferentially used.
Further, for each match, the bandwidth policy with the highest priority may be selected from the currently unmatched bandwidth policies.
And judging whether the message header information is matched with the bandwidth strategy with the highest priority.
If yes, the message header information is successfully matched with the bandwidth strategy with the highest priority.
If not, returning to select the bandwidth strategy with the highest priority from the currently unmatched bandwidth strategies, namely, failing to match currently, and carrying out next matching.
In one example, the message header information includes at least one of:
source domain, destination domain, source IP address, destination IP address, source service, source user, source application.
Correspondingly, the bandwidth policy includes at least one policy parameter as follows:
a reference domain, a reference address, a reference service, a reference user, a reference application.
The reference domain belongs to a security domain and is a set of networks connected with a plurality of interfaces, and users in the networks have the same security attribute.
In a bandwidth policy, the configuration reference domain may limit traffic, for example, from Trust (trusted zone) to DMZ (demilitarized zone).
The reference address belongs to a single address, an address group or a domain name, and taking the IP address as an example, the IP address is a same address format provided by an IP protocol and is a logic address distributed to each network and each host on the Internet; a domain name is a name used to identify a computer or group of computers on a network, and may be mapped to an IP.
In the bandwidth policy, the configuration reference address may limit traffic, for example, from 192.168.0.0/24 to 10.10.0.0/24.
A reference service belongs to a single service or group of services, a so-called service, that is a set of service agreements provided by the layers in the network to its upper layers. Common service types include FTP (File Transfer Protocol), HTTP (HyperText Transfer Protocol), DNS (Domain Name System), and the like.
In the bandwidth policy, the configuration reference service may limit traffic, for example, HTTP traffic may be limited assuming the configured service is HTTP.
The reference user is a single user or a user group, namely a user needing to be authenticated to surf the internet.
In the bandwidth policy, the configuration reference user may allocate the size of the available bandwidth to the user, for example, assuming a user group, the available bandwidth of all users in this user group may be limited.
The reference application is a network application, i.e. an application that needs to perform network communication.
In the bandwidth policy, the configuration reference application may limit the speed of the application, for example, assuming that the mailbox client and the downloading tool are configured, the necessary bandwidth may be allocated to the mailbox client mostly, and the bandwidth available for the downloading tool is reduced.
In one case, the source domain, the destination domain and the reference domain are compared, and if the source domain and the destination domain belong to the reference domain, it is determined that the header information is successfully matched with the bandwidth policy.
At this time, the packet may be allocated to the bandwidth channel corresponding to the bandwidth policy (reference field) to limit the flow.
In another case, the source IP address, the destination IP address and the reference address are compared, and if the source IP address and the destination IP address belong to the reference address, it is determined that the header information and the bandwidth policy are successfully matched.
At this time, the packet may be allocated to the bandwidth channel corresponding to the bandwidth policy (reference address) to limit the flow.
In another case, the source service is compared with the reference service, and if the source service belongs to the reference service, it is determined that the header information is successfully matched with the bandwidth policy.
At this time, the packet may be allocated to the bandwidth channel corresponding to the bandwidth policy (reference service) to limit the flow.
In another case, the source user is compared with the reference user, and if the source user belongs to the reference user, it is determined that the message header information is successfully matched with the bandwidth policy.
At this time, the packet may be allocated to the bandwidth channel corresponding to the bandwidth policy (reference user) to limit the flow.
In another case, the source application is compared with the reference application, and if the source application belongs to the reference application, it is determined that the header information is successfully matched with the bandwidth policy.
At this time, the packet may be allocated to the bandwidth channel corresponding to the bandwidth policy (reference application) to limit the flow.
For a certain service requirement, the priority of the bandwidth policy may be configured as:
the priority of the bandwidth strategy to which the reference domain belongs is higher than that of the bandwidth strategy to which the reference address belongs;
the priority of the bandwidth strategy to which the reference address belongs is higher than that of the bandwidth strategy to which the reference protocol belongs;
the priority of the bandwidth strategy to which the reference protocol belongs is higher than that of the bandwidth strategy to which the reference user belongs;
the bandwidth policy to which the reference user belongs has a higher priority than the bandwidth policy to which the reference application belongs.
In this case, as shown in fig. 3, the flow of matching the header information with the bandwidth policy is as follows:
in step S21, it is determined whether the source domain and the destination domain belong to the reference domain; if so, go to step S26, otherwise, go to step S22.
In step S22, it is determined whether the source IP address and the destination IP address belong to the reference address; if so, go to step S26, otherwise, go to step S23.
In step S23, it is determined whether the source service belongs to the reference service; if so, go to step S26, otherwise, go to step S24.
Step S24, judging whether the source user belongs to the reference user; if so, go to step S26, otherwise, go to step S25.
Step S25, judging whether the source application belongs to the reference application; if so, go to step S26, otherwise, go to step S27.
And step S26, determining that the message header information is successfully matched with the bandwidth strategy.
Step S27, it is determined that the matching between the header information and the bandwidth policy fails.
Of course, the bandwidth policies and the matching manners thereof are only examples, and when implementing the embodiment of the present invention, other bandwidth policies and matching manners thereof may be set according to actual situations, which is not limited in the embodiment of the present invention. In addition, besides the bandwidth policy and the matching method thereof, those skilled in the art may also adopt other bandwidth policies and matching methods thereof according to actual needs, and the embodiment of the present invention is not limited to this.
And 104, marking the message type of the message positioned in the bandwidth channel.
After the message is distributed to the adaptive bandwidth channel, the message type is marked according to the flow condition in the bandwidth channel, so that the subsequent control such as guarantee, current limitation and the like is carried out on the network interface according to the message type.
In a specific implementation, on one hand, the configuration information set for the bandwidth channel is read, and the single maximum bandwidth, the channel guaranteed bandwidth, and the channel maximum bandwidth set for the bandwidth channel are obtained.
Where an individual maximum bandwidth may refer to the maximum bandwidth available to each source IP address or user.
For example, the individual maximum bandwidth of each source IP address is configured to be 1Mbps, and all devices matched to the policy use a maximum bandwidth of 1 Mbps.
The channel guaranteed bandwidth may refer to the minimum uplink and downlink bandwidth available in the bandwidth channel, and may be used to guarantee the critical service to pass through.
For example, if the intranet mail system needs 5Mbps of traffic in normal use, the guaranteed bandwidth of the configured mail is 5Mbps, and the configuration is referred by the policy of configuring the mailbox client, so that the message of the mail can use at least 5Mbps of guaranteed traffic, and the mail service is guaranteed not to be blocked because other services seize the bandwidth.
The maximum bandwidth of a channel may refer to the maximum uplink and downlink bandwidth available in the bandwidth channel, and may be used to limit the upper limit of the bandwidth used by some traffic.
For example, the maximum bandwidth is configured to be 5Mbps, and the configuration is referenced by a policy that configures the download tool so that the maximum speed of downloading using the download tool is 5 Mbps.
On the other hand, the total flow bandwidth occupied by all the messages in the bandwidth channel before the current message is distributed to the bandwidth channel can be calculated, and the single average bandwidth occupied by the message after the message is distributed to the bandwidth channel can be calculated.
Specifically, the configuration information set for the bandwidth channel is read, the maximum bandwidth of the channel set for the bandwidth channel is obtained, the number of source IP addresses or users in the bandwidth channel is queried, and the maximum bandwidth of the channel is divided by the number, so that the individual average bandwidth occupied by each source IP address or message corresponding to a user can be obtained.
At this time, three conditions are set:
the first condition is that the individual average bandwidth exceeds the average bandwidth;
the second condition is that the total bandwidth of the traffic exceeds the guaranteed bandwidth;
the third condition is that the total bandwidth of traffic exceeds the maximum bandwidth.
Comparing the current flow conditions (total flow bandwidth and single average bandwidth) with the standards (single maximum bandwidth, channel guaranteed bandwidth and channel maximum bandwidth) of the bandwidth channel, and judging whether the three conditions are met:
in one case, the message type of the message is marked as a guaranteed message if the message does not conform to the first condition and the second condition.
In another case, if the message does not meet the first condition and the third condition and meets the second condition, the message type of the message is marked as a flow limited message.
In addition, if the message meets the first condition, the message is discarded.
Or if the message does not accord with the first condition and accords with the second condition and the third condition, discarding the message.
In one embodiment, as shown in FIG. 4, the comparison flow is as follows:
in step S31, it is determined whether the individual average bandwidth exceeds the individual maximum bandwidth; if yes, go to step S34; if not, step S32 is executed.
In step S32, it is determined whether the total traffic bandwidth exceeds the guaranteed channel bandwidth; if yes, go to step S33; if not, step S35 is executed.
In step S33, whether the total traffic bandwidth exceeds the maximum bandwidth of the channel; if yes, go to step S34; if not, step S36 is executed.
And step S34, discarding the message.
Step S35, mark the message type of the message as a guaranteed message.
And step S36, marking the message type of the message as a speed limit message.
Of course, the above message types and the setting modes thereof are only examples, and when the embodiment of the present invention is implemented, other message types and setting modes thereof may be set according to actual situations, which is not limited in the embodiment of the present invention. In addition, besides the above message types and setting manners, those skilled in the art may also adopt other message types and setting manners according to actual needs, and the embodiment of the present invention is not limited thereto.
And 105, performing transmission control on the message according to the message type.
In this embodiment, the message with the flag is processed at the speed limit of the network interface, such as ensuring and limiting.
In a specific implementation, a configuration file set for a network interface is read, and a maximum bandwidth and a reserved bandwidth set for the network interface are obtained.
The maximum bandwidth refers to the upper limit of the bandwidth in the input/output direction of the network interface, the configurable bandwidth range is 8Kbps-10Gbp, all traffic of the maximum bandwidth can be used, and the maximum bandwidth allowed by the network interface can be limited.
The reserved bandwidth refers to a reserved bandwidth in an egress/ingress direction of a network interface, and the reserved bandwidth only allows some types of traffic (such as guaranteed packets) to pass through, so as to ensure that packets of a critical service are not discarded.
At this point, the current traffic situation can be compared with the standards of the network interface (maximum bandwidth and reserved bandwidth):
in one case, if the message is a speed-limit message and the maximum bandwidth has a first idle bandwidth except the reserved bandwidth, the message is sent while occupying the first idle bandwidth.
In another case, if the message is a speed limit message and the maximum bandwidth does not have the first idle bandwidth except the reserved bandwidth, the message is discarded.
In another case, if the message is a guaranteed message and the reserved bandwidth has a second idle bandwidth, the message is sent while occupying the second idle bandwidth.
In another case, if the message is a guaranteed message, the reserved bandwidth does not have the second idle bandwidth, and the maximum bandwidth has the first idle bandwidth except the reserved bandwidth, the message is sent while occupying the first idle bandwidth.
In another case, if the message is a guaranteed message, and the reserved bandwidth does not have the second idle bandwidth, and the maximum bandwidth does not have the first idle bandwidth except the reserved bandwidth, the message is discarded.
The first idle bandwidth and the second idle bandwidth both belong to idle bandwidths, that is, unoccupied bandwidths.
Aiming at the reserved bandwidth, if the messages discarded at the network interface contain the guarantee messages, the reserved bandwidth can be dynamically adjusted up, so that the guarantee messages can pass through preferentially, and excessive bandwidth cannot be occupied by the speed limit messages of a large number of noncritical services.
In one embodiment, the configuration file is read to obtain the maximum bandwidth set in advance for the bandwidth channel.
And taking a specified proportion for the maximum bandwidth to obtain an up-regulation value, and performing up-regulation according to the up-regulation value on the basis of the reserved bandwidth until the up-regulation value is up-regulated to the upper limit value.
For example, the pitch value may be calculated by the following formula:
32Kbps interface configuration (Kbps)/(10 1024Kbps)
If 10Mbps is configured, the reserved bandwidth of the network interface may be increased by 32Kbps, where the highest up-link line is 256 Kbps.
And if the discarded message does not contain the guarantee message, dynamically calling back the reserved bandwidth until the reserved bandwidth falls to the initial value.
In one embodiment, the first number of guaranteed messages for the last time period (e.g., the last second) of the bandwidth channel is recorded.
With the first number as a reference, a second number of guaranteed messages in a next time period (next second) is estimated.
For example, assuming that the number of packets in a short time period is balanced, it may be considered that the first number of guaranteed packets in the previous time period is equal to the second number of guaranteed packets in the next time period.
And calculating a down-regulation value according to the second quantity, and performing down-regulation according to the down-regulation value on the basis of the reserved bandwidth until the down-regulation value falls back to the original value.
In the embodiment of the present specification, a message is received, message header information is read from the message, the message is allocated to a bandwidth channel adapted to the message header information, a message type is marked for the message located in the bandwidth channel, transmission control is performed on the message according to the message type, and corresponding bandwidth management is performed based on the bandwidth channel and the message type, so that multiple configuration schemes can be implemented, bandwidth is more reasonably allocated, bandwidth exhaustion is avoided, a configuration flow is simplified, a network administrator is effectively helped to reasonably allocate bandwidth resources, and thus network operation quality is improved.
Corresponding to the embodiments of the method, the present specification also provides embodiments of the apparatus and the terminal applied thereto.
The document processing device of the present specification can be applied to a computer device, such as a server or a terminal device (e.g. a router, a switch, etc.). The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a logical device, the device is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor in which the file processing is located. From a hardware aspect, as shown in fig. 5, it is a hardware structure diagram of a computer device in which a file processing apparatus is located in the embodiment of the present disclosure, except for the processor 510, the memory 530, the network interface 520, and the nonvolatile memory 540 shown in fig. 5, a server or an electronic device in which an apparatus 531 is located in the embodiment may also include other hardware according to an actual function of the computer device, which is not described again.
As shown in fig. 6, fig. 6 is a block diagram of a bandwidth management apparatus shown in the present specification according to an exemplary embodiment, the apparatus including:
a message receiving module 610, configured to receive a message;
a message header information reading module 620, configured to read message header information in the message;
a bandwidth channel allocation module 630, configured to allocate the packet to a bandwidth channel adapted to the packet header information;
a message type marking module 640, configured to mark a message type for the message located in the bandwidth channel;
and a transmission control module 650, configured to perform transmission control on the packet according to the packet type.
In one embodiment of the present invention, the bandwidth channel allocation module 630 includes:
the bandwidth strategy matching submodule is used for matching the message header information with a bandwidth strategy;
and the message distribution submodule is used for distributing the message to a bandwidth channel corresponding to the bandwidth strategy if the message header information is successfully matched with the bandwidth strategy.
In an embodiment of the present invention, the bandwidth policy matching sub-module includes:
the bandwidth strategy determining unit is used for selecting and determining a bandwidth strategy with the highest priority from the currently unmatched bandwidth strategies;
a matching judgment unit, configured to judge whether the header information matches the bandwidth policy with the highest priority; if yes, calling a success determining unit, and if not, calling the bandwidth strategy determining unit;
and a success determining unit, configured to determine that the header information matches the bandwidth policy with the highest priority successfully.
In an example of the embodiment of the present invention, the header information includes at least one of:
a source domain, a target domain, a source IP address, a target IP address, a source service, a source user and a source application;
the bandwidth policy includes at least one policy parameter as follows:
a reference domain, a reference address, a reference service, a reference user, a reference application, an effective time;
the bandwidth channel allocation module 630 further includes:
the system time inquiry submodule is used for inquiring the current system time;
the bandwidth strategy searching sub-module is used for searching the bandwidth strategy which takes effect in the effective time if the system time is within the preset effective time;
the bandwidth policy determination unit includes:
a first matching subunit, configured to determine that the header information matches the bandwidth policy successfully if the source domain and the destination domain belong to the reference domain;
and/or the presence of a gas in the gas,
the second matching subunit is configured to determine that the header information is successfully matched with the bandwidth policy if the source IP address and the destination IP address belong to the reference address;
and/or the presence of a gas in the gas,
a third matching subunit, configured to determine that the header information matches the bandwidth policy successfully if the source service belongs to the reference service;
and/or the presence of a gas in the gas,
a fourth matching subunit, configured to determine that the header information matches the bandwidth policy successfully if the source user belongs to the reference user;
and/or the presence of a gas in the gas,
and a fifth matching subunit, configured to determine that the header information matches the bandwidth policy successfully if the source application belongs to the reference application.
In an embodiment of the present invention, the packet type marking module 640 includes:
the channel parameter acquisition submodule is used for acquiring the independent maximum bandwidth, the channel guaranteed bandwidth and the channel maximum bandwidth which are set for the bandwidth channel;
a total bandwidth calculation submodule, configured to calculate a total traffic bandwidth occupied by all the messages in the bandwidth channel before the messages are allocated to the bandwidth channel;
the average bandwidth calculation submodule is used for calculating the independent average bandwidth distributed to the messages after the messages are distributed to the bandwidth channels;
the first marking submodule is used for marking the message type of the message as a guaranteed message if the message does not accord with the first condition and the second condition;
the second marking submodule is used for marking the message type of the message as a current-limiting message if the message does not accord with the first condition and the third condition and accords with the second condition;
the first packet loss submodule is used for discarding the message if the message meets a first condition;
the second packet loss submodule is used for discarding the message if the message does not accord with the first condition and accords with the second condition and the third condition;
wherein the first condition is that the individual average bandwidth exceeds the individual maximum bandwidth;
the second condition is that the total traffic bandwidth exceeds the guaranteed channel bandwidth;
the third condition is that the total bandwidth of the traffic exceeds the maximum bandwidth of the channel.
In one embodiment of the present invention, the transmission control module 650 includes:
the interface parameter acquisition submodule is used for acquiring the maximum bandwidth and the reserved bandwidth set for the network interface;
the first packet sending sub-module is used for occupying a first idle bandwidth and sending the message if the message is a speed-limiting message and the maximum bandwidth has the first idle bandwidth except the reserved bandwidth;
a third packet loss submodule, configured to discard the packet if the packet is a speed-limited packet and the maximum bandwidth does not have a first idle bandwidth except the reserved bandwidth;
the second packet sending submodule is used for occupying a second idle bandwidth and sending the message if the message is a guarantee message and the reserved bandwidth has the second idle bandwidth;
a third packet sending submodule, configured to occupy a first idle bandwidth except for the reserved bandwidth and send the packet if the packet is a guaranteed packet, the reserved bandwidth does not have a second idle bandwidth, and the maximum bandwidth has the first idle bandwidth;
and the fourth packet loss submodule is used for discarding the message if the message is a guaranteed message, the reserved bandwidth does not have the second idle bandwidth, and the maximum bandwidth does not have the first idle bandwidth except the reserved bandwidth.
In one embodiment of the present invention, the transmission control module 650 further includes:
a reserved bandwidth up-regulation sub-module, configured to up-regulate the reserved bandwidth if the discarded packet contains a guaranteed packet;
and the reserved bandwidth down-regulation module is used for calling back the reserved bandwidth if the discarded message does not contain a guarantee message.
In one embodiment of the present invention, the reserved bandwidth up-regulation sub-module includes:
a maximum bandwidth acquiring unit, configured to acquire a maximum bandwidth preset for the bandwidth channel;
the upward adjustment value calculation unit is used for taking a specified proportion of the maximum bandwidth to obtain an upward adjustment value;
an up-regulation value up-regulation unit, configured to perform up-regulation according to the up-regulation value on the basis of the reserved bandwidth;
the reserved bandwidth down-regulation module comprises:
a first quantity recording unit, configured to record a first quantity of guaranteed packets in a last time period of the bandwidth channel;
a second quantity estimation unit, configured to estimate a second quantity of guaranteed packets in a next time period with the first quantity as a reference;
a down regulation value calculation unit for calculating a down regulation value according to the second quantity;
and the down regulation value down regulation unit is used for performing down regulation according to the down regulation value on the basis of the reserved bandwidth.
In the embodiment of the present specification, a message is received, message header information is read from the message, the message is allocated to a bandwidth channel adapted to the message header information, a message type is marked for the message located in the bandwidth channel, transmission control is performed on the message according to the message type, and corresponding bandwidth management is performed based on the bandwidth channel and the message type, so that multiple configuration schemes can be implemented, bandwidth is more reasonably allocated, bandwidth exhaustion is avoided, a configuration flow is simplified, a network administrator is effectively helped to reasonably allocate bandwidth resources, and thus network operation quality is improved.
Accordingly, the present specification also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the following method when executing the program:
receiving a message;
reading message header information in the message;
distributing the message to a bandwidth channel adapted to the message header information;
marking the message type of the message positioned in the bandwidth channel;
and carrying out transmission control on the message according to the message type.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (9)

1. A method for bandwidth management, the method comprising:
receiving a message;
reading message header information in the message;
distributing the message to a bandwidth channel adapted to the message header information;
marking the message type of the message positioned in the bandwidth channel;
performing transmission control on the message according to the message type;
wherein the performing transmission control on the packet according to the packet type includes:
acquiring the maximum bandwidth and the reserved bandwidth set for a network interface;
if the message is a speed-limiting message and the maximum bandwidth has a first idle bandwidth except the reserved bandwidth, occupying the first idle bandwidth and sending the message;
if the message is a speed-limiting message and the maximum bandwidth does not have a first idle bandwidth except the reserved bandwidth, discarding the message;
if the message is a guarantee message and the reserved bandwidth has a second idle bandwidth, occupying the second idle bandwidth and sending the message;
if the message is a guaranteed message, the reserved bandwidth does not have a second idle bandwidth, and the maximum bandwidth has a first idle bandwidth except the reserved bandwidth, the message is occupied and sent;
and if the message is a guaranteed message, the reserved bandwidth does not have a second idle bandwidth, and the maximum bandwidth does not have a first idle bandwidth except the reserved bandwidth, discarding the message.
2. The method of claim 1, wherein the allocating the packet to a bandwidth channel adapted to the packet header information comprises:
matching the message header information with a bandwidth strategy;
and if the message header information is successfully matched with the bandwidth strategy, distributing the message to a bandwidth channel corresponding to the bandwidth strategy.
3. The method of claim 2, wherein matching the header information to a bandwidth policy comprises:
selecting a bandwidth strategy with the highest priority from the currently unmatched bandwidth strategies;
judging whether the message header information is matched with the bandwidth strategy with the highest priority;
if so, determining that the message header information is successfully matched with the bandwidth strategy with the highest priority;
if not, returning to the bandwidth strategy with the highest priority selected from the currently unmatched bandwidth strategies.
4. The method of claim 3,
the message header information includes at least one of:
a source domain, a target domain, a source IP address, a target IP address, a source service, a source user and a source application;
the bandwidth policy includes at least one policy parameter as follows:
a reference domain, a reference address, a reference service, a reference user, a reference application, an effective time;
the allocating the packet to a bandwidth channel adapted to the packet header information further includes:
inquiring the current system time;
if the system time is within the preset effective time, searching the bandwidth strategy which takes effect within the effective time;
the determining whether the header information of the packet matches the bandwidth policy with the highest priority includes:
if the source domain and the target domain belong to the reference domain, determining that the message header information is successfully matched with the bandwidth strategy;
and/or the presence of a gas in the gas,
if the source IP address and the destination IP address belong to the reference address, determining that the message header information is successfully matched with the bandwidth strategy;
and/or the presence of a gas in the gas,
if the source service belongs to the reference service, determining that the message header information is successfully matched with the bandwidth strategy;
and/or the presence of a gas in the gas,
if the source user belongs to the reference user, determining that the message header information is successfully matched with the bandwidth strategy;
and/or the presence of a gas in the gas,
and if the source application belongs to the reference application, determining that the message header information is successfully matched with the bandwidth strategy.
5. The method according to any of claims 1-4, wherein said marking the packet type of the packet located in the bandwidth channel comprises:
acquiring the independent maximum bandwidth, the channel guaranteed bandwidth and the channel maximum bandwidth which are set for the bandwidth channel;
calculating the total flow bandwidth occupied by all messages in the bandwidth channel before the messages are distributed to the bandwidth channel;
calculating the independent average bandwidth distributed to the message after the message is distributed to the bandwidth channel;
if the message does not accord with the first condition and the second condition, marking the message type of the message as a guaranteed message;
if the message does not accord with the first condition, the third condition and the second condition, marking the message type of the message as a current-limiting message;
if the message meets the first condition, discarding the message;
if the message does not accord with the first condition and accords with the second condition and the third condition, discarding the message;
wherein the first condition is that the individual average bandwidth exceeds the individual maximum bandwidth;
the second condition is that the total traffic bandwidth exceeds the guaranteed channel bandwidth;
the third condition is that the total bandwidth of the traffic exceeds the maximum bandwidth of the channel.
6. The method according to claim 1, wherein the performing transmission control on the packet according to the packet type further comprises:
if the discarded message contains a guarantee message, the reserved bandwidth is adjusted up;
and if the discarded message does not contain a guarantee message, calling back the reserved bandwidth.
7. The method of claim 6,
the adjusting up the value of the reserved bandwidth includes:
acquiring the maximum bandwidth preset for the bandwidth channel;
obtaining an up-regulation value by taking a specified proportion of the maximum bandwidth;
on the basis of the reserved bandwidth, carrying out up-regulation according to the up-regulation value;
the callback of the reserved bandwidth includes:
recording a first quantity of guaranteed messages of the bandwidth channel in a last time period;
with the first quantity as a reference, estimating a second quantity of the guaranteed messages in the next time period;
calculating a down-regulation value according to the second quantity;
and performing down regulation according to the down regulation value on the basis of the reserved bandwidth.
8. A bandwidth management apparatus, the apparatus comprising:
the message receiving module is used for receiving a message;
a message header information reading module, configured to read message header information in the message;
a bandwidth channel allocation module, configured to allocate the packet to a bandwidth channel adapted to the packet header information;
a message type marking module, configured to mark a message type for the message located in the bandwidth channel;
a transmission control module for controlling the transmission of the message according to the message type
Wherein, the transmission control module is specifically configured to: acquiring the maximum bandwidth and the reserved bandwidth set for a network interface;
if the message is a speed-limiting message and the maximum bandwidth has a first idle bandwidth except the reserved bandwidth, occupying the first idle bandwidth and sending the message;
if the message is a speed-limiting message and the maximum bandwidth does not have a first idle bandwidth except the reserved bandwidth, discarding the message;
if the message is a guarantee message and the reserved bandwidth has a second idle bandwidth, occupying the second idle bandwidth and sending the message;
if the message is a guaranteed message, the reserved bandwidth does not have a second idle bandwidth, and the maximum bandwidth has a first idle bandwidth except the reserved bandwidth, the message is occupied and sent;
and if the message is a guaranteed message, the reserved bandwidth does not have a second idle bandwidth, and the maximum bandwidth does not have a first idle bandwidth except the reserved bandwidth, discarding the message.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the following method when executing the program:
receiving a message;
reading message header information in the message;
distributing the message to a bandwidth channel adapted to the message header information;
marking the message type of the message positioned in the bandwidth channel;
performing transmission control on the message according to the message type;
wherein the performing transmission control on the packet according to the packet type includes:
acquiring the maximum bandwidth and the reserved bandwidth set for a network interface;
if the message is a speed-limiting message and the maximum bandwidth has a first idle bandwidth except the reserved bandwidth, occupying the first idle bandwidth and sending the message;
if the message is a speed-limiting message and the maximum bandwidth does not have a first idle bandwidth except the reserved bandwidth, discarding the message;
if the message is a guarantee message and the reserved bandwidth has a second idle bandwidth, occupying the second idle bandwidth and sending the message;
if the message is a guaranteed message, the reserved bandwidth does not have a second idle bandwidth, and the maximum bandwidth has a first idle bandwidth except the reserved bandwidth, the message is occupied and sent;
and if the message is a guaranteed message, the reserved bandwidth does not have a second idle bandwidth, and the maximum bandwidth does not have a first idle bandwidth except the reserved bandwidth, discarding the message.
CN201811276107.3A 2018-10-30 2018-10-30 Bandwidth management method and device and computer equipment Active CN109039791B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811276107.3A CN109039791B (en) 2018-10-30 2018-10-30 Bandwidth management method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811276107.3A CN109039791B (en) 2018-10-30 2018-10-30 Bandwidth management method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN109039791A CN109039791A (en) 2018-12-18
CN109039791B true CN109039791B (en) 2021-04-27

Family

ID=64614482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811276107.3A Active CN109039791B (en) 2018-10-30 2018-10-30 Bandwidth management method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN109039791B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111277456B (en) * 2020-01-15 2021-10-15 福建奇点时空数字科技有限公司 Network congestion monitoring method based on bandwidth channel multi-dimensional correlation analysis
CN115348490B (en) * 2022-10-18 2023-03-24 武汉长光科技有限公司 Method for dynamically scheduling service wavelength channel and related device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1324840C (en) * 2003-06-18 2007-07-04 中兴通讯股份有限公司 A method for performing speed limiting on data traffic by network processor
CN1909508B (en) * 2006-08-23 2010-08-18 华为技术有限公司 Port flow control method
CN105681000A (en) * 2009-08-21 2016-06-15 应用转换有限责任公司 OFDM communication method and transmitter used for OFDM communication
CN103618681B (en) * 2013-11-15 2017-04-12 深圳市磊科实业有限公司 Elastic network bandwidth control method and system thereof
CN105306380B (en) * 2014-07-17 2018-08-17 炬芯(珠海)科技有限公司 Data transmission method and its device and application
CN106603147B (en) * 2017-01-18 2019-06-21 中国人民解放军国防科学技术大学 Space-sky information network business retransmission method based on software defined network

Also Published As

Publication number Publication date
CN109039791A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
EP2433461B1 (en) Methods and apparatuses for communicating priority information for use in scheduling the transmission of data
US6167445A (en) Method and apparatus for defining and implementing high-level quality of service policies in computer networks
US7633869B1 (en) Automatic network traffic characterization
US6466976B1 (en) System and method for providing desired service policies to subscribers accessing the internet
US8416688B2 (en) Automatic adaptive network traffic prioritization and shaping
CA2534448C (en) Auto-ip traffic optimization in mobile telecommunications systems
US7225271B1 (en) System and method for recognizing application-specific flows and assigning them to queues
US7756056B2 (en) Apparatus and method for managing quality of service in integrated network of heterogeneous mobile network
US8427946B2 (en) Providing a quality of service for various classes of service for transfer of electronic data packets
CN109787801B (en) Network service management method, device and system
US20150236962A1 (en) Method and system for using dynamic bandwidth detection to drive quality of service control refinement
EP2629554B1 (en) Service control method and system, enodeb and packet data network gateway
CN106453138B (en) Message processing method and device
CN107534981B (en) Resource reallocation
EP2076847A2 (en) System and method for dynamic network traffic prioritization
US6839327B1 (en) Method and apparatus for maintaining consistent per-hop forwarding behavior in a network using network-wide per-hop behavior definitions
EP2742722A1 (en) Traffic-load based flow admission control
Bhatti et al. QoS-sensitive flows: Issues in IP packet handling
CN109039791B (en) Bandwidth management method and device and computer equipment
CA2963243C (en) Allocating capacity of a network connection to data streams based on type
CN114205291B (en) Data packet transmission method and device
EP1978682B9 (en) QoS CONTROL METHOD AND SYSTEM
Cisco VoIP Interoperability with Cisco Express Forwarding and Policy Based Routing
Cisco Cisco IOS Quality of Service Solutions Configuration Guide Release 12.1
WO2014177293A1 (en) Methods and apparatus

Legal Events

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