CN116016362B - Flow control method, device, terminal equipment and storage medium - Google Patents

Flow control method, device, terminal equipment and storage medium Download PDF

Info

Publication number
CN116016362B
CN116016362B CN202310310780.9A CN202310310780A CN116016362B CN 116016362 B CN116016362 B CN 116016362B CN 202310310780 A CN202310310780 A CN 202310310780A CN 116016362 B CN116016362 B CN 116016362B
Authority
CN
China
Prior art keywords
message
flow
queue
management
message queue
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
CN202310310780.9A
Other languages
Chinese (zh)
Other versions
CN116016362A (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 6Cloud Technology Co Ltd
Beijing 6Cloud Information Technology Co Ltd
Original Assignee
Beijing 6Cloud Technology Co Ltd
Beijing 6Cloud Information 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 6Cloud Technology Co Ltd, Beijing 6Cloud Information Technology Co Ltd filed Critical Beijing 6Cloud Technology Co Ltd
Priority to CN202310310780.9A priority Critical patent/CN116016362B/en
Publication of CN116016362A publication Critical patent/CN116016362A/en
Application granted granted Critical
Publication of CN116016362B publication Critical patent/CN116016362B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a flow control method, a flow control device, a terminal device and a storage medium, wherein the flow control method comprises the following steps: acquiring a flow message; analyzing the flow message and determining the corresponding message category; according to the message type, correspondingly placing the flow message into a pre-configured message queue, wherein the message queue is configured according to the priority of the message type; and extracting the flow messages from the message queue for processing according to the priority. By improving the priority processing of the in-band management flow, namely determining the message category of the flow message, correspondingly putting the message category into a message queue according to the message category, and further extracting the flow message from the message queue for processing, the technical problem that the flow category cannot be distinguished when the network equipment operates can be solved, and the problem that the network remote management is difficult or invalid due to the fact that the service flow is crowded with the management flow is avoided.

Description

Flow control method, device, terminal equipment and storage medium
Technical Field
The present disclosure relates to the field of network flow control technologies, and in particular, to a flow control method, a flow control device, a terminal device, and a storage medium.
Background
For most network devices, such as network switches, network routers and network firewalls, on the one hand, the network devices are to be operated and maintained remotely via the network, and on the other hand, the network traffic needs to be handled in real time.
However, the bandwidth and CPU resources occupied by the management traffic of the remote operation and maintenance management class are smaller than the network traffic. If the traffic class is not distinguished when the network equipment runs, the traffic is crowded with bandwidth and CPU resources for managing the traffic, so that the remote operation and maintenance management of the network is difficult or invalid, and the network equipment is difficult to connect; or the delay response time delay is very large, the strategy can not be adjusted in time, and serious network faults are caused in extreme cases.
Disclosure of Invention
The main purpose of the present application is to provide a flow control method, a device, a terminal device and a storage medium, which aim to solve the technical problem that when a network device is running, the flow types cannot be distinguished, and avoid the difficulty or failure of network remote management caused by traffic occupation and management of traffic.
In order to achieve the above object, the present application provides a flow control method, including:
acquiring a flow message;
analyzing the flow message and determining a corresponding message category;
correspondingly placing the flow message into a pre-configured message queue according to the message type, wherein the message queue is configured according to the priority of the message type;
and extracting the flow message from the message queue for processing according to the priority.
Optionally, the message class includes a management message and a service message, and the step of analyzing the traffic message and determining the corresponding message class includes:
analyzing the flow message to obtain a destination address;
judging whether the destination address is local or not;
if the destination address is local, the flow message is the management message;
and if the destination address is non-local, the flow message is the service message.
Optionally, the step of analyzing the flow message and determining the corresponding message class includes:
analyzing the flow message to obtain a corresponding feature mark, wherein the feature mark is obtained by presetting a field in the flow message;
if the feature mark is a management mark, the flow message is indicated to be the management message;
and if the feature mark is a service mark, the flow message is the service message.
Optionally, before the step of placing the traffic message in a pre-configured message queue according to the message type, the method further includes:
for the priority, respectively determining a first configuration file of the management message and a second configuration file of the service message;
and performing queue configuration on the first configuration file and the second configuration file to respectively generate a first message queue and a second message queue.
Optionally, the step of placing the traffic message in a pre-configured message queue according to the message class includes:
if the message type is the management message, the management message is put into the first message queue;
and if the message type is the service message, hashing the service message into the second message queue, wherein the other messages comprise one or more than one.
Optionally, the step of extracting the traffic message from the message queue for processing according to the priority includes:
detecting whether the management message exists in the first message queue;
if the management message exists in the first message queue, extracting the management message from the first message queue for processing;
and if the management message does not exist in the first message queue, extracting the service message from the second message queue for processing.
Optionally, the step of obtaining the flow message includes:
and acquiring the flow message through a preset processor.
The embodiment of the application also provides a flow control device, which comprises:
the message acquisition module is used for acquiring a flow message;
the class distinguishing module is used for analyzing the flow messages and determining corresponding message classes;
the message ordering module correspondingly places the flow messages into a pre-configured message queue according to the message types, wherein the message queue is configured according to the priority of the message types;
and the message processing module is used for extracting the flow message from the message queue for processing according to the priority.
The embodiment of the application also provides a terminal device, which comprises a memory, a processor and a flow control program stored on the memory and capable of running on the processor, wherein the flow control program realizes the steps of the flow control method when being executed by the processor.
The embodiments of the present application also provide a computer-readable storage medium having a flow control program stored thereon, which when executed by a processor, implements the steps of the flow control method as described above.
The flow control method, the flow control device, the terminal equipment and the storage medium provided by the embodiment of the application are used for acquiring the flow message; analyzing the flow message and determining a corresponding message category; correspondingly placing the flow message into a pre-configured message queue according to the message type, wherein the message queue is configured according to the priority of the message type; and extracting the flow message from the message queue for processing according to the priority. By improving the priority processing of the in-band management flow, namely determining the message category of the flow message, correspondingly putting the message category into a message queue according to the message category, and further extracting the flow message from the message queue for processing, the technical problem that the flow category cannot be distinguished when the network equipment operates can be solved, and the problem that the network remote management is difficult or invalid due to the fact that the service flow is crowded with the management flow is avoided.
Drawings
FIG. 1 is a schematic diagram of functional modules of a terminal device to which a flow control device of the present application belongs;
FIG. 2 is a flow chart of a first exemplary embodiment of a flow control method of the present application;
FIG. 3 is a block diagram of the physical layer and the link layer of the Ethernet involved in the flow control method of the present application;
FIG. 4 is a flow chart of a second exemplary embodiment of a flow control method of the present application;
FIG. 5 is a flow chart of a third exemplary embodiment of a flow control method of the present application;
fig. 6 is a flow chart of a fourth exemplary embodiment of a flow control method of the present application.
The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The main solutions of the embodiments of the present application are: acquiring a flow message; analyzing the flow message and determining a corresponding message category; correspondingly placing the flow message into a pre-configured message queue according to the message type, wherein the message queue is configured according to the priority of the message type; and extracting the flow message from the message queue for processing according to the priority. By improving the priority processing of the in-band management flow, namely determining the message category of the flow message, correspondingly putting the message category into a message queue according to the message category, and further extracting the flow message from the message queue for processing, the technical problem that the flow category cannot be distinguished when the network equipment operates can be solved, and the problem that the network remote management is difficult or invalid due to the fact that the service flow is crowded with the management flow is avoided.
Technical terms related to embodiments of the present application:
the MAC Address (english: media Access Control Address), which is interpreted as a media access control Address, is also called a local area network Address (LAN Address), a MAC Address, an Ethernet Address (Ethernet Address) or a Physical Address (Physical Address), is an Address for confirming the location of the network device. In the OSI model, the third layer network layer is responsible for IP addresses, and the second layer data link layer is responsible for MAC addresses. The MAC address is used to uniquely identify a network card in the network, and if one or more network cards exist in a device, each network card needs and has a unique MAC address.
A Central Processing Unit (CPU), which is one of the main devices of an electronic computer, is a core component in the computer. Its function is mainly to interpret computer instructions and process data in computer software. The CPU is a core component in the computer responsible for reading instructions, decoding the instructions and executing the instructions. The CPU mainly comprises two parts, namely a controller and an arithmetic unit, and also comprises a cache memory and a bus for realizing data and control of the connection between the cache memory and the cache memory. The three main core components of the electronic computer are CPU, internal memory and input/output device. The central processing unit mainly processes instructions, performs operations, controls time, and processes data. In the computer architecture, a CPU is a core hardware unit that performs control allocation and general-purpose operations on all hardware resources (such as a memory and an input/output unit) of a computer. The CPU is the operation and control core of the computer. The operation of all software layers in the computer system will ultimately be mapped by the instruction set into the operation of the CPU.
The embodiment of the application considers that the occupied bandwidth and CPU resource of the management traffic of the remote operation and maintenance management class are smaller than those of the network traffic. If the network equipment runs, traffic categories are not distinguished, so that the traffic is crowded with bandwidth and CPU resources for managing the traffic, and the network remote operation and maintenance management is difficult or invalid, and the network equipment is difficult to connect; or the delay response time delay is very large, the strategy can not be adjusted in time, and serious network faults are caused in extreme cases.
Therefore, the embodiment of the application designs an in-band management method for preferentially processing the management flow from the practical problem that the traffic class cannot be distinguished when the network equipment operates, solves the technical problem that the traffic class cannot be distinguished when the network equipment operates, and avoids the problem that the network remote management is difficult or invalid due to the fact that the traffic is crowded with the management flow.
Specifically, referring to fig. 1, fig. 1 is a schematic functional block diagram of a terminal device to which a flow control device of the present application belongs. The flow control device may be a device independent of the terminal device capable of flow control, which may be carried on the terminal device in the form of hardware or software. The terminal equipment can be an intelligent mobile terminal with a data processing function such as a mobile phone and a tablet personal computer, and can also be a fixed terminal equipment or a server with a data processing function.
In this embodiment, the terminal device to which the flow control device belongs at least includes an output module 110, a processor 120, a memory 130, and a communication module 140.
The memory 130 stores an operating system and a flow control program, and the flow control device may acquire a flow message; analyzing the flow message, and determining the corresponding message category; according to the message type, correspondingly placing the flow message into a pre-configured message queue, wherein the message queue is configured according to the priority of the message type; extracting the flow message from the message queue for processing and other information is stored in the memory 130 according to the priority; the output module 110 may be a display screen or the like. The communication module 140 may include a WIFI module, a mobile communication module, a bluetooth module, and the like, and communicates with an external device or a server through the communication module 140.
Wherein the flow control program in the memory 130 when executed by the processor performs the steps of:
acquiring a flow message;
analyzing the flow message and determining a corresponding message category;
correspondingly placing the flow message into a pre-configured message queue according to the message type, wherein the message queue is configured according to the priority of the message type;
and extracting the flow message from the message queue for processing according to the priority.
Further, the flow control program in the memory 130 when executed by the processor also performs the steps of:
analyzing the flow message to obtain a destination address;
judging whether the destination address is local or not;
if the destination address is local, the flow message is the management message;
and if the destination address is non-local, the flow message is the service message.
Further, the flow control program in the memory 130 when executed by the processor also performs the steps of:
analyzing the flow message to obtain a corresponding feature mark, wherein the feature mark is obtained by presetting a field in the flow message;
if the feature mark is a management mark, the flow message is indicated to be the management message;
and if the feature mark is a service mark, the flow message is the service message.
Further, the flow control program in the memory 130 when executed by the processor also performs the steps of:
for the priority, respectively determining a first configuration file of the management message and a second configuration file of the service message;
and performing queue configuration on the first configuration file and the second configuration file to respectively generate a first message queue and a second message queue.
Further, the flow control program in the memory 130 when executed by the processor also performs the steps of:
if the message type is the management message, the management message is put into the first message queue;
and if the message type is the service message, hashing the service message into the second message queue, wherein the other messages comprise one or more than one.
Further, the flow control program in the memory 130 when executed by the processor also performs the steps of:
detecting whether the management message exists in the first message queue;
if the management message exists in the first message queue, extracting the management message from the first message queue for processing;
and if the management message does not exist in the first message queue, extracting the service message from the second message queue for processing.
Further, the flow control program in the memory 130 when executed by the processor also performs the steps of:
and acquiring the flow message through a preset processor.
According to the scheme, the flow message is acquired; analyzing the flow message and determining a corresponding message category; correspondingly placing the flow message into a pre-configured message queue according to the message type, wherein the message queue is configured according to the priority of the message type; and extracting the flow message from the message queue for processing according to the priority. By improving the priority processing of the in-band management flow, namely determining the message category of the flow message, correspondingly putting the message category into a message queue according to the message category, and further extracting the flow message from the message queue for processing, the technical problem that the flow category cannot be distinguished when the network equipment operates can be solved, and the problem that the network remote management is difficult or invalid due to the fact that the service flow is crowded with the management flow is avoided.
Based on the above terminal device architecture, but not limited to the above architecture, the method embodiments of the present application are presented.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first exemplary embodiment of a flow control method according to the present application. The flow control method comprises the following steps:
step S210, obtaining a flow message;
the execution body of the method of the embodiment may be a flow control device, or may be a flow control terminal device or a server, and the flow control device is exemplified by the flow control device, and the flow control device may be integrated on a terminal device such as a smart phone, a tablet computer, and the like with a data processing function.
The scheme of the embodiment mainly realizes the control of the traffic, especially the traffic of different types, and avoids the difficulty or failure of network remote management caused by the occupation of the traffic flow to the traffic.
The embodiment starts from the practical problem that the traffic categories cannot be distinguished when the network equipment operates, designs an in-band management method for preferentially processing the management traffic, solves the technical problem that the traffic categories cannot be distinguished when the network equipment operates, and avoids the problem that the traffic is crowded to the management traffic to cause the network remote management difficulty or failure.
Further, step S210, obtaining the traffic message includes: and acquiring the flow message through a preset processor.
Specifically, when the network device operates, such as a network switch, a network router, a network firewall, and since traffic from a hardware address (MAC address) of the network device to a processor cannot distinguish between management traffic and traffic, traffic is crowded with the management traffic, in order to increase the priority of the management traffic, in this embodiment, at least two processors are provided. The number 0 processor is used for receiving the traffic message, and placing the traffic message into a corresponding message queue according to the class of the traffic message, and the other processors except the number 0 processor are used for extracting the traffic message from the message queue for processing.
Step S220, analyzing the flow message and determining the corresponding message category;
specifically, the number 0 processor for receiving the traffic message analyzes the message category of the traffic message, and puts the traffic message into the corresponding message queue according to the category of the traffic message, so that the traffic and the service traffic can be distinguished and managed.
The method comprises the steps of obtaining a destination address by analyzing a flow message as an implementation scheme, and determining a message category according to the destination address; as another implementation scheme, the corresponding feature labels are obtained by analyzing the flow messages, and the determined message types are obtained according to the feature labels.
Step S230, according to the message category, the flow message is correspondingly put into a pre-configured message queue, and the message queue is configured according to the priority of the message category;
specifically, a separate processor such as a number 0 processor is used to parse the traffic message, and if the traffic message is a management message, a separate first message queue is placed; if the service message is the service message, the service message is discretized and put into a plurality of second message queues except the first message queue.
The first message queue is used for storing management messages; the second message queue is used for storing service messages, and the second message queue comprises one or more than one.
Step S240, extracting the flow message from the message queue for processing according to the priority.
Specifically, the processor except the number 0 preferentially extracts the corresponding message from the first message queue for processing, so that the efficiency of forwarding the traffic message can be improved.
In this embodiment, the structure of the physical layer and the link layer of the ethernet is used to control the flow packet, referring to fig. 3, fig. 3 is a structural diagram of the physical layer and the link layer of the ethernet related to the flow control method of the present application, where the structure of the physical layer and the link layer of the ethernet includes: central processing unit, MAC address, physical layer. Further, the processor Core 0 receives and analyzes the flow message sent by the processor interface to obtain a corresponding message class, and the message class is put into a corresponding queue according to the message class, so that the processor Core 1 to the processor Core m preferentially extract the management message from the queue 0 for processing, and then extract the service message from other queues for processing.
In addition, in the embodiment of the application, the TSN may implement priority-based flow control at the link layer.
According to the scheme, the flow message is acquired; analyzing the flow message and determining a corresponding message category; correspondingly placing the flow message into a pre-configured message queue according to the message type, wherein the message queue is configured according to the priority of the message type; and extracting the flow message from the message queue for processing according to the priority. By improving the priority processing of the in-band management flow, namely determining the message category of the flow message, correspondingly putting the message category into a message queue according to the message category, and further extracting the flow message from the message queue for processing, the technical problem that the flow category cannot be distinguished when the network equipment operates can be solved, and the problem that the network remote management is difficult or invalid due to the fact that the service flow is crowded with the management flow is avoided.
Referring to fig. 4, fig. 4 is a schematic flow chart of a second exemplary embodiment of the flow control method of the present application. Based on the embodiment shown in fig. 2, the message types include a management message and a service message, and step S220 includes analyzing the traffic message to determine a corresponding message type, including:
step S410, analyzing the flow message to obtain a destination address;
step S420, judging whether the destination address is local;
step S430, if the destination address is local, the flow message is the management message;
step S440, if the destination address is non-local, the flow message is the service message.
Specifically, the destination address is used for distinguishing the management message and the service message by the processor. For example, according to the distinguishing feature between the management message and the service message, for example, the destination address belongs to the distinguishing feature, the destination address in the flow message is analyzed by the processor, and if the destination address is a local address, the flow message is determined to belong to the management message; if the destination address is a non-local address, determining that the flow message belongs to the service message.
According to the scheme, the destination address is obtained by analyzing the flow message; judging whether the destination address is local or not; if the destination address is local, the flow message is the management message; and if the destination address is non-local, the flow message is the service message. By obtaining the destination address of the flow message and analyzing whether the destination address is local or not, the method can distinguish the types of the flow message, can solve the technical problem that the types of the flow cannot be distinguished when the network equipment operates, and avoid the difficulty or failure of remote network management caused by the fact that the traffic is crowded with the management traffic.
Referring to fig. 5, fig. 5 is a schematic flow chart of a third exemplary embodiment of a flow control method of the present application. Based on the embodiment shown in fig. 2, step S220 of parsing the flow message to determine a corresponding message class includes:
step S510, analyzing the flow message to obtain a corresponding feature mark, wherein the feature mark is obtained by presetting a field in the flow message;
step S520, if the feature tag is a management tag, the flow message is indicated as the management message;
step S530, if the feature tag is a service tag, the traffic message is indicated as the service message.
It should be noted that, the embodiment of the present application and the above third exemplary embodiment may be combined into one solution.
Specifically, the feature tag is obtained by presetting a field in the flow message and is used for distinguishing the management message and the service message by the processor. For example, according to the distinguishing feature between the management message and the service message, for example, the protocol field belongs to the distinguishing feature, the feature mark is obtained by setting the protocol field in the flow message, so that different flow messages have corresponding feature marks.
According to the scheme, the corresponding feature marks are obtained by analyzing the flow message, wherein the feature marks are obtained by presetting fields in the flow message; if the feature mark is a management mark, the flow message is indicated to be the management message; and if the feature mark is a service mark, the flow message is the service message. By detecting the characteristic marks in the flow messages to distinguish the types of the flow messages, the technical problem that the types of the flow cannot be distinguished when the network equipment operates can be solved, and the problem that the network remote management is difficult or invalid due to the fact that the service flow is crowded to the management flow is avoided.
Referring to fig. 6, fig. 6 is a schematic flow chart of a fourth exemplary embodiment of a flow control method of the present application. Based on the embodiment shown in fig. 2, step S230, according to the packet type, puts the traffic packet into a pre-configured packet queue correspondingly, which includes:
step S610, if the message category is the management message, the management message is put into the first message queue;
step S620, if the message type is the service message, hash the service message to the second message queue, where the second message queue includes one or more than one message.
Specifically, the first message queue is used for storing management messages; the second message queue is used for storing service messages. If the management message is the management message, a single message queue is put, other service flows are hashed to other queues based on an algorithm, so that other processors can take the message from the queues preferentially for processing, and further the management flow is processed preferentially, and even if the service flow is large, the management flow can be processed timely.
In addition, by setting one or more second message queues, when the service flow is large, the service message can be hashed into each second message queue through a hash algorithm, including but not limited to a division hash method, a square hash method (square taking method), a Fibonacci hash method and a random number method, so that the technical problem that the remote network equipment is difficult to connect in the service peak period when the service flow is large is avoided, and the efficiency of flow control is improved.
Further, step S230, before correspondingly placing the flow message into a pre-configured message queue according to the message type, further includes:
for the priority, respectively determining a first configuration file of the management message and a second configuration file of the service message;
and performing queue configuration on the first configuration file and the second configuration file to respectively generate a first message queue and a second message queue.
Specifically, when the network device is running, some message queues are needed to control the priority processing of the streaming messages. The specific steps for generating the message queue may be as follows:
and respectively determining a first configuration file of the management message and a second configuration file of the service message. The first configuration file comprises 2 parameters, namely the priority level of the first message queue and the overflow processing value of the first message queue; the second configuration file comprises 2 parameters, namely the priority level of the second message queue and the overflow processing value of the second message queue.
The method comprises the steps that the occupied bandwidth and CPU resources of management traffic are smaller than network traffic, so that the priority of a first message queue is set to be higher than that of a second message queue; the number of the second message queues is set to be larger than the priority of the first message queues.
In detail, taking management messages as an example, 2 parameters in the first configuration file may define a created first message queue, for example, a container of the first message queue may process a new configuration received based on a queue overflow processing value.
In this embodiment, the first message queue and the second message queue are created respectively, so that synchronous logic in the program can be decoupled, and the flow messages can be processed asynchronously in sequence, thereby not only ensuring the sequency of the program logic, but also decoupling the interdependence among the logics, optimizing the user experience, and reducing the occupation degree of hardware resources and network resources.
Further, step S240, according to the priority, extracts the traffic message from the message queue for processing, including:
step S630, detecting whether the management message exists in the first message queue;
specifically, when the traffic message needs to be processed, the processor preferentially detects whether the management message exists in the first message queue, that is, preferentially processes the management message, and further preferentially processes the management traffic, so that the management traffic can be processed in time under the condition of large traffic flow.
Step S640, if the management message exists in the first message queue, extracting the management message from the first message queue for processing;
step S650, if the management message does not exist in the first message queue, the service message is extracted from the second message queue for processing.
Specifically, after the processor detects whether the management message exists in the first message queue or not, or after the processor finishes processing the management message, whether the service message exists in the second message queue is further detected, and if the service message exists in the second message queue, the manager extracts the service message from the second message queue for processing.
According to the scheme, the management message is put into the first message queue if the message type is the management message; if the message class is the service message, hashing the service message into the second message queue, wherein the other messages comprise one or more than one message; detecting whether the management message exists in the first message queue; if the management message exists in the first message queue, extracting the management message from the first message queue for processing; and if the management message does not exist in the first message queue, extracting the service message from the second message queue for processing. By preferentially extracting from the first message queue storing the management messages, the priority processing of the management traffic can be improved.
In addition, an embodiment of the present application further provides a flow control device, where the flow control device includes:
the message acquisition module is used for acquiring a flow message;
the class distinguishing module is used for analyzing the flow messages and determining corresponding message classes;
the message ordering module correspondingly places the flow messages into a pre-configured message queue according to the message types, wherein the message queue is configured according to the priority of the message types;
and the message processing module is used for extracting the flow message from the message queue for processing according to the priority.
The principle and implementation process of the flow control in this embodiment are referred to the above embodiments, and are not described herein.
In addition, the embodiment of the application also provides a terminal device, which comprises a memory, a processor and a flow control program stored on the memory and capable of running on the processor, wherein the flow control program realizes the steps of the flow control method when being executed by the processor.
Because the flow control program is executed by the processor and adopts all the technical schemes of all the embodiments, the flow control program at least has all the beneficial effects brought by all the technical schemes of all the embodiments and is not described in detail herein.
In addition, the embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a flow control program, and the flow control program realizes the steps of the flow control method when being executed by a processor.
Because the flow control program is executed by the processor and adopts all the technical schemes of all the embodiments, the flow control program at least has all the beneficial effects brought by all the technical schemes of all the embodiments and is not described in detail herein.
Compared with the prior art, the flow control method, the flow control device, the terminal equipment and the storage medium provided by the embodiment of the application are used for acquiring the flow message; analyzing the flow message and determining a corresponding message category; correspondingly placing the flow message into a pre-configured message queue according to the message type, wherein the message queue is configured according to the priority of the message type; and extracting the flow message from the message queue for processing according to the priority. By improving the priority processing of the in-band management flow, namely determining the message category of the flow message, correspondingly putting the message category into a message queue according to the message category, and further extracting the flow message from the message queue for processing, the technical problem that the flow category cannot be distinguished when the network equipment operates can be solved, and the problem that the network remote management is difficult or invalid due to the fact that the service flow is crowded with the management flow is avoided.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as above, including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to perform the method of each embodiment of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims of the present application.

Claims (7)

1. A flow control method, wherein the flow control method is applied to a central processing unit, the central processing unit comprises a plurality of processor cores, and the flow control method comprises the following steps:
acquiring a flow message through a target processor core;
analyzing the flow message, and determining a corresponding message category, wherein the message category comprises a management message and a service message;
correspondingly placing the flow message into a pre-configured message queue according to the message type, wherein the message queue is configured according to the priority of the message type, and comprises a first message queue and a plurality of second message queues;
the step of correspondingly placing the flow message into a pre-configured message queue according to the message category comprises the following steps:
if the message type is the management message, the management message is put into the first message queue;
if the message class is the service message, hashing the service message into the second message queue;
extracting the flow message from the message queue for processing according to the priority by other processor cores except the target processor core;
wherein, the step of extracting the flow message from the message queue for processing according to the priority comprises the following steps:
detecting whether the management message exists in the first message queue;
if the management message exists in the first message queue, extracting the management message from the first message queue for processing;
and if the management message does not exist in the first message queue, extracting the service message from the second message queue for processing.
2. The flow control method of claim 1, wherein the step of parsing the flow message to determine a corresponding message class comprises:
analyzing the flow message to obtain a destination address;
judging whether the destination address is local or not;
if the destination address is local, the flow message is the management message;
and if the destination address is non-local, the flow message is the service message.
3. The flow control method of claim 2, wherein the step of parsing the flow message to determine a corresponding message class comprises:
analyzing the flow message to obtain a corresponding feature mark, wherein the feature mark is obtained by presetting a field in the flow message;
if the feature mark is a management mark, the flow message is indicated to be the management message;
and if the feature mark is a service mark, the flow message is the service message.
4. A method according to any one of claims 2-3, wherein before the step of placing the traffic message in a pre-configured message queue according to the message class, the method further comprises:
for the priority, respectively determining a first configuration file of the management message and a second configuration file of the service message;
and performing queue configuration on the first configuration file and the second configuration file to respectively generate the first message queue and the second message queue.
5. A flow control device for use with a central processor, the central processor including a plurality of processor cores, the flow control device comprising:
the message acquisition module is used for acquiring a flow message through a target processor core;
the class distinguishing module is used for analyzing the flow messages and determining corresponding message classes, wherein the message classes comprise management messages and service messages;
the message ordering module correspondingly places the flow message into a pre-configured message queue according to the message type, wherein the message queue is configured according to the priority of the message type and comprises a first message queue and a plurality of second message queues;
the step of correspondingly placing the flow message into a pre-configured message queue according to the message category comprises the following steps:
if the message type is the management message, the management message is put into the first message queue;
if the message class is the service message, hashing the service message into the second message queue;
the message processing module is used for extracting the flow message from the message queue for processing according to the priority through other processor cores except the target processor core;
wherein, the step of extracting the flow message from the message queue for processing according to the priority comprises the following steps:
detecting whether the management message exists in the first message queue;
if the management message exists in the first message queue, extracting the management message from the first message queue for processing;
and if the management message does not exist in the first message queue, extracting the service message from the second message queue for processing.
6. A terminal device comprising a memory, a processor and a flow control program stored on the memory and operable on the processor, which when executed by the processor, implements the steps of the flow control method of any of claims 1-4.
7. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a flow control program, which when executed by a processor, implements the steps of the flow control method according to any of claims 1-4.
CN202310310780.9A 2023-03-28 2023-03-28 Flow control method, device, terminal equipment and storage medium Active CN116016362B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310310780.9A CN116016362B (en) 2023-03-28 2023-03-28 Flow control method, device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310310780.9A CN116016362B (en) 2023-03-28 2023-03-28 Flow control method, device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116016362A CN116016362A (en) 2023-04-25
CN116016362B true CN116016362B (en) 2023-07-07

Family

ID=86035826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310310780.9A Active CN116016362B (en) 2023-03-28 2023-03-28 Flow control method, device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116016362B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106385378A (en) * 2016-08-31 2017-02-08 北京神州绿盟信息安全科技股份有限公司 Processing method and device for controlling message in in-band management control
WO2017054566A1 (en) * 2015-09-28 2017-04-06 中兴通讯股份有限公司 Method of preventing cpu packet congestion and device utilizing same

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125167A (en) * 2014-07-24 2014-10-29 海信集团有限公司 Flow control method and device
CN106411780A (en) * 2016-11-10 2017-02-15 杭州迪普科技有限公司 Message control method and device
CN114430591A (en) * 2020-10-14 2022-05-03 华为技术有限公司 Wi-Fi chip, Wi-Fi equipment and queue scheduling method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017054566A1 (en) * 2015-09-28 2017-04-06 中兴通讯股份有限公司 Method of preventing cpu packet congestion and device utilizing same
CN106385378A (en) * 2016-08-31 2017-02-08 北京神州绿盟信息安全科技股份有限公司 Processing method and device for controlling message in in-band management control

Also Published As

Publication number Publication date
CN116016362A (en) 2023-04-25

Similar Documents

Publication Publication Date Title
EP3048764B1 (en) Method and system for implementing 802.1p-supporting openvswitch switch
CN111580995A (en) Synchronous communication method and system of distributed cloud platform and Internet of things intelligent terminal based on MQTT asynchronous communication scene
WO2014000317A1 (en) Configuration information auto-management method based on intelligent substation
KR20130093732A (en) Flow-based packet transport device and packet management method thereof
CN104639385B (en) Detect the method and apparatus of L2VPN network user's side interface connectivity
CN112015544A (en) Load balancing method, device and equipment of k8s cluster and storage medium
CN107769992B (en) Message parsing and shunting method and device
EP4095768A1 (en) Application recognition model updating method and apparatus, and storage medium
JP2018537777A (en) Internet of things information system
CN112583797A (en) Multi-protocol data processing method, device, equipment and computer readable storage medium
WO2015055102A1 (en) Method and device for invoking network function
CN115484047A (en) Method, device, equipment and storage medium for identifying flooding attack in cloud platform
CN103188171A (en) Message scheduling method and equipment
CN106412296B (en) Terminal equipment control method and device
CN106209680B (en) Information processing apparatus and information processing method
CN116016362B (en) Flow control method, device, terminal equipment and storage medium
CN107508827B (en) Message parsing method and device
CN111930482A (en) Task processing method, device and equipment based on node cluster and storage medium
CN106330768B (en) A kind of application and identification method based on cloud computing
CN116684274A (en) Cloud security service function chain automatic arrangement system and method based on SDN
US20220272166A1 (en) Method, Apparatus, and System for Implementing Service Function Deployment
CN113612667B (en) Bare metal detection method, system and related components
CN112448924A (en) Message processing method, system and switching equipment compatible with multiple protocols
CN106533882B (en) Message processing method and device
US11870703B2 (en) Method for configuring and managing TSN network and system applying the method

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