CN111193671B - Message processing method and device and readable storage medium - Google Patents

Message processing method and device and readable storage medium Download PDF

Info

Publication number
CN111193671B
CN111193671B CN201911331047.5A CN201911331047A CN111193671B CN 111193671 B CN111193671 B CN 111193671B CN 201911331047 A CN201911331047 A CN 201911331047A CN 111193671 B CN111193671 B CN 111193671B
Authority
CN
China
Prior art keywords
router
target
tunnel
message
opposite
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
CN201911331047.5A
Other languages
Chinese (zh)
Other versions
CN111193671A (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.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera 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 Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN201911331047.5A priority Critical patent/CN111193671B/en
Publication of CN111193671A publication Critical patent/CN111193671A/en
Application granted granted Critical
Publication of CN111193671B publication Critical patent/CN111193671B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Landscapes

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

Abstract

The embodiment of the invention provides a message processing method, a message processing device and a readable storage medium. The message processing method of the invention comprises the following steps: the method comprises the steps of obtaining a target message, wherein the target message is an Ethernet data message, determining a first target port corresponding to the target message, traversing each port except the first target port in a forwarding example to which the first target port belongs to so as to determine the number of tunnels of a first target tunnel in the forwarding example, and under the condition that the number of the tunnels is greater than 1, packaging the target message according to first tunnel information and a preset packaging format of each first target tunnel so as to obtain a first video networking multicast message, and sending the first video networking multicast message to a video networking server. Therefore, only the video networking multicast message is sent to the video networking server under the condition that a plurality of tunnels exist in all ports in the forwarding example to which the first target port corresponding to the target message belongs, and therefore occupied video networking bandwidth is reduced.

Description

Message processing method and device and readable storage medium
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for processing a packet, and a readable storage medium.
Background
The video networking is an important milestone for network development, is a higher-level form of the Internet, is a real-time network, can realize the real-time transmission of full-network high-definition videos which cannot be realized by the existing Internet, and pushes a plurality of Internet applications to high-definition video. And the user can realize communication connection between internet terminals through the video network.
When the internet of view bears data messages of the ethernet, when the same forwarding instance deployed on a router of the internet of view receives a user message (an ethernet broadcast/multicast message), when traversing each port of the forwarding instance, if the port is a tunnel, a copy of the user message is copied and sent to a server of the internet of view through the tunnel, that is, if the forwarding instance has a plurality of tunnels, the user message needs to be sent for many times, so that more bandwidth of the internet of view needs to be occupied.
Disclosure of Invention
The embodiment of the invention provides a message processing method, a message processing device and a readable storage medium, which are used for solving the problem that a current forwarding example has a plurality of tunnels, and a plurality of user messages need to be sent, so that more video network bandwidth needs to be occupied.
In a first aspect of the embodiments of the present invention, a method for processing a packet, executed in a first router, includes:
acquiring a target message, wherein the target message is an Ethernet data message;
determining a first target port corresponding to the target message;
traversing each port except the first target port in a forwarding instance to which the first target port belongs to determine the number of tunnels of a first target tunnel in the forwarding instance;
under the condition that the number of the tunnels is more than 1, encapsulating the target message according to the first tunnel information and a preset encapsulation format of each first target tunnel to obtain a first video networking multicast message;
and sending the first video networking multicast message to a video networking server.
In a second aspect of the embodiments of the present invention, there is provided a packet processing apparatus, disposed in a first router, including:
the system comprises an acquisition module, a processing module and a sending module, wherein the acquisition module is used for acquiring a target message, and the target message is an Ethernet data message;
a first determining module, configured to determine a first target port corresponding to the target packet;
a second determining module, configured to traverse each port except the first destination port in a forwarding instance to which the first destination port belongs, so as to determine the number of tunnels of the first destination tunnel in the forwarding instance;
the encapsulation module is used for encapsulating the target message according to the first tunnel information and a preset encapsulation format of each first target tunnel under the condition that the number of the tunnels is more than 1 so as to obtain a first video networking multicast message;
and the sending module is used for sending the first video networking multicast message to a video networking server.
A third aspect of the embodiments of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps of the message processing method described above.
In a fourth aspect of the present invention, there is provided a message processing apparatus, including a processor, a memory, and a computer program stored in the memory and operable on the processor, where the computer program, when executed by the processor, implements the steps of the message processing method described above.
Aiming at the prior art, the invention has the following advantages:
the message processing method provided by the embodiment of the invention comprises the steps of obtaining a target message, determining a first target port corresponding to the target message, traversing each port except the first target port in a forwarding example to which the first target port belongs to so as to determine the number of tunnels of a first target tunnel in the forwarding example, encapsulating the target message according to first tunnel information and a preset encapsulation format of each first target tunnel under the condition that the number of the tunnels is more than 1 so as to obtain a first video networking multicast message, and sending the first video networking multicast message to a video networking server. Therefore, under the condition that a plurality of tunnels exist in all ports in a forwarding example to which a first target port corresponding to a target message belongs, the target message is packaged to obtain a video networking multicast message, and the video networking multicast message is sent to a video networking server once, so that the times of sending the message to the video networking server can be reduced, and the condition of occupied video networking bandwidth is further reduced.
The above description is only an overview of the technical solutions of the present invention, and the present invention can be implemented in accordance with the content of the description so as to make the technical means of the present invention more clearly understood, and the above and other objects, features, and advantages of the present invention will be more clearly understood.
Drawings
Various additional advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart illustrating steps of a message processing method according to an embodiment of the present invention;
FIG. 2 is a diagram of a system architecture according to an embodiment of the present invention;
fig. 3 is a schematic diagram of tunnel information of a tunnel established between routers according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present invention;
FIG. 5 is a networking schematic of a video network of the present invention;
FIG. 6 is a schematic diagram of a hardware architecture of a node server according to the present invention;
fig. 7 is a schematic diagram of a hardware structure of an access switch of the present invention;
fig. 8 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
It should be understood that the specific embodiments described herein are merely illustrative of the invention, but do not limit the invention to only some, but not all embodiments.
Referring to fig. 1, fig. 1 is a flowchart of steps of a method for processing a packet according to an embodiment of the present invention, where the method may be executed in a first router, and the method in this embodiment includes the following steps:
step 101, obtaining a target message, wherein the target message is an Ethernet data message.
The target packet may be an ethernet data packet directly acquired through an ethernet physical interface of the first router, and the ethernet data packet may be an ethernet broadcast packet or an ethernet multicast packet. Or the target message is an ethernet data message obtained by analyzing the video networking multicast message received through the video networking physical interface by the first router.
And 102, determining a first target port corresponding to the target message.
And if the target message is acquired through the Ethernet physical interface of the first router, the first target port corresponding to the target message is the Ethernet physical interface.
If the target message is obtained after the first router analyzes the video networking multicast message received through the video networking physical interface, whether a tunnel corresponding to the number of the opposite-end router and the sub-number of the opposite-end router exists or not is determined according to the number of the opposite-end router and the sub-number of the opposite-end router included in the video networking multicast message, and the tunnel is used as a first target port under the condition that the tunnel corresponding to the number of the opposite-end router and the sub-number of the opposite-end router exists.
Step 103, traversing each port except the first target port in the forwarding instance to which the first target port belongs to determine the number of tunnels of the first target tunnel in the forwarding instance.
There may be one forwarding instance on a router, or multiple forwarding instances, each of which may include at least one physical interface and/or at least one tunnel. After step 102 is performed, each port except the first destination port in the forwarding instance to which the first destination port belongs may be traversed. For example, the forwarding instance includes 3 ports, port 1 (tunnel 1), port 2 (tunnel 2), and port 3 (ethernet physical interface). If the ethernet physical interface receives the ethernet data packet, the ethernet physical interface is the first target port, and since the ethernet physical interface belongs to the forwarding example, port 1 and port 2 in the forwarding example need to be traversed, so that it can be determined that the number of tunnels of the first target tunnel in the forwarding example is equal to 2, and the first target tunnel in the forwarding example is tunnel 1 and tunnel 2.
And 104, encapsulating the target message according to the first tunnel information and a preset encapsulation format of each first target tunnel to obtain a first video networking multicast message under the condition that the number of the tunnels is more than 1.
Combining the example in the above step, since the number of tunnels is 2, that is, the number of tunnels is greater than 1, the target packet is encapsulated according to the first tunnel information and the preset encapsulation format of each first target tunnel, so as to obtain the first multicast packet of the video network.
Step 105, sending the first video networking multicast message to the video networking server.
In step 104, when there are multiple tunnels in all ports in the forwarding instance to which the first target port corresponding to the target packet belongs, the target packet is encapsulated to obtain a multicast packet of the video networking, and the multicast packet of the video networking is sent to the video networking server once, so that compared with the prior art in which multiple tunnels exist, the number of times of sending packets to the video networking server can be reduced when multiple user packets need to be sent to the video networking server, thereby reducing the bandwidth occupied by the video networking.
In addition, it should be noted that, in the prior art, if there are multiple tunnels, the video networking server needs to receive multiple user packets and needs to forward multiple user packets. In this example, the video networking multicast message is sent to the video networking server only once when there are a plurality of tunnels, so that the video networking server only needs to receive the video networking multicast message once, and the video networking server only forwards the video networking multicast message once to the multicast group to which the first router belongs, thereby reducing the forwarding burden of the video networking server.
The message processing method provided in this embodiment determines, by acquiring a target message, where the target message is an ethernet data message, a first target port corresponding to the target message, traverses each port except the first target port in a forwarding example to which the first target port belongs, to determine the number of tunnels of a first target tunnel in the forwarding example, and encapsulates the target message according to first tunnel information and a preset encapsulation format of each first target tunnel when the number of tunnels is greater than 1, to obtain a first multicast message of the internet of view, and sends the first multicast message of the internet of view to the server of the internet of view. Therefore, under the condition that a plurality of tunnels exist in all ports in a forwarding example to which a first target port corresponding to a target message belongs, the target message is packaged to obtain a video networking multicast message, and the video networking multicast message is sent to a video networking server once, so that the times of sending the message to the video networking server can be reduced, and the condition of occupied video networking bandwidth is further reduced.
It should be noted that, if each port except the first destination port in the forwarding example to which the first destination port belongs is traversed, if one of the traversed ports is an ethernet physical interface, a copy of the destination packet is directly copied, and the copied destination packet is sent through the ethernet physical interface. For example, the forwarding example includes 4 ports, that is, port 1 (tunnel 1), port 2 (tunnel 2), port 3 (ethernet physical interface 1), and port 4 (ethernet physical interface 2), and when traversing to port 4, directly copies a target packet and sends the target packet through port 4. And if the number of the tunnels of the first target tunnel in the forwarding example is equal to 1, directly copying a target message and sending the copied target message through the first target tunnel.
Optionally, the first tunnel information includes a number of the first router, a sub-number of the first router, a number of a first peer router of the first router, and a sub-number of the first peer router, where the first peer router is a router having a first target tunnel established between itself and the first router;
the preset packaging format comprises the following steps: a first data position corresponding to the number of the second opposite end router, a second data position corresponding to the number of each second opposite end router, a third data position corresponding to the number of the sub-numbers of each second opposite end router, a fourth data position corresponding to the sub-numbers of each second opposite end router, and a fifth data position corresponding to the received broadcast message or multicast message, wherein the second opposite end router comprises any opposite end router of routers acquiring the Ethernet data message;
according to the first tunnel information and the preset encapsulation format of each first target tunnel, encapsulating the target message to obtain a first video network multicast message, comprising:
the method comprises the steps of filling and writing the number of first peer routers to a first data position, filling and writing the number of each first peer router to a second data position, filling and writing the number of sub-numbers of each first peer router to a third data position, filling and writing the sub-numbers of each first peer router to a fourth data position, and filling and writing a target message to a fifth data position to obtain a first video networking multicast message.
It should be noted that the number of the second peer router may be represented by a binary number of one byte (8 bits), each second peer router number may be represented by a binary number of four bytes (i.e., 32 bits), each second peer router sub-number may be represented by a binary number of one byte (8 bits), and each second peer router sub-number may be represented by a binary number of one byte (8 bits).
First, an exemplary description of the first tunnel information is provided herein to describe the process of obtaining the first multicast packet in detail. For example, referring to fig. 2 and fig. 3, fig. 2 is a system architecture diagram provided in an embodiment of the present invention, and fig. 3 is a schematic diagram of tunnel information of a tunnel established between routers provided in an embodiment of the present invention. For example, a tunnel 1 is established between the router 1 and the router 2, and if the number of the router 1 is 111, the local sub-number of the router 1 corresponding to the tunnel 1 is 11; the number of router 2 is 222, and the sub-number of router 2 corresponding to tunnel 1 locally to router 2 is 22. If the number of the router 1 is 111 and the sub-number of the router 1 corresponding to the tunnel 1 in the router 1 is 11, the tunnel information of the tunnel 1 established between the router 1 and the router 2 stored in the router 1 is 1111122222, and the tunnel information of the tunnel 1 established between the router 2 and the router 1 stored in the router 2 is: 2222211111.
for example, a tunnel 2 and a tunnel 3 are established between the router 1 and the router 3. If the local sub-number of the router 1 corresponding to the tunnel 2 of the router 1 is 22, the sub-number of the router 1 corresponding to the tunnel 3 is 33; if the number of the router 3 is 333, the sub-number of the router 3 corresponding to the tunnel 2 in the router 3 is 44, and the sub-number of the router 3 corresponding to the tunnel 3 in the router 3 is 55, the tunnel information of the tunnel 2 established between the router 1 and the router 3 stored in the router 1 is 1112233344, and the tunnel information of the tunnel 3 established between the router 1 and the router 3 stored in the router 1 is 1113333355.
Take the router 1 as the first router and the ethernet physical interface of the router 1 receives the ethernet data packet as an example. If the ethernet physical interface and the tunnel 1, the tunnel 2, and the tunnel 3 belong to the forwarding instance 1, the tunnel 2, and the tunnel 3 may all be the first target tunnel, the number of the first target tunnel is equal to 3, the first tunnel information of the tunnel 1 is 2222211111, the first tunnel information of the tunnel 2 is 1112222244, and the first tunnel information of the tunnel 3 is 1113322255. The first peer routers are router 2 and router 3. If the ethernet physical interface and the tunnel 1 belong to the forwarding instance 2, and the tunnel 2 and the tunnel 3 belong to the forwarding instance 3, only the tunnel 1 is the first target tunnel, and the first peer router is the router 2.
The foregoing describes the first tunnel information exemplarily, and next, the following describes that the target packet is encapsulated according to the first tunnel information of each first target tunnel and a preset encapsulation format to obtain the first multicast packet of the video network.
Taking the router 1 as the first router as an example, when the tunnel 1, the tunnel 2 and the tunnel 3 are all the first target tunnels, the number of the first peer router includes the number of the router 2 and the number of the router 3, that is, the number of the first peer router is equal to 2; the number of the router 2 is 222, the sub-number of the router 2 is 22, the number of the router 3 is 333, and the sub-numbers of the routers 3 are 44 and 55, then the first data location may be filled with 2, the second data location 1 may be filled with 222, the third data location 1 may be filled with 1, the fourth data location 1 may be filled with 22, the second data location 2 may be filled with 333, the third data location 2 may be filled with 2, the fourth data location 2 may be filled with 44, the fourth data location 3 may be filled with 55, and the fifth data location is filled with an ethernet data packet (target packet), that is, the filled data is [2] - [222] [1] [22] - [333] [2] [44] [55] - [ target packet ], so as to complete the encapsulation of the target packet, and obtain the first view networking multicast packet.
Optionally, step 101, obtaining the target packet may be implemented by the following method:
acquiring a first Ethernet data message through an Ethernet physical interface of a first router;
as shown in fig. 2 and 3, the router 1 is still used as the first router. For example, a computer is connected to the ethernet physical interface of the router 1, and when the computer sends an ethernet data packet to the ethernet physical interface, the router 1 may receive the ethernet data packet through the ethernet physical interface, and use the received ethernet data packet as a target packet. Correspondingly, the step 102 of determining the first target port corresponding to the target packet may be implemented by the following steps:
the ethernet physical interface is taken as the first destination port.
Optionally, step 101, obtaining the target packet may also be implemented by the following steps:
acquiring a second video networking multicast message through a video networking physical interface of a first router, wherein the second video networking multicast message is acquired after an Ethernet physical interface of the second router receives a second Ethernet data message and is acquired after the second Ethernet data message is encapsulated according to second tunnel information and a preset encapsulation format of each second target tunnel, the second target tunnel is a tunnel in each port in a forwarding example to which the Ethernet physical interface of the second router belongs, and the second tunnel information comprises the number of the second router, the sub-number of the second router, the number of a third opposite-end router of the second router and the sub-number of the third opposite-end router;
analyzing the second video networking multicast message to obtain the number of the third opposite-end router, the sub-number of the third opposite-end router and a second Ethernet data message;
searching whether a tunnel corresponding to the number of the third opposite-end router and the sub-number of the third opposite-end router exists or not according to the number of the third opposite-end router and the sub-number of the third opposite-end router;
and under the condition that tunnels corresponding to the number of the third opposite-end router and the sub-number of the third opposite-end router exist, if the number of the third target tunnels in the port of the forwarding example to which the tunnels corresponding to the number of the third opposite-end router and the sub-number of the third opposite-end router belong is more than 1, taking the second Ethernet data message as the target message.
Correspondingly, the step 102 of determining the first destination port corresponding to the destination packet may be implemented by the following steps:
and taking the tunnel corresponding to the number of the third opposite-end router and the sub-number of the third opposite-end router as the first target port.
It should be noted that, referring to fig. 2 and fig. 3, if the router 2 serves as a second router, and the ethernet physical interface of the router 2 receives an ethernet datagram (i.e. a second ethernet datagram), the router 2 may perform the same operation as the router 1, that is, traverse each port in the forwarding instance to which the ethernet physical interface belongs, to determine the number of tunnels of ports belonging to tunnels in each port in the forwarding instance, that is, determine the number of tunnels of a second target tunnel, and in a case that the number of tunnels of the second target tunnel is greater than 1, encapsulate the second ethernet datagram according to the second tunnel information and the preset encapsulation format of each second target tunnel to obtain a second internet-of-view multicast datagram (a specific encapsulation method may refer to the illustration in the above embodiment, if a tunnel 4 is established between the router 2 and the router 4, the tunnel information of the tunnel 4 established between the router 2 and the router 4, which is stored locally in the router 2, is, for example: 2223344411, if the ethernet physical interface of the router 2, the tunnel 1 and the tunnel 4 belong to the same forwarding instance, the second target tunnel is the tunnel 1 and the tunnel 4, and the number of the second target tunnel is 2, so that the condition of encapsulating the second ethernet data packet is satisfied, and the encapsulated second view network packet is: [2] - [111] [1] [11] - [444] [1] [44] - [ second ethernet data packet ]), then send the second multicast message of the video networking to the server of the video networking, the server of the video networking sends the second multicast message of the video networking to the multicast group that router 2 belongs to, if router 1, router 2, router 4 and router 5 belong to the same multicast group, router 1, router 2, router 4 and router 5 can all receive the second multicast message of the video networking.
Taking the router 1 as the first router as an example for illustration, after the router 1 receives the second multicast packet through the physical interface of the video network connected to the video network server, the router 1 may parse the second multicast packet, and then search for the tunnel corresponding to 11111 (since the third peer router of the router 2 includes the router 1 and the router 4, that is, the router 1 searches for the tunnel corresponding to the number 111 of the router 1 and the sub-number 11 of the router 1), since the tunnel 1 corresponds to both the number 111 of the router 1 and the sub-number 11 of the router 1, the tunnel 1 may be searched for the second ethernet data packet as the target packet, and subsequent steps 102 to 105 are performed.
In the process of executing steps 102 to 105, if the forwarding example to which the tunnel 1 belongs is the forwarding example 1 (the forwarding example 1 includes an ethernet physical interface, tunnel 1, tunnel 2, and tunnel 3), that is, the third target tunnel is the tunnel 1, tunnel 2, and tunnel 3, and the number of tunnels of the third target tunnel is equal to 3, the second ethernet data packet obtained by analysis is used as the target packet. If the tunnel 2, the tunnel 3 and the tunnel 1 do not belong to one forwarding instance, the tunnel 1 and the ethernet physical interface belong to the same forwarding instance a, and only one tunnel (namely the tunnel 1) exists in the forwarding instance, directly copying a second ethernet data packet, and sending the second ethernet data packet through the tunnel 1. If the router 1 traverses each port in the forwarding instance a, when traversing the ethernet physical interface, it may directly copy a second ethernet datagram and send the second ethernet datagram through the ethernet physical interface.
It should be noted that, if the router 1 receives the video networking multicast packet sent by the router 4, because a tunnel is not established between the router 1 and the router 4, the router 1 cannot search for a tunnel corresponding to both the number of the opposite-end router of the router 4 and the sub-number of the opposite-end router, and in this case, the router 1 may directly discard the received video networking multicast packet.
Optionally, step 103, traversing each port except the first destination port in the forwarding instance to which the destination port belongs to determine the number of tunnels of the first destination tunnel in the forwarding instance may be implemented by the following steps:
under the condition that a second target port in each traversed port is a tunnel, accumulating 1 for the current number of the tunnels in each port, and judging whether each port is traversed according to the number of all ports in a forwarding example and the number of traversed ports;
and under the condition of traversing each port, taking the current number after 1 accumulation as the number of tunnels.
For example, in the case where the router 1 is used as the first router, the port 1 (ethernet physical interface 1), the port 2 (tunnel 1), the port 3 (tunnel 2), the port 4 (tunnel 3), and the port 5 (ethernet physical interface 2) of the router 1 belong to the same forwarding instance. If the ethernet physical interface 1 of the router 1 receives the target packet in step 101, traversing the port 2, the port 3, the port 4, and the port 5, where the initial value of the number of tunnels of the forwarding instance (i.e., the number of tunnels belonging to the forwarding instance) is 0, the number of ports of the forwarding instance is 5, and when traversing to the port 2 of the forwarding instance, where the port 2 is a tunnel, adding 1 to the initial value, that is, the current number is equal to 1; when traversing the port 3, the port 3 is a tunnel, and the current number is equal to 2 after accumulating 1; when traversing the port 4, the port 4 is a tunnel, and the current number is equal to 3 after accumulating 1; when traversing the port 5, the port 5 belongs to an ethernet physical interface, and the final current number is equal to 3, that is, the number of tunnels of the forwarding instance is equal to 3.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present invention, where the apparatus is disposed in a first router, and includes:
an obtaining module 410, configured to obtain a target packet, where the target packet is an ethernet data packet;
a first determining module 420, configured to determine a first target port corresponding to the target packet;
a second determining module 430, configured to traverse each port except the first destination port in the forwarding instance to which the first destination port belongs, so as to determine the number of tunnels of the first destination tunnel in the forwarding instance;
an encapsulating module 440, configured to encapsulate the target packet according to the first tunnel information and a preset encapsulation format of each first target tunnel when the number of the tunnels is greater than 1, so as to obtain a first video networking multicast packet;
a sending module 450, configured to send the first video networking multicast packet to a video networking server.
Optionally, the first tunnel information includes a number of the first router, a sub-number of the first router corresponding to the first target tunnel, a number of a first peer router of the first router, and a sub-number of the first peer router corresponding to the first target tunnel, where the first peer router is a router between which the first target tunnel is established and the first router;
the preset packaging format comprises the following steps: a first data position corresponding to the number of a second opposite end router, a second data position corresponding to the number of each second opposite end router, a third data position corresponding to the number of sub-numbers of each second opposite end router, a fourth data position corresponding to the sub-number of each second opposite end router, and a fifth data position corresponding to a received broadcast message or multicast message, wherein the second opposite end router comprises any opposite end router of a router for acquiring the Ethernet data message;
the encapsulating module 440 is specifically configured to fill in the number of the first peer router to the first data location, fill in the number of each first peer router to the second data location, fill in the number of the sub-number of each first peer router to the third data location, fill in the sub-number of each first peer router to the fourth data location, and fill in the target packet to the fifth data location, so as to obtain the first video networking multicast packet.
Optionally, the obtaining module 410 is specifically configured to obtain a second video networking multicast packet through the video networking physical interface of the first router, where the second video networking multicast packet is obtained by, after receiving a second ethernet data packet through the ethernet physical interface of the second router, encapsulating the second ethernet data packet according to second tunnel information of each second target tunnel and the preset encapsulation format, where the second target tunnel is a tunnel in each port in a forwarding instance to which the ethernet physical interface of the second router belongs, and the second tunnel information includes a number of the second router, a sub-number of the second router, a number of a third peer router of the second router, and a sub-number of the third peer router;
analyzing the second video networking multicast message to obtain the number of the third opposite-end router, the sub-number of the third opposite-end router and the second Ethernet data message;
searching whether a tunnel corresponding to the number of the third opposite-end router and the sub-number of the third opposite-end router exists or not according to the number of the third opposite-end router and the sub-number of the third opposite-end router;
taking the second Ethernet data message as the target message under the condition that a tunnel corresponding to the number of the third opposite-end router and the sub-number of the third opposite-end router exists;
correspondingly, the first determining module 420 is specifically configured to use a tunnel corresponding to the number of the third peer router and the sub-number of the third peer router as the first target port.
Optionally, the obtaining module 410 is specifically configured to obtain a first ethernet data packet through an ethernet physical interface of the first router;
taking the first Ethernet data message as the target message;
correspondingly, the first determining module 420 is specifically configured to use the ethernet physical interface as the first target port.
Optionally, the second determining module 430 is specifically configured to, when a second destination port in each traversed port is a tunnel, add 1 to a current number of the tunnels in each port, and determine whether each port has been traversed according to the number of all ports in the forwarding instance and the number of traversed ports;
and under the condition of traversing each port, taking the current number after 1 accumulation as the number of the tunnels.
In addition, an embodiment of the present invention further provides a message processing apparatus, where the message processing apparatus includes a processor, a memory, and a computer program that is stored in the memory and can be run on the processor, and when being executed by the processor, the computer program implements each process of the message processing method embodiment in the foregoing embodiment, and can achieve the same technical effect, and is not described here again to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the message processing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The embodiment of the invention also provides a computer program, and the computer program can be stored on a cloud or a local storage medium. When being executed by a computer or a processor, the computer program is used for executing the steps of the message processing method of the embodiment of the invention and realizing the modules in the message processing device of the embodiment of the invention.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As is readily imaginable to the person skilled in the art: any combination of the above embodiments is possible, and thus any combination between the above embodiments is an embodiment of the present invention, but this specification is not necessarily detailed herein for reasons of space limitation.
The message processing methods provided herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The structure required to construct a system embodying aspects of the present invention will be apparent from the above description. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
Various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the message processing method according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
To better understand the embodiments of the present invention, the following description refers to the internet of view:
some of the techniques applied by the video network are as follows:
network Technology (Network Technology)
Network technology innovation in video networking has improved over traditional Ethernet (Ethernet) to face the potentially enormous video traffic on the network. Unlike pure network Packet Switching (Packet Switching) or network Circuit Switching (Circuit Switching), the video networking technology adopts Packet Switching to meet the Streaming requirement. The video networking technology has the advantages of flexibility, simplicity and low price of packet switching, and simultaneously has the quality and safety guarantee of circuit switching, thereby realizing the seamless connection of the whole network switching type virtual circuit and the data format.
Switching Technology (Switching Technology)
The video network adopts two advantages of asynchronism and packet switching of the Ethernet, eliminates the defects of the Ethernet on the premise of full compatibility, has end-to-end seamless connection of the whole network, is directly communicated with a user terminal, and directly bears an IP data packet. The user data does not require any format conversion across the entire network. The video networking is a higher-level form of the Ethernet, is a real-time exchange platform, can realize the real-time transmission of the whole-network large-scale high-definition video which cannot be realized by the existing Internet, and pushes a plurality of network video applications to high-definition and unification.
Server Technology (Server Technology)
The server technology on the video networking and unified video platform is different from the traditional server, the streaming media transmission of the video networking and unified video platform is established on the basis of connection orientation, the data processing capacity of the video networking and unified video platform is independent of flow and communication time, and a single network layer can contain signaling and data transmission. For voice and video services, the complexity of video networking and unified video platform streaming media processing is much simpler than that of data processing, and the efficiency is greatly improved by more than one hundred times compared with that of a traditional server.
Storage Technology (Storage Technology)
The super-high speed memory technology of the unified video platform adopts the most advanced real-time operating system in order to adapt to the media content with super-large capacity and super-large flow, the program information in the server instruction is mapped to the specific hard disk space, the media content is not passed through the server any more, and is instantly and directly sent to the user terminal, and the user waiting time is less than 0.2 second. The optimized sector distribution greatly reduces the mechanical motion of the magnetic head track seeking of the hard disk, the resource consumption only accounts for 20% of that of the IP internet of the same grade, but concurrent flow which is 3 times larger than that of the traditional hard disk array is generated, and the comprehensive efficiency is improved by more than 10 times.
Network Security Technology (Network Security Technology)
The structural design of the video network completely eliminates the network security problem troubling the internet structurally by the modes of independent service permission control each time, complete isolation of equipment and user data and the like, generally does not need antivirus programs and firewalls, avoids the attack of hackers and viruses, and provides a structural carefree security network for users.
Service Innovation Technology (Service Innovation Technology)
The unified video platform integrates services and transmission, and is not only automatically connected once whether a single user, a private network user or a network aggregate. The user terminal, the set-top box or the PC are directly connected to the unified video platform to obtain various multimedia video services in various forms. The unified video platform adopts a menu type configuration table mode to replace the traditional complex application programming, can realize complex application by using very few codes, and realizes infinite new service innovation.
Networking of the video network is as follows:
the video network is a centralized control network structure, and the network can be a tree network, a star network, a ring network and the like, but on the basis of the centralized control node, the whole network is controlled by the centralized control node in the network.
As shown in fig. 5, the video network is divided into an access network and a metropolitan network.
The devices of the access network part can be mainly classified into 3 types: node server, access switch, terminal (including various set-top boxes, coding boards, memories, etc.). The node server is connected to an access switch, which may be connected to a plurality of terminals and may be connected to an ethernet network.
The node server is a node which plays a centralized control function in the access network and can control the access switch and the terminal. The node server can be directly connected with the access switch or directly connected with the terminal.
Similarly, devices of the metropolitan network portion may also be classified into 3 types: a metropolitan area server, a node switch and a node server. The metro server is connected to a node switch, which may be connected to a plurality of node servers.
The node server is a node server of the access network part, namely the node server belongs to both the access network part and the metropolitan area network part.
The metropolitan area server is a node which plays a centralized control function in the metropolitan area network and can control a node switch and a node server. The metropolitan area server can be directly connected with the node switch or directly connected with the node server.
Therefore, the whole video network is a network structure with layered centralized control, and the network controlled by the node server and the metropolitan area server can be in various structures such as tree, star and ring.
The access network part can form a unified video platform (the part in the dotted circle), and a plurality of unified video platforms can form a video network; each unified video platform may be interconnected via metropolitan area and wide area video networking.
Video networking device classification
1.1 devices in the video network of the embodiment of the present invention can be mainly classified into 3 types: servers, switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.). The video network as a whole can be divided into a metropolitan area network (or national network, global network, etc.) and an access network.
1.2 wherein the devices of the access network part can be mainly classified into 3 types: node servers, access switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.).
The specific hardware structure of each access network device is as follows:
a node server:
as shown in fig. 6, the system mainly includes a network interface module 601, a switching engine module 602, a CPU module 603, and a disk array module 604;
the network interface module 601, the CPU module 603, and the disk array module 604 all enter the switching engine module 602; the switching engine module 602 performs an operation of looking up the address table 605 on the incoming packet, thereby obtaining the direction information of the packet; and stores the packet in a queue of a corresponding packet buffer 606 according to the packet's steering information; if the queue of the packet buffer 606 is nearly full, it is discarded; the switching engine module 602 polls all packet buffer queues and forwards if the following conditions are met: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero. The disk array module 604 mainly implements control over the hard disk, including initialization, read-write, and other operations of the hard disk; the CPU module 603 is mainly responsible for protocol processing with an access switch and a terminal (not shown in the figure), configuring an address table 605 (including a downlink protocol packet address table, an uplink protocol packet address table, and a data packet address table), and configuring the disk array module 604.
The access switch:
as shown in fig. 7, the network interface module mainly includes a network interface module (a downlink network interface module 701, an uplink network interface module 702), a switching engine module 703 and a CPU module 704;
wherein, the packet (uplink data) coming from the downlink network interface module 701 enters the packet detection module 705; the packet detection module 705 detects whether the Destination Address (DA), the Source Address (SA), the packet type, and the packet length of the packet meet the requirements, if so, allocates a corresponding stream identifier (stream-id) and enters the switching engine module 703, otherwise, discards the stream identifier; the packet (downstream data) coming from the upstream network interface module 702 enters the switching engine module 703; the incoming data packet from the CPU module 704 enters the switching engine module 703; the switching engine module 703 performs an operation of looking up the address table 706 on the incoming packet, thereby obtaining the direction information of the packet; if a packet entering the switching engine module 703 goes from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 707 in association with a stream-id; if the queue of the packet buffer 707 is close to full, discard; if the packet entering the switching engine module 703 does not go from the downlink network interface to the uplink network interface, the packet is stored in the queue of the corresponding packet buffer 707 according to the packet steering information; if the queue of the packet buffer 707 is close to full, it is discarded.
The switching engine module 703 polls all packet buffer queues, which in this embodiment of the present invention is divided into two cases:
if the queue is from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queued packet counter is greater than zero; 3) obtaining a token generated by a code rate control module;
if the queue is not from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero.
The rate control module 707 is configured by the CPU module 704, and generates tokens for the packet buffer queues from all the downstream network interfaces to the upstream network interfaces at programmable intervals to control the rate of upstream forwarding.
The CPU module 704 is mainly responsible for protocol processing with the node server, configuration of the address table 706, and configuration of the code rate control module 707.
Ethernet protocol switching gateway:
as shown in fig. 8, the apparatus mainly includes a network interface module (a downlink network interface module 801, an uplink network interface module 802), a switch engine module 803, a CPU module 804, a packet detection module 805, a rate control module 808, an address table 806, a packet buffer 807, a MAC adding module 809, and a MAC deleting module 810.
Wherein, the data packet coming from the downlink network interface module 801 enters the packet detection module 805; the packet detection module 805 detects whether the ethernet MAC DA, the ethernet MAC SA, the ethernet length or frame type, the video network destination address DA, the video network source address SA, the video network packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id); then, the MAC deletion module 810 subtracts the MAC DA, MAC SA, length or frame type (2byte), and enters the corresponding receiving buffer, otherwise, discards it;
the downlink network interface module 801 detects the sending buffer of the port, and if there is a packet, obtains the ethernet MAC DA of the corresponding terminal according to the destination address DA of the packet, adds the ethernet MAC DA of the terminal, the MAC SA of the ethernet protocol gateway, and the ethernet length or frame type, and sends the packet.
The other modules in the ethernet protocol gateway function similarly to the access switch.
A terminal:
the system mainly comprises a network interface module, a service processing module and a CPU module; for example, the set-top box mainly comprises a network interface module, a video and audio coding and decoding engine module and a CPU module; the coding board mainly comprises a network interface module, a video and audio coding engine module and a CPU module; the memory mainly comprises a network interface module, a CPU module and a disk array module.
1.3 devices of the metropolitan area network part can be largely classified into 2 types: node server, node exchanger, metropolitan area server. The node switch mainly comprises a network interface module, a switching engine module and a CPU module; the metropolitan area server mainly comprises a network interface module, a switching engine module and a CPU module.
2. Video networking packet definition
2.1 Access network packet definition
The data packet of the access network mainly comprises the following parts: destination Address (DA), Source Address (SA), reserved bytes, payload (pdu), CRC.
As shown in the following table, the data packet of the access network mainly includes the following parts:
DA SA Reserved Payload CRC
wherein:
the Destination Address (DA) is composed of 8 bytes (byte), the first byte represents the type of the data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), there are 256 possibilities at most, the second byte to the sixth byte are metropolitan area network addresses, and the seventh byte and the eighth byte are access network addresses;
the Source Address (SA) is also composed of 8 bytes (byte), defined as the same as the Destination Address (DA);
the reserved byte consists of 2 bytes;
the payload part has different lengths according to different types of datagrams, and is 64 bytes if the datagram is various types of protocol packets, and is 32+1024 or 1056 bytes if the datagram is a unicast packet, of course, the length is not limited to the above 2 types;
the CRC consists of 4 bytes and is calculated in accordance with the standard ethernet CRC algorithm.
2.2 metropolitan area network packet definition
The topology of a metropolitan area network is a graph and there may be 2, or even more than 2, connections between two devices, i.e., there may be more than 2 connections between a node switch and a node server, a node switch and a node switch, and a node switch and a node server. However, the metro network address of the metro network device is unique, and in order to accurately describe the connection relationship between the metro network devices, parameters are introduced in the embodiment of the present invention: a label to uniquely describe a metropolitan area network device.
In this specification, the definition of the Label is similar to that of the Label of MPLS (Multi-Protocol Label Switch), and assuming that there are two connections between the device a and the device B, there are 2 labels for the packet from the device a to the device B, and 2 labels for the packet from the device B to the device a. The label is classified into an incoming label and an outgoing label, and assuming that the label (incoming label) of the packet entering the device a is 0x0000, the label (outgoing label) of the packet leaving the device a may become 0x 0001. The network access process of the metro network is a network access process under centralized control, that is, address allocation and label allocation of the metro network are both dominated by the metro server, and the node switch and the node server are both passively executed, which is different from label allocation of MPLS, and label allocation of MPLS is a result of mutual negotiation between the switch and the server.
As shown in the following table, the data packet of the metro network mainly includes the following parts:
DA SA Reserved Label Payload CRC
Namely Destination Address (DA), Source Address (SA), Reserved byte (Reserved), tag, payload (pdu), CRC. The format of the tag may be defined by reference to the following: the tag is 32 bits with the upper 16 bits reserved and only the lower 16 bits used, and its position is between the reserved bytes and payload of the packet.

Claims (8)

1. A method for processing a packet, implemented in a first router, comprising:
acquiring a target message, wherein the target message is an Ethernet data message;
determining a first target port corresponding to the target message;
traversing each port except the first target port in a forwarding instance to which the first target port belongs to determine the number of tunnels of a first target tunnel in the forwarding instance;
under the condition that the number of the tunnels is more than 1, encapsulating the target message according to the first tunnel information and a preset encapsulation format of each first target tunnel to obtain a first video networking multicast message;
sending the first video networking multicast message to a video networking server;
the first tunnel information includes a number of the first router, a sub-number of the first router corresponding to the first target tunnel, a number of a first peer router of the first router, and a sub-number of the first peer router corresponding to the first target tunnel, where the first peer router is a router between which the first target tunnel is established and the first router;
the preset packaging format comprises the following steps: a first data position corresponding to the number of a second opposite end router, a second data position corresponding to the number of each second opposite end router, a third data position corresponding to the number of sub-numbers of each second opposite end router, a fourth data position corresponding to the sub-number of each second opposite end router, and a fifth data position corresponding to a received broadcast message or multicast message, wherein the second opposite end router comprises any opposite end router of a router for acquiring the Ethernet data message;
the encapsulating the target message according to the first tunnel information and the preset encapsulating format of each first target tunnel to obtain a first video networking multicast message includes:
filling the number of the first peer router into the first data position, filling the number of each first peer router into the second data position, filling the number of each first peer router into the third data position, filling the number of each first peer router into the fourth data position, and filling the target packet into the fifth data position, so as to obtain the first video networking multicast packet.
2. The method of claim 1, wherein the obtaining the target packet comprises:
acquiring a first Ethernet data message through an Ethernet physical interface of the first router;
taking the first Ethernet data message as the target message;
the determining the first target port corresponding to the target packet includes:
and taking the Ethernet physical interface as the first target port.
3. The method of claim 1, wherein the obtaining the target packet comprises:
acquiring a second video networking multicast message through the video networking physical interface of the first router, wherein the second video networking multicast message is acquired after the second video networking multicast message is received by the ethernet physical interface of the second router and is obtained by encapsulating the second ethernet data message according to second tunnel information of each second target tunnel and the preset encapsulation format, the second target tunnel is a tunnel in each port in a forwarding instance to which the ethernet physical interface of the second router belongs, and the second tunnel information includes the number of the second router, the sub-number of the second router, the number of a third opposite-end router of the second router, and the sub-number of the third opposite-end router;
analyzing the second video networking multicast message to obtain the number of the third opposite-end router, the sub-number of the third opposite-end router and the second Ethernet data message;
searching whether a tunnel corresponding to the number of the third opposite-end router and the sub-number of the third opposite-end router exists or not according to the number of the third opposite-end router and the sub-number of the third opposite-end router;
taking the second Ethernet data message as the target message under the condition that a tunnel corresponding to the number of the third opposite-end router and the sub-number of the third opposite-end router exists;
the determining the first target port corresponding to the target packet includes:
and taking the tunnel corresponding to the number of the third opposite-end router and the sub-number of the third opposite-end router as the first target port.
4. The method of claim 1, wherein traversing each port except the first destination port in the forwarding instance to which the destination port belongs to determine the number of tunnels of the first destination tunnel in the forwarding instance comprises:
when a second target port in each traversed port is a tunnel, accumulating 1 for the current number of the tunnels in each port, and judging whether each port is traversed according to the number of all ports in the forwarding example and the number of traversed ports;
and under the condition of traversing each port, taking the current number after 1 accumulation as the number of the tunnels.
5. A message processing apparatus, provided in a first router, includes:
the system comprises an acquisition module, a processing module and a sending module, wherein the acquisition module is used for acquiring a target message, and the target message is an Ethernet data message;
a first determining module, configured to determine a first target port corresponding to the target packet;
a second determining module, configured to traverse each port except the first destination port in a forwarding instance to which the first destination port belongs, so as to determine the number of tunnels of the first destination tunnel in the forwarding instance;
the encapsulation module is used for encapsulating the target message according to the first tunnel information and a preset encapsulation format of each first target tunnel under the condition that the number of the tunnels is more than 1 so as to obtain a first video networking multicast message;
the sending module is used for sending the first video networking multicast message to a video networking server;
the first tunnel information includes a number of the first router, a sub-number of the first router corresponding to the first target tunnel, a number of a first peer router of the first router, and a sub-number of the first peer router corresponding to the first target tunnel, where the first peer router is a router between which the first target tunnel is established and the first router;
the preset packaging format comprises the following steps: a first data position corresponding to the number of a second opposite end router, a second data position corresponding to the number of each second opposite end router, a third data position corresponding to the number of sub-numbers of each second opposite end router, a fourth data position corresponding to the sub-number of each second opposite end router, and a fifth data position corresponding to a received broadcast message or multicast message, wherein the second opposite end router comprises any opposite end router of a router for acquiring the Ethernet data message;
the encapsulation module is specifically configured to fill in the number of the first peer router to the first data location, fill in the number of each first peer router to the second data location, fill in the number of the sub-number of each first peer router to the third data location, fill in the sub-number of each first peer router to the fourth data location, and fill in the target packet to the fifth data location, so as to obtain the first video networking multicast packet.
6. The apparatus according to claim 5, wherein the obtaining module is specifically configured to obtain a second video networking multicast packet through the video networking physical interface of the first router, wherein, the second multicast message of the video network is that after the ethernet physical interface of the second router receives the second ethernet data message, according to the second tunnel information of each second target tunnel and the preset encapsulation format, the second target tunnel is obtained by encapsulating the second ethernet datagram, and is a tunnel in each port in a forwarding instance to which an ethernet physical interface of the second router belongs, the second tunnel information comprises the number of the second router, the sub-number of the second router, the number of a third opposite-end router of the second router, and the sub-number of the third opposite-end router;
analyzing the second video networking multicast message to obtain the number of the third opposite-end router, the sub-number of the third opposite-end router and the second Ethernet data message;
searching whether a tunnel corresponding to the number of the third opposite-end router and the sub-number of the third opposite-end router exists or not according to the number of the third opposite-end router and the sub-number of the third opposite-end router;
taking the second Ethernet data message as the target message under the condition that a tunnel corresponding to the number of the third opposite-end router and the sub-number of the third opposite-end router exists;
the first determining module is specifically configured to use a tunnel corresponding to the number of the third peer router and the sub-number of the third peer router as the first target port.
7. A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, implements a message processing method according to any one of claims 1 to 4.
8. A message processing apparatus comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program when executed by the processor implementing the steps of the message processing method according to any of claims 1 to 4.
CN201911331047.5A 2019-12-20 2019-12-20 Message processing method and device and readable storage medium Active CN111193671B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911331047.5A CN111193671B (en) 2019-12-20 2019-12-20 Message processing method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911331047.5A CN111193671B (en) 2019-12-20 2019-12-20 Message processing method and device and readable storage medium

Publications (2)

Publication Number Publication Date
CN111193671A CN111193671A (en) 2020-05-22
CN111193671B true CN111193671B (en) 2022-09-13

Family

ID=70709243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911331047.5A Active CN111193671B (en) 2019-12-20 2019-12-20 Message processing method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN111193671B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104935594A (en) * 2015-06-16 2015-09-23 杭州华三通信技术有限公司 Message processing method based on virtual extensible local area network tunnel and device
CN106464708A (en) * 2014-06-25 2017-02-22 柏思科技有限公司 Methods and systems for transmitting and receiving data through one or more tunnel for packets satisfying one or more conditions

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7424019B1 (en) * 2001-11-27 2008-09-09 Marvell Israel (M.I.S.L) Ltd. Packet header altering device
CN101394361B (en) * 2008-11-10 2011-07-27 杭州华三通信技术有限公司 Packet transmission method, device and system
CN101783734A (en) * 2010-01-29 2010-07-21 华为技术有限公司 Multicast packet forwarding method, device and system
CN102752210B (en) * 2012-07-09 2015-10-14 瑞斯康达科技发展股份有限公司 The method and system of message transmission between a kind of local area network (LAN)
CN105812259B (en) * 2014-12-31 2019-05-07 新华三技术有限公司 A kind of message forwarding method and equipment
CN108234269B (en) * 2016-12-15 2021-09-21 新华三技术有限公司 Multicast message forwarding method and device
CN110545244A (en) * 2019-08-12 2019-12-06 视联动力信息技术股份有限公司 message distribution method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106464708A (en) * 2014-06-25 2017-02-22 柏思科技有限公司 Methods and systems for transmitting and receiving data through one or more tunnel for packets satisfying one or more conditions
CN104935594A (en) * 2015-06-16 2015-09-23 杭州华三通信技术有限公司 Message processing method based on virtual extensible local area network tunnel and device

Also Published As

Publication number Publication date
CN111193671A (en) 2020-05-22

Similar Documents

Publication Publication Date Title
CN109194660B (en) Network access method and device of mobile terminal
CN110198345B (en) Data request method, system and device and storage medium
CN110035005B (en) Data processing method and device
CN109818960B (en) Data processing method and device
CN111629280A (en) Packet loss processing method and device and readable storage medium
CN110557319B (en) Message processing method and device based on video network
CN110545244A (en) message distribution method and device
CN110650147A (en) Data acquisition method and system
CN111555975B (en) Data sending method and device, electronic equipment and storage medium
CN111211982B (en) Data forwarding method and device, electronic equipment and storage medium
CN110493149B (en) Message processing method and device
CN111193905B (en) Monitoring resource allocation method and device and readable storage medium
CN110336796B (en) Communication method and communication device
CN110336710B (en) Terminal testing method, system and device and storage medium
CN109889516B (en) Method and device for establishing session channel
CN109769012B (en) Web server access method and device
CN111478880A (en) Data processing method and device
CN108881148B (en) Data acquisition method and device
CN110557411A (en) video stream processing method and device based on video network
CN111193671B (en) Message processing method and device and readable storage medium
CN111478940B (en) Data processing method and device
CN110808896B (en) Data transmission method and device, electronic equipment and storage medium
CN110493191B (en) Windows platform data forwarding method and device, electronic equipment and readable storage medium
CN111614536A (en) Data forwarding method and device
CN111787416A (en) Data packet processing method and device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 33rd Floor, No.1 Huasheng Road, Yuzhong District, Chongqing 400013

Patentee after: VISIONVERA INFORMATION TECHNOLOGY Co.,Ltd.

Country or region after: China

Address before: 100000 Beijing Dongcheng District Qinglong Hutong 1 Song Hua Building A1103-1113

Patentee before: VISIONVERA INFORMATION TECHNOLOGY Co.,Ltd.

Country or region before: China