CN111555975B - Data sending method and device, electronic equipment and storage medium - Google Patents

Data sending method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111555975B
CN111555975B CN202010203148.0A CN202010203148A CN111555975B CN 111555975 B CN111555975 B CN 111555975B CN 202010203148 A CN202010203148 A CN 202010203148A CN 111555975 B CN111555975 B CN 111555975B
Authority
CN
China
Prior art keywords
router
video network
video
network
target
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
CN202010203148.0A
Other languages
Chinese (zh)
Other versions
CN111555975A (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 CN202010203148.0A priority Critical patent/CN111555975B/en
Publication of CN111555975A publication Critical patent/CN111555975A/en
Application granted granted Critical
Publication of CN111555975B publication Critical patent/CN111555975B/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/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]

Landscapes

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

Abstract

The application provides a data sending method, a data sending device, electronic equipment and a storage medium, which are applied to a router of a video network, wherein the method comprises the following steps: receiving target data sent by a previous video network router; determining a next video network router for receiving target data according to a preset forwarding mechanism; the method comprises the steps that a pre-established learning table corresponding to a next video network router is obtained through a target virtual interface corresponding to the next video network router, and the target virtual interface is used for managing the learning table corresponding to at least one other video network router; determining a target video network tunnel according to the path information recorded in the learning table; and sending the target data to the next video network router through the target video network tunnel. Each virtual interface of the video network router can correspond to a plurality of other video network routers, so that the development amount of the virtual interfaces can be obviously reduced, and the code development logic in the video network service processing process and the configuration logic of the router per se can be simplified.

Description

Data sending method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data transmission method and apparatus, an electronic device, and a storage medium.
Background
In the field of video networking communication, a video networking router is provided with a virtual interface for managing a video networking tunnel associated with other video networking routers (when two virtual terminals establish a video telephone through a video networking signaling message, one expression form of the video telephone inside is called the video networking tunnel). After receiving the data of the previous video network router, one video network router searches the next video network router to be sent, and sends the data to the video network router through the video network tunnel which is managed in the virtual interface and is associated with the video network router. However, in the related art, the video networking tunnels and the virtual interfaces are in one-to-one correspondence, and in a network environment with one-to-many (i.e., one video networking router corresponds to a plurality of video networking routers), a plurality of virtual interfaces are required to be arranged to support data transmission services, so that the code development logic in the video networking service processing process and the configuration logic of the routers themselves are greatly increased.
Disclosure of Invention
The embodiment of the application provides a data sending method, a data sending device, electronic equipment and a storage medium, and aims to simplify code development logic and configuration logic of a router in the video networking service processing process.
A first aspect of an embodiment of the present application provides a data sending method, which is applied to a router of a video network, and the method includes:
receiving target data sent by a previous video networking router;
determining a next video networking router for receiving the target data according to a preset forwarding mechanism;
acquiring a pre-created learning table corresponding to the next video network router through a target virtual interface corresponding to the next video network router, wherein the learning table is used for recording the path information of the next video network router, and the target virtual interface is used for managing the learning table corresponding to at least one other video network router;
determining a target video network tunnel according to the path information recorded in the learning table;
sending the target data to the next video-networking router through the target video-networking tunnel.
Optionally, obtaining, through a target virtual interface corresponding to the next video network router, a pre-created learning table corresponding to the next video network router, includes:
determining a network area where the next video networking router is located, wherein the network area is obtained by pre-dividing;
and acquiring a learning table corresponding to the next video network router through the virtual interface corresponding to the network area, wherein one network area corresponds to one virtual interface.
Optionally, the method further comprises:
when a pre-established learning table corresponding to the next video network router cannot be obtained, or the type of the target data is a broadcast message or a multicast message, determining all video network tunnels which have established a tunnel service association relationship with the virtual interface;
sending the target data to the next view network router through the target view network tunnel, including:
and sending the target data to all the video network routers corresponding to all the video network tunnels with the tunnel service incidence relation established by the virtual interface, so that each video network router forwards the target data respectively, and one video network tunnel corresponds to one video network router.
Optionally, the path information at least includes: MAC address and sub-device number; after receiving the target data sent by the last video network router, the method further comprises:
obtaining the path information of the last video network router from the target data;
and when the learning table corresponding to the last video network router is not stored, creating the learning table corresponding to the last video network router according to the path information.
Optionally, the method further comprises:
when the learning table corresponding to the last router of the video network is stored, updating the timestamp of the learning table;
periodically detecting the time stamps of all the stored learning tables;
determining a learning table to be deleted from all learning tables according to the time stamp, wherein the difference value between the time stamp of the learning table to be deleted and the current time stamp is greater than a preset threshold value;
and deleting the learning table to be deleted.
Optionally, after obtaining the path information of the last video network router from the target data, the method further includes:
determining the video network tunnel used by the last video network router according to the path information;
processing the target data through a tunnel processing function bound with the tunnel of the video network to obtain source data;
obtaining a destination address of a target user terminal from the source data;
determining a next video networking router of the target data according to a preset forwarding mechanism, comprising:
determining a next video networking router of the target data according to the preset forwarding mechanism and the destination address;
sending the target data to the next view network router through the target view network tunnel, including:
and packaging the source data into the target data through the target video network tunnel, and sending the target data to the next video network router.
Optionally, the method further comprises:
and when the next video network router does not exist and the next data receiving device is the target user terminal, sending the source data to the target user terminal.
Optionally, the method further comprises:
receiving the source data sent by a source user terminal;
obtaining the destination address from the source data;
determining a next video networking router of the target data according to the preset forwarding mechanism and the destination address;
obtaining a pre-established learning table corresponding to the next video network router through a target virtual interface corresponding to the next video network router;
determining the target video network tunnel according to the path information recorded in the learning table;
packaging the source data into the target data through the target video network tunnel, and sending the target data to the next video network router;
and when the next video network router does not exist and the next data receiving device is the target user terminal, sending the source data to the target user terminal.
Optionally, before receiving the data sent by the last video networking router, the method further includes:
creating at least one virtual interface;
establishing tunnel service association between the at least one virtual interface and the video network routers in at least one network area, wherein one virtual interface and all the video network routers in one network area have tunnel service association relation;
obtaining a learning table corresponding to the next video networking router through a virtual interface corresponding to the network area, including:
and acquiring the learning table corresponding to the next video network router from the learning tables corresponding to all the video network routers with the tunnel service incidence relation with the virtual interface.
A second aspect of the embodiments of the present application provides a data sending apparatus, which is applied to a router of a video network, and the apparatus includes:
the first receiving module is used for receiving the target data sent by the last router of the video network;
the first determining module is used for determining the next video networking router for receiving the target data according to a preset forwarding mechanism;
a first obtaining module, configured to obtain a pre-created learning table corresponding to the next video-networking router through a target virtual interface corresponding to the next video-networking router, where the learning table is used to record path information of the next video-networking router, and the target virtual interface is used to manage a learning table corresponding to at least one other video-networking router;
the second determining module is used for determining a target video network tunnel according to the path information recorded in the learning table;
and the first sending module is used for sending the target data to the next video network router through the target video network tunnel.
A third aspect of embodiments of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method according to the first aspect of the present application when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, performs the steps in the method according to the first aspect of the present application.
By the data transmission method provided by the present application, in the data transmission method provided by this embodiment, after receiving target data sent by a previous video network router, a current video network router determines, according to a preset forwarding mechanism, a next video network router that receives the target data, then obtains a learning table corresponding to the next video network router through a target virtual interface corresponding to the next video network router (the target virtual interface is used for managing a learning table corresponding to at least one other video network router), obtains path information of a video network tunnel established between the next video network router from the learning table, further determines a target video network tunnel according to the path information, and finally transmits the target data to the next video network router through the target video network tunnel.
In the process, each virtual interface in the router manages the video networking tunnels of a plurality of other video networking routers, and compared with a mode that one virtual interface corresponds to only one video networking tunnel in the related art, the method can obviously reduce the development amount of the virtual interface, and simplify the code development logic in the video networking service processing process and the configuration logic of the router; in addition, the virtual interface of video networking router adopts the form management path information in each video networking tunnel of study table, and then can obtain the study table that next video networking router corresponds from a plurality of study tables, and this kind of mode through the study table confirms target video networking tunnel can show the efficiency that improves the target video networking tunnel of looking for, and then promotes data transmission efficiency.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings may be obtained according to these drawings without inventive labor.
FIG. 1 is a schematic illustration of an implementation environment shown in an embodiment of the present application;
fig. 2 is a flowchart illustrating a data transmission method according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating an internal configuration of a video networking router according to an embodiment of the present application;
fig. 4 is a schematic overall flow chart of a data transmission method according to an embodiment of the present application;
fig. 5 is a block diagram illustrating a data transmission apparatus according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating a networking of a video network according to an embodiment of the present application;
fig. 7 is a schematic diagram illustrating a hardware structure of a node server according to an embodiment of the present application;
fig. 8 is a schematic diagram illustrating a hardware structure of an access switch according to an embodiment of the present application;
fig. 9 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, of the embodiments of the present application. 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.
FIG. 1 is a schematic diagram of an implementation environment shown in an embodiment of the present application. In fig. 1, each view network router can establish a communication connection with other view network routers through a view network tunnel, n1 virtual interfaces are provided in each view network router, and each virtual interface can manage n2 (normally, n1 is lower than n 2) view network tunnels. One video network router can receive the data sent by other video network routers through the video network interface and forward the data to the next video network router through the video network tunnel, for example, video network router 1 receives the data sent by PC1 and sends the data to PC2 through video network router 2 and video network router 3 in sequence.
Considering that in the related art, since each virtual interface in the video networking router uniquely corresponds to one video networking tunnel (i.e. n1 is equal to n 2), a plurality of virtual interfaces are required to be arranged to support data transmission service in a one-to-many network environment, and the code development logic in the video networking service processing process and the configuration logic of the router itself are greatly increased. Therefore, the present application provides a technical concept that one virtual interface corresponds to a plurality of view networking tunnels and data forwarding is performed based on a learning table, so as to solve the problems in the related art.
Based on the technical concept, the application provides a data transmission method, which is applied to the router of the video network in fig. 1, as shown in fig. 2. Fig. 2 is a flowchart illustrating a data transmission method according to an embodiment of the present application. Referring to fig. 2, the data transmission method of the present application may include the steps of:
step S11: and receiving the target data sent by the last video network router.
In this embodiment, the type of the last data sending device of each video network router may be a video network router or a user terminal, and the type of the next data sending device may be a video network router or a user terminal, so that a certain video network router may receive data from the video network router or the user terminal, and then send the data to the next video network router or the next user terminal. In order to better state the data transmission method of the present application, in this embodiment, the type of the last data transmission device and the type of the next data transmission device of the view network router are both the view network router as an example, and the case where the type of the last data transmission device and the type of the next data transmission device are the user terminal will be described in other embodiments.
Illustratively, taking the view networking router 2 in the implementation environment shown in fig. 1 as an example, the view networking router 2 may receive, through the view networking interface 2, target data sent by the view networking router 1, the target data being data received by the view networking router 1 through the view networking interface 1 and sent by the PC1 to the PC2.
Step S12: and determining the next video network router for receiving the target data according to a preset forwarding mechanism.
In this embodiment, the preset forwarding mechanism, that is, the preset routing mechanism, may be, for example, a shortest path mechanism or a path optimization mechanism, and what kind of routing mechanism is adopted may be set according to actual requirements, which is not specifically limited in this application.
In this embodiment, the destination address of the target user terminal may be obtained from the target data, and then the next router of the video network may be determined according to the preset forwarding mechanism. Taking PC1 in fig. 1 sending data to PC2 as an example, after receiving the data forwarded by the view network router 1, the view network router 2 determines a destination address according to the data, that is: and the address of the PC2 determines that the next video network router is the video network router 3 according to a preset forwarding mechanism, then forwards the target data to the video network router 3, and the video network router 3 forwards the target data to the PC2.
Step S13: and obtaining a pre-established learning table corresponding to the next video network router through a target virtual interface corresponding to the next video network router, wherein the learning table is used for recording the path information of the next video network router, and the target virtual interface is used for managing the learning table corresponding to at least one other video network router.
In this embodiment, step S13 may specifically be: determining a target virtual interface for managing the video network tunnel of the next video network router, and acquiring a pre-established learning table corresponding to the next video network router through the target virtual interface, wherein one virtual interface manages the video network tunnels of a plurality of video network routers, and one video network tunnel corresponds to one learning table.
In the embodiment, the data transmission is carried out between the routers of the visual networking through the visual networking tunnel. Thus, after determining the next view network router, the view network tunnel associated with the next view network router needs to be obtained. Specifically, the target data is internally routed to a virtual interface managing the video network tunnel of the next video network router, the virtual interface checks whether a learning table corresponding to the next video network router is stored in the virtual interface, and if the learning table exists, path information of the next video network router is obtained from the learning table and can be used for determining the video network tunnel associated with the next video network router.
Taking PC1 in fig. 1 as an example of sending data to PC2, after determining that the next video network router is video network router 3, video network router 2 internally routes the target data to the virtual interface managing the video network tunnel of the next video network router, assuming virtual interface n1, then obtains the learning table corresponding to video network router 3 from virtual interface n1 (virtual interface n1 manages the learning table corresponding to a plurality of other video network routers), obtains the path information of the video network tunnel established between video network router 2 and video network router 3 from the learning table, and according to the path information, determines the video network tunnel, for example, video network tunnel n2, and then sends the target data to video network router 3 through video network tunnel n2.
Step S14: and determining a target video networking tunnel according to the path information recorded in the learning table.
In this embodiment, after obtaining the path information in the learning table, the router of the video network may determine the target video network tunnel according to the path information recorded in the learning table.
Illustratively, taking PC1 in fig. 1 as an example of sending data to PC2, the view router 2 may determine, according to the path information in the learning table corresponding to the view router 3, a view tunnel for sending the target data, for example, view tunnel n2.
Step S15: sending the target data to the next view network router through the target view network tunnel.
In this embodiment, after the target internet-of-view tunnel is determined, the target data may be sent to the next internet-of-view router through the target internet-of-view tunnel.
Illustratively, taking PC1 in fig. 1 as an example of sending data to PC2, after determining that the target view network tunnel is view network tunnel n2, view network router 2 sends the target data to view network router 3 through view network tunnel n2.
In the data transmission method provided by this embodiment, after receiving target data sent by a previous video networking router, a current video networking router determines, according to a preset forwarding mechanism, a next video networking router that receives the target data, then obtains, through a target virtual interface corresponding to the next video networking router (the target virtual interface is used to manage a learning table corresponding to at least one other video networking router), a learning table corresponding to the next video networking router, obtains, from the learning table, path information of a video networking tunnel established between the current video networking router and the next video networking router, further determines a target video networking tunnel according to the path information, and finally transmits the target data to the next video networking router through the target video networking tunnel. In the process, each virtual interface in the router manages the video networking tunnels of a plurality of other video networking routers, and compared with a mode that one virtual interface corresponds to only one video networking tunnel in the related art, the method can obviously reduce the development amount of the virtual interface, and simplify the code development logic in the video networking service processing process and the configuration logic of the router; in addition, the virtual interface of video networking router adopts the form management path information in each video networking tunnel of study table, and then can obtain the study table that next video networking router corresponds from a plurality of study tables, and this kind of mode through the study table confirms target video networking tunnel can show the efficiency that improves the target video networking tunnel of looking for, and then promotes data transmission efficiency.
In combination with the above embodiments, in an implementation manner, there is also provided a method for obtaining a learning table, which may include the following steps:
determining a network area where the next video network router is located, wherein the network area is obtained by pre-dividing;
and acquiring a learning table corresponding to the next video network router through the virtual interface corresponding to the network area, wherein one network area corresponds to one virtual interface.
In this embodiment, considering that in actual implementation, the coverage area of the video network is wide, and the number of the video network routers is large, the video network may be divided into a plurality of network areas in advance, for example, divided into a plurality of network areas according to geographic locations, etc., the video network routers in each network area form a group of video network routers, and then all the video network routers are divided into a plurality of groups of video network routers, and correspond to one network area according to one virtual interface, that is: and establishing association between the virtual interface and the video network router in a mode corresponding to a group of video network routers. Illustratively, 3 network areas including an area 1, an area 2 and an area 3 are divided in advance, wherein 10 video networking routers are arranged in the area 1, 20 video networking routers are arranged in the area 2, and 15 video networking routers are arranged in the area 3; respectively establishing tunnel service incidence relations with 10 video network routers in the area 1 by using the virtual interface 1, and managing the established video network tunnels by using the virtual interface 1; respectively establishing tunnel service association relations with 20 video network routers in the area 2by using the virtual interface 2, and managing the established video network tunnels by the virtual interface 2; the virtual interface 3 is used to establish tunnel service association relationship with 15 video network routers in the area 3, and the virtual interface 3 manages the established video network tunnels.
In this embodiment, after the view network is partitioned into regions according to the above-mentioned manner, each networking router necessarily belongs to a unique network region, and after the current view network router determines the next view network router, the current view network router first determines the network region where the next view network router is located, and then can obtain the virtual interface for managing the network region, and then internally routes the target data to the virtual interface, and the virtual interface obtains the learning table corresponding to the next view network router.
In this embodiment, each video networking router adopts a virtual interface to manage all video networking tunnels of all video networking routers in a network area, and compared with a method in the related art in which one virtual interface corresponds to only one video networking tunnel, the method can significantly reduce the development amount of the virtual interface, and simplify the code development logic in the video networking service processing process and the configuration logic of the router itself.
With reference to the foregoing embodiment, in an implementation manner, the data sending method of the present application may further include:
when a pre-established learning table corresponding to the next video network router cannot be obtained, or the type of the target data is a broadcast message or a multicast message, determining all video network tunnels which establish a tunnel service association relationship with the virtual interface;
accordingly, sending the target data to the next view network router through the target view network tunnel comprises:
and sending the target data to all the video network routers corresponding to all the video network tunnels with the tunnel service incidence relation established by the virtual interface, so that each video network router forwards the target data respectively, and one video network tunnel corresponds to one video network router.
In this embodiment, if the current view networking router cannot find the learning table corresponding to the next view networking router, the target data is directly sent to other view networking routers through all the view networking tunnels corresponding to the virtual interfaces, so that the other view networking routers forward the target data.
In this embodiment, after receiving the target data, if the type of the target data is a broadcast packet or a multicast packet, the current video network router internally routes the target data to all virtual interfaces, so that after receiving the target data, each virtual interface directly sends the target data to other video network routers through all video network tunnels corresponding to the virtual interface, so that the other video network routers forward the target data.
In this embodiment, when the learning table is not found, the target data is directly sent to other video network routers through all the video network tunnels corresponding to the virtual interface, so that the other video network routers forward the target data according to the learning table stored in the other video network routers, and compared with a tedious process of re-obtaining the path information of the next video network router and determining the target video network tunnel according to the path information, the data transmission efficiency can be remarkably improved.
With reference to the above embodiments, in an implementation manner, the path information at least includes: MAC address and sub-device number; after receiving the target data sent by the last router of the video network, the data sending method of the application may further include:
obtaining the path information of the last video network router from the target data;
and when the learning table corresponding to the last video network router is not stored, creating the learning table corresponding to the last video network router according to the path information.
In this embodiment, each video network router has a unique MAC address, and each video network router has a plurality of corresponding sub-devices, where a sub-device can be understood as a functional module for processing different types of data, and each sub-device has a sub-device number.
In this embodiment, when sending data to the next video network router, each video network router carries path information of the video network tunnel used in this sending, for example, its own MAC address and the number of the used sub-device. Thus, the current router can obtain the path information of the last router from the target data (i.e. the path information of the tunnel of the last router); and then judging whether the learning table corresponding to the previous video network router is stored or not, if not, establishing the learning table corresponding to the previous video network router by utilizing the path information of the previous video network router, so that data can be sent to the previous video network router according to the learning table when the previous video network router is taken as data receiving equipment next time.
In practical implementation, taking the example that no learning table of other video network routers is created inside all video network routers, when a first video network router receives data sent by a user terminal, because no learning table exists, after the data is internally routed to a corresponding virtual interface, the virtual interface sends the data to other video network routers through all video network tunnels corresponding to the virtual interface, so that after other video network routers receive the data, the path information of the video network tunnel used by the current video network router can be obtained from the data, and then the corresponding video network tunnel is created.
Exemplarily, the video network router 1 does not create a learning table corresponding to other video network routers, and after receiving data sent by a user terminal, the video network router 1 finds that the type of the data is a broadcast message or a multicast message, and internally routes the data to all virtual interfaces; these virtual interfaces send the data to other view network routers through all the view network tunnels corresponding to themselves, for example, the other view network routers receiving the data are view network router 2-view network router 100, then, for each of view network router 2-view network router 100, obtain the path information of the view network tunnel used by view network router 1 from the data, and create a learning table corresponding to view network router 1, so that the learning table can be used the next time data is sent to view network router 1; after that, the video networking router 2-video networking router 100 continues to send data to other video networking routers, so that other video networking routers further create corresponding learning tables, and according to the above principle, video networking routers in the whole video networking can create learning tables corresponding to other video networking routers.
The embodiment provides a mode for creating a learning table, and the learning table corresponding to the video network router can be quickly and conveniently created through the mode, so that the efficiency of data transmission between the video network routers is accelerated.
With reference to the foregoing embodiment, in an implementation manner, the data transmission method of the present application may further include:
when the learning table corresponding to the last router of the video network is stored, updating the time stamp of the learning table;
periodically detecting the time stamps of all the stored learning tables;
determining a learning table to be deleted from all learning tables according to the time stamp, wherein the difference value between the time stamp of the learning table to be deleted and the current time stamp is greater than a preset threshold value;
and deleting the learning table to be deleted.
In this embodiment, if the current view networking router determines that it has stored the learning table corresponding to the last view networking router, the timestamp of the learning table is updated.
In this embodiment, each video network router periodically detects the timestamps of all the learning tables stored in itself, and deletes the learning table when the difference between the timestamp and the current timestamp is greater than the preset threshold. Because the learning table records the path information of the most recently used video network tunnel between the two video network routers, when the data transmission between the two video network routers is not carried out for a long time, the learning table is deleted to save the memory space occupied by the learning table, and a new learning table is established again when the data transmission is carried out next time.
In this embodiment, the learning table to be deleted is periodically deleted, so that the memory space occupied by the learning table can be saved, the pressure of the video network router is reduced, and the data transmission efficiency is improved.
With reference to the foregoing embodiment, in an implementation manner, after obtaining the path information of the last router of the internet of view from the target data, the data sending method of the present application may further include:
determining the video network tunnel used by the last video network router according to the path information;
processing the target data through a tunnel processing function bound with the video networking tunnel to obtain source data;
obtaining a destination address of a target user terminal from the source data;
correspondingly, according to a preset forwarding mechanism, determining a next video networking router of the target data, including:
determining a next video networking router of the target data according to the preset forwarding mechanism and the destination address;
accordingly, sending the target data to the next view network router through the target view network tunnel comprises:
and packaging the source data into the target data through the target video network tunnel, and sending the target data to the next video network router.
In this embodiment, each of the video networking tunnels has a corresponding tunneling processing function, and the tunneling processing function may process the format of the data, for example, decapsulate the data in the video networking protocol format to obtain the data in the internet protocol format, or encapsulate the data in the internet protocol format into the data in the video networking protocol format.
After the current sight networking router obtains the path information of the last sight networking router from the target data, the sight networking tunnel used by the last sight networking router can be determined according to the path information, a tunnel processing function bound by the sight networking tunnel is further obtained, the target data is restored into source data through the tunnel processing function, wherein the target data is data in a sight networking format, and the source data is data in an interconnected grid form and sent to the sight networking router by a user terminal; then, the destination address of the target user terminal is obtained from the source data; then, determining the next router of the video network according to a preset forwarding mechanism and the destination address; and obtaining a target video network tunnel associated with the next video network router, packaging the source data into target data (namely, packaging the data in the form of interconnected network into data in the format of video network) through the target video network tunnel, and finally sending the target data to the next video network router.
In this embodiment, the video network router may process the received target data through a tunnel processing function bound to the video network tunnel, for example, decapsulate the data in the video network format into data in the internet format, or encapsulate the data in the internet format into the data in the video network format, thereby implementing transmission of the data in the internet format.
With reference to the foregoing embodiment, in an implementation manner, the data sending method of the present application may further include:
and when the next video network router does not exist and the next data receiving device is the target user terminal, sending the source data to the target user terminal.
In this embodiment, if the current view networking router determines that the next data receiving device is the target user terminal, the source data is directly sent to the target user terminal without being encapsulated as the target data and sent to other view networking routers.
With reference to the foregoing embodiment, in an implementation manner, the data sending method of the present application may further include:
receiving the source data sent by a source user terminal;
obtaining the destination address from the source data;
determining a next video networking router of the target data according to the preset forwarding mechanism and the destination address;
obtaining a pre-established learning table corresponding to the next video network router through a target virtual interface corresponding to the next video network router;
determining the target video network tunnel according to the path information recorded in the learning table;
packaging the source data into the target data through the target video network tunnel, and sending the target data to the next video network router;
and when the next video network router does not exist and the next data receiving device is the target user terminal, sending the source data to the target user terminal.
In this embodiment, each video network router may receive data sent by a user terminal in addition to data sent by other video network routers, that is: source data in an internet protocol format. After receiving source data sent by a source user terminal, directly obtaining a destination address from the source data, determining a next video network router according to the destination address and a preset forwarding mechanism, further obtaining a target video network tunnel, packaging the source data into target data in a video network protocol format through the target video network tunnel, and then sending the target data to the next video network router; if the next video network router does not exist and the next data receiving device is the target user terminal, the source data is directly sent to the target user terminal without being packaged into the target data in the video network protocol format.
With reference to the foregoing embodiment, in an implementation manner, before receiving data sent by a previous router of the internet of view, the data sending method of the present application may further include:
creating at least one virtual interface;
establishing tunnel service association between the at least one virtual interface and the video network routers in at least one network area, wherein one virtual interface and all the video network routers in one network area have tunnel service association relation;
accordingly, obtaining a learning table corresponding to the next view network router through a virtual interface corresponding to the network region includes:
and acquiring the learning table corresponding to the next video network router from the learning tables corresponding to all the video network routers with the tunnel service incidence relation with the virtual interface.
In this embodiment, first, a virtual interface needs to be created in the view network router, and then, an association between the virtual interface and a tunnel service of the view network router in the network area is created, where one virtual interface has a tunnel service association relationship with all the view network routers in one network area, so that the current view network router can obtain a learning table corresponding to the next view network router from the learning tables corresponding to all the view network routers having a tunnel service association relationship with the virtual interface.
In this embodiment, each of the video networking routers adopts a virtual interface to manage all the video networking tunnels of all the video networking routers in a network area, which can significantly reduce the development amount of the virtual interface and simplify the code development logic and the configuration logic of the router itself in the video networking service processing process, compared with the mode in which one virtual interface corresponds to only one video networking tunnel in the related art.
Fig. 3 is a schematic diagram illustrating an internal configuration structure of a router of an internet of view according to an embodiment of the present application. Referring to fig. 3, in each embodiment of the present application, after initialization, a router of an internet of view needs to be configured, which specifically includes: creating a virtual interface container (container, i.e., modular data storage and management entity) and a forwarding instance container (instance, a representation of a storage and management data member); a plurality of virtual interface instances can be created in one virtual interface container, one virtual interface instance corresponds to one virtual interface, a plurality of video networking tunnels are bound in one virtual interface instance, and the video networking tunnels finally send data to other video networking routers through the video networking interfaces (the video networking routers receive and send the data through the video networking interfaces, namely, the video networking interfaces are communicated and interacted with other equipment); a forwarding instance container can create a plurality of forwarding instances, one forwarding instance has a learning table instance, one learning table instance corresponds to one virtual interface instance, one learning table instance has a plurality of learning tables, and the learning tables are learning tables of the video network tunnels managed by the corresponding virtual interfaces; in addition, each forwarding instance is also provided with a timer which is used for periodically traversing all the learning tables, and when the difference value between the timestamp of the learning table and the current timestamp exceeds a preset threshold value, the learning table is deleted, so that the management of the learning table is realized, and the effectiveness of the learning table is ensured.
Fig. 4 is a schematic overall flow chart of a data transmission method according to an embodiment of the present application. The data transmission method of the present application will be described in its entirety with reference to fig. 4.
For example, in fig. 4, the view networking switch is a view networking router, the tunnel is a view networking tunnel, and V2V (VisionVera) is a view networking, before performing data service, all the view networking switches need to enter a network in advance through a view networking signaling message, establish a tunnel with other view networking switches, and bind the tunnel with a virtual interface, for example, the view networking switch 1 establishes an association with the view networking switch 3 through the tunnel 1, establishes an association with the view networking switch 2 through the tunnel 2, and the view networking switch 2 establishes an association with the view networking switch 3 through the tunnel 3. When a PC1 initiates a data service to a PC2, a video network switch 1 receives source data through a video network interface, determines that the next video network switch is a video network switch 2, internally routes the source data to a virtual interface corresponding to the video network switch, searches a learning table corresponding to the video network switch 2 through the virtual interface, and if the learning table is found and a target tunnel recorded in the learning table is a tunnel 2, encapsulates the source data into target data in a video network format through the tunnel 2 and sends the target data to the video network switch 2; after receiving the target data, the video network switch 2 determines a tunnel used by the video network switch 1, namely the tunnel 2, decapsulates the target data into source data through a tunnel processing function bound with the tunnel 2, determines that the next data receiving device is the PC2 according to the source data, and then directly sends the source data to the PC2.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
The application also provides a data sending device, which is applied to the router of the video network, as shown in fig. 5. Fig. 5 is a block diagram illustrating a structure of a data transmission apparatus according to an embodiment of the present application. Referring to fig. 5, the apparatus 500 of the present application may include:
a first receiving module 501, configured to receive target data sent by a previous video networking router;
a first determining module 502, configured to determine, according to a preset forwarding mechanism, a next video networking router that receives the target data;
a first obtaining module 503, configured to obtain a pre-created learning table corresponding to the next video networking router through a target virtual interface corresponding to the next video networking router, where the learning table is used to record path information of the next video networking router, and the target virtual interface is used to manage a learning table corresponding to at least one other video networking router;
a second determining module 504, configured to determine a target video networking tunnel according to the path information recorded in the learning table;
a first sending module 505, configured to send the target data to the next internet of view router through the target internet of view tunnel.
Optionally, the first obtaining module 503 includes:
the first determining submodule is used for determining a network area where the next video network router is located, and the network area is obtained by pre-dividing;
and the first obtaining submodule is used for obtaining a learning table corresponding to the next video network router through a virtual interface corresponding to the network area, and one network area corresponds to one virtual interface.
Optionally, the apparatus 500 further comprises:
a third determining module, configured to determine all video networking tunnels associated with a tunnel service established with the virtual interface when a pre-created learning table corresponding to the next video networking router cannot be obtained, or when the type of the target data is a broadcast packet or a multicast packet;
the first sending module 505 comprises:
and the first sending submodule is used for sending the target data to all the video network routers corresponding to all the video network tunnels with the tunnel service incidence relation established by the virtual interface so that each video network router respectively forwards the target data, and one video network tunnel corresponds to one video network router.
Optionally, the path information at least includes: MAC address and sub-device number; the apparatus 500 further comprises:
a second obtaining module, configured to obtain path information of the last router of the internet of view from the target data;
and the first establishing module is used for establishing the learning table corresponding to the last video network router according to the path information when the learning table corresponding to the last video network router is not stored.
Optionally, the apparatus 500 further comprises:
the updating module is used for updating the time stamp of the learning table when the learning table corresponding to the last video network router is stored;
the detection module is used for periodically detecting the time stamps of all the stored learning tables;
the fourth determining module is used for determining the learning table to be deleted from all the learning tables according to the time stamp, and the difference value between the time stamp of the learning table to be deleted and the current time stamp is larger than a preset threshold value;
and the deleting module is used for deleting the learning table to be deleted.
Optionally, the apparatus 500 further comprises:
a fifth determining module, configured to determine, according to the path information, an internet of view tunnel used by the previous internet of view router;
a third obtaining module, configured to process the target data through a tunnel processing function bound to the view networking tunnel, to obtain source data;
a fourth obtaining module, configured to obtain a destination address of the target user equipment from the source data;
the first determining module 502 comprises:
the second determining submodule is used for determining the next video network router of the target data according to the preset forwarding mechanism and the destination address;
the first sending module 505 comprises:
and the second sending submodule is used for encapsulating the source data into the target data through the target video network tunnel and sending the target data to the next video network router.
Optionally, the apparatus 500 further comprises:
and the second sending module is used for sending the source data to the target user terminal when the next video network router does not exist and the next data receiving device is the target user terminal.
Optionally, the apparatus 500 further comprises:
a second receiving module, configured to receive the source data sent by a source user terminal;
a fifth obtaining module, configured to obtain the destination address from the source data;
a sixth determining module, configured to determine, according to the preset forwarding mechanism and the destination address, a next video networking router of the target data;
a sixth obtaining module, configured to obtain, through a target virtual interface corresponding to the next video networking router, a pre-created learning table corresponding to the next video networking router;
a seventh determining module, configured to determine the target video networking tunnel according to the path information recorded in the learning table;
a third sending module, configured to encapsulate the source data into the target data through the target internet-of-view tunnel, and send the target data to the next internet-of-view router;
and a fourth sending module, configured to send the source data to the target user terminal when the next video network router does not exist and a next data receiving device is the target user terminal.
Optionally, the apparatus 500 further comprises:
a second creation module for creating at least one virtual interface;
the establishing module is used for establishing the tunnel service association between the at least one virtual interface and the video network routers in at least one network area, and one virtual interface and all the video network routers in one network area have a tunnel service association relationship;
the first obtaining sub-module includes:
and the second obtaining submodule is used for obtaining the learning table corresponding to the next video network router from the learning tables corresponding to all the video network routers of which the virtual interfaces have the tunnel service incidence relation.
Based on the same inventive concept, the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the electronic device implements the steps in the data transmission method according to any of the embodiments of the present application.
Based on the same inventive concept, the present application provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps in the data transmission method according to any of the above-mentioned embodiments of the present application.
For the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The video networking is an important milestone of network development, is a real-time network, can realize high-definition video real-time transmission, and pushes a plurality of Internet applications to high-definition video, and high definition is face-to-face.
The video networking adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services such as high-definition video conferences, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delayed television, network teaching, live broadcast, VOD on demand, television mails, personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like into a system platform, and realizes high-definition quality video broadcast through a television or a computer.
To enable those skilled in the art to better understand the embodiments of the present invention, the following description is given of the internet of view:
some of the technologies applied in the video networking are as follows:
network Technology (Network Technology)
Network innovations in video networking have improved the 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 storage 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 directly sent to the user terminal instantly, and the general waiting time of the user 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, but also connected with a single user, a private network user or the sum of one network. 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 matching 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:
an internet of view is a centrally controlled network structure, which may be of the tree, star, ring, etc. type, but on this basis a centralized control node is required in the network to control the entire network.
Fig. 6 is a networking diagram of a video network according to an embodiment of the present application. As shown in fig. 6, 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 central control function in the metropolitan area network and can control the node switch and the node server. The metropolitan area server can be directly connected with the node switch and can also be 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:
fig. 7 is a schematic diagram illustrating a hardware structure of a node server according to an embodiment of the present application. As shown in fig. 7, the system mainly includes a network interface module 201, a switching engine module 202, a CPU module 203, and a disk array module 204;
the packets coming from the network interface module 201, the cpu module 203 and the disk array module 204 all enter the switching engine module 202; the switching engine module 202 performs an operation of looking up the address table 205 on the incoming packet, thereby obtaining the direction information of the packet; and stores the packet in a queue of the corresponding packet buffer 206 based on the packet's steering information; if the queue of the packet buffer 206 is nearly full, it is discarded; the switching engine module 202 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 204 mainly implements control over the hard disk, including initialization, reading, writing, and other operations on the hard disk; the CPU module 203 is mainly responsible for protocol processing with an access switch and a terminal (not shown in the figure), configuring an address table 205 (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 204.
The access switch:
fig. 8 is a schematic diagram illustrating a hardware structure of an access switch according to an embodiment of the present application. As shown in fig. 8, the network interface module (downlink network interface module 301, uplink network interface module 302), switching engine module 303 and CPU module 304 are mainly included;
wherein, the packet (uplink data) coming from the downlink network interface module 301 enters the packet detection module 305; the packet detection module 305 detects whether the Destination Address (DA), the Source Address (SA), the packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id) and enters the switching engine module 303, otherwise, discards the stream identifier; the packet (downstream data) coming from the upstream network interface module 302 enters the switching engine module 303; the incoming data packet of the CPU module 304 enters the switching engine module 303; the switching engine module 303 performs an operation of looking up the address table 306 on the incoming packet, thereby obtaining the direction information of the packet; if the packet entering the switching engine module 303 is from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 307 in association with the stream-id; if the queue of the packet buffer 307 is nearly full, it is discarded; if the packet entering the switching engine module 303 is not from the downlink network interface to the uplink network interface, the data packet is stored in the queue of the corresponding packet buffer 307 according to the guiding information of the packet; if the queue of the packet buffer 307 is close to full, it is discarded.
The switching engine module 303 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 208 is configured by the CPU module 204, and generates tokens for packet buffer queues from all downstream network interfaces to upstream network interfaces at programmable intervals to control the rate of upstream forwarding.
The CPU module 304 is mainly responsible for protocol processing with the node server, configuration of the address table 306, and configuration of the code rate control module 308.
Ethernet protocol conversion gateway
Fig. 9 is a schematic hardware structure diagram of an ethernet protocol conversion gateway according to an embodiment of the present application. As shown in fig. 9, the apparatus mainly includes a network interface module (a downlink network interface module 401 and an uplink network interface module 402), a switch engine module 403, a CPU module 404, a packet detection module 405, a rate control module 408, an address table 406, a packet buffer 407, a MAC adding module 409, and a MAC deleting module 410.
Wherein, the data packet coming from the downlink network interface module 401 enters the packet detection module 405; the packet detection module 405 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 410 subtracts MAC DA, MAC SA, length or frame type (2 byte) and enters the corresponding receiving buffer, otherwise, discards it;
the downlink network interface module 401 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);
reserved bytes consist of 2 bytes;
the payload part has different lengths according to the types of different datagrams, 64 bytes if it is a packet of various protocols, 32+1024=1056 bytes if it is a packet of unicast data, and certainly 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 packet definition for metropolitan area networks
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 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 the present 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 there are 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 0x0001. 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 (R) 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.
Based on the above characteristics of the video network, one of the core concepts of the embodiments of the present invention is provided, following a protocol of the video network, after receiving target data sent by a previous video network router, a current video network router determines a next video network router receiving the target data according to a preset forwarding mechanism, then obtains a learning table corresponding to the next video network router, obtains path information of a video network tunnel established between the current video network router and the next video network router from the learning table, further determines a target video network tunnel according to the path information, and finally sends the target data to the next video network router through the target video network tunnel.
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 will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "include", "including" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or terminal device including a series of elements includes not only those elements but also other elements not explicitly listed or inherent to such process, method, article, or terminal device. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
The data transmission method, apparatus, electronic device and storage medium provided by the present invention are introduced in detail, and specific examples are applied herein to explain the principles and embodiments of the present invention, and the descriptions of the above embodiments are only used to help understanding the method and its core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A data transmission method is applied to a router of a video network, and comprises the following steps:
creating at least one virtual interface, and establishing tunnel service association between the at least one virtual interface and the video network routers in at least one network area, wherein one virtual interface and all the video network routers in one network area have tunnel service association relationship, and one video network tunnel corresponds to one video network router;
receiving target data sent by a previous video network router;
determining a next video network router for receiving the target data according to a preset forwarding mechanism;
obtaining a pre-established learning table corresponding to the next video network router through a target virtual interface corresponding to the next video network router, wherein the learning table is used for recording the path information of the next video network router, and the target virtual interface is used for managing the learning table corresponding to at least one other video network router;
determining a target video networking tunnel according to the path information recorded in the learning table;
sending the target data to the next view network router through the target view network tunnel.
2. The method of claim 1, wherein obtaining a pre-created learning table corresponding to the next view network router through a target virtual interface corresponding to the next view network router comprises:
determining a network area where the next video network router is located, wherein the network area is obtained by pre-dividing;
and acquiring a learning table corresponding to the next video network router through a target virtual interface corresponding to the network area, wherein one network area corresponds to one virtual interface.
3. The method of claim 2, further comprising:
when a pre-established learning table corresponding to the next video network router cannot be obtained, or the type of the target data is a broadcast message or a multicast message, determining all video network tunnels which have established a tunnel service association relationship with the virtual interface;
sending the target data to the next video-networking router through the target video-networking tunnel, comprising:
and sending the target data to all the video network routers corresponding to all the video network tunnels with the tunnel service incidence relation established by the virtual interface, so that each video network router forwards the target data respectively, and one video network tunnel corresponds to one video network router.
4. The method according to claim 1, wherein the path information comprises at least: MAC address and sub-device number; after receiving the target data sent by the last video network router, the method further comprises:
obtaining the path information of the last video network router from the target data;
and when the learning table corresponding to the last video network router is not stored, the learning table corresponding to the last video network router is created according to the path information.
5. The method of claim 4, further comprising:
when the learning table corresponding to the last router of the video network is stored, updating the time stamp of the learning table;
periodically detecting time stamps of all stored learning tables;
determining a learning table to be deleted from all learning tables according to the time stamp, wherein the difference value between the time stamp of the learning table to be deleted and the current time stamp is greater than a preset threshold value;
and deleting the learning table to be deleted.
6. The method of claim 4, wherein after obtaining the path information of the last routing router from the target data, the method further comprises:
determining the video networking tunnel used by the last video networking router according to the path information;
processing the target data through a tunnel processing function bound with the video networking tunnel to obtain source data;
obtaining a destination address of a target user terminal from the source data;
determining a next video network router of the target data according to a preset forwarding mechanism, comprising:
determining a next video network router of the target data according to the preset forwarding mechanism and the destination address;
sending the target data to the next view network router through the target view network tunnel, including:
and packaging the source data into the target data through the target video network tunnel, and sending the target data to the next video network router.
7. The method of claim 2, wherein prior to receiving the data sent by the last video networking router, the method further comprises:
obtaining a learning table corresponding to the next video networking router through a virtual interface corresponding to the network area, including:
and acquiring a learning table corresponding to the next video network router from the learning tables corresponding to all video network routers with the tunnel service incidence relation with the virtual interface.
8. A data transmission apparatus, applied to a router of a video network, the apparatus comprising:
the system comprises a first establishing module, a second establishing module and a third establishing module, wherein the first establishing module is used for establishing at least one virtual interface, establishing the tunnel service association between the at least one virtual interface and the video network routers in at least one network area, and one virtual interface and all the video network routers in one network area have the tunnel service association relationship, and one video network tunnel corresponds to one video network router;
the first receiving module is used for receiving the target data sent by the last router of the video network;
the first determining module is used for determining a next video network router for receiving the target data according to a preset forwarding mechanism;
a first obtaining module, configured to obtain a pre-created learning table corresponding to the next video networking router through a target virtual interface corresponding to the next video networking router, where the learning table is used to record path information of the next video networking router, and the target virtual interface is used to manage a learning table corresponding to at least one other video networking router;
the second determining module is used for determining a target video network tunnel according to the path information recorded in the learning table;
and the first sending module is used for sending the target data to the next video network router through the target video network tunnel.
9. An electronic device, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the electronic device to perform the steps in the data transmission method of any of claims 1-7.
10. A computer-readable storage medium storing a computer program for causing a processor to execute the steps of the data transmission method according to any one of claims 1 to 7.
CN202010203148.0A 2020-03-20 2020-03-20 Data sending method and device, electronic equipment and storage medium Active CN111555975B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010203148.0A CN111555975B (en) 2020-03-20 2020-03-20 Data sending method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010203148.0A CN111555975B (en) 2020-03-20 2020-03-20 Data sending method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111555975A CN111555975A (en) 2020-08-18
CN111555975B true CN111555975B (en) 2022-11-08

Family

ID=72007266

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010203148.0A Active CN111555975B (en) 2020-03-20 2020-03-20 Data sending method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111555975B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114003414B (en) * 2021-12-30 2022-04-01 太平金融科技服务(上海)有限公司深圳分公司 Service return visit processing method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101312433A (en) * 2007-05-24 2008-11-26 全球帕克特有限公司 Processing packets of a virtual interface associated with tunnels
CN101778370A (en) * 2010-01-20 2010-07-14 北京邮电大学 Method of supporting cooperation work of multiple routers by utilizing virtual interface
CN107637037A (en) * 2015-04-07 2018-01-26 安博科技有限公司 The system and method being route for the virtual interface in global virtual network and high-grade intelligent
CN110061897A (en) * 2018-01-19 2019-07-26 思锐科技股份有限公司 Data on flows acquisition methods and system in virtual network tunnel
CN110086798A (en) * 2019-04-23 2019-08-02 北京奇安信科技有限公司 A kind of method and device communicated based on common virtual interface
CN110557319A (en) * 2019-08-28 2019-12-10 视联动力信息技术股份有限公司 Message processing method and device based on video network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7680943B2 (en) * 2003-10-20 2010-03-16 Transwitch Corporation Methods and apparatus for implementing multiple types of network tunneling in a uniform manner

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101312433A (en) * 2007-05-24 2008-11-26 全球帕克特有限公司 Processing packets of a virtual interface associated with tunnels
CN101778370A (en) * 2010-01-20 2010-07-14 北京邮电大学 Method of supporting cooperation work of multiple routers by utilizing virtual interface
CN107637037A (en) * 2015-04-07 2018-01-26 安博科技有限公司 The system and method being route for the virtual interface in global virtual network and high-grade intelligent
CN110061897A (en) * 2018-01-19 2019-07-26 思锐科技股份有限公司 Data on flows acquisition methods and system in virtual network tunnel
CN110086798A (en) * 2019-04-23 2019-08-02 北京奇安信科技有限公司 A kind of method and device communicated based on common virtual interface
CN110557319A (en) * 2019-08-28 2019-12-10 视联动力信息技术股份有限公司 Message processing method and device based on video network

Also Published As

Publication number Publication date
CN111555975A (en) 2020-08-18

Similar Documents

Publication Publication Date Title
CN111193788A (en) Audio and video stream load balancing method and device
CN109889420B (en) Service processing method and device
CN109474715B (en) Resource configuration method and device based on video network
CN110035005B (en) Data processing method and device
CN109818960B (en) Data processing method and device
CN109819062B (en) Method and device for accessing network by using virtual MAC address
CN109787873B (en) Many-to-many network access communication method and device
CN110557319B (en) Message processing method and device based on video network
CN111669337A (en) Flow control method and device
CN110545244A (en) message distribution method and device
CN110266577B (en) Tunnel establishment method and video networking system
CN111555975B (en) Data sending method and device, electronic equipment and storage medium
CN110557411A (en) video stream processing method and device based on video network
CN110740087B (en) Message transmission method, terminal, gateway device, electronic device and storage medium
CN110808896B (en) Data transmission method and device, electronic equipment and storage medium
CN110099307B (en) Node connection method, video network and computer readable storage medium
CN110213533B (en) Method and device for acquiring video stream monitored by video network
CN110445701B (en) Business object processing method and device and storage medium
CN110224853B (en) Control system
CN109714706B (en) Video networking communication method and device
CN109474848B (en) Video processing method and device based on video network, electronic equipment and medium
CN109495709B (en) Video network management system and method
CN110113553B (en) Method and device for processing video telephone
CN111614921A (en) Communication method and device
CN111541858A (en) Audio and video recording method, system and device

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