A method and device for processing live broadcast data

By detecting the arrival of video data packets at the receiving end, the problem of audio and video being out of sync when the video live broadcast is started is solved, synchronous playback of audio and video data is realized, and the user experience is improved.

CN115134644BActive Publication Date: 2024-08-27HISENSE VISUAL TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202110318360.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-25
Publication Date
2024-08-27
Estimated Expiration
2041-03-25

AI Technical Summary

Technical Problem

In live video scenarios, the transmission of audio and video data may cause delays in video data transmission due to different bit rates, causing the audio and video to be out of sync when starting playback. The user can only hear the sound but cannot see the picture, which reduces the user experience.

Method used

By determining whether the receiving end contains video data when receiving the first PMT, and detecting subsequent data packets within a set time period, if video data is included, decapsulation and decoding of video and audio are started simultaneously to ensure that the audio and video data synchronized playback.

Benefits of technology

It effectively solves the problem of audio and video being out of sync when starting a live video broadcast, ensuring that users can see the picture and hear the sound at the same time when the live broadcast is started, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115134644B
    Figure CN115134644B
Patent Text Reader

Abstract

The present application provides a method and device for processing live data, which is used to solve the problem that audio and video cannot be played synchronously when live video is started. The method includes: after the user triggers the live video, the first PMT and the second PMT are received successively; wherein the first PMT is the first PMT received after the user triggers the live video, the first PMT indicates that the encoding period corresponding to the first PMT is encoded with audio data and no video data is encoded, and the second PMT indicates that the encoding period corresponding to the second PMT is encoded with video data; the time when the second PMT is received is less than the set time length from the time when the first PMT is received; when the second PMT is received, the live video is started to play the video data and the audio data synchronously.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video live broadcast technology, and in particular to a method and device for processing live broadcast data. Background Art

[0002] Currently, in the live video scene, when the live video starts playing, the sender will encode the audio and video data and send it to the receiver. After receiving the audio and video data, the receiver will decapsulate and decode it, and output the decapsulated and decoded audio data to the audio device and render the video data to the display device. As people are increasingly pursuing high-definition live broadcast images, the bit rate of video data is high, so the encoding rate of video data by the sender will become slower, resulting in untimely video data transmission. And because the bit rate of audio data is low, audio data can be transmitted in time, which will cause the transmission of audio and video to be out of sync. Therefore, when the live video starts playing, it may be possible to only hear the sound but not see the live screen, which reduces the user's viewing experience. Summary of the invention

[0003] The embodiments of the present application provide a method and device for processing live broadcast data, so as to solve the problem of asynchrony of audio and video output during the start-up phase of live video broadcast.

[0004] In a first aspect, an embodiment of the present application provides a display device, including an input interface, a controller, and a display screen, wherein:

[0005] The input interface is used to receive the first PMT and the second PMT successively after the user triggers the video live broadcast;

[0006] The controller is used to start the video live broadcast to render the video data to the display screen and output the audio data when determining that the second PMT is received;

[0007] The display screen is used to display the video data;

[0008] Among them, the first PMT is the PMT received for the first time after the user triggers the video live broadcast, and the first PMT indicates that the coding period corresponding to the first PMT encodes audio data and does not encode video data; the second PMT indicates that the coding period corresponding to the second PMT encodes video data; the time of receiving the second PMT is less than the set duration from the time of receiving the first PMT.

[0009] Based on the above scheme, the first program mapping table PMT received after the user triggers the video live broadcast indicates that only audio data is encoded in the encoding period corresponding to the first PMT. If the second PMT is received within the set time, indicating that video data is encoded in the corresponding encoding period, the audio and video data are played synchronously. This ensures that the audio and video data can be played synchronously, avoiding the situation where only audio is played when the video data is received after the audio data, resulting in the user only hearing the sound but not the picture during the live broadcast start-up phase.

[0010] In some embodiments, the controller is further configured to:

[0011] Before receiving the first PMT, counting the number of data packets carrying audio data and the number of data packets carrying non-audio data received by the input interface;

[0012] When it is determined that the number of data packets carrying audio data is greater than the number of data packets carrying non-audio data, the first duration is used as the set duration; or,

[0013] When it is determined that the number of data packets carrying audio data is less than the number of data packets carrying non-audio data, the second duration is used as the set duration;

[0014] The second duration is greater than the first duration.

[0015] Based on the above scheme, the present application proposes that the set duration can be determined by comparing the number of data packets carrying audio data and the number of data packets carrying non-audio data received before receiving the first PMT. Because if the number of data packets carrying audio data is greater than the number of data packets carrying non-audio data, it indicates that the live broadcast program may be a pure audio program, and the shorter first duration is used as the set duration. On the contrary, if the number of data packets carrying audio data is less than the number of data packets carrying non-audio data, it indicates that the live broadcast program may be a program with both audio and video, and the longer second duration is used as the set duration. Using this method to determine the set duration can adapt to the actual conditions of different programs and avoid waste of resources.

[0016] In a possible implementation manner, the first PMT includes a correspondence between a type identifier for indicating that the data type is audio and a first data packet identifier;

[0017] The controller is specifically used to determine that the number of first data packet identifiers included in the data packets received before receiving the first PMT is the number of data packets carrying audio data, and to determine that the difference between the total number of received data packets and the number of data packets carrying audio data is the number of data packets carrying non-audio data.

[0018] Based on the above scheme, according to the correspondence between the type identifier indicating that the data type is audio and the first data packet identifier in the first PMT, the first data packet identifier is determined to be the identifier of the data packet for carrying audio data. And it is further determined that the number of data packets including the first data packet identifier in the data packets received before receiving the first PMT is the number of data packets carrying audio data, and then the number of data packets carrying non-audio data is determined based on the total number of data packets minus the data of the data packets carrying audio data. This method can ensure that the number of data packets carrying audio data and the number of data packets carrying non-audio data are determined more accurately.

[0019] In some embodiments, the controller is further configured to record the number of different data packet identifiers included in the data packet received by the input interface before receiving the first PMT;

[0020] When it is determined that the number of first data packet identifiers included in the data packets received before receiving the first PMT is the number of data packets carrying audio data, it is specifically used to determine the number corresponding to the first data packet identifier in the number of recorded different data packet identifiers.

[0021] Based on the above solution, before receiving the first PMT, the number of different data packet identifiers included in the received data protection is recorded. With this method, the number of data packets carrying audio data and data packets carrying non-audio data can be determined more quickly, thereby improving efficiency.

[0022] In some embodiments, the controller is further configured to store, before determining that the second PMT is received, in a cache, data packets carrying audio data received after receiving the first PMT;

[0023] And when starting live video broadcast to render the video data to a display screen and output the audio data, it is specifically used to start live video broadcast and output the audio data included in the cache and render the video data received after receiving the second PMT to a display screen.

[0024] Based on the above solution, the data packets carrying audio data received between the first PMT and the second PMT are stored in the cache, and after the second PMT is received, the video data is played synchronously with the audio data in the cache. This solution can ensure the integrity of the broadcast data and reduce the situation where the user is watching an incomplete video due to missing data.

[0025] In a second aspect, an embodiment of the present application provides a live broadcast data processing method, including:

[0026] After the user triggers the live video broadcast, the first PMT and the second PMT are received successively;

[0027] The first PMT is the PMT received for the first time after the user triggers the live video broadcast, the first PMT indicates that the coding period corresponding to the first PMT encodes audio data and does not encode video data, and the second PMT indicates that the coding period corresponding to the second PMT encodes video data; the time when the second PMT is received is less than the set time length from the time when the first PMT is received;

[0028] When the second PMT is received, the live video broadcast is started to synchronously play the video data and the audio data.

[0029] In some embodiments, the method further comprises:

[0030] The number of packets carrying audio data and the number of packets carrying non-audio data received before the first PMT is received;

[0031] When the number of data packets carrying audio data is greater than the number of data packets carrying non-audio data, the first duration is used as the set duration; or,

[0032] When the number of data packets carrying audio data is less than the number of data packets carrying non-audio data, the second duration is used as the set duration;

[0033] The second duration is greater than the first duration.

[0034] In some embodiments, the first PMT includes a correspondence between a type identifier indicating that the data type is audio and a first data packet identifier;

[0035] The number of packets carrying audio data and the number of packets carrying non-audio data received before receiving the first PMT include:

[0036] Determine that the number of first data packet identifiers included in the data packets received before receiving the first PMT is the number of data packets carrying audio data, and determine that the difference between the total number of received data packets and the number of data packets carrying audio data is the number of data packets carrying non-audio data.

[0037] In some embodiments, the method further comprises:

[0038] Before receiving the first PMT, recording the number of each different data packet identifier included in the received data packet;

[0039] Determining that the number of first data packet identifiers included in the data packets received before receiving the first PMT is the number of data packets carrying audio data includes:

[0040] Determine the number corresponding to the first data packet identifier among the numbers of different data packet identifiers recorded.

[0041] In some embodiments, before determining that the second PMT is received, the method further includes:

[0042] storing, in a cache, data packets carrying audio data received after receiving the first PMT;

[0043] Starting a live video broadcast to render the video data to a display screen and output the audio data includes:

[0044] Start live video broadcast and synchronously play the audio data included in the buffer and the video data received after receiving the second PMT.

[0045] In a third aspect, an embodiment of the present application provides a live broadcast data processing device, including:

[0046] A communication unit, configured to successively receive a first PMT and a second PMT after a user triggers a live video broadcast;

[0047] a processing unit, configured to start a live video broadcast to render the video data to a display screen and output the audio data when determining that the second PMT is received;

[0048] A display unit, used for displaying the video data;

[0049] An audio output unit, used for playing the audio data;

[0050] Among them, the first PMT is the PMT received for the first time after the user triggers the video live broadcast, and the first PMT indicates that the coding period corresponding to the first PMT encodes audio data and does not encode video data; the second PMT indicates that the coding period corresponding to the second PMT encodes video data; the time when the second PMT is received is less than the set duration from the time when the first PMT is received.

[0051] In some embodiments, the processing unit is further configured to:

[0052] Before receiving the first PMT, counting the number of data packets carrying audio data and the number of data packets carrying non-audio data received by the communication unit;

[0053] When it is determined that the number of data packets carrying audio data is greater than the number of data packets carrying non-audio data, the first duration is used as the set duration; or,

[0054] When it is determined that the number of data packets carrying audio data is less than the number of data packets carrying non-audio data, the second duration is used as the set duration;

[0055] The second duration is greater than the first duration.

[0056] In some embodiments, the first PMT includes a correspondence between a type identifier indicating that the data type is audio and a first data packet identifier;

[0057] The processing unit is specifically used to determine that the number of first data packet identifiers included in the data packets received before receiving the first PMT is the number of data packets carrying audio data, and to determine that the difference between the total number of received data packets and the number of data packets carrying audio data is the number of data packets carrying non-audio data.

[0058] In some embodiments, the processing unit is further configured to record the number of different data packet identifiers included in the data packet received by the communication unit before receiving the first PMT;

[0059] When it is determined that the number of first data packet identifiers included in the data packets received before receiving the first PMT is the number of data packets carrying audio data, it is specifically used to determine the number corresponding to the first data packet identifier in the number of recorded different data packet identifiers.

[0060] In some embodiments, the processing unit is further configured to store, before determining that the second PMT is received, in a cache, data packets carrying audio data received after receiving the first PMT;

[0061] And when starting live video broadcast to render the video data to the display unit and send the audio data to the audio output unit, it is specifically used to start live video broadcast and output the audio data included in the cache to the audio output unit and render the video data received after receiving the second PMT to the display unit.

[0062] In a fourth aspect, an embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores computer program instructions, and when the instructions are executed on a computer, the computer executes the method for processing live broadcast data as described in the second aspect.

[0063] The technical effects brought about by any implementation method in the second to fourth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0065] Figure 1A A schematic diagram of the structure of a UDP data packet provided in an embodiment of the present application;

[0066] Figure 1B A schematic diagram of the structure of a TS packet provided in an embodiment of the present application;

[0067] Figure 1C A schematic diagram of the structure of a PMT table provided in an embodiment of the present application;

[0068] Figure 2A A schematic diagram of a receiving end scenario provided in an embodiment of the present application;

[0069] Figure 2B A schematic diagram of another receiving end scenario provided in an embodiment of the present application;

[0070] Figure 3A A hardware configuration block diagram of a terminal device provided in an embodiment of the present application;

[0071] Figure 3B A configuration block diagram of a control device 100 provided in an embodiment of the present application;

[0072] Figure 3C A software structure block diagram of a terminal provided in an embodiment of the present application;

[0073] Figure 4 A schematic diagram of the architecture of a live broadcast data processing system provided in an embodiment of the present application;

[0074] Figure 5 A schematic diagram of the structure of Table 1 provided in an embodiment of the present application;

[0075] Figure 6 A flowchart of a live broadcast data processing method provided in an embodiment of the present application;

[0076] Figure 7 A flowchart of playing a new live program provided in an embodiment of the present application;

[0077] Figure 8 A flowchart of another live data processing method provided in an embodiment of the present application;

[0078] Fig. 9 A schematic diagram of the structure of a display device provided in an embodiment of the present application;

[0079] Fig.10 A schematic diagram of another live data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0080] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0081] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.

[0082] Before introducing the embodiments of the present application, the technical terms involved in the embodiments of the present application are first explained:

[0083] (1) User Datagram Protocol (UDP) is a simple connectionless network transport layer protocol with the advantages of low latency and high data transmission efficiency. It is widely used in real-time transmission of audio and video data. For ease of understanding, in the embodiments of the present application, the data packets transmitted by the UDP protocol are referred to as UDP data packets. UDP data packets generally include an 8-byte header and a payload. For example, see Figure 1A As shown, the packet header may include a source port, a destination port, a length, and a checksum.

[0084] Source Port: This field usually occupies the first 16 bits of the UDP header and usually contains the UDP port used by the application sending the datagram. The receiving application uses the value of this field as the destination address to send the response. Destination Port: The port used by the receiving end. Length: Indicates the length of the UDP data packet, including the UDP header and the UDP data length. Checksum: It can be used to check whether the data is damaged during transmission. The payload contains the data to be transmitted.

[0085] (2) Transport Stream (TS): A single data stream composed of one or more data packets with a common time base or independent time base, used for data transmission. For the sake of convenience, the data packets transmitted in the TS stream will be referred to as TS packets. The size of a TS packet is generally 188 bytes. A TS packet contains a header and a payload. For example, see Figure 1B As shown, the packet header includes the PID of the TS packet, a synchronization byte, a transmission error indicator, a payload unit start indicator, a transmission priority, a transmission scrambling control, an adaptation field control, and a continuity counter.

[0086] Among them, the payload unit start indicator is the beginning of a completed data packet. The transmission priority indicates the priority of the transmission, 0 is low priority, 1 is high priority, and it is usually taken as 0. The packet identification code PID is a unique identifier for each TS packet. The transmission scrambling control is used to indicate whether it is encrypted, for example, 00 means unencrypted. The adaptation field control indicates whether the adaptation area is included, for example, "00" means reserved, "01" generally means no adaptation area, only contains a payload, "10" generally means only contains an adaptation area, no payload, and "11" generally means both an adaptation area and a payload. The continuous counter generally ranges from 0-f, and the starting value may not be 0, but it needs to be continuous. The payload of the TS packet can be audio data, video data, or a PMT table or a PAT table. That is to say, there are four types of TS packets involved in the embodiments of the present application: TS packets for carrying audio data, TS packets for carrying video data, TS packets for carrying PAT tables, and TS packets for carrying PMT tables. For the sake of convenience, the TS packets used to carry audio data will be referred to as audio TS packets, and the TS packets used to carry video data will be referred to as video TS packets.

[0087] (3) Elementary Stream (ES) is the original bitstream output by the encoder for transmitting audio and video signals. ES contains only one type of content, such as video or audio.

[0088] (4) Packetized Elementary Streams (PES) are packetized ES streams, a data structure used to transmit ES streams. PES streams are data streams formed after ES streams are packetized. In this process, operations such as grouping, packaging, and adding header information to ES streams are completed. The basic unit of PES streams is PES packets. When transmitting, PES packets are grouped and packaged. TS packets contain grouped and packaged PES packets.

[0089] (5) Packet Identifier (PID). PID is a unique identifier for a data packet transmitted in a TS stream. There is only one PID corresponding to the video data of a live program, and there is only one PID corresponding to the audio data of a live program. The PID is located in the header of the TS packet.

[0090] (6) Program Map Table (PMT), which is used to record the type of data encoded in a coding cycle and the PID of the TS packet generated in the coding cycle. The header of the TS packet used to carry the PMT table contains the PID of the PMT table. The PMT table generally contains PMT fixed content, optional description table, types of all data packets contained in the current program, reserved fields, PID of the data packet, information length in the data packet, information description table, and CRC check. Among them, the types of data packets contained in the current program are usually audio, video, and other related data types. Among them, the types of all data packets contained in the current program are used to indicate whether the type of TS packet is audio type or video type, that is, whether the data carried by the TS packet is audio data or video data. The reserved field is used for byte alignment. Information length in the data packet: used to describe the length of the information description table. Information description table: description table of TS packet, different TS packets have different description tables. CRC check is used to record the cyclic redundancy code (Cyclic Redundancy Check, CRC) output by the encoder. As an example, the structure of the PMT table can be seen as follows Figure 1C The structure shown in Figure 1C In the structure shown, it is taken as an example that N data types are encoded in each encoding cycle.

[0091] (7) Program Association Table (PAT), which is used to define the programs in the TS packet. The PID of the TS packet carrying the PAT table is 0. The PAT table mainly contains the PID of the PMT.

[0092] In the live video broadcast scenario, the transmitter will encode the collected audio and video data, package it into UDP packets, and send it to the receiver. The receiver will decapsulate and decode the received data packets, and further output the decoded data to the player. However, since the bit rates of audio and video are different, the audio bit rate is generally lower than the video bit rate, so the encoding rate of audio data is faster and the encoding rate of video data is slower, which will cause the audio data and video data to be asynchronous, and the audio data may be transmitted normally, while the video data transmission may be delayed. During the video startup phase, if the type of data packet indicated in the first PMT received by the receiver does not contain video data, the player will only build a decapsulation, decoding and playback channel for the audio data, and only output the audio to the speaker. Subsequent video data received cannot be decapsulated, decoded or rendered, so there will be a situation where there is only sound but no picture. For example, please refer to Figure 2A In the scenario shown, the receiving end's display screen cannot display images, and the user can only hear sounds, which reduces the user's viewing experience.

[0093] Based on this, the present application proposes a method and device for processing live data. When the receiving end receives the first PMT indicating that the type of data packet does not include video data, the receiving end will not directly start playing audio data, but will detect whether the subsequent data packets contain video data within a set time. If so, the audio and video data will be synchronized, thereby solving the problem of only sound but no picture in the start-up playback stage, so that the receiving end can output audio and video data synchronously. For example, see Figure 2B The scene shown.

[0094] Below, in order to facilitate understanding of the solution of the present application, the solution of the present application will be described with multiple embodiments in different scenarios. The solution proposed in the present application can be applied to a terminal device, and the terminal device involved in the present application has a display function, such as a computer, a television, a smart phone or a tablet computer. It should be noted that the terminal device with a display function in the present application can also be called a display device.

[0095] As an example, the structure of the terminal device involved in this application is described in detail below. Figure 3A , which is a schematic diagram of a possible hardware configuration of a terminal device 200. In some embodiments, the terminal device includes at least one of a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a processor 250, a display component 260, an audio output interface 270, a memory, a power supply, and a user interface 280.

[0096] In some embodiments, the display component 260 includes a display screen component for presenting images, and a driving component for driving image display, a component for receiving image signals output from a processor, and a component for displaying video content, image content, and a menu control interface, as well as a user control user interface (UI) interface, etc.

[0097] In some embodiments, the display component 260 may be at least one of a liquid crystal display, an organic light-emitting diode (OLED) display, and a projection display, and may also be a projection device and a projection screen.

[0098] In some embodiments, the tuner-demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals from a plurality of wireless or wired broadcast television signals.

[0099] In some embodiments, the communicator 220 is a component for communicating with an external device or server according to various communication protocol types. For example, the communicator may include at least one of a wireless fidelity (Wifi) module, a Bluetooth module, a wired Ethernet module, and other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The terminal 200 can transmit data with the target health detection device or the peer device 300 through the communicator 220.

[0100] In some embodiments, the detector 230 is used to collect signals of the external environment or external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.

[0101] In some embodiments, the external device interface 240 may include, but is not limited to, any one or more of the following: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, a camera interface, etc. It may also be a composite input / output interface formed by the above multiple interfaces.

[0102] In some embodiments, the processor 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the processor 250 is located, such as an external set-top box.

[0103] In some embodiments, the processor 250 includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), RAM (Random Access Memory), ROM (Read-Only Memory), a first interface to an nth interface for input / output, a communication bus, etc.

[0104] In some embodiments, the CPU is used to execute operating system and application instructions stored in the memory, and to execute various applications, data and content according to various interactive instructions received from external input, so as to finally display and play various audio and video content. The CPU processor may include multiple processors. For example, it may include a main processor and one or more sub-processors.

[0105] In some embodiments, the graphics processor is used to generate various graphic objects, such as at least one of icons, operation menus, and user input command display graphics. The graphics processor includes an operator, which performs operations by receiving various interactive instructions input by the user and displays various objects according to display attributes; and a renderer, which renders various objects obtained based on the operator, and the rendered objects are used to be displayed on the display component.

[0106] In some embodiments, the video processor is used to receive an external video signal and perform at least one of the following video processing operations, such as decompression, decoding, scaling, noise reduction, frame rate conversion, resolution conversion, and image synthesis, according to a standard codec protocol of the input signal, to obtain a signal that can be directly displayed or played on the terminal 200.

[0107] In some embodiments, the video processor includes at least one of a demultiplexing module, a video decoding module, an image synthesis module, a frame rate conversion module, and a display formatting module. The demultiplexing module is used to demultiplex the input audio and video data stream. The video decoding module is used to process the demultiplexed video signal, including decoding and scaling. The image synthesis module, such as an image synthesizer, is used to superimpose and mix the GUI signal generated by the graphics generator according to the user input or itself with the scaled video image to generate an image signal for display. The frame rate conversion module is used to convert the input video frame rate. The display formatting module is used to receive the video output signal after frame rate conversion and change the signal to conform to the display format signal, such as outputting an RGB data signal.

[0108] In some embodiments, the audio processor is used to receive an external audio signal, perform decompression and decoding according to a standard codec protocol of the input signal, and perform at least one of noise reduction, digital-to-analog conversion, and amplification processing to obtain a sound signal that can be played in a speaker.

[0109] In some embodiments, the user may input a user command in a graphical user interface (GUI) displayed on the display unit 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command by inputting a specific sound or gesture, and the user input interface receives the user input command by recognizing the sound or gesture through a sensor.

[0110] In some embodiments, the "display interface" is a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The commonly used form of user interface is the Graphical User Interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be an interface element such as an icon, window, control, etc. displayed on the display screen of the terminal, where the control can include at least one of the visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc.

[0111] In some embodiments, the user interface 280 is an interface that can be used to receive control input (such as a physical button on the opposite device body, or other interfaces).

[0112] In some embodiments, the system of the peer device may include a kernel, a command parser (shell), a file system, and an application. The kernel, shell, and file system together constitute the basic operating system structure, which allows users to manage files, run programs, and use the system. After power-on, the kernel starts, activates the kernel space, abstracts the hardware, initializes hardware parameters, etc., runs and maintains virtual memory, schedulers, signals, and inter-process communication (IPC). After the kernel starts, the shell and user applications are loaded. After startup, the application is compiled into machine code to form a process.

[0113] In some embodiments, the present application may further include a control device 100, which is configured to control Figure 3AThe terminal device 200 shown can receive operation instructions input by the user, and convert the operation instructions into instructions that the terminal device 200 can recognize and respond to, playing the role of an intermediary for the interaction between the user and the terminal device 200. For example, the user operates the channel increase and decrease keys on the control device 100, and the terminal device 200 responds to the channel increase and decrease operations.

[0114] The control device 100 may be a remote controller 100A, including infrared protocol communication or Bluetooth protocol communication, and other short-range communication methods, etc., to control the terminal device 200 wirelessly or by wire. The user may input user commands through buttons on the remote controller, voice input, input on the control panel, etc. to control the terminal device 200. For example, the user may input corresponding control commands through the volume plus and minus keys, channel control keys, up / down / left / right movement keys, voice input keys, menu keys, power on / off keys, etc. on the remote controller to realize the function of controlling the terminal device 200.

[0115] The control device 100 may also be a smart device, such as a mobile terminal 100B, a tablet computer, a computer, a laptop computer, etc. For example, an application running on the smart device is used to control the terminal device 200. The application can be configured to provide the user with various controls through an intuitive user interface (UI) on a screen associated with the smart device.

[0116] Figure 3B exemplarily shows a configuration block diagram of the control device 100. Figure 3B As shown, the control device 100 may include a controller 110, a memory 120, a communicator 130, a user input interface 140, an output interface 150, and a power supply 160. It should be understood that Figure 3B It is just an example, the control device 100 may include a Figure 3B More or better components may be used, and this application does not make any specific limitation on this.

[0117] The controller 110 includes a random access memory (RAM) 111, a read only memory (ROM) 112, a processor 113, a communication interface and a communication bus. The controller 110 is used to control the operation and operation of the control device 100, as well as the communication cooperation between internal components and external and internal data processing functions.

[0118] Exemplarily, when an interaction of a user pressing a key arranged on the remote controller 100A or touching a touch panel arranged on the remote controller 100A is detected, the controller 110 may control generation of a signal corresponding to the detected interaction and send the signal to the terminal device 200.

[0119] The memory 120 is used to store various operating programs, data and applications for driving and controlling the control device 100 under the control of the controller 110. The memory 120 can store various control signal instructions input by the user.

[0120] Under the control of the controller 110, the communicator 130 realizes the communication of control signals and data signals with the terminal device 200. For example, the control device 100 sends a control signal (such as a touch signal or a button signal) to the terminal device 200 via the communicator 130, and the control device 100 can receive the signal sent by the terminal device 200 via the communicator 130. The communicator 130 may include an infrared signal interface 131 and a radio frequency signal interface 132. For example, when using an infrared signal interface, the user input command needs to be converted into an infrared control signal according to the infrared control protocol, and sent to the terminal device 200 via the infrared sending module. For another example, when using a radio frequency signal interface, the user input command needs to be converted into a digital signal, and then modulated according to the radio frequency control signal modulation protocol, and then sent to the terminal device 200 by the radio frequency sending terminal.

[0121] The user input interface 140 may include at least one of a microphone 141, a touchpad 142, a sensor 143, a button 144, etc., so that the user can input user instructions about controlling the terminal device 200 to the control device 100 through voice, touch, gesture, pressing, etc.

[0122] The output interface 150 outputs the user command received by the user input interface 140 to the terminal device 200, or outputs the image or voice signal received by the terminal device 200. Here, the output interface 150 may include an LED interface 151, a vibration interface 152 for generating vibrations, a sound output interface 153 for outputting sounds, and a display 154 for outputting images. For example, the remote controller 100A may receive an output signal such as audio, video or data from the output interface 150, and display the output signal in the form of an image on the display 154, output it in the form of an audio in the sound output interface 153, or output it in the form of a vibration in the vibration interface 152.

[0123] The power supply 160 is used to provide operating power support for various components of the control device 100 under the control of the controller 110. The power supply 160 can be in the form of a battery and related control circuits.

[0124] See also Figure 3C , which exemplarily shows a block diagram of the architecture configuration of the terminal device operating system. The operating system architecture is composed of the application layer, the middleware layer and the kernel layer from top to bottom.

[0125] The application layer includes both built-in applications and non-system-level applications. It is responsible for direct interaction with users. The application layer may include multiple applications, such as settings applications, media center applications, etc. These applications can be implemented as web applications, which are executed based on the WebKit engine and can be developed and executed based on HTML5, Cascading Style Sheets (CSS), JavaScript, etc.

[0126] The middleware layer can provide some standardized interfaces to support the operation of various environments and systems. For example, the middleware layer can be implemented as the Multimedia and Hypermedia Information Coding Experts Group (MHEG) middleware related to data broadcasting, as the DLNA middleware related to external device communication, or as the middleware that provides the browser environment for the running of various applications in the terminal.

[0127] The kernel layer provides core system services, such as file management, memory management, process management, network management, system security permission management, etc. The kernel layer can be implemented as a kernel based on various operating systems, for example, a kernel based on the Linux operating system.

[0128] The kernel layer also provides communication between system software and hardware, and provides device driver services for various hardware, such as: providing display drivers for display components, camera drivers for cameras, WiFi drivers for WiFi modules, audio drivers for audio output interfaces, power management drivers for power management (PM) modules, etc.

[0129] The hardware configuration and software structure of different terminals may vary, so the above Figure 3A and Figure 3B All are exemplary descriptions.

[0130] In order to facilitate understanding of the embodiments of the present application, Figure 4 The live data processing system architecture diagram shown is used as an example for specific description.

[0131] Figure 4 The architecture diagram shown includes a sending end device 401 , a sending end server 402 , a receiving end server 403 , and a receiving end device 404 .

[0132] Among them, the sending end device (which may be referred to as the sending end) 401 involved in the present application may be a terminal device (also referred to as a display device) with functions such as video recording and recording, and may be a mobile phone (MobilePhone), tablet computer, laptop computer, PDA, mobile Internet device (Mobile Internet Device, MID), wearable device, etc. with functions such as video recording and recording. Wearable devices may include, for example, smart watches or smart bracelets. It may also be a television with functions such as video recording and recording, or it may be a device that can record video such as a camera that can be connected to the Internet. For example, the sending end device 401 may be a terminal device used by a live broadcast initiator (such as a host) in a live broadcast scene. The sending end device 401 may directly upload the collected video and audio data to the sending end server 402, or it may first encode the collected video and audio data, and then send the encoded audio and video data to the sending end server 402. The structure of the sending end device 401 may adopt the above-mentioned Figure 3A The structure of the terminal device shown in FIG. Figure 4 This is just an example, and the embodiment of the present application does not limit the number of transmitting end devices. The live data processing system may also include an encoder connected to the transmitting end device. For example, when the transmitting end device is a camera, it can be connected to the encoder, and the camera transmits the real-time data to the encoder, which encodes it. The encoder is not shown in the figure. Figure 4 middle.

[0133] The sending end server 402 involved in this application can be a client server corresponding to the sending end device used by the live broadcast initiator in the live broadcast scenario. The sending end server 402 can be used to receive the encoded data and send it to the receiving end. Alternatively, the sending end server 402 can also receive unencoded audio and video data, encode and encapsulate the data, and send it to the receiving end device 404. It should be noted that Figure 4 Just as an example, the functions of the sending server 402 involved in this application can be implemented by one server or by a server cluster, and this application does not make any specific limitation on this.

[0134] The receiving end server 403 involved in the present application can be a client server corresponding to the receiving end device used by the user watching the live broadcast in the live broadcast scene. The receiving end server 403 can be used to receive the encoded audio and video data from the sending end server 402. The receiving end server 403 can also be used to decode the encoded audio and video data and send the decoded audio and video data to the receiving end device 404. Alternatively, the receiving end server 403 can also directly send the encoded audio and video data to the receiving end device 404. It should be noted that Figure 4As just an example, in an actual scenario, the function of the receiving end server 403 may also be implemented by a server cluster. In some embodiments, the functions of the sending end server 402 and the receiving end server 403 may also be implemented by one server.

[0135] The receiving device (receiving device) 404 involved in the present application may be a terminal device with audio and video playback function and a display screen (also referred to as a display device), and may be a mobile phone with audio and video playback function, a tablet computer, a laptop computer, a PDA, a mobile Internet device, a TV with audio and video playback function, etc. The structure of the receiving device 404 may adopt the above Figure 4 The structure of the terminal device shown. In an embodiment of the present application, the receiving device 404 may be a device used by a user watching a live broadcast, which is used to receive the decoded audio and video data sent by the receiving server, and output the decoded audio data to an audio device, such as a speaker provided by the receiving device 404 or a device such as an audio device connected to the receiving device 404. Then render the video data to a display screen. The receiving device 404 involved in the present application may also have a decapsulation and decoding function, receive undecoded audio and video data from the receiving server, use its own decapsulation and decoding function to decode the audio and video data, and then output the decoded audio data to the audio device, and render the decoded video data to a display screen.

[0136] It should be noted that Figure 4 The live data processing system architecture diagram shown is only an example, and the present application does not specifically limit the number of devices and servers in the system. It should be understood that the live data processing system may also include other terminal devices in addition to the sending end device and the receiving end device.

[0137] Next, combine Figure 4 The system architecture diagram shown specifically illustrates the live broadcast data processing method proposed in the embodiment of the present application. Live broadcast data is data generated during the live broadcast process, including audio data and video data. In the live video broadcast scenario, a variety of transmission protocols can be used to transmit the audio and video data generated during the live broadcast, for example, it can be the Transmission Control Protocol (TCP), the User Datagram Protocol (UDP), etc. In this application, the use of the UDP protocol to transmit live broadcast data is taken as an example.

[0138] In a live broadcast scenario, the transmitter can collect video data through a camera and audio data through a microphone or other sound receiving device. In some embodiments, after acquiring the audio data and video data, the transmitter can encode the audio data and video data to obtain an ES stream for transmitting the audio and video data. The transmitter can further segment and package the audio ES stream and the video ES stream to obtain audio PES packets and video PES packets. In some embodiments, the transmitter can further group and package the audio PES packets and the video PES packets to obtain TS packets. As an example, the structure of the TS packet can be seen in Figure 1B The structure shown. In some optional ways, when the transmitting end encodes the audio and video data (audio data and video data), a PAT table and a PMT table are generated in each encoding cycle. The PAT table and the PMT table can also be carried in the TS packet for transmission. Exemplarily, the PID in the packet header of the TS packet for carrying the PAT table can be 0, the PID of all audio TS packets corresponding to a live program is the same, the PID of all video TS packets corresponding to a live program is the same, and the PID of the audio TS packet is different from that of the video TS packet. The PAT table generated in each encoding cycle is mainly used to record the PID of the PMT table generated in the encoding cycle. The PMT table generated in each encoding cycle is mainly used to record the media type of the data encoded in the encoding cycle, that is, whether the encoded data is audio data or video data and the PID of the TS packet generated in the encoding cycle for carrying audio or video data. As an example, the structure of the PMT table can be seen as follows Figure 1C The structure shown.

[0139] It should be noted that the above description of the sender includes that the sender can encode and package the collected audio stream and video stream, and generate a PAT table and a PMT table corresponding to each encoding cycle. It also includes that the sender can just upload the collected audio stream and video stream to the sender server, and the sender server performs the above encoding, packaging and other operations.

[0140] The embodiment of the present application provides a live data processing method in two scenarios. One is when the user triggers the start of the live video broadcast, and the TS packet type indicated by the first PMT received by the receiving end does not include the video type. The other is when the PMT received by the receiving end changes during the live video playback. The two scenarios are described below.

[0141] (1) When the user triggers the start of live video broadcast, the TS packet type indicated by the first PMT received by the receiving end does not include the video type.

[0142] After the sender completes encoding and packaging the collected audio and video streams, it will send the TS packets carrying the audio data, video data, PAT table and PMT table to the receiver.

[0143] In this scenario, when the receiving end first receives not the TS packets carrying the PAT table and the PMT table, but the audio TS packets or the video TS packets, since the PIDs of these TS packets have never appeared, the receiving end will regard these TS packets as unknown data packets and ignore them, while recording the PIDs of the deleted TS packets and the number of TS packets with different PIDs. In some embodiments, the receiving end may be configured with a counter to record the number of TS packets with different PIDs received. The recorded PIDs of the TS packets and the number of TS packets may also be stored in the form of a table, for example, in the form of a hash table. For ease of description, this table will be referred to as Table 1 below. As an example, Table 1 can refer to the following. Figure 5 Table shown.

[0144] After the receiving end deletes the unknown data packet, when the receiving end first receives the TS packet for carrying the PAT table, it can first determine that the TS packet carries the PAT table based on the PID of the TS packet being 0, and then parse the TS packet to obtain the PID of the PMT table recorded in the PAT table. The receiving end determines the first received TS packet for carrying the PMT table based on the PID of the PMT recorded in the PAT table. For ease of description, the first received PMT table is referred to as the first PMT. After receiving the first PMT, the receiving end determines whether the TS packet type indicated by the first PMT contains a video type.

[0145] In some embodiments, if the TS packet type indicated by the first PMT includes an audio type and a video type, the receiving end will decapsulate and decode the audio TS packet and the video TS packet indicated in the first PMT, and synchronously output the decoded audio data and video data.

[0146] In other embodiments, the TS packet type indicated by the first PMT does not include a video type. In this case, it is possible that the encoding speed of the video data is lower than the output speed of the video data due to the high bit rate of the video data, while the audio data does not have the problem of the encoding speed being lower than the output speed of the audio data, so the audio data will be output normally, but the video data will be delayed, resulting in the audio data and the video data being out of sync. The receiving end will determine the PID of the audio TS packet based on the correspondence between the type identifier indicating that the data type is an audio type in the first PMT and the PID of the TS packet, and store the audio TS packet in a cache (for example, it can be stored in the form of a queue), and detect whether a TS packet of the TS packet type of the video type is received subsequently within a set time length after receiving the first PMT. For example, determine whether the type of the received TS packet is a video type based on the indication in the subsequently received PMT table. For ease of description, the first PMT table indicating that the type of the TS packet received within the set time length and containing the video type will be referred to as the second PMT. In some embodiments, the set duration can be set according to the following logic: according to the PID of the audio TS packet recorded in the first PMT, the number of audio TS packets and the number of non-audio data packets stored in Table 1 are determined, and the number of audio TS packets in Table 1 is determined to be greater than the number of non-audio TS packets, and the first duration is used as the set duration. If the number of audio TS packets in Table 1 is determined to be less than the number of non-audio TS packets according to the PID of the audio TS packet recorded in the first PMT, the second duration is used as the set duration. Among them, the second duration is greater than the first duration. The reason for using the above logic to determine the set duration is: since audio data is generally less than video data, that is, the number of audio TS packets of the same live program is generally less than the number of video TS packets. Then, when it is determined that the number of audio TS packets in Table 1 is less than the number of non-audio TS packets, it means that the non-audio TS packets are likely to include video TS packets, and it is determined that the live program is likely to be a program with both audio and video. That is to say, there is a high probability that there are video TS packets in the TS packets received later, and the longer second duration is used as the set duration. Otherwise, the first duration is used as the set duration.

[0147] In some possible cases, when the receiving end receives the second PMT within the set time, the receiving end can construct a decapsulation, decoding, and playback channel for audio TS packets and video TS packets, decapsulate and decode the video TS packets indicated in the second PMT and the audio TS packets stored in the buffer queue, and synchronously output the decoded audio and video data to the player, and the player outputs the audio data to the speaker and renders the video data to the display screen. In some embodiments, the receiving end may regard the video TS packets received before receiving the second PMT as unknown data packets and delete the video TS packets regarded as unknown data packets, so that the received video TS packets may be missing compared to the received audio TS packets. Therefore, when the decoded audio and video data are synchronously output, the timestamp of the video data can be used as the reference timestamp, and the audio data less than the timestamp of the video data can be discarded, so that the audio data and the video data can be synchronously output.

[0148] In other possible cases, when the receiving end does not receive the video TS packet within the set time, it means that the current live program is a pure audio program, then the decapsulation, decoding, and playback channel of the audio TS packet can be constructed, the audio TS packets stored in the buffer queue can be decapsulated and decoded, and the decoded audio data can be output to the speaker.

[0149] Below, see Figure 6 , a specific process is used to illustrate the live data processing method in this scenario.

[0150] 601. The transmitting end sends P TS packets to the receiving end. The P TS packets do not include the TS packet carrying the PMT table.

[0151] 602. The receiving end deletes the received P TS packets and records the PIDs of the P TS packets and the number of TS packets with different PIDs.

[0152] The receiving end may record the PIDs of P TS packets and the number of TS packets with different PIDs in the same manner as in the above embodiment. Figure 5 The records are made in the form of the table shown.

[0153] 603. The sending end sends a TS packet carrying the PAT table and a TS packet carrying the first PMT table to the receiving end.

[0154] For example, the receiving end can determine that the TS packet carries a PAT table according to the PID of 0, and further determine the first PMT according to the PID of the PMT table included in the PAT. For the introduction of the first PMT, please refer to the above embodiment.

[0155] 604. The receiving end determines that the type of the TS packet indicated by the first PMT does not include a video type.

[0156] 605, the sending end continues to send TS packets to the receiving end.

[0157] 606. The receiving end stores the audio TS packet in a buffer queue, and determines that the TS packet carrying the second PMT is received within a set time period.

[0158] The receiving end can determine the audio TS packet in the subsequently received TS packet according to the PID of the audio TS packet recorded in the first PMT and the PID contained in the subsequently received TS packet, and store the audio TS packet in the buffer queue. For the introduction of the second PMT and the setting duration, please refer to the above specific embodiment.

[0159] 607, the receiving end decapsulates and decodes the video TS packets indicated in the second PMT and the audio TS packets in the buffer queue, and synchronously outputs the decoded audio and video data.

[0160] It should be noted that the P TS packets in 601, the TS packet carrying the PAT table and the TS packet carrying the first PMT in 603, and the TS packet in 605 are sent continuously by the transmitting end device. Figure 6 It is only used as an example and does not constitute a limitation on the time interval.

[0161] (2) During the live broadcast, the PMT received by the receiving end changes.

[0162] During the live video broadcast, the receiving end decapsulates and decodes the audio TS packets and video TS packets indicated in the PMT table according to the received PMT table, outputs the decoded audio data to the speaker, and renders the decoded video data to the display screen. However, in this process, the currently received PMT table may be different from the first received PMT table that includes both audio data and video data.

[0163] The currently received PMT table and the first received PMT table that includes both audio data and video data belong to the same program. For the convenience of description, the currently received PMT table is called the current PMT table, and the first received PMT table that includes both audio data and video data is called the original PMT table. The current PMT table may have the following two changes compared to the original PMT table:

[0164] One change is that the TS packets recorded in the current PMT table change. For example, compared with the original PMT table, the type of TS packets recorded in the current PMT table changes. For example, the original PMT table records audio TS packets and video TS packets, while the current PMT table only records audio TS packets.

[0165] Another change is that compared with the original PMT table, the PID of the TS packet recorded in the current PMT table changes.

[0166] For the first change mentioned above, it may be caused by the slow encoding speed of the transmitter temporarily failing to catch up with the speed of live video playback, so the received PMT table can be automatically restored after the encoding speed is increased. In this case, the receiver can ignore this change, and the original decapsulation, decoding and playback channels do not need to be changed and can be maintained as they are. For example, when the TS packets recorded in the original PMT table include both audio TS packets and video TS packets, and the TS packets recorded in the current PMT table only include audio TS packets. In this case, if the receiver plays the audio data time axis as the reference time axis, the status quo can be maintained and the audio data can still be output based on the audio data time axis; if the receiver plays the video data time axis as the reference time axis, when it is determined that the receiver has not received the video TS packet for a period of time, the receiver will decode and decapsulate the received audio TS packet, and when outputting the decoded audio data, the reference time axis will be changed to the system time axis to continue to output the audio data. For example, if the receiver does not receive the video TS packet within 1s, the reference time axis can be changed to the system time axis to continue to output the audio data. Here, the system timeline refers to the system default timeline of the terminal device at the receiving end. Among them, the reference timeline can be called the playback timeline. Taking the reference timeline as the timeline of video data as an example, the reference timeline can be used to indicate the time corresponding to the video data, such as the total duration of the video data, the start time, the end time, and the current playback time. In other words, the reference timeline is the timeline of video playback, which increases linearly.

[0167] Regarding the second change mentioned above, it may be because the current live program has been played, and the PID recorded in the received PMT table is different from the PID recorded in the original PMT table. In this case, the receiving end will notify the player that the current live program has been played. After receiving the notification, the player will wait for the audio and video data output of the current live program to be completed, delete the old decoding channel, create a new decoding channel, decode the TS packet of the new live program, and play the new live program. As an example, the receiving end can refer to the process of playing a new live program. Figure 7 The process shown.

[0168] Below, see Figure 8 , a specific process is used to illustrate the live data processing method in this scenario. For the convenience of description, Figure 8 In the description, the currently received PMT table is still taken as the current PMT table, and the first received PMT table including both audio data and video data is taken as the original PMT table as an example.

[0169] 801, the receiving end receives the current PMT table from the sending end.

[0170] 802. The receiving end determines whether the PID in the current PMT table is the same as the PID in the original PMT table.

[0171] The receiving end determines whether the PIDs in the current PMT table and the original PMT table are the same, and reference may be made to the description of the second change in the above embodiment.

[0172] If not the same, execute step 803.

[0173] If they are the same, execute step 806.

[0174] 803. The receiving end determines whether the type of the TS packet recorded in the current PMT table is included in the original PMT table.

[0175] The receiving end determines whether the type of TS packet recorded in the current PMT table is included in the original PMT table, and the first variation mentioned in the above embodiment can be referred to. If the type of TS packet recorded in the current PMT table is an audio type, and the type of TS packet recorded in the original PMT table includes an audio type and a video type, then it is determined that the type of TS packet recorded in the current PMT table is included in the original PMT table. On the contrary, if the type of TS packet recorded in the current PMT table includes an audio type and a video type, and the type of TS packet recorded in the original PMT table only includes an audio type, then it is determined that the type of TS packet recorded in the current PMT table is not included in the original PMT table.

[0176] If included, execute step 804.

[0177] If not included, execute step 805.

[0178] 804, ignore the changes of the current PMT table.

[0179] The receiving end continues to use the previous decapsulation, decoding, and playback channels without making any changes.

[0180] 805, the receiving end notifies the player that the current live program has been played.

[0181] After the player has finished outputting the current video data, it will rebuild a new decoding channel and play the new live program. Figure 7 The process shown.

[0182] Based on the same concept as the above method, Fig. 9 As shown, a display device 900 is provided. The display device 900 can execute each step in the above method, which will not be described in detail here to avoid repetition. The display device 900 includes: an input interface 901 , a controller 902 , and a display screen 903 .

[0183] Input interface 901, used to receive the first PMT and the second PMT successively after the user triggers the video live broadcast;

[0184] The controller 902 is used to start the video live broadcast to render the video data to the display screen 903 and output the audio data when determining that the second PMT is received;

[0185] The display screen 903 is used to display the video data;

[0186] Among them, the first PMT is the PMT received for the first time after the user triggers the video live broadcast, and the first PMT indicates that the coding period corresponding to the first PMT encodes audio data and does not encode video data; the second PMT indicates that the coding period corresponding to the second PMT encodes video data; the time when the second PMT is received is less than the set duration from the time when the first PMT is received.

[0187] In some embodiments, the controller 902 is further configured to:

[0188] Before receiving the first PMT, counting the number of data packets carrying audio data and the number of data packets carrying non-audio data received by the input interface 901;

[0189] When it is determined that the number of data packets carrying audio data is greater than the number of data packets carrying non-audio data, the first duration is used as the set duration; or,

[0190] When it is determined that the number of data packets carrying audio data is less than the number of data packets carrying non-audio data, the second duration is used as the set duration;

[0191] The second duration is greater than the first duration.

[0192] In some embodiments, the first PMT includes a correspondence between a type identifier indicating that the data type is audio and a first data packet identifier;

[0193] The controller 902 is specifically used to determine that the number of first data packet identifiers included in the data packets received before receiving the first PMT is the number of data packets carrying audio data, and to determine that the difference between the total number of received data packets and the number of data packets carrying audio data is the number of data packets carrying non-audio data.

[0194] In some embodiments, the controller 902 is further configured to record the number of different data packet identifiers included in the data packet received by the input interface 901 before receiving the first PMT;

[0195] When it is determined that the number of first data packet identifiers included in the data packets received before receiving the first PMT is the number of data packets carrying audio data, it is specifically used to determine the number corresponding to the first data packet identifier in the number of recorded different data packet identifiers.

[0196] In some embodiments, the controller 902 is further configured to store, before determining that the second PMT is received, data packets carrying audio data received after receiving the first PMT in a cache;

[0197] And when starting live video broadcast to render the video data to the display screen 903 and output the audio data, it is specifically used to start live video broadcast and output the audio data included in the cache and render the video data received after receiving the second PMT to the display screen 903.

[0198] Based on the same concept as the above method, Fig.10 As shown, a live data processing device 1000 is provided. The device 1000 can perform each step in the above method, and in order to avoid repetition, it is not described in detail here. The device 1000 includes: a communication unit 1001, a processing unit 1002, a display unit 1003, and an audio output unit 1004.

[0199] The communication unit 1001 is used to receive the first PMT and the second PMT in sequence after the user triggers the video live broadcast;

[0200] The processing unit 1002 is used to start the video live broadcast to render the video data to the display screen and output the audio data when determining that the second PMT is received;

[0201] A display unit 1003, configured to display the video data;

[0202] The audio output unit 1004 is used to play the audio data.

[0203] An embodiment of the present application also provides a computer storable medium having a computer program stored thereon, which implements the steps of any of the above methods when executed by a processor.

[0204] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0205] Although the specific embodiments of the present application are described above, it should be understood by those skilled in the art that these are merely examples, and the scope of protection of the present application is limited by the attached claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present application, but these changes and modifications all fall within the scope of protection of the present application. Although the preferred embodiments of the present application have been described, once those skilled in the art are aware of the basic creative concepts, additional changes and modifications may be made to these embodiments. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0206] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A display device, characterized in that: It includes an input interface, a controller and a display screen, wherein: The input interface is used to successively receive the first PMT and the second PMT after the user triggers the video live broadcast; The controller is used to start the video live broadcast to render the video data to the display screen and output the audio data when determining that the second PMT is received; The display screen is used to display the video data; The first PMT is the PMT received for the first time after the user triggers the live video broadcast, and the first PMT indicates that the coding period corresponding to the first PMT encodes audio data and does not encode video data; the second PMT indicates that the coding period corresponding to the second PMT encodes video data; and the time when the second PMT is received is less than the set time length from the time when the first PMT is received; Wherein, the controller is also used for: Before receiving the first PMT, counting the number of data packets carrying audio data and the number of data packets carrying non-audio data received by the input interface; When it is determined that the number of data packets carrying audio data is greater than the number of data packets carrying non-audio data, the first duration is used as the set duration; or, When it is determined that the number of data packets carrying audio data is less than the number of data packets carrying non-audio data, the second duration is used as the set duration; The second duration is greater than the first duration.

2. The display device according to claim 1, characterized in that The first PMT includes a correspondence between a type identifier indicating that the data type is audio and a first data packet identifier; The controller is specifically used to determine that the number of first data packet identifiers included in the data packets received before receiving the first PMT is the number of data packets carrying audio data, and to determine that the difference between the total number of received data packets and the number of data packets carrying audio data is the number of data packets carrying non-audio data.

3. The display device according to claim 1, characterized in that The controller is further configured to record the number of different data packet identifiers included in the data packet received by the input interface before receiving the first PMT; When it is determined that the number of first data packet identifiers included in the data packets received before receiving the first PMT is the number of data packets carrying audio data, it is specifically used to determine the number corresponding to the first data packet identifier in the number of recorded different data packet identifiers.

4. The display device according to any one of claims 1 to 3, characterized in that: The controller is further configured to store, before determining that the second PMT is received, data packets carrying audio data received after receiving the first PMT in a cache; And when starting live video broadcast to render the video data to a display screen and output the audio data, it is specifically used to start live video broadcast and output the audio data included in the cache and render the video data received after receiving the second PMT to a display screen.

5. A method for processing live broadcast data, characterized in that: include: After the user triggers the live video broadcast, the first PMT and the second PMT are received successively; The first PMT is the PMT received for the first time after the user triggers the live video broadcast, the first PMT indicates that the coding period corresponding to the first PMT encodes audio data and does not encode video data, and the second PMT indicates that the coding period corresponding to the second PMT encodes video data; the time when the second PMT is received is less than the set time length from the time when the first PMT is received; When receiving the second PMT, starting the video live broadcast to synchronously play the video data and the audio data; Wherein, the method further comprises: Before receiving the first PMT, counting the number of received data packets carrying audio data and the number of received data packets carrying non-audio data; When the number of data packets carrying audio data is greater than the number of data packets carrying non-audio data, the first duration is used as the set duration; or, When the number of data packets carrying audio data is less than the number of data packets carrying non-audio data, the second duration is used as the set duration; The second duration is greater than the first duration.

6. The method according to claim 5, characterized in that The first PMT includes a correspondence between a type identifier indicating that the data type is audio and a first data packet identifier; The number of packets carrying audio data and the number of packets carrying non-audio data received before receiving the first PMT include: Determine that the number of first data packet identifiers included in the data packets received before receiving the first PMT is the number of data packets carrying audio data, and determine that the difference between the total number of received data packets and the number of data packets carrying audio data is the number of data packets carrying non-audio data.

7. The method according to claim 5, characterized in that The method further comprises: Before receiving the first PMT, recording the number of each different data packet identifier included in the received data packet; Determining that the number of first data packet identifiers included in the data packets received before receiving the first PMT is the number of data packets carrying audio data includes: Determine the number corresponding to the first data packet identifier among the numbers of different data packet identifiers recorded.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called by a computer, the computer executes the method according to any one of claims 5 to 7.

Citation Information

Patent Citations

  • Audio and video elementary stream synchronous injection method and display equipment

    CN111601135A

  • Apparatus and method for transmitting / receiving information in a digital multimedia broadcast service

    CN1578422A

  • Mpeg encoding apparatus, mpeg decoding apparatus, and encoding program

    EP1276325A2

  • Apparatus and method for transmitting / receiving information in a Digital Multimedia Broadcast Service

    EP1501222A2

  • MPEG encoding apparatus, MPEG decoding apparatus, and encoding program

    US20030035486A1