CN115460152A - Multicast message control method, system, storage medium and electronic device - Google Patents

Multicast message control method, system, storage medium and electronic device Download PDF

Info

Publication number
CN115460152A
CN115460152A CN202210427480.4A CN202210427480A CN115460152A CN 115460152 A CN115460152 A CN 115460152A CN 202210427480 A CN202210427480 A CN 202210427480A CN 115460152 A CN115460152 A CN 115460152A
Authority
CN
China
Prior art keywords
multicast message
message
multicast
transmitted
line card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210427480.4A
Other languages
Chinese (zh)
Inventor
覃庆海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuanxin Semiconductor Nanjing Co ltd
Original Assignee
Zhuanxin Semiconductor Nanjing 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 Zhuanxin Semiconductor Nanjing Co ltd filed Critical Zhuanxin Semiconductor Nanjing Co ltd
Priority to CN202210427480.4A priority Critical patent/CN115460152A/en
Publication of CN115460152A publication Critical patent/CN115460152A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/15Flow control; Congestion control in relation to multipoint traffic
    • 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/12Avoiding congestion; Recovering from congestion
    • 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/215Flow control; Congestion control using token-bucket

Landscapes

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

Abstract

The application discloses a multicast message control method, a system, a storage medium and an electronic device, wherein the method comprises the following steps: acquiring the priority of each multicast message in the multicast message queue, and determining the multicast message to be transmitted based on the high-low sequence of the priority; counting the current token number in a token bucket associated with a business line card outlet end corresponding to a multicast message to be transmitted; and controlling the multicast message to be transmitted to be forwarded to the corresponding business line card outlet end according to the number of the current tokens. According to the method and the device, the flow bandwidth management of the outlet end is carried out on the forwarding of the multicast message through the token bucket algorithm, so that the network congestion of the switching matrix in the direction of the outlet end does not occur, and the message loss rate is reduced.

Description

Multicast message control method, system, storage medium and electronic device
Technical Field
The present application relates to the field of network communication technologies, and in particular, to a multicast message control method, system, storage medium, and electronic device.
Background
With the development of communication technology, multicast technology has been widely used, which is a technology for performing network communication between a single sending end and multiple receiving ends, and implements point-to-multipoint network connection between the sending end and each receiving end, wherein multicast packet forwarding is an important component in multicast technology.
In the existing multicast message forwarding scheme, a Slow path and a Fast path are generally adopted. Slow path: and finishing the copying of the multicast message through software. The Ingress service line card sends the multicast message to the main engine, and the CPU of the main engine copies the multicast message based on software and then forwards the multicast message to each service line card through the switching matrix. Fast path: and finishing the multicast message copying through hardware. After entering the switching matrix, the multicast message enters the queue of the service line card, the switching matrix chip copies the message, reaches the queue at the outlet end of the service line card according to the destination address, queues together with the unicast message, and reaches different service line cards through the switching matrix after being scheduled. Because the switching matrix is based on the multicast replication of hardware, the multicast table entries generated by the switching matrix replicate the multicast messages to the outlet ends of a plurality of service line cards according to the multicast destination addresses, but the multicast replication has no flow management at the moment, if the multicast messages entering the switching matrix are not controlled, congestion packet loss inside the switching matrix can be caused, and then congestion packet loss of unicast messages is caused correspondingly.
Disclosure of Invention
The embodiment of the application provides a multicast message control method, a multicast message control system, a storage medium and electronic equipment. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
In a first aspect, an embodiment of the present application provides a multicast message control method, where the method includes:
acquiring the priority of each multicast message in the multicast message queue, and determining the multicast messages to be transmitted based on the high-low order of the priority;
counting the current token number in a token bucket associated with a business line card outlet end corresponding to a multicast message to be transmitted;
and controlling the multicast message to be transmitted to be forwarded to the corresponding business line card outlet end according to the current token number.
Optionally, before acquiring the priority of each multicast packet in the multicast packet queue, the method further includes:
when message data are received, analyzing the message type of the message data;
and caching the message data according to the message type.
Optionally, caching the message data according to the message type, including:
when the message type is a unicast message, caching message data into a unicast message queue;
alternatively, the first and second electrodes may be,
and when the message type is a multicast message, caching the message data to a multicast message queue.
Optionally, the obtaining the priority of each multicast packet in the multicast packet queue includes:
acquiring the caching time of each multicast message in the multicast message queue;
determining the priority of each multicast message according to the duration of the caching time and the current time;
alternatively, the first and second electrodes may be,
acquiring a cache ID of each multicast message in a multicast message queue;
and determining the priority of each multicast message according to the size of the cache ID.
Optionally, the counting the current token number in the token bucket associated with the service line card outlet corresponding to the multicast packet to be transmitted includes:
analyzing the multicast message to be transmitted, and extracting the information of the outlet end of the service line card from the analyzed message;
determining a token bucket associated with the outlet end of the service line card according to the outlet end information of the service line card;
the current number of tokens in the token bucket is counted.
Optionally, controlling, according to the number of current tokens, the multicast packet to be transmitted to be forwarded to the service line card outlet end corresponding to the multicast packet, including:
if the number of the current tokens meets the forwarding condition of the multicast message to be transmitted, forwarding the multicast message to be transmitted to the corresponding business line card outlet end;
alternatively, the first and second electrodes may be,
if the number of the current tokens does not meet the forwarding condition of the multicast message to be transmitted, starting a timer to count down the preset time interval; in the countdown process of the timer, if the number of the current tokens meets the forwarding condition of the multicast message to be transmitted, forwarding the multicast message to be transmitted to the corresponding business line card outlet end; or when the countdown of the timer is finished, if the number of the current tokens does not meet the forwarding condition of the multicast message to be transmitted, discarding the multicast message to be transmitted.
Optionally, the method further comprises:
counting the byte size of the multicast message in the multicast message queue;
calculating the bandwidth occupied by the multicast message according to the byte size;
and updating the token quantity in the token bucket according to the bandwidth occupied by the multicast message.
In a second aspect, an embodiment of the present application provides a multicast message control system, including:
the multicast message to be transmitted determining module is used for acquiring the priority of each multicast message in the multicast message queue and determining the multicast message to be transmitted based on the high-low order of the priority;
the current token number counting module is used for counting the current token number in a token bucket associated on a business line card outlet end corresponding to the multicast message to be transmitted;
and the multicast message forwarding module is used for controlling the multicast message to be transmitted to be forwarded to the corresponding business line card outlet end according to the number of the current tokens.
In a third aspect, embodiments of the present application provide a computer storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in the embodiment of the application, a hardware chip first obtains the priority of each multicast packet in a multicast packet queue, determines the multicast packet to be transmitted based on the high-low order of the priorities, then counts the current number of tokens in a token bucket associated with an outlet end of a service line card corresponding to the multicast packet to be transmitted, and finally controls the multicast packet to be transmitted to the outlet end of the service line card corresponding to the multicast packet to be transmitted according to the current number of tokens. According to the method and the device, the flow bandwidth management of the outlet end is carried out on the forwarding of the multicast message through the token bucket algorithm, so that the network congestion of the switching matrix in the direction of the outlet end does not occur, and the message loss rate is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flowchart of a multicast message control method according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a multicast message control process provided herein;
fig. 3 is a schematic structural diagram of a multicast message control system provided in the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 5 is a schematic diagram of a program product provided in an embodiment of the present application.
Detailed Description
The following description and the annexed drawings set forth in detail certain illustrative embodiments of the application so as to enable those skilled in the art to practice them.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of systems and methods consistent with certain aspects of the application, as detailed in the claims that follow.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The application provides a multicast message control method, a multicast message control system, a storage medium and electronic equipment, which are used for solving the problems in the related technical problems. In the technical solution provided by the present application, since the flow bandwidth management of the egress port is performed on the forwarding of the multicast packet through the token bucket algorithm, the switching matrix does not generate network congestion in the direction of the egress port, thereby reducing the packet loss rate, which is described in detail below with an exemplary embodiment.
The multicast packet control method provided in the embodiment of the present application will be described in detail below with reference to fig. 1 to fig. 2. The method may be implemented in dependence on a computer program operable on a multicast message control system based on the von neumann architecture. The computer program may be integrated into the application or may run as a separate tool-like application.
Referring to fig. 1, a flowchart of a multicast message control method is provided in an embodiment of the present application.
As shown in fig. 1, the method of the embodiment of the present application may include the following steps:
s101, acquiring the priority of each multicast message in a multicast message queue, and determining the multicast message to be transmitted based on the high-low order of the priority;
generally, the multicast message control flow in the present application is applied to a hardware chip, and the hardware chip may be an FPGA chip. The service line is clamped on the hardware chip.
In the embodiment of the present application, before acquiring the priority of each multicast packet in the multicast packet queue, the received packet data needs to be cached, and first, when the packet data is received, the packet type of the packet data is analyzed, and then, the packet data is cached according to the packet type.
Specifically, when caching message data according to a message type, caching the message data to a unicast message queue when the message type is a unicast message; or when the message type is a multicast message, caching the message data to a multicast message queue.
In a possible implementation manner, when a hardware chip receives a message, the hardware chip firstly analyzes the message, and then caches the message to a target queue according to analyzed data.
In the embodiment of the application, when the priority of each multicast message in the multicast message queue is obtained, the cache time of each multicast message in the multicast message queue is firstly obtained, and then the priority of each multicast message is determined according to the cache time and the duration of the current time.
Further, after the priority is determined, the multicast message to be transmitted can be determined according to the high-low order of the priority.
For example, the caching time of the multicast packet 1 is 16 at 19 days 11 at 4 months in 2022, and the caching time of the multicast packet 2 is 16 at 11 days 11 at 4 months at 2022, then the priority of the multicast packet 1 is greater than the priority of the multicast packet 2, and at this time, the multicast packet 1 is determined to be a multicast packet to be transmitted.
In the embodiment of the present application, when the priority of each multicast packet in the multicast packet queue is obtained, the cache ID of each multicast packet in the multicast packet queue is obtained first, and then the priority of each multicast packet is determined according to the size of the cache ID.
Further, after the priority is determined, the multicast message to be transmitted can be determined according to the high-low order of the priority.
For example, if the cache ID of the multicast packet 1 is 2 and the cache ID of the multicast packet 2 is 1, the priority of the multicast packet 2 is greater than the priority of the multicast packet 1, and at this time, the multicast packet 2 is determined as a multicast packet to be transmitted.
Further, the multicast packet queue may also be a queue configured according to a first-in first-out rule, for example, the principle of FIFO.
S102, counting the current token quantity in a token bucket associated with a business line card outlet end corresponding to a multicast message to be transmitted;
the token bucket is created according to a token bucket algorithm, and is one of the most commonly used algorithms in network Traffic Shaping (Traffic Shaping) and Rate Limiting (Rate Limiting).
In the embodiment of the application, when counting the current token number in the token bucket associated with the service line card outlet end corresponding to the multicast message to be transmitted, the hardware chip firstly analyzes the multicast message to be transmitted, extracts the outlet end information of the service line card from the analyzed message, then determines the token bucket associated with the outlet end of the service line card according to the outlet end information of the service line card, and finally counts the current token number in the token bucket.
And S103, controlling the multicast message to be transmitted to the corresponding business line card outlet end according to the current token number.
In a possible implementation manner, when the multicast packet to be transmitted is controlled to be forwarded to the service line card outlet end corresponding to the current token number according to the current token number, if the current token number meets the multicast packet forwarding condition to be transmitted, the multicast packet to be transmitted is forwarded to the service line card outlet end corresponding to the current token number.
In another possible implementation manner, when the multicast packet to be transmitted is controlled to be forwarded to the service line card outlet end corresponding to the current token number according to the current token number, if the current token number does not meet the multicast packet to be transmitted forwarding condition, a timer is started to count down the preset time interval; in the countdown process of the timer, if the number of the current tokens meets the forwarding condition of the multicast message to be transmitted, forwarding the multicast message to be transmitted to the corresponding business line card outlet end; or when the countdown of the timer is finished, if the number of the current tokens does not meet the forwarding condition of the multicast message to be transmitted, discarding the multicast message to be transmitted.
Furthermore, the hardware chip also needs to update the number of tokens in the token bucket, and first counts the byte size of the multicast message in the multicast message queue, then calculates the bandwidth occupied by the multicast message according to the byte size, and finally updates the number of tokens in the token bucket according to the bandwidth occupied by the multicast message.
For example, as shown in fig. 2, fig. 2 is a schematic flow chart of a multicast message control process provided in the present application, and first, when a hardware chip receives a message, it determines whether the message is a unicast message or a multicast message, distinguishes the multicast message from the unicast message, and places the multicast message and the unicast message into respective independent message buffer queues to wait for processing. And for the unicast message queue, processing the flow according to the unicast. For the multicast message, extracting a message from the multicast message queue according to the first-in first-out principle as the multicast message to be sent, analyzing the message to the service line card outlet end information carried by the message, and then checking whether the token in the token bucket associated with the service line card port is enough to forward the message. If the token is not enough, the multicast message is waited to be released and obtained at the preset time, and the message is discarded after the token is not enough obtained at the preset time.
In the embodiment of the application, a hardware chip firstly obtains the priority of each multicast message in a multicast message queue, determines the multicast message to be transmitted based on the high-low order of the priority, then counts the current token number in a token bucket associated on a service line card outlet end corresponding to the multicast message to be transmitted, and finally controls the multicast message to be transmitted to a service line card outlet end corresponding to the multicast message to be transmitted according to the current token number. According to the method and the device, the flow bandwidth management of the outlet end is carried out on the forwarding of the multicast message through the token bucket algorithm, so that the network congestion of the switching matrix in the direction of the outlet end does not occur, and the message loss rate is reduced.
The following are embodiments of the system of the present application that may be used to implement embodiments of the method of the present application. For details not disclosed in the embodiments of the system of the present application, reference is made to embodiments of the method of the present application.
Fig. 3 is a schematic structural diagram of a multicast packet control apparatus according to an exemplary embodiment of the present invention. The multicast message control apparatus may be implemented as all or a part of a device by software, hardware, or a combination of both. The device 1 comprises a multicast message determination module 10 to be transmitted, a current token number counting module 20 and a multicast message forwarding module 30.
A to-be-transmitted multicast message determining module 10, configured to obtain a priority of each multicast message in a multicast message queue, and determine a to-be-transmitted multicast message based on a high-low order of the priorities;
a current token number counting module 20, configured to count the current token number in a token bucket associated at an egress end of a service line card corresponding to a multicast packet to be transmitted;
and a multicast packet forwarding module 30, configured to control, according to the number of current tokens, the multicast packet to be transmitted to be forwarded to the egress end of the service line card corresponding to the multicast packet forwarding module.
It should be noted that, when the multicast packet control apparatus provided in the foregoing embodiment executes the multicast packet control method, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the multicast packet control apparatus and the multicast packet control method provided in the foregoing embodiments belong to the same concept, and details of implementation processes thereof are referred to in the method embodiments and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
In the embodiment of the application, a hardware chip first obtains the priority of each multicast packet in a multicast packet queue, determines the multicast packet to be transmitted based on the high-low order of the priorities, then counts the current number of tokens in a token bucket associated with an outlet end of a service line card corresponding to the multicast packet to be transmitted, and finally controls the multicast packet to be transmitted to the outlet end of the service line card corresponding to the multicast packet to be transmitted according to the current number of tokens. According to the method and the device, the flow bandwidth management of the outlet end is carried out on the forwarding of the multicast message through the token bucket algorithm, so that the network congestion of the switching matrix in the direction of the outlet end does not occur, and the message loss rate is reduced.
The present application further provides a computer readable medium, on which program instructions are stored, and when the program instructions are executed by a processor, the multicast packet control method provided by the foregoing method embodiments is implemented.
The present application also provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the multicast message control method of the above-mentioned method embodiments.
Referring to fig. 4, fig. 4 is a schematic diagram of an internal structure of an electronic device according to an embodiment, which is applied to a first electronic device. As shown in fig. 4, the electronic device includes a processor, a nonvolatile storage medium, a memory, and a network interface connected through a system bus. The nonvolatile storage medium of the electronic device stores an operating system, a database and computer readable instructions, the database can store control information sequences, and the computer readable instructions, when executed by the processor, enable the processor to implement a multicast message control method. The processor of the electronic device is used for providing calculation and control capability and supporting the operation of the whole electronic device. The memory of the electronic device may have computer readable instructions stored therein that, when executed by the processor, cause the processor to perform a multicast message control method. The network interface of the electronic equipment is used for connecting and communicating with the terminal. Those skilled in the art will appreciate that the configuration shown in fig. 4 is a block diagram of only a portion of the configuration associated with the present application, and does not constitute a limitation on the electronic device to which the present application is applied, and a particular electronic device may include more or less components than those shown in the drawings, or combine certain components, or have a different arrangement of components.
In one embodiment, an electronic device is provided, the electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring the priority of each multicast message in the multicast message queue, and determining the multicast message to be transmitted based on the high-low sequence of the priority;
counting the current token number in a token bucket associated with a business line card outlet end corresponding to a multicast message to be transmitted;
and controlling the multicast message to be transmitted to be forwarded to the corresponding business line card outlet end according to the number of the current tokens.
In one embodiment, before the processor performs acquiring the priority of each multicast packet in the multicast packet queue, the processor further performs the following steps: when message data are received, analyzing the message type of the message data;
and caching the message data according to the message type.
In one embodiment, when the processor caches the message data according to the message type, the following steps are specifically performed:
when the message type is a unicast message, caching message data into a unicast message queue;
alternatively, the first and second electrodes may be,
and when the message type is a multicast message, caching the message data into a multicast message queue.
In an embodiment, when executing acquiring the priority of each multicast packet in the multicast packet queue, the processor specifically executes the following steps:
acquiring the caching time of each multicast message in the multicast message queue;
determining the priority of each multicast message according to the duration of the caching time and the current time;
alternatively, the first and second electrodes may be,
acquiring a cache ID of each multicast message in a multicast message queue;
and determining the priority of each multicast message according to the size of the cache ID.
In one embodiment, when performing statistics on the current token number in a token bucket associated with a service line card outlet end corresponding to a multicast packet to be transmitted, a processor specifically performs the following steps:
analyzing the multicast message to be transmitted, and extracting the information of the outlet end of the service line card from the analyzed message;
determining a token bucket associated with the outlet end of the service line card according to the outlet end information of the service line card;
the current number of tokens in the token bucket is counted.
In an embodiment, when the processor controls the multicast packet to be transmitted to be forwarded to the service line card outlet end corresponding to the multicast packet to be transmitted according to the current token number, the processor specifically executes the following steps:
if the number of the current tokens meets the forwarding condition of the multicast message to be transmitted, forwarding the multicast message to be transmitted to the corresponding business line card outlet end;
alternatively, the first and second electrodes may be,
if the number of the current tokens does not meet the forwarding condition of the multicast message to be transmitted, starting a timer to count down the preset time interval; in the countdown process of the timer, if the number of the current tokens meets the forwarding condition of the multicast message to be transmitted, forwarding the multicast message to be transmitted to the corresponding business line card outlet end; or when the countdown of the timer is finished, if the number of the current tokens does not meet the forwarding condition of the multicast message to be transmitted, discarding the multicast message to be transmitted.
In one embodiment, the processor further performs the steps of:
counting the byte size of the multicast message in the multicast message queue;
calculating the bandwidth occupied by the multicast message according to the byte size;
and updating the token quantity in the token bucket according to the bandwidth occupied by the multicast message.
In the embodiment of the application, a hardware chip first obtains the priority of each multicast packet in a multicast packet queue, determines the multicast packet to be transmitted based on the high-low order of the priorities, then counts the current number of tokens in a token bucket associated with an outlet end of a service line card corresponding to the multicast packet to be transmitted, and finally controls the multicast packet to be transmitted to the outlet end of the service line card corresponding to the multicast packet to be transmitted according to the current number of tokens. According to the method and the device, the flow bandwidth management of the outlet end is carried out on the forwarding of the multicast message through the token bucket algorithm, so that the network congestion of the switching matrix in the direction of the outlet end does not occur, and the message loss rate is reduced.
Referring to fig. 5, the computer readable storage medium is an optical disc 30, and a computer program (i.e., a program product) is stored thereon, and when being executed by a processor, the computer program executes the multicast message control method provided in any of the foregoing embodiments.
It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory, or other optical and magnetic storage media, which are not described in detail herein.
The computer-readable storage medium provided by the above-mentioned embodiment of the present application and the multicast packet control method provided by the embodiment of the present application have the same beneficial effects as the method adopted, operated or implemented by the application program stored in the computer-readable storage medium.
The above description is only for the preferred embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It will be understood by those skilled in the art that all or part of the processes in the methods of the embodiments described above may be implemented by a computer program to instruct related hardware, and the multicast message control program may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (10)

1. A multicast message control method, the method comprising:
acquiring the priority of each multicast message in a multicast message queue, and determining the multicast messages to be transmitted based on the high-low order of the priority;
counting the current token number in a token bucket associated with the service line card outlet end corresponding to the multicast message to be transmitted;
and controlling the multicast message to be transmitted to be forwarded to the corresponding business line card outlet end according to the current token number.
2. The method of claim 1, wherein before obtaining the priority of each multicast packet in the multicast packet queue, the method further comprises:
when message data are received, analyzing the message type of the message data;
and caching the message data according to the message type.
3. The method of claim 2, wherein the caching the packet data according to the packet type comprises:
when the message type is a unicast message, caching the message data into a unicast message queue;
alternatively, the first and second electrodes may be,
and when the message type is a multicast message, caching the message data to a multicast message queue.
4. The method of claim 1, wherein the obtaining the priority of each multicast packet in the multicast packet queue comprises:
obtaining the caching time of each multicast message in the multicast message queue;
determining the priority of each multicast message according to the duration of the cache time and the current time;
alternatively, the first and second electrodes may be,
obtaining the cache ID of each multicast message in the multicast message queue;
and determining the priority of each multicast message according to the size of the cache ID.
5. The method according to claim 1, wherein the counting the current number of tokens in a token bucket associated with a service line card egress corresponding to the multicast packet to be transmitted comprises:
analyzing the multicast message to be transmitted, and extracting the information of the outlet end of the service line card from the analyzed message;
determining a token bucket associated with the outlet end of the service line card according to the outlet end information of the service line card;
and counting the current token quantity in the token bucket.
6. The method according to claim 1, wherein the controlling, according to the number of the current tokens, the multicast packet to be transmitted to be forwarded to the egress end of the service line card corresponding to the multicast packet to be transmitted comprises:
if the number of the current tokens meets the forwarding condition of the multicast message to be transmitted, forwarding the multicast message to be transmitted to the corresponding business line card outlet end;
alternatively, the first and second electrodes may be,
if the number of the current tokens does not meet the forwarding condition of the multicast message to be transmitted, starting a timer to count down a preset time interval; in the process of counting down by a timer, if the number of the current tokens meets the forwarding condition of the multicast message to be transmitted, forwarding the multicast message to be transmitted to the corresponding service line card outlet end; or when the countdown of the timer is finished, if the number of the current tokens does not meet the forwarding condition of the multicast message to be transmitted, discarding the multicast message to be transmitted.
7. The method of claim 6, further comprising:
counting the byte size of the multicast message in the multicast message queue;
calculating the bandwidth occupied by the multicast message according to the byte size;
and updating the token quantity in the token bucket according to the bandwidth occupied by the multicast message.
8. A multicast message control system, the system comprising:
the multicast message to be transmitted determining module is used for acquiring the priority of each multicast message in the multicast message queue and determining the multicast message to be transmitted based on the high-low order of the priority;
a current token number counting module, configured to count the current token number in a token bucket associated at an outlet of a service line card corresponding to the multicast packet to be transmitted;
and the multicast message forwarding module is used for controlling the multicast message to be transmitted to be forwarded to the corresponding business line card outlet end according to the number of the current tokens.
9. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method of any of claims 1-7.
10. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method according to any of claims 1-7.
CN202210427480.4A 2022-04-22 2022-04-22 Multicast message control method, system, storage medium and electronic device Pending CN115460152A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210427480.4A CN115460152A (en) 2022-04-22 2022-04-22 Multicast message control method, system, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210427480.4A CN115460152A (en) 2022-04-22 2022-04-22 Multicast message control method, system, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN115460152A true CN115460152A (en) 2022-12-09

Family

ID=84297496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210427480.4A Pending CN115460152A (en) 2022-04-22 2022-04-22 Multicast message control method, system, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115460152A (en)

Similar Documents

Publication Publication Date Title
US9380007B2 (en) Method, apparatus and system for packet reassembly and reordering
US10326713B2 (en) Data enqueuing method, data dequeuing method, and queue management circuit
JP3734704B2 (en) Packet classification engine
US10218645B2 (en) Low-latency processing in a network node
US8555374B2 (en) High performance packet processing using a general purpose processor
EP2613479A1 (en) Relay device
US11502967B2 (en) Methods and apparatuses for packet scheduling for software-defined networking in edge computing environment
US20040218592A1 (en) Method and apparatus for fast contention-free, buffer management in a multi-lane communication system
US20040240459A1 (en) Method and apparatus for avoiding collisions during packet enqueue and dequeue
US11012542B2 (en) Data processing method and apparatus
US20100205612A1 (en) Method and apparatus for processing protocol messages for multiple protocol instances
CN110519180A (en) Network card virtualization queue scheduling method and system
CN116955247B (en) Cache descriptor management device and method, medium and chip thereof
CN111740922B (en) Data transmission method, device, electronic equipment and medium
CN111404839B (en) Message processing method and device
US20140022895A1 (en) Reducing Store And Forward Delay In Distributed Systems
US7292593B1 (en) Arrangement in a channel adapter for segregating transmit packet data in transmit buffers based on respective virtual lanes
CN115460152A (en) Multicast message control method, system, storage medium and electronic device
US6621825B1 (en) Method and apparatus for per connection queuing of multicast transmissions
CN113765796B (en) Flow forwarding control method and device
CN113157465B (en) Message sending method and device based on pointer linked list
US9128785B2 (en) System and method for efficient shared buffer management
CN113626221A (en) Message enqueuing method and device
WO2017016300A1 (en) Method and apparatus for processing token application, computer storage medium
Walsh et al. The gigaswitch control processor

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