CN115278323A - Display device, intelligent device and data processing method - Google Patents
Display device, intelligent device and data processing method Download PDFInfo
- Publication number
- CN115278323A CN115278323A CN202210768740.4A CN202210768740A CN115278323A CN 115278323 A CN115278323 A CN 115278323A CN 202210768740 A CN202210768740 A CN 202210768740A CN 115278323 A CN115278323 A CN 115278323A
- Authority
- CN
- China
- Prior art keywords
- data
- target
- media data
- bytes
- video
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/4302—Content synchronisation processes, e.g. decoder synchronisation
- H04N21/4307—Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/436—Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
- H04N21/4363—Adapting the video stream to a specific local network, e.g. a Bluetooth® network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/44008—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
Description
技术领域technical field
本申请实施例涉及镜像投屏技术。更具体地讲,涉及一种显示设备、智能设备和数据处理方法。The embodiment of the present application relates to mirroring screen projection technology. More specifically, it relates to a display device, a smart device and a data processing method.
背景技术Background technique
现有的镜像投屏方式在投屏端将数据传输到被投屏端,被投屏端在接收到下一帧数据的起始标志位时,确定当前帧数据接收完成,并从已经收到的数据中将当前帧数据分离出来后,通过解码器解码处理并播放。The existing mirror projection method transmits data to the projected terminal at the projecting terminal, and when the projected terminal receives the start flag bit of the next frame of data, it determines that the current frame of data has been received, and starts from the already received After the current frame data is separated from the data, it is decoded and processed by the decoder and played.
因此,在被投屏端每次需要多等待一帧数据的到来,导致投屏数据的处理时延较大。Therefore, it is necessary to wait for one more frame of data to arrive at the projected end each time, resulting in a large processing delay of the projected data.
发明内容Contents of the invention
为了解决上述技术问题或者至少部分地解决上述技术问题,本申请提供了一种显示设备、智能设备和数据处理方法,可以降低镜像投屏的时延,提升投屏时的数据处理效率。In order to solve the above-mentioned technical problems or at least partially solve the above-mentioned technical problems, the present application provides a display device, a smart device and a data processing method, which can reduce the time delay of mirror projection and improve the data processing efficiency during screen projection.
第一方面,本申请实施例提供了一种显示设备,该显示设备包括:通信器,被配置为:与智能设备进行通信;控制器,被配置为:接收智能设备发送的目标数据包中的预设字节个数的目标长度数据,目标数据包包括:目标长度数据和目标媒体数据,目标长度数据用于表征目标媒体数据对应的目标字节个数,目标媒体数据为以下任一项:视频数据、音频数据、音视频复合数据,目标媒体数据为智能设备对采集的目标源数据进行编码处理得到的;基于目标长度数据,接收智能设备发送的目标字节个数的数据,以得到目标媒体数据;对目标媒体数据进行解码处理得到目标源数据;播放目标源数据。In the first aspect, the embodiment of the present application provides a display device, which includes: a communicator configured to: communicate with a smart device; a controller configured to: receive the target data packet sent by the smart device Target length data with a preset number of bytes, the target data packet includes: target length data and target media data, the target length data is used to represent the target number of bytes corresponding to the target media data, and the target media data is any of the following: Video data, audio data, audio-video composite data, the target media data is obtained by encoding and processing the target source data collected by the smart device; based on the target length data, the data of the target number of bytes sent by the smart device is received to obtain the target Media data; decode the target media data to obtain the target source data; play the target source data.
本申请一些实施例中,目标媒体数据为视频数据或音频数据;目标数据包还包括:标志位,标志位用于指示目标媒体数据的类型,类型为音频类型或视频类型,目标字节个数为目标媒体数据所占的字节个数和标志位所占的字节个数之和;控制器,具体被配置为:通过混合数据通道,接收智能设备发送的目标长度数据;基于目标长度数据,通过混合数据通道,接收智能设备发送的目标字节个数的数据,以得到标志位和目标媒体数据;在标志位指示目标媒体数据的类型为音频类型的情况下,对目标媒体数据进行音频解码处理得到目标源数据;在标志位指示目标媒体数据的类型为视频类型的情况下,对目标媒体数据进行视频解码处理得到目标源数据。In some embodiments of the present application, the target media data is video data or audio data; the target data packet also includes: flag bits, the flag bits are used to indicate the type of target media data, the type is audio type or video type, and the number of target bytes It is the sum of the number of bytes occupied by the target media data and the number of bytes occupied by the flag bits; the controller is specifically configured to: receive the target length data sent by the smart device through the mixed data channel; based on the target length data , through the mixed data channel, receive the data of the target number of bytes sent by the smart device to obtain the flag bit and the target media data; when the flag bit indicates that the type of the target media data is an audio type, perform audio on the target media data The target source data is obtained through decoding processing; when the flag bit indicates that the type of the target media data is a video type, video decoding processing is performed on the target media data to obtain the target source data.
本申请一些实施例中,目标媒体数据为视频数据或音频数据;目标数据包还包括:目标时间戳,目标时间戳用于指示目标源数据的采集时间,目标字节个数为目标媒体数据所占的字节个数和目标时间戳所占的字节个数之和;控制器,具体被配置为:通过目标数据通道,接收智能设备发送的目标长度数据,在目标媒体数据为音频数据的情况下,目标数据通道为音频数据通道,在目标媒体数据为视频数据的情况下,目标数据通道为视频数据通道;基于目标长度数据,通过目标数据通道,接收智能设备发送的目标字节个数的数据,以得到目标时间戳和目标媒体数据;基于目标时间戳,同步播放目标源数据和第一源数据,目标源数据和第一源数据为智能设备同步采集的不同类型的媒体数据。In some embodiments of the present application, the target media data is video data or audio data; the target data packet also includes: a target timestamp, the target timestamp is used to indicate the collection time of the target source data, and the target byte number is specified by the target media data The sum of the number of bytes occupied by the target time stamp and the number of bytes occupied by the target timestamp; the controller is specifically configured to: receive the target length data sent by the smart device through the target data channel, and when the target media data is audio data In this case, the target data channel is an audio data channel, and when the target media data is video data, the target data channel is a video data channel; based on the target length data, receive the target number of bytes sent by the smart device through the target data channel data to obtain the target timestamp and target media data; based on the target timestamp, the target source data and the first source data are played synchronously, and the target source data and the first source data are different types of media data synchronously collected by smart devices.
本申请一些实施例中,目标媒体数据为视频数据,目标数据包还包括:目标序列号,目标序列号用于指示目标源数据的采集顺序;控制器,还被配置为:在接收到的智能设备发送的目标序列号指示的采集顺序满足顺序条件的情况下,接收智能设备发送的预设字节个数的目标长度数据,顺序条件用于指示目标源数据和接收到的上一个源数据是智能设备连续采集的数据;在目标序列号指示的采集顺序不满足顺序条件的情况下,向智能设备发送请求消息,请求消息用于请求将下一个待发送源数据以关键帧的形式进行编码处理并发送;接收智能设备发送的下一个数据包,下一个数据包中的媒体数据是对下一个待发送源数据以关键帧的形式进行编码处理得到的。In some embodiments of the present application, the target media data is video data, and the target data packet also includes: a target serial number, which is used to indicate the collection sequence of the target source data; the controller is also configured to: When the acquisition sequence indicated by the target serial number sent by the device satisfies the sequence condition, the target length data of the preset number of bytes sent by the smart device is received. The sequence condition is used to indicate that the target source data and the last source data received are The data continuously collected by the smart device; when the collection sequence indicated by the target serial number does not meet the sequence condition, a request message is sent to the smart device, and the request message is used to request that the next source data to be sent be encoded in the form of a key frame And send; receive the next data packet sent by the smart device, and the media data in the next data packet is obtained by encoding the next source data to be sent in the form of a key frame.
第二方面,本申请实施例提供了一种智能设备,该智能设备包括:通信器,被配置为:与显示设备进行通信;控制器,被配置为:向显示设备发送目标数据包,目标数据包包括:预设字节个数的目标长度数据和目标媒体数据,目标长度数据用于表征目标媒体数据对应的目标字节个数,目标媒体数据为以下任一项:视频数据、音频数据、音视频复合数据,目标媒体数据为智能设备对采集的目标源数据进行编码处理得到的;其中,目标数据包用于显示设备接收目标长度数据,并基于目标长度数据,接收智能设备发送的目标字节个数的数据,以得到目标媒体数据,以及对目标媒体数据进行解码处理得到目标源数据,播放目标源数据。In a second aspect, an embodiment of the present application provides a smart device, which includes: a communicator configured to: communicate with a display device; a controller configured to: send a target data packet to the display device, the target data The package includes: target length data and target media data with a preset number of bytes. The target length data is used to represent the target number of bytes corresponding to the target media data. The target media data is any of the following: video data, audio data, Audio and video composite data, the target media data is obtained by encoding and processing the collected target source data by the smart device; among them, the target data packet is used to display the target length data received by the device, and based on the target length data, receive the target word sent by the smart device The data of the number of sections to obtain the target media data, and decode the target media data to obtain the target source data, and play the target source data.
本申请一些实施例中,目标媒体数据为视频数据或音频数据;目标数据包还包括:标志位,标志位用于指示目标媒体数据的类型,类型为音频类型或视频类型,目标字节个数为目标媒体数据所占的字节个数和标志位所占的字节个数之和;控制器,具体被配置为:通过混合数据通道,向显示设备发送目标数据包;其中,在目标媒体数据为音频数据的情况下,标志位用于指示目标媒体数据的类型为音频类型;在目标媒体数据为视频数据的情况下,标志位用于指示目标媒体数据的类型为视频类型。In some embodiments of the present application, the target media data is video data or audio data; the target data packet also includes: flag bits, the flag bits are used to indicate the type of target media data, the type is audio type or video type, and the number of target bytes It is the sum of the number of bytes occupied by the target media data and the number of bytes occupied by the flag bits; the controller is specifically configured to: send the target data packet to the display device through the mixed data channel; wherein, in the target media When the data is audio data, the flag bit is used to indicate that the type of the target media data is an audio type; when the target media data is video data, the flag bit is used to indicate that the type of the target media data is a video type.
本申请一些实施例中,目标媒体数据为视频数据或音频数据;目标数据包还包括:时间戳,时间戳用于指示目标源数据的采集时间,目标字节个数为目标媒体数据所占的字节个数和目标时间戳所占的字节个数之和;控制器,具体被配置为:通过目标数据通道,向显示设备发送目标数据包,在目标媒体数据为音频数据的情况下,目标数据通道为音频数据通道,在目标媒体数据为视频数据的情况下,目标数据通道为视频数据通道;其中,目标时间戳用于显示设备基于目标时间戳,同步播放目标源数据和第一源数据,目标源数据和第一源数据为智能设备同步采集的不同类型的媒体数据。In some embodiments of the present application, the target media data is video data or audio data; the target data packet also includes: a time stamp, the time stamp is used to indicate the collection time of the target source data, and the number of target bytes is occupied by the target media data The sum of the number of bytes and the number of bytes occupied by the target timestamp; the controller is specifically configured to: send the target data packet to the display device through the target data channel, and when the target media data is audio data, The target data channel is an audio data channel. In the case where the target media data is video data, the target data channel is a video data channel; wherein, the target timestamp is used to display the device based on the target timestamp to synchronously play the target source data and the first source The data, the target source data and the first source data are different types of media data synchronously collected by smart devices.
本申请一些实施例中,目标媒体数据为视频数据,目标数据包还包括:目标序列号,目标序列号用于指示目标源数据的采集顺序;控制器,还被配置为:在向显示设备发送目标数据包之后,接收显示设备发送的请求消息,请求消息用于请求将下一个待发送源数据以关键帧的形式进行编码处理并发送;基于请求消息,向显示设备发送下一个数据包,下一个数据包中的媒体数据是对下一个待发送源数据以关键帧的形式进行编码处理得到的。In some embodiments of the present application, the target media data is video data, and the target data packet also includes: a target serial number, which is used to indicate the acquisition sequence of the target source data; the controller is also configured to: After the target data packet, the request message sent by the display device is received, and the request message is used to request that the next source data to be sent be encoded and sent in the form of a key frame; based on the request message, the next data packet is sent to the display device, and the next The media data in a data packet is obtained by encoding the next source data to be sent in the form of a key frame.
第三方面,本申请实施例提供了一种数据处理方法,应用于显示设备,该方法包括:接收智能设备发送的目标数据包中的预设字节个数的目标长度数据,目标数据包包括:目标长度数据和目标媒体数据,目标长度数据用于表征目标媒体数据对应的目标字节个数,目标媒体数据为以下任一项:视频数据、音频数据、音视频复合数据,目标媒体数据为智能设备对采集的目标源数据进行编码处理得到的;基于目标长度数据,接收智能设备发送的目标字节个数的数据,以得到目标媒体数据;对目标媒体数据进行解码处理得到目标源数据;播放目标源数据。In the third aspect, the embodiment of the present application provides a data processing method, which is applied to a display device. The method includes: receiving target length data with a preset number of bytes in a target data packet sent by a smart device, and the target data packet includes : Target length data and target media data, the target length data is used to represent the target number of bytes corresponding to the target media data, the target media data is any of the following: video data, audio data, audio-video composite data, the target media data is The smart device encodes the collected target source data; based on the target length data, receives the data of the target number of bytes sent by the smart device to obtain the target media data; decodes the target media data to obtain the target source data; Play target source data.
本申请一些实施例中,目标媒体数据为视频数据或音频数据;目标数据包还包括:标志位,标志位用于指示目标媒体数据的类型,类型为音频类型或视频类型,目标字节个数为目标媒体数据所占的字节个数和标志位所占的字节个数之和;接收智能设备发送的目标数据包中的预设字节个数的目标长度数据,包括:通过混合数据通道,接收智能设备发送的目标长度数据;基于目标长度数据,接收智能设备发送的目标字节个数的数据,包括:基于目标长度数据,通过混合数据通道,接收智能设备发送的目标字节个数的数据,以得到标志位和目标媒体数据;在标志位指示目标媒体数据的类型为音频类型的情况下,对目标媒体数据进行音频解码处理得到目标源数据;在标志位指示目标媒体数据的类型为视频类型的情况下,对目标媒体数据进行视频解码处理得到目标源数据。In some embodiments of the present application, the target media data is video data or audio data; the target data packet also includes: flag bits, the flag bits are used to indicate the type of target media data, the type is audio type or video type, and the number of target bytes It is the sum of the number of bytes occupied by the target media data and the number of bytes occupied by the flag bits; receiving the target length data of the preset number of bytes in the target data packet sent by the smart device, including: channel, receiving the target length data sent by the smart device; based on the target length data, receiving the target number of bytes sent by the smart device, including: based on the target length data, receiving the target number of bytes sent by the smart device through a mixed data channel Number of data, to obtain flag bit and target media data; Under the situation that flag bit indicates that the type of target media data is an audio type, carry out audio decoding process to target media data and obtain target source data; Indicate target media data in flag bit When the type is a video type, video decoding processing is performed on the target media data to obtain the target source data.
本申请一些实施例中,目标媒体数据为视频数据或音频数据;目标数据包还包括:目标时间戳,目标时间戳用于指示目标源数据的采集时间,目标字节个数为目标媒体数据所占的字节个数和目标时间戳所占的字节个数之和;接收智能设备发送的目标数据包中的预设字节个数的目标长度数据,包括:通过目标数据通道,接收智能设备发送的目标长度数据,在目标媒体数据为音频数据的情况下,目标数据通道为音频数据通道,在目标媒体数据为视频数据的情况下,目标数据通道为视频数据通道;基于目标长度数据,接收智能设备发送的目标字节个数的数据,包括:基于目标长度数据,通过目标数据通道,接收智能设备发送的目标字节个数的数据,以得到目标时间戳和目标媒体数据;基于目标时间戳,同步播放目标源数据和第一源数据,目标源数据和第一源数据为智能设备同步采集的不同类型的媒体数据。In some embodiments of the present application, the target media data is video data or audio data; the target data packet also includes: a target timestamp, the target timestamp is used to indicate the collection time of the target source data, and the target byte number is specified by the target media data The sum of the number of bytes occupied by the target time stamp and the number of bytes occupied by the target time stamp; receiving the target length data of the preset number of bytes in the target data packet sent by the smart device, including: receiving the smart device through the target data channel For the target length data sent by the device, if the target media data is audio data, the target data channel is an audio data channel; if the target media data is video data, the target data channel is a video data channel; based on the target length data, Receive the data of the target number of bytes sent by the smart device, including: based on the target length data, receive the data of the target number of bytes sent by the smart device through the target data channel to obtain the target time stamp and target media data; based on the target Timestamp, synchronously play the target source data and the first source data, the target source data and the first source data are different types of media data collected synchronously by the smart device.
本申请一些实施例中,目标媒体数据为视频数据,目标数据包还包括:目标序列号,目标序列号用于指示目标源数据的采集顺序;该方法还包括:在接收到的智能设备发送的目标序列号指示的采集顺序满足顺序条件的情况下,接收智能设备发送的预设字节个数的目标长度数据,顺序条件用于指示目标源数据和接收到的上一个源数据是智能设备连续采集的数据;在目标序列号指示的采集顺序不满足顺序条件的情况下,向智能设备发送请求消息,请求消息用于请求将下一个待发送源数据以关键帧的形式进行编码处理并发送;接收智能设备发送的下一个数据包,下一个数据包中的媒体数据是对下一个待发送源数据以关键帧的形式进行编码处理得到的。In some embodiments of the present application, the target media data is video data, and the target data packet also includes: a target serial number, which is used to indicate the collection sequence of the target source data; the method also includes: When the acquisition order indicated by the target serial number satisfies the sequence condition, the target length data of the preset number of bytes sent by the smart device is received. The sequence condition is used to indicate that the target source data and the last source data received are consecutive to the smart device. Collected data; when the collection order indicated by the target serial number does not meet the order condition, send a request message to the smart device, and the request message is used to request that the next source data to be sent be encoded and sent in the form of a key frame; Receive the next data packet sent by the smart device, and the media data in the next data packet is obtained by encoding the next source data to be sent in the form of a key frame.
第四方面,本申请实施例提供了一种数据处理方法,应用于智能设备,该方法包括:向显示设备发送目标数据包,目标数据包包括:预设字节个数的目标长度数据和目标媒体数据,目标长度数据用于表征目标媒体数据对应的目标字节个数,目标媒体数据为以下任一项:视频数据、音频数据、音视频复合数据,目标媒体数据为智能设备对采集的目标源数据进行编码处理得到的;其中,目标数据包用于显示设备接收目标长度数据,并基于目标长度数据,接收智能设备发送的目标字节个数的数据,以得到目标媒体数据,以及对目标媒体数据进行解码处理得到目标源数据,播放目标源数据。In a fourth aspect, the embodiment of the present application provides a data processing method, which is applied to a smart device. The method includes: sending a target data packet to a display device, and the target data packet includes: target length data with a preset number of bytes and a target Media data, the target length data is used to represent the target number of bytes corresponding to the target media data, the target media data is any of the following: video data, audio data, audio and video composite data, the target media data is the target collected by the smart device The source data is encoded and processed; among them, the target data packet is used to display the target length data received by the device, and based on the target length data, receive the data of the target number of bytes sent by the smart device to obtain the target media data, and the target The media data is decoded to obtain the target source data, and the target source data is played.
本申请一些实施例中,目标媒体数据为视频数据或音频数据;目标数据包还包括:标志位,标志位用于指示目标媒体数据的类型,类型为音频类型或视频类型,目标字节个数为目标媒体数据所占的字节个数和标志位所占的字节个数之和;向显示设备发送目标数据包,包括:通过混合数据通道,向显示设备发送目标数据包;其中,在目标媒体数据为音频数据的情况下,标志位用于指示目标媒体数据的类型为音频类型;在目标媒体数据为视频数据的情况下,标志位用于指示目标媒体数据的类型为视频类型。In some embodiments of the present application, the target media data is video data or audio data; the target data packet also includes: flag bits, the flag bits are used to indicate the type of target media data, the type is audio type or video type, and the number of target bytes It is the sum of the number of bytes occupied by the target media data and the number of bytes occupied by the flag bits; sending the target data packet to the display device includes: sending the target data packet to the display device through a mixed data channel; wherein, in When the target media data is audio data, the flag bit is used to indicate that the type of the target media data is an audio type; when the target media data is video data, the flag bit is used to indicate that the type of the target media data is a video type.
本申请一些实施例中,目标媒体数据为视频数据或音频数据;目标数据包还包括:时间戳,时间戳用于指示目标源数据的采集时间,目标字节个数为目标媒体数据所占的字节个数和目标时间戳所占的字节个数之和;向显示设备发送目标数据包,包括:通过目标数据通道,向显示设备发送目标数据包,在目标媒体数据为音频数据的情况下,目标数据通道为音频数据通道,在目标媒体数据为视频数据的情况下,目标数据通道为视频数据通道;其中,目标时间戳用于显示设备基于目标时间戳,同步播放目标源数据和第一源数据,目标源数据和第一源数据为智能设备同步采集的不同类型的媒体数据。In some embodiments of the present application, the target media data is video data or audio data; the target data packet also includes: a time stamp, the time stamp is used to indicate the collection time of the target source data, and the number of target bytes is occupied by the target media data The sum of the number of bytes and the number of bytes occupied by the target timestamp; sending the target data packet to the display device, including: sending the target data packet to the display device through the target data channel, when the target media data is audio data In this case, the target data channel is an audio data channel, and when the target media data is video data, the target data channel is a video data channel; wherein, the target timestamp is used to display that the device synchronously plays the target source data and the first The first source data, the target source data and the first source data are different types of media data collected synchronously by smart devices.
本申请一些实施例中,目标媒体数据为视频数据,目标数据包还包括:目标序列号,目标序列号用于指示目标源数据的采集顺序;该方法还包括:在向显示设备发送目标数据包之后,接收显示设备发送的请求消息,请求消息用于请求将下一个待发送源数据以关键帧的形式进行编码处理并发送;基于请求消息,向显示设备发送下一个数据包,下一个数据包中的媒体数据是对下一个待发送源数据以关键帧的形式进行编码处理得到的。In some embodiments of the present application, the target media data is video data, and the target data packet further includes: a target serial number, which is used to indicate the acquisition order of the target source data; the method also includes: sending the target data packet to the display device After that, the request message sent by the display device is received, and the request message is used to request that the next source data to be sent be encoded and sent in the form of a key frame; based on the request message, the next data packet is sent to the display device, and the next data packet The media data in is obtained by encoding the next source data to be sent in the form of a key frame.
第五方面,本申请提供了一种计算机可读存储介质,包括:计算机可读存储介质上存储计算机程序,计算机程序被处理器执行时实现如第三方面和第四方面所示的数据处理方法。In a fifth aspect, the present application provides a computer-readable storage medium, including: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the data processing methods shown in the third aspect and the fourth aspect are implemented .
第六方面,本申请提供了一种计算机程序产品,其特征在于,包括:当计算机程序产品在计算机上运行时,使得计算机实现如第三方面和第四方面所示的数据处理方法。In a sixth aspect, the present application provides a computer program product, which is characterized by comprising: when the computer program product is run on a computer, the computer is enabled to implement the data processing methods shown in the third aspect and the fourth aspect.
本申请实施例中,智能设备向显示设备发送目标数据包,目标数据包包括:目标长度数据和目标媒体数据,目标长度数据用于表征目标媒体数据对应的目标字节个数,目标媒体数据为以下任一项:视频数据、音频数据、音视频复合数据,目标媒体数据为智能设备对采集的目标源数据进行编码处理得到的;显示设备接收智能设备发送的目标数据包中的预设字节个数的目标长度数据,基于目标长度数据,接收智能设备发送的目标字节个数的数据,以得到目标媒体数据;对目标媒体数据进行解码处理得到目标源数据,播放目标源数据。由此,显示设备可以根据接收到的目标长度数据,确定目标媒体数据的所对应的字节数(目标字节个数),继续接收目标字节个数的数据,即可确定目标媒体数据(一帧数据)接收完成,从而可以马上对目标媒体数据进行解码处理并播放,无需将当前帧数据缓存,等待下一帧数据到来后,从缓存区分离出当前帧数据再做解码处理,节约了等待时间和缓存空间,从而降低镜像投屏的时延;同时,现有技术通过下一帧数据的起始码判断当前帧数据接收完成,因此需要对接收到的每个数据进行判断,确定是否是起始码,增加了显示设备处理数据的压力,而本申请基于目标长度数据,确定需要接收的目标媒体数据所对应的字节数,显示设备无需对每个数据进行判断,减少了显示设备处理数据的压力,进而降低了资源消耗,综上,本申请方案可以提高投屏时数据的处理效率。In the embodiment of the present application, the smart device sends the target data packet to the display device, the target data packet includes: target length data and target media data, the target length data is used to represent the target number of bytes corresponding to the target media data, and the target media data is Any of the following: video data, audio data, audio-video composite data, the target media data is obtained by encoding and processing the target source data collected by the smart device; the display device receives the preset bytes in the target data packet sent by the smart device The number of target length data, based on the target length data, receiving the data of the target number of bytes sent by the smart device to obtain the target media data; decoding the target media data to obtain the target source data, and playing the target source data. Thus, the display device can determine the corresponding number of bytes (target number of bytes) of the target media data according to the received target length data, and continue to receive the data of the target number of bytes to determine the target media data ( One frame of data) is received, so that the target media data can be decoded and played immediately without buffering the current frame data. After waiting for the arrival of the next frame data, the current frame data is separated from the buffer area and then decoded, which saves Waiting time and buffer space, thereby reducing the delay of mirroring screen projection; at the same time, the existing technology judges the completion of receiving the current frame data through the start code of the next frame data, so it is necessary to judge each received data to determine whether It is the start code, which increases the pressure on the display device to process data. However, this application determines the number of bytes corresponding to the target media data to be received based on the target length data. The display device does not need to judge each data, which reduces the number of display devices. The pressure of processing data further reduces resource consumption. In summary, the solution of this application can improve the data processing efficiency during screen projection.
附图说明Description of drawings
为了更清楚地说明本申请实施例或相关技术中的实施方式,下面将对实施例或相关技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the implementation methods in related technologies, the following will briefly introduce the drawings that need to be used in the descriptions of the embodiments or related technologies. Obviously, the drawings in the following description are the For some embodiments of the application, those skilled in the art can also obtain other drawings according to these drawings.
图1示出了根据一些实施例的控制设备与显示设备之间的操作场景;FIG. 1 shows an operation scenario between a control device and a display device according to some embodiments;
图2示出了根据一些实施例的控制装置100的硬件配置框图;Fig. 2 shows a hardware configuration block diagram of the
图3示出了根据一些实施例的显示设备200的硬件配置框图;FIG. 3 shows a block diagram of a hardware configuration of a
图4示出了根据一些实施例的数据处理方法的场景架构图;Fig. 4 shows a scene architecture diagram of a data processing method according to some embodiments;
图5示出了根据一些实施例的智能设备500中软件配置示意图;Fig. 5 shows a schematic diagram of software configuration in a
图6示出了根据一些实施例的显示设备200中软件配置示意图;FIG. 6 shows a schematic diagram of software configuration in a
图7示出了根据一些实施例的目标数据包的结构示意图;Fig. 7 shows a schematic diagram of the structure of a target data packet according to some embodiments;
图8示出了根据一些实施例的目标数据包的结构示意图;Fig. 8 shows a schematic diagram of the structure of a target data packet according to some embodiments;
图9示出了根据一些实施例的目标数据包的结构示意图;Fig. 9 shows a schematic diagram of the structure of a target data packet according to some embodiments;
图10示出了根据一些实施例的目标数据包的结构的示意图;Figure 10 shows a schematic diagram of the structure of a target packet according to some embodiments;
图11示出了根据一些实施例的数据处理方法的流程示意图之一;FIG. 11 shows one of the schematic flowcharts of a data processing method according to some embodiments;
图12示出了根据一些实施例的数据处理方法的流程示意图之二;Fig. 12 shows the second schematic flow diagram of a data processing method according to some embodiments;
图13示出了根据一些实施例的数据处理方法的流程示意图之三;Fig. 13 shows the third schematic flowchart of the data processing method according to some embodiments;
图14示出了根据一些实施例的数据处理方法的流程示意图之四。Fig. 14 shows a fourth schematic flowchart of a data processing method according to some embodiments.
具体实施方式Detailed ways
为使本申请的目的和实施方式更加清楚,下面将结合本申请示例性实施例中的附图,对本申请示例性实施方式进行清楚、完整地描述,显然,描述的示例性实施例仅是本申请一部分实施例,而不是全部的实施例。In order to make the purpose and implementation of the application clearer, the following will clearly and completely describe the exemplary implementation of the application in conjunction with the accompanying drawings in the exemplary embodiment of the application. Obviously, the described exemplary embodiment is only the present application. Claim some of the examples, not all of them.
需要说明的是,本申请中对于术语的简要说明,仅是为了方便理解接下来描述的实施方式,而不是意图限定本申请的实施方式。除非另有说明,这些术语应当按照其普通和通常的含义理解。It should be noted that the brief description of the terms in this application is only for the convenience of understanding the implementations described below, and is not intended to limit the implementations of this application. These terms are to be understood according to their ordinary and usual meaning unless otherwise stated.
本申请中说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”等是用于区别类似或同类的对象或实体,而不必然意味着限定特定的顺序或先后次序,除非另外注明。应该理解这样使用的用语在适当情况下可以互换。The terms "first", "second", and "third" in the description and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean limiting specific sequential or sequential unless otherwise noted. It is to be understood that the terms so used are interchangeable under appropriate circumstances.
术语“包括”和“具有”以及他们的任何变形,意图在于覆盖但不排他的包含,例如,包含了一系列组件的产品或设备不必限于清楚地列出的所有组件,而是可包括没有清楚地列出的或对于这些产品或设备固有的其它组件。The terms "comprising" and "having", as well as any variations thereof, are intended to be inclusive but not exclusive, for example, a product or device comprising a series of components is not necessarily limited to all components expressly listed, but may include not expressly listed other components listed or inherent to these products or equipment.
本申请实施方式提供的显示设备可以具有多种实施形式,例如,可以是电视、智能电视、激光投影设备、显示器(monitor)、电子白板(electronic bulletin board)、电子桌面(electronic table)、手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备等。The display device provided in the embodiments of the present application may have various implementation forms, for example, it may be a TV, a smart TV, a laser projection device, a monitor, an electronic bulletin board, an electronic table, a mobile phone, Tablet PCs, Notebook PCs, PDAs, Automotive Electronics, etc.
图1为根据实施例中显示设备与控制设备之间操作场景的示意图,其中控制设备包括智能设备或控制装置。如图1所示,用户可通过智能设备300或控制装置100操作显示设备200。Fig. 1 is a schematic diagram of an operation scene between a display device and a control device according to an embodiment, wherein the control device includes a smart device or a control device. As shown in FIG. 1 , the user can operate the
在一些实施例中,控制装置100可以是遥控器,遥控器和显示设备的通信包括红外协议通信或蓝牙协议通信,及其他短距离通信方式,通过无线或有线方式来控制显示设备200。用户可以通过遥控器上按键、语音输入、控制面板输入等输入用户指令,来控制显示设备200。In some embodiments, the
在一些实施例中,也可以使用智能设备300(如移动终端、平板电脑、计算机、笔记本电脑等)以控制显示设备200。例如,使用在智能设备上运行的应用程序控制显示设备200。In some embodiments, the smart device 300 (such as a mobile terminal, a tablet computer, a computer, a notebook computer, etc.) can also be used to control the
在一些实施例中,显示设备可以不使用上述的智能设备或控制设备接收指令,而是通过触摸或者手势等接收用户的控制。In some embodiments, the display device may not use the aforementioned smart device or control device to receive instructions, but may receive user control through touch or gesture.
在一些实施例中,显示设备200还可以采用除了控制装置100和智能设备300之外的方式进行控制,例如,可以通过显示设备200设备内部配置的获取语音指令的模块直接接收用户的语音指令控制,也可以通过显示设备200设备外部设置的语音控制设备来接收用户的语音指令控制。In some embodiments, the
在一些实施例中,显示设备200还与服务器400进行数据通信。可允许显示设备200通过局域网(LAN)、无线局域网(WLAN)和其他网络进行通信连接。服务器400可以向显示设备200提供各种内容和互动。服务器400可以是一个集群,也可以是多个集群,可以包括一类或多类服务器。In some embodiments, the
图2示例性示出了根据示例性实施例中控制装置100的配置框图。如图2所示,控制装置100包括控制器110、通信接口130、用户输入/输出接口140、外部存储器、供电电源。控制装置100可接收用户的输入操作指令,且将操作指令转换为显示设备200可识别和响应的指令,起用用户与显示设备200之间交互中介作用。Fig. 2 exemplarily shows a configuration block diagram of the
如图3,显示设备200包括调谐解调器210、通信器220、检测器230、外部装置接口240、控制器250、显示器260、音频输出接口270、用户接口280、外部存储器、供电电源中的至少一种。As shown in Figure 3, the
在一些实施例中控制器包括处理器,视频处理器,音频处理器,图形处理器,RAM,ROM,用于输入/输出的第一接口至第n接口。In some embodiments the controller includes a processor, a video processor, an audio processor, a graphics processor, a RAM, a ROM, a first interface to an nth interface for input/output.
显示器260包括用于呈现画面的显示屏组件,以及驱动图像显示的驱动组件,用于接收源自控制器输出的图像信号,进行显示视频内容、图像内容以及菜单操控界面的组件以及用户操控UI界面。The
显示器260可为液晶显示器、OLED显示器、以及投影显示器,还可以为一种投影装置和投影屏幕。The
通信器220是用于根据各种通信协议类型与外部设备或服务器进行通信的组件。例如:通信器可以包括Wifi模块,蓝牙模块,有线以太网模块等其他网络通信协议芯片或近场通信协议芯片,以及红外接收器中的至少一种。显示设备200可以通过通信器220与外部控制装置100或服务器400建立控制信号和数据信号的发送和接收。The
用户接口280,可用于接收控制装置100(如:红外遥控器等)的控制信号。也可以用于直接接收用户的输入操作指令,且将操作指令转换为显示设备200可识别和响应的指令,此时可以称为用户输入接口。The
检测器230用于采集外部环境或与外部交互的信号。例如,检测器230包括光接收器,用于采集环境光线强度的传感器;或者,检测器230包括图像采集器,如摄像头,可以用于采集外部环境场景、用户的属性或用户交互手势,再或者,检测器230包括声音采集器,如麦克风等,用于接收外部声音。The detector 230 is used to collect signals of the external environment or interaction with the outside. For example, the detector 230 includes a light receiver, which is a sensor for collecting ambient light intensity; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environmental scenes, user attributes or user interaction gestures, or , the detector 230 includes a sound collector, such as a microphone, for receiving external sound.
外部装置接口240可以包括但不限于如下:高清多媒体接口(HDMI)、模拟或数据高清分量输入接口(分量)、复合视频输入接口(CVBS)、USB输入接口(USB)、RGB端口等任一个或多个接口。也可以是上述多个接口形成的复合型的输入/输出接口。The
调谐解调器210通过有线或无线接收方式接收广播电视信号,以及从多个无线或有线广播电视信号中解调出音视频信号,如以及EPG数据信号。The
在一些实施例中,控制器250和调谐解调器210可以位于不同的分体设备中,即调谐解调器210也可在控制器250所在的主体设备的外置设备中,如外置机顶盒等。In some embodiments, the
控制器250,通过存储在存储器(内部存储器或外部存储器)上中各种软件控制程序,来控制显示设备的工作和响应用户的操作。控制器250控制显示设备200的整体操作。例如:响应于接收到用于选择在显示器260上显示UI对象的用户命令,控制器250便可以执行与由用户命令选择的对象有关的操作。The
在一些实施例中控制器包括中央处理器(Central Processing Unit,CPU),视频处理器,音频处理器,图形处理器(Graphics Processing Unit,GPU),以及随机存取存储器(Random Access Memory,RAM),只读存储器(Read-Only Memory,ROM),用于输入/输出的第一接口至第n接口,通信总线(Bus)等中的至少一种。In some embodiments, the controller includes a central processing unit (Central Processing Unit, CPU), a video processor, an audio processor, a graphics processor (Graphics Processing Unit, GPU), and a random access memory (Random Access Memory, RAM) , a read-only memory (Read-Only Memory, ROM), at least one of the first interface to the nth interface for input/output, a communication bus (Bus), and the like.
其中,RAM也叫主存,是与控制器直接交换数据的内部存储器。它可以随时读写(刷新时除外),而且速度很快,通常作为操作系统或其他正在运行中的程序的临时数据存储介质。它与ROM的最大区别是数据的易失性,即一旦断电所存储的数据将随之丢失。RAM在计算机和数字系统中用来暂时存储程序、数据和中间结果。ROM以非破坏性读出方式工作,只能读出无法写入信息。信息一旦写入后就固定下来,即使切断电源,信息也不会丢失,所以又称为固定存储器。Among them, RAM is also called main memory, which is an internal memory that directly exchanges data with the controller. It can be read and written at any time (except when refreshing), and the speed is very fast, and it is usually used as a temporary data storage medium for operating systems or other running programs. The biggest difference between it and ROM is the volatility of data, that is, the stored data will be lost once the power is turned off. RAM is used in computers and digital systems to temporarily store programs, data, and intermediate results. ROM works in a non-destructive readout mode, and can only read out but not write in information. Once the information is written, it is fixed, even if the power is cut off, the information will not be lost, so it is also called fixed memory.
用户可在显示器260上显示的图形用户界面(GUI)输入用户命令,则用户输入接口通过图形用户界面(GUI)接收用户输入命令。或者,用户可通过输入特定的声音或手势进行输入用户命令,则用户输入接口通过传感器识别出声音或手势,来接收用户输入命令。The user can input a user command through a graphical user interface (GUI) displayed on the
“用户界面”,是应用程序或操作系统与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。用户界面常用的表现形式是图形用户界面(Graphic User Interface,GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在显示设备的显示屏中显示的一个图标、窗口、控件等界面元素,其中控件可以包括图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。"User interface" is a medium interface for interaction and information exchange between application programs or operating systems and users, which realizes the conversion between the internal form of information and the form acceptable to users. A commonly used expression form of a user interface is a graphical user interface (Graphic User Interface, GUI), which refers to a user interface related to computer operations displayed in a graphical manner. It can be an icon, window, control and other interface elements displayed on the display screen of the display device, where the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. Visual interface elements.
图4为一些实施例中的场景示意图。如图4所示,本发明实施例提供的数据处理方法包括:显示设备200和智能设备500。其中,显示设备200和智能设备500之间建立有通信连接。智能设备500向显示设备200发送目标数据包,显示设备200先接收智能设备500发送的目标数据包中的预设字节个数的目标长度数据,再基于目标长度数据,接收智能设备500发送的目标字节个数的数据,以得到目标媒体数据,对目标媒体数据进行解码处理得到目标源数据,播放目标源数据。图4中以智能设备500为手机为例示出,但本发明实施例并不限定于此,本发明实施例中的智能设备500还可以为其它类型的设备,例如:智能设备500还可以为电视机、智能手表、个人电脑、掌上电脑等。Fig. 4 is a schematic diagram of a scene in some embodiments. As shown in FIG. 4 , the data processing method provided by the embodiment of the present invention includes: a
图5为根据本申请一个或多个实施例的智能设备500中软件配置示意图,如图5所示,将系统分为四层,从上至下分别为应用程序(Applications)层(简称“应用层”),应用程序框架(Application Framework)层(简称“框架层”),安卓运行时(Android runtime)和系统库层(简称“系统运行库层”),以及内核层。内核层至少包含以下驱动中的至少一种:音频驱动、显示驱动、蓝牙驱动、摄像头驱动、WIFI驱动、USB驱动、HDMI驱动、传感器驱动(如指纹传感器,温度传感器,压力传感器等)、以及电源驱动等。应用层包括:用于与显示设备200通信的通信器、用于进行视频文件采集的视频采集器(video Record)、用于进行音频文件采集的音频采集器(Audio Record)、用于对音频文件进行编码处理的音频数据处理器(AudioEffect)、用于对视频文件进行编码处理的视频数据处理器(video Effect)、以及用于进行数据封装的封装器(MUX)。FIG. 5 is a schematic diagram of software configuration in a
图6为根据本申请一个或多个实施例的显示设备200中软件配置示意图,如图6所示,将系统分为四层,从上至下分别为应用程序(Applications)层(简称“应用层”),应用程序框架(Application Framework)层(简称“框架层”),安卓运行时(Android runtime)和系统库层(简称“系统运行库层”),以及内核层。内核层至少包含以下驱动中的至少一种:音频驱动、显示驱动、蓝牙驱动、摄像头驱动、WIFI驱动、USB驱动、HDMI驱动、传感器驱动(如指纹传感器,温度传感器,压力传感器等)、以及电源驱动等。应用层包括:用于与智能设备500通信的通信器、用于对音频数据进行解码处理的音频数据解析器、用于对视频数据进行解码处理的视频数据解析器。FIG. 6 is a schematic diagram of the software configuration in the
本申请实施例提供了一种显示设备,该显示设备包括:通信器,被配置为:与智能设备进行通信;控制器,被配置为:接收智能设备发送的目标数据包中的预设字节个数的目标长度数据,目标数据包包括:目标长度数据和目标媒体数据,目标长度数据用于表征目标媒体数据对应的目标字节个数,目标媒体数据为以下任一项:视频数据、音频数据、音视频复合数据,目标媒体数据为智能设备对采集的目标源数据进行编码处理得到的;基于目标长度数据,接收智能设备发送的目标字节个数的数据,以得到目标媒体数据;对目标媒体数据进行解码处理得到目标源数据;播放目标源数据。An embodiment of the present application provides a display device, which includes: a communicator configured to: communicate with a smart device; a controller configured to: receive preset bytes in the target data packet sent by the smart device The number of target length data, the target data packet includes: target length data and target media data, the target length data is used to represent the target number of bytes corresponding to the target media data, and the target media data is any of the following: video data, audio Data, audio and video composite data, the target media data is obtained by encoding and processing the collected target source data by the smart device; based on the target length data, receive the data of the target number of bytes sent by the smart device to obtain the target media data; The target media data is decoded to obtain the target source data; the target source data is played.
可以理解,播放目标源数据,即在目标源数据是智能设备录制的智能设备的屏幕(即采集目标源数据,目标源数据是视频类型的数据)的情况下,通过上述图3的显示器260显示目标源数据;在目标源数据是智能设备录制的智能设备的音频(即采集目标源数据,目标源数据是音频类型的数据)的情况下,通过上述图3的音频输出接口270播放目标源数据。It can be understood that when the target source data is played, that is, when the target source data is the screen of the smart device recorded by the smart device (that is, the target source data is collected, and the target source data is data of the video type), it is displayed by the
本申请实施例提供了一种智能设备,该智能设备包括:通信器,被配置为:与显示设备进行通信;控制器,被配置为:向显示设备发送目标数据包,目标数据包包括:预设字节个数的目标长度数据和目标媒体数据,目标长度数据用于表征目标媒体数据对应的目标字节个数,目标媒体数据为以下任一项:视频数据、音频数据、音视频复合数据,目标媒体数据为智能设备对采集的目标源数据进行编码处理得到的;其中,目标数据包用于显示设备接收目标长度数据,并基于目标长度数据,接收智能设备发送的目标字节个数的数据,以得到目标媒体数据,以及对目标媒体数据进行解码处理得到目标源数据,播放目标源数据。An embodiment of the present application provides a smart device, the smart device includes: a communicator configured to: communicate with a display device; a controller configured to: send a target data packet to the display device, the target data packet includes: Set the target length data and target media data of the number of bytes, the target length data is used to represent the target number of bytes corresponding to the target media data, and the target media data is any of the following: video data, audio data, audio-video composite data , the target media data is obtained by encoding and processing the collected target source data by the smart device; among them, the target data packet is used to display the target length data received by the device, and based on the target length data, receive the target byte number sent by the smart device data to obtain the target media data, and decode the target media data to obtain the target source data, and play the target source data.
可以理解,智能设备向显示设备发送目标数据包;显示设备接收智能设备发送的目标数据包中的预设字节个数的目标长度数据,基于目标长度数据,显示设备接收智能设备发送的目标字节个数的数据,以得到目标媒体数据,对目标媒体数据进行解码处理得到目标源数据并播放目标源数据。It can be understood that the smart device sends the target data packet to the display device; the display device receives the target length data of the preset number of bytes in the target data packet sent by the smart device, and based on the target length data, the display device receives the target word sent by the smart device The data of the number of sections is obtained to obtain the target media data, and the target media data is decoded to obtain the target source data and the target source data is played.
可以理解,智能设备录制当前播放的媒体文件,同步得到音频文件和视频文件,目标源数据即为智能设备录制的音频文件或视频文件,智能设备将目标源数据进行编码处理(音频文件通过音频编码器进行编码处理,视频文件通过视频编码器进行编码处理),得到目标媒体数据,再将目标媒体数据进行封装,得到目标数据包(包括预设字节个数的目标长度数据和目标媒体数据)。It can be understood that the smart device records the currently playing media file and obtains the audio file and video file synchronously. The target source data is the audio file or video file recorded by the smart device, and the smart device encodes the target source data (the audio file is encoded by audio Encoder, the video file is encoded by the video encoder), the target media data is obtained, and then the target media data is encapsulated to obtain the target data packet (including target length data and target media data with a preset number of bytes) .
可以理解,预设字节个数的具体值,根据实际需要确定,本申请实施例不做限定。It can be understood that the specific value of the preset number of bytes is determined according to actual needs, and is not limited in this embodiment of the present application.
可以理解,目标媒体数据为以下任一项:视频数据、音频数据、音视频复合数据;其中,智能设备对录制的视频文件进行视频编码处理得到视频数据;智能设备对录制的音频文件进行视频编码处理得到音频数据;智能设备对录制的视频文件进行视频编码处理得到视频数据,对录制的音频文件进行视频编码处理得到音频数据,再对音频数据和视频数据进行复合处理得到音视频复合数据(进行复合的音频文件和视频文件是智能设备同步录制的)。It can be understood that the target media data is any of the following: video data, audio data, and audio-video composite data; wherein, the smart device performs video encoding processing on the recorded video file to obtain video data; the smart device performs video encoding on the recorded audio file Process the audio data; the smart device performs video encoding processing on the recorded video files to obtain video data, performs video encoding processing on the recorded audio files to obtain audio data, and then composites the audio data and video data to obtain audio and video composite data (for Composite audio files and video files are recorded simultaneously by smart devices).
可以理解,目标媒体数据为至少一帧完整数据,本申请中均以目标媒体数据为完整的一帧数据进行说明,即视频数据为完整的一帧视频数据,音频数据为完整的一帧视频数据,音视频复合数据为完整的一帧视频数据和完整的一帧音频数据。It can be understood that the target media data is at least one frame of complete data. In this application, the target media data is a complete frame of data for description, that is, the video data is a complete frame of video data, and the audio data is a complete frame of video data. , the audio-video composite data is a complete frame of video data and a complete frame of audio data.
可以理解,目标长度数据用于表征目标媒体数据对应的目标字节个数,目标字节个数可以是目标媒体数据所占的字节个数,目标字节个数也可以是目标媒体数据所占的字节个数和目标数据包中的其他信息所占的字节个数之和,具体地根据实际情况确定,本申请实施例不做限定。It can be understood that the target length data is used to represent the target number of bytes corresponding to the target media data. The target number of bytes may be the number of bytes occupied by the target media data, or the target number of bytes may be the number of bytes occupied by the target media data. The sum of the number of bytes occupied and the number of bytes occupied by other information in the target data packet is specifically determined according to actual conditions, and is not limited in this embodiment of the present application.
具体地,在目标媒体数据为音视频复合数据的情况下,目标字节个数可以是目标媒体数据所占的字节个数,在目标媒体数据为视频数据或者音频数据的情况下,目标字节个数也可以是目标媒体数据所占的字节个数和目标数据包中的其他信息(如标志位、时间戳等)所占的字节个数之和。Specifically, in the case where the target media data is audio-video composite data, the target number of bytes may be the number of bytes occupied by the target media data, and in the case where the target media data is video data or audio data, the target number of bytes The number of sections may also be the sum of the number of bytes occupied by the target media data and the number of bytes occupied by other information (such as flag bits, time stamps, etc.) in the target data packet.
可以理解,显示设备先接收预设字节个数的目标长度数据,将目标长度数据转化为整数,该整数即为目标媒体数据所占的字节个数(即目标字节个数),显示设备继续接收数据,接收到目标字节个数的数据(即目标媒体数据)即可确定目标媒体数据接收完成(也即目标数据包接收完成),对目标媒体数据进行解码处理得到目标源数据,播放目标源数据,由此,根据目标长度数据指示的目标字节个数,即可确定需要接收的媒体数据的长度,接收完对应长度的媒体数据即可处理播放,无需再等待下一帧数据的到来,节约了时间,降低了时延。It can be understood that the display device first receives target length data with a preset number of bytes, and converts the target length data into an integer, which is the number of bytes occupied by the target media data (ie, the number of target bytes), and displays The device continues to receive data, and after receiving the data of the target number of bytes (that is, the target media data), it can be determined that the target media data has been received (that is, the target data packet has been received), and the target media data is decoded to obtain the target source data. Play the target source data, thus, according to the target number of bytes indicated by the target length data, the length of the media data to be received can be determined, and the media data of the corresponding length can be processed and played after receiving the media data of the corresponding length, without waiting for the next frame of data The arrival of , saves time and reduces delay.
示例性地,以一个数据包中传输一帧数据为例,如图7所示,为一种可能的目标数据包的结构,前四个(即预设字节个数)字节为目标长度数据,从第五个字节开始为需要传输的一帧数据(即目标媒体数据),将目标长度数据转化为整数,该整数即为目标媒体数据所占的字节数。如:智能设备确定目标媒体数据所占的字节数,封装目标媒体数据得到目标数据包,目标数据包的前四个字节为目标长度数据,第五个字节开始为目标媒体数据,向显示设备发送目标数据包,显示设备先接收智能设备发送的4个字节的目标长度数据,将目标长度数据转化为整数100,即可确定目标字节个数为100(目标媒体数据的长度为100个字节),显示设备继续接收100个字节的数据,即可以确定目标媒体数据接收完成,对100个字节的数据进行解码处理并播放。Exemplarily, taking the transmission of a frame of data in a data packet as an example, as shown in FIG. 7, it is a possible structure of a target data packet, and the first four (that is, the preset number of bytes) bytes are the target length Data, starting from the fifth byte is a frame of data to be transmitted (that is, the target media data), the target length data is converted into an integer, and the integer is the number of bytes occupied by the target media data. For example: the smart device determines the number of bytes occupied by the target media data, and encapsulates the target media data to obtain the target data packet. The first four bytes of the target data packet are the target length data, and the fifth byte is the target media data. The display device sends the target data packet. The display device first receives the 4-byte target length data sent by the smart device, converts the target length data into an
本申请实施例中,智能设备向显示设备发送目标数据包,目标数据包包括:目标长度数据和目标媒体数据,目标长度数据用于表征目标媒体数据对应的目标字节个数,目标媒体数据为以下任一项:视频数据、音频数据、音视频复合数据,目标媒体数据为智能设备对采集的目标源数据进行编码处理得到的;显示设备接收智能设备发送的目标数据包中的预设字节个数的目标长度数据,基于目标长度数据,接收智能设备发送的目标字节个数的数据,以得到目标媒体数据;对目标媒体数据进行解码处理得到目标源数据,播放目标源数据。由此,显示设备可以根据接收到的目标长度数据,确定目标媒体数据的所对应的字节数(目标字节个数),继续接收目标字节个数的数据,即可确定目标媒体数据(一帧数据)接收完成,从而可以马上对目标媒体数据进行解码处理并播放,无需将当前帧数据缓存,等待下一帧数据到来后,从缓存区分离出当前帧数据再做解码处理,节约了等待时间和缓存空间,从而降低镜像投屏的时延;同时,现有技术通过下一帧数据的起始码判断当前帧数据接收完成,因此需要对接收到的每个数据进行判断,确定是否是起始码,增加了显示设备处理数据的压力,而本申请基于目标长度数据,确定需要接收的目标媒体数据所对应的字节数,显示设备无需对每个数据进行判断,减少了显示设备处理数据的压力,进而降低了资源消耗,综上,本申请方案可以提高投屏时数据的处理效率。In the embodiment of the present application, the smart device sends the target data packet to the display device, the target data packet includes: target length data and target media data, the target length data is used to represent the target number of bytes corresponding to the target media data, and the target media data is Any of the following: video data, audio data, audio-video composite data, the target media data is obtained by encoding and processing the target source data collected by the smart device; the display device receives the preset bytes in the target data packet sent by the smart device The number of target length data, based on the target length data, receiving the data of the target number of bytes sent by the smart device to obtain the target media data; decoding the target media data to obtain the target source data, and playing the target source data. Thus, the display device can determine the corresponding number of bytes (target number of bytes) of the target media data according to the received target length data, and continue to receive the data of the target number of bytes to determine the target media data ( One frame of data) is received, so that the target media data can be decoded and played immediately without buffering the current frame data. After waiting for the arrival of the next frame data, the current frame data is separated from the buffer area and then decoded, which saves Waiting time and buffer space, thereby reducing the delay of mirroring screen projection; at the same time, the existing technology judges the completion of receiving the current frame data through the start code of the next frame data, so it is necessary to judge each received data to determine whether It is the start code, which increases the pressure on the display device to process data. However, this application determines the number of bytes corresponding to the target media data to be received based on the target length data. The display device does not need to judge each data, which reduces the number of display devices. The pressure of processing data further reduces resource consumption. In summary, the solution of this application can improve the data processing efficiency during screen projection.
可以理解,目标数据包可以通过同一数据通道传输,也可以通过不同的数据通道传输。It can be understood that the target data packets can be transmitted through the same data channel, or can be transmitted through different data channels.
具体地,在目标数据包中携带的目标媒体数据为音视频复合数据时,智能设备将目标数据包通过同一数据通道发送至显示设备,此时,音视频数据是同时传输,显示设备接收到复合数据后,先分离出音频数据和视频数据,再分别对音频数据和视频数据进行解码处理;在目标数据包中携带的目标媒体数据为音频数据或者视频数据时,智能设备将目标数据包通过同一数据通道发送至显示设备,但显示设备无法区别接收到的目标数据包中携带的目标媒体数据是音频数据还是视频数据,因此不确定对接收到的目标媒体数据进行音频解码处理还是视频编码处理,此时,可以在目标数据包中加入标志位,以使显示设备可以根据标志位区别该目标数据包中携带的目标媒体数据是音频数据还是视频数据;在目标数据包中携带的目标媒体数据为音频数据或者视频数据时,也可以将携带音频数据的数据包和携带视频数据的数据包通过不同的数据通道传输,此时,显示设备可以根据数据通道不同,确定接收到的目标数据包中携带的目标媒体数据为音频数据或者视频数据。Specifically, when the target media data carried in the target data packet is composite audio and video data, the smart device sends the target data packet to the display device through the same data channel. At this time, the audio and video data are transmitted simultaneously, and the display device receives the composite data. After data, the audio data and video data are separated first, and then the audio data and video data are decoded respectively; when the target media data carried in the target data packet is audio data or video data, the smart device passes the target data packet through the same The data channel is sent to the display device, but the display device cannot distinguish whether the target media data carried in the received target data packet is audio data or video data, so it is not sure whether to perform audio decoding or video encoding processing on the received target media data. At this point, a flag can be added to the target data packet, so that the display device can distinguish whether the target media data carried in the target data packet is audio data or video data according to the flag; the target media data carried in the target data packet is For audio data or video data, the data packets carrying audio data and the data packets carrying video data can also be transmitted through different data channels. At this time, the display device can determine the received target data packets according to the different data channels The target media data is audio data or video data.
本申请一些实施例中,目标媒体数据为视频数据或音频数据;目标数据包还包括:标志位,标志位用于指示目标媒体数据的类型,类型为音频类型或视频类型,目标字节个数为目标媒体数据所占的字节个数和标志位所占的字节个数之和,智能设备通过混合数据通道,向显示设备发送目标数据包;显示设备通过混合数据通道,接收智能设备发送的目标长度数据,显示设备基于目标长度数据,通过混合数据通道,接收智能设备发送的目标字节个数的数据,以得到标志位和目标媒体数据,在标志位指示目标媒体数据的类型为音频类型的情况下,对目标媒体数据进行音频解码处理得到目标源数据,在标志位指示目标媒体数据的类型为视频类型的情况下,对目标媒体数据进行视频解码处理得到目标源数据。In some embodiments of the present application, the target media data is video data or audio data; the target data packet also includes: flag bits, the flag bits are used to indicate the type of target media data, the type is audio type or video type, and the number of target bytes It is the sum of the number of bytes occupied by the target media data and the number of bytes occupied by the flag bits. The smart device sends the target data packet to the display device through the mixed data channel; the display device receives the data packet sent by the smart device through the mixed data channel. The target length data, based on the target length data, the display device receives the data of the target number of bytes sent by the smart device through the mixed data channel to obtain the flag bit and target media data, and the flag bit indicates that the type of the target media data is audio In the case of type, perform audio decoding processing on the target media data to obtain the target source data, and if the flag bit indicates that the type of the target media data is video type, perform video decoding processing on the target media data to obtain the target source data.
可以理解,标志位是用于指示目标媒体数据的类型是音频类型或者视频类型,标志位所占的字节数以及具体值根据实际需要确定,本申请实施例不做限定。It can be understood that the flag bit is used to indicate that the type of the target media data is an audio type or a video type, and the number of bytes occupied by the flag bit and the specific value are determined according to actual needs, and are not limited in this embodiment of the present application.
可以理解,无论目标媒体数据的类型是音频类型还是视频类型,携带目标媒体数据的目标数据包都通过混合数据通道传输,即智能设备将需要传输的音频数据或者视频数据封装后,通过同一数据传输通道发送至显示设备。It can be understood that no matter the type of target media data is audio type or video type, the target data packet carrying the target media data is transmitted through the mixed data channel, that is, after the smart device encapsulates the audio data or video data to be transmitted, it is transmitted through the same data The channel is sent to the display device.
可以理解,智能设备将采集的目标源数据进行编码处理得到目标媒体数据,将目标媒体数据进行封装,得到目标数据包,目标数据包中的数据依次为:目标长度数据、标志位和目标媒体数据;显示设备接收到目标数据包的目标长度数据,由此可以确定需要接收的标志位和目标媒体数据所占的字节数,再根据标志位确定对目标媒体数据的类型,在目标音频数据的类型是音频类型的情况下,进行音频解码处理,在目标音频数据的类型是视频类型的情况下,进行视频解码处理,播放处理后得到的目标源数据。It can be understood that the smart device encodes the collected target source data to obtain the target media data, and encapsulates the target media data to obtain the target data packet. The data in the target data packet are: target length data, flag bits and target media data ; The display device receives the target length data of the target data packet, thus can determine the flag bits to be received and the number of bytes occupied by the target media data, and then determine the type of the target media data according to the flag bits, in the target audio data When the type is an audio type, audio decoding processing is performed, and when the type of the target audio data is a video type, video decoding processing is performed, and the target source data obtained after the processing is played.
具体地,显示设备封装目标媒体数据的过程,确定标志位:在目标媒体数据是音频数据的情况下,标志位用于指示目标媒体数据的类型为音频类型,在目标媒体数据是视频数据的情况下,标志位用于指示目标媒体数据的类型为视频类型,根据标志位所占的字节数和目标媒体数据所占的字节数求和的结果确定目标长度数据;将目标长度数据、标志位和目标媒体数据进行打包得到目标数据包。Specifically, the display device encapsulates the process of target media data to determine the flag bit: when the target media data is audio data, the flag bit is used to indicate that the type of the target media data is an audio type, and when the target media data is video data Next, the flag bit is used to indicate that the type of the target media data is a video type, and the target length data is determined according to the result of summing the number of bytes occupied by the flag bit and the number of bytes occupied by the target media data; the target length data, flag The bit and the target media data are packed to obtain the target data packet.
示例性地,以一个数据包中传输一帧数据为例,如图8所示,为一种可能的目标数据包结构,前四个(即预设字节个数)字节为目标长度数据,第五个字节为标志位(如标志位为0指示目标媒体数据的类型为音频类型,标志位为1指示目标媒体数据的类型为视频类型),从第六个字节开始为需要传输的一帧数据(即目标媒体数据)。如:智能设备确定目标媒体数据所占的字节个数,封装目标媒体数据得到目标数据包,目标数据包的前四个字节为目标长度数据,第五个字节为标志位,第六个字节开始为目标媒体数据,向显示设备发送目标数据包,显示设备先接收智能设备发送的前4个字节的目标长度数据,将目标长度数据转化为整数101,且第五个字节对应的数据为1,由此可知,该目标媒体数据为视频数据,目标媒体数据的长度为100个字节,显示设备将接收到除标志位外的100个字节的数据,进行视频解码处理并播放。Exemplarily, take the transmission of a frame of data in a data packet as an example, as shown in Figure 8, which is a possible target data packet structure, and the first four (that is, the preset number of bytes) bytes are the target length data , the fifth byte is a flag bit (for example, the flag bit is 0 indicating that the type of the target media data is an audio type, and the flag bit is 1 indicating that the type of the target media data is a video type), starting from the sixth byte for the need to transmit A frame of data (that is, the target media data). For example: the smart device determines the number of bytes occupied by the target media data, encapsulates the target media data to obtain the target data packet, the first four bytes of the target data packet are the target length data, the fifth byte is the flag bit, and the sixth The first byte is the target media data, send the target data packet to the display device, the display device first receives the first 4 bytes of target length data sent by the smart device, converts the target length data into an integer 101, and the fifth byte The corresponding data is 1, so it can be seen that the target media data is video data, and the length of the target media data is 100 bytes. The display device will receive 100 bytes of data except the flag bit, and perform video decoding processing and play.
可以理解,携带音频数据的数据包和携带视频数据的数据包通过同一数据通道传输,智能设备根据采集源数据的顺序处理并发送,因此智能设备接收到的数据包也是顺序的,解码处理数据包中携带的媒体数据后播放,无需视频数据和音频数据相互等待。具体地,因为携带音频数据的数据包和携带视频数据的数据包是通过同一通道接收的,对于同一帧视频数据和与其对应的音频数据,智能设备是顺序发送的,显示设备也是顺序接收的,那么处理后播放该视频数据对应的源数据和音频数据对应的源数据在时间上可能存在差异(也受视频数据和音频数据进行解码处理的时间影响),但该时间差一般很小,人眼或者耳朵无法区别,因此并不影响播放的效果,所以视频数据和音频数据无需相互等待。It can be understood that the data packets carrying audio data and the data packets carrying video data are transmitted through the same data channel, and the smart device processes and sends them according to the order in which the source data is collected, so the data packets received by the smart device are also in order, and the data packets are decoded and processed After playing the media data carried in the video, there is no need for video data and audio data to wait for each other. Specifically, because the data packets carrying audio data and the data packets carrying video data are received through the same channel, for the same frame of video data and corresponding audio data, the smart device sends them sequentially, and the display device also receives them sequentially. Then the source data corresponding to the video data and the source data corresponding to the audio data after processing may have a difference in time (also affected by the decoding processing time of the video data and audio data), but the time difference is generally small, and the human eye or The ear cannot distinguish, so it does not affect the playback effect, so the video data and audio data do not need to wait for each other.
本申请实施例中,目标数据包还包括:标志位,标志位用于指示目标媒体数据的类型,类型为音频类型或视频类型,目标字节个数为目标媒体数据所占的字节个数和标志位所占的字节个数之和,智能设备通过混合数据通道,向显示设备发送目标数据包;显示设备通过混合数据通道,接收智能设备发送的目标长度数据,显示设备基于目标长度数据,通过混合数据通道,接收智能设备发送的目标字节个数的数据,以得到标志位和目标媒体数据,在标志位指示目标媒体数据的类型为音频类型的情况下,对目标媒体数据进行音频解码处理得到目标源数据,在标志位指示目标媒体数据的类型为视频类型的情况下,对目标媒体数据进行视频解码处理得到目标源数据。智能设备根据采集源数据的顺序处理并发送数据,显示设备接收到的数据包也是顺序的,因此,显示设备将通过混合数据通道接收的媒体数据处理后即播放,避免了视频数据和音频数据通过不同的数据通道传输时,需要相互等待同步播放,通过同一数据通道传输不同类型的数据包,显示设备接收到媒体数据即可处理播放,节约了时间,降低了时延。In the embodiment of the present application, the target data packet also includes: a flag bit, which is used to indicate the type of the target media data, the type is audio type or video type, and the number of target bytes is the number of bytes occupied by the target media data and the number of bytes occupied by the flag bits, the smart device sends the target data packet to the display device through the mixed data channel; the display device receives the target length data sent by the smart device through the mixed data channel, and the display device based on the target length data , through the mixed data channel, receive the data of the target number of bytes sent by the smart device to obtain the flag bit and the target media data, and perform audio on the target media data when the flag bit indicates that the type of the target media data is an audio type The target source data is obtained through decoding processing, and when the flag bit indicates that the type of the target media data is a video type, video decoding processing is performed on the target media data to obtain the target source data. The smart device processes and sends the data according to the order in which the source data is collected, and the data packets received by the display device are also sequential. Therefore, the display device will play the media data received through the mixed data channel after processing, avoiding the need for video data and audio data to pass through When different data channels are transmitted, they need to wait for each other to play synchronously. Different types of data packets are transmitted through the same data channel. The display device can process and play the media data after receiving the media data, which saves time and reduces delay.
本申请一些实施例中,目标媒体数据为视频数据或音频数据;目标数据包还包括:目标时间戳,目标时间戳用于指示目标源数据的采集时间,目标字节个数为目标媒体数据所占的字节个数和目标时间戳所占的字节个数之和。智能设备通过目标数据通道,向显示设备发送目标数据包;显示设备通过目标数据通道,接收智能设备发送的目标长度数据,基于目标长度数据,通过目标数据通道,接收智能设备发送的目标字节个数的数据,以得到目标时间戳和目标媒体数据,基于目标时间戳,同步播放目标源数据和第一源数据,目标源数据和第一源数据为智能设备同步采集的不同类型的媒体数据;其中,在目标媒体数据为音频数据的情况下,目标数据通道为音频数据通道,在目标媒体数据为视频数据的情况下,目标数据通道为视频数据通道。In some embodiments of the present application, the target media data is video data or audio data; the target data packet also includes: a target timestamp, the target timestamp is used to indicate the collection time of the target source data, and the target byte number is specified by the target media data The sum of the number of bytes occupied and the number of bytes occupied by the target timestamp. The smart device sends the target data packet to the display device through the target data channel; the display device receives the target length data sent by the smart device through the target data channel, and based on the target length data, receives the target bytes sent by the smart device through the target data channel data to obtain the target timestamp and target media data, based on the target timestamp, the target source data and the first source data are played synchronously, and the target source data and the first source data are different types of media data synchronously collected by smart devices; Wherein, when the target media data is audio data, the target data channel is an audio data channel, and when the target media data is video data, the target data channel is a video data channel.
可以理解,目标时间戳用于指示目标源数据的采集时间,具体地,目标时间戳指示的时间可以是目标源数据的采集时间,也可以是对目标源数据进行编码处理的时间,还可以是封装目标媒体数据的时间,具体地目标时间戳指示的时间根据实际需要确定,本申请实施例不做限定。It can be understood that the target time stamp is used to indicate the collection time of the target source data. Specifically, the time indicated by the target time stamp may be the collection time of the target source data, or the time when the target source data is encoded, or The time for encapsulating the target media data, specifically the time indicated by the target timestamp is determined according to actual needs, and is not limited in this embodiment of the present application.
可以理解,基于目标时间戳,同步播放目标源数据和第一源数据,即基于目标时间戳和第一时间戳,同步播放目标源数据和第一源数据,第一时间戳用于指示第一媒体数据的采集时间,第一时间戳和目标时间戳的差值的绝对值小于或等于差值阈值,第一媒体数据和目标媒体数据为不同类型的媒体数据,第一源数据为对第一媒体数据进行解码处理得到的。It can be understood that based on the target time stamp, the target source data and the first source data are played synchronously, that is, based on the target time stamp and the first time stamp, the target source data and the first source data are played synchronously, and the first time stamp is used to indicate the first The acquisition time of the media data, the absolute value of the difference between the first timestamp and the target timestamp is less than or equal to the difference threshold, the first media data and the target media data are different types of media data, and the first source data is the first The media data is decoded and processed.
可以理解,若多个数据包中携带的时间戳和目标时间戳的差值的绝对值均小于或等于差值阈值,可以将多个数据包中携带的时间戳和目标时间戳的差值的绝对值最小的数据包中携带的媒体数据作为第一媒体数据,也可以将多个数据包任一数据包携带的媒体数据作为第一媒体数据,本申请实施例不做具体限定。It can be understood that if the absolute values of the differences between the timestamps carried in multiple data packets and the target timestamps are all less than or equal to the difference threshold, the difference between the timestamps carried in multiple data packets and the target timestamps can be The media data carried in the data packet with the smallest absolute value is used as the first media data, or the media data carried in any data packet of multiple data packets may be used as the first media data, which is not specifically limited in this embodiment of the present application.
可以理解,目标源数据和第一源数据为智能设备同步采集的不同类型的媒体数据,即目标源数据的类型为音频类型,则第一源数据的类型为视频类型,目标源数据的类型为视频类型,则第一源数据的类型为音频类型。It can be understood that the target source data and the first source data are different types of media data synchronously collected by smart devices, that is, the type of the target source data is audio type, then the type of the first source data is video type, and the type of target source data is video type, the type of the first source data is audio type.
可以理解,音频数据通道和视频数据通道为不同的数据通道,显示设备通过音频数据通道接收到的数据包中携带的媒体数据,通过音频解码处理得到源数据;通过视频数据通道接收到的数据包中携带的媒体数据,通过视频频解码处理得到源数据。It can be understood that the audio data channel and the video data channel are different data channels, the media data carried in the data packet received by the display device through the audio data channel, and the source data is obtained through audio decoding processing; the data packet received through the video data channel The media data carried in the source data is obtained through video decoding processing.
示例性地,以一个数据包中传输一帧数据为例,如图9所示,为一种可能的目标数据包结构,前四个(即预设字节个数)字节为目标长度数据,第5至12个字节为时间戳(占八个字节),从第13个字节开始为需要传输的一帧数据(即目标媒体数据)。Exemplarily, taking the transmission of one frame of data in one data packet as an example, as shown in FIG. 9, it is a possible target data packet structure, and the first four (that is, the preset number of bytes) bytes are the target length data , the 5th to 12th bytes are timestamps (eight bytes), and the 13th byte is a frame of data to be transmitted (that is, target media data).
本申请实施例中,智能设备通过目标数据通道,向显示设备发送目标数据包;显示设备通过目标数据通道,接收智能设备发送的目标长度数据,基于目标长度数据,通过目标数据通道,接收智能设备发送的目标字节个数的数据,以得到目标时间戳和目标媒体数据,基于目标时间戳,同步播放目标源数据和第一源数据,目标源数据和第一源数据为智能设备同步采集的不同类型的媒体数据。由此,将携带视频数据的数据包和音频数据的数据包通过不同的数据通道发送,显示设备基于接收到的数据包中携带的目标时间戳,同步播放目标源数据和第一源数据,显示设备侧的音视频的同步效果更好,用户体验更佳。In the embodiment of this application, the smart device sends the target data packet to the display device through the target data channel; the display device receives the target length data sent by the smart device through the target data channel, and receives the target length data from the smart device through the target data channel based on the target length data. Send the data of the target number of bytes to obtain the target timestamp and target media data. Based on the target timestamp, the target source data and the first source data are played synchronously. The target source data and the first source data are synchronously collected by smart devices Different types of media data. Thus, the data packets carrying video data and audio data packets are sent through different data channels, and the display device synchronously plays the target source data and the first source data based on the target timestamp carried in the received data packets, and displays The audio and video synchronization effect on the device side is better, and the user experience is better.
本申请一些实施例中,目标媒体数据为视频数据,目标数据包还包括:目标序列号,目标序列号用于指示目标源数据的采集顺序;显示设备在接收到的智能设备发送的目标序列号指示的采集顺序满足顺序条件的情况下,接收智能设备发送的预设字节个数的目标长度数据,顺序条件用于指示目标源数据和接收到的上一个源数据是智能设备连续采集的数据,在目标序列号指示的采集顺序不满足顺序条件的情况下,显示设备向智能设备发送请求消息,请求消息用于请求将下一个待发送源数据以关键帧的形式进行编码处理并发送;智能设备接收显示设备发送的请求消息,基于请求消息,向显示设备发送下一个数据包,下一个数据包中的媒体数据是对下一个待发送源数据以关键帧的形式进行编码处理得到的;显示设备接收智能设备发送的下一个数据包。In some embodiments of the present application, the target media data is video data, and the target data packet also includes: a target serial number, which is used to indicate the collection sequence of the target source data; the display device receives the target serial number sent by the smart device When the indicated collection sequence satisfies the sequence condition, receive the target length data of the preset number of bytes sent by the smart device. The sequence condition is used to indicate that the target source data and the last source data received are the data continuously collected by the smart device , when the acquisition sequence indicated by the target serial number does not meet the sequence condition, the display device sends a request message to the smart device, and the request message is used to request that the next source data to be sent be encoded and sent in the form of a key frame; the smart The device receives the request message sent by the display device, and based on the request message, sends the next data packet to the display device. The media data in the next data packet is obtained by encoding the next source data to be sent in the form of a key frame; display The device receives the next packet sent by the smart device.
可以理解,目标序列号用于指示目标源数据的采集顺序,如:连续采集源数据,第一帧源数据对应的数据包中的目标序列号为1,第二帧源数据对应的数据包中的目标序列号为2,第三帧源数据对应的数据包中的目标序列号为3,以此类推,序列号的编号可以是顺序的正整数(如1、2、3……),也可以是等间隔顺序的正整数(如0、2、4……)等,具体地序列号的编号方式本申请实施例不做限定。It can be understood that the target sequence number is used to indicate the collection sequence of the target source data, such as: continuously collect source data, the target sequence number in the data packet corresponding to the first frame of source data is 1, and the target sequence number in the data packet corresponding to the second frame of source data The target sequence number of the frame is 2, the target sequence number in the data packet corresponding to the third frame source data is 3, and so on, the number of the sequence number can be a sequential positive integer (such as 1, 2, 3...), or It may be a positive integer (such as 0, 2, 4, .
示例性地,序列号按照顺序的正整数编号,显示设备接收到上一个数据包的序列号为3,接收到当前数据包的序列号为4,序列号4和序列号3满足顺序条件,由此说明,当前数据包之前的数据包未丢失;显示设备接收到上一个数据包的序列号为3,接收到当前数据包的序列号为5,序列号5和序列号3不满足顺序条件,由此可以说明当前数据包之前的序列号是4的数据包丢失,显示设备向智能设备发送请求消息,请求将下一个待发送源数据以关键帧的形式进行编码处理并发送。Exemplarily, the sequence number is numbered according to the sequence of positive integers, indicating that the device received the sequence number of the last data packet as 3, and received the sequence number of the current data packet as 4. This shows that the data packets before the current data packet are not lost; it shows that the device received the sequence number of the previous data packet is 3, and the sequence number of the current data packet is 5, and the sequence number 5 and sequence number 3 do not meet the sequence condition. This shows that the data packet whose sequence number is 4 before the current data packet is lost, and the display device sends a request message to the smart device, requesting that the next source data to be sent be encoded and sent in the form of a key frame.
可以理解,关键帧指在编码处理的过程中,该帧的所有数据均保留,显示设备接收到关键帧,无需依赖其他帧数据,即可完整解码出该帧的所有数据。为了节约空间以及提升传输效率,其他帧数据的处理会依赖关键帧,如:第一帧数据是关键帧,第二帧数据存储的是与第一帧数据有差异的区域,相同区域不存储,第三帧数据存储的是与第二帧数据有差异的区域,相同的区域不存储,由此,在上一帧数据丢失以后,下一帧数据只存储了与上一帧数据有差异的区域,则解码后仅能显示该有差异的区域,其他区域会显示马赛克。It can be understood that a key frame means that during the encoding process, all the data of the frame is retained, and the display device can completely decode all the data of the frame after receiving the key frame without relying on other frame data. In order to save space and improve transmission efficiency, the processing of other frame data will depend on key frames. For example, the first frame data is a key frame, and the second frame data stores the area that is different from the first frame data. The same area is not stored. The third frame data stores the area that is different from the second frame data, and the same area is not stored. Therefore, after the previous frame data is lost, the next frame data only stores the area that is different from the previous frame data , then only the area with the difference can be displayed after decoding, and mosaics will be displayed in other areas.
可以理解,显示设备在确定有数据包丢失的情况下,在关键帧到来之前,显示设备接收到的所有数据包可以丢弃,防止因为数据包丢失导致播放视频时出现大量的马赛克。It can be understood that when the display device determines that there is data packet loss, all data packets received by the display device can be discarded before the arrival of the key frame, so as to prevent a large number of mosaics when playing video due to data packet loss.
可以理解,可以将源数据编码成基于H.264协议的关键帧,可以将源数据编码成基于H.265协议的关键帧,具体地根据实际需要确定,本申请实施例不做限定。It can be understood that the source data can be encoded into key frames based on the H.264 protocol, and the source data can be encoded into key frames based on the H.265 protocol. Specifically, it is determined according to actual needs, which is not limited in this embodiment of the present application.
示例性地,以一个数据包中传输一帧数据为例,如图10所示,为一种可能的目标数据包结构,前4个字节为序列号,第5至8个字节为目标长度数据,从第9个字节开始为需要传输的一帧数据(即目标媒体数据)。Exemplarily, take the transmission of one frame of data in one data packet as an example, as shown in Figure 10, which is a possible target data packet structure, the first 4 bytes are the sequence number, and the 5th to 8th bytes are the target Length data, starting from the 9th byte is a frame of data to be transmitted (that is, target media data).
可以理解,目标数据包中还可以包括其他信息,如标志位、时间戳等,具体地,本申请实施例不做限定。It can be understood that the target data packet may also include other information, such as a flag bit, a time stamp, etc., which are not limited in this embodiment of the present application.
可以理解,智能设备接收到显示设备发送的请求消息,将采集的最近的待发送源数据以关键帧的形式进行编码处理得到媒体数据,再将媒体数据封装成数据包后发送至显示设备。It can be understood that the smart device receives the request message sent by the display device, encodes the latest collected source data to be sent in the form of a key frame to obtain media data, and then encapsulates the media data into a data packet and sends it to the display device.
本申请实施例中,目标数据包中包括序列号,显示设备根据序列号确定在接收到当前数据包之前的数据包是否丢失,在有数据包丢失的情况下,显示设备向智能设备发送请求消息,请求将下一帧待发送的源数据以关键帧的形式编码并发送;在镜像投屏场景中出现丢包后,播放视频时会出现马赛克,影响用户体验,因此,智能设备将下一帧待发送源数据编码成关键帧形式,显示设备接收该关键帧,无需依赖其他帧数据,解码处理后即可得到一帧完整的待播放源数据,视频中不再出现马赛克,提升用户体验。In the embodiment of the present application, the target data packet includes a serial number, and the display device determines whether the data packet before receiving the current data packet is lost according to the serial number, and in the case of data packet loss, the display device sends a request message to the smart device , request to encode and send the source data of the next frame to be sent in the form of a key frame; after packet loss occurs in the mirror projection scene, mosaics will appear when playing the video, which will affect the user experience. Therefore, the smart device will send the next frame The source data to be sent is encoded into a key frame form, and the display device receives the key frame without relying on other frame data. After decoding, a complete frame of source data to be played can be obtained, and mosaics will no longer appear in the video, improving user experience.
本申请实施例中,提供了一种数据处理方法,如图11所示,该方法包括下述步骤801至步骤805。In the embodiment of the present application, a data processing method is provided. As shown in FIG. 11 , the method includes the following steps 801 to 805 .
801、智能设备向显示设备发送目标数据包。801. The smart device sends a target data packet to the display device.
其中,目标数据包包括:预设字节个数的目标长度数据和目标媒体数据,目标长度数据用于表征目标媒体数据对应的目标字节个数,目标媒体数据为以下任一项:视频数据、音频数据、音视频复合数据,目标媒体数据为智能设备对采集的目标源数据进行编码处理得到的。Wherein, the target data packet includes: target length data and target media data with a preset number of bytes, the target length data is used to represent the target number of bytes corresponding to the target media data, and the target media data is any of the following: video data , audio data, audio-video composite data, and the target media data is obtained by encoding and processing the collected target source data by the smart device.
802、显示设备接收智能设备发送的目标数据包中的预设字节个数的目标长度数据。802. The display device receives target length data with a preset number of bytes in the target data packet sent by the smart device.
803、显示设备基于目标长度数据,接收智能设备发送的目标字节个数的数据。803. Based on the target length data, the display device receives data of the target number of bytes sent by the smart device.
其中,基于目标长度数据,接收智能设备发送的目标字节个数的数据,以得到目标媒体数据。Wherein, based on the target length data, the data of the target number of bytes sent by the smart device is received to obtain the target media data.
804、显示设备对目标媒体数据进行解码处理得到目标源数据。804. The display device decodes the target media data to obtain target source data.
805、显示设备播放目标源数据。805. The display device plays the target source data.
本申请实施例中,智能设备向显示设备发送目标数据包,目标数据包包括:目标长度数据和目标媒体数据,目标长度数据用于表征目标媒体数据对应的目标字节个数,目标媒体数据为以下任一项:视频数据、音频数据、音视频复合数据,目标媒体数据为智能设备对采集的目标源数据进行编码处理得到的;显示设备接收智能设备发送的目标数据包中的预设字节个数的目标长度数据,基于目标长度数据,接收智能设备发送的目标字节个数的数据,以得到目标媒体数据;对目标媒体数据进行解码处理得到目标源数据,播放目标源数据。由此,显示设备可以根据接收到的目标长度数据,确定目标媒体数据的所对应的字节数(目标字节个数),继续接收目标字节个数的数据,即可确定目标媒体数据(一帧数据)接收完成,从而可以马上对目标媒体数据进行解码处理并播放,无需将当前帧数据缓存,等待下一帧数据到来后,从缓存区分离出当前帧数据再做解码处理,节约了等待时间和缓存空间,从而降低镜像投屏的时延;同时,现有技术通过下一帧数据的起始码判断当前帧数据接收完成,因此需要对接收到的每个数据进行判断,确定是否是起始码,增加了显示设备处理数据的压力,而本申请基于目标长度数据,确定需要接收的目标媒体数据所对应的字节数,显示设备无需对每个数据进行判断,减少了显示设备处理数据的压力,进而降低了资源消耗,综上,本申请方案可以提高投屏时数据的处理效率。In the embodiment of the present application, the smart device sends the target data packet to the display device, the target data packet includes: target length data and target media data, the target length data is used to represent the target number of bytes corresponding to the target media data, and the target media data is Any of the following: video data, audio data, audio-video composite data, the target media data is obtained by encoding and processing the target source data collected by the smart device; the display device receives the preset bytes in the target data packet sent by the smart device The number of target length data, based on the target length data, receiving the data of the target number of bytes sent by the smart device to obtain the target media data; decoding the target media data to obtain the target source data, and playing the target source data. Thus, the display device can determine the corresponding number of bytes (target number of bytes) of the target media data according to the received target length data, and continue to receive the data of the target number of bytes to determine the target media data ( One frame of data) is received, so that the target media data can be decoded and played immediately without buffering the current frame data. After waiting for the arrival of the next frame data, the current frame data is separated from the buffer area and then decoded, which saves Waiting time and buffer space, thereby reducing the delay of mirror projection; at the same time, the existing technology judges the completion of receiving the current frame data through the start code of the next frame data, so it is necessary to judge each received data to determine whether It is the start code, which increases the pressure on the display device to process data. However, this application determines the number of bytes corresponding to the target media data to be received based on the target length data. The display device does not need to judge each data, which reduces the number of display devices. The pressure of processing data further reduces resource consumption. In summary, the solution of this application can improve the data processing efficiency during screen projection.
本申请一些实施例中,目标媒体数据为视频数据或音频数据;目标数据包还包括:标志位;结合图11,如图12所示,上述步骤801至步骤803具体可以通过下述步骤801a至803a实现,上述步骤804具体可以通过下述步骤804a和步骤804b实现。In some embodiments of the present application, the target media data is video data or audio data; the target data packet also includes: a flag; in conjunction with FIG. 11, as shown in FIG. Step 803a is implemented, and the above step 804 can be specifically implemented through the following steps 804a and 804b.
801a、智能设备通过混合数据通道,向显示设备发送目标数据包。801a. The smart device sends the target data packet to the display device through the hybrid data channel.
802a、显示设备通过混合数据通道,接收智能设备发送的目标长度数据。802a. The display device receives the target length data sent by the smart device through the mixed data channel.
803a、显示设备基于目标长度数据,通过混合数据通道,接收智能设备发送的目标字节个数的数据。803a. Based on the target length data, the display device receives the data of the target number of bytes sent by the smart device through the mixed data channel.
其中,目标字节个数为目标媒体数据所占的字节个数和标志位所占的字节个数之和;基于目标长度数据,通过混合数据通道,接收智能设备发送的目标字节个数的数据,以得到标志位和目标媒体数据。Among them, the number of target bytes is the sum of the number of bytes occupied by the target media data and the number of bytes occupied by the flag bits; based on the target length data, the target byte number sent by the smart device is received through the mixed data channel. Number of data to get flag bits and target media data.
804a、在标志位指示目标媒体数据的类型为音频类型的情况下,显示设备对目标媒体数据进行音频解码处理得到目标源数据。804a. When the flag bit indicates that the type of the target media data is an audio type, the display device performs audio decoding processing on the target media data to obtain target source data.
其中,标志位用于指示目标媒体数据的类型,类型为音频类型或视频类型。Wherein, the flag bit is used to indicate the type of the target media data, which is an audio type or a video type.
804b、在标志位指示目标媒体数据的类型为视频类型的情况下,显示设备对目标媒体数据进行视频解码处理得到目标源数据。804b. When the flag bit indicates that the type of the target media data is a video type, the display device performs video decoding processing on the target media data to obtain target source data.
本申请实施例中,目标数据包还包括:标志位,标志位用于指示目标媒体数据的类型,类型为音频类型或视频类型,目标字节个数为目标媒体数据所占的字节个数和标志位所占的字节个数之和,智能设备通过混合数据通道,向显示设备发送目标数据包;显示设备通过混合数据通道,接收智能设备发送的目标长度数据,显示设备基于目标长度数据,通过混合数据通道,接收智能设备发送的目标字节个数的数据,以得到标志位和目标媒体数据,在标志位指示目标媒体数据的类型为音频类型的情况下,对目标媒体数据进行音频解码处理得到目标源数据,在标志位指示目标媒体数据的类型为视频类型的情况下,对目标媒体数据进行视频解码处理得到目标源数据。智能设备根据采集源数据的顺序处理并发送数据,显示设备接收到的数据包也是顺序的,因此,显示设备将通过混合数据通道接收的媒体数据处理后即播放,避免了视频数据和音频数据通过不同的数据通道传输时,需要相互等待同步播放,通过同一数据通道传输不同类型的数据包,显示设备接收到媒体数据即可处理播放,节约了时间,降低了时延。In the embodiment of the present application, the target data packet also includes: a flag bit, which is used to indicate the type of the target media data, the type is audio type or video type, and the number of target bytes is the number of bytes occupied by the target media data and the number of bytes occupied by the flag bits, the smart device sends the target data packet to the display device through the mixed data channel; the display device receives the target length data sent by the smart device through the mixed data channel, and the display device based on the target length data , through the mixed data channel, receive the data of the target number of bytes sent by the smart device to obtain the flag bit and the target media data, and perform audio on the target media data when the flag bit indicates that the type of the target media data is an audio type The target source data is obtained through decoding processing, and when the flag bit indicates that the type of the target media data is a video type, video decoding processing is performed on the target media data to obtain the target source data. The smart device processes and sends the data according to the order in which the source data is collected, and the data packets received by the display device are also sequential. Therefore, the display device will play the media data received through the mixed data channel after processing, avoiding the need for video data and audio data to pass through When different data channels are transmitted, they need to wait for each other to play synchronously. Different types of data packets are transmitted through the same data channel. The display device can process and play the media data after receiving the media data, which saves time and reduces delay.
本申请一些实施例中,目标媒体数据为视频数据或音频数据;目标数据包还包括:目标时间戳;结合图11,如图13所示,上述步骤801至步骤803具体可以通过下述步骤801b至803b实现,上述步骤805具体可以通过下述步骤805a实现。In some embodiments of the present application, the target media data is video data or audio data; the target data packet also includes: a target timestamp; in conjunction with FIG. 11 , as shown in FIG. 13 , the above steps 801 to 803 can be specifically implemented through the following step 801b Step 803b is implemented, and the above step 805 can be specifically implemented through the following step 805a.
801b、智能设备通过目标数据通道,向显示设备发送目标数据包。801b. The smart device sends the target data packet to the display device through the target data channel.
其中,在目标媒体数据为音频数据的情况下,目标数据通道为音频数据通道,在目标媒体数据为视频数据的情况下,目标数据通道为视频数据通道。Wherein, when the target media data is audio data, the target data channel is an audio data channel, and when the target media data is video data, the target data channel is a video data channel.
802b、显示设备通过目标数据通道,接收智能设备发送的目标长度数据。802b. The display device receives the target length data sent by the smart device through the target data channel.
803b、显示设备基于目标长度数据,通过目标数据通道,接收智能设备发送的目标字节个数的数据。803b. Based on the target length data, the display device receives data of the target number of bytes sent by the smart device through the target data channel.
其中,目标字节个数为目标媒体数据所占的字节个数和目标时间戳所占的字节个数之和;基于目标长度数据,通过目标数据通道,接收智能设备发送的目标字节个数的数据,以得到目标时间戳和目标媒体数据。Among them, the number of target bytes is the sum of the number of bytes occupied by the target media data and the number of bytes occupied by the target timestamp; based on the target length data, the target bytes sent by the smart device are received through the target data channel number of data to get the target timestamp and target media data.
805a、显示设备基于目标时间戳,同步播放目标源数据和第一源数据。805a. The display device synchronously plays the target source data and the first source data based on the target timestamp.
其中,目标时间戳用于指示目标源数据的采集时间;目标源数据和第一源数据为智能设备同步采集的不同类型的媒体数据。Wherein, the target timestamp is used to indicate the collection time of the target source data; the target source data and the first source data are different types of media data synchronously collected by the smart device.
本申请实施例中,智能设备通过目标数据通道,向显示设备发送目标数据包;显示设备通过目标数据通道,接收智能设备发送的目标长度数据,基于目标长度数据,通过目标数据通道,接收智能设备发送的目标字节个数的数据,以得到目标时间戳和目标媒体数据,基于目标时间戳,同步播放目标源数据和第一源数据,目标源数据和第一源数据为智能设备同步采集的不同类型的媒体数据。由此,将携带视频数据的数据包和音频数据的数据包通过不同的数据通道发送,显示设备基于接收到的数据包中携带的目标时间戳,同步播放目标源数据和第一源数据,显示设备侧的音视频的同步效果更好,用户体验更佳。In the embodiment of this application, the smart device sends the target data packet to the display device through the target data channel; the display device receives the target length data sent by the smart device through the target data channel, and receives the target length data from the smart device through the target data channel based on the target length data. Send the data of the target number of bytes to obtain the target timestamp and target media data. Based on the target timestamp, the target source data and the first source data are played synchronously. The target source data and the first source data are synchronously collected by smart devices Different types of media data. Thus, the data packets carrying video data and audio data packets are sent through different data channels, and the display device synchronously plays the target source data and the first source data based on the target timestamp carried in the received data packets, and displays The audio and video synchronization effect on the device side is better, and the user experience is better.
本申请一些实施例中,目标媒体数据为视频数据,目标数据包还包括:目标序列号;结合图11,如图14所示,该方法还包括下述步骤806至步骤810。In some embodiments of the present application, the target media data is video data, and the target data packet further includes: a target serial number; referring to FIG. 11 , as shown in FIG. 14 , the method further includes the following steps 806 to 810.
806、显示设备判断接收到的目标序列号指示的采集顺序是否满足顺序条件。806. The display device judges whether the collection sequence indicated by the received target sequence number satisfies the sequence condition.
是则执行上述步骤802,否则执行下述步骤807。If yes, perform the above step 802, otherwise perform the following step 807.
其中,目标序列号用于指示目标源数据的采集顺序;顺序条件用于指示目标源数据和接收到的上一个源数据是智能设备连续采集的数据。Wherein, the target sequence number is used to indicate the collection sequence of the target source data; the sequence condition is used to indicate that the target source data and the last source data received are data continuously collected by the smart device.
807、显示设备向智能设备发送请求消息。807. The display device sends a request message to the smart device.
其中,请求消息用于请求将下一个待发送源数据以关键帧的形式进行编码处理并发送。Wherein, the request message is used to request to encode and send the next source data to be sent in the form of a key frame.
808、智能设备接收显示设备发送的请求消息。808. The smart device receives the request message sent by the display device.
809、智能设备基于请求消息,向显示设备发送下一个数据包。809. The smart device sends the next data packet to the display device based on the request message.
其中,下一个数据包中的媒体数据是对下一个待发送源数据以关键帧的形式进行编码处理得到的。Wherein, the media data in the next data packet is obtained by encoding the next source data to be sent in the form of a key frame.
810、显示设备接收智能设备发送的下一个数据包。810. The display device receives the next data packet sent by the smart device.
需要说明的是,显示设备接收下一个数据包以及处理的具体过程可以参考上述步骤802至步骤805的描述,此处不再赘述。It should be noted that, for the specific process of receiving and processing the next data packet by the display device, reference may be made to the description of the above step 802 to step 805, which will not be repeated here.
本申请实施例中,目标数据包中包括序列号,显示设备根据序列号确定在接收到当前数据包之前的数据包是否丢失,在有数据包丢失的情况下,显示设备向智能设备发送请求消息,请求将下一帧待发送的源数据以关键帧的形式编码并发送;在镜像投屏场景中出现丢包后,播放视频时会出现马赛克,影响用户体验,因此,智能设备将下一帧待发送源数据编码成关键帧形式,显示设备接收该关键帧,无需依赖其他帧数据,解码处理后即可得到一帧完整的待播放源数据,视频中不再出现马赛克,提升用户体验。In the embodiment of the present application, the target data packet includes a serial number, and the display device determines whether the data packet before receiving the current data packet is lost according to the serial number, and in the case of data packet loss, the display device sends a request message to the smart device , request to encode and send the source data of the next frame to be sent in the form of a key frame; after packet loss occurs in the mirror projection scene, mosaics will appear when playing the video, which will affect the user experience. Therefore, the smart device will send the next frame The source data to be sent is encoded into a key frame form, and the display device receives the key frame without relying on other frame data. After decoding, a complete frame of source data to be played can be obtained, and mosaics will no longer appear in the video, improving user experience.
本发明实施例提供还提供了一种计算机可读存储介质,该计算机可读存储介质上存储计算机程序,该计算机程序被处理器执行时实现上述数据处理方法执行的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process performed by the above-mentioned data processing method can be achieved, and the same Technical effects, in order to avoid repetition, will not be repeated here.
其中,该计算机可读存储介质可以为只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the computer-readable storage medium may be a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
本发明提供一种计算机程序产品,包括:当所述计算机程序产品在计算机上运行时,使得所述计算机实现上述的数据处理方法。The present invention provides a computer program product, including: when the computer program product is run on a computer, the computer is enabled to implement the above data processing method.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit it; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present application. scope.
为了方便解释,已经结合具体的实施方式进行了上述说明。但是,上述示例性的讨论不是意图穷尽或者将实施方式限定到上述公开的具体形式。根据上述的教导,可以得到多种修改和变形。上述实施方式的选择和描述是为了更好的解释原理以及实际的应用,从而使得本领域技术人员更好的使用所述实施方式以及适于具体使用考虑的各种不同的变形的实施方式。For convenience of explanation, the above description has been made in conjunction with specific implementation manners. However, the above exemplary discussion is not intended to be exhaustive or to limit the implementations to the precise forms disclosed above. Many modifications and variations are possible in light of the above teachings. The selection and description of the above embodiments are to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various modified embodiments suitable for specific use considerations.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210768740.4A CN115278323A (en) | 2022-06-30 | 2022-06-30 | Display device, intelligent device and data processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210768740.4A CN115278323A (en) | 2022-06-30 | 2022-06-30 | Display device, intelligent device and data processing method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN115278323A true CN115278323A (en) | 2022-11-01 |
Family
ID=83763660
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210768740.4A Pending CN115278323A (en) | 2022-06-30 | 2022-06-30 | Display device, intelligent device and data processing method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115278323A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115942000A (en) * | 2022-11-08 | 2023-04-07 | 北京力控元通科技有限公司 | Video stream transcoding method, device, equipment and medium based on H.264 format |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1972408A (en) * | 2006-11-30 | 2007-05-30 | 中兴通讯股份有限公司 | A data transmission method for mobile multimedia broadcasting system |
| CN101110961A (en) * | 2007-08-03 | 2008-01-23 | 北京创毅视讯科技有限公司 | Multimedia broadcast data transmission method, device and system |
| CN101330348A (en) * | 2007-06-19 | 2008-12-24 | 中兴通讯股份有限公司 | Data encapsulation device and method |
| US20090327510A1 (en) * | 2003-02-13 | 2009-12-31 | Adobe Systems Incorporated | Real-Time Priority-Based Media Communication |
| CN102595199A (en) * | 2011-01-11 | 2012-07-18 | 中兴通讯股份有限公司 | Streaming media packet packaging and transmitting method, and streaming media processing device |
| CN114286165A (en) * | 2020-12-21 | 2022-04-05 | 海信视像科技股份有限公司 | Display device, mobile terminal and screen projection data transmission method |
-
2022
- 2022-06-30 CN CN202210768740.4A patent/CN115278323A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090327510A1 (en) * | 2003-02-13 | 2009-12-31 | Adobe Systems Incorporated | Real-Time Priority-Based Media Communication |
| CN1972408A (en) * | 2006-11-30 | 2007-05-30 | 中兴通讯股份有限公司 | A data transmission method for mobile multimedia broadcasting system |
| CN101330348A (en) * | 2007-06-19 | 2008-12-24 | 中兴通讯股份有限公司 | Data encapsulation device and method |
| CN101110961A (en) * | 2007-08-03 | 2008-01-23 | 北京创毅视讯科技有限公司 | Multimedia broadcast data transmission method, device and system |
| CN102595199A (en) * | 2011-01-11 | 2012-07-18 | 中兴通讯股份有限公司 | Streaming media packet packaging and transmitting method, and streaming media processing device |
| CN114286165A (en) * | 2020-12-21 | 2022-04-05 | 海信视像科技股份有限公司 | Display device, mobile terminal and screen projection data transmission method |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115942000A (en) * | 2022-11-08 | 2023-04-07 | 北京力控元通科技有限公司 | Video stream transcoding method, device, equipment and medium based on H.264 format |
| CN115942000B (en) * | 2022-11-08 | 2023-11-21 | 北京力控元通科技有限公司 | H.264 format video stream transcoding method, device, equipment and medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9300754B2 (en) | Information processing system, information processing apparatus, information processing method, and program | |
| WO2015176648A1 (en) | Method and device for transmitting data in intelligent terminal to television terminal | |
| CN114666516A (en) | Display device and streaming media file synthesis method | |
| CN116915350A (en) | display screen | |
| CN115278332B (en) | A display device, a playback device and a data transmission method | |
| CN115278323A (en) | Display device, intelligent device and data processing method | |
| US20250210066A1 (en) | Audio processing method and electronic device | |
| CN115866304A (en) | Display device and screen projection data display method | |
| CN115119030B (en) | A subtitle processing method and device | |
| CN114339349A (en) | Display device, data transmission method and storage medium | |
| WO2022116600A1 (en) | Display device | |
| US20190028522A1 (en) | Transmission of subtitle data for wireless display | |
| CN115150648A (en) | Display device and message transmission method | |
| CN115022688A (en) | Display device and media data relay method | |
| CN116506669A (en) | Method and device for displaying multiple streams through picture-in-picture and electronic equipment | |
| CN115623275A (en) | Subtitle display method and display equipment | |
| CN115604238A (en) | Audio and video processing method, device, equipment and medium of Internet of things operating system | |
| CN114501677A (en) | Mirror image screen projection method, display device and mobile terminal | |
| CN115134644B (en) | Live broadcast data processing method and device | |
| CN114449322A (en) | Display device and image drawing method | |
| CN116156238B (en) | Display device, video playback method and apparatus | |
| CN113038221B (en) | Double-channel video playing method and display equipment | |
| CN113852848B (en) | Virtual remote controller control method, display device and terminal device | |
| WO2025123762A1 (en) | Display device and device control method | |
| CN116744051A (en) | Display device and subtitle generation method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20221101 |