CN110401603B - Method and device for processing information - Google Patents

Method and device for processing information Download PDF

Info

Publication number
CN110401603B
CN110401603B CN201910676013.3A CN201910676013A CN110401603B CN 110401603 B CN110401603 B CN 110401603B CN 201910676013 A CN201910676013 A CN 201910676013A CN 110401603 B CN110401603 B CN 110401603B
Authority
CN
China
Prior art keywords
target
interface
information
flow
direction interface
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
CN201910676013.3A
Other languages
Chinese (zh)
Other versions
CN110401603A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910676013.3A priority Critical patent/CN110401603B/en
Publication of CN110401603A publication Critical patent/CN110401603A/en
Application granted granted Critical
Publication of CN110401603B publication Critical patent/CN110401603B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control

Abstract

The embodiment of the disclosure relates to the field of cloud computing, and discloses a method and a device for processing information. One embodiment of the method comprises the following steps: in response to detecting the target information, acquiring flow information of at least one forwarding end included in the target electronic equipment, wherein the target information is used for indicating that the flow of the target electronic equipment is greater than or equal to a preset flow threshold value, and the flow information is used for indicating the flow forwarded by the forwarding end in a target historical time period; determining a target forwarding end from at least one forwarding end based on the acquired traffic information; acquiring flow sub-information of at least one input direction interface and flow sub-information of at least one output direction interface included in a target forwarding end; determining a target direction-in interface and a target direction-out interface based on the acquired flow sub-information of the direction-in interface and the flow sub-information of the direction-out interface respectively; and carrying out speed limiting processing on the interfaces in the target inlet direction interface and the target outlet direction interface. This embodiment improves the efficiency of information processing.

Description

Method and device for processing information
Technical Field
Embodiments of the present disclosure relate to the field of computer technology, and more particularly, to a method and apparatus for processing information.
Background
In public cloud production environments, communication between virtual machines and external networks is typically carried by a centralized network management device. For the network management device, when the traffic of individual users suddenly increases, the pressure of the whole network management device is correspondingly increased, and in extreme cases, the traffic forwarding of the whole network management device is abnormal.
Aiming at the problems, the current solution is to monitor the flow of the network management equipment, manually intervene when the flow exceeds a threshold value, compare the flow of each user, select the user with the largest flow, and limit the speed.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for processing information.
In a first aspect, embodiments of the present disclosure provide a method for processing information, the method comprising: in response to detecting the target information, acquiring flow information of at least one forwarding end included in the target electronic device, wherein the target information is used for indicating that the flow of the target electronic device is greater than or equal to a preset flow threshold, the forwarding end corresponds to a user and is used for forwarding the flow for the corresponding user, and the flow information is used for indicating the flow forwarded by the forwarding end in a target historical time period; based on the acquired flow information, determining a forwarding end with the most flow forwarded in a target historical time period from at least one forwarding end as a target forwarding end; acquiring flow sub-information of at least one input direction interface and flow sub-information of at least one output direction interface, which are included by a target forwarding end, wherein the flow sub-information is used for indicating the flow passing through the interfaces in a target historical time period; determining a target direction-in interface and a target direction-out interface based on the acquired flow sub-information of the direction-in interface and the flow sub-information of the direction-out interface respectively; and carrying out speed limiting processing on the interfaces in the target inlet direction interface and the target outlet direction interface.
In some embodiments, obtaining traffic sub-information of at least one ingress direction interface and traffic sub-information of at least one egress direction interface of the target forwarding end includes: and for the interfaces in the at least one input direction interface and the at least one output direction interface included by the target forwarding end, obtaining target number of flow sub-information of the interfaces, wherein the target number of flow sub-information corresponds to a target number of historical time periods in a target historical time period, and the flow sub-information is used for indicating the flow passing through the interfaces in the corresponding historical time periods.
In some embodiments, determining the target in-direction interface and the target out-direction interface based on the acquired traffic sub-information of the in-direction interface and the acquired traffic sub-information of the out-direction interface, respectively, comprises: for a historical time period of the target number of historical time periods, performing the steps of: determining the inlet direction interface with the largest flow as a candidate inlet direction interface corresponding to the historical time period based on the flow sub-information of the inlet direction interface corresponding to the historical time period; determining the outlet direction interface with the largest flow as a candidate outlet direction interface corresponding to the historical time period based on the flow sub-information of the outlet direction interface corresponding to the historical time period; the method includes determining a target in-direction interface based on the determined target number of candidate in-direction interfaces, and determining a target out-direction interface based on the determined target number of candidate out-direction interfaces.
In some embodiments, determining the target in-direction interface based on the determined target number of candidate in-direction interfaces, and determining the target out-direction interface based on the determined target number of candidate out-direction interfaces comprises: determining whether the determined target number of candidate incoming direction interfaces are the same, and whether the target number of candidate outgoing direction interfaces are the same; in response to determining that the target number of candidate in-direction interfaces is the same and the target number of candidate out-direction interfaces is the same, the same candidate in-direction interface is determined to be the target in-direction interface and the same candidate out-direction interface is determined to be the target out-direction interface.
In some embodiments, rate limiting the interfaces of the target in-direction interface and the target out-direction interface comprises: determining a ratio of flow through a target in-direction interface to flow through a target out-direction interface within a target history period; and respectively carrying out speed limiting processing on the target outgoing direction interface and the target incoming direction interface in response to the determined ratio being greater than or equal to a first preset coefficient.
In some embodiments, the speed limit processing for the interface in the target in-direction interface and the target out-direction interface further comprises: and responding to the determined ratio being smaller than a first preset coefficient, selecting an interface from the target outgoing direction interface and the target incoming direction interface to carry out speed limiting processing.
In some embodiments, rate limiting the interfaces of the target in-direction interface and the target out-direction interface comprises: and (3) performing speed limiting processing on the interfaces in the target in-direction interface and the target out-direction interface based on the following inequality: s is less than or equal to T, K+F t -F c Wherein S is used for representing a speed limit value; t is used for representing a preset flow threshold; k is used for representing a second preset coefficient; f (F) t For characterizing traffic of a current target electronic device; f (F) c And the method is used for representing the traffic forwarded by the current target forwarding end.
In some embodiments, the target electronic device belongs to a predetermined cluster of electronic devices; and in response to detecting the target information, obtaining traffic information of at least one forwarding end included in the target electronic device includes: and responding to the detection of the target information, selecting the electronic equipment from the electronic equipment cluster as target electronic equipment, and acquiring flow information of at least one forwarding end included in the target electronic equipment.
In some embodiments, the method further comprises: for electronic devices in the electronic devices except the target electronic device, which are included in the electronic device cluster, the following steps are executed: determining an input direction interface corresponding to a target input direction interface and an output direction interface corresponding to a target output direction in the electronic equipment; and carrying out speed limiting processing on an interface in an input direction interface corresponding to the target input direction and an interface in an output direction interface corresponding to the target output direction interface in the electronic equipment.
In a second aspect, embodiments of the present disclosure provide an apparatus for processing information, the apparatus comprising: the first acquisition unit is configured to respond to detection of target information, and acquire flow information of at least one forwarding end included in the target electronic equipment, wherein the target information is used for indicating that the flow of the target electronic equipment is greater than or equal to a preset flow threshold, the forwarding end corresponds to a user and is used for forwarding the flow for the corresponding user, and the flow information is used for indicating the flow forwarded by the forwarding end in a target historical time period; a first determining unit configured to determine, as a target forwarding end, a forwarding end that is most forwarded in a target history period from among at least one forwarding end based on the acquired traffic information; the second acquisition unit is configured to acquire flow sub-information of at least one input direction interface and flow sub-information of at least one output direction interface, which are included in the target forwarding end, wherein the flow sub-information is used for indicating the flow passing through the interfaces in the target historical time period; a second determining unit configured to determine a target in-direction interface and a target out-direction interface based on the acquired flow sub-information of the in-direction interface and flow sub-information of the out-direction interface, respectively; the first speed limiting unit is configured to limit speed for an interface in the target in-direction interface and the target out-direction interface.
In some embodiments, the second acquisition unit is further configured to: and for the interfaces in the at least one input direction interface and the at least one output direction interface included by the target forwarding end, obtaining target number of flow sub-information of the interfaces, wherein the target number of flow sub-information corresponds to a target number of historical time periods in a target historical time period, and the flow sub-information is used for indicating the flow passing through the interfaces in the corresponding historical time periods.
In some embodiments, the second determining unit comprises: a first determination module configured to perform the following steps for a historical time period of the target number of historical time periods: determining the inlet direction interface with the largest flow as a candidate inlet direction interface corresponding to the historical time period based on the flow sub-information of the inlet direction interface corresponding to the historical time period; determining the outlet direction interface with the largest flow as a candidate outlet direction interface corresponding to the historical time period based on the flow sub-information of the outlet direction interface corresponding to the historical time period; the second determining module is configured to determine a target in-direction interface based on the determined target number of candidate in-direction interfaces and a target out-direction interface based on the determined target number of candidate out-direction interfaces.
In some embodiments, the second determination module is further configured to: determining whether the determined target number of candidate incoming direction interfaces are the same, and whether the target number of candidate outgoing direction interfaces are the same; in response to determining that the target number of candidate in-direction interfaces is the same and the target number of candidate out-direction interfaces is the same, the same candidate in-direction interface is determined to be the target in-direction interface and the same candidate out-direction interface is determined to be the target out-direction interface.
In some embodiments, the first speed limiting unit comprises: a third determination module configured to determine a ratio of flow through the target ingress direction interface to flow through the target egress direction interface over a target historical period of time; and the first speed limiting module is configured to respond to the fact that the determined ratio is larger than or equal to a first preset coefficient and respectively conduct speed limiting processing on the target outgoing direction interface and the target incoming direction interface.
In some embodiments, the first speed limiting unit further comprises: and the second speed limiting module is configured to select an interface from the target outgoing direction interface and the target incoming direction interface to carry out speed limiting processing in response to the determined ratio being smaller than a first preset coefficient.
In some embodiments, the first speed limiting unit is further configured to: and (3) performing speed limiting processing on the interfaces in the target in-direction interface and the target out-direction interface based on the following inequality: s is less than or equal to T, K+F t -F c Wherein S is used for representing a speed limit value; t is used for representing a preset flow threshold; k is used for representing a second preset coefficient; f (F) t For characterizing traffic of a current target electronic device; f (F) c And the method is used for representing the traffic forwarded by the current target forwarding end.
In some embodiments, the target electronic device belongs to a predetermined cluster of electronic devices; and the first acquisition unit is further configured to: and responding to the detection of the target information, selecting the electronic equipment from the electronic equipment cluster as target electronic equipment, and acquiring flow information of at least one forwarding end included in the target electronic equipment.
In some embodiments, the apparatus further comprises: the second speed limiting unit is configured to perform the following steps for electronic devices, except for the target electronic device, included in the electronic device cluster: determining an input direction interface corresponding to a target input direction interface and an output direction interface corresponding to a target output direction in the electronic equipment; and carrying out speed limiting processing on an interface in an input direction interface corresponding to the target input direction and an interface in an output direction interface corresponding to the target output direction interface in the electronic equipment.
In a third aspect, embodiments of the present disclosure provide an electronic device, comprising: one or more processors; and a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the method of any of the embodiments of the method for processing information described above.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable medium having stored thereon a computer program which, when executed by a processor, implements a method of any of the embodiments of the methods for processing information described above.
According to the method and the device for processing information, the flow information of at least one forwarding end included in the target electronic device is obtained through responding to the detection of the target information, wherein the target information is used for indicating that the flow of the target electronic device is larger than or equal to a preset flow threshold, the forwarding end corresponds to a user and is used for forwarding the flow for the corresponding user, the flow information is used for indicating the flow forwarded by the forwarding end in a target historical time period, then the forwarding end with the largest flow forwarded in the target historical time period is determined from the at least one forwarding end to serve as the target forwarding end based on the obtained flow information, then the flow sub-information of at least one inlet direction interface and the flow sub-information of at least one outlet direction interface included in the target forwarding end are obtained, wherein the flow sub-information is used for indicating the flow passing through the interfaces in the target historical time period, then the target inlet direction interface and the flow sub-information of the outlet direction interface are respectively determined, and finally the interfaces in the target inlet direction interface and the target outlet direction interface are processed, so that the speed of the electronic device to be processed under the condition that the flow to be limited can be automatically, and the speed of the device can be automatically positioned, and the speed of the device can be limited, and the speed of the device can be limited; in addition, the speed limit can be embodied to the target interface in the forwarding end, compared with the speed limit of the forwarding end in the prior art, the speed limit method and the speed limit device can reduce the influence of the speed limit on other interfaces except the target interface in the forwarding end, and improve the pertinence and the effectiveness of the speed limit.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of a method for processing information according to the present disclosure;
FIG. 3 is a schematic illustration of one application scenario of a method for processing information according to an embodiment of the present disclosure;
FIG. 4 is a flow chart of yet another embodiment of a method for processing information according to the present disclosure;
FIG. 5 is a schematic structural diagram of one embodiment of an apparatus for processing information according to the present disclosure;
fig. 6 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the methods of the present disclosure for processing information or apparatuses for processing information may be applied.
As shown in fig. 1, a system architecture 100 may include a monitoring device 101, a network 102, and a server 103. The network 102 is the medium used to provide the communication link between the monitoring device 101 and the server 103. Network 102 may include various connection types such as wired, wireless communication links, or fiber optic cables, among others.
A monitoring person may interact with the server 103 via the network 102 using the monitoring device 101 to receive or send messages or the like.
The monitoring device 101 may be hardware or software. When the monitoring device 101 is hardware, it may be various electronic devices with information processing functions, including but not limited to smart phones, tablet computers, laptop and desktop computers, and the like. When the monitoring device 101 is software, it can be installed in the above-listed electronic device. Which may be implemented as multiple software or software modules (e.g., multiple software or software modules for providing distributed services) or as a single software or software module. The present invention is not particularly limited herein.
The server 103 may be a server providing a network service, and in particular, the server 103 may forward traffic for a terminal used by a user. While monitoring device 101 may monitor traffic forwarded by server 103 and, in response to detecting that the traffic of server 103 is greater than a preset traffic threshold, perform a speed limiting operation with respect to server 103 (e.g., speed limiting a target interface included in a target forwarding end in server 103)
It should be noted that, the method for processing information provided by the embodiment of the present disclosure is generally performed by the monitoring device 101, and accordingly, the apparatus for processing information is generally disposed in the monitoring device 101.
The server may be hardware or software. When the server is hardware, the server may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (e.g., a plurality of software or software modules for providing distributed services), or as a single software or software module. The present invention is not particularly limited herein.
It should be understood that the number of monitoring devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of monitoring devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a method for processing information according to the present disclosure is shown. The method for processing information comprises the following steps:
in step 201, in response to detecting the target information, flow information of at least one forwarding end included in the target electronic device is acquired.
In this embodiment, the execution body of the method for processing information (for example, the monitoring device shown in fig. 1) may acquire the traffic information of at least one forwarding end included in the target electronic device (for example, the server shown in fig. 1) in response to detecting the target information from a remote location or a local location through a wired connection or a wireless connection. The target information is used for indicating that the flow rate of the target electronic device is greater than or equal to a preset flow rate threshold, and may include, but is not limited to, at least one of the following: text, numbers, symbols, images, audio, video. For example, the target information may be the symbol "+|! The following is carried out The following is carried out ". In practice, the target information may also be information for alerting.
Specifically, the target information may be information generated by the execution body when the flow rate of the target electronic device is detected to be greater than or equal to a preset flow rate threshold, or may be information generated by the target electronic device when the flow rate of the target electronic device is detected to be greater than or equal to the preset flow rate threshold and sent to the execution body.
The target electronic equipment is electronic equipment for limiting the flow rate of the electronic equipment, and the target electronic equipment is in communication connection with the execution main body. The preset flow threshold may be a maximum flow value preset by a technician. It should be noted that, the traffic of the target electronic device specifically refers to the traffic currently forwarded by the target electronic device.
The target electronic device may include at least one forwarding end. The forwarding end corresponds to the user and is used for forwarding the traffic for the corresponding user. Further, the target electronic device may forward traffic for at least one user through the included at least one forwarding end. And the current forwarded traffic of the target electronic equipment is the sum of the current forwarded traffic of each forwarding end included in the target electronic equipment.
In practice, the forwarding end may be hardware or software. Each forwarding end may include at least one ingress direction interface and at least one egress direction interface. The ingress interface is an interface for traffic to flow into the communication link and the egress interface is an interface for traffic to flow out of the communication link. Different communication links may correspond to different network application scenarios for the user.
In this embodiment, the executing body may obtain, in response to detecting the target information, traffic information of at least one forwarding end included in the target electronic device from a local or from the target electronic device. The traffic information is used to indicate the traffic forwarded by the forwarding end in the target historical period, and may include, but is not limited to, at least one of the following: literal, numeric, symbolic, image. Specifically, the flow information may correspond to at least one forwarding end in the target electronic device one by one, and further, the execution body may obtain at least one flow information, where each flow information is used to indicate a flow forwarded by the corresponding forwarding end in the target historical time period.
In this embodiment, the target historical time period may be a historical time period with the current time as an end point and the duration as a preset duration. For example, the preset duration is ten minutes, and the target history period may be the past ten minutes.
In some alternative implementations of the present embodiment, the target electronic device may belong to a predetermined cluster of electronic devices (e.g., a network server cluster); and the execution body may select the electronic device from the electronic device cluster as the target electronic device in response to detecting the target information, and acquire traffic information of at least one forwarding end included in the target electronic device.
Here, the electronic devices in the cluster of electronic devices comprise a corresponding structure, as are the forwarded traffic. The target information may be used to indicate that a traffic of an electronic device in the cluster of electronic devices is greater than or equal to a preset traffic threshold. It can be understood that, because the traffic forwarded by the electronic devices in the electronic device cluster is the same, if the executing body detects the target information, it can be stated that the traffic of each electronic device in the electronic device cluster is greater than or equal to a preset traffic threshold, and further, the executing body may select the target electronic device from the electronic device cluster in various manners, for example, may select the target electronic device in a random selection manner, or may select the preset electronic device as the target electronic device, where the preset electronic device may be an electronic device that is predetermined by a technician and is used for speed limiting processing.
It should be noted that, the corresponding structure included in the electronic devices in the electronic device cluster specifically refers to a structure for implementing the same function. For example, the electronic device cluster includes an electronic device a and an electronic device B, where the electronic device a includes a forwarding end a for forwarding traffic for the user 1, and the electronic device B includes a forwarding end B for forwarding traffic for the user 1, and the forwarding end a and the forwarding end B are corresponding structures.
Step 202, determining, from at least one forwarding end, a forwarding end with the most forwarded traffic in a target historical time period as a target forwarding end based on the acquired traffic information.
In this embodiment, based on the traffic information obtained in step 201, the executing body may determine, from at least one forwarding end included in the target electronic device, a forwarding end that has the largest traffic forwarded in the target history period as the target forwarding end.
As an example, the target electronic device includes three forwarding ends, namely forwarding end a, forwarding end b, and forwarding end b. The execution body acquires the traffic information of the forwarding end a, the forwarding end b and the forwarding end c as "10MB", "12MB" and "14MB", respectively. Further, since 14 is larger than 12 and larger than 10, the above-described execution body may determine the forwarding end c as the target forwarding end.
Step 203, obtaining flow sub-information of at least one ingress direction interface and flow sub-information of at least one egress direction interface included in the target forwarding end.
In this embodiment, based on the target forwarding end determined in step 202, the executing body may acquire, from the local or from the target electronic device, traffic sub-information of at least one ingress direction interface and traffic sub-information of at least one egress direction interface included in the target forwarding end. Wherein, the traffic sub-information is used for indicating the traffic passing through the interface in the target history period, and may include, but is not limited to, at least one of the following: literal, numeric, symbolic, image.
In this embodiment, one interface may correspond to at least one traffic sub-information. Specifically, as an example, one interface may correspond to one flow sub-information, and further, the execution body may obtain at least one flow sub-information corresponding to the ingress direction interface and at least one flow sub-information corresponding to the egress direction interface respectively.
In some optional implementations of this embodiment, one interface may correspond to a target number of traffic sub-information, and further, for an interface in at least one ingress direction interface and at least one egress direction interface included in the target forwarding end, the executing body may obtain the target number of traffic sub-information of the interface. The target number of flow sub-information corresponds to a target number of historical time periods in a target historical time period. The traffic sub-information is used to indicate traffic passing through the interface during a corresponding historical time period.
In this implementation, the duration of the historical time period may be predetermined based on the duration of the target historical time period. For example, the duration of the target history period is preset to ten minutes, and the duration of the history period may be preset to five minutes. Further, the target number at this time is 2.
Step 204, determining the target input direction interface and the target output direction interface based on the acquired flow sub-information of the input direction interface and the acquired flow sub-information of the output direction interface respectively.
In this embodiment, the executing body may determine the target in-direction interface based on the flow sub-information of the in-direction interface obtained in step 203, and the executing body may determine the target out-direction interface based on the flow sub-information of the out-direction interface obtained in step 203. The target input direction interface and the target output direction interface are interfaces for speed limiting processing.
Specifically, the execution body may determine the target in-direction interface and the target out-direction interface by using various methods. As an example, the interfaces are in one-to-one correspondence with the traffic sub-information, and the execution body may determine, as the target ingress interface, the ingress interface with the largest traffic passing in the target history period based on at least one traffic sub-information corresponding to the ingress interfaces, respectively; and determining the outlet direction interface with the largest flow passing in the target history time period as a target inlet direction interface based on at least one flow sub-information corresponding to the outlet direction interfaces respectively.
In some optional implementations of this embodiment, one interface corresponds to a target number of traffic sub-information, and for an interface in at least one ingress direction interface and at least one egress direction interface included in the target forwarding end, the executing body obtains the target number of traffic sub-information of the interface. The target number of flow sub-information corresponds to a target number of historical time periods in a target historical time period. The traffic sub-information is used to indicate traffic passing through the interface during a corresponding historical time period. Further, the execution body may determine the target in-direction interface and the target out-direction interface by:
first, for a historical time period of a target number of historical time periods, performing the steps of: determining the inlet direction interface with the largest flow as a candidate inlet direction interface corresponding to the historical time period based on the flow sub-information of the inlet direction interface corresponding to the historical time period; and determining the outlet direction interface with the largest flow as a candidate outlet direction interface corresponding to the historical time period based on the flow sub-information of the outlet direction interface corresponding to the historical time period.
As an example, the target history period is the past ten minutes. The target number is 2. The target forwarding end comprises an input direction interface w, an input direction interface x, an output direction interface y and an output direction interface z.
For the first five minutes of the last ten minutes (i.e., the first historical time period), the flow through the ingress interface w is 5MB, the flow through the ingress interface x is 6MB, the flow through the egress interface y is 4MB, and the flow through the egress interface z is 2MB. Further, since 6 is greater than 5, the execution body may use the entry direction interface x as the candidate entry direction interface corresponding to the first five minutes; and 4 is greater than 2, so the execution body can take the direction outlet interface y as a candidate direction outlet interface corresponding to the first five minutes.
For the second five minutes of the last ten minutes (i.e., the second historical time period), the flow through the ingress interface w was 7MB, the flow through the ingress interface x was 6MB, the flow through the egress interface y was 3MB, and the flow through the egress interface z was 2MB. Further, since 7 is larger than 6, the execution body may use the entry direction interface w as the candidate entry direction interface corresponding to the second five minutes; and 3 is greater than 2, so the execution body can take the direction outlet interface y as a candidate direction outlet interface corresponding to the second five minutes.
It will be appreciated that for each historical time period, the executing body may determine a candidate in-direction interface and a candidate out-direction interface, and further, for a target number of historical time periods, the executing body may determine a target number of candidate in-direction interfaces and a target number of candidate out-direction interfaces.
And a second step of determining a target in-direction interface based on the determined target number of candidate in-direction interfaces and determining a target out-direction interface based on the determined target number of candidate out-direction interfaces.
Here, the execution subject may determine the target in-direction interface and the target out-direction interface by various methods based on the target number of candidate in-direction interfaces and the target number of candidate out-direction interfaces, respectively. As an example, the execution body may randomly select one candidate direction interface from the target number of candidate direction interfaces as the target direction interface, and randomly select one candidate direction interface from the target number of candidate direction interfaces as the target direction interface.
In some optional implementations of this embodiment, the executing entity may further determine the target in-direction interface and the target out-direction interface by:
first, the execution body may determine whether the target number of candidate direction interfaces are the same, and whether the target number of candidate direction interfaces are the same.
Then, the executing body may determine the same candidate in-direction interface as the target in-direction interface and the same candidate out-direction interface as the target out-direction interface in response to determining that the target number of candidate in-direction interfaces is the same and the target number of candidate out-direction interfaces is the same.
It can be understood that if the number of candidate incoming direction interfaces is the same and the number of candidate outgoing direction interfaces is the same, it can be characterized that the forwarding condition of the traffic in the number of historical time periods is relatively stable, and at this time, the interfaces that cause the traffic overrun of the target electronic device can be considered to be clear, so that the same candidate incoming direction interfaces can be determined as target incoming direction interfaces and the same candidate outgoing direction interfaces can be determined as target outgoing direction interfaces, thereby improving accuracy and effectiveness of speed limit.
And 205, performing speed limiting processing on the interfaces in the target in-direction interface and the target out-direction interface.
In this embodiment, based on the target in-direction interface and the target out-direction interface determined in step 204, the execution body may perform speed limiting processing on the interface in the target in-direction interface and the target out-direction interface.
Specifically, the execution body may perform speed-limiting processing on the target input direction interface and the target output direction interface, respectively, or may select one interface from the target input direction interface and the target output direction interface to perform speed-limiting processing. Here, the manner of selecting the interface may be arbitrary, and may be selected randomly, for example.
In practice, the rate limiting process is used to limit the flow through the interface below a target value. Here, the target value may be a preset value or a value determined based on the flow forwarded by the current target electronic device, for example, a difference between the flow forwarded by the current target electronic device and the preset flow may be determined as the target value.
In some optional implementations of this embodiment, the executing entity may perform speed limit processing on the interface of the target in-direction interface and the target out-direction interface based on the following inequality:
S≤T*K+F t -F c
wherein S is used to characterize the speed limit (i.e. the current flow through the interface); t is used for representing a preset flow threshold; k is used for representing a second preset coefficient, and the second preset coefficient can be a coefficient preset by a technician and used for speed limiting; f (F) t For characterizing traffic of a current target electronic device; f (F) c And the method is used for representing the traffic forwarded by the current target forwarding end. It will be appreciated that "T.times.K+F" to the right of the above inequality t -F c And the target value is determined based on the flow forwarded by the current target electronic equipment.
Specifically, the executing body may perform speed limiting processing on the interfaces in the target direction-in interface and the target direction-out interface by adopting various methods, for example, the executing body may call a preset speed limiting program to perform speed limiting processing on the interfaces in the target direction-in interface and the target direction-out interface, where the speed limiting program may be a program preset by a technician and used for performing speed limiting processing.
In some optional implementations of this embodiment, the target electronic device belongs to the electronic device cluster, and after step 205, the executing body may execute, for electronic devices included in the electronic device cluster and other than the target electronic device, the following steps: determining an input direction interface corresponding to a target input direction interface and an output direction interface corresponding to a target output direction in the electronic equipment; and carrying out speed limiting processing on an interface in an input direction interface corresponding to the target input direction and an interface in an output direction interface corresponding to the target output direction interface in the electronic equipment.
Here, the entry direction interface corresponding to the target entry direction interface is an interface capable of realizing the same function as the target entry direction interface. The direction outlet interface corresponding to the target direction outlet interface is an interface which can realize the same function with the target direction outlet interface.
According to the implementation mode, speed limiting processing can be carried out on the corresponding interfaces included in other electronic equipment in the electronic equipment cluster based on the target input direction interface and the target output direction interface of the target electronic equipment, so that speed limiting aiming at the electronic equipment cluster can be achieved, and the comprehensiveness of speed limiting is improved.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the method for processing information according to the present embodiment.
In the application scenario of fig. 3, the monitoring device 301 may first obtain, in response to detecting 302 target information 303 sent by the target electronic device, flow information 3041, 3042, 3043 of three (i.e. at least one) forwarding ends included in the target electronic device 302, where the target information 303 is used to indicate that the flow of the target electronic device 302 is greater than or equal to a preset flow threshold. The forwarding end corresponds to the user and is used for forwarding the traffic for the corresponding user. Traffic information 3041, 3042, 3043 is used to indicate traffic forwarded by three forwarding ends over the past ten minutes (i.e., the target historical period of time), respectively.
Then, the monitoring device 301 may determine, as the target forwarding end 305, the forwarding end that has most traffic forwarded in the past ten minutes from among the three forwarding ends, based on the acquired traffic information 3041, 3042, 3043.
Next, the monitoring device 301 may acquire traffic sub-information 3061, 3062 of two (i.e. at least one) ingress direction interfaces and traffic sub-information 3071, 3072 of two (i.e. at least one) egress direction interfaces included in the target forwarding end 305, where the traffic sub-information 3061, 3062 is used to indicate the traffic passing through the two ingress direction interfaces in the last ten minutes, respectively; the traffic sub-information 3071, 3072 is used to indicate the traffic passing through the two outgoing direction interfaces in the past ten minutes, respectively.
The monitoring device 301 may then determine the target ingress direction interface 308 based on the acquired traffic sub-information 3061, 3062 of the ingress direction interface and the target egress direction interface 309 based on the acquired traffic sub-information 3071, 3072 of the egress direction interface.
Finally, the monitoring device 301 may perform speed limiting processing on the interfaces in the target direction interface 308 and the target direction interface 309, for example, the monitoring device 301 may perform speed limiting processing on the target direction interface 308 and the target direction interface 309, respectively.
According to the method provided by the embodiment of the invention, under the condition that the flow of the target electronic equipment exceeds the limit, the interface to be limited can be automatically positioned and limited, so that the information processing efficiency is improved; in addition, the speed limit can be embodied to the target interface in the forwarding end, compared with the speed limit of the forwarding end in the prior art, the speed limit method and the speed limit device can reduce the influence of the speed limit on other interfaces except the target interface in the forwarding end, and improve the pertinence and the effectiveness of the speed limit.
With further reference to fig. 4, a flow 400 of yet another embodiment of a method for processing information is shown. The flow 400 of the method for processing information comprises the steps of:
In step 401, in response to detecting the target information, flow information of at least one forwarding end included in the target electronic device is acquired.
In this embodiment, the execution body of the method for processing information (for example, the monitoring device shown in fig. 1) may acquire the traffic information of at least one forwarding end included in the target electronic device (for example, the server shown in fig. 1) in response to detecting the target information from a remote location or a local location through a wired connection or a wireless connection. The traffic information is used for indicating traffic forwarded by the forwarding end in the target historical time period.
Step 402, determining, from at least one forwarding end, a forwarding end with the most traffic forwarded in the target historical time period as a target forwarding end based on the acquired traffic information.
In this embodiment, based on the traffic information obtained in step 401, the executing body may determine, from at least one forwarding end included in the target electronic device, a forwarding end that has the largest traffic forwarded in the target historical period of time as the target forwarding end.
Step 403, obtaining flow sub-information of at least one ingress direction interface and flow sub-information of at least one egress direction interface included in the target forwarding end.
In this embodiment, based on the target forwarding end determined in step 402, the executing body may acquire, from the local or from the target electronic device, traffic sub-information of at least one ingress direction interface and traffic sub-information of at least one egress direction interface included in the target forwarding end. The traffic sub-information is used for indicating the traffic passing through the interface in the target historical time period.
Step 404, determining a target input direction interface and a target output direction interface based on the acquired flow sub-information of the input direction interface and the acquired flow sub-information of the output direction interface, respectively.
In this embodiment, the executing body may determine the target in-direction interface based on the flow sub-information of the in-direction interface obtained in step 403, and the executing body may determine the target out-direction interface based on the flow sub-information of the out-direction interface obtained in step 403.
The steps 401, 402, 403, and 404 may be performed in a similar manner to the steps 201, 202, 203, and 204 in the foregoing embodiments, and the descriptions of the steps 201, 202, 203, and 204 also apply to the steps 401, 402, 403, and 404, which are not repeated herein.
Step 405, determining a ratio of the flow through the target in-direction interface to the flow through the target out-direction interface during the target history period.
In this embodiment, based on the target in-direction interface and the target out-direction interface determined in step 404, the execution body may determine a ratio of the flow rate passing through the target in-direction interface to the flow rate passing through the target out-direction interface in the target history period. Wherein the ratio is less than or equal to 1.
Specifically, the executing body may obtain the ratio by using a smaller flow rate of the flow rate corresponding to the target in-direction interface and the flow rate corresponding to the target out-direction interface than a larger flow rate of the flow rate corresponding to the upper target in-direction interface and the flow rate corresponding to the target out-direction interface.
And step 406, respectively performing speed limiting processing on the target outgoing direction interface and the target incoming direction interface in response to the determined ratio being greater than or equal to a first preset coefficient.
In this embodiment, the executing body may perform speed limiting processing on the target outgoing direction interface and the target incoming direction interface respectively in response to the determined ratio being greater than or equal to the first preset coefficient. The first preset coefficient may be a preset coefficient for measuring the convergence degree of the flow, where the first preset coefficient is less than or equal to 1.
In particular, the first preset coefficient may be the same as the second preset coefficient described above.
In practice, the rate limiting process is used to limit the flow through the interface below a target value. Here, the target value may be a preset value, or may be a value determined based on the traffic forwarded by the current target electronic device.
It can be understood that the ratio is greater than or equal to the first preset coefficient, it can be stated that most of the flow flowing in from the target inlet direction interface flows out from the target outlet direction interface, so that the flow can be characterized to be converged on the communication link formed by the target inlet direction interface and the target outlet direction interface, and at the moment, speed limiting processing can be respectively performed on the target inlet direction interface and the target outlet direction interface so as to realize speed limiting of the communication link, thereby further improving the effectiveness of speed limiting.
In some optional implementations of this embodiment, the executing body may further select an interface from the target outgoing direction interface and the target incoming direction interface to perform speed limiting processing in response to the determined ratio being smaller than a first preset coefficient.
Here, the ratio is smaller than the first preset coefficient, which may indicate that the traffic does not converge on the communication link formed by the target in-direction interface and the target out-direction interface. Specifically, the first case may include two cases, where the target ingress direction interface and the plurality of egress direction interfaces form a communication link, where the plurality of egress direction interfaces include the target egress direction interface, and then traffic flowing into the target ingress direction interface is to be split into the plurality of communication links, so that the traffic is not converged on the communication link formed by the target ingress direction interface and the target egress direction interface, and at this time, speed limiting processing may be performed on the target egress direction interface, so as to reduce an influence on other communication links (that is, communication links other than the communication links corresponding to the target egress direction interface among the plurality of communication links corresponding to the target ingress direction interface) when speed limiting processing is performed on the target ingress direction interface.
In the second case, the target outgoing direction interface and the plurality of incoming direction interfaces form a communication link, where the plurality of incoming direction interfaces include a target incoming direction interface, and the traffic passing through the target outgoing direction interface is from the plurality of communication links, so that the traffic is not converged on the communication link formed by the target incoming direction interface and the target outgoing direction interface, and at this time, speed-limiting processing may be performed on the target incoming direction interface, so as to reduce an influence on other communication links (that is, communication links other than the communication links corresponding to the target incoming direction interface among the plurality of communication links corresponding to the target outgoing direction interface) when speed-limiting processing is performed on the target outgoing direction interface.
As can be seen from fig. 4, compared with the corresponding embodiment of fig. 2, the flow 400 of the method for processing information in this embodiment highlights the step of performing speed limit processing on the interfaces of the target in-direction interface and the target out-direction interface based on the ratio of the flow passing through the target in-direction interface to the flow passing through the target out-direction interface in the target history period after determining the target in-direction interface and the target out-direction interface. Specifically, when the ratio is greater than or equal to a first preset coefficient, the flow can be represented to be converged on a communication link formed by the target inlet direction interface and the target outlet direction interface, and speed limiting processing can be performed on the target inlet direction interface and the target outlet direction interface at the moment respectively so as to realize speed limiting of the communication link, so that the speed limiting effectiveness can be further improved.
With further reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of an apparatus for processing information, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 5, the apparatus 500 for processing information of the present embodiment includes: a first acquisition unit 501, a first determination unit 502, a second acquisition unit 503, a second determination unit 504, and a first speed limit unit 505. The first obtaining unit 501 is configured to obtain, in response to detecting the target information, flow information of at least one forwarding end included in the target electronic device, where the target information is used to indicate that a flow of the target electronic device is greater than or equal to a preset flow threshold, the forwarding end corresponds to a user and is used to forward the flow for the corresponding user, and the flow information is used to indicate the flow forwarded by the forwarding end in a target historical time period; the first determining unit 502 is configured to determine, as a target forwarding end, a forwarding end that is most forwarded in a target history period from among at least one forwarding end based on the acquired traffic information; the second obtaining unit 503 is configured to obtain traffic sub-information of at least one ingress direction interface and traffic sub-information of at least one egress direction interface included in the target forwarding end, where the traffic sub-information is used to indicate traffic passing through the interfaces in the target history period; the second determining unit 504 is configured to determine a target in-direction interface and a target out-direction interface based on the acquired flow sub-information of the in-direction interface and the acquired flow sub-information of the out-direction interface, respectively; the first speed limiting unit 505 is configured to perform speed limiting processing on an interface among the target in-direction interface and the target out-direction interface.
In this embodiment, the first obtaining unit 501 of the apparatus 500 for processing information may obtain, in response to detecting target information from a remote location or a local location through a wired connection or a wireless connection, traffic information of at least one forwarding end included in a target electronic device (e.g., a server shown in fig. 1). The target information is used for indicating that the flow of the target electronic equipment is greater than or equal to a preset flow threshold.
The target electronic device is the electronic device for limiting the flow rate. The preset flow threshold may be a maximum flow value preset by a technician. The target electronic device may include at least one forwarding end. The forwarding end corresponds to the user and is used for forwarding the traffic for the corresponding user.
The transmitting end can be hardware or software. Each forwarding end may include at least one ingress direction interface and at least one egress direction interface. The ingress interface is an interface for traffic to flow into the communication link and the egress interface is an interface for traffic to flow out of the communication link.
The traffic information is used for indicating traffic forwarded by the forwarding end in the target historical time period. The target historical time period may be a historical time period with the current time as an end point and the duration as a preset duration.
In this embodiment, based on the traffic information obtained by the first obtaining unit 501, the first determining unit 502 may determine, as the target forwarding end, the forwarding end that has the largest traffic forwarded in the target history period from at least one forwarding end included in the target electronic device.
In this embodiment, based on the target forwarding end determined by the first determining unit 502, the second obtaining unit 503 may obtain, from the local or from the target electronic device, traffic sub-information of at least one ingress direction interface and traffic sub-information of at least one egress direction interface included in the target forwarding end. The traffic sub-information is used for indicating the traffic passing through the interface in the target historical time period.
In the present embodiment, the second determining unit 504 may determine the target in-direction interface based on the flow sub-information of the in-direction interface obtained by the second obtaining unit 503, and the second determining unit 504 may determine the target out-direction interface based on the flow sub-information of the out-direction interface obtained by the second obtaining unit 503. The target input direction interface and the target output direction interface are interfaces for speed limiting processing.
In this embodiment, the first speed limiting unit 505 may perform speed limiting processing on the interface among the target in-direction interface and the target out-direction interface based on the target in-direction interface and the target out-direction interface determined by the second determining unit 504.
In some optional implementations of the present embodiment, the second obtaining unit 503 may be further configured to: and for the interfaces in the at least one input direction interface and the at least one output direction interface included by the target forwarding end, obtaining target number of flow sub-information of the interfaces, wherein the target number of flow sub-information corresponds to a target number of historical time periods in a target historical time period, and the flow sub-information is used for indicating the flow passing through the interfaces in the corresponding historical time periods.
In some optional implementations of the present embodiment, the second determining unit 504 may include: a first determining module (not shown in the figure) configured to perform the following steps for a history time period of the target number of history time periods: determining the inlet direction interface with the largest flow as a candidate inlet direction interface corresponding to the historical time period based on the flow sub-information of the inlet direction interface corresponding to the historical time period; determining the outlet direction interface with the largest flow as a candidate outlet direction interface corresponding to the historical time period based on the flow sub-information of the outlet direction interface corresponding to the historical time period; a second determining module (not shown in the figure) is configured to determine a target in-direction interface based on the determined target number of candidate in-direction interfaces, and a target out-direction interface based on the determined target number of candidate out-direction interfaces.
In some optional implementations of this embodiment, the second determining module may be further configured to: determining whether the determined target number of candidate incoming direction interfaces are the same, and whether the target number of candidate outgoing direction interfaces are the same; in response to determining that the target number of candidate in-direction interfaces is the same and the target number of candidate out-direction interfaces is the same, the same candidate in-direction interface is determined to be the target in-direction interface and the same candidate out-direction interface is determined to be the target out-direction interface.
In some alternative implementations of the present embodiment, the first speed limiting unit 505 may include: a third determination module (not shown) configured to determine a ratio of flow through the target in-direction interface to flow through the target out-direction interface over a target historical period of time; and a first speed limiting module (not shown in the figure) is configured to perform speed limiting processing on the target outgoing direction interface and the target incoming direction interface respectively in response to the determined ratio being greater than or equal to a first preset coefficient.
In some optional implementations of this embodiment, the first speed limiting unit 505 may further include: a second speed limiting module (not shown) is configured to select an interface from the target outgoing direction interface and the target incoming direction interface for speed limiting processing in response to the determined ratio being smaller than a first preset coefficient.
In some optional implementations of this embodiment, the first speed limiting unit 505 may be further configured to: and (3) performing speed limiting processing on the interfaces in the target in-direction interface and the target out-direction interface based on the following inequality: s is less than or equal to T, K+F t -F c Wherein S is used for representing a speed limit value; t is used for representing a preset flow threshold; k is used for representing a second preset coefficient; f (F) t For characterizing traffic of a current target electronic device; f (F) c And the method is used for representing the traffic forwarded by the current target forwarding end.
In some optional implementations of this embodiment, the target electronic device belongs to a predetermined cluster of electronic devices; and the first acquisition unit 501 may be further configured to: and responding to the detection of the target information, selecting the electronic equipment from the electronic equipment cluster as target electronic equipment, and acquiring flow information of at least one forwarding end included in the target electronic equipment.
In some optional implementations of this embodiment, the apparatus 500 may further include: a second speed limiting unit (not shown in the figure) configured to perform, for an electronic device included in the electronic device cluster, the following steps for electronic devices other than the target electronic device: determining an input direction interface corresponding to a target input direction interface and an output direction interface corresponding to a target output direction in the electronic equipment; and carrying out speed limiting processing on an interface in an input direction interface corresponding to the target input direction and an interface in an output direction interface corresponding to the target output direction interface in the electronic equipment.
It will be appreciated that the elements described in the apparatus 500 correspond to the various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting benefits described above with respect to the method are equally applicable to the apparatus 500 and the units contained therein, and are not described in detail herein.
The device 500 provided by the above embodiment of the present disclosure can automatically locate and limit the speed of the interface to be limited under the condition that the flow of the target electronic device exceeds the limit, thereby improving the efficiency of information processing; in addition, the speed limit can be embodied to the target interface in the forwarding end, compared with the speed limit of the forwarding end in the prior art, the speed limit method and the speed limit device can reduce the influence of the speed limit on other interfaces except the target interface in the forwarding end, and improve the pertinence and the effectiveness of the speed limit.
Referring now to fig. 6, a schematic diagram of an electronic device (e.g., the monitoring device of fig. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a smart phone, a notebook computer, a PAD (tablet computer), etc., and a fixed terminal such as a digital TV, a desktop computer, etc. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: in response to detecting the target information, acquiring flow information of at least one forwarding end included in the target electronic device, wherein the target information is used for indicating that the flow of the target electronic device is greater than or equal to a preset flow threshold, the forwarding end corresponds to a user and is used for forwarding the flow for the corresponding user, and the flow information is used for indicating the flow forwarded by the forwarding end in a target historical time period; based on the acquired flow information, determining a forwarding end with the most flow forwarded in a target historical time period from at least one forwarding end as a target forwarding end; acquiring flow sub-information of at least one input direction interface and flow sub-information of at least one output direction interface, which are included by a target forwarding end, wherein the flow sub-information is used for indicating the flow passing through the interfaces in a target historical time period; determining a target direction-in interface and a target direction-out interface based on the acquired flow sub-information of the direction-in interface and the flow sub-information of the direction-out interface respectively; and carrying out speed limiting processing on the interfaces in the target inlet direction interface and the target outlet direction interface.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit is not limited to the unit itself in some cases, and for example, the first acquisition unit may also be described as "a unit that acquires traffic information".
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).

Claims (20)

1. A method for processing information, comprising:
in response to detecting the target information, acquiring flow information of at least one forwarding end included in the target electronic device, wherein the target information is used for indicating that the flow of the target electronic device is greater than or equal to a preset flow threshold, the forwarding end corresponds to a user and is used for forwarding the flow for the corresponding user, and the flow information is used for indicating the flow forwarded by the forwarding end in a target historical time period;
Determining, from the at least one forwarding end, a forwarding end with the most traffic forwarded in the target history period as a target forwarding end based on the acquired traffic information;
acquiring flow sub-information of at least one input direction interface and flow sub-information of at least one output direction interface, which are included by the target forwarding end, wherein the flow sub-information is used for indicating the flow passing through the interfaces in the target historical time period;
determining a target direction-in interface and a target direction-out interface based on the acquired flow sub-information of the direction-in interface and the flow sub-information of the direction-out interface respectively;
and carrying out speed limiting processing on the interfaces in the target inlet direction interface and the target outlet direction interface.
2. The method of claim 1, wherein the obtaining traffic sub-information of at least one ingress direction interface and traffic sub-information of at least one egress direction interface of the target forwarding end comprises:
and for the interfaces in the at least one input direction interface and the at least one output direction interface included by the target forwarding end, obtaining target number of flow sub-information of the interfaces, wherein the target number of flow sub-information corresponds to the target number of historical time periods in the target historical time period, and the flow sub-information is used for indicating the flow passing through the interfaces in the corresponding historical time periods.
3. The method of claim 2, wherein the determining the target ingress and egress direction interfaces based on the acquired traffic sub-information for the ingress and egress direction interfaces, respectively, comprises:
for a historical time period of the target number of historical time periods, performing the steps of: determining the inlet direction interface with the largest flow as a candidate inlet direction interface corresponding to the historical time period based on the flow sub-information of the inlet direction interface corresponding to the historical time period; determining the outlet direction interface with the largest flow as a candidate outlet direction interface corresponding to the historical time period based on the flow sub-information of the outlet direction interface corresponding to the historical time period;
the method includes determining a target in-direction interface based on the determined target number of candidate in-direction interfaces, and determining a target out-direction interface based on the determined target number of candidate out-direction interfaces.
4. The method of claim 3, wherein the determining a target in-direction interface based on the determined target number of candidate in-direction interfaces, and determining a target out-direction interface based on the determined target number of candidate out-direction interfaces comprises:
Determining whether the determined target number of candidate incoming direction interfaces are the same, and whether the target number of candidate outgoing direction interfaces are the same;
in response to determining that the target number of candidate in-direction interfaces is the same and the target number of candidate out-direction interfaces is the same, the same candidate in-direction interface is determined to be the target in-direction interface and the same candidate out-direction interface is determined to be the target out-direction interface.
5. The method of claim 1, wherein the rate limiting the one of the target-in-direction interface and the target-out-direction interface comprises:
determining a ratio of flow through the target ingress direction interface to flow through the target egress direction interface within the target historical time period;
and respectively carrying out speed limiting processing on the target outgoing direction interface and the target incoming direction interface in response to the determined ratio being greater than or equal to a first preset coefficient.
6. The method of claim 5, wherein the rate limiting the one of the target-in-direction interface and the target-out-direction interface further comprises:
and responding to the determined ratio being smaller than the first preset coefficient, selecting an interface from the target outgoing direction interface and the target incoming direction interface to carry out speed limiting processing.
7. The method of claim 1, wherein the rate limiting the one of the target-in-direction interface and the target-out-direction interface comprises:
and performing speed limiting processing on the interfaces in the target in-direction interface and the target out-direction interface based on the following inequality:
s is used for representing the current flow passing through the interface; t is used for representing a preset flow threshold; k is used for representing a second preset coefficient; f (F) t For characterizing traffic of a current target electronic device; f (F) c And the method is used for representing the traffic forwarded by the current target forwarding end.
8. The method according to one of claims 1 to 7, wherein the target electronic device belongs to a predetermined cluster of electronic devices; and
the responding to the detection of the target information, the obtaining of the flow information of at least one forwarding end included in the target electronic equipment comprises the following steps:
and responding to the detection of the target information, selecting the electronic equipment from the electronic equipment cluster as target electronic equipment, and acquiring flow information of at least one forwarding end included in the target electronic equipment.
9. The method of claim 8, wherein the method further comprises:
for the electronic devices of the electronic devices included in the electronic device cluster and except the target electronic device, executing the following steps: determining an input direction interface corresponding to the target input direction interface and an output direction interface corresponding to the target output direction in the electronic equipment, wherein the input direction interface corresponding to the target input direction interface is an interface capable of realizing the same function with the target input direction interface; the direction outlet interface corresponding to the target direction outlet interface is an interface which can realize the same function with the target direction outlet interface; and carrying out speed limiting processing on an interface in an input direction interface corresponding to the target input direction and an interface in an output direction interface corresponding to the target output direction interface in the electronic equipment.
10. An apparatus for processing information, comprising:
the first acquisition unit is configured to respond to detection of target information, and acquire flow information of at least one forwarding end included in the target electronic equipment, wherein the target information is used for indicating that the flow of the target electronic equipment is greater than or equal to a preset flow threshold, the forwarding end corresponds to a user and is used for forwarding the flow for the corresponding user, and the flow information is used for indicating the flow forwarded by the forwarding end in a target historical time period;
a first determining unit configured to determine, from the at least one forwarding end, a forwarding end that is most forwarded in the target history period as a target forwarding end, based on the acquired traffic information;
the second acquisition unit is configured to acquire flow sub-information of at least one input direction interface and flow sub-information of at least one output direction interface, which are included by the target forwarding end, wherein the flow sub-information is used for indicating the flow passing through the interfaces in the target historical time period;
a second determining unit configured to determine a target in-direction interface and a target out-direction interface based on the acquired flow sub-information of the in-direction interface and flow sub-information of the out-direction interface, respectively;
And the first speed limiting unit is configured to limit the speed of the interface in the target entering direction interface and the interface in the target exiting direction interface.
11. The apparatus of claim 10, wherein the second acquisition unit is further configured to:
and for the interfaces in the at least one input direction interface and the at least one output direction interface included by the target forwarding end, obtaining target number of flow sub-information of the interfaces, wherein the target number of flow sub-information corresponds to the target number of historical time periods in the target historical time period, and the flow sub-information is used for indicating the flow passing through the interfaces in the corresponding historical time periods.
12. The apparatus of claim 11, wherein the second determining unit comprises:
a first determination module configured to perform, for a historical time period of the target number of historical time periods, the steps of: determining the inlet direction interface with the largest flow as a candidate inlet direction interface corresponding to the historical time period based on the flow sub-information of the inlet direction interface corresponding to the historical time period; determining the outlet direction interface with the largest flow as a candidate outlet direction interface corresponding to the historical time period based on the flow sub-information of the outlet direction interface corresponding to the historical time period;
The second determining module is configured to determine a target in-direction interface based on the determined target number of candidate in-direction interfaces and a target out-direction interface based on the determined target number of candidate out-direction interfaces.
13. The apparatus of claim 12, wherein the second determination module is further configured to:
determining whether the determined target number of candidate incoming direction interfaces are the same, and whether the target number of candidate outgoing direction interfaces are the same;
in response to determining that the target number of candidate in-direction interfaces is the same and the target number of candidate out-direction interfaces is the same, the same candidate in-direction interface is determined to be the target in-direction interface and the same candidate out-direction interface is determined to be the target out-direction interface.
14. The apparatus of claim 10, wherein the first speed limiting unit comprises:
a third determination module configured to determine a ratio of flow through the target ingress direction interface to flow through the target egress direction interface over the target historical period of time;
and the first speed limiting module is configured to respond to the fact that the determined ratio is larger than or equal to a first preset coefficient, and respectively limit the speed of the target outgoing direction interface and the target incoming direction interface.
15. The apparatus of claim 14, wherein the first rate limiting unit further comprises:
and the second speed limiting module is configured to select an interface from the target outgoing direction interface and the target incoming direction interface to carry out speed limiting processing in response to the determined ratio being smaller than the first preset coefficient.
16. The apparatus of claim 10, wherein the first speed limiting unit is further configured to:
and performing speed limiting processing on the interfaces in the target in-direction interface and the target out-direction interface based on the following inequality:
s is used for representing the current flow passing through the interface; t is used for representing a preset flow threshold; k is used for representing a second preset coefficient; f (F) t For characterizing traffic of a current target electronic device; f (F) c And the method is used for representing the traffic forwarded by the current target forwarding end.
17. The apparatus of one of claims 10-16, wherein the target electronic device belongs to a predetermined cluster of electronic devices; and
the first acquisition unit is further configured to:
and responding to the detection of the target information, selecting the electronic equipment from the electronic equipment cluster as target electronic equipment, and acquiring flow information of at least one forwarding end included in the target electronic equipment.
18. The apparatus of claim 17, wherein the apparatus further comprises:
the second speed limiting unit is configured to execute the following steps for electronic devices in the electronic devices except the target electronic device, wherein the electronic device cluster comprises the following steps: determining an input direction interface corresponding to the target input direction interface and an output direction interface corresponding to the target output direction in the electronic equipment, wherein the input direction interface corresponding to the target input direction interface is an interface capable of realizing the same function with the target input direction interface; the direction outlet interface corresponding to the target direction outlet interface is an interface which can realize the same function with the target direction outlet interface; and carrying out speed limiting processing on an interface in an input direction interface corresponding to the target input direction and an interface in an output direction interface corresponding to the target output direction interface in the electronic equipment.
19. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-9.
20. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1-9.
CN201910676013.3A 2019-07-25 2019-07-25 Method and device for processing information Active CN110401603B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910676013.3A CN110401603B (en) 2019-07-25 2019-07-25 Method and device for processing information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910676013.3A CN110401603B (en) 2019-07-25 2019-07-25 Method and device for processing information

Publications (2)

Publication Number Publication Date
CN110401603A CN110401603A (en) 2019-11-01
CN110401603B true CN110401603B (en) 2023-07-28

Family

ID=68325946

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910676013.3A Active CN110401603B (en) 2019-07-25 2019-07-25 Method and device for processing information

Country Status (1)

Country Link
CN (1) CN110401603B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887218B (en) * 2020-12-22 2022-10-21 新华三技术有限公司 Message forwarding method and device

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1960314A (en) * 2005-11-02 2007-05-09 中兴通讯股份有限公司 Flow control system and method based on interface set
CN101123587A (en) * 2007-09-13 2008-02-13 杭州华三通信技术有限公司 Traffic control method and device for switch service flow
CN101136839A (en) * 2006-08-31 2008-03-05 中兴通讯股份有限公司 Method and equipment for discovering and controlling terminal-to-terminal equity network user flux
US7626938B1 (en) * 2005-03-31 2009-12-01 Marvell Israel (M.I.S.L) Ltd. Local area network switch using control plane packet mirroring to support multiple network traffic analysis devices
CN102356609A (en) * 2011-08-24 2012-02-15 华为技术有限公司 Flow control method of switched network and device
CN102594671A (en) * 2012-02-08 2012-07-18 中兴通讯股份有限公司 Speed-limiting method and device for users
JP2015050479A (en) * 2013-08-29 2015-03-16 株式会社オー・エフ・ネットワークス Packet switch, packet switching method and band control program
CN105703928A (en) * 2014-11-25 2016-06-22 中兴通讯股份有限公司 Traffic adjustment method and traffic adjustment device
WO2016112656A1 (en) * 2015-01-12 2016-07-21 中兴通讯股份有限公司 Service processing method and device
CN106230741A (en) * 2016-09-18 2016-12-14 杭州迪普科技有限公司 A kind of method and apparatus that message is carried out speed limit
CN106878116A (en) * 2016-12-06 2017-06-20 新华三技术有限公司 Limit Rate method and apparatus
CN107770088A (en) * 2017-09-06 2018-03-06 阿里巴巴集团控股有限公司 A kind of flow control methods and device
CN109246026A (en) * 2018-08-13 2019-01-18 中国平安人寿保险股份有限公司 Traffic management and control method, apparatus, equipment and storage medium
CN109756426A (en) * 2017-11-01 2019-05-14 南京烽火软件科技有限公司 Customer flow control device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11063785B2 (en) * 2015-09-28 2021-07-13 Intel Corporation Multipath traffic management

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7626938B1 (en) * 2005-03-31 2009-12-01 Marvell Israel (M.I.S.L) Ltd. Local area network switch using control plane packet mirroring to support multiple network traffic analysis devices
CN1960314A (en) * 2005-11-02 2007-05-09 中兴通讯股份有限公司 Flow control system and method based on interface set
CN101136839A (en) * 2006-08-31 2008-03-05 中兴通讯股份有限公司 Method and equipment for discovering and controlling terminal-to-terminal equity network user flux
CN101123587A (en) * 2007-09-13 2008-02-13 杭州华三通信技术有限公司 Traffic control method and device for switch service flow
CN102356609A (en) * 2011-08-24 2012-02-15 华为技术有限公司 Flow control method of switched network and device
CN102594671A (en) * 2012-02-08 2012-07-18 中兴通讯股份有限公司 Speed-limiting method and device for users
JP2015050479A (en) * 2013-08-29 2015-03-16 株式会社オー・エフ・ネットワークス Packet switch, packet switching method and band control program
CN105703928A (en) * 2014-11-25 2016-06-22 中兴通讯股份有限公司 Traffic adjustment method and traffic adjustment device
WO2016112656A1 (en) * 2015-01-12 2016-07-21 中兴通讯股份有限公司 Service processing method and device
CN106230741A (en) * 2016-09-18 2016-12-14 杭州迪普科技有限公司 A kind of method and apparatus that message is carried out speed limit
CN106878116A (en) * 2016-12-06 2017-06-20 新华三技术有限公司 Limit Rate method and apparatus
CN107770088A (en) * 2017-09-06 2018-03-06 阿里巴巴集团控股有限公司 A kind of flow control methods and device
CN109756426A (en) * 2017-11-01 2019-05-14 南京烽火软件科技有限公司 Customer flow control device
CN109246026A (en) * 2018-08-13 2019-01-18 中国平安人寿保险股份有限公司 Traffic management and control method, apparatus, equipment and storage medium

Also Published As

Publication number Publication date
CN110401603A (en) 2019-11-01

Similar Documents

Publication Publication Date Title
KR102158557B1 (en) Method and device for determining response time
US11044206B2 (en) Live video anomaly detection
CN110213614B (en) Method and device for extracting key frame from video file
CN111459364B (en) Icon updating method and device and electronic equipment
CN110390493B (en) Task management method and device, storage medium and electronic equipment
CN109693981B (en) Method and apparatus for transmitting information
US20240126415A1 (en) Information presentation method and apparatus, and electronic device and storage medium
CN111309617A (en) Application program control method and device, storage medium and electronic equipment
CN112530205A (en) Airport parking apron airplane state detection method and device
JP2023510833A (en) Message processing method, device and electronic equipment
CN112256371A (en) Method and device for displaying information and electronic equipment
CN115103210A (en) Information processing method, device, terminal and storage medium
CN113542856B (en) Method, device, equipment and computer readable medium for reverse playing of online video
CN110401603B (en) Method and device for processing information
CN113038176B (en) Video frame extraction method and device and electronic equipment
JP2021170319A (en) Method and device for acquiring information
CN110727558A (en) Information prompting method and device, storage medium and electronic equipment
CN110960857A (en) Game data monitoring method and device, electronic equipment and storage medium
CN114039926B (en) Transmission control protocol determining method and device, readable medium and electronic equipment
CN110809166B (en) Video data processing method and device and electronic equipment
CN115187364A (en) Method and device for monitoring deposit risk under bank distributed scene
CN111680754B (en) Image classification method, device, electronic equipment and computer readable storage medium
CN110084835B (en) Method and apparatus for processing video
CN112543228A (en) Data transmission method and device, electronic equipment and computer readable medium
CN114745276B (en) Switch bandwidth adjusting method and device, electronic equipment and computer readable medium

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