CN106254266B - Message processing method and network equipment - Google Patents

Message processing method and network equipment Download PDF

Info

Publication number
CN106254266B
CN106254266B CN201610681329.8A CN201610681329A CN106254266B CN 106254266 B CN106254266 B CN 106254266B CN 201610681329 A CN201610681329 A CN 201610681329A CN 106254266 B CN106254266 B CN 106254266B
Authority
CN
China
Prior art keywords
processed
time unit
message
packet loss
current time
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
CN201610681329.8A
Other languages
Chinese (zh)
Other versions
CN106254266A (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201610681329.8A priority Critical patent/CN106254266B/en
Publication of CN106254266A publication Critical patent/CN106254266A/en
Application granted granted Critical
Publication of CN106254266B publication Critical patent/CN106254266B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a message processing method and network equipment, relates to the technical field of communication, and solves the problem that in the prior art, because an uploading threshold set by a data layer is fixed, resources of a control layer cannot be fully utilized or the processing amount of the control layer is too large, so that a message is lost. The method comprises the following steps: the data layer acquires the packet loss number of the message to be processed in the last time unit of the current time unit according to the message type of the message to be processed, and sends the packet loss number of the message to be processed to the control layer; the data layer receiving control layer determines an uploading threshold value of the message to be processed in the current time unit according to the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit; and the data layer determines the number of the target messages uploaded in the current time unit according to the uploading threshold of the messages to be processed in the current time unit. The invention is applied to the processing of the message.

Description

Message processing method and network equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a message processing method and a network device.
Background
Currently, network devices and components are physical entities connected into a network. The network device has a certain message processing capability, and in general, when the network device performs message processing, it is first necessary to send a message to a control layer through a data layer of the network device, and then the control layer in the network device processes the sent message.
In the prior art, the processing of the messages is to limit the number of the messages sent from the data layer to the control layer by setting a fixed sending threshold, and then the control layer processes a certain number of the messages sent from the data layer. However, in a complicated environment, such a method for setting a fixed uplink threshold is usually not reasonable, for example, when an uplink channel of a data layer is excessively suppressed to make an uplink message too small (i.e. the uplink threshold is small), the processing capability of the control layer is wasted, so that the resources of the control layer cannot be fully utilized, and the processing speed of a normal service is affected. When the uploading channel of the data layer is released to enable the number of the uploaded messages to be too large (namely the uploading threshold is large), the control layer of the network equipment faces a large processing pressure, continuous packet loss occurs, and due to the fact that a large number of messages are uploaded, resources of the control layer cannot meet the requirement of message processing, and therefore services cannot be normally developed.
Disclosure of Invention
Embodiments of the present invention provide a packet processing method and a network device, which solve the problem in the prior art that a packet is lost due to insufficient utilization of resources of a control layer or a large processing amount of the control layer because a set uploading threshold of a data layer is fixed.
In order to achieve the above purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, a method for processing a packet is provided, where the method is applied to a data layer of a network device, and the method includes:
the data layer acquires the packet loss number of the message to be processed in the last time unit of the current time unit according to the message type of the message to be processed, and sends the packet loss number of the message to be processed to the control layer;
the data layer receiving control layer determines an uploading threshold value of the message to be processed in the current time unit according to the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit;
and the data layer determines the number of the target messages uploaded in the current time unit according to the uploading threshold of the messages to be processed in the current time unit.
Further, the control layer determining the uploading threshold of the to-be-processed packet in the current time unit according to the packet loss number of the to-be-processed packet and the uploading number of the to-be-processed packet in the previous time unit specifically includes:
substituting the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit into an uploading threshold value calculation formula to obtain an uploading threshold value of the message to be processed in the current time unit;
wherein, the calculation formula of the upper sending threshold is as follows:
u (t +1) ═ U (t) + kp e (t) + kd (e) (t) -e (t-1)) + ki (e) (t) + e (t-1)), where U (t) is the number of packets to be processed in the last time unit, e (t-1) is the number of packets to be processed in the previous time unit, kp is a proportional controller operator coefficient, kd is a differential controller operator coefficient, and ki is an integral controller operator coefficient.
Further, the step of acquiring, by the data layer, the packet loss number of the to-be-processed packet in the last time unit of the current time unit according to the packet type of the to-be-processed packet specifically includes:
acquiring the message type of a message to be processed;
and reading the packet loss number of the message to be processed in the last time unit of the current time unit in a database according to the message type of the message to be processed.
Further, the reading, in the database, the packet loss count of the to-be-processed packet in the last time unit of the current time unit according to the packet type of the to-be-processed packet specifically includes:
and acquiring the packet loss number of the message to be processed in the last time unit of the current time unit in a message packet loss number table according to the message type of the message to be processed, wherein the message packet loss number table is a mapping relation table between different types of messages and each time unit and the packet loss number of the message.
Optionally, the method further includes:
acquiring packet loss numbers of different types of messages in each time unit to form a message packet loss number table, and storing the message packet loss number table into a database;
further, the determining, by the data layer, the number of target packets uploaded in the current time unit according to the uploading threshold of the packet to be processed in the current time unit specifically includes:
when the number of the messages to be processed is smaller than the uploading threshold, the number of the target messages uploaded in the current time unit is the number of the messages to be processed;
and when the number of the messages to be processed is greater than the uploading threshold, the number of the target messages uploaded in the current time unit is the number of the messages to be processed corresponding to the uploading threshold, and the messages to be processed exceeding the uploading threshold are discarded.
In a second aspect, a network device is provided, which includes a data layer, the data layer including:
the acquisition module is used for acquiring the packet loss number of the message to be processed in the last time unit of the current time unit according to the message type of the message to be processed and sending the packet loss number of the message to be processed to the control layer;
the receiving module is used for receiving an uploading threshold value of the message to be processed in the current time unit, which is determined by the control layer according to the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit;
and the determining module is used for determining the number of the target messages uploaded in the current time unit according to the uploading threshold of the messages to be processed in the current time unit.
Further, the obtaining module obtains the packet loss number of the to-be-processed packet in the last time unit of the current time unit according to the packet type of the to-be-processed packet, and specifically is configured to:
acquiring the message type of a message to be processed;
and reading the packet loss number of the message to be processed in the last time unit of the current time unit in a database according to the message type of the message to be processed.
Further, the obtaining module reads, in the database according to the packet type of the to-be-processed packet, the packet loss number of the to-be-processed packet in the last time unit of the current time unit, and specifically is configured to:
and acquiring the packet loss number of the message to be processed in the last time unit of the current time unit in a message packet loss number table according to the message type of the message to be processed, wherein the message packet loss number table is a mapping relation table between different types of messages and each time unit and the packet loss number of the message.
Optionally, the data layer further includes:
the forming module is used for obtaining packet loss numbers of different types of messages in each time unit, forming a message packet loss number table and storing the message packet loss number table into a database.
Further, the determining module is specifically configured to:
when the number of the messages to be processed is smaller than the uploading threshold, the number of the target messages uploaded in the current time unit is the number of the messages to be processed;
and when the number of the messages to be processed is greater than the uploading threshold, the number of the target messages uploaded in the current time unit is the number of the messages to be processed corresponding to the uploading threshold, and the messages to be processed exceeding the uploading threshold are discarded.
In a third aspect, a network device is provided, which includes a control layer, where the control layer includes:
the receiving module is used for receiving the packet loss number of the message to be processed in the last time unit of the current time unit, which is acquired by the data layer;
the processing module is used for determining an uploading threshold value of the message to be processed in the current time unit according to the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit;
and the sending module is used for sending the uploading threshold value of the message to be processed in the current time unit to a data layer.
Further, the processing module is specifically configured to:
substituting the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit into an uploading threshold value calculation formula to obtain an uploading threshold value of the message to be processed in the current time unit;
wherein, the calculation formula of the upper sending threshold is as follows:
u (t +1) ═ U (t) + kp e (t) + kd (e) (t) -e (t-1)) + ki (e) (t) + e (t-1)), where U (t) is the number of packets to be processed in the last time unit, e (t-1) is the number of packets to be processed in the previous time unit, kp is a proportional controller operator coefficient, kd is a differential controller operator coefficient, and ki is an integral controller operator coefficient.
Compared with the prior art that the number of messages sent to the control layer by the data layer is limited by setting a fixed sending threshold value, which can cause that the resources of the control layer cannot be fully utilized or the processing capacity of the control layer is too large to cause message loss, the sending threshold value in the scheme is not a fixed value, but the control layer determines the number of the messages to be sent to the data layer in an upward mode according to the packet loss number of the messages to be processed in the upward time unit of the current time unit and the sending number of the messages to be processed in the upward time unit, and the actual bearing capacity of the control layer is fully considered to determine the number of the messages to be processed which can be sent to the data layer, so that the problem that the messages are lost due to the waste of the resources of the control layer or the too. In addition, because the packet loss number corresponding to different types of messages and the number of messages uploaded in a last time unit are different, the uploading thresholds corresponding to different types of messages are also different, so that different uploading thresholds can be set according to different message types, and the scheme can adapt to application scenes of uploading various messages, thereby achieving the purpose of fully utilizing control layer resources and ensuring that services are developed in order and equipment runs stably.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a method for processing a message according to an embodiment of the present invention;
fig. 2 is a flowchart of counting packet losses provided by a packet processing method shown in fig. 1 according to an embodiment of the present invention;
fig. 3 is a flowchart of an adaptive control algorithm in a message processing method based on fig. 1;
fig. 4 is a schematic structural diagram of a network device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another network device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The executing body of the message processing method provided in the embodiment of the present invention may be a message processing apparatus, or may be a network device for executing the message processing method. Illustratively, the network devices include, but are not limited to: computers (whether personal computers or servers), hubs, switches, bridges, routers, gateways, printers and modems, fiber optic transceivers, fiber optic cables, and the like.
The network equipment for data communication, which is applied by the message processing method provided by the invention, adopts a distributed system architecture, and the distributed system architecture comprises a main control board positioned at the uppermost layer and one or more layers of service boards. Wherein, each layer of service board can comprise one or more service boards. The main control board and the service board both include two layers, which are a data layer and a control layer. The data layer may include a plurality of functional modules, such as an interface Unit, a Network Processor (NP), an integrated circuit (ASIC), and a Central Processing Unit (CPU). Similarly, the control layer may also include various functional modules, such as a monitoring unit, a management unit, and a CPU). The data layer is used for forwarding and uploading messages, and the control layer is used for service processing.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
An embodiment of the present invention provides a method for processing a packet, where as shown in fig. 1, the method includes:
101. and the data layer acquires the packet loss number of the message to be processed in the last time unit of the current time unit according to the message type of the message to be processed and sends the packet loss number of the message to be processed to the control layer.
The message types in the embodiment of the present invention include, but are not limited to: protocol type messages and/or service type messages.
For example, in step 101, the data layer obtains, according to the packet type of the packet to be processed, the packet loss number of the packet to be processed in the last time unit of the current time unit, which specifically includes the following contents:
101a, obtaining the message type of the message to be processed.
101b, reading the packet loss number of the message to be processed in the last time unit of the current time unit in the database according to the message type of the message to be processed.
Illustratively, based on the content in step 101, reading, in the database, the packet loss number of the to-be-processed packet in the last time unit of the current time unit according to the packet type of the to-be-processed packet specifically includes:
a1, obtaining the packet loss number of the message to be processed in the last time unit of the current time unit in the message packet loss number table according to the message type of the message to be processed.
Illustratively, the packet loss number table is a mapping relationship table between different types of packets and each time unit and packet loss number.
Illustratively, based on the content of a1, the method further includes:
b1, obtaining packet loss numbers of different types of messages in each time unit to form a message packet loss number table, and storing the message packet loss number table into a database.
The following illustrates a process of acquiring the number of lost packets by the data layer in the embodiment of the present invention. Illustratively, the above-mentioned number of lost packets is obtained by timing with a timer of a data layer in the network device. Specifically, in a fixed time period, when the timer starts to time, the data layer starts to count the packet loss number, and when the time reaches, the data layer finishes counting the packet loss number.
Referring to the packet loss statistical flow chart shown in fig. 2, the data layer receives the uplink messages, then determines the received uplink messages, and when the number of the uplink messages exceeds a set value (i.e. the maximum number of protocol messages that can be transmitted), the data layer loses packets and counts the number of lost packets; otherwise, the data layer sends the report to the control layer.
Illustratively, the packet loss numbers of different types of messages in each time unit are counted through the process of obtaining packet loss, so as to obtain a message packet loss number table, and the message packet loss number table is stored in a database, so that the packet loss number of a certain message in a required time unit can be conveniently read subsequently.
102. And the data layer receiving control layer determines the uploading threshold of the message to be processed in the current time unit according to the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit.
For example, the above-mentioned uploading threshold is a specific value for limiting the number of messages that can be uploaded to the control layer by the data layer in the network device.
For example, the step 102, the control layer determining, according to the packet loss number of the current packet and the uplink number of the current packet in the last time unit, the uplink threshold of the current packet in the current time unit specifically includes the following contents:
102a, substituting the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit into an uploading threshold value calculation formula to obtain the uploading threshold value of the message to be processed in the current time unit.
Wherein, the calculation formula of the upper threshold is as follows:
u (t +1) ═ U (t) + kp e (t) + kd (e) (t) -e (t-1)) + ki (e) (t) + e (t-1)) (equation 1)
U (t) in the above formula is the number of messages to be processed in the last time unit, e (t) in the above formula is the number of packets lost in the messages to be processed in the last time unit, e (t-1) is the number of packets lost in the messages to be processed in the previous time unit of the last time unit, kp is the operator coefficient of the proportional controller, kd is the operator coefficient of the differential controller, and ki is the operator coefficient of the integral controller.
For example, the above-mentioned calculation formula of the upper threshold is obtained by an adaptive control algorithm adopted by the control layer, and the adaptive control algorithm is a control method of incremental negative feedback with adjustable parameters, and can dynamically set parameters according to the service characteristics, the actual processing capability of the network device, and the load degree of the control layer. As shown in fig. 3, a specific principle of an adaptive control algorithm of a control layer is described, in the adaptive algorithm, a packet loss number e (t) is used as an important parameter, a proportional controller, a differential controller, and an integral controller, which are obtained by a proportional control operator, a differential control operator, and an integral control operator, and U (t) allowed to be reported in a last time unit, are used to determine an uploading threshold, and a packet number U (t +1) currently required to be uploaded in a data layer is determined according to the uploading threshold, and a specific process may refer to a process shown in fig. 3.
It should be noted that the proportional controller, the derivative controller and the integral controller may be a fixed constant or a controller operation, such as integral, etc. Different manufacturers, different types of devices (e.g., a Service Router (SR), a Broadband Remote Access Server (BRAS), a Core Router (CR), a Switch (SW), etc.) may set different controllers, or different controllers may be set according to device configurations (e.g., resources such as a single-Core CPU, a multi-Core CPU, and a memory). Specifically, the proportional controller is adjusted by multiplying the packet loss number of the last time unit by a coefficient kp; the differential controller is adjusted by multiplying the difference between the number of lost packets of the previous time unit and the number of lost packets of the previous time unit by a coefficient kd; the integral controller is adjusted by multiplying a coefficient ki by the sum of the number of lost packets of the previous time unit and the number of lost packets of the previous time unit. The numerical values of the three coefficients kp, kd, and ki are set according to actual needs, and are not limited here.
103. And the data layer determines the number of the target messages uploaded in the current time unit according to the uploading threshold of the messages to be processed in the current time unit.
Illustratively, the step 103 specifically includes the following steps:
103a, when the number of the messages to be processed is smaller than the uploading threshold, the number of the target messages uploaded in the current time unit is the number of the messages to be processed.
103b, when the number of the messages to be processed is larger than the uploading threshold, the number of the target messages uploaded in the current time unit is the number of the messages to be processed corresponding to the uploading threshold, and the messages to be processed exceeding the uploading threshold are discarded.
Compared with the prior art that the number of messages sent to the control layer by the data layer is limited by setting a fixed sending threshold value, which can cause that the resources of the control layer cannot be fully utilized or the processing capacity of the control layer is too large to cause message loss, the sending threshold value in the scheme is not a fixed value, but the control layer determines the number of the messages to be sent to the data layer in an upward mode according to the packet loss number of the messages to be processed in the upward time unit of the current time unit and the sending number of the messages to be processed in the upward time unit, and the actual bearing capacity of the control layer is fully considered to determine the number of the messages to be processed which can be sent to the data layer, so that the problem that the messages are lost due to the waste of the resources of the control layer or the too. In addition, because the packet loss number corresponding to different types of messages and the number of messages uploaded in a last time unit are different, the uploading thresholds corresponding to different types of messages are also different, so that different uploading thresholds can be set according to different message types, and the scheme can adapt to application scenes of uploading various messages, thereby achieving the purpose of fully utilizing control layer resources and ensuring that services are developed in order and equipment runs stably.
A network device provided in the embodiment of the present invention will be described below based on the related description in the embodiment of the message processing method corresponding to fig. 1. Technical terms, concepts and the like related to the above embodiments in the following embodiments may refer to the above embodiments, and are not described in detail herein.
An embodiment of the present invention provides a network device, which includes a data layer, and as shown in fig. 4, a data layer 2 of the network device includes: an obtaining module 21, a receiving module 22, and a determining module 23, wherein:
the obtaining module 21 is configured to obtain, according to the packet type of the packet to be processed, the packet loss number of the packet to be processed in the last time unit of the current time unit, and send the packet loss number of the packet to be processed to the control layer.
The receiving module 22 is configured to receive an uploading threshold of the to-be-processed packet in the current time unit, where the uploading threshold is determined by the control layer according to the packet loss number of the to-be-processed packet and the uploading number of the to-be-processed packet in the last time unit.
The determining module 23 is configured to determine the number of target packets uploaded in the current time unit according to the uploading threshold of the packet to be processed in the current time unit.
For example, the obtaining module 21 obtains the packet loss number of the to-be-processed packet in the last time unit of the current time unit according to the packet type of the to-be-processed packet, specifically:
and acquiring the message type of the message to be processed.
And reading the packet loss number of the message to be processed in the last time unit of the current time unit in the database according to the message type of the message to be processed.
Further, the obtaining module 21 reads, in the database according to the packet type of the to-be-processed packet, the packet loss number of the to-be-processed packet in the last time unit of the current time unit, and specifically is used for:
and acquiring the packet loss number of the message to be processed in the last time unit of the current time unit in a message packet loss number table according to the message type of the message to be processed, wherein the message packet loss number table is a mapping relation table between different types of messages and each time unit and the packet loss number of the message.
Optionally, as shown in fig. 4, the data layer 2 of the network device further includes: forming a module 24, wherein:
the forming module 24 is configured to obtain packet loss numbers of different types of packets in each time unit, form a packet loss number table, and store the packet loss number table in a database.
Illustratively, the determining module 23 is specifically configured to:
and when the number of the messages to be processed is smaller than the uploading threshold, the number of the target messages uploaded in the current time unit is the number of the messages to be processed.
And when the number of the messages to be processed is greater than the uploading threshold, the number of the target messages uploaded in the current time unit is the number of the messages to be processed corresponding to the uploading threshold, and the messages to be processed exceeding the uploading threshold are discarded.
Compared with the prior art that the number of messages sent to the control layer by the data layer is limited by a set fixed threshold, which can cause that the resources of the control layer cannot be fully utilized or the processing amount of the control layer is too large to cause message loss, the sending threshold in the scheme is not a fixed value, but the control layer determines the number of the messages to be sent to the data layer according to the packet loss number of the messages to be processed in the last time unit of the current time unit and the sending number of the messages to be processed in the last time unit, and the actual bearing capacity of the control layer is fully considered to determine the number of the messages to be processed which can be sent to the data layer, so that the problem that the messages are lost due to the waste of the resources of the control layer or the too large processing amount of the. In addition, because the packet loss number corresponding to different types of messages and the number of messages uploaded in a last time unit are different, the uploading thresholds corresponding to different types of messages are also different, so that different uploading thresholds can be set according to different message types, and the scheme can adapt to application scenes of uploading various messages, thereby achieving the purpose of fully utilizing control layer resources and ensuring that services are developed in order and equipment runs stably.
The above-described network device is based on the related description in the embodiment of the message processing method shown in fig. 1, and is mainly described from the data layer of the network device; the following description is mainly given from the control layer of the network device based on the embodiment of the message processing method shown in fig. 1.
An embodiment of the present invention provides a network device, which includes a control layer, and as shown in fig. 5, a control layer 3 of the network device includes: a receiving module 31, a processing module 32 and a sending module 33, wherein:
the receiving module 31 is configured to receive the packet loss number of the to-be-processed packet in the last time unit of the current time unit, where the packet loss number is obtained by the data layer.
The processing module 32 is configured to determine an uploading threshold of the to-be-processed packet in the current time unit according to the packet loss number of the to-be-processed packet and the uploading number of the to-be-processed packet in the previous time unit.
The sending module 33 is configured to send the uploading threshold of the to-be-processed packet in the current time unit to the data layer.
Illustratively, the processing module 32 is specifically configured to:
and substituting the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit into an uploading threshold value calculation formula to obtain the uploading threshold value of the message to be processed in the current time unit.
Wherein, the calculation formula of the upper threshold is as follows:
u (t +1) ═ U (t) + kp e (t) + kd (e) (t) -e (t-1)) + ki (e) (t) + e (t-1)), U (t) is the number of messages to be processed in the last time unit, e (t) is the number of packets to be processed in the last time unit, e (t-1) is the number of packets to be processed in the previous time unit of the last time unit, kp is a proportional controller operator coefficient, kd is a differential controller operator coefficient, and ki is an integral controller operator coefficient.
Compared with the prior art that the number of messages sent to the control layer by the data layer is limited by setting a fixed sending threshold value, which can cause that the resources of the control layer cannot be fully utilized or the processing capacity of the control layer is too large to cause message loss, the sending threshold value in the scheme is not a fixed value, but the control layer determines the number of the messages to be sent to the data layer in an upward mode according to the packet loss number of the messages to be processed in the upward time unit of the current time unit and the sending number of the messages to be processed in the upward time unit, and the actual bearing capacity of the control layer is fully considered to determine the number of the messages to be processed which can be sent to the data layer, so that the problem that the messages are lost due to the waste of the resources of the control layer or the too. In addition, because the packet loss number corresponding to different types of messages and the number of messages uploaded in a last time unit are different, the uploading thresholds corresponding to different types of messages are also different, so that different uploading thresholds can be set according to different message types, and the scheme can adapt to application scenes of uploading various messages, thereby achieving the purpose of fully utilizing control layer resources and ensuring that services are developed in order and equipment runs stably.
In the several embodiments provided in the present application, it should be understood that the disclosed network device and message processing method may be implemented in other manners. For example, the above-described embodiments of the data layer and the control layer in the network device are merely illustrative, for example, the division of the modules is only one logical function division, and there may be other division manners in actual implementation, for example, a plurality of modules or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of the base station or the module through some interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may be physically included alone, or two or more modules may be integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (11)

1. A message processing method is applied to a data layer of a network device, and the method comprises the following steps:
the data layer acquires the packet loss number of the message to be processed in the last time unit of the current time unit according to the message type of the message to be processed, and sends the packet loss number of the message to be processed to the control layer;
the data layer receiving control layer determines an uploading threshold value of the message to be processed in the current time unit according to the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit;
the data layer determines the number of target messages uploaded in the current time unit according to the uploading threshold of the messages to be processed in the current time unit;
the control layer determines, according to the packet loss number of the to-be-processed packet and the upload number of the to-be-processed packet in the last time unit, an upload threshold of the to-be-processed packet in the current time unit specifically includes:
substituting the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit into an uploading threshold value calculation formula to obtain an uploading threshold value of the message to be processed in the current time unit;
wherein, the calculation formula of the upper sending threshold is as follows:
u (t +1) ═ U (t) + kp e (t) + kd (e) (t) -e (t-1)) + ki (e) (t) + e (t-1)), where U (t) is the number of packets to be processed in the last time unit, e (t-1) is the number of packets to be processed in the previous time unit, kp is a proportional controller operator coefficient, kd is a differential controller operator coefficient, and ki is an integral controller operator coefficient.
2. The method according to claim 1, wherein the obtaining, by the data layer, the packet loss number of the to-be-processed packet in the last time unit of the current time unit according to the packet type of the to-be-processed packet specifically includes:
acquiring the message type of a message to be processed;
and reading the packet loss number of the message to be processed in the last time unit of the current time unit in a database according to the message type of the message to be processed.
3. The method according to claim 2, wherein the reading, in the database according to the packet type of the packet to be processed, the packet loss number of the packet to be processed in the last time unit of the current time unit specifically includes:
and acquiring the packet loss number of the message to be processed in the last time unit of the current time unit in a message packet loss number table according to the message type of the message to be processed, wherein the message packet loss number table is a mapping relation table between different types of messages and each time unit and the packet loss number of the message.
4. The method of claim 3, further comprising:
the packet loss number of different types of messages in each time unit is obtained, a message packet loss number table is formed, and the message packet loss number table is stored in a database.
5. The method according to claim 1, wherein the determining, by the data layer, the number of target packets to be sent in the current time unit according to the sending threshold of the packets to be processed in the current time unit specifically includes:
when the number of the messages to be processed is smaller than the uploading threshold, the number of the target messages uploaded in the current time unit is the number of the messages to be processed;
and when the number of the messages to be processed is greater than the uploading threshold, the number of the target messages uploaded in the current time unit is the number of the messages to be processed corresponding to the uploading threshold, and the messages to be processed exceeding the uploading threshold are discarded.
6. A network device comprising a data layer, wherein the data layer comprises:
the acquisition module is used for acquiring the packet loss number of the message to be processed in the last time unit of the current time unit according to the message type of the message to be processed and sending the packet loss number of the message to be processed to the control layer;
a receiving module, configured to receive an uplink threshold of the to-be-processed packet in the current time unit, where the uplink threshold is determined by the control layer according to the packet loss number of the to-be-processed packet and the uplink number of the to-be-processed packet in the previous time unit, and the receiving module specifically includes:
substituting the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit into an uploading threshold value calculation formula to obtain an uploading threshold value of the message to be processed in the current time unit;
wherein, the calculation formula of the upper sending threshold is as follows:
u (t +1) ═ U (t) + kp e (t) + kd (e) (t) -e (t-1)) + ki (e) (t) + e (t-1)), where U (t) is the number of packets to be processed in the last time unit, e (t-1) is the number of packets to be processed in the previous time unit, kp is a proportional controller operator coefficient, kd is a differential controller operator coefficient, and ki is an integral controller operator coefficient;
and the determining module is used for determining the number of the target messages uploaded in the current time unit according to the uploading threshold of the messages to be processed in the current time unit.
7. The network device according to claim 6, wherein the obtaining module, when obtaining the packet loss number of the to-be-processed packet in the last time unit of the current time unit according to the packet type of the to-be-processed packet, is specifically configured to:
acquiring the message type of a message to be processed;
and reading the packet loss number of the message to be processed in the last time unit of the current time unit in a database according to the message type of the message to be processed.
8. The network device according to claim 7, wherein the obtaining module reads, in the database according to the packet type of the packet to be processed, the packet loss number of the packet to be processed in the last time unit of the current time unit, and is specifically configured to:
and acquiring the packet loss number of the message to be processed in the last time unit of the current time unit in a message packet loss number table according to the message type of the message to be processed, wherein the message packet loss number table is a mapping relation table between different types of messages and each time unit and the packet loss number of the message.
9. The network device of claim 8, wherein the data layer further comprises:
the forming module is used for obtaining packet loss numbers of different types of messages in each time unit, forming a message packet loss number table and storing the message packet loss number table into a database.
10. The network device of claim 6, wherein the determining module is specifically configured to:
when the number of the messages to be processed is smaller than the uploading threshold, the number of the target messages uploaded in the current time unit is the number of the messages to be processed;
and when the number of the messages to be processed is greater than the uploading threshold, the number of the target messages uploaded in the current time unit is the number of the messages to be processed corresponding to the uploading threshold, and the messages to be processed exceeding the uploading threshold are discarded.
11. A network device comprising a control layer, wherein the control layer comprises:
the receiving module is used for receiving the packet loss number of the message to be processed in the last time unit of the current time unit, which is acquired by the data layer;
the processing module is used for determining an uploading threshold value of the message to be processed in the current time unit according to the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit;
the sending module is used for sending the uploading threshold value of the message to be processed in the current time unit to a data layer;
the processing module is specifically configured to:
substituting the packet loss number of the message to be processed and the uploading number of the message to be processed in the last time unit into an uploading threshold value calculation formula to obtain an uploading threshold value of the message to be processed in the current time unit;
wherein, the calculation formula of the upper sending threshold is as follows:
u (t +1) ═ U (t) + kp e (t) + kd (e) (t) -e (t-1)) + ki (e) (t) + e (t-1)), where U (t) is the number of packets to be processed in the last time unit, e (t-1) is the number of packets to be processed in the previous time unit, kp is a proportional controller operator coefficient, kd is a differential controller operator coefficient, and ki is an integral controller operator coefficient.
CN201610681329.8A 2016-08-17 2016-08-17 Message processing method and network equipment Active CN106254266B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610681329.8A CN106254266B (en) 2016-08-17 2016-08-17 Message processing method and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610681329.8A CN106254266B (en) 2016-08-17 2016-08-17 Message processing method and network equipment

Publications (2)

Publication Number Publication Date
CN106254266A CN106254266A (en) 2016-12-21
CN106254266B true CN106254266B (en) 2020-02-04

Family

ID=57592233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610681329.8A Active CN106254266B (en) 2016-08-17 2016-08-17 Message processing method and network equipment

Country Status (1)

Country Link
CN (1) CN106254266B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109561029B (en) * 2017-09-26 2023-05-30 中兴通讯股份有限公司 Message uploading control method and device
CN113691536A (en) * 2021-08-25 2021-11-23 北京天融信网络安全技术有限公司 Message processing method and device, electronic equipment and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004021628A2 (en) * 2002-08-29 2004-03-11 Broadcom Corporation System and method for network interfacing
CN1859209A (en) * 2006-04-04 2006-11-08 华为技术有限公司 Safety protecting method for digital user line cut-in multiplexing device
CN1996939A (en) * 2006-12-29 2007-07-11 华为技术有限公司 Method for message access control, forwarding engine and communication device
CN101060531A (en) * 2007-05-17 2007-10-24 华为技术有限公司 A method and device for avoiding the attack of network equipment
CN101355585A (en) * 2008-09-02 2009-01-28 中兴通讯股份有限公司 System and method for protecting information of distributed architecture data communication equipment
CN101478408A (en) * 2008-12-30 2009-07-08 华为技术有限公司 Method, apparatus and system for implementing uploading rate dynamic linkage
CN101699817A (en) * 2009-11-04 2010-04-28 杭州华三通信技术有限公司 Method and device for controlling messages transmitted to CPU

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004021628A2 (en) * 2002-08-29 2004-03-11 Broadcom Corporation System and method for network interfacing
CN1859209A (en) * 2006-04-04 2006-11-08 华为技术有限公司 Safety protecting method for digital user line cut-in multiplexing device
CN1996939A (en) * 2006-12-29 2007-07-11 华为技术有限公司 Method for message access control, forwarding engine and communication device
CN101060531A (en) * 2007-05-17 2007-10-24 华为技术有限公司 A method and device for avoiding the attack of network equipment
CN101355585A (en) * 2008-09-02 2009-01-28 中兴通讯股份有限公司 System and method for protecting information of distributed architecture data communication equipment
CN101478408A (en) * 2008-12-30 2009-07-08 华为技术有限公司 Method, apparatus and system for implementing uploading rate dynamic linkage
CN101699817A (en) * 2009-11-04 2010-04-28 杭州华三通信技术有限公司 Method and device for controlling messages transmitted to CPU

Also Published As

Publication number Publication date
CN106254266A (en) 2016-12-21

Similar Documents

Publication Publication Date Title
CN105580317B (en) Methods, systems, and computer readable media for DIAMETER load and overload information and virtualization
EP3742689A1 (en) Method, apparatus and system for controlling network congestion
US7929436B2 (en) Network communication control methods and systems
US20160301765A1 (en) Method and device for processing service access
EP2608460B1 (en) Method and device for sending messages
CN104937896A (en) Method for processing address resolution protocol message, forwarder and controller
CN108306824B (en) Message sending method and device
CN106254266B (en) Message processing method and network equipment
CN109698797A (en) A kind of TCP jamming control method and device
EP3560152B1 (en) Determining the bandwidth of a communication link
CN114363739B (en) Service application method and device based on optical service unit
CN115208518A (en) Data transmission control method, device and computer readable storage medium
CN108541358A (en) Ethernet passive optical network communication means and device
CN112866390A (en) Data transmission method, device, terminal equipment and storage medium
CN110417875B (en) Method, system, equipment and storage medium for docking between cloud servers
CN111510394A (en) Message scheduling method, related equipment and computer storage medium
EP4262313A1 (en) Method, apparatus and system for scheduling service flow
CN108347579B (en) Bandwidth control method and device
CN114071149B (en) Distributed video transcoding method and related device
CN111224886B (en) Network traffic control method and system
CN109756384B (en) Data source state determination method and device and computer readable storage medium
CN108243112B (en) Chat group network flow control method and device, storage medium and computing equipment
CN101877727B (en) Method for automatically setting CAN network node address and device thereof
CN112039685B (en) Network management method and device, computing network and Internet of things
CN112787952B (en) Service flow adjusting method and device

Legal Events

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