WO2023273772A1 - Data processing method, cloud server, terminal and storage medium - Google Patents

Data processing method, cloud server, terminal and storage medium Download PDF

Info

Publication number
WO2023273772A1
WO2023273772A1 PCT/CN2022/096288 CN2022096288W WO2023273772A1 WO 2023273772 A1 WO2023273772 A1 WO 2023273772A1 CN 2022096288 W CN2022096288 W CN 2022096288W WO 2023273772 A1 WO2023273772 A1 WO 2023273772A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
decoding
terminal
stream
target
Prior art date
Application number
PCT/CN2022/096288
Other languages
French (fr)
Chinese (zh)
Inventor
杨洋
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2023273772A1 publication Critical patent/WO2023273772A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/44Processing 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/44Processing 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/4402Processing 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand

Definitions

  • the present application relates to but not limited to the technical field of data processing, and in particular relates to a data processing method, a cloud server, a terminal, and a storage medium.
  • a common practice is to transmit information such as the video playback address to the cloud terminal, and the cloud terminal obtains the video according to the video playback address and plays it, so that the resource-intensive operations are delegated to the cloud terminal for local execution.
  • This reduces the burden on the virtual machine different video application interfaces are different, and application developers may also perform secondary development on the player. Therefore, it is necessary to carry out integrated development of video applications on cloud terminals, and there are many video applications. In the case of , the development is very difficult.
  • Embodiments of the present application provide a data processing method, a cloud server, a terminal, and a storage medium.
  • the embodiment of the present application provides a data processing method, which is applied to a cloud server, and the cloud server communicates with a terminal.
  • the data processing method includes: acquiring a video playback request sent by the terminal, and playing Requesting to obtain the target video; demultiplexing the target video to obtain a video stream to be processed; determining decoding parameters for the video stream to be processed, and sending the decoding parameters to the terminal, so that the terminal can obtain the video stream according to the Decoding parameters to obtain a target decoding object; forwarding the video stream to be processed to the terminal, so that the terminal decodes the video stream to be processed through the target decoding object to obtain a target video, and plays the target video.
  • the embodiment of the present application provides a data processing method, which is applied to a terminal, and the terminal communicates with a cloud server, and the data processing method includes: sending a video playback request to the cloud server, so that the The cloud server obtains the target video according to the video playback request; obtains the decoding parameters sent by the cloud server, obtains the target decoding object according to the decoding parameters, and the decoding parameters are determined by the cloud server according to the video stream to be processed; Acquiring the video stream to be processed sent by the cloud server, the video stream to be processed is obtained by the cloud server by demultiplexing the target video; decoding the video stream to be processed by the target decoding object to obtain the target video , and play the target video.
  • an embodiment of the present application provides a cloud server, including: a memory, a processor, and a computer program stored on the memory and operable on the processor, when the processor executes the computer program, the following On the one hand, the data processing method described in any one of the embodiments
  • an embodiment of the present application provides a terminal, including: a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor executes the computer program to implement the second The data processing method described in any one embodiment of the aspect.
  • the embodiments of the present application further provide a storage medium storing computer-executable instructions configured to execute the data processing method described in any one of the embodiments of the first aspect, or Execute the data processing method described in the embodiment of the second aspect.
  • Fig. 1 is a flow chart of steps of a data processing method provided by an embodiment of the present application
  • FIG. 2 is a flow chart of steps for determining decoding parameters for a video stream to be processed provided by another embodiment of the present application;
  • FIG. 3 is a flow chart of steps for sending desktop streams provided by another embodiment of the present application.
  • FIG. 4 is a flow chart of steps for generating a desktop stream provided by another embodiment of the present application.
  • Fig. 5 is a flow chart of steps for obtaining preset color blocks provided by another embodiment of the present application.
  • FIG. 6 is a flow chart of steps of a data processing method provided in another embodiment of the present application.
  • FIG. 7 is a flow chart of steps for obtaining a target decoding object provided by another embodiment of the present application.
  • FIG. 8 is a flow chart of steps for obtaining desktop streams provided by another embodiment of the present application.
  • Fig. 9 is a flow chart of the steps of obtaining the target video provided by another embodiment of the present application.
  • FIG. 10 is a schematic diagram of modules of a cloud server and a terminal provided in another embodiment of the present application.
  • Fig. 11 is a flow chart of video playback provided by another embodiment of the present application.
  • Fig. 12 is a flowchart of a data processing method provided by another embodiment of the present application.
  • Fig. 13 is a schematic diagram of a cloud server provided by another embodiment of the present application.
  • Fig. 14 is a schematic diagram of a terminal provided by another embodiment of the present application.
  • the present application provides a data processing method, a cloud server, a terminal, and a storage medium, wherein the data processing method is applied to the cloud server, and the cloud server communicates with the terminal.
  • the data processing method includes: obtaining a video playback request sent by the terminal, and according to the Play the request to obtain the target video; demultiplex the target video to obtain the video stream to be processed; determine the decoding parameters for the video stream to be processed, and send the decoding parameters to the terminal so that the terminal can obtain the target decoding object according to the decoding parameters; convert the video stream to be processed The stream is forwarded to the terminal, so that the terminal decodes the video stream to be processed through the target decoding object to obtain the target video, and plays the target video.
  • it is possible to effectively reduce the limitation of playing video on the cloud terminal and reduce the resource consumption of the virtual machine.
  • FIG. 1 is a flow chart of the steps of a data processing method provided by an embodiment of the present application.
  • the data processing method is applied to a cloud server.
  • the data processing method includes but is not limited to the following steps S110 to S140.
  • Step S110 acquire the video play request sent by the terminal, and acquire the target video according to the video play request.
  • the cloud server when the cloud server receives the video playback request sent by the terminal, it obtains the target video according to the video playback request. It should be noted that the embodiment of the present application does not limit the specific content in the video playback request, which may include The address information of , will not be repeated here.
  • the target video may be video data stored locally on the cloud server, or video data that needs to be downloaded through the network, which will not be repeated here.
  • Step S120 demultiplexing the target video to obtain a video stream to be processed.
  • the target video obtained according to the video playback request can be video data downloaded through the network, and the target video needs to be demultiplexed to obtain the video stream to be processed.
  • the video stream to be processed can be an H264 code stream.
  • the specific content of processing the video stream is not limited. It can be understood that obtaining the video stream to be processed can provide a data basis for the terminal to play the target video.
  • Step S130 determine the decoding parameters for the video stream to be processed, and send the decoding parameters to the terminal, so that the terminal can obtain the target decoding object according to the decoding parameters.
  • the decoding parameters may include parameters for decoding the video stream to be processed, parameters for creating and configuring decoding objects, and it is only necessary for the terminal to obtain the target decoding object according to the decoding parameters, and there is no limitation here.
  • Step S140 forwarding the video stream to be processed to the terminal, so that the terminal decodes the video stream to be processed through the target decoding object to obtain the target video, and plays the target video.
  • the cloud server obtains the target video, demultiplexes the target video to obtain the video stream to be processed, and forwards the video stream to be processed to the terminal, so that the terminal can directly decode the video stream to be processed through the target decoding object to obtain the target video.
  • the technical solution of this application can effectively reduce the limitation of cloud-based terminals playing videos, and Reduce resource consumption of cloud servers.
  • step S130 in the embodiment shown in FIG. 1 includes but not limited to the following steps S210 to S220 .
  • Step S210 create a reference decoding object according to the video stream to be processed, and determine decoding parameters according to the reference decoding object.
  • Step S220 sending the decoding parameters to the terminal, so that the terminal creates the same target decoding object as the reference decoding object, and configures the target decoding object through the decoding parameters.
  • the cloud server creates a reference decoding object based on the video stream to be processed, determines the decoding parameters according to the reference decoding object, and sends the decoding parameters to the terminal, so that the terminal creates the same target decoding object as the reference decoding object, and passes the decoding parameter Configure the target decoding object so that the terminal decodes and plays the target video through the target decoding object.
  • the data processing method further includes but not limited to the following step S310 .
  • Step S310 generate a desktop stream, and send the desktop stream to the terminal, so that the terminal decodes the desktop stream to obtain a desktop stream image, and the desktop stream image is used to synthesize a target video with the video image obtained by decoding the video stream to be processed.
  • the playback location of the target video is in the video display layer of the video application player, and the desktop stream can be advertisement pop-up windows, barrage data, and the user interface of the video application player that appear during video playback.
  • the application embodiments are not limited here.
  • the cloud server generates the desktop stream and sends the desktop stream to the terminal, enabling the terminal to decode the desktop stream to obtain the desktop stream image, and synthesize the target video according to the desktop stream image and the video image obtained by decoding the video stream to be processed.
  • step S310 in the embodiment shown in FIG. 3 includes but is not limited to the following steps S410 to S440 .
  • Step S410 acquiring a preset color block
  • Step S420 determine the playing area of the target video according to the reference decoding object
  • Step S430 deleting the image information corresponding to the playing area in the preset color block to obtain the background information
  • Step S440 acquiring desktop flow information, and obtaining desktop flow according to the desktop flow information and background information.
  • the preset color block is obtained, the playback area of the target video is determined according to the reference decoding object, the image information corresponding to the playback area is deleted in the preset color block, the background information is obtained, and the desktop stream information is obtained, according to The desktop stream information and background information are obtained from the desktop stream, which provides a data basis for the terminal to obtain the target video.
  • the embodiment of the present application does not limit the specific manner of obtaining the desktop stream according to the desktop stream information and the background information, and the desktop stream may be obtained by superimposing the desktop stream information and the background information.
  • step S410 in the embodiment shown in FIG. 4 includes but is not limited to the following step S510 .
  • Step S510 obtaining the preset color block from the feedback information obtained by the first interface, wherein the feedback information is obtained by polling the decoding data from the reference decoding object by the first interface.
  • the preset color block is obtained from the feedback information obtained by the first interface, wherein the feedback information is obtained by polling the decoding data from the reference decoding object by the first interface, so as to provide a data basis for generating the desktop stream.
  • the feedback information is obtained by polling the decoding data from the reference decoding object by the first interface, so as to provide a data basis for generating the desktop stream.
  • a Mediacodec class is created on the cloud server side, which is the reference decoding object, and the reference decoding object will be created at the same time
  • the parameters are sent to the terminal so that the terminal creates a Mediacodec class that is the same as the reference decoding object, that is, the target decoding object.
  • the Mediacodec class on the cloud server side has a dequeueOutputBuffer interface, which is used to forward the pending video stream obtained after demultiplexing to the terminal.
  • the terminal can decode the video stream to be processed through the target decoding object and play the target video.
  • the cloud server redirects the operation of decoding the video stream to be processed to the terminal through the dequeueOutputBuffer interface
  • the Mediacodec class on the cloud server also includes the dequeueOutputBuffer interface. That is, the first interface, when the first interface polls the Mediacodec class on the cloud server for decoding data, the decoding data is not obtained, and abnormal phenomena such as error reporting will occur, which will affect the terminal to play the target video.
  • a piece of black data can be pre-set, that is, a preset color block, as feedback information for the Mediacodec class on the cloud server side to poll the decoded data.
  • FIG. 6 is a flow chart of the steps of a data processing method provided by an embodiment of the present application.
  • the data processing method is applied to a terminal.
  • the data processing method includes but is not limited to the following steps S610 to S640.
  • Step S610 sending a video play request to the cloud server, so that the cloud server acquires the target video according to the video play request.
  • step S620 the decoding parameter sent by the cloud server is obtained, and the target decoding object is obtained according to the decoding parameter, and the decoding parameter is determined by the cloud server according to the video stream to be processed.
  • Step S630 acquire the video stream to be processed sent by the cloud server, and the video stream to be processed is obtained by the cloud server by demultiplexing the target video.
  • Step S640 decode the video stream to be processed through the target decoding object to obtain the target video, and play the target video.
  • step S620 in the embodiment shown in FIG. 6 includes but not limited to the following steps S710 to S720 .
  • Step S710 creating a target decoding object, where the target decoding object is the same as the reference decoding object created by the cloud server according to the video stream to be processed.
  • Step S720 configure the target decoding object according to the decoding parameter, wherein the decoding parameter is determined according to the reference decoding object.
  • the data processing method further includes, but is not limited to, the following step S810 .
  • Step S810 obtain the desktop stream sent by the cloud server, wherein the desktop stream is obtained by the cloud server according to the desktop stream information and background information, and the background information is deleted by the cloud server from the acquired preset color blocks corresponding to the playing area
  • the image information is obtained, and the playback area is determined by the cloud server based on the reference decoding object.
  • step S640 in the embodiment shown in FIG. 6 includes but is not limited to the following steps S910 to S930 .
  • step S910 the desktop stream image is obtained by decoding the desktop stream.
  • step S920 the video stream to be processed is decoded by the target decoding object to obtain a video image.
  • step S930 the target video is obtained by synthesizing the desktop stream image and the video image.
  • the background information in the desktop stream is obtained by the cloud server by deleting the image information corresponding to the playback area in the acquired preset color block, the playback area is the playback area of the video image, so the desktop stream image Combining with video images does not affect the normal display of video images.
  • FIG. 10 is a block diagram of a cloud server 1010 and a terminal 1040 provided in another embodiment of the present application.
  • the cloud server 1010 shown in FIG. 1010 includes a front-end server 1020 and a virtual machine 1030
  • the front-end server 1020 includes a video stream channel 1021 and a desktop stream channel 1022
  • the virtual machine 1030 includes a Vdagent interface 1031, a video application 1032, a video application player 1033, a cloud Mediacodec decoder 1034, and a surfaceflinger module 1035, a drm module 1036 and a qxl driver 1037
  • the terminal 1040 includes a video streaming player 1041, a desktop streaming player 1042 and a MediaCodec decoder 1043.
  • the video application 1032 is an application program installed in the cloud;
  • the video application player 1033 is a player used by the application program installed in the cloud;
  • the cloud Mediacodec decoder 1034 is an Android hardware decoding module;
  • the front-end server 1020 is used to realize data interaction with the terminal 1040 ;
  • the video stream player 1041, the desktop stream player 1042 and the MediaCodec decoder 1043 in the terminal 1040 are used for decoding, rendering, image synthesis, and image display of the desktop stream and video stream.
  • the main process of realizing the target video through the cloud server 1010 and the terminal 1040 is: the video application 1032 creates a player after receiving the video playback request from the terminal 1040; the video application player 1033 downloads and demultiplexes the target video source to obtain the video stream to be processed
  • the cloud server 1010 creates a cloud Mediacodec decoder 1034, and sends the video stream to be processed after the decoder setting parameters and demultiplexing to the terminal 1040 through the video stream channel 1021 of the Vdagent interface 1031 and the front-end server 1020, so that the terminal 1040 can decode according to Create a MediaCodec decoder 1043 of a terminal 1040 by setting parameters of the device, and decode the video stream to be processed to obtain a video image through the decoder 1043; the cloud server 1010 generates a desktop stream through the surfaceflinger module 1035 and the drm module 1036, and drives 1037 and the front end through the qxl
  • FIG. 11 is a flow chart of video playback provided by another embodiment of the present application.
  • the video playback process includes the following steps S1110 to S1180 .
  • Step S1110 the terminal starts the video application of the cloud server.
  • Step S1120 the cloud server starts the player to download the film source.
  • Step S1130 the player decapsulates the video stream.
  • Step S1140 the cloud server detects whether the terminal supports Mediacodec hard decoding.
  • step S1150 when the terminal does not support hard decoding, start a soft decoding process. It can be understood that the soft decoding process is well known to those skilled in the art, and will not be repeated here.
  • Step S1160 when the terminal supports hardware decoding, the cloud server creates a Mediacodec decoder.
  • Step S1170 sending the configuration parameters of the decoder and the decapsulated data to the terminal.
  • Step S1180 the terminal creates a Mediacodec decoder according to the configuration parameters, and decodes, renders and plays the decapsulated data.
  • this application does not limit the specific method for the cloud server to detect whether the terminal supports Mediacodec hard decoding. It can be determined by detecting whether the terminal calls the Mediacodec decoder abnormally. For example, the terminal calls the MediaCodec decoder normally to ensure that the terminal application recognizes The current MediaCodec decoder, confirm that the current terminal supports hard decoding.
  • FIG. 12 is a flowchart of a data processing method provided by another embodiment of the present application.
  • the data processing method includes the following steps S1201 to S1217.
  • step S1201 the cloud video application receives a video playback instruction from a terminal.
  • Step S1202 the cloud video application creates a video application player.
  • Step S1203 the video application player downloads the source corresponding to the video play command, and demultiplexes the source to obtain video stream data, which includes h264 stream.
  • step S1204 the video application player inquires whether the current terminal supports hard decoding.
  • Step S1205 when the terminal device supports hardware decoding, the video application player creates a MediaCodec decoder locally.
  • step S1206 the MediaCodec decoder notifies the terminal to also create a MediaCodec decoder.
  • Step S1207 the video application player uses the cloud MediaCodec to set the interface.
  • Step S1208 sending the setting parameters to the terminal through the interface.
  • Step S1209 the video application player sets code stream data to be decoded to the cloud MediaCodec.
  • Step S1210 the cloud MediaCodec sends the set code stream data to the terminal through the interface.
  • Step S1211 the decoder of the terminal decodes the code stream data and plays the movie source.
  • Step S1212 the video application player polls the cloud MediaCodec decoder for decoded data.
  • Step S1213 the corresponding interface returns to the video application player a piece of preset decoded data, that is, black screen data.
  • Step S1214 the video application player renders the decoded data, synthesizes the rendered decoded data and the image inside the current virtual machine into a desktop stream, and sends the desktop stream to the front-end server through the QXL driver.
  • Step S1215 the front-end server judges the image in the virtual machine, cuts out the part of the playing area, sets the black screen area as transparent, and obtains the desktop stream.
  • Step S1216 sending the processed desktop stream to the terminal.
  • step S1217 the terminal decodes and renders the desktop stream, and synthesizes the rendered desktop stream with the video stream image. Since the desktop stream is transparent to the background of the player area, the video playback can be displayed normally.
  • an embodiment of the present application also provides a cloud server 1300, which includes: a memory 1310, a processor 1320, and a computer program stored on the memory 1310 and operable on the processor 1320 .
  • the processor 1320 and the memory 1310 may be connected through a bus or in other ways.
  • the non-transitory software programs and instructions required to implement the data processing method of the above-mentioned embodiment are stored in the memory 1310, and when executed by the processor 1320, the data processing method applied to the cloud server 1300 in the above-mentioned embodiment is executed, for example, Carry out method step S110 to method step S140 in Fig. 1 described above, method step S210 to method step S220 in Fig. 2, method step S310 in Fig. 3, method step S410 to method step S440 in Fig. 4, Fig. 5 Step S510 in the method.
  • an embodiment of the present application also provides a terminal 1400 .
  • the terminal 1400 includes: a memory 1410 , a processor 1420 , and a computer program stored in the memory 1410 and operable on the processor 1420 .
  • the processor 1420 and the memory 1410 may be connected through a bus or in other ways.
  • the non-transitory software programs and instructions required to implement the data processing method of the above-mentioned embodiment are stored in the memory 1410, and when executed by the processor 1420, the data processing method applied to the terminal 1400 in the above-mentioned embodiment is executed, for example, executing The method step S610 to method step S640 in FIG. 6 , the method step S710 to method step S720 in FIG. 7 , the method step S810 in FIG. 8 , and the method step S910 to method step S930 in FIG. 9 described above.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • the embodiment of the present application includes a data processing method, a cloud server, a terminal, and a storage medium, wherein the data processing method is applied to the cloud server, and the cloud server is connected to the terminal through communication, and the data processing method includes: acquiring the video sent by the terminal A playback request, obtaining a target video according to the video playback request; demultiplexing the target video to obtain a video stream to be processed; determining decoding parameters for the video stream to be processed, and sending the decoding parameters to the terminal, making the terminal obtain a target decoding object according to the decoding parameters; forwarding the video stream to be processed to the terminal, so that the terminal decodes the video stream to be processed through the target decoding object to obtain a target video , and play the target video.
  • the data processing method includes: acquiring the video sent by the terminal A playback request, obtaining a target video according to the video playback request; demultiplexing the target video to obtain a video stream to be processed; determining decoding parameters for the video stream to be processed,
  • an embodiment of the present application also provides a storage medium, the readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor 1320 or a controller, for example, by the above-mentioned cloud server 1300 Execution by a processor 1320 in the embodiment may cause the processor 1320 to execute the data processing method applied to the cloud server 1300 in the above embodiment, for example, execute the method steps S110 to S140 in FIG. 1 described above, Method step S210 to method step S220 in FIG. 2 , method step S310 in FIG. 3 , method step S410 to method step S440 in FIG. 4 , method step S510 in FIG. 5 .
  • Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

A data processing method, a cloud server, a terminal and a storage medium. The data processing method is applied to a cloud server, and the cloud server is in communication connection with a terminal. The data processing method comprises: acquiring a video playing request sent by a terminal, and acquiring a target video according to the video playing request (S110); demultiplexing the target video to obtain a video stream to be processed (S120); determining a decoding parameter for said video stream, and sending the decoding parameter to the terminal, such that the terminal obtains a target decoding object according to the decoding parameter (S130); and forwarding said video stream to the terminal, such that the terminal decodes said video stream by means of the target decoding object, so as to obtain the target video, and plays the target video (S140).

Description

数据处理方法、云服务器、终端及存储介质Data processing method, cloud server, terminal and storage medium
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202110722681.2、申请日为2021年6月28日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with application number 202110722681.2 and a filing date of June 28, 2021, and claims the priority of this Chinese patent application. The entire content of this Chinese patent application is hereby incorporated by reference into this application.
技术领域technical field
本申请涉及但不限于数据处理技术领域,尤其涉及一种数据处理方法、云服务器、终端及存储介质。The present application relates to but not limited to the technical field of data processing, and in particular relates to a data processing method, a cloud server, a terminal, and a storage medium.
背景技术Background technique
随着大视频业务的发展日益成熟,为了让用户享受更丰富的增值业务,以及拥有更好的用户界面(User Interface,UI)体验,基于云计算与虚拟化技术的云化终端应运而生。播放视频是终端的重要功能之一,对于传统的云化终端,播放视频时的解码、渲染等操作由云服务器的虚拟机处理,占用较多的虚拟机资源,如何降低播放视频时的虚拟机负荷,是提高云服务器负载能力的关键。With the development of big video services becoming more and more mature, in order to allow users to enjoy richer value-added services and have a better user interface (User Interface, UI) experience, cloud terminals based on cloud computing and virtualization technology have emerged as the times require. Playing video is one of the important functions of the terminal. For traditional cloud-based terminals, operations such as decoding and rendering during video playback are handled by the virtual machine of the cloud server, which takes up more virtual machine resources. How to reduce the virtual machine load when playing video? Load is the key to improving the load capacity of cloud servers.
常见的做法是将视频播放地址等信息传输至云化终端,云化终端根据视频播放地址获取视频并进行播放,从而将资源耗费较大的操作下放到云化终端本地执行。这虽然减少了虚拟机的负担,但是不同的视频应用接口不同,应用开发商也可能对播放器进行二次开发,因此,需要对云化终端进行视频应用的集成开发,在视频应用数量较多的情况下,开发难度非常大。A common practice is to transmit information such as the video playback address to the cloud terminal, and the cloud terminal obtains the video according to the video playback address and plays it, so that the resource-intensive operations are delegated to the cloud terminal for local execution. Although this reduces the burden on the virtual machine, different video application interfaces are different, and application developers may also perform secondary development on the player. Therefore, it is necessary to carry out integrated development of video applications on cloud terminals, and there are many video applications. In the case of , the development is very difficult.
发明内容Contents of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics described in detail in this article. This summary is not intended to limit the scope of the claims.
本申请实施例提供了一种数据处理方法、云服务器、终端及存储介质。Embodiments of the present application provide a data processing method, a cloud server, a terminal, and a storage medium.
第一方面,本申请实施例提供了一种数据处理方法,应用于云服务器,所述云服务器与终端通信连接,所述数据处理方法包括:获取终端发送的视频播放请求,根据所述视频播放请求获取目标视频;解复用所述目标视频,得到待处理视频流;确定针对所述待处理视频流的解码参数,将所述解码参数发送至所述终端,以使所述终端根据所述解码参数得到目标解码对象;将所述待处理视频流转发至所述终端,以使所述终端通过所述目标解码对象解码所述待处理视频流以得到目标视频,并播放所述目标视频。In the first aspect, the embodiment of the present application provides a data processing method, which is applied to a cloud server, and the cloud server communicates with a terminal. The data processing method includes: acquiring a video playback request sent by the terminal, and playing Requesting to obtain the target video; demultiplexing the target video to obtain a video stream to be processed; determining decoding parameters for the video stream to be processed, and sending the decoding parameters to the terminal, so that the terminal can obtain the video stream according to the Decoding parameters to obtain a target decoding object; forwarding the video stream to be processed to the terminal, so that the terminal decodes the video stream to be processed through the target decoding object to obtain a target video, and plays the target video.
第二方面,本申请实施例提供了一种数据处理方法,应用于终端,所述终端与云服务器通信连接,所述数据处理方法包括:向所述云服务器发送视频播放请求,以使所述云服务器根据所述视频播放请求获取目标视频;获取所述云服务器发送的解码参数,根据所述解码参数得到目标解码对象,所述解码参数由所述云服务器根据所述待处理视频流确定;获取所述云服务器发送的待处理视频流,所述待处理视频流由所述云服务器通过解复用所述目标视频得到;通过所述目标解码对象解码所述待处理视频流以得到目标视频,并播放所述目标视频。In the second aspect, the embodiment of the present application provides a data processing method, which is applied to a terminal, and the terminal communicates with a cloud server, and the data processing method includes: sending a video playback request to the cloud server, so that the The cloud server obtains the target video according to the video playback request; obtains the decoding parameters sent by the cloud server, obtains the target decoding object according to the decoding parameters, and the decoding parameters are determined by the cloud server according to the video stream to be processed; Acquiring the video stream to be processed sent by the cloud server, the video stream to be processed is obtained by the cloud server by demultiplexing the target video; decoding the video stream to be processed by the target decoding object to obtain the target video , and play the target video.
第三方面,本申请实施例提供了一种云服务器,包括:存储器、处理器及存储在存储器 上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第一方面任意一项实施例所述的数据处理方法In a third aspect, an embodiment of the present application provides a cloud server, including: a memory, a processor, and a computer program stored on the memory and operable on the processor, when the processor executes the computer program, the following On the one hand, the data processing method described in any one of the embodiments
第四方面,本申请实施例提供了一种终端,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第二方面任意一项实施例所述的数据处理方法。In a fourth aspect, an embodiment of the present application provides a terminal, including: a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor executes the computer program to implement the second The data processing method described in any one embodiment of the aspect.
第五方面,本申请实施例还提供了一种存储介质,存储有计算机可执行指令,所述计算机可执行指令被设置为执行如第一方面任意一项实施例所述的数据处理方法,或执行如第二方面实施例所述的数据处理方法。In the fifth aspect, the embodiments of the present application further provide a storage medium storing computer-executable instructions configured to execute the data processing method described in any one of the embodiments of the first aspect, or Execute the data processing method described in the embodiment of the second aspect.
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the application will be set forth in the description which follows, and, in part, will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
附图说明Description of drawings
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solution of the present application, and constitute a part of the specification, and are used together with the embodiments of the present application to explain the technical solution of the present application, and do not constitute a limitation to the technical solution of the present application.
图1是本申请一个实施例提供的数据处理方法的步骤流程图;Fig. 1 is a flow chart of steps of a data processing method provided by an embodiment of the present application;
图2是本申请另一个实施例提供的确定针对待处理视频流的解码参数的步骤流程图;FIG. 2 is a flow chart of steps for determining decoding parameters for a video stream to be processed provided by another embodiment of the present application;
图3是本申请另一个实施例提供的发送桌面流的步骤流程图;FIG. 3 is a flow chart of steps for sending desktop streams provided by another embodiment of the present application;
图4是本申请另一个实施例提供的生成桌面流的步骤流程图;FIG. 4 is a flow chart of steps for generating a desktop stream provided by another embodiment of the present application;
图5是本申请另一个实施例提供的获取预置颜色块的步骤流程图;Fig. 5 is a flow chart of steps for obtaining preset color blocks provided by another embodiment of the present application;
图6是本申请另一个实施例提供的数据处理方法的步骤流程图;FIG. 6 is a flow chart of steps of a data processing method provided in another embodiment of the present application;
图7是本申请另一个实施例提供的获取目标解码对象的步骤流程图;FIG. 7 is a flow chart of steps for obtaining a target decoding object provided by another embodiment of the present application;
图8是本申请另一个实施例提供的获取桌面流的步骤流程图;FIG. 8 is a flow chart of steps for obtaining desktop streams provided by another embodiment of the present application;
图9是本申请另一个实施例提供的得到目标视频的步骤流程图;Fig. 9 is a flow chart of the steps of obtaining the target video provided by another embodiment of the present application;
图10是本申请另一个实施例提供的云服务器和终端的模块示意图;FIG. 10 is a schematic diagram of modules of a cloud server and a terminal provided in another embodiment of the present application;
图11是本申请另一个实施例提供的视频播放的流程图;Fig. 11 is a flow chart of video playback provided by another embodiment of the present application;
图12是本申请另一个实施例提供的数据处理方法的流程图;Fig. 12 is a flowchart of a data processing method provided by another embodiment of the present application;
图13是本申请另一个实施例提供的云服务器的示意图;Fig. 13 is a schematic diagram of a cloud server provided by another embodiment of the present application;
图14是本申请另一个实施例提供的终端的示意图。Fig. 14 is a schematic diagram of a terminal provided by another embodiment of the present application.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, not to limit the present application.
需要说明的是,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置中的模块划分,或流程图中的顺序执行所示出或描述的步骤。说明书、权利要求书或上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that although the functional modules are divided in the schematic diagram of the device, and the logical sequence is shown in the flowchart, in some cases, it can be executed in a different order than the module division in the device or the flowchart in the flowchart. steps shown or described. The terms "first", "second" and the like in the specification, claims or the above drawings are used to distinguish similar objects, and not necessarily used to describe a specific order or sequence.
本申请提供了一种数据处理方法、云服务器、终端及存储介质,其中,数据处理方法应 用于云服务器,云服务器与终端通信连接,数据处理方法包括:获取终端发送的视频播放请求,根据视频播放请求获取目标视频;解复用目标视频,得到待处理视频流;确定针对待处理视频流的解码参数,将解码参数发送至终端,以使终端根据解码参数得到目标解码对象;将待处理视频流转发至终端,以使终端通过目标解码对象解码待处理视频流以得到目标视频,并播放目标视频。根据本申请实施例提供的方案,能够有效减少云化终端播放视频的限制,降低虚拟机的资源消耗。The present application provides a data processing method, a cloud server, a terminal, and a storage medium, wherein the data processing method is applied to the cloud server, and the cloud server communicates with the terminal. The data processing method includes: obtaining a video playback request sent by the terminal, and according to the Play the request to obtain the target video; demultiplex the target video to obtain the video stream to be processed; determine the decoding parameters for the video stream to be processed, and send the decoding parameters to the terminal so that the terminal can obtain the target decoding object according to the decoding parameters; convert the video stream to be processed The stream is forwarded to the terminal, so that the terminal decodes the video stream to be processed through the target decoding object to obtain the target video, and plays the target video. According to the solution provided by the embodiment of the present application, it is possible to effectively reduce the limitation of playing video on the cloud terminal and reduce the resource consumption of the virtual machine.
下面结合附图,对本申请实施例作进一步阐述。The embodiments of the present application will be further described below in conjunction with the accompanying drawings.
如图1所示,图1是本申请一个实施例提供的数据处理方法的步骤流程图,该数据处理方法应用于云服务器,该数据处理方法包括但不限于有以下步骤S110至步骤S140。As shown in FIG. 1 , FIG. 1 is a flow chart of the steps of a data processing method provided by an embodiment of the present application. The data processing method is applied to a cloud server. The data processing method includes but is not limited to the following steps S110 to S140.
步骤S110,获取终端发送的视频播放请求,根据视频播放请求获取目标视频。Step S110, acquire the video play request sent by the terminal, and acquire the target video according to the video play request.
可以理解的是,当云服务器接收到终端发送的视频播放请求,根据视频播放请求获取目标视频,需要说明的是,本申请实施例并不限制视频播放请求中的具体内容,可以是包括目标视频的地址信息,在此不再赘述。It can be understood that when the cloud server receives the video playback request sent by the terminal, it obtains the target video according to the video playback request. It should be noted that the embodiment of the present application does not limit the specific content in the video playback request, which may include The address information of , will not be repeated here.
需要说明的是,本申请实施例并不限制目标视频的存储位置,目标视频可以是存放于云服务器本地的视频数据,还可以是需要通过网络下载的视频数据,在此不再赘述。It should be noted that the embodiment of the present application does not limit the storage location of the target video. The target video may be video data stored locally on the cloud server, or video data that needs to be downloaded through the network, which will not be repeated here.
步骤S120,解复用目标视频,得到待处理视频流。Step S120, demultiplexing the target video to obtain a video stream to be processed.
可以理解的是,根据视频播放请求获得的目标视频可以是通过网络下载的视频数据,需要解复用目标视频,得到待处理视频流,待处理视频流可以是H264码流,本申请实施例对待处理视频流的具体内容不多做限制,可以理解的是,获取待处理视频流能够为终端播放目标视频提供数据基础。It can be understood that the target video obtained according to the video playback request can be video data downloaded through the network, and the target video needs to be demultiplexed to obtain the video stream to be processed. The video stream to be processed can be an H264 code stream. The specific content of processing the video stream is not limited. It can be understood that obtaining the video stream to be processed can provide a data basis for the terminal to play the target video.
步骤S130,确定针对待处理视频流的解码参数,将解码参数发送至终端,以使终端根据解码参数得到目标解码对象。Step S130, determine the decoding parameters for the video stream to be processed, and send the decoding parameters to the terminal, so that the terminal can obtain the target decoding object according to the decoding parameters.
可以理解的是,由于待处理视频流具有多种不同的数据类型,本领域技术人员有动机根据不同类型的待处理视频流确定不同的解码参数,因此本申请实施例并不对解码参数的具体数据类型做限制。It can be understood that since the video streams to be processed have many different data types, those skilled in the art have the motivation to determine different decoding parameters according to different types of video streams to be processed, so the embodiment of the present application does not specify the specific data of the decoding parameters Types are restricted.
需要说明的是,解码参数可以包括用于解码待处理视频流的参数、用于创建和配置解码对象的参数,能够使得终端根据解码参数得到目标解码对象即可,在此不多做限制。It should be noted that the decoding parameters may include parameters for decoding the video stream to be processed, parameters for creating and configuring decoding objects, and it is only necessary for the terminal to obtain the target decoding object according to the decoding parameters, and there is no limitation here.
步骤S140,将待处理视频流转发至终端,以使终端通过目标解码对象解码待处理视频流以得到目标视频,并播放目标视频。Step S140, forwarding the video stream to be processed to the terminal, so that the terminal decodes the video stream to be processed through the target decoding object to obtain the target video, and plays the target video.
可以理解的是,云服务器获取目标视频,并解复用目标视频得到待处理视频流,将待处理视频流转发至终端,使得终端能够直接通过目标解码对象解码待处理视频流以得到目标视频,相较于在终端开发不同的接口,用于匹配不同的视频应用,并根据视频播放地址等信息获取目标视频并播放的方式,本申请的技术方案能够有效减少云化终端播放视频的限制,并降低云服务器的资源消耗。It can be understood that the cloud server obtains the target video, demultiplexes the target video to obtain the video stream to be processed, and forwards the video stream to be processed to the terminal, so that the terminal can directly decode the video stream to be processed through the target decoding object to obtain the target video. Compared with the method of developing different interfaces on the terminal to match different video applications, and obtaining and playing the target video according to information such as the video playback address, the technical solution of this application can effectively reduce the limitation of cloud-based terminals playing videos, and Reduce resource consumption of cloud servers.
另外,参照图2,在一实施例中,图1所示实施例中的步骤S130包括但不限于有以下步骤S210至步骤S220。In addition, referring to FIG. 2 , in one embodiment, step S130 in the embodiment shown in FIG. 1 includes but not limited to the following steps S210 to S220 .
步骤S210,根据待处理视频流创建参考解码对象,根据参考解码对象确定解码参数。Step S210, create a reference decoding object according to the video stream to be processed, and determine decoding parameters according to the reference decoding object.
步骤S220,将解码参数发送至终端,以使终端创建与参考解码对象相同的目标解码对象,并通过解码参数配置目标解码对象。Step S220, sending the decoding parameters to the terminal, so that the terminal creates the same target decoding object as the reference decoding object, and configures the target decoding object through the decoding parameters.
可以理解的是,云服务器根据待处理视频流创建参考解码对象,并根据参考解码对象确定解码参数,将解码参数发送至终端,使得终端创建与参考解码对象相同的目标解码对象,并通过解码参数配置目标解码对象,使得终端通过目标解码对象解码并播放目标视频。It can be understood that the cloud server creates a reference decoding object based on the video stream to be processed, determines the decoding parameters according to the reference decoding object, and sends the decoding parameters to the terminal, so that the terminal creates the same target decoding object as the reference decoding object, and passes the decoding parameter Configure the target decoding object so that the terminal decodes and plays the target video through the target decoding object.
另外,参照图3,在一实施例中,在图1所示实施例中的步骤S140之后,数据处理方法还包括但不限于有以下步骤S310。In addition, referring to FIG. 3 , in one embodiment, after step S140 in the embodiment shown in FIG. 1 , the data processing method further includes but not limited to the following step S310 .
步骤S310,生成桌面流,将桌面流发送至终端,以使终端解码桌面流以得到桌面流图像,桌面流图像用于与解码待处理视频流得到的视频图像合成目标视频。Step S310, generate a desktop stream, and send the desktop stream to the terminal, so that the terminal decodes the desktop stream to obtain a desktop stream image, and the desktop stream image is used to synthesize a target video with the video image obtained by decoding the video stream to be processed.
可以理解的是,目标视频的播放位置在视频应用播放器中的视频展示层,桌面流可以是在视频播放过程中出现的广告弹窗、弹幕数据以及视频应用播放器的用户操作界面,本申请实施例在此不多作限制。It can be understood that the playback location of the target video is in the video display layer of the video application player, and the desktop stream can be advertisement pop-up windows, barrage data, and the user interface of the video application player that appear during video playback. The application embodiments are not limited here.
可以理解的是,云服务器生成桌面流,将桌面流发送至终端,能够使得终端解码桌面流以得到桌面流图像,并根据桌面流图像与解码待处理视频流得到的视频图像合成目标视频。It can be understood that the cloud server generates the desktop stream and sends the desktop stream to the terminal, enabling the terminal to decode the desktop stream to obtain the desktop stream image, and synthesize the target video according to the desktop stream image and the video image obtained by decoding the video stream to be processed.
另外,参照图4,在一实施例中,图3所示实施例中的步骤S310包括但不限于有以下步骤S410至步骤S440。In addition, referring to FIG. 4 , in one embodiment, step S310 in the embodiment shown in FIG. 3 includes but is not limited to the following steps S410 to S440 .
步骤S410,获取预设颜色块;Step S410, acquiring a preset color block;
步骤S420,根据参考解码对象确定目标视频的播放区域;Step S420, determine the playing area of the target video according to the reference decoding object;
步骤S430,在预设颜色块中删除与播放区域所对应的位置的图像信息,得到背景信息;Step S430, deleting the image information corresponding to the playing area in the preset color block to obtain the background information;
步骤S440,获取桌面流信息,根据桌面流信息和背景信息得到桌面流。Step S440, acquiring desktop flow information, and obtaining desktop flow according to the desktop flow information and background information.
可以理解的是,获取预设颜色块,根据参考解码对象确定目标视频的播放区域,在预设颜色块中删除与播放区域所对应的位置的图像信息,得到背景信息,获取桌面流信息,根据桌面流信息和背景信息得到桌面流,为终端获得目标视频提供数据基础。It can be understood that the preset color block is obtained, the playback area of the target video is determined according to the reference decoding object, the image information corresponding to the playback area is deleted in the preset color block, the background information is obtained, and the desktop stream information is obtained, according to The desktop stream information and background information are obtained from the desktop stream, which provides a data basis for the terminal to obtain the target video.
可以理解的是,本申请实施例并不限制根据桌面流信息和背景信息得到桌面流的具体方式,可以是将桌面流信息与背景信息进行叠加得到桌面流。It can be understood that the embodiment of the present application does not limit the specific manner of obtaining the desktop stream according to the desktop stream information and the background information, and the desktop stream may be obtained by superimposing the desktop stream information and the background information.
需要说明的是,本申请实施例并不限制预设颜色块的具体颜色、大小参数,本领域技术人员有动机根据目标视频的播放区域参数进行选取,在此不多做赘述。It should be noted that the embodiment of the present application does not limit the specific color and size parameters of the preset color blocks, and those skilled in the art are motivated to select them according to the playing area parameters of the target video, and details are not repeated here.
另外,参照图5,在一实施例中,图4所示实施例中的步骤S410包括但不限于有以下步骤S510。In addition, referring to FIG. 5 , in an embodiment, step S410 in the embodiment shown in FIG. 4 includes but is not limited to the following step S510 .
步骤S510,从第一接口得到的反馈信息中获取预置颜色块,其中,反馈信息为第一接口向参考解码对象轮询解码数据得到。Step S510, obtaining the preset color block from the feedback information obtained by the first interface, wherein the feedback information is obtained by polling the decoding data from the reference decoding object by the first interface.
可以理解的是,从第一接口得到的反馈信息中获取预置颜色块,其中,反馈信息为第一接口向参考解码对象轮询解码数据得到,从而为生成桌面流提供数据基础。为了对获得预置颜色块进行更详细的说明,以下通过一个示例进行说明,例如,对于安卓系统的云服务器,在云服务器端创建一个Mediacodec类,即参考解码对象,同时将创建参考解码对象的参数发送给终端,以使终端建立一个与参考解码对象相同的Mediacodec类,即目标解码对象,云服务器端的Mediacodec类具有dequeueOutputBuffer接口,用于将解复用后得到的待处理视频流转发至终端,以使终端通过目标解码对象对待处理视频流进行解码并播放目标视频,虽然云服务器端通过dequeueOutputBuffer接口将解码待处理视频流的操作重定向至终端,但是云服务器端的Mediacodec类中还包括dequeueOutputBuffer接口,即第一接口,在第一接口向云服务器端的Mediacodec类轮询解码数据的情况下没有获取到解码数据,会出现 报错等异常现象,从而对终端播放目标视频造成影响,为了保证播放目标视频不出现异常,可以预先设置一段黑色数据,即预置颜色块,作为云服务器端的Mediacodec类轮询解码数据的反馈信息。It can be understood that the preset color block is obtained from the feedback information obtained by the first interface, wherein the feedback information is obtained by polling the decoding data from the reference decoding object by the first interface, so as to provide a data basis for generating the desktop stream. In order to explain in more detail how to obtain preset color blocks, an example is used below to illustrate, for example, for the cloud server of the Android system, a Mediacodec class is created on the cloud server side, which is the reference decoding object, and the reference decoding object will be created at the same time The parameters are sent to the terminal so that the terminal creates a Mediacodec class that is the same as the reference decoding object, that is, the target decoding object. The Mediacodec class on the cloud server side has a dequeueOutputBuffer interface, which is used to forward the pending video stream obtained after demultiplexing to the terminal. The terminal can decode the video stream to be processed through the target decoding object and play the target video. Although the cloud server redirects the operation of decoding the video stream to be processed to the terminal through the dequeueOutputBuffer interface, the Mediacodec class on the cloud server also includes the dequeueOutputBuffer interface. That is, the first interface, when the first interface polls the Mediacodec class on the cloud server for decoding data, the decoding data is not obtained, and abnormal phenomena such as error reporting will occur, which will affect the terminal to play the target video. In order to ensure that the target video is not played If an exception occurs, a piece of black data can be pre-set, that is, a preset color block, as feedback information for the Mediacodec class on the cloud server side to poll the decoded data.
如图6所示,图6是本申请一个实施例提供的数据处理方法的步骤流程图,该数据处理方法应用于终端,该数据处理方法包括但不限于有以下步骤S610至步骤S640。As shown in FIG. 6 , FIG. 6 is a flow chart of the steps of a data processing method provided by an embodiment of the present application. The data processing method is applied to a terminal. The data processing method includes but is not limited to the following steps S610 to S640.
步骤S610,向云服务器发送视频播放请求,以使云服务器根据视频播放请求获取目标视频。Step S610, sending a video play request to the cloud server, so that the cloud server acquires the target video according to the video play request.
步骤S620,获取云服务器发送的解码参数,根据解码参数得到目标解码对象,解码参数由云服务器根据待处理视频流确定。In step S620, the decoding parameter sent by the cloud server is obtained, and the target decoding object is obtained according to the decoding parameter, and the decoding parameter is determined by the cloud server according to the video stream to be processed.
步骤S630,获取云服务器发送的待处理视频流,待处理视频流由云服务器通过解复用目标视频得到。Step S630, acquire the video stream to be processed sent by the cloud server, and the video stream to be processed is obtained by the cloud server by demultiplexing the target video.
步骤S640,通过目标解码对象解码待处理视频流以得到目标视频,并播放目标视频。Step S640, decode the video stream to be processed through the target decoding object to obtain the target video, and play the target video.
需要说明的是,具体的步骤方法可以参照图1所述的实施例的描述,在此不再赘述,本实施例与图1所述的实施例的区别在于,本实施例以终端作为执行主体进行描述。It should be noted that, for specific steps and methods, refer to the description of the embodiment shown in FIG. 1 , which will not be repeated here. The difference between this embodiment and the embodiment shown in FIG. 1 lies in that the terminal is used as the execution subject in this embodiment to describe.
另外,参照图7,在一实施例中,图6所示实施例中的步骤S620包括但不限于有以下步骤S710至步骤S720。In addition, referring to FIG. 7 , in one embodiment, step S620 in the embodiment shown in FIG. 6 includes but not limited to the following steps S710 to S720 .
步骤S710,创建目标解码对象,其中,目标解码对象与云服务器根据待处理视频流创建的参考解码对象相同。Step S710, creating a target decoding object, where the target decoding object is the same as the reference decoding object created by the cloud server according to the video stream to be processed.
步骤S720,根据解码参数配置目标解码对象,其中,解码参数根据参考解码对象确定。Step S720, configure the target decoding object according to the decoding parameter, wherein the decoding parameter is determined according to the reference decoding object.
需要说明的是,具体的步骤方法可以参照图2所述的实施例的描述,在此不再赘述,本实施例与图2所述的实施例的区别在于,本实施例以终端作为执行主体进行描述。It should be noted that, for specific steps and methods, refer to the description of the embodiment shown in FIG. 2 , which will not be repeated here. The difference between this embodiment and the embodiment shown in FIG. 2 is that the terminal is used as the execution subject in this embodiment to describe.
另外,参照图8,在一实施例中,在图6所示实施例中的步骤S630之后,数据处理方法还包括但不限于有以下步骤S810。In addition, referring to FIG. 8 , in one embodiment, after step S630 in the embodiment shown in FIG. 6 , the data processing method further includes, but is not limited to, the following step S810 .
步骤S810,获取云服务器发送的桌面流,其中,桌面流由云服务器根据桌面流信息和背景信息得到,背景信息由云服务器在获取到的预设颜色块中删除与播放区域所对应的位置的图像信息得到,播放区域由云服务器根据参考解码对象确定。Step S810, obtain the desktop stream sent by the cloud server, wherein the desktop stream is obtained by the cloud server according to the desktop stream information and background information, and the background information is deleted by the cloud server from the acquired preset color blocks corresponding to the playing area The image information is obtained, and the playback area is determined by the cloud server based on the reference decoding object.
需要说明的是,具体的步骤方法可以参照图3和图4所述的实施例的描述,在此不再赘述,本实施例与图3、图4所述的实施例的区别在于,本实施例以终端作为执行主体进行描述。It should be noted that, for specific steps and methods, reference may be made to the description of the embodiment shown in FIG. 3 and FIG. The example uses the terminal as the execution subject for description.
另外,参照图9,在一实施例中,图6所示实施例中的步骤S640包括但不限于有以下步骤S910至步骤S930。In addition, referring to FIG. 9 , in one embodiment, step S640 in the embodiment shown in FIG. 6 includes but is not limited to the following steps S910 to S930 .
步骤S910,通过解码桌面流得到桌面流图像。In step S910, the desktop stream image is obtained by decoding the desktop stream.
步骤S920,通过目标解码对象解码待处理视频流,得到视频图像。In step S920, the video stream to be processed is decoded by the target decoding object to obtain a video image.
步骤S930,通过合成桌面流图像和视频图像得到目标视频。In step S930, the target video is obtained by synthesizing the desktop stream image and the video image.
需要说明的是,具体的步骤方法可以参照图3所述的实施例的描述,在此不再赘述,本实施例与图3所述的实施例的区别在于,本实施例以终端作为执行主体进行描述。It should be noted that, for specific steps and methods, reference may be made to the description of the embodiment shown in FIG. 3 , which will not be repeated here. The difference between this embodiment and the embodiment shown in FIG. 3 is that this embodiment takes the terminal as the execution subject to describe.
需要说明的是,由于桌面流中的背景信息由云服务器在获取到的预设颜色块中删除与播放区域所对应的位置的图像信息得到,播放区域为视频图像的播放区域,因此桌面流图像和视频图像的合成并不影响视频图像正常显示。It should be noted that since the background information in the desktop stream is obtained by the cloud server by deleting the image information corresponding to the playback area in the acquired preset color block, the playback area is the playback area of the video image, so the desktop stream image Combining with video images does not affect the normal display of video images.
另外,为了对本申请提供的数据处理方法进行更详细的说明,以下以三个具体示例对本申请的技术方案进行描述。In addition, in order to describe the data processing method provided by the present application in more detail, the technical solutions of the present application are described below with three specific examples.
示例一:参考图10,图10是本申请另一个实施例提供的云服务器1010和终端1040的模块示意图,在图10所示的云服务器1010中,云服务器1010与终端1040通信连接,云服务器1010包括前端服务器1020和虚拟机1030,前端服务器1020包括视频流通道1021和桌面流通道1022,虚拟机1030包括Vdagent接口1031、视频应用1032、视频应用播放器1033、云端Mediacodec解码器1034、surfaceflinger模块1035、drm模块1036和qxl驱动1037;终端1040包括视频流播放器1041、桌面流播放器1042和MediaCodec解码器1043。其中,视频应用1032为云端安装的应用程序;视频应用播放器1033为云端安装的应用程序使用的播放器;云端Mediacodec解码器1034为安卓硬解码模块;前端服务器1020用于与终端1040实现数据交互;终端1040中的视频流播放器1041、桌面流播放器1042和MediaCodec解码器1043用于桌面流和视频流的解码、渲染、图像合成、图像显示。Example 1: Referring to FIG. 10, FIG. 10 is a block diagram of a cloud server 1010 and a terminal 1040 provided in another embodiment of the present application. In the cloud server 1010 shown in FIG. 1010 includes a front-end server 1020 and a virtual machine 1030, the front-end server 1020 includes a video stream channel 1021 and a desktop stream channel 1022, and the virtual machine 1030 includes a Vdagent interface 1031, a video application 1032, a video application player 1033, a cloud Mediacodec decoder 1034, and a surfaceflinger module 1035, a drm module 1036 and a qxl driver 1037; the terminal 1040 includes a video streaming player 1041, a desktop streaming player 1042 and a MediaCodec decoder 1043. Wherein, the video application 1032 is an application program installed in the cloud; the video application player 1033 is a player used by the application program installed in the cloud; the cloud Mediacodec decoder 1034 is an Android hardware decoding module; the front-end server 1020 is used to realize data interaction with the terminal 1040 ; The video stream player 1041, the desktop stream player 1042 and the MediaCodec decoder 1043 in the terminal 1040 are used for decoding, rendering, image synthesis, and image display of the desktop stream and video stream.
通过云服务器1010和终端1040实现目标视频的主要流程为:视频应用1032接收到终端1040的视频播放请求后创建播放器;视频应用播放器1033下载并解复用目标视频片源得到待处理视频流;云服务器1010创建一个云端Mediacodec解码器1034,通过Vdagent接口1031以及前端服务器1020的视频流通道1021将解码器设置参数和解复用后的待处理视频流发送给终端1040,以使终端1040根据解码器设置参数创建一个终端1040的MediaCodec解码器1043,并通过该解码器1043解码待处理视频流得到视频图像;云服务器1010通过surfaceflinger模块1035、drm模块1036生成桌面流,并通过qxl驱动1037和前端服务器1020的桌面流通道1022将桌面流发送至终端1040的桌面流播放器1042;终端1040通过对桌面流解码、渲染,与视频流图像进行合成,桌面流播放器1042播放桌面流数据,视频流播放器1041播放视频图像,桌面流数据对于视频流播放器1041的区域背景为透明,所以视频播放可以正常显示。The main process of realizing the target video through the cloud server 1010 and the terminal 1040 is: the video application 1032 creates a player after receiving the video playback request from the terminal 1040; the video application player 1033 downloads and demultiplexes the target video source to obtain the video stream to be processed The cloud server 1010 creates a cloud Mediacodec decoder 1034, and sends the video stream to be processed after the decoder setting parameters and demultiplexing to the terminal 1040 through the video stream channel 1021 of the Vdagent interface 1031 and the front-end server 1020, so that the terminal 1040 can decode according to Create a MediaCodec decoder 1043 of a terminal 1040 by setting parameters of the device, and decode the video stream to be processed to obtain a video image through the decoder 1043; the cloud server 1010 generates a desktop stream through the surfaceflinger module 1035 and the drm module 1036, and drives 1037 and the front end through the qxl The desktop stream channel 1022 of the server 1020 sends the desktop stream to the desktop stream player 1042 of the terminal 1040; the terminal 1040 decodes and renders the desktop stream, and synthesizes it with the video stream image, and the desktop stream player 1042 plays the desktop stream data and video stream The player 1041 plays video images, and the desktop stream data is transparent to the area background of the video stream player 1041, so the video playback can be displayed normally.
示例二:参考图11,图11是本申请另一个实施例提供的视频播放的流程图,该视频播放流程包括以下步骤S1110至步骤S1180。Example 2: Referring to FIG. 11 , FIG. 11 is a flow chart of video playback provided by another embodiment of the present application. The video playback process includes the following steps S1110 to S1180 .
步骤S1110,终端启动云服务器的视频应用。Step S1110, the terminal starts the video application of the cloud server.
步骤S1120,云服务器启动播放器下载片源。Step S1120, the cloud server starts the player to download the film source.
步骤S1130,播放器对视频流解封装。Step S1130, the player decapsulates the video stream.
步骤S1140,云服务器检测终端是否支持Mediacodec硬解码。Step S1140, the cloud server detects whether the terminal supports Mediacodec hard decoding.
步骤S1150,当终端不支持硬解码,启动软解码流程,可以理解的是,软解码流程为本领域技术人员所熟知,在此不再赘述。In step S1150, when the terminal does not support hard decoding, start a soft decoding process. It can be understood that the soft decoding process is well known to those skilled in the art, and will not be repeated here.
步骤S1160,当终端支持硬解码,云服务器创建Mediacodec解码器。Step S1160, when the terminal supports hardware decoding, the cloud server creates a Mediacodec decoder.
步骤S1170,将解码器的配置参数以及解封装后的数据发送至终端。Step S1170, sending the configuration parameters of the decoder and the decapsulated data to the terminal.
步骤S1180,终端根据配置参数创建Mediacodec解码器,并对解封装后的数据进行解码、渲染并播放。Step S1180, the terminal creates a Mediacodec decoder according to the configuration parameters, and decodes, renders and plays the decapsulated data.
可以理解的是,本申请并不限制云服务器检测终端是否支持Mediacodec硬解码的具体方式,可以是通过检测终端调用Mediacodec解码器是否异常进行确定,例如,终端调用MediaCodec解码器正常,确保终端应用识别当前MediaCodec解码器,确定当前终端支持硬解码。It can be understood that this application does not limit the specific method for the cloud server to detect whether the terminal supports Mediacodec hard decoding. It can be determined by detecting whether the terminal calls the Mediacodec decoder abnormally. For example, the terminal calls the MediaCodec decoder normally to ensure that the terminal application recognizes The current MediaCodec decoder, confirm that the current terminal supports hard decoding.
示例三:参考图12,图12是本申请另一个实施例提供的数据处理方法的流程图,该数据处理方法包括以下步骤S1201至步骤S1217。Example 3: Referring to FIG. 12 , FIG. 12 is a flowchart of a data processing method provided by another embodiment of the present application. The data processing method includes the following steps S1201 to S1217.
步骤S1201,云端视频应用接收到终端的视频播放指令。In step S1201, the cloud video application receives a video playback instruction from a terminal.
步骤S1202,云端视频应用创建视频应用播放器。Step S1202, the cloud video application creates a video application player.
步骤S1203,视频应用播放器下载视频播放指令对应的片源,并对片源解复用,得到视频流数据,视频流数据包括h264流。Step S1203, the video application player downloads the source corresponding to the video play command, and demultiplexes the source to obtain video stream data, which includes h264 stream.
步骤S1204,视频应用播放器查询当前的终端是否支持硬解码。In step S1204, the video application player inquires whether the current terminal supports hard decoding.
步骤S1205,当终端设备支持硬解码,视频应用播放器在本地创建MediaCodec解码器。Step S1205, when the terminal device supports hardware decoding, the video application player creates a MediaCodec decoder locally.
步骤S1206,MediaCodec解码器通知终端也创建一个MediaCodec解码器。In step S1206, the MediaCodec decoder notifies the terminal to also create a MediaCodec decoder.
步骤S1207,视频应用播放器使用云端MediaCodec设置接口。Step S1207, the video application player uses the cloud MediaCodec to set the interface.
步骤S1208,通过接口将设置参数传送至终端。Step S1208, sending the setting parameters to the terminal through the interface.
步骤S1209,视频应用播放器向云端MediaCodec设置等待解码的码流数据。Step S1209, the video application player sets code stream data to be decoded to the cloud MediaCodec.
步骤S1210,云端MediaCodec通过接口将设置的码流数据发送至终端。Step S1210, the cloud MediaCodec sends the set code stream data to the terminal through the interface.
步骤S1211,终端的解码器对码流数据进行解码,并播放片源。Step S1211, the decoder of the terminal decodes the code stream data and plays the movie source.
步骤S1212,视频应用播放器向云端MediaCodec解码器轮询解码数据。Step S1212, the video application player polls the cloud MediaCodec decoder for decoded data.
步骤S1213,对应的接口返回给视频应用播放器一段预置的解码数据,即黑屏数据。Step S1213, the corresponding interface returns to the video application player a piece of preset decoded data, that is, black screen data.
步骤S1214,视频应用播放器渲染该解码数据,将渲染完成的解码数据与当前虚拟机内部的图像合成桌面流,并将桌面流通过QXL驱动发送给前端服务器。Step S1214, the video application player renders the decoded data, synthesizes the rendered decoded data and the image inside the current virtual machine into a desktop stream, and sends the desktop stream to the front-end server through the QXL driver.
步骤S1215,前端服务器对虚机内的图像进行判断,对播放区域的部分进行抠图,将黑屏区域设置为透明,得到桌面流。Step S1215, the front-end server judges the image in the virtual machine, cuts out the part of the playing area, sets the black screen area as transparent, and obtains the desktop stream.
步骤S1216,将处理完成的桌面流发送给终端。Step S1216, sending the processed desktop stream to the terminal.
步骤S1217,终端对桌面流进行解码、渲染,将渲染后的桌面流与视频流图像进行合成,由于桌面流对于播放器的区域背景为透明,所以视频播放可以正常显示。In step S1217, the terminal decodes and renders the desktop stream, and synthesizes the rendered desktop stream with the video stream image. Since the desktop stream is transparent to the background of the player area, the video playback can be displayed normally.
另外,参考图13,本申请的一个实施例还提供了一种云服务器1300,该云服务器1300包括:存储器1310、处理器1320及存储在存储器1310上并可在处理器1320上运行的计算机程序。In addition, referring to FIG. 13 , an embodiment of the present application also provides a cloud server 1300, which includes: a memory 1310, a processor 1320, and a computer program stored on the memory 1310 and operable on the processor 1320 .
处理器1320和存储器1310可以通过总线或者其他方式连接。The processor 1320 and the memory 1310 may be connected through a bus or in other ways.
实现上述实施例的数据处理方法所需的非暂态软件程序以及指令存储在存储器1310中,当被处理器1320执行时,执行上述实施例中的应用于云服务器1300的数据处理方法,例如,执行以上描述的图1中的方法步骤S110至方法步骤S140、图2中的方法步骤S210至方法步骤S220、图3中的方法步骤S310、图4中的方法步骤S410至方法步骤S440、图5中的方法步骤S510。The non-transitory software programs and instructions required to implement the data processing method of the above-mentioned embodiment are stored in the memory 1310, and when executed by the processor 1320, the data processing method applied to the cloud server 1300 in the above-mentioned embodiment is executed, for example, Carry out method step S110 to method step S140 in Fig. 1 described above, method step S210 to method step S220 in Fig. 2, method step S310 in Fig. 3, method step S410 to method step S440 in Fig. 4, Fig. 5 Step S510 in the method.
另外,参考图14,本申请的一个实施例还提供了一种终端1400,该终端1400包括:存储器1410、处理器1420及存储在存储器1410上并可在处理器1420上运行的计算机程序。In addition, referring to FIG. 14 , an embodiment of the present application also provides a terminal 1400 . The terminal 1400 includes: a memory 1410 , a processor 1420 , and a computer program stored in the memory 1410 and operable on the processor 1420 .
处理器1420和存储器1410可以通过总线或者其他方式连接。The processor 1420 and the memory 1410 may be connected through a bus or in other ways.
实现上述实施例的数据处理方法所需的非暂态软件程序以及指令存储在存储器1410中,当被处理器1420执行时,执行上述实施例中的应用于终端1400的数据处理方法,例如,执行以上描述的图6中的方法步骤S610至方法步骤S640、图7中的方法步骤S710至方法步骤S720、图8中的方法步骤S810、图9中的方法步骤S910至方法步骤S930。The non-transitory software programs and instructions required to implement the data processing method of the above-mentioned embodiment are stored in the memory 1410, and when executed by the processor 1420, the data processing method applied to the terminal 1400 in the above-mentioned embodiment is executed, for example, executing The method step S610 to method step S640 in FIG. 6 , the method step S710 to method step S720 in FIG. 7 , the method step S810 in FIG. 8 , and the method step S910 to method step S930 in FIG. 9 described above.
以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
本申请实施例包括一种数据处理方法、云服务器、终端及存储介质,其中,数据处理方法应用于云服务器,所述云服务器与终端通信连接,所述数据处理方法包括:获取终端发送的视频播放请求,根据所述视频播放请求获取目标视频;解复用所述目标视频,得到待处理视频流;确定针对所述待处理视频流的解码参数,将所述解码参数发送至所述终端,以使所述终端根据所述解码参数得到目标解码对象;将所述待处理视频流转发至所述终端,以使所述终端通过所述目标解码对象解码所述待处理视频流以得到目标视频,并播放所述目标视频。根据本申请实施例提供的方案,能够有效减少云化终端播放视频的限制,降低虚拟机的资源消耗。The embodiment of the present application includes a data processing method, a cloud server, a terminal, and a storage medium, wherein the data processing method is applied to the cloud server, and the cloud server is connected to the terminal through communication, and the data processing method includes: acquiring the video sent by the terminal A playback request, obtaining a target video according to the video playback request; demultiplexing the target video to obtain a video stream to be processed; determining decoding parameters for the video stream to be processed, and sending the decoding parameters to the terminal, making the terminal obtain a target decoding object according to the decoding parameters; forwarding the video stream to be processed to the terminal, so that the terminal decodes the video stream to be processed through the target decoding object to obtain a target video , and play the target video. According to the solution provided by the embodiment of the present application, it is possible to effectively reduce the limitation of playing video on the cloud terminal and reduce the resource consumption of the virtual machine.
此外,本申请的一个实施例还提供了一种存储介质,该可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个处理器1320或控制器执行,例如,被上述云服务器1300实施例中的一个处理器1320执行,可使得上述处理器1320执行上述实施例中的应用于云服务器1300的数据处理方法,例如,执行以上描述的图1中的方法步骤S110至方法步骤S140、图2中的方法步骤S210至方法步骤S220、图3中的方法步骤S310、图4中的方法步骤S410至方法步骤S440、图5中的方法步骤S510。本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。In addition, an embodiment of the present application also provides a storage medium, the readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor 1320 or a controller, for example, by the above-mentioned cloud server 1300 Execution by a processor 1320 in the embodiment may cause the processor 1320 to execute the data processing method applied to the cloud server 1300 in the above embodiment, for example, execute the method steps S110 to S140 in FIG. 1 described above, Method step S210 to method step S220 in FIG. 2 , method step S310 in FIG. 3 , method step S410 to method step S440 in FIG. 4 , method step S510 in FIG. 5 . Those skilled in the art can understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware and an appropriate combination thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit . Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
以上是对本申请的一些实施进行了具体说明,但本申请并不局限于上述实施方式,熟悉本领域的技术人员在不违背本申请精神的前提下还可作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。The above is a specific description of some implementations of the present application, but the present application is not limited to the above-mentioned embodiments. Those skilled in the art can also make various equivalent deformations or replacements without violating the spirit of the present application. Any modification or substitution is included within the scope defined by the claims of the present application.

Claims (12)

  1. 一种数据处理方法,应用于云服务器,所述云服务器与终端通信连接,所述数据处理方法包括:A data processing method applied to a cloud server, the cloud server being connected to a terminal in communication, the data processing method comprising:
    获取终端发送的视频播放请求,根据所述视频播放请求获取目标视频;Obtain a video play request sent by the terminal, and obtain the target video according to the video play request;
    解复用所述目标视频,得到待处理视频流;Demultiplexing the target video to obtain a video stream to be processed;
    确定针对所述待处理视频流的解码参数,将所述解码参数发送至所述终端,以使所述终端根据所述解码参数得到目标解码对象;determining a decoding parameter for the video stream to be processed, and sending the decoding parameter to the terminal, so that the terminal obtains a target decoding object according to the decoding parameter;
    将所述待处理视频流转发至所述终端,以使所述终端通过所述目标解码对象解码所述待处理视频流以得到目标视频,并播放所述目标视频。Forwarding the video stream to be processed to the terminal, so that the terminal decodes the video stream to be processed through the target decoding object to obtain a target video, and plays the target video.
  2. 根据权利要求1所述的方法,其中,所述确定针对所述待处理视频流的解码参数,将所述解码参数发送至所述终端,以使所述终端根据所述解码参数得到目标解码对象,包括:The method according to claim 1, wherein the determining is for the decoding parameters of the video stream to be processed, and the decoding parameters are sent to the terminal, so that the terminal can obtain the target decoding object according to the decoding parameters ,include:
    根据所述待处理视频流创建参考解码对象,根据所述参考解码对象确定所述解码参数;Create a reference decoding object according to the video stream to be processed, and determine the decoding parameters according to the reference decoding object;
    将所述解码参数发送至所述终端,以使所述终端创建与所述参考解码对象相同的目标解码对象,并通过所述解码参数配置所述目标解码对象。sending the decoding parameters to the terminal, so that the terminal creates a target decoding object identical to the reference decoding object, and configures the target decoding object through the decoding parameters.
  3. 根据权利要求2所述的方法,其中,在所述将所述待处理视频流转发至所述终端之后,所述方法还包括:The method according to claim 2, wherein, after the video stream to be processed is forwarded to the terminal, the method further comprises:
    生成桌面流,将所述桌面流发送至所述终端,以使所述终端解码所述桌面流以得到桌面流图像,所述桌面流图像被设置为与解码所述待处理视频流得到的视频图像合成所述目标视频。Generate a desktop stream, and send the desktop stream to the terminal, so that the terminal decodes the desktop stream to obtain a desktop stream image, and the desktop stream image is set as the video obtained by decoding the video stream to be processed Image synthesis of the target video.
  4. 根据权利要求3所述的方法,其中,所述生成桌面流,包括:The method according to claim 3, wherein said generating a desktop stream comprises:
    获取预设颜色块;Get the preset color block;
    根据所述参考解码对象确定所述目标视频的播放区域;determining the playing area of the target video according to the reference decoding object;
    在所述预设颜色块中删除与所述播放区域所对应的位置的图像信息,得到背景信息;Deleting image information at a position corresponding to the playback area in the preset color block to obtain background information;
    获取桌面流信息,根据所述桌面流信息和所述背景信息得到所述桌面流。Obtain desktop stream information, and obtain the desktop stream according to the desktop stream information and the background information.
  5. 根据权利要求4所述的方法,其中,所述获取预置颜色块,包括:The method according to claim 4, wherein said acquiring preset color blocks comprises:
    从第一接口得到的反馈信息中获取所述预置颜色块,其中,所述反馈信息为所述第一接口向所述参考解码对象轮询解码数据得到。The preset color block is obtained from feedback information obtained by the first interface, wherein the feedback information is obtained by the first interface polling the reference decoding object for decoding data.
  6. 一种数据处理方法,应用于终端,所述终端与云服务器通信连接,所述数据处理方法包括:A data processing method is applied to a terminal, the terminal is connected to a cloud server through communication, and the data processing method includes:
    向所述云服务器发送视频播放请求,以使所述云服务器根据所述视频播放请求获取目标视频;Sending a video playback request to the cloud server, so that the cloud server obtains the target video according to the video playback request;
    获取所述云服务器发送的解码参数,根据所述解码参数得到目标解码对象,所述解码参数由所述云服务器根据所述待处理视频流确定;Obtain the decoding parameters sent by the cloud server, and obtain the target decoding object according to the decoding parameters, and the decoding parameters are determined by the cloud server according to the video stream to be processed;
    获取所述云服务器发送的待处理视频流,所述待处理视频流由所述云服务器通过解复用所述目标视频得到;Obtaining the video stream to be processed sent by the cloud server, the video stream to be processed is obtained by the cloud server by demultiplexing the target video;
    通过所述目标解码对象解码所述待处理视频流以得到目标视频,并播放所述目标视频。The video stream to be processed is decoded by the target decoding object to obtain a target video, and the target video is played.
  7. 根据权利要求6所述的方法,其中,所述根据所述解码参数得到目标解码对象,包括:The method according to claim 6, wherein said obtaining the target decoding object according to the decoding parameters comprises:
    创建目标解码对象,其中,所述目标解码对象与所述云服务器根据所述待处理视频流创 建的参考解码对象相同;Create a target decoding object, wherein the target decoding object is identical to the reference decoding object created by the cloud server according to the video stream to be processed;
    根据所述解码参数配置所述目标解码对象,其中,所述解码参数根据所述参考解码对象确定。configuring the target decoding object according to the decoding parameter, wherein the decoding parameter is determined according to the reference decoding object.
  8. 根据权利要求7所述的方法,其中,在所述获取所述云服务器发送的待处理视频流之后,还包括:The method according to claim 7, wherein, after acquiring the video stream to be processed sent by the cloud server, further comprising:
    获取所述云服务器发送的桌面流,其中,所述桌面流由所述云服务器根据桌面流信息和背景信息得到,所述背景信息由所述云服务器在获取到的预设颜色块中删除与播放区域所对应的位置的图像信息得到,所述播放区域由所述云服务器根据所述参考解码对象确定。Obtaining the desktop stream sent by the cloud server, wherein the desktop stream is obtained by the cloud server according to desktop stream information and background information, and the background information is deleted by the cloud server from the acquired preset color block The image information of the position corresponding to the playback area is obtained, and the playback area is determined by the cloud server according to the reference decoding object.
  9. 根据权利要求8所述的方法,其中,所述通过所述目标解码对象解码所述待处理视频流以得到目标视频,包括:The method according to claim 8, wherein said decoding the video stream to be processed by the target decoding object to obtain the target video comprises:
    通过解码所述桌面流得到桌面流图像;obtaining a desktop stream image by decoding the desktop stream;
    通过所述目标解码对象解码所述待处理视频流,得到视频图像;Decoding the video stream to be processed by the target decoding object to obtain a video image;
    通过合成所述桌面流图像和所述视频图像得到所述目标视频。The target video is obtained by synthesizing the desktop stream image and the video image.
  10. 一种云服务器,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如权利要求1至5中任意一项所述的数据处理方法。A cloud server, comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein, when the processor executes the computer program, any one of claims 1 to 5 is realized The data processing method described.
  11. 一种终端,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如权利要求6至9中任意一项所述的数据处理方法。A terminal, comprising: a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein, when the processor executes the computer program, the computer program described in any one of claims 6 to 9 is implemented. The data processing method described above.
  12. 一种存储介质,存储有计算机可执行指令,所述计算机可执行指令被设置为执行如权利要求1至9中任意一项所述的数据处理方法。A storage medium storing computer-executable instructions configured to execute the data processing method according to any one of claims 1-9.
PCT/CN2022/096288 2021-06-28 2022-05-31 Data processing method, cloud server, terminal and storage medium WO2023273772A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110722681.2 2021-06-28
CN202110722681.2A CN115604524A (en) 2021-06-28 2021-06-28 Data processing method, cloud server, terminal and storage medium

Publications (1)

Publication Number Publication Date
WO2023273772A1 true WO2023273772A1 (en) 2023-01-05

Family

ID=84692522

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/096288 WO2023273772A1 (en) 2021-06-28 2022-05-31 Data processing method, cloud server, terminal and storage medium

Country Status (2)

Country Link
CN (1) CN115604524A (en)
WO (1) WO2023273772A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106210865A (en) * 2016-07-08 2016-12-07 中霆云计算科技(上海)有限公司 A kind of video reorientation method and system presenting agreement based on remote desktop
CN106792124A (en) * 2016-12-30 2017-05-31 合网络技术(北京)有限公司 Multimedia resource decodes player method and device
CN108235096A (en) * 2018-01-18 2018-06-29 湖南快乐阳光互动娱乐传媒有限公司 The mobile terminal hard decoder method that intelligently the soft decoding of switching plays video
CN110381363A (en) * 2019-07-17 2019-10-25 深信服科技股份有限公司 Video encoding/decoding method, device, server and storage medium
CN112468874A (en) * 2020-11-26 2021-03-09 北京天融信网络安全技术有限公司 Video playing method, terminal equipment and system
US11012485B1 (en) * 2020-01-02 2021-05-18 Microsoft Technology Licensing, Llc Multi-media redirection for media applications

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106210865A (en) * 2016-07-08 2016-12-07 中霆云计算科技(上海)有限公司 A kind of video reorientation method and system presenting agreement based on remote desktop
CN106792124A (en) * 2016-12-30 2017-05-31 合网络技术(北京)有限公司 Multimedia resource decodes player method and device
CN108235096A (en) * 2018-01-18 2018-06-29 湖南快乐阳光互动娱乐传媒有限公司 The mobile terminal hard decoder method that intelligently the soft decoding of switching plays video
CN110381363A (en) * 2019-07-17 2019-10-25 深信服科技股份有限公司 Video encoding/decoding method, device, server and storage medium
US11012485B1 (en) * 2020-01-02 2021-05-18 Microsoft Technology Licensing, Llc Multi-media redirection for media applications
CN112468874A (en) * 2020-11-26 2021-03-09 北京天融信网络安全技术有限公司 Video playing method, terminal equipment and system

Also Published As

Publication number Publication date
CN115604524A (en) 2023-01-13

Similar Documents

Publication Publication Date Title
US10712771B2 (en) System and method for synchronized playback of streaming digital content
RU2744969C1 (en) Method and device for effective delivery and use of audio communications for high quality of perception
JP5204492B2 (en) Method and apparatus for configuring software resources for playing network programs
WO2017075956A1 (en) Content projection method and mobile terminal
WO2017125021A1 (en) Set-top box cloudification method, apparatus and system
CN112637661B (en) Video stream switching method and device, computer storage medium and electronic equipment
US20080154941A1 (en) Method of and apparatus for encoding/decoding multimedia data with preview function
JP2011501501A (en) Apparatus and method for providing stereoscopic 3D video content for LASeR-based terminals
CN112399257B (en) Cloud desktop video playing method, server, terminal and storage medium
EP3474559B1 (en) Smart-television playback method and apparatus
US11968246B2 (en) Playback mode determining method and apparatus
WO2019192481A1 (en) Media information processing method, related device, and computer storage medium
WO2018192183A1 (en) Method and apparatus for processing video file during wireless screen delivery
CN108307248A (en) Video broadcasting method, device, computing device and storage medium
US11678019B2 (en) User interface (UI) engine for cloud UI rendering
KR20130099515A (en) Apparatas and method of displaying a contents using for key frame in a terminal
CN104980808A (en) Method and device for accurately dotting video resources
WO2023273772A1 (en) Data processing method, cloud server, terminal and storage medium
JP2013222989A (en) Video display system, reproduction region designation server device, terminal device and program
CN115643429A (en) Video playing method and device, electronic equipment and computer readable storage medium
CN116347140A (en) Video synchronous playing method and device, storage medium and electronic equipment
US8117241B2 (en) Method and apparatus for generating media-exchangeable multimedia data and method and apparatus for reconstructing media-exchangeable multimedia data
CN113873298A (en) Method for redirecting video, electronic equipment and computer-readable storage medium
JP6647131B2 (en) Distribution device and program
WO2021115349A1 (en) Desktop display method and apparatus, computer-readable storage medium, and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22831593

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE