CN110022295B - Data transmission method and video networking system - Google Patents

Data transmission method and video networking system Download PDF

Info

Publication number
CN110022295B
CN110022295B CN201910153491.6A CN201910153491A CN110022295B CN 110022295 B CN110022295 B CN 110022295B CN 201910153491 A CN201910153491 A CN 201910153491A CN 110022295 B CN110022295 B CN 110022295B
Authority
CN
China
Prior art keywords
protocol
data
module
target data
video
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
CN201910153491.6A
Other languages
Chinese (zh)
Other versions
CN110022295A (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 CN201910153491.6A priority Critical patent/CN110022295B/en
Publication of CN110022295A publication Critical patent/CN110022295A/en
Application granted granted Critical
Publication of CN110022295B publication Critical patent/CN110022295B/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
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Abstract

The embodiment of the invention provides a data transmission method and a video networking system, wherein the method comprises the following steps: receiving a first acquisition instruction based on an HLS protocol sent by terminal equipment, wherein the first acquisition instruction comprises an IP (Internet protocol), a port number and a data identifier of the terminal equipment; generating an address identifier based on an RTMP protocol according to a first acquisition instruction based on an HLS protocol; the virtual terminal is controlled to acquire first target data from the video network server according to the address identifier; converting the first target data into second target data and a corresponding index file according to an HLS protocol; and sending the index file to the terminal equipment. The embodiment of the invention realizes the bridging between the HLS protocol and the RTMP protocol in the video network and improves the flexibility of video network audio data transmission by arranging the virtual terminal based on the RTMP in the streaming media server to be connected with the video network server based on the RTMP protocol and converting the data of the RTMP protocol into the data which can be identified by the HLS protocol equipment to be acquired by the terminal equipment adopting the HLS protocol.

Description

Data transmission method and video networking system
Technical Field
The present invention relates to the field of video networking technologies, and in particular, to a data transmission method and a video networking system.
Background
The video networking is an important milestone for network development, is a higher-level form of the Internet, is a real-time network, can realize the real-time transmission of full-network high-definition videos which cannot be realized by the existing Internet, and pushes a plurality of Internet applications to high-definition video.
The traditional device output based on the RTMP protocol only aims at terminal devices meeting the RTMP protocol, and cannot perform audio output on terminals based on the HLS protocol, but the HLS protocol is also widely used for transmitting audio data, so how to realize bridge conversion of the RTMP protocol and the HLS protocol and real-time stream output is an urgent problem to be solved in the industry.
Disclosure of Invention
In view of the above, embodiments of the present invention are proposed to provide a method and an internet of view system for data transmission that overcome or at least partially solve the above problems.
In order to solve the above problem, a first aspect of the embodiments of the present invention discloses a method for data transmission, where the method is applied to a streaming media server in a video network, and the streaming media server is in communication connection with a terminal device and the video network server, and the method includes:
receiving a first acquisition instruction based on an HLS protocol and sent by the terminal equipment, wherein the first acquisition instruction comprises an IP (Internet protocol), a port number and a data identifier of the terminal equipment;
generating an address identifier based on an RTMP protocol according to the first acquisition instruction based on the HLS protocol;
controlling the virtual terminal to acquire first target data from the video network server according to the address identifier;
converting the first target data into second target data and a corresponding index file according to an HLS protocol;
and sending the index file to the terminal equipment.
Preferably, after the step of sending the index file to the terminal device, the method further includes:
receiving a second acquisition instruction sent by the terminal equipment according to the index file;
and returning the second target data to the terminal equipment according to the second acquisition instruction.
Preferably, the converting the first target data into the second target data and the corresponding index file according to the HLS protocol includes:
and converting the first target data into a TS-format fragment file and a corresponding M3U8 index file according to an HLS protocol.
Preferably, the second fetch instruction comprises
The M3U8 index sub-files of the M3U index file;
the returning of the second target data to the terminal device according to the second obtaining instruction includes:
and according to the M3U index subfile in the second acquisition instruction, returning the corresponding fragment file.
Preferably, before the step of receiving the first obtaining instruction based on the HLS protocol sent by the terminal device, the method further includes:
constructing a virtual terminal based on an RTMP protocol;
and establishing communication connection between the virtual terminal and the video networking server.
The second aspect of the embodiment of the invention discloses a video networking system for data transmission, which comprises: the streaming media server, and terminal equipment and the video network server that the said streaming media server communication connects, the said video network system includes:
a first instruction receiving module, configured to receive a first obtaining instruction based on an HLS protocol and sent by the terminal device, where the first obtaining instruction includes an IP, a port number, and a data identifier of the terminal device;
the address acquisition module is used for generating an address identifier based on an RTMP protocol according to the first acquisition instruction based on the HLS protocol;
the data acquisition module is used for controlling the virtual terminal to acquire first target data from the video network server according to the address identifier;
the protocol conversion module is used for converting the first target data into second target data and a corresponding index file according to an HLS protocol;
and the index sending module is used for sending the index file to the terminal equipment.
Preferably, after the index sending module, the method further includes:
the second instruction acquisition module is used for receiving a second acquisition instruction sent by the terminal equipment according to the index file;
and the data sending module is used for returning the second target data to the terminal equipment according to the second acquisition instruction.
Preferably, the protocol conversion module includes:
and the protocol conversion submodule is used for converting the first target data into a fragment file in a TS format and a corresponding M3U8 index file according to an HLS protocol.
Preferably, the second fetch instruction comprises
The M3U8 index sub-files of the M3U index file; the data sending module comprises:
and the data sending submodule is used for returning the corresponding fragment file according to the M3U index subfile in the second acquisition instruction.
Preferably, before the first instruction receiving module, the method further includes:
the building module is used for building a virtual terminal based on an RTMP protocol;
and the connection module is used for establishing communication connection between the virtual terminal and the video networking server. The second aspect of the embodiment of the invention discloses a video networking system for data transmission, which comprises: the streaming media server, and terminal equipment and the video network server that the said streaming media server communication connects, the said video network system includes:
a first instruction receiving module, configured to receive a first obtaining instruction based on an HLS protocol and sent by the terminal device, where the first obtaining instruction includes an IP, a port number, and a data identifier of the terminal device;
the address acquisition module is used for generating an address identifier based on an RTMP protocol according to the first acquisition instruction based on the HLS protocol;
the data acquisition module is used for controlling the virtual terminal to acquire first target data from the video network server according to the address identifier;
the protocol conversion module is used for converting the first target data into second target data and a corresponding index file according to an HLS protocol;
and the index sending module is used for sending the index file to the terminal equipment.
Preferably, after the index sending module, the method further includes:
the second instruction acquisition module is used for receiving a second acquisition instruction sent by the terminal equipment according to the index file;
and the data sending module is used for returning the second target data to the terminal equipment according to the second acquisition instruction.
Preferably, the protocol conversion module includes:
and the protocol conversion submodule is used for converting the first target data into a fragment file in a TS format and a corresponding M3U8 index file according to an HLS protocol.
Preferably, the second fetch instruction comprises
The M3U8 index sub-files of the M3U index file; the data sending module comprises:
and the data sending submodule is used for returning the corresponding fragment file according to the M3U index subfile in the second acquisition instruction.
Preferably, before the first instruction receiving module, the method further includes:
the building module is used for building a virtual terminal based on an RTMP protocol;
and the connection module is used for establishing communication connection between the virtual terminal and the video networking server.
The embodiment of the invention has the following advantages:
the embodiment of the invention provides a data transmission method and a video networking system, wherein the method comprises the following steps: receiving a first acquisition instruction based on an HLS protocol sent by terminal equipment, wherein the first acquisition instruction comprises an IP (Internet protocol), a port number and a data identifier of the terminal equipment; generating an address identifier based on an RTMP protocol according to a first acquisition instruction based on an HLS protocol; the virtual terminal is controlled to acquire first target data from the video network server according to the address identifier; converting the first target data into second target data and a corresponding index file according to an HLS protocol; and sending the index file to the terminal equipment. The embodiment of the invention realizes the bridging between the HLS protocol and the RTMP protocol in the video network and improves the flexibility of video network audio data transmission by arranging the virtual terminal based on the RTMP in the streaming media server to be connected with the video network server based on the RTMP protocol and converting the data of the RTMP protocol into the data which can be identified by the HLS protocol equipment to be acquired by the terminal equipment adopting the HLS protocol.
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 schematic diagram of a data transmission process during data transmission according to the present invention;
FIG. 6 is a flow chart of the steps of a method of data transmission of the present invention;
fig. 7 is a block diagram of a data transmission video networking system according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The video networking is an important milestone for 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 faces each other.
The video networking adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services of video, voice, pictures, characters, communication, data and the like on a system platform on a network platform, such as high-definition video conference, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delayed television, network teaching, live broadcast, VOD on demand, television mail, Personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like, and realizes high-definition quality video broadcast through a television or a computer.
To better understand the embodiments of the present invention, the following description refers to the internet of view:
some of the technologies applied in the video networking are as follows:
network Technology (Network Technology)
Network technology innovation in video networking has improved over traditional Ethernet (Ethernet) to face the potentially enormous video traffic on the network. Unlike pure network Packet Switching (Packet Switching) or network Circuit Switching (Circuit Switching), the Packet Switching is adopted by the technology of the video networking 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 whether a single user, a private network user or a network aggregate. The user terminal, the set-top box or the PC are directly connected to the unified video platform to obtain various multimedia video services in various forms. The unified video platform adopts a menu type configuration table mode to replace the traditional complex application programming, can realize complex application by using very few codes, and realizes infinite new service innovation.
Networking of the video network is as follows:
the video network is a centralized control network structure, and the network can be a tree network, a star network, a ring network and the like, but on the basis of the centralized control node, the whole network is controlled by the centralized control node in the network.
As shown in fig. 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 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 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 308 is configured by the CPU module 304, 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 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 characteristics of the video network, the invention provides one of the core concepts of the embodiment, and the virtual terminal in the streaming media server acquires data from the video network server according to the protocol of the video network; the streaming media server performs differential conversion on the data of the RTMP protocol and then sends the data to the terminal equipment,
in the embodiment of the invention, the video networking system comprises a streaming media server, and a terminal device and a video networking server which are communicated with the streaming media server.
Referring to fig. 5, in the embodiment of the present invention, the communication between the streaming server 502 and the terminal device 503, and the communication between the virtual terminal 504 in the streaming server 502 and the video network server 501 are transmitted through a video network.
Example one
Referring to fig. 6, a flowchart illustrating steps of an embodiment of a method for data transmission according to the present invention is shown, where the method is applied to a streaming server, and the streaming server is communicatively connected to a terminal device and a video network server, and the method includes:
step 601, receiving a first obtaining instruction based on the HLS protocol sent by the terminal device, where the first obtaining instruction includes an IP, a port number, and a data identifier of the terminal device.
Wherein HLS (Http Live Streaming, which is a Http-based Streaming media network transmission protocol, is mainly used for audio and video services of PC and Apple terminals, comprises an index file of M3U (8), a TS media fragment file and a key encryption string file),
in the embodiment of the invention, the terminal equipment adopts the HLS protocol to transmit the audio data. When audio data stored in a server adopting an RTMP (Real Time Messaging Protocol) Protocol needs to be acquired, the terminal equipment sends the audio data to a streaming media server deployed in a video network so as to acquire the audio data from the video network server through the streaming media service cross Protocol.
Preferably, before the step 601, steps a1 to a2 are further included:
and step A1, constructing the virtual terminal based on the RTMP protocol.
In the embodiment of the invention, according to the output service requirement of the streaming media server, the virtual terminal number corresponding to the streaming media server is allocated in the virtual terminal pool of the streaming media server, and the virtual terminal corresponding to the virtual terminal number is set according to the RTMP protocol, so that the virtual terminal can be connected and communicated with the streaming media server adopting the RTMP protocol.
Step A2, establishing the communication connection between the virtual terminal and the video network server.
Wherein, the mode of communication connection includes: a mobile data network, a wireless local area network, bluetooth, etc., and the communication connection manner is not limited in the embodiments of the present invention.
In the embodiment of the invention, the virtual terminal is constructed in the streaming media server based on the RTMP protocol to realize the connection communication between the streaming media server and the terminal equipment of the RTMP protocol, thereby achieving the effect of connection communication between the streaming media server which does not adopt the RTMP protocol and the equipment which adopts the RTMP protocol.
Step 602, generating an address identifier based on the RTMP protocol according to the first obtaining instruction based on the HLS protocol.
In the embodiment of the present invention, the streaming media server obtains the IP, the port number, and the data identifier of the terminal device by analyzing the first obtaining instruction, and then generates an address identifier URL (Uniform Resource Locator, which is a compact representation of a location and an access method of a Resource that can be obtained from the internet and is an address of a standard Resource on the internet) that can be identified by the video networking server using the RTMP protocol according to the IP, the port number, and the data identifier of the terminal device.
Step 603, controlling the virtual terminal to acquire the first target data from the video network server according to the address identifier.
In the embodiment of the invention, the virtual terminal is deployed in the streaming media server and is used for realizing all functions of connection communication between the streaming media server and the video networking server based on the RTMP protocol.
The first target data is an audio data packet based on the RTMP protocol.
And the streaming media server transmits the address identification URL to the virtual terminal, and the virtual terminal sends the address identification URL to the video network server adopting an RTMP protocol. And the video network server returns corresponding first target data to the virtual terminal in the streaming media server according to the address identification URL.
Step 604, converting the first target data into second target data and a corresponding index file according to the HLS protocol.
In this embodiment of the present invention, the second target data is a media fragment file conforming to multiple TS formats of the HLS protocol.
The index file is in an M3U8(M3U8 file refers to M3U file in UTF-8 encoding format) format conforming to the HLS protocol, and includes an identifier corresponding to the sharded file in the second target data.
And the streaming media server acquires the first target data received by the virtual terminal, converts the first target data and obtains second target data and an index file which accord with an HLS audio transmission protocol.
Step 605, sending the index file to the terminal device.
In the embodiment of the invention, the audio data transmission adopting the HLS protocol is that the data acquirer independently acquires the corresponding fragment files from the data providing end based on the index file, and the fragment files can be played independently. Therefore, the index file is returned to the terminal device, and the terminal device can acquire the fragment file corresponding to the required audio data from the streaming media server according to the index file.
Preferably, after step 605, the method further includes: receiving a second acquisition instruction sent by the terminal equipment according to the index file; and returning the second target data to the terminal equipment according to the second acquisition instruction. And converting the first target data into a TS-format fragment file and a corresponding M3U8 index file according to an HLS protocol. The second acquire instruction comprises an M3U index subfile in the M3U8 index file; and according to the M3U index subfile in the second acquisition instruction, returning the corresponding fragment file.
In the embodiment of the invention, the M3U8 contains an index subfile in an M3U format. The terminal device queries an M3U index subfile corresponding to the current M3U8 index file according to the self requirement, generates the second acquisition instruction according to the M3U index subfile, and then transmits the second acquisition instruction to the terminal device to acquire the fragment file corresponding to the M3U in the HLS format.
In the embodiment of the invention, the streaming media server replaces the video networking terminal to serve as the audio data providing end of the terminal equipment adopting the HLS protocol, so that the bridging between the HLS protocol and the RTMP protocol is realized, and the flexibility of audio data transmission is improved.
The second acquire instruction comprises an M3U index subfile in the M3U8 index file; and according to the M3U index subfile in the second acquisition instruction, returning the corresponding fragment file.
The embodiment of the invention provides a data transmission method, which comprises the following steps: receiving a first acquisition instruction based on an HLS protocol sent by terminal equipment, wherein the first acquisition instruction comprises an IP (Internet protocol), a port number and a data identifier of the terminal equipment; generating an address identifier based on an RTMP protocol according to a first acquisition instruction based on an HLS protocol; the virtual terminal is controlled to acquire first target data from the video network server according to the address identifier; converting the first target data into second target data and a corresponding index file according to an HLS protocol; and sending the index file to the terminal equipment. The embodiment of the invention realizes the bridging between the HLS protocol and the RTMP protocol in the video network and improves the flexibility of video network audio data transmission by arranging the virtual terminal based on the RTMP in the streaming media server to be connected with the video network server based on the RTMP protocol and converting the data of the RTMP protocol into the data which can be identified by the HLS protocol equipment to be acquired by the terminal equipment adopting the HLS protocol.
Example two
Referring to fig. 7, a block diagram of an embodiment of a data transmission video networking system 700 of the present invention is shown, the video networking system comprising: the streaming media server, and terminal equipment and the video network server that the said streaming media server communication connects, the said video network system includes:
a first instruction receiving module 701, configured to receive a first obtaining instruction based on an HLS protocol sent by the terminal device, where the first obtaining instruction includes an IP and a port number of the terminal device, and a data identifier.
Preferably, before the first instruction receiving module 701, the method further includes: the building module is used for building a virtual terminal based on an RTMP protocol; and the connection module is used for establishing communication connection between the virtual terminal and the video networking server.
An address obtaining module 702, configured to generate an address identifier based on the RTMP protocol according to the first obtaining instruction based on the HLS protocol.
A data obtaining module 703, configured to control the virtual terminal to obtain the first target data from the internet of view server according to the address identifier.
A protocol conversion module 704, configured to convert the first target data into second target data and a corresponding index file according to the HLS protocol.
Preferably, the protocol conversion module includes: and the protocol conversion submodule is used for converting the first target data into a fragment file in a TS format and a corresponding M3U8 index file according to an HLS protocol.
An index sending module 705, configured to send the index file to the terminal device.
Preferably, after the index sending module 705, the method further includes: the second instruction acquisition module is used for receiving a second acquisition instruction sent by the terminal equipment according to the index file; and the data sending module is used for returning the second target data to the terminal equipment according to the second acquisition instruction. The second fetch instruction includes: the M3U8 index sub-files of the M3U index file; the data sending module comprises: and the data sending submodule is used for returning the corresponding fragment file according to the M3U index sub-file in the second acquisition instruction.
The embodiment of the invention provides a data transmission method and a networking system, wherein the video networking system comprises: the streaming media server, and terminal equipment and the video network server that the said streaming media server communication connects, the said video network system includes: a first instruction receiving module, configured to receive a first obtaining instruction based on an HLS protocol and sent by the terminal device, where the first obtaining instruction includes an IP, a port number, and a data identifier of the terminal device; the address acquisition module is used for generating an address identifier based on an RTMP protocol according to the first acquisition instruction based on the HLS protocol; the data acquisition module is used for controlling the virtual terminal to acquire first target data from the video network server according to the address identifier; and the protocol conversion module is used for converting the first target data into second target data and a corresponding index file index sending module according to an HLS protocol, and is used for sending the index file to the terminal equipment. The embodiment of the invention realizes the bridging between the HLS protocol and the RTMP protocol in the video network and improves the flexibility of video network audio data transmission by arranging the virtual terminal based on the RTMP in the streaming media server to be connected with the video network server based on the RTMP protocol and converting the data of the RTMP protocol into the data which can be identified by the HLS protocol equipment to be acquired by the terminal equipment adopting the HLS protocol.
For the embodiment of the video networking system, since it is basically similar to the embodiment of the method, the description is simple, and for relevant points, reference may be made to part of the description of the embodiment of the method.
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.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, a video networking system, or a 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 a visual networking system 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 video network systems 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 method for data transmission and the video networking system 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. A data transmission method is applied to a streaming media server in a video network, wherein the streaming media server is in communication connection with a terminal device and the video network server, and the method comprises the following steps:
constructing a virtual terminal based on an RTMP protocol in the streaming media server; establishing communication connection between the virtual terminal and the video networking service device;
receiving a first acquisition instruction based on an HLS protocol and sent by the terminal equipment, wherein the first acquisition instruction comprises an IP (Internet protocol), a port number and a data identifier of the terminal equipment;
generating an address identifier based on an RTMP protocol according to the first acquisition instruction based on the HLS protocol;
controlling the virtual terminal to acquire first target data from the video network server according to the address identifier;
converting the first target data into second target data and a corresponding index file according to an HLS protocol;
and sending the index file to the terminal equipment.
2. The method according to claim 1, wherein after the step of sending the index file to the terminal device, the method further comprises:
receiving a second acquisition instruction sent by the terminal equipment according to the index file;
and returning the second target data to the terminal equipment according to the second acquisition instruction.
3. The method of claim 2, wherein the converting the first target data into a second target data and a corresponding index file according to the HLS protocol comprises:
and converting the first target data into a TS-format fragment file and a corresponding M3U8 index file according to an HLS protocol.
4. The method of claim 3, wherein the second fetch instruction comprises an M3U index subfile of the M3U8 index file;
the returning of the second target data to the terminal device according to the second obtaining instruction includes:
and according to the M3U index subfile in the second acquisition instruction, returning the corresponding fragment file.
5. A video networking system for data transmission, the video networking system comprising: the streaming media server, and terminal equipment and the video network server that the said streaming media server communication connects, the said video network system includes:
the construction module is used for constructing a virtual terminal based on an RTMP protocol in the streaming media server;
the connection module is used for establishing communication connection between the virtual terminal and the video networking server;
a first instruction receiving module, configured to receive a first obtaining instruction based on an HLS protocol and sent by the terminal device, where the first obtaining instruction includes an IP, a port number, and a data identifier of the terminal device;
the address acquisition module is used for generating an address identifier based on an RTMP protocol according to the first acquisition instruction based on the HLS protocol;
the data acquisition module is used for controlling the virtual terminal to acquire first target data from the video network server according to the address identifier;
the protocol conversion module is used for converting the first target data into second target data and a corresponding index file according to an HLS protocol;
and the index sending module is used for sending the index file to the terminal equipment.
6. The video networking system of claim 5, wherein the index sending module is followed by further comprising:
the second instruction acquisition module is used for receiving a second acquisition instruction sent by the terminal equipment according to the index file;
and the data sending module is used for returning the second target data to the terminal equipment according to the second acquisition instruction.
7. The video networking system of claim 6, wherein the protocol conversion module comprises:
and the protocol conversion submodule is used for converting the first target data into a fragment file in a TS format and a corresponding M3U8 index file according to an HLS protocol.
8. The video networking system of claim 7, wherein the second acquisition instruction comprises
The M3U8 index sub-files of the M3U index file; the data sending module comprises:
and the data sending submodule is used for returning the corresponding fragment file according to the M3U index subfile in the second acquisition instruction.
CN201910153491.6A 2019-02-28 2019-02-28 Data transmission method and video networking system Active CN110022295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910153491.6A CN110022295B (en) 2019-02-28 2019-02-28 Data transmission method and video networking system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910153491.6A CN110022295B (en) 2019-02-28 2019-02-28 Data transmission method and video networking system

Publications (2)

Publication Number Publication Date
CN110022295A CN110022295A (en) 2019-07-16
CN110022295B true CN110022295B (en) 2021-09-28

Family

ID=67189159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910153491.6A Active CN110022295B (en) 2019-02-28 2019-02-28 Data transmission method and video networking system

Country Status (1)

Country Link
CN (1) CN110022295B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110474992B (en) * 2019-09-25 2022-07-22 苏州浪潮智能科技有限公司 File transmission method, device, equipment and storage medium
CN110650147A (en) * 2019-09-27 2020-01-03 视联动力信息技术股份有限公司 Data acquisition method and system
CN111669364B (en) * 2020-04-26 2023-09-12 视联动力信息技术股份有限公司 Data transmission method, device, electronic equipment and medium
CN113438282B (en) * 2021-06-04 2022-09-27 北京旷视科技有限公司 Data transmission method and device based on FTP (file transfer protocol) and data transmission server

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107222484A (en) * 2017-06-12 2017-09-29 北京经纬中天信息技术有限公司 Support the stream media server system of multi-protocols input and output
WO2018027237A1 (en) * 2016-08-05 2018-02-08 Sportscastr.Live Llc Systems, apparatus, and methods for scalable low-latency viewing of broadcast digital content streams of live events
CN107707937A (en) * 2017-09-22 2018-02-16 烽火通信科技股份有限公司 Time shift optimization method and system based on HLS protocol
CN107979563A (en) * 2016-10-21 2018-05-01 北京视联动力国际信息技术有限公司 A kind of information processing method and device based on regarding networking
CN108243173A (en) * 2016-12-27 2018-07-03 北京视联动力国际信息技术有限公司 A kind of RTMP video pushing methods and device based on regarding networking
CN108632398A (en) * 2017-07-27 2018-10-09 北京视联动力国际信息技术有限公司 A kind of conference access method and system, association turn server and conference management terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018027237A1 (en) * 2016-08-05 2018-02-08 Sportscastr.Live Llc Systems, apparatus, and methods for scalable low-latency viewing of broadcast digital content streams of live events
CN107979563A (en) * 2016-10-21 2018-05-01 北京视联动力国际信息技术有限公司 A kind of information processing method and device based on regarding networking
CN108243173A (en) * 2016-12-27 2018-07-03 北京视联动力国际信息技术有限公司 A kind of RTMP video pushing methods and device based on regarding networking
CN107222484A (en) * 2017-06-12 2017-09-29 北京经纬中天信息技术有限公司 Support the stream media server system of multi-protocols input and output
CN108632398A (en) * 2017-07-27 2018-10-09 北京视联动力国际信息技术有限公司 A kind of conference access method and system, association turn server and conference management terminal
CN107707937A (en) * 2017-09-22 2018-02-16 烽火通信科技股份有限公司 Time shift optimization method and system based on HLS protocol

Also Published As

Publication number Publication date
CN110022295A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN108737768B (en) Monitoring method and monitoring device based on monitoring system
CN110022295B (en) Data transmission method and video networking system
CN109996086B (en) Method and device for inquiring service state of video networking
CN110602266B (en) Domain name resolution method and system
CN109547163B (en) Method and device for controlling data transmission rate
CN110138728B (en) Video data sharing method and device
CN110049273B (en) Video networking-based conference recording method and transfer server
CN110049341B (en) Video processing method and device
CN108809921B (en) Audio processing method, video networking server and video networking terminal
CN109714568B (en) Video monitoring data synchronization method and device
CN109005378B (en) Video conference processing method and system
CN110087147B (en) Audio and video stream transmission method and device
CN110266577B (en) Tunnel establishment method and video networking system
CN109889516B (en) Method and device for establishing session channel
CN110446058B (en) Video acquisition method, system, device and computer readable storage medium
CN110072154B (en) Video networking-based clustering method and transfer server
CN110336710B (en) Terminal testing method, system and device and storage medium
CN110138729B (en) Data acquisition method and video networking system
CN110113564B (en) Data acquisition method and video networking system
CN109698859B (en) Data storage method and device based on video network
CN110677315A (en) Method and system for monitoring state
CN110536148B (en) Live broadcasting method and equipment based on video networking
CN110149306B (en) Media data processing method and device
CN110572367B (en) Method, system, server, device and storage medium for modifying terminal name
CN110113563B (en) Data processing method based on video network and video network server

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