CN110519009B - Data packet transmission method and device - Google Patents

Data packet transmission method and device Download PDF

Info

Publication number
CN110519009B
CN110519009B CN201910717828.1A CN201910717828A CN110519009B CN 110519009 B CN110519009 B CN 110519009B CN 201910717828 A CN201910717828 A CN 201910717828A CN 110519009 B CN110519009 B CN 110519009B
Authority
CN
China
Prior art keywords
value
destination address
data packet
internet
server
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
CN201910717828.1A
Other languages
Chinese (zh)
Other versions
CN110519009A (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 CN201910717828.1A priority Critical patent/CN110519009B/en
Publication of CN110519009A publication Critical patent/CN110519009A/en
Application granted granted Critical
Publication of CN110519009B publication Critical patent/CN110519009B/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
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0033Systems modifying transmission characteristics according to link quality, e.g. power backoff arrangements specific to the transmitter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses

Landscapes

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

Abstract

本发明实施例提供了一种数据包传输方法和装置,应用于视联网中,包括:获取至少一个待发送的数据包;对所述数据包进行解析计算,获得第一数值,其中所述第一数值为所述数据包的目的地址对应的数值;根据预先配置的规则表进行匹配,确定与所述第一数值相匹配的视联网服务器,其中,所述预先配置的规则表包括目的地址的数据段与服务器的视联网号码的对应关系,所述视联网服务器和所述视联网号码一一对应;发送所述至少一个数据包到对应的所述视联网服务器以进行中转,实现视联网终端设备与互联网终端的通信,可以进行多个终端设备与多个视联网服务器之间的数据传输,增加工作效率,增加容错性。

Figure 201910717828

Embodiments of the present invention provide a data packet transmission method and device, which are applied to the Internet of Views, including: acquiring at least one data packet to be sent; analyzing and calculating the data packet to obtain a first value, wherein the first value is obtained. A value is the value corresponding to the destination address of the data packet; the matching is performed according to a pre-configured rule table to determine the Internet-of-view server that matches the first value, wherein the pre-configured rule table includes the destination address The corresponding relationship between the data segment and the video network number of the server, the video network server and the video network number are in one-to-one correspondence; send the at least one data packet to the corresponding video network server for transfer, and realize the video network terminal The communication between the device and the Internet terminal can carry out data transmission between multiple terminal devices and multiple video networking servers, which increases work efficiency and fault tolerance.

Figure 201910717828

Description

Data packet transmission method and device
Technical Field
The present invention relates to the field of video networking technologies, and in particular, to a method and an apparatus for transmitting data packets.
Background
With the rapid development of network technologies, bidirectional communications such as video conferences and video teaching are widely popularized in the aspects of life, work, learning and the like of users.
The video network is a network which is safer and faster than the traditional internet, in order to enable the video network to be rapidly integrated into the traditional internet and adapt to the current internet, a server needs to be configured for terminals using the video network, the server is used for realizing communication between terminals of the video network and internet terminals, and how to reasonably allocate the server for the terminals and further communicate with the internet is a problem which needs to be solved urgently.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a packet transmission method and apparatus that overcome the above problems or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention provides a data packet transmission method, where the method is applied in a video network, and includes:
acquiring at least one data packet to be transmitted;
analyzing and calculating the data packet to obtain a first numerical value, wherein the first numerical value is a numerical value corresponding to a destination address of the data packet;
matching according to a pre-configured rule table, and determining a video networking server matched with the first numerical value, wherein the pre-configured rule table comprises a corresponding relation between a data segment of a destination address and a video networking number of the server, and the video networking server and the video networking number are in one-to-one correspondence;
and sending the at least one data packet to the corresponding video network server.
Optionally, the analyzing and calculating the data packet to obtain a first value includes:
analyzing the data packet to obtain a destination address of the data packet;
converting the destination address to obtain a decimal value corresponding to the destination address;
determining the decimal value as the first value.
Optionally, the converting the destination address to obtain a decimal value corresponding to the destination address includes:
and multiplying the first section of numerical value of the destination address by a first preset value, multiplying the second section of numerical value by a second preset value, multiplying the third section of numerical value by a third preset value, and summing the fourth section of numerical value to obtain a decimal numerical value corresponding to the destination address.
Optionally, the matching according to a preconfigured rule table, and determining the video network server matched with the first value includes:
determining the data segment of the destination address where the first numerical value is located in a preset rule table;
searching a video networking number corresponding to the data segment of the destination address;
and determining the video network server corresponding to the video network number as the video network server matched with the first numerical value.
In a second aspect, an embodiment of the present invention provides a data packet transmission apparatus, where the apparatus is applied in a video network, and includes:
the acquisition module is used for acquiring at least one data packet to be sent;
the analysis module is used for carrying out analysis calculation on the data packet to obtain a first numerical value, wherein the first numerical value is a numerical value corresponding to a destination address of the data packet;
the matching module is used for matching according to a preset rule table and determining the video networking server matched with the first numerical value, wherein the preset rule table comprises the corresponding relation between the data segment of the destination address and the video networking number of the server, and the video networking server and the video networking number are in one-to-one correspondence;
and the sending module is used for sending the at least one data packet to the corresponding video network server.
Optionally, the parsing module is configured to:
analyzing the data packet to obtain a destination address of the data packet;
converting the destination address to obtain a decimal value corresponding to the destination address;
determining the decimal value as the first value.
Optionally, the parsing module is specifically configured to:
and multiplying the first section of numerical value of the destination address by a first preset value, multiplying the second section of numerical value by a second preset value, multiplying the third section of numerical value by a third preset value, and summing the fourth section of numerical value to obtain a decimal numerical value corresponding to the destination address.
Optionally, the matching module is configured to:
determining the data segment of the destination address where the first numerical value is located in a preset rule table;
searching a video networking number corresponding to the data segment of the destination address;
and determining the video network server corresponding to the video network number as the video network server matched with the first numerical value.
In a third aspect, an embodiment of the present invention provides a terminal device, including: at least one processor and memory;
the memory stores a computer program; the at least one processor executes the computer program stored by the memory to implement the method provided by the first aspect.
In a fourth aspect, the embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed, implements the method provided in the first aspect.
The embodiment of the invention has the following advantages:
the embodiment of the invention applies the characteristics of the video network, pre-configures a rule table of the corresponding relation between the data segment of the destination address and the video network number of the server, matches the video network server matched with the destination address value in the pre-configured rule table according to the value corresponding to the destination address of at least one data packet to be sent obtained by analyzing the terminal equipment, and the terminal equipment sends the at least one data packet to the corresponding video network server for data transfer, thereby realizing the communication between the video network terminal equipment and the internet terminal, being capable of carrying out data transmission between a plurality of terminal equipment and a plurality of video network servers, improving the working efficiency and increasing the fault tolerance.
Drawings
FIG. 1 is a schematic networking diagram of a video network of the present invention;
FIG. 2 is a schematic diagram of a hardware architecture of a node server according to the present invention;
fig. 3 is a schematic diagram of a hardware structure of an access switch of the present invention;
fig. 4 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to the present invention;
FIG. 5 is a flow chart illustrating the steps of one embodiment of a method for transmitting data packets in accordance with the present invention;
fig. 6 is a schematic structural diagram of a terminal device of the present invention;
FIG. 7 is a block diagram of a data transmission of the present invention;
FIG. 8 is a schematic diagram of an embodiment of a data packet transmission apparatus according to the present invention;
fig. 9 is a schematic structural diagram of a terminal device of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Networking of the video network is as follows:
the video network is a centralized control network structure, and the network can be a tree network, a star network, a ring network and the like, but on the basis of the centralized control node, the whole network is controlled by the centralized control node in the network.
As shown in fig. 1, the video network is divided into an access network and a metropolitan network.
The devices of the access network part can be mainly classified into 3 types: node server, access switch, terminal (including various set-top boxes, coding boards, memories, etc.). The node server is connected to an access switch, which may be connected to a plurality of terminals and may be connected to an ethernet network.
The node server is a node which plays a centralized control function in the access network and can control the access switch and the terminal. The node server can be directly connected with the access switch or directly connected with the terminal.
Similarly, devices of the metropolitan network portion may also be classified into 3 types: a metropolitan area server, a node switch and a node server. The metro server is connected to a node switch, which may be connected to a plurality of node servers.
The node server is a node server of the access network part, namely the node server belongs to both the access network part and the metropolitan area network part.
The metropolitan area server is a node which plays a centralized control function in the metropolitan area network and can control a node switch and a node server. The metropolitan area server can be directly connected with the node switch or directly connected with the node server.
Therefore, the whole video network is a network structure with layered centralized control, and the network controlled by the node server and the metropolitan area server can be in various structures such as tree, star and ring.
The access network part can form a unified video platform (the part in the dotted circle), and a plurality of unified video platforms can form a video network; each unified video platform may be interconnected via metropolitan area and wide area video networking.
Video networking device classification
1.1 devices in the video network of the embodiment of the present invention can be mainly classified into 3 types: servers, switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.). The video network as a whole can be divided into a metropolitan area network (or national network, global network, etc.) and an access network.
1.2 wherein the devices of the access network part can be mainly classified into 3 types: node servers, access switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.).
The specific hardware structure of each access network device is as follows:
a node server:
as shown in fig. 2, 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 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 for forwarding 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, read-write, 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:
as shown in fig. 3, the network interface module mainly includes a network interface module (a downlink network interface module 301 and an uplink network interface module 302), a switching engine module 303 and a CPU module 304;
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 data packet coming from the CPU module 204 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 nearly 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
As shown in fig. 4, the apparatus mainly includes a network interface module (a downlink network interface module 401 and an uplink network interface module 402), a switching 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 (2byte) 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 mainly classified into 2 types: node server, node exchanger, metropolitan area server. The node switch mainly comprises a network interface module, a switching engine module and a CPU module; the metropolitan area server mainly comprises a network interface module, a switching engine module and a CPU module.
2. Video networking packet definition
2.1 Access network packet definition
The data packet of the access network mainly comprises the following parts: destination Address (DA), Source Address (SA), reserved bytes, payload (pdu), CRC.
As shown in the following table, the data packet of the access network mainly includes the following parts:
DA SA Reserved Payload CRC
wherein:
the Destination Address (DA) is composed of 8 bytes (byte), the first byte represents the type of the data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), there are 256 possibilities at most, the second byte to the sixth byte are metropolitan area network addresses, and the seventh byte and the eighth byte are access network addresses;
the Source Address (SA) is also composed of 8 bytes (byte), defined as the same as the Destination Address (DA);
the reserved byte consists of 2 bytes;
the payload part has different lengths according to different types of datagrams, and is 64 bytes if the datagram is various types of protocol packets, and is 32+1024 or 1056 bytes if the datagram is a unicast packet, of course, the length is not limited to the above 2 types;
the CRC consists of 4 bytes and is calculated in accordance with the standard ethernet CRC algorithm.
2.2 metropolitan area network packet definition
The topology of a metropolitan area network is a graph and there may be 2, or even more than 2, connections between two devices, i.e., there may be more than 2 connections between a node switch and a node server, a node switch and a node switch, and a node switch and a node server. However, the metro network address of the metro network device is unique, and in order to accurately describe the connection relationship between the metro network devices, parameters are introduced in the embodiment of the present invention: a label to uniquely describe a metropolitan area network device.
In this specification, the definition of the Label is similar to that of the Label of MPLS (Multi-Protocol Label Switch), and assuming that there are two connections between the device a and the device B, there are 2 labels for the packet from the device a to the device B, and 2 labels for the packet from the device B to the device a. The label is classified into an incoming label and an outgoing label, and assuming that the label (incoming label) of the packet entering the device a is 0x0000, the label (outgoing label) of the packet leaving the device a may become 0x 0001. The network access process of the metro network is a network access process under centralized control, that is, address allocation and label allocation of the metro network are both dominated by the metro server, and the node switch and the node server are both passively executed, which is different from label allocation of MPLS, and label allocation of MPLS is a result of mutual negotiation between the switch and the server.
As shown in the following table, the data packet of the metro network mainly includes the following parts:
DA SA Reserved label (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, a rule table of a correspondence relationship between a data segment of a destination address and a video network number of a server is preconfigured according to a protocol of the video network, a video network server matched with a value of the destination address is matched in the preconfigured rule table according to a value corresponding to the destination address of at least one data packet to be sent obtained by terminal equipment through analysis, the terminal equipment sends the at least one data packet to the corresponding video network server for data transfer, so that communication between the video network terminal equipment and an internet terminal is realized, data transmission between a plurality of terminal equipment and a plurality of video network servers can be performed, the working efficiency is improved, and the fault tolerance is increased.
An embodiment of the present invention provides a data packet transmission method, which is used for realizing data communication between a terminal device and the internet by allocating a video networking server to the terminal device. The execution main body of the embodiment is a data packet transmission device, and the device can be arranged on an Agent client (i.e. an i2v protocol client), and the Agent is arranged on a terminal device, wherein the terminal device includes various set-top boxes, coding boards, memories, and the like.
Specifically, a network of vision NAT server (VNAT) is configured for the network of vision terminal device, one terminal device may communicate with multiple network of vision NAT servers at the same time, or multiple terminal devices use one network of vision NAT server at the same time.
Each video network NAT server has a unique identification code, namely a video network number, and the video network number is a 20-digit string consisting of digits;
a rule table of the corresponding relation between the video network number of the video network NAT server and the data segment of the destination IP value is stored in advance on a video network domain name resolution server (VLAS). Each terminal device downloads the rule table from the VLAS and stores it locally at the terminal device.
Fig. 5 is a flowchart of steps of an embodiment of a data packet transmission method according to the present invention, and as shown in fig. 5, the method may be applied to a video network, and specifically may include the following steps:
s501, acquiring a data packet to be sent;
specifically, fig. 6 is a schematic structural diagram of a terminal device according to the present invention, and as shown in fig. 6, the terminal device Agent includes an obtaining unit 601, an analyzing unit 602, a matching unit 603, and a sending unit 604, where one data packet or multiple data packets may be obtained by obtaining a data packet to be sent through the obtaining unit 601.
S502, analyzing and calculating the data packet to obtain a first numerical value, wherein the first numerical value is a numerical value corresponding to a destination address of the data packet;
the parsing unit 602 parses the acquired data packet to obtain a destination address of the data packet, i.e. a destination IP address; calculating a numerical value corresponding to the destination IP address according to the destination IP address, namely a first numerical value; if a plurality of data packets are obtained, the respective corresponding values of the plurality of data packets need to be calculated.
S503, matching according to a preset rule table, and determining a video network server matched with the first numerical value, wherein the preset rule table comprises a corresponding relation between a data segment of a destination address and a video network number of the server, and the video network server and the video network number are in one-to-one correspondence;
specifically, after the parsing unit acquires the first numerical value corresponding to the data packet, that is, the IP value corresponding to the destination address of the data packet, the matching unit determines, according to a pre-configured rule table stored in the terminal device, the NAT server of the video network that matches the IP value.
S504, the data packet is sent to the video network server.
The sending unit sends the data packet to the matched NAT server of the video network, and communication between the terminal equipment and the internet is realized through the transfer of the NAT server of the video network.
Illustratively, one terminal device Agent simultaneously sends two data packets, namely a data packet 1 and a data packet 2, and the two data packets are analyzed and calculated to obtain a first IP value of the data packet 1 and a second IP value of the data packet 2;
the matching unit acquires a VNAT1 corresponding to the first IP value and a VNAT2 corresponding to the second IP value according to a preset rule table;
the sending unit sends the data packet 1 to the VNAT1 through the internet of view, and simultaneously sends the data packet 2 to the VNAT2 through the internet of view, and communication between the terminal device and the internet is achieved through relay of the VNAT1 and the VNAT 2.
Or at least one terminal device simultaneously generates data packets, and the calculated IP values of the data packets exactly match with the same internet of view server, and the matching method of each data packet is shown as above and will not be discussed here.
The embodiment of the invention provides a data transmission method, which comprises the steps of matching a video network server matched with a target address value in a pre-configured rule table according to a value corresponding to a target address of at least one data packet to be sent and obtained by analyzing of a terminal device by pre-configuring the rule table of the corresponding relation between a data segment of the target address and the video network number of the server, sending the at least one data packet to the corresponding video network server by the terminal device for data transfer, realizing communication between the video network terminal device and an internet terminal, being capable of carrying out data transmission between a plurality of terminal devices and a plurality of video network servers, improving the working efficiency and increasing the fault tolerance.
The method provided by the above embodiment is further described in an additional embodiment of the present invention.
On the basis of the foregoing embodiment, optionally, the analyzing and calculating the data packet to obtain a first value includes:
analyzing the data packet to obtain a destination address of the data packet;
converting the destination address to obtain a decimal value corresponding to the destination address;
determining the decimal value as the first value.
Specifically, the analyzing unit analyzes the acquired data packet to obtain a destination address contained in the data packet, that is, a destination IP address; the destination IP address is converted to obtain a corresponding value of the destination IP address, which may be any binary conversion, such as binary, octal, decimal, or hexadecimal. In the embodiment of the present invention, it is preferable to perform decimal conversion, and the obtained decimal value is determined as the first value, that is, the IP value.
Specifically, the converting the destination address to obtain a decimal value corresponding to the destination address includes:
and multiplying the first section of numerical value of the destination address by a first preset value, multiplying the second section of numerical value by a second preset value, multiplying the third section of numerical value by a third preset value, and summing the fourth section of numerical value to obtain a decimal numerical value corresponding to the destination address.
Illustratively, for example, the destination IP is an address of 10.0.0.1, which is converted to a decimal value, and the algorithm is:
10*(256*256*256)+0*(256*256)+0*256+1;
namely: a first segment of the IP segment at a first predetermined value (i.e., 256 x 256) + a second segment of the IP segment at a second predetermined value (i.e., 256 x 256) + a third segment of the IP segment at a third predetermined value (i.e., 256) + a fourth segment of the IP segment;
optionally, the matching according to a preconfigured rule table, and determining the video network server matched with the first value includes:
determining the data segment of the destination address where the first numerical value is located in a preset rule table;
searching a video networking number corresponding to the data segment of the destination address;
and determining the video network server corresponding to the video network number as the video network server matched with the first numerical value.
Illustratively, the pre-configured rule table stores correspondence between the internet-of-view number and the IP segment, such as VNAT1, wherein the internet-of-view number is 001 (actually 20 digits of value, denoted by 001 here), and the corresponding IP decimal value segment digits are 1-10000;
VNAT2, whose Internet of view number is 002 (actually 20 digits of value, here represented by 002), and its corresponding IP decimal value segment is 16589135 ~ 16599136;
fig. 7 is a block diagram of a data transmission structure according to the present invention, as shown in fig. 7, the specific steps are as follows:
s701, the Agent obtains and analyzes the data packet to be sent to obtain an IP value
S702, finding the corresponding VNAT server according to the matching rule of the IP value and the video networking number of the VNAT.
Illustratively, the terminal device analyzes and calculates the acquired data packet to obtain a decimal numerical value corresponding to the data packet, namely an IP value of 500, and searches in a rule table, the found IP decimal data value segment bit of 500 is 1-10000, and the view networking number corresponding to the IP segment is 001, and then selects a VNAT1 corresponding to the view networking number of 001; the data packets are sent to the VNAT1 through the internet of view, and data communication between the terminal device and the internet is realized through the relay of the VNAT 1.
The data transmission mode provided by the embodiment of the invention enables the video network to be more suitable for the working mode of the internet, simultaneously retains the technical characteristics of the video network, allocates VNAT to each different video network terminal device, can realize the parallel operation of the whole system, increases the working efficiency and increases the fault tolerance.
Referring to fig. 8, a schematic structural diagram of an embodiment of a data packet transmission apparatus according to the present invention is shown, where the apparatus may be applied in a video network, and specifically includes the following modules: an obtaining module 801, an analyzing module 802, a matching module 803, and a sending module 804, wherein:
the obtaining module 801 is configured to obtain at least one data packet to be sent;
the parsing module 802 is configured to perform parsing calculation on the data packet to obtain a first value, where the first value is a value corresponding to a destination address of the data packet;
the matching module 803 is configured to perform matching according to a preconfigured rule table, and determine a video network server matched with the first numerical value, where the preconfigured rule table includes a correspondence between data segments of a destination address and video network numbers of the server, and the video network servers and the video network numbers are in one-to-one correspondence;
the sending module 804 is configured to send the at least one data packet to the corresponding video network server.
It should be noted that each module in the embodiment of the present invention corresponds to each unit in the method embodiment.
According to the data transmission device provided by the embodiment of the invention, the rule table of the corresponding relation between the data segment of the destination address and the video network number of the server is configured in advance, the video network server matched with the destination address value is matched in the rule table configured in advance according to the value corresponding to the destination address of at least one data packet to be sent, which is obtained by analyzing by the terminal equipment, the terminal equipment sends the at least one data packet to the corresponding video network server for data transfer, so that the communication between the video network terminal equipment and the internet terminal is realized, the data transmission between a plurality of terminal equipment and a plurality of video network servers can be carried out, the working efficiency is improved, and the fault tolerance is increased.
The device provided by the above embodiment is further described in an additional embodiment of the present invention.
On the basis of the foregoing embodiment, optionally, the parsing module is configured to:
analyzing the data packet to obtain a destination address of the data packet;
converting the destination address to obtain a decimal value corresponding to the destination address;
determining the decimal value as the first value.
Optionally, the parsing module is specifically configured to:
and multiplying the first section of numerical value of the destination address by a first preset value, multiplying the second section of numerical value by a second preset value, multiplying the third section of numerical value by a third preset value, and summing the fourth section of numerical value to obtain a decimal numerical value corresponding to the destination address.
Optionally, the matching module is configured to:
determining the data segment of the destination address where the first numerical value is located in a preset rule table;
searching a video networking number corresponding to the data segment of the destination address;
and determining the video network server corresponding to the video network number as the video network server matched with the first numerical value.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
It should be noted that the respective implementable modes in the present embodiment may be implemented individually, or may be implemented in combination in any combination without conflict, and the present application is not limited thereto.
According to the data transmission device provided by the embodiment of the invention, the rule table of the corresponding relation between the data segment of the destination address and the video network number of the server is configured in advance, the video network server matched with the destination address value is matched in the rule table configured in advance according to the value corresponding to the destination address of at least one data packet to be sent, which is obtained by analyzing by the terminal equipment, the terminal equipment sends the at least one data packet to the corresponding video network server for data transfer, so that the communication between the video network terminal equipment and the internet terminal is realized, the data transmission between a plurality of terminal equipment and a plurality of video network servers can be carried out, the working efficiency is improved, and the fault tolerance is increased.
Still another embodiment of the present invention provides a terminal device, configured to execute the method provided in the foregoing embodiment.
Fig. 9 is a schematic structural diagram of a terminal device according to the present invention, and as shown in fig. 9, the terminal device is installed with an Agent client, the terminal device includes various set top boxes, code boards, memories, and the like, and the terminal device includes: at least one processor 91 and memory 92; the memory stores a computer program; the at least one processor executes the computer program stored by the memory to implement the methods provided by the above-described embodiments.
The terminal device provided in this embodiment, through pre-configuring the rule table of the correspondence between the data segment of the destination address and the video network number of the server, according to the value corresponding to the destination address of at least one to-be-sent data packet obtained by the terminal device through analysis, the video network server matched with the value of the destination address is matched in the pre-configured rule table, the terminal device sends the at least one data packet to the corresponding video network server to perform data transfer, so as to implement communication between the video network terminal device and the internet terminal, and perform data transmission between multiple terminal devices and multiple video network servers, thereby improving the working efficiency and increasing the fault tolerance.
Yet another embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program is executed to implement the method provided in any one of the above embodiments.
According to the computer-readable storage medium of the embodiment, a rule table of a corresponding relation between a data segment of a destination address and a video network number of a server is configured in advance, a video network server matched with a destination address value is matched in the rule table configured in advance according to a value corresponding to the destination address of at least one data packet to be sent, which is obtained by analyzing by a terminal device, the terminal device sends the at least one data packet to the corresponding video network server for data transfer, so that communication between the video network terminal device and an internet terminal is realized, data transmission between a plurality of terminal devices and a plurality of video network servers can be performed, the working efficiency is improved, and the fault tolerance is increased.
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 the like) 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
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 "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The data transmission method and the data transmission device provided by the invention are described in detail, and the principle and the implementation mode of the invention are explained by applying specific examples, and the description of the embodiments is only used for helping to understand the method and the core idea of the 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 (8)

1.一种数据包传输方法,其特征在于,所述方法应用于视联网中,包括:1. a data packet transmission method, it is characterised in that the method is applied in the Internet of Views, comprising: 获取至少一个待发送的数据包;Get at least one packet to be sent; 对所述数据包进行解析计算,获得第一数值,其中所述第一数值为对所述数据包的目的地址进行进制转换得到的数值;所述对所述数据包进行解析计算,获得第一数值,包括:Perform analysis and calculation on the data packet to obtain a first value, wherein the first value is a value obtained by performing base conversion on the destination address of the data packet; perform analysis and calculation on the data packet to obtain the first value. A value, including: 对所述数据包进行解析,获取所述数据包的目的地址;Analyze the data packet to obtain the destination address of the data packet; 将所述目的地址进行转换,得到所述目的地址对应的十进制数值;Converting the destination address to obtain a decimal value corresponding to the destination address; 将所述十进制数值确定为所述第一数值;determining the decimal value as the first value; 根据预先配置的规则表进行匹配,确定与所述第一数值相匹配的视联网服务器,其中,所述预先配置的规则表包括数据包目的地址的数据段与视联网服务器的视联网号码的对应关系,所述视联网服务器和所述视联网号码一一对应;Matching is performed according to a preconfigured rule table to determine the Internet video server that matches the first value, wherein the preconfigured rule table includes the correspondence between the data segment of the destination address of the data packet and the Internet video number of the Internet video server. relationship, the video network server and the video network number are in one-to-one correspondence; 发送所述至少一个数据包到对应的所述视联网服务器。Send the at least one data packet to the corresponding Internet-of-view server. 2.根据权利要求1所述的方法,其特征在于,所述将所述目的地址进行转换,得到所述目的地址对应的十进制数值,包括:2. The method according to claim 1, wherein the converting the destination address to obtain a decimal value corresponding to the destination address, comprising: 将所述目的地址的第一段数值乘以第一预设值,第二段数值乘以第二预设值,第三段数值乘以第三预设值,第四段数值求和,得到所述目的地址对应的十进制数值。Multiply the value of the first segment of the destination address by the first preset value, the value of the second segment by the second preset value, the value of the third segment by the third preset value, and the sum of the values of the fourth segment to obtain The decimal value corresponding to the destination address. 3.根据权利要求1所述的方法,其特征在于,所述根据预先配置的规则表进行匹配,确定与所述第一数值相匹配的视联网服务器,包括:3. The method according to claim 1, wherein the matching according to a preconfigured rule table to determine the Internet-of-view server that matches the first value comprises: 在预先配置的规则表中,确定所述第一数值所处的所述目的地址的数据段;In a preconfigured rule table, determine the data segment of the destination address where the first value is located; 查找与所述目的地址的数据段相对应的视联网号码;Find the video network number corresponding to the data segment of the destination address; 将所述视联网号码对应的视联网服务器确定为与所述第一数值相匹配的视联网服务器。The Internet-of-view server corresponding to the Internet-of-view number is determined as the Internet-of-view server matching the first numerical value. 4.一种数据包传输装置,其特征在于,所述装置应用于视联网中,包括:4. A data packet transmission device, wherein the device is applied in the Internet of Views, comprising: 获取模块,用于获取至少一个待发送的数据包;an acquisition module for acquiring at least one data packet to be sent; 解析模块,用于对所述数据包进行解析计算,获得第一数值,其中所述第一数值为对所述数据包的目的地址进行进制转换得到的数值;所述解析模块用于:A parsing module, configured to analyze and calculate the data packet to obtain a first numerical value, wherein the first numerical value is a numerical value obtained by performing base conversion on the destination address of the data packet; the parsing module is used for: 对所述数据包进行解析,获取所述数据包的目的地址;Analyze the data packet to obtain the destination address of the data packet; 将所述目的地址进行转换,得到所述目的地址对应的十进制数值;Converting the destination address to obtain a decimal value corresponding to the destination address; 将所述十进制数值确定为所述第一数值;determining the decimal value as the first value; 匹配模块,用于根据预先配置的规则表进行匹配,确定与所述第一数值相匹配的视联网服务器,其中,所述预先配置的规则表包括目的地址的数据段与服务器的视联网号码的对应关系,所述视联网服务器和所述视联网号码一一对应;The matching module is configured to perform matching according to a pre-configured rule table, and determine the Internet-of-view server that matches the first value, wherein the pre-configured rule table includes the data segment of the destination address and the Internet-of-view number of the server. Correspondence, the video network server and the video network number are in one-to-one correspondence; 发送模块,用于发送所述至少一个数据包到对应的所述视联网服务器。A sending module, configured to send the at least one data packet to the corresponding Internet-of-view server. 5.根据权利要求4所述的装置,其特征在于,所述解析模块具体用于:5. The device according to claim 4, wherein the parsing module is specifically used for: 将所述目的地址的第一段数值乘以第一预设值,第二段数值乘以第二预设值,第三段数值乘以第三预设值,第四段数值求和,得到所述目的地址对应的十进制数值。Multiply the value of the first segment of the destination address by the first preset value, the value of the second segment by the second preset value, the value of the third segment by the third preset value, and the sum of the values of the fourth segment to obtain The decimal value corresponding to the destination address. 6.根据权利要求4所述的装置,其特征在于,所述匹配模块用于:6. The apparatus according to claim 4, wherein the matching module is used for: 在预先配置的规则表中,确定所述第一数值所处的所述目的地址的数据段;In a preconfigured rule table, determine the data segment of the destination address where the first value is located; 查找与所述目的地址的数据段相对应的视联网号码;Find the video network number corresponding to the data segment of the destination address; 将所述视联网号码对应的视联网服务器确定为与所述第一数值相匹配的视联网服务器。The Internet-of-view server corresponding to the Internet-of-view number is determined as the Internet-of-view server matching the first numerical value. 7.一种终端设备,其特征在于,包括:至少一个处理器和存储器;7. A terminal device, comprising: at least one processor and a memory; 所述存储器存储计算机程序;所述至少一个处理器执行所述存储器存储的计算机程序,以实现权利要求1-3中任一项所述的方法。The memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the method of any one of claims 1-3. 8.一种计算机可读存储介质,其特征在于,该计算机可读存储介质中存储有计算机程序,所述计算机程序被执行时实现权利要求1-3中任一项所述的方法。8. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed, the method according to any one of claims 1-3 is implemented.
CN201910717828.1A 2019-08-05 2019-08-05 Data packet transmission method and device Active CN110519009B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910717828.1A CN110519009B (en) 2019-08-05 2019-08-05 Data packet transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910717828.1A CN110519009B (en) 2019-08-05 2019-08-05 Data packet transmission method and device

Publications (2)

Publication Number Publication Date
CN110519009A CN110519009A (en) 2019-11-29
CN110519009B true CN110519009B (en) 2022-01-11

Family

ID=68625090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910717828.1A Active CN110519009B (en) 2019-08-05 2019-08-05 Data packet transmission method and device

Country Status (1)

Country Link
CN (1) CN110519009B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131398B (en) * 2019-12-02 2022-12-23 视联动力信息技术股份有限公司 Method, device, electronic equipment and medium based on direct communication of video network
CN111224968B (en) * 2019-12-31 2022-01-04 北京安盛联合科技有限公司 Secure communication method for randomly selecting transfer server
CN111556374B (en) * 2020-03-18 2023-09-05 视联动力信息技术股份有限公司 A method and device for accessing an application server and a visual networking system
CN113612963B (en) * 2021-07-27 2024-08-20 深圳市捷视飞通科技股份有限公司 Data forwarding method, device, computer equipment and storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120007119A (en) * 2010-07-14 2012-01-20 주식회사 오픈비지니스솔루션코리아 Control Method of Video Video Streaming Using Network
TWI523461B (en) * 2013-05-27 2016-02-21 廣達電腦股份有限公司 Communication system and method
CN106572197B (en) * 2015-10-10 2020-01-14 阿里巴巴集团控股有限公司 Network address translation method, device and system
EP3223494A1 (en) * 2016-03-21 2017-09-27 Thomson Licensing Method and apparatus for interconnection between networks
CN105933437A (en) * 2016-06-15 2016-09-07 乐视控股(北京)有限公司 Server recommending method and device
CN107968928B (en) * 2016-10-19 2019-02-05 视联动力信息技术股份有限公司 A kind of method and apparatus of terminal communication
CN108063741A (en) * 2016-11-07 2018-05-22 北京视联动力国际信息技术有限公司 A kind of transport protocol conversion method and apparatus
CN108737768B (en) * 2017-04-13 2020-05-08 视联动力信息技术股份有限公司 Monitoring method and monitoring device based on monitoring system
CN108390954B (en) * 2018-03-26 2021-09-21 新华三信息安全技术有限公司 Message transmission method and device
CN109547417B (en) * 2018-10-30 2021-06-11 视联动力信息技术股份有限公司 Code stream transmission method and device
CN109788314B (en) * 2018-12-18 2021-05-11 视联动力信息技术股份有限公司 Method and device for transmitting video stream data

Also Published As

Publication number Publication date
CN110519009A (en) 2019-11-29

Similar Documents

Publication Publication Date Title
CN110519009B (en) Data packet transmission method and device
CN109309806B (en) Video conference management method and system
CN108965226B (en) Data acquisition method and device based on video network
CN110719258B (en) Server access method and system
CN110266577B (en) A tunnel establishment method and video networking system
CN109803178B (en) Terminal upgrading method and device
CN109873864B (en) Communication connection establishing method and system based on video networking
CN109451001B (en) Communication method and system
CN109005378B (en) Video conference processing method and system
CN111131911A (en) Multicast method and device
CN110336710B (en) A terminal testing method, system and device and storage medium
CN109743360B (en) Information processing method and device
CN109889516B (en) Method and device for establishing session channel
CN111211982A (en) Data forwarding method and device, electronic equipment and storage medium
CN110677315A (en) Method and system for monitoring state
CN110557687B (en) Multicast data packet processing method, device and storage medium
CN110493555B (en) Request processing method, user terminal, core server, device and storage medium
CN109756476B (en) User-defined nickname setting method and system based on video network
CN109451030B (en) Method and system for downloading video network file
CN111147485A (en) Service data transmission method and device
CN110730154B (en) Service processing method and device for video network
CN109639627B (en) Encryption mode switching method and device
CN110475160B (en) Method and device for transmitting video data across video network
CN110519114B (en) A method and system for querying data link based on video networking
CN111614536A (en) Data forwarding method 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
CP03 Change of name, title or address

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

Patentee after: VISIONVERA INFORMATION TECHNOLOGY Co.,Ltd.

Country or region after: China

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

Patentee before: VISIONVERA INFORMATION TECHNOLOGY Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address