# US 2019/0246184 A1 · Data Transmission Method and Apparatus, and Electronic Device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0246184 A1
- Document ID: US20190246184A1
- Status: Published application
- Kind: A1
- Application number: 16/335,770
- Filed: 2017-08-23
- Published: 2019-08-08
- Earliest claimed: 2016-09-23
- Assignees: Hangzhou Hikvision Digital Technology Co., Ltd.
- Applicants: Hangzhou Hikvision Digital Technology Co., Ltd.
- Inventors: Anmin XIN; Yiwei CHEN
- Web page: https://patentgrep.com/patent/US20190246184A1

## CPC

- H04L 65/65: Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
- H04L 65/70: Media network packetisation
- H04L 69/22: Parsing or analysis of headers
- H04N 21/6437: Real-time Transport Protocol [RTP]
- H04N 21/8456: {by decomposing the content in the time domain, e.g. in time segments}
- H04W 28/06: Optimizing {the usage of the radio link}, e.g. header compression, information sizing {, discarding information (system modifying transmission characteristic according to link quality by modifying frame length H04L1/0007; dynamic adaptation of the packet size for flow control or congestion control H04L47/365)}
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04W: WIRELESS COMMUNICATION NETWORKS (broadcast communication H04H; communication systems using wireless links for non-selective communication, e.g. wireless extensions H04M1/72)

## Abstract

Embodiments of the present application disclose a method, an apparatus and an electronic device for transmitting data, which relate to technologies of data transmission and storage and can reduce network resource overhead and framing delay. The method for transmitting data includes: dividing a data frame to be transmitted into one or more payload packets having a predetermined length; adding a real-time transport protocol header for each payload packet, and marking a padding bit in the real-time transport protocol header as padded; in the padding field corresponding to the padding bit, marking a data type bit, a frame start bit, a frame end bit and a payload packet type bit for the payload packet to obtain an encapsulated real-time transport protocol packet, and transmitting the encapsulated real-time transport protocol packet. The present application is applicable to the transmission of the RTP encapsulated data.

## Claims

### Claim 1

A method for transmitting data, comprising:
dividing a data frame to be transmitted into one or more payload packets having a predetermined length;
adding a real-time transport protocol header for each payload packet, and marking a padding bit in the real-time transport protocol header as padded;
in a padding field corresponding to the padding bit, marking a data type bit, a frame start bit, a frame end bit and a payload packet type bit for the payload packet to obtain an encapsulated real-time transport protocol packet;
transmitting the encapsulated real-time transport protocol packet.

### Claim 2 (depends on 1)

The method for transmitting data of claim 1, wherein, the padding field corresponding to the padding bit comprises a data padding field and an extension field; wherein, the extension field occupies 4 bytes, and comprises a reserved field, a multiple frame indicator field and a padding size field.

### Claim 3 (depends on 2)

The method for transmitting data of claim 2, wherein, in the multiple frame indicator field, the data type bit occupies 2 bits, each of the frame start bit and the frame end bit occupies 1 bit, and the payload packet type bit occupies 2 bits.

### Claim 4 (depends on 3)

The method for transmitting data of claim 3, wherein, the multiple frame indicator field further comprises a payload packet sequence number bit and a channel bit each of which occupies 4 bits.

### Claim 5 (depends on 1)

The method for transmitting data of claim 1, wherein, the obtaining of an encapsulated real-time transport protocol packet comprises:
if the payload packet is the first payload packet but not the last payload packet of the data frame, in the padding field corresponding to the padding bit, marking the frame start bit as valid, and marking the frame end bit as invalid;
if the payload packet is the first payload packet and the last payload packet of the data frame, in the padding field corresponding to the padding bit, marking the frame start bit as valid, and marking the frame end bit as valid;
if the payload packet is the last payload packet but not the first payload packet of the data frame, in the padding field corresponding to the padding bit, marking the frame start bit as invalid, and marking the frame end bit as valid;
if the payload packet is neither the first payload packet nor the last payload packet of the data frame, in the padding field corresponding to the padding bit, marking the frame start bit as invalid, and marking the frame end bit as invalid;
encapsulating the marked payload packet to obtain an encapsulated real-time transport protocol packet.

### Claim 6 (depends on 5)

The method for transmitting data of claim 5, wherein, before encapsulating the marked payload packet, the method further comprises:
if the payload packet is a video frame I, in the padding field corresponding to the padding bit, marking the data type bit as 00, marking the payload packet type bit as 00, and marking a payload packet sequence number bit based on a sequence number of the payload packet during the dividing of the data frame;
if the payload packet is a video frame P, in the padding field corresponding to the padding bit, marking the data type bit as 00, marking the payload packet type bit as 01, and marking the payload packet sequence number bit based on a sequence number of the payload packet during the dividing of the data frame;
if the payload packet is a video frame B, in the padding field corresponding to the padding bit, marking the data type bit as 00, marking the payload packet type bit as 10, and marking the payload packet sequence number bit based on a sequence number of the payload packet during the dividing of the data frame;
if the payload packet is an audio, in the padding field corresponding to the padding bit, marking the data type bit as 01, marking the payload packet type bit as 01, and marking the payload packet sequence number bit based on a sequence number of the payload packet during the dividing of the data frame;
if the payload packet is private data, in the padding field corresponding to the padding bit, marking the data type bit as 10, marking the payload packet type bit as 11, and marking the payload packet sequence number bit based on a sequence number of the payload packet during the dividing of the data frame.

### Claim 7 (depends on 1)

The method for transmitting data of claim 1, wherein, the method further comprises:
receiving the encapsulated real-time transport protocol packet;
parsing a real-time transport protocol header of the received encapsulated real-time transport protocol packet;
if the padding bit in the real-time transport protocol header is marked as padded, reading each of the marked bits in the padding field corresponding to the padding bit, and obtaining a payload packet in the encapsulated real-time transport protocol packet through parsing based on the read marked bits.

### Claim 8 (depends on 7)

The method for transmitting data of claim 7, wherein, obtaining a payload packet in the encapsulated real-time transport protocol packet through parsing based on the read marked bits, comprises:
reading the marked data type bit in the padding field corresponding to the padding bit; if the data type bit is marked as 01 or 10, reading the frame start bit and the frame end bit in the padding field corresponding to the padding bit; if the frame start bit is marked as valid and the frame end bit is marked as valid, determining that the transmitted data frame only comprises a payload packet behind the currently parsed real-time transport protocol header; if the frame start bit is marked as valid and the frame end bit is marked as invalid, determining that the payload packet behind the currently parsed real-time transport protocol header is the first payload packet in the transmitted data frame; if the frame start bit is marked as invalid and the frame end bit is marked as valid, determining that the payload packet behind the currently parsed real-time transport protocol header is the last payload packet in the transmitted data frame; if the frame start bit is marked as invalid and the frame end bit is marked as invalid, reading the payload packet sequence number bit in the padding field corresponding to the padding bit to determine a position of the payload packet behind the currently parsed real-time transport protocol header in the transmitted data frame;
if the read data type bit in the padding field corresponding to the padding bit is marked as 00, reading the payload packet type bit in the padding field corresponding to the padding bit to determine that the payload packet behind the currently parsed real-time transport protocol header is a video frame I, a video frame P or a video frame B, and reading the frame start bit and the frame end bit, or the frame start bit, the frame end bit and the payload packet sequence number bit in the padding field corresponding to the padding bit to determine the position of the payload packet behind the currently parsed real-time transport protocol header in the transmitted data frame.

### Claim 9 (depends on 7)

The method for transmitting data of claim 7, wherein, the method further comprises:
adding a packetized elementary stream fixed header for the payload packet currently obtained through parsing, and marking a padding bit in the packetized elementary stream fixed header as padded; in the padding field corresponding to the padding bit, marking the data type bit, the frame start bit, the frame end bit and the payload packet type bit for the payload packet to obtain a packetized elementary stream packet;
storing the packetized elementary stream packet.

### Claim 10 (depends on 9)

The method for transmitting data of claim 9, wherein, the length of the padding field corresponding to the padding bit is no more than 7 bytes and no less than 4 bytes, and the padding field comprises a padding byte and an extension field; wherein, the extension field is located between the packetized elementary stream fixed header and the padding byte.

### Claim at position 11

-22. (canceled)

### Claim 23

A storage medium storing instructions that are executed by a processor to implement a method for transmitting data comprising:
dividing a data frame to be transmitted into one or more payload packets having a predetermined length;
adding a real-time transport protocol header for each payload packet, and marking a padding bit in the real-time transport protocol header as padded;
in a padding field corresponding to the padding bit, marking a data type bit, a frame start bit, a frame end bit and a payload packet type bit for the payload packet to obtain an encapsulated real-time transport protocol packet;
transmitting the encapsulated real-time transport protocol packet.

### Claim 24 (depends on 23)

The storage medium of claim 23, wherein, the padding field corresponding to the padding bit comprises a data padding field and an extension field; wherein, the extension field occupies 4 bytes, and comprises a reserved field, a multiple frame indicator field and a padding size field.

### Claim 25 (depends on 24)

The storage medium of claim 24, wherein, in the multiple frame indicator field, the data type bit occupies 2 bits, each of the frame start bit and the frame end bit occupies 1 bit, and the payload packet type bit occupies 2 bits.

### Claim 26 (depends on 25)

The storage medium of claim 25, wherein, the multiple frame indicator field further comprises a payload packet sequence number bit and a channel bit each of which occupies 4 bits.

### Claim 27 (depends on 23)

The storage medium of claim 23, wherein, the obtaining of an encapsulated real-time transport protocol packet comprises:
if the payload packet is the first payload packet but not the last payload packet of the data frame, in the padding field corresponding to the padding bit, marking the frame start bit as valid, and marking the frame end bit as invalid;
if the payload packet is the first payload packet and the last payload packet of the data frame, in the padding field corresponding to the padding bit, marking the frame start bit as valid, and marking the frame end bit as valid;
if the payload packet is the last payload packet but not the first payload packet of the data frame, in the padding field corresponding to the padding bit, marking the frame start bit as invalid, and marking the frame end bit as valid;
if the payload packet is neither the first payload packet nor the last payload packet of the data frame, in the padding field corresponding to the padding bit, marking the frame start bit as invalid, and marking the frame end bit as invalid;
encapsulating the marked payload packet to obtain an encapsulated real-time transport protocol packet.

### Claim 28 (depends on 27)

The storage medium of claim 27, wherein, before encapsulating the marked payload packet, the instructions are further executed to implement:
if the payload packet is a video frame I, in the padding field corresponding to the padding bit, marking the data type bit as 00, marking the payload packet type bit as 00, and marking a payload packet sequence number bit based on a sequence number of the payload packet during the dividing of the data frame;
if the payload packet is a video frame P, in the padding field corresponding to the padding bit, marking the data type bit as 00, marking the payload packet type bit as 01, and marking the payload packet sequence number bit based on a sequence number of the payload packet during the dividing of the data frame;
if the payload packet is a video frame B, in the padding field corresponding to the padding bit, marking the data type bit as 00, marking the payload packet type bit as 10, and marking the payload packet sequence number bit based on a sequence number of the payload packet during the dividing of the data frame;
if the payload packet is an audio, in the padding field corresponding to the padding bit, marking the data type bit as 01, marking the payload packet type bit as 01, and marking the payload packet sequence number bit based on a sequence number of the payload packet during the dividing of the data frame;
if the payload packet is private data, in the padding field corresponding to the padding bit, marking the data type bit as 10, marking the payload packet type bit as 11, and marking the payload packet sequence number bit based on a sequence number of the payload packet during the dividing of the data frame.

### Claim 29 (depends on 23)

The storage medium of claim 23, wherein, the instructions are further executed to implement:
receiving the encapsulated real-time transport protocol packet;
parsing a real-time transport protocol header of the received encapsulated real-time transport protocol packet;
if the padding bit in the real-time transport protocol header is marked as padded, reading each of the marked bits in the padding field corresponding to the padding bit, and obtaining a payload packet in the encapsulated real-time transport protocol packet through parsing based on the read marked bits.

### Claim 30 (depends on 29)

The storage medium of claim 29, wherein, obtaining a payload packet in the encapsulated real-time transport protocol packet through parsing based on the read marked bits, comprises:
reading the marked data type bit in the padding field corresponding to the padding bit; if the data type bit is marked as 01 or 10, reading the frame start bit and the frame end bit in the padding field corresponding to the padding bit; if the frame start bit is marked as valid and the frame end bit is marked as valid, determining that the transmitted data frame only comprises a payload packet behind the currently parsed real-time transport protocol header; if the frame start bit is marked as valid and the frame end bit is marked as invalid, determining that the payload packet behind the currently parsed real-time transport protocol header is the first payload packet in the transmitted data frame; if the frame start bit is marked as invalid and the frame end bit is marked as valid, determining that the payload packet behind the currently parsed real-time transport protocol header is the last payload packet in the transmitted data frame; if the frame start bit is marked as invalid and the frame end bit is marked as invalid, reading the payload packet sequence number bit in the padding field corresponding to the padding bit to determine a position of the payload packet behind the currently parsed real-time transport protocol header in the transmitted data frame;
if the read data type bit in the padding field corresponding to the padding bit is marked as 00, reading the payload packet type bit in the padding field corresponding to the padding bit to determine that the payload packet behind the currently parsed real-time transport protocol header is a video frame I, a video frame P or a video frame B, and reading the frame start bit and the frame end bit, or the frame start bit, the frame end bit and the payload packet sequence number bit in the padding field corresponding to the padding bit to determine the position of the payload packet behind the currently parsed real-time transport protocol header in the transmitted data frame.

### Claim 31 (depends on 29)

The storage medium of claim 29, wherein, the instructions are further executed to implement:
adding a packetized elementary stream fixed header for the payload packet currently obtained through parsing, and marking a padding bit in the packetized elementary stream fixed header as padded; in the padding field corresponding to the padding bit, marking the data type bit, the frame start bit, the frame end bit and the payload packet type bit for the payload packet to obtain a packetized elementary stream packet;
storing the packetized elementary stream packet.

### Claim 32 (depends on 31)

The storage medium of claim 31, wherein, the length of the padding field corresponding to the padding bit is no more than 7 bytes and no less than 4 bytes, and the padding field comprises a padding byte and an extension field; wherein, the extension field is located between the packetized elementary stream fixed header and the padding byte.
