WO2022048255A1 - Data processing method and system, cloud terminal, server, and computing device - Google Patents

Data processing method and system, cloud terminal, server, and computing device Download PDF

Info

Publication number
WO2022048255A1
WO2022048255A1 PCT/CN2021/101691 CN2021101691W WO2022048255A1 WO 2022048255 A1 WO2022048255 A1 WO 2022048255A1 CN 2021101691 W CN2021101691 W CN 2021101691W WO 2022048255 A1 WO2022048255 A1 WO 2022048255A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
server
encoding
decoding
cloud terminal
Prior art date
Application number
PCT/CN2021/101691
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 WO2022048255A1 publication Critical patent/WO2022048255A1/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/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64723Monitoring of network processes or resources, e.g. monitoring of network load
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64746Control signals issued by the network directed to the server or the client
    • H04N21/64761Control signals issued by the network directed to the server or the client directed to the server

Definitions

  • the present invention relates to the field of cloud technology, and mainly relates to a data processing method and system, a cloud terminal, a server, a computing device and a computer program product.
  • Cloud Phone plays a very good role in extending and supplementing physical mobile phones, and has begun to emerge in scenarios such as cloud mobile games, cloud mobile live broadcasts, and mobile office.
  • the encoding and decoding of video will be involved, for example: (1) cloud mobile game, the screen (or game screen) of the mobile phone needs to be encoded and transmitted to the physical mobile phone through the network; (2) live broadcast scene In the next step, the received camera screen data of the physical mobile phone needs to be decoded and displayed on the cloud mobile phone.
  • the cloud mobile phone When the live application is started on the cloud mobile phone, the cloud mobile phone will encode the camera screen data and send it to the live broadcast platform; (3) In mobile office scenarios, when employees in industries with high demands on information security, such as government and finance, make video calls through instant messaging applications, the camera images on the cloud phone need to be encoded.
  • a data processing method is provided, which is applied between a cloud terminal and a server.
  • the method includes: the cloud terminal sends data; the server receives the data; the server processes the data, wherein the processing is to encode or decode the data; and the server sends the processed data to the cloud terminal.
  • the data processing method provided by the present application shares the encoding and decoding tasks of the cloud terminal on the server, so that the processor resources of the cloud terminal are saved, and the cost and specifications of a single cloud terminal are reduced.
  • the powerful computing resources owned by the server further improve the efficiency of encoding and decoding tasks on the cloud terminal.
  • the encoding of the data by the server includes: hardware encoding or software encoding of the data.
  • the encoder module of the server is responsible for this encoding task.
  • the software coding task runs on the CPU;
  • the hardware coding task runs on the hardware coding and decoding chip.
  • the server can provide higher encoding efficiency.
  • the server decoding the data includes: performing hardware decoding or software decoding on the data.
  • the decoder module of the server is responsible for this decoding task.
  • the software decoding task runs on the CPU
  • the hardware decoding task runs on the hardware codec chip.
  • the server can provide higher decoding efficiency.
  • the data processing method further includes: the cloud terminal sends a processing rule to the server; the processing rule is used to determine whether to perform hardware encoding or software decoding on the data, or the processing rule is used to determine whether to perform hardware encoding or software decoding on the data.
  • the data is software encoded or software decoded.
  • the cloud terminal sends instructions and data to the server, the instructions include processing rules, and the processing rules include encoding or decoding methods: encoding methods include hardware encoding or software encoding, and decoding methods include hardware decoding or software decoding. According to the different encoding and decoding methods, the server calls different encoding modules and decoding modules to perform operations respectively. Please refer to the description above.
  • the data processing method further includes: before the cloud terminal sends the data, the cloud terminal obtains a request from the terminal to process the data.
  • the cloud terminal Before the cloud terminal sends data to the server, the cloud terminal must first obtain a data processing request from the terminal. This request comes from a physical terminal and is triggered by the terminal's user.
  • the data processing method further includes: before the cloud terminal sends the data, the cloud terminal obtains a request for processing the data, and the request is triggered by an application on the cloud terminal.
  • the cloud terminal Before the cloud terminal sends data to the server, the cloud terminal obtains a data processing request from the application, and the request is related to the encoding or decoding requirements of the application layer.
  • An encoding request is issued if the application requires encoding, and a decoding request is issued if the application requires decoding.
  • the processing rule in the request sent by the application is not the same as the processing rule sent by the cloud terminal to the server in the third possible implementation manner of the first aspect of the present invention, that is, the cloud terminal can perform the processing rule on the processing rule. Modify and send the modified processing rules to the server.
  • the data processing method further includes: the cloud terminal sends the virtual desktop obtained according to the data to the terminal.
  • the application of the cloud terminal obtains the virtual desktop based on the processed data, and delivers the virtual desktop to the terminal, so that the terminal displays the virtual desktop to the user.
  • the present invention provides a system for processing data, the system comprising:
  • Cloud terminal used to send data to the server
  • the server is configured to receive the data, and after processing the data, send the processed data to the cloud terminal, and the processing is to encode or decode the data.
  • the data processing method provided by the present application shares the encoding and decoding tasks of the cloud terminal on the server, so that the processor resources of the cloud terminal are saved, and the cost and specifications of a single cloud terminal are reduced.
  • the powerful computing resources owned by the server further improve the efficiency of the encoding and decoding tasks of the cloud terminal.
  • the server further includes: hardware encoding or software encoding for the data.
  • the encoder module of the server is responsible for this encoding task.
  • the software coding task runs on the CPU;
  • the hardware coding task runs on the hardware codec chip.
  • the server can provide higher encoding efficiency.
  • the server further includes: hardware decoding or software decoding for the data.
  • the decoder module of the server is responsible for this decoding task.
  • the software decoding task runs on the CPU;
  • the hardware decoding task runs on the hardware codec chip.
  • the server can provide higher decoding efficiency.
  • the data processing system further includes:
  • the cloud terminal is used to send a processing rule to the server, where the processing rule is used to determine whether to perform hardware encoding or software decoding on the data, or the processing rule is used to determine whether to perform software encoding or software decoding on the data.
  • the cloud terminal sends instructions and data to the server, the instructions include processing rules, and the processing rules include encoding or decoding methods: encoding methods include hardware encoding or software encoding, and decoding methods include hardware decoding or software decoding. According to the different encoding and decoding methods, the server calls different encoding modules and decoding modules to perform operations respectively. Please refer to the description above.
  • the data processing system further includes:
  • the cloud terminal is used to obtain a request from the terminal to process the data.
  • the cloud terminal Before the cloud terminal sends data to the server, the cloud terminal must first obtain a data processing request from the terminal. This request comes from a physical terminal and is triggered by the user of the terminal.
  • the data processing method further includes:
  • the cloud terminal is used to obtain a request for processing the data, where the request is triggered by an application on the cloud terminal.
  • the cloud terminal Before the cloud terminal sends data to the server, the cloud terminal obtains a data processing request from the application, and the request is related to the encoding or decoding requirements of the application layer.
  • An encoding request is issued if the application requires encoding, and a decoding request is issued if the application requires decoding.
  • the processing rule in the request sent by the application is not the same as the processing rule sent by the cloud terminal to the server in the third possible implementation manner of the second aspect of the present invention, that is, the cloud terminal can perform the processing rule on the processing rule. Modify and send the modified processing rules to the server.
  • the data processing system further includes:
  • the cloud terminal is used for sending the virtual desktop obtained according to the data to the terminal.
  • the application of the cloud terminal obtains the virtual desktop based on the processed data, and delivers the virtual desktop to the terminal, so that the terminal displays the virtual desktop to the user.
  • the data processing system further includes: the cloud terminal is a cloud mobile phone.
  • the present application provides a cloud terminal, which is the cloud terminal provided by the second aspect of the present application or any possible design of the second aspect.
  • the present application provides a server, which is the server provided by the second aspect of the present application or any possible design of the second aspect.
  • the present application provides a computing device, where the computing device includes a processor and a memory.
  • the processor executes the instructions in the memory, so that the computing device implements the cloud terminal or server provided by the second aspect or any possible design of the second aspect of the present application.
  • the present application provides a computer program product, wherein the computer program product includes instructions for implementing the method executed by the cloud terminal in the first aspect of the present application or the method provided by any possible design of the first aspect. steps, and/or steps executed by a server for implementing the method provided by the first aspect of the application or any possible design of the first aspect.
  • the present application may further combine to provide more implementation manners.
  • FIG. 1 is a schematic diagram of an example of a system structure for data processing provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of an example of a system structure for data processing provided by an embodiment of the present application.
  • FIG. 3 is an exemplary schematic diagram of a system structure for data processing provided by an embodiment of the present application.
  • FIG. 4 is an example schematic diagram of a system structure for data processing provided by an example in the present application.
  • FIG. 5 is a flowchart of a data processing method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram illustrating an example of a system structure for data processing provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an example of a system structure of a data processing method provided by an embodiment of the present application
  • FIG. 8 is an example diagram of a method framework for data processing provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an example of a method involving data processing in a cloud mobile phone shopping live broadcast scenario provided by an embodiment of the present application.
  • FIG. 10 is an example structural diagram of an apparatus 300 provided by an embodiment of the present application.
  • FIG. 11 is an example structural diagram of a computing device 600 provided by an embodiment of the application.
  • FIG. 1 is a schematic structural diagram of a data processing system provided by an embodiment of the present application. As shown in FIG. 1 , the system may include a cloud terminal 001 and a server 002 .
  • the cloud terminal 001 may be a virtual device that provides a virtual desktop, for example, the virtual device may be an instance, and the instance may be a virtual machine or a container. In a possible implementation manner, the cloud terminal 001 is a cloud mobile phone.
  • Server 002 may be a device having computing capabilities, server 002 having memory and a processor.
  • the processor of the server 002 may be a central processing unit (Central Processing Unit, CPU).
  • the server 002 may also have one or more of a graphics processor (graphics processing unit, GPU), a neural network processor (Neural network Processing Unit, NPU), and an FPGA (Field Programmable Gate Array).
  • the server 002 The memory can be random access memory (RAM) or solid-state drive (solid-state drive, SSD) and other devices or memory instances with storage capabilities.
  • a solid-state drive may also be called a solid-state drive (SSD)
  • applications may be installed on the cloud terminal 001, and the applications may include applications such as live video, video calls, video conferences, video players, audio players, and mobile games.
  • the application on the cloud terminal 001 may issue a request for encoding or decoding, or may issue a request for encoding and decoding at the same time.
  • the server 002 may be a physical device deployed in the network, and the cloud terminal 001 and the server 002 communicate based on a communication protocol or a calling protocol, so that the cloud terminal 001 can call the service provided by the server 002 or communicate with the server 002 for data interaction.
  • the communication protocol may be Socket.
  • the calling protocol may be Remote Procedure Call (PRC).
  • the server 002 may be deployed with a software encoding module and a software decoding module.
  • the software encoding module is used to encode the data.
  • the software decoding module is used to decode the data.
  • the encoding or decoding operation is executed on the CPU of the server 002 .
  • the software coding module and the software coding module can be directly deployed in the server 002, or deployed in an instance where the server 002 runs.
  • the server 002 may be a device capable of hardware encoding, and the server 002 is deployed with a hardware encoding module and a hardware decoding module.
  • the hardware encoding module is used to encode the data.
  • the hardware decoding module is used to decode the data.
  • the encoding and decoding operations are executed on a hardware encoding chip of the server 002 , for example, the hardware encoding chip may be a GPU or NPU or other chips with hardware encoding capability.
  • FIG. 2 is a schematic structural diagram of a second data processing system provided by an embodiment of the present application.
  • the server 002 may also be deployed in a cloud server cluster 003 .
  • the server 002 of the cloud server cluster 003 may also be composed of a certain number of elastic cloud servers (Elastic Cloud Server, ECS), that is, the number of the servers 002 in the cloud server cluster 003 can be elastically scaled.
  • ECS Elastic Cloud Server
  • FIG. 2 is a schematic structural diagram of a third data processing system provided by an embodiment of the present application. As shown in FIG. 3 , the server 002 may also be deployed in a data center 004 .
  • the cloud server cluster 003 may contain one or more servers, the server may provide encoding capability, or the server may provide decoding capability, or the server may provide encoding and decoding at the same time Ability.
  • An example of a scenario is that the server used for encoding and the server used for decoding belong to different clusters or data centers. That is, the cluster consisting of the servers used for encoding is called the encoding cluster, the cluster consisting of the servers used for decoding is called the decoding cluster, the data center where the servers used for encoding are located is called the encoding data center, and the data center where the servers used for decoding are located is called the decoding cluster. Decode the data center.
  • FIG. 4 is a schematic structural diagram of another data processing system provided by way of example.
  • the system may include a terminal 005 .
  • the terminal 005 may be a mobile phone, tablet or other physical device with display and communication functions.
  • the terminal 005 can communicate with the cloud terminal 001 through the network, the terminal 005 uploads local data and instructions to the cloud terminal 001, the cloud terminal 001 can deliver the virtual desktop to the terminal 005, and the user can run the cloud terminal 001 on the terminal 005.
  • the server 002 in FIG. 4 may also be the cloud server cluster 003 or the data center 004 in FIG. 3 and FIG.
  • the terminal 005 may collect video data locally, and upload the collected video data to the software of the cloud terminal 001 .
  • the cloud terminal 001 can send a service request (such as an encoding request or a decoding request) to the server 002 according to the needs of the application, and forward the video data locally collected by the terminal 005 to the server 002; the server 002 returns the processed video data to the cloud terminal 001 application.
  • the application of the cloud terminal obtains a virtual desktop based on the processed video data, for example, a live broadcast interface is generated based on the video data, and the live broadcast interface belongs to part or all of the content displayed by the virtual desktop.
  • the cloud terminal 001 delivers the virtual desktop to the display of the terminal 005 .
  • FIG. 5 is a flowchart of a data processing method provided by an embodiment of the present application, and the method may be applied to any of the systems shown in FIG. 1 to FIG. 4 .
  • FIG. 5 is an embodiment in which the method is applied to the system architecture shown in FIG. 1 .
  • the system in FIG. 1 includes a cloud terminal and a server.
  • the system architectures of FIGS. 2 to 4 are more complex than those of FIG. 1 , and the flowcharts of the method embodiments applied to them have more steps than those of FIG. 5 , but their core steps are still similar to the flowchart of the embodiment shown in FIG. 5 .
  • the flow of the data processing method of the present application is illustrated below with reference to FIG. 1 and FIG. 5 .
  • the flow steps include steps 201 to 205 .
  • Step 201 The cloud terminal sends data to the server.
  • the cloud terminal sends the data to the server through the network, and the data is the data to be decoded or encoded.
  • the cloud terminal sends instructions for encoding and decoding to the server, and the instructions include encoding or decoding rules.
  • the instruction carries data to be encoded or decoded.
  • the instructions and data are sent independently.
  • the cloud terminal may continuously send a piece of video stream data, and send an instruction to start encoding to the server while starting to send the video stream. For example, after the video stream stops or the application sends a stop request, The cloud terminal will send an instruction to the server to close the encoding service.
  • some applications are installed on the cloud terminal, and the applications can send encoding or decoding requests according to their own business requirements.
  • a live broadcast application can send an encoding request
  • a video playback application can send a decoding request.
  • the encoding method in the encoding request can be hardware encoding or software encoding.
  • the decoding method in the decoding request may be hardware decoding or software decoding.
  • the cloud terminal determines the encoding or decoding rules according to the request sent by the application.
  • the encoding or decoding manner in the determined rule may be different from the encoding or decoding rule in the application sending the request.
  • the application sends a software encoding request
  • the determined encoding rule is hardware encoding
  • the application sends a hardware encoding request
  • the determined encoding rule is software encoding, that is, the cloud terminal can modify the encoding method sent by the application. .
  • the encoding or decoding method in the determined rule may also be the same as the encoding or decoding rule in the request issued by the application, that is, the cloud terminal may not modify the encoding method issued by the application.
  • Step 202 the server receives data.
  • the server after the server receives the data sent by the cloud terminal, it also needs to start the encoding or decoding task according to the instruction synchronously sent by the cloud terminal, and at the same time return the corresponding service response to the cloud terminal.
  • the server may continuously receive a video stream data, after receiving the start command, the server will start to encode or decode the continuously received video frames, and return to the cloud terminal to start encoding or decoded service response, until the server receives the command to close the encoding or decoding task, and then returns the service response to end encoding or decoding to the cloud terminal.
  • Step 203 the server performs encoding or decoding services.
  • the server encodes or decodes the data according to the received encoding rule or decoding rule, where the encoding rule may include an encoding standard, an encoding parameter, and an encoding manner.
  • the decoding rules may include decoding standards, decoding parameters, and decoding methods.
  • the server receives the encoding request sent by the cloud terminal, the encoding request contains the encoding standard can be H.264, H.264 and other standards, the encoding parameters can include resolution, bit rate, frame rate, DTS And PTS, etc., the encoding method can be software encoding or hardware encoding.
  • video encoding is the process of converting an original video format file into another video format file, and the main purpose is to compress the original video for storage and transmission.
  • the encoded data is the compressed frame, and the compressed frame has a smaller amount of data than the original frame.
  • the server invokes a hardware encoding chip (eg, a GPU chip) to perform encoding calculations on the original frame.
  • a hardware encoding chip eg, a GPU chip
  • the server calls the CPU to perform encoding calculation on the original frame.
  • the encoding method adopted by the server may be the same as the encoding method in the received instruction, but in some embodiments, the encoding method adopted by the server may be different from the encoding method in the request sent by the cloud terminal application.
  • the content has undergone some processing, the processing may include modifying the encoding mode, and reference may be made to the description in step 201 .
  • the server receives a decoding request sent by the cloud terminal, and the decoding standard, decoding parameter, and decoding method can refer to the description in the preceding coding rules.
  • video decoding is the inverse process of video encoding. Through decompression technology, the process of converting the compressed video format file into the original video format file is mainly used to decompress the compressed video frame to support the playback and display of the picture.
  • the decoded data is the decoded frame (which may be lossy relative to the original frame).
  • the decoded frame has a larger amount of data than the compressed frame, and the visual effect after visualization is better.
  • the server calls a hardware decoding chip to decode and calculate the compressed frame, such as a GPU chip.
  • the decoding method is software decoding
  • the server calls the CPU to decode and calculate the compressed frame.
  • the decoding method adopted by the server and the decoding method in the received instruction may be the same.
  • the decoding method adopted by the server may be different from the decoding method in the request sent by the cloud terminal application, and the cloud terminal performs some processing on the content in the request, and the processing may include modifying the decoding method.
  • the decoding method indicated by the instruction is software decoding, but the decoding method used by the server is hardware decoding.
  • Step 204 the server sends the processed data.
  • the server sends the processed data to the cloud terminal through the network.
  • An example of an application scenario is that the server sends the encoded encoded frame to the cloud terminal, where the encoded frame is processed and generated by a module responsible for encoding within the server.
  • An example of an application scenario is that the server sends the decoded decoded frame to the cloud terminal, where the decoded frame is processed and generated by a module responsible for decoding inside the server.
  • the server is continuously sending a processed video stream.
  • the server after receiving an instruction to stop encoding and decoding or stopping video streaming, the server will simultaneously send a response to the cloud terminal after stopping the encoding and decoding service.
  • Step 205 The cloud terminal receives the processed data.
  • the cloud terminal receives the data returned by the server from the network.
  • the data may include processed decoded frames or compressed frames.
  • An example of an application scenario is that a video playback application has previously sent a decoding request, and after receiving the decoded stream returned by the server, the cloud terminal forwards the data to the video playback application at the application layer through the framework layer, and the video playback application sends the decoded data.
  • the video stream is presented in the user interface of the application.
  • the desktop content on which the user interface of the application is located will be delivered to a terminal.
  • a video call application has previously sent an encoding request, and after receiving the encoded stream returned by the server, the cloud terminal forwards the data to the video playback application at the application layer through the framework layer, and the video call application
  • the video stream is sent to one or more other terminals through the network or stored in the cloud. For example, the terminal used by the object of the video call with the current user will receive the encoded video stream.
  • FIG. 6 is a schematic diagram of a system structure of a data processing method provided by an embodiment of the present application, including an internal structure diagram of a cloud terminal 001 and a server 002 .
  • the cloud terminal includes an application layer and an architecture layer, wherein the application layer includes various types of applications, and this embodiment mainly involves two types of applications 101 and 102 .
  • Application 101 requires the architecture layer to provide video encoding services
  • application 102 requires the architecture layer to provide video decoding services.
  • the architecture layer includes a codec management module 111, which consists of a media codec interface, a software codec plug-in or hardware codec plug-in, and a corresponding control module. It is responsible for receiving codec or decoding requests from applications such as live broadcast, video calls, and video playback.
  • the communication module 114 of the cloud terminal and the communication module 121 of the server are used to transmit data and control instructions in the network for the cloud terminal and the transcoding cluster through a transmission protocol.
  • the server transcoding management module 122 is responsible for receiving the encoding or decoding request of the cloud phone encoding or decoding module, and delivering the encoding or decoding task to the corresponding external encoding or decoding module, and is responsible for receiving the encoded or decoded data and forwarding it to the communication module 121.
  • the encoder module 123 is responsible for the real video encoding work, receives the original video frame, encodes it by the hardware encoding chip, and returns the compressed frame;
  • the decoder set module 124 is responsible for the real video decoding work, receives the original compressed frame, and is processed by the hardware decoding chip. After decoding, the decoded frame is returned.
  • the encoder module 123 and the decoder module 124 may also belong to the same functional module, which does not affect the solution of this embodiment.
  • FIG. 7 it is a schematic diagram of the system structure of another data processing method provided by the present application.
  • the codec service of the cloud terminal is carried by a cloud server cluster or data center, rather than a physical server.
  • the cloud server cluster 003 or the data center 004 may include one or more management nodes 131 and two sub-clusters, namely the encoding cluster 132 and the decoding cluster 133, respectively responsible for the real encoding work and decoding work.
  • the encoding cluster 132 and the decoding cluster 133 may also be combined or separately distributed in one or more service clusters.
  • the management node 131 in FIG. 7 may include two functions of communication and cluster management, and each management node may be composed of a server, which The server may not include encoding or decoding modules.
  • FIG. 8 is an example diagram of a data processing method framework provided by an embodiment of the present application, which is a further explanation of the system in FIG. 7 .
  • the transcoding management module 111 is further divided into a media encoding/transcoding interface, a software or hardware encoding/decoding plug-in, and a control unit according to functions, wherein the software or hardware transcoding plug-ins 115 and 116 need to be responsible for creating threads and
  • the hardware transcoding control module 113 or the software transcoding module 112 is invoked to implement software and hardware encoding and decoding.
  • the hardware transcoding module 113 is used to implement specific control of hardware encoding or decoding, including enabling encoding or decoding, sending encoding or decoding parameters, sending encoded or decoded video frames, receiving encoded or decoded video frames, and closing Encoder or decoder, etc.
  • the software transcoding module 112 is used to implement specific control of software encoding or decoding, including enabling encoding or decoding, sending encoding or decoding parameters, sending video frames to be encoded or decoded, receiving encoded or decoded video frames, and closing encoding. or decoder etc.
  • the size of the serial number does not represent the actual execution order, but only serves as an identifier to represent a certain action and step. If the number of occurrences of a certain identifier is greater than one, it represents The same or similar actions and steps are performed at the identified location.
  • the flow steps include steps 401 to 420 .
  • Step 401 request video encoding or decoding.
  • the video encoding or decoding request is usually initiated by the application, and different types of applications may issue the video encoding or decoding request.
  • mobile phone live broadcast applications can send encoding requests
  • video playback applications can send software decoding requests
  • cloud mobile games and video calls in mobile office scenarios can send encoding and decoding requests at the same time.
  • Step 402 Invoke a software codec plug-in.
  • the media codec interface calls the software codec plug-in.
  • the media codec interface may be a native interface of the cloud terminal operating system. In order not to affect the invocation of the application layer, the native media codec interface can be retained.
  • the software codec plug-in may be some existing plug-ins, or a plug-in developed by the inventor.
  • Step 403 calling the hardware codec plug-in.
  • the media codec interface calls the hardware codec plug-in.
  • the cloud phone in the prior art only supports step 402, so that some applications need to call the software function of hardware codec unavailable.
  • the inventor can develop a hardware codec plug-in according to the requirements.
  • the embodiment of the method can realize the function of calling a hardware chip to perform encoding or decoding, thereby improving the compatibility of cloud mobile phone application software.
  • Step 404 the software codec plug-in calls the corresponding software codec control unit, creates threads, manages multiple streams, and realizes overall control of hardware encoding or decoding work.
  • Step 405 the hardware codec plug-in calls the corresponding hardware codec control unit, creates threads, manages multiple streams, and realizes overall control of the hardware codec or decoding work.
  • Step 406 Send the original frame or the compressed frame.
  • the software encoding/decoding control unit 112 sends the data of the original frame or the compressed frame to be encoded or decoded to the client Socket, optionally, the client RPC.
  • the hardware codec control unit 113 sends the data of the original frame or the compressed frame to be encoded or decoded to the client Socket, optionally, the client RPC.
  • Step 407 enable or disable the encoding or decoding service.
  • the software codec control unit sends a start or stop request, and the client Socket (or RPC) receives it and forwards it to the server Socket (or RPC) through the network, which is used to start or close the encoding or decoding service of the remote transcoding cluster.
  • the hardware decoding control unit sends a start or stop request, and the client Socket (or RPC) receives it and forwards it to the server Socket (or RPC) through the network, which is used to start or stop the encoding or decoding service of the remote transcoding cluster.
  • the request to enable or disable may be determined according to a request sent by an application (or user).
  • Step 408 Send the original frame or the compressed frame.
  • the client Socket (or RPC) sends the data of the encoded frame or decoded frame received from the network to the software codec unit.
  • the client Socket (or RPC) sends the data of the encoded frame or decoded frame received from the network to the hardware codec unit.
  • Step 409 enable or disable the response.
  • the client Socket receives the service response of the encoding or decoding cluster from the network, and sends it to the software codec unit, which is used to start or close the software codec unit response operation.
  • the client Socket receives the service response of the encoding or decoding cluster from the network, and sends it to the hardware decoding unit to enable or disable the response operation of the hardware decoding unit.
  • Step 410 Send a request instruction.
  • the instruction received from the network is sent to the transcoding cluster management 131 by the server Socket (or RPC), and in some embodiments, the instruction may include starting encoding, starting decoding, closing encoding, closing decoding, and the like.
  • Step 411 Send the original compressed frame or video frame.
  • the server Socket (or RPC) sends the original image frame or encoded frame received from the network to the transcoding cluster management unit 122 .
  • Step 412 returning the processed decoded frame or compressed frame.
  • the transcoding cluster management 131 returns the processed decoded frame or compressed frame to the server Socket or RPC.
  • Step 413 returning a service response.
  • the processing response is returned by the transcoding cluster management unit, and the server Socket (or RPC) forwards the response.
  • Step 414 sending an instruction to start the encoder.
  • the transcoding cluster management 131 sends an instruction to start the encoder to the encoding cluster 132, and the encoding cluster 132 starts encoding after receiving the startup instruction.
  • Step 415 Send the original video frame.
  • Transcoding cluster management 131 sends raw video frames to encoding cluster 132 .
  • Step 416 sending an instruction to turn off the encoder.
  • the transcoding cluster management 131 sends the instruction of closing the encoder to the encoding cluster 132, and the encoding cluster 132 stops transcoding after receiving the closing instruction.
  • Step 417 returning to the compressed frame.
  • the processed compressed frames are returned by the encoding cluster 132 to the transcoding cluster management 131 .
  • Step 418 Send an instruction to start the decoder.
  • the transcoding cluster management 131 sends the instruction of starting the decoder to the decoding cluster 133, and the decoding cluster 133 starts decoding after receiving the starting instruction.
  • Step 419 Send an instruction to close the decoder.
  • the transcoding cluster management 131 sends an instruction to close the decoder to the decoding cluster 133, and the decoding cluster 133 stops transcoding after receiving the activation instruction.
  • Step 420 Send the original compressed frame.
  • the original compressed frames are sent to the decoding cluster 133 by the transcoding cluster management 131 .
  • Step 421 returning the decoded frame.
  • the processed decoded frames are returned to the transcoding cluster management 131 by the decoding cluster 133 .
  • FIG. 9 is a schematic diagram of a method that may involve cloud terminal data processing in a cloud mobile phone shopping live broadcast scenario provided by an embodiment of the present application.
  • the cloud server cluster can provide the encoding and decoding services described above. Office scenarios require a larger cloud server cluster. Then, you need to complete the configuration for connecting the cloud phone to the external transcoding cluster, such as the IP and port configuration of the socket on the cloud phone. Finally, use the configured cloud phone and cloud server cluster for live broadcast and mobile office.
  • FIG. 9 is a schematic diagram of a method that may involve cloud terminal data processing in a cloud mobile phone shopping live broadcast scenario provided by an embodiment of the present application.
  • serial numbers 501-514 represent the key steps involved in this embodiment, which describe that in a cloud mobile phone shopping live broadcast, from user A starting the live broadcast, the shopping live broadcast application sends a software coding request until the user
  • this method is how to perform remote hardware video encoding services based on cloud mobile phones.
  • Step 501 User A opens the shopping live broadcast application software on the cloud mobile phone, and starts the live broadcast.
  • the user may remotely control the application on the cloud terminal 001 based on the visual interface of the terminal 005 shown in FIG. 4 .
  • the terminal 005 may be a smart phone, including a camera or other photographing device, which is used to collect the video stream of the user during the live broadcast in real time, and transmit the video stream to the cloud phone synchronously.
  • Step 502 The shopping live broadcast application invokes the MediaCodec interface to start the video encoding operation.
  • the live application receives the video stream, sends a software encoding request to the MediaCodec interface, and requests the encoding service of the cloud server cluster;
  • Steps 503-404 The MediaCodec process invokes the encoder control unit based on the software encoding plug-in to create an encoding thread.
  • Step 505 The encoder control unit generates a relevant instruction, the instruction includes an encoding rule, and modifies the encoding mode in the encoding rule from software encoding to hardware encoding.
  • the encoder control unit establishes a socket connection with the external transcoding cluster through the client socket, and sends a request to start the external hardware encoder to the server socket.
  • Step 506 The server socket of the cloud server cluster forwards the received hardware coding instruction to the transcoding cluster management node. After the transcoding cluster management node receives the instruction to start the specific external encoder, it creates a thread to start the coding cluster.
  • Step 507 The cloud phone encoder control unit sends a request for obtaining the encoding header information, and the client socket forwards the request to the client socket of the cloud server cluster.
  • Step 508 The transcoding cluster management node requests and obtains the encoding header from the encoder module of a specific server in the encoding cluster, and forwards it to the cloud mobile phone through the network.
  • Step 509 The cloud phone encoder control unit receives the response of the encoding header information.
  • Step 510 The cloud phone encoder control module sends the original video frame data to the transcoding management node of the cloud server cluster, and requests the external encoding cluster to perform hardware encoding.
  • Step 511 The transcoding cluster management node is responsible for allocating the encoding server to the cloud mobile phone, and the cloud mobile phone sends the original video frame to the encoder of the specific server.
  • Step 512 The encoder returns the encoded compressed video frame to the transcoding cluster management node, and forwards it to the cloud mobile phone through the network.
  • Step 513 The encoder module of the cloud phone receives the compressed video frame data through the socket, and returns it to the live broadcast application for use.
  • the live application on the cloud mobile phone will receive the compressed frame data stream and forward it to the public cloud. More network users can download the compressed frame data stream on their mobile phones or PCs and other terminals. After decoding locally, they can watch the video in real time. Live shopping.
  • Step 514 User A closes the shopping live broadcast application on the cloud mobile phone, and ends the live broadcast.
  • Step 515 The shopping live broadcast application software ends the video encoding operation by calling the MediaCodec interface.
  • Steps 516-517 the MediaCodec process calls the encoder control unit based on the software encoding plug-in, and requests to end encoding;
  • Step 518 The encoder control unit releases the remote encoder, sends a request to close the encoder of the server, and closes the socket connection with the cloud server cluster.
  • Step 519 The transcoding cluster management node closes the encoding service of the specific server.
  • FIG. 10 is an apparatus 300 deployed on a server 002 according to an embodiment of the present application.
  • the apparatus 300 includes a receiving unit 301 , a processing unit 302 , and a sending unit 303 .
  • the receiving unit 301 is configured to receive data from the cloud terminal 001 .
  • the data may be data to be encoded or decoded.
  • the data may further include an instruction for instructing an encoding or decoding task.
  • the content of the instruction please refer to the foregoing related description.
  • the processing unit 302 is used for encoding or decoding data.
  • the processing unit encodes the data to be encoded, and the encoding method includes hardware encoding or software encoding. Please refer to the foregoing description.
  • the processing unit decodes the data to be decoded, and the decoding method includes hardware decoding or software decoding. Please refer to the foregoing description.
  • the sending unit 303 is configured to send data to the cloud terminal 001 .
  • the transmitted data is already decoded or encoded data.
  • the processing unit 302 is configured to perform hardware encoding on the data or perform software encoding on the data.
  • the processing unit 302 is configured to perform hardware decoding on the data or perform software decoding on the data.
  • This embodiment of the present application further provides a computing device 600, as shown in FIG. 11 .
  • the computing device 600 may be a device for deploying the cloud terminal 001 , or the computing device 600 may be the server 002 .
  • FIG. 11 provides a schematic structural diagram of a computing device 600 .
  • the computing device 600 includes a bus 601 , a processor 602 and a memory 603 .
  • the processor 602 and the memory 603 communicate through the bus 601 .
  • the bus 601 may be a peripheral component interconnection standard bus or an extended industry standard structure bus or the like.
  • the processor 602 may be a central processing unit (Central Processing Unit, CPU), in addition, there may also be a graphics processing unit (graphics processing unit, GPU), a neural network processor (Neural network Processing Unit, NPU), FPGA (Field Programmable Gate) Array) one or more.
  • the memory 603 may include random access memory (RAM), read-only memory (ROM), flash memory, hard drive (HDD) or solid state drive (SSD) ) one or more of.
  • Executable program codes are stored in the memory 603, and the processor 602 executes the executable program codes to realize the functions of the aforementioned cloud terminal 001 or the functions of the server 002, or to execute the steps performed by the terminal 001 in the methods described in the aforementioned embodiments. Or steps performed by server 002 .

Abstract

A data processing method and system, a cloud terminal, a server, a computing device, and a computer program product, for use in solving the problems of insufficient CPU resources of a cloud terminal and software compatibility. The method comprises: a cloud terminal sends data; a server receives the data; the server processes the data, wherein the processing is to encode or decode the data; the server sends the processed data to the could terminal.

Description

数据处理的方法和系统、云终端、服务器和计算设备Data processing method and system, cloud terminal, server and computing device 技术领域technical field
本发明涉及云技术领域,主要涉及一种数据处理的方法和系统、云终端、服务器、计算设备和计算机程序产品。The present invention relates to the field of cloud technology, and mainly relates to a data processing method and system, a cloud terminal, a server, a computing device and a computer program product.
背景技术Background technique
云手机(Cloud Phone)作为一种新型服务,对物理手机起到非常好的延展和补充作用,并开始在云手机游戏、云手机直播、移动办公等场景崭露头角。在上述场景中,均会涉及到视频的编解码,例如:(1)云手机游戏,需将手机屏幕画面(或游戏画面)进行视频编码后,通过网络传输到物理手机;(2)直播场景下,需将接收到的物理手机的摄像头画面数据进行视频解码并显示在云手机,当云手机上启动直播应用时,云手机将该摄像头画面数据进行视频编码并发送到直播平台;(3)移动办公场景,政府、金融等信息安全诉求较高行业员工通过即时通讯应用进行视频通话时,云手机上的摄像头画面需进行视频编码,在视频会议共享播放视频时,需进行视频解码。As a new type of service, Cloud Phone plays a very good role in extending and supplementing physical mobile phones, and has begun to emerge in scenarios such as cloud mobile games, cloud mobile live broadcasts, and mobile office. In the above scenarios, the encoding and decoding of video will be involved, for example: (1) cloud mobile game, the screen (or game screen) of the mobile phone needs to be encoded and transmitted to the physical mobile phone through the network; (2) live broadcast scene In the next step, the received camera screen data of the physical mobile phone needs to be decoded and displayed on the cloud mobile phone. When the live application is started on the cloud mobile phone, the cloud mobile phone will encode the camera screen data and send it to the live broadcast platform; (3) In mobile office scenarios, when employees in industries with high demands on information security, such as government and finance, make video calls through instant messaging applications, the camera images on the cloud phone need to be encoded.
然而,由于视频编解码对云手机CPU性能要求比较高,为满足云手机直播、移动办公的需求,就必须提高单台云手机的CPU规格,这样将会产生两个弊端:(1)使单台云手机的成本费用增加,不利于构建云手机在直播、移动办公领域的竞争优势;(2)此外,云手机的使用时间具有一定的时段性,例如直播和移动办公分别集中在白天上班、晚上下班休闲时间,会造成云手机的CPU资源的浪费。However, due to the high performance requirements of the cloud mobile phone for video encoding and decoding, in order to meet the needs of cloud mobile phone live broadcasting and mobile office, it is necessary to increase the CPU specifications of a single cloud mobile phone, which will cause two drawbacks: (1) Make a single cloud mobile phone The increased cost of Taiyun mobile phone is not conducive to building the competitive advantage of cloud mobile phone in the field of live broadcast and mobile office; (2) In addition, the use time of cloud mobile phone has a certain period of time, for example, live broadcast and mobile office are concentrated in the daytime work, Leisure time after get off work at night will cause a waste of CPU resources of the cloud phone.
发明内容SUMMARY OF THE INVENTION
下面结合附图详细介绍本申请实施例提供的一种数据处理的方法和系统、云终端、服务器、计算设备和计算机程序产品处理数据,可以减少对云手机的CPU资源的占用。The data processing method and system, cloud terminal, server, computing device and computer program product provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings, which can reduce the occupation of CPU resources of cloud mobile phones.
在本公开的第一方面,提供了一种数据处理的方法,应用于云终端和服务器之间。该方法包括:云终端发送数据;服务器接收该数据;服务器对该数据进行处理,其中,该处理为对该数据进行编码或对该数据进行解码;服务器向云终端发送处理后的数据。In a first aspect of the present disclosure, a data processing method is provided, which is applied between a cloud terminal and a server. The method includes: the cloud terminal sends data; the server receives the data; the server processes the data, wherein the processing is to encode or decode the data; and the server sends the processed data to the cloud terminal.
本申请提供的处理数据的方法,将云终端的编码和解码任务分担到服务器上,使得云终端的处理器资源得到了节约,降低了单台云终端的成本和规格。服务器拥有的强大计算资源,进一步提升云终端上的编码和解码任务的效率。The data processing method provided by the present application shares the encoding and decoding tasks of the cloud terminal on the server, so that the processor resources of the cloud terminal are saved, and the cost and specifications of a single cloud terminal are reduced. The powerful computing resources owned by the server further improve the efficiency of encoding and decoding tasks on the cloud terminal.
第一方面的一种可能设计,所述服务器对该数据进行编码包括:对该数据进行硬件编码或者软件编码。In a possible design of the first aspect, the encoding of the data by the server includes: hardware encoding or software encoding of the data.
由服务器的编码器模块负责该编码任务。其中,软件编码任务在CPU上运行;硬件编码任务在硬件编解码芯片上运行。当编码任务在服务器执行时,服务器可以提供更高的编码效率。The encoder module of the server is responsible for this encoding task. Among them, the software coding task runs on the CPU; the hardware coding task runs on the hardware coding and decoding chip. When the encoding task is performed on the server, the server can provide higher encoding efficiency.
第一方面的一种可能设计,所述服务器对该数据进行解码包括:对该数据进行硬件解码或者软件解码。In a possible design of the first aspect, the server decoding the data includes: performing hardware decoding or software decoding on the data.
由服务器的解码器模块负责该解码任务。其中,软件解码任务在CPU上运行,硬件 解码任务在硬件编解码芯片上运行。当解码任务在服务器执行时,服务器可以提供更高的解码效率。The decoder module of the server is responsible for this decoding task. Among them, the software decoding task runs on the CPU, and the hardware decoding task runs on the hardware codec chip. When the decoding task is performed on the server, the server can provide higher decoding efficiency.
第一方面的一种可能设计,所述数据处理的方法还包括:云终端向服务器发送处理规则;该处理规则用于确定对该数据进行硬件编码或者软件解码,或者该处理规则用于确定对该数据进行软件编码或者软件解码。In a possible design of the first aspect, the data processing method further includes: the cloud terminal sends a processing rule to the server; the processing rule is used to determine whether to perform hardware encoding or software decoding on the data, or the processing rule is used to determine whether to perform hardware encoding or software decoding on the data. The data is software encoded or software decoded.
云终端向服务器发送指令和数据,指令中包括处理规则,处理规则中包括编码方式或解码方式:编码方式包括硬件编码或者软件编码,解码方式包括硬件解码或者软件解码。服务器根据编码方式和解码方式的不同,调用不同的编码模块和解码模块分别进行运算,可参考前文的描述。The cloud terminal sends instructions and data to the server, the instructions include processing rules, and the processing rules include encoding or decoding methods: encoding methods include hardware encoding or software encoding, and decoding methods include hardware decoding or software decoding. According to the different encoding and decoding methods, the server calls different encoding modules and decoding modules to perform operations respectively. Please refer to the description above.
第一方面的一种可能设计,所述数据处理的方法还包括:云终端发送数据之前,云终端获取终端对所述数据进行处理的请求。In a possible design of the first aspect, the data processing method further includes: before the cloud terminal sends the data, the cloud terminal obtains a request from the terminal to process the data.
在云终端向服务器发送数据之前,云终端要先从终端获取一个数据处理的请求。这个请求来自一个物理终端,且是由终端的用户触发的。Before the cloud terminal sends data to the server, the cloud terminal must first obtain a data processing request from the terminal. This request comes from a physical terminal and is triggered by the terminal's user.
第一方面的一种可能设计,所述数据处理的方法还包括:云终端发送数据之前,云终端获取对该数据进行处理的请求,该请求是所述云终端上的应用触发的。In a possible design of the first aspect, the data processing method further includes: before the cloud terminal sends the data, the cloud terminal obtains a request for processing the data, and the request is triggered by an application on the cloud terminal.
在云终端向服务器发送数据之前,云终端从应用获取一个数据处理的请求,该请求与应用层的编码或解码需求有关。如果该应用需要编码则发出编码请求,如果该应用需要解码则发出解码请求。Before the cloud terminal sends data to the server, the cloud terminal obtains a data processing request from the application, and the request is related to the encoding or decoding requirements of the application layer. An encoding request is issued if the application requires encoding, and a decoding request is issued if the application requires decoding.
其中,该应用所发出的请求中的处理规则,与本发明第一方面的第三种可能的实现方式中,云终端向服务器发送的处理规则并不等同,即云终端可以对该处理规则进行修改,并将修改后的处理规则发送给服务器。修改的方式有四种:软件编码改为硬件编码、硬件编码改为软件编码、软件解码改为硬件解码、硬件解码改为软件解码。其中,软件编码改为硬件编码和软件解码改为硬件解码,可以提高编码和解码的效率、减少对云终端CPU资源的效率,还可以解决部分应用在云终端上调用硬件编码或硬件解码时不兼容的问题。The processing rule in the request sent by the application is not the same as the processing rule sent by the cloud terminal to the server in the third possible implementation manner of the first aspect of the present invention, that is, the cloud terminal can perform the processing rule on the processing rule. Modify and send the modified processing rules to the server. There are four ways to modify: software encoding to hardware encoding, hardware encoding to software encoding, software decoding to hardware decoding, and hardware decoding to software decoding. Among them, changing software encoding to hardware encoding and software decoding to hardware decoding can improve the efficiency of encoding and decoding, reduce the efficiency of cloud terminal CPU resources, and can also solve the problem that some applications cannot use hardware encoding or hardware decoding on cloud terminals. compatibility issues.
第一方面的一种可能设计,所述数据处理的方法还包括:云终端向终端发送根据所述数据得到的虚拟桌面。In a possible design of the first aspect, the data processing method further includes: the cloud terminal sends the virtual desktop obtained according to the data to the terminal.
云终端的应用基于处理后的数据获得虚拟桌面,并将该虚拟桌面下发至终端,以便终端显示该虚拟桌面给用户。The application of the cloud terminal obtains the virtual desktop based on the processed data, and delivers the virtual desktop to the terminal, so that the terminal displays the virtual desktop to the user.
第二方面,本发明提供了一种处理数据的系统,该系统包括:In a second aspect, the present invention provides a system for processing data, the system comprising:
云终端,用于向服务器发送数据;Cloud terminal, used to send data to the server;
服务器,用于接收该数据,对所述数据进行处理后,向云终端发送处理后的数据,所述处理为对该数据进行编码或者对该数据进行解码。The server is configured to receive the data, and after processing the data, send the processed data to the cloud terminal, and the processing is to encode or decode the data.
本申请提供的处理数据的方法,将云终端的编码和解码任务分担到服务器上,使得云终端的处理器资源得到了节约,降低了单台云终端的成本和规格。服务器拥有的强大计算资源,进一步提升云终端的编码和解码任务的效率。The data processing method provided by the present application shares the encoding and decoding tasks of the cloud terminal on the server, so that the processor resources of the cloud terminal are saved, and the cost and specifications of a single cloud terminal are reduced. The powerful computing resources owned by the server further improve the efficiency of the encoding and decoding tasks of the cloud terminal.
第二方面的一种可能设计,所述服务器还包括:用于对该数据进行硬件编码或者软件编码。In a possible design of the second aspect, the server further includes: hardware encoding or software encoding for the data.
由服务器的编码器模块负责该编码任务。其中,软件编码任务在CPU上运行;硬件 编码任务在硬件编解码芯片上运行。当编码任务在服务器执行时,服务器可以提供更高的编码效率。The encoder module of the server is responsible for this encoding task. Among them, the software coding task runs on the CPU; the hardware coding task runs on the hardware codec chip. When the encoding task is performed on the server, the server can provide higher encoding efficiency.
第二方面的一种可能设计,所述服务器还包括:用于对该数据进行硬件解码或者软件解码。In a possible design of the second aspect, the server further includes: hardware decoding or software decoding for the data.
由服务器的解码器模块负责该解码任务。其中,软件解码任务在CPU上运行;硬件解码任务在硬件编解码芯片上运行。当解码任务在服务器执行时,服务器可以提供更高的解码效率。The decoder module of the server is responsible for this decoding task. Among them, the software decoding task runs on the CPU; the hardware decoding task runs on the hardware codec chip. When the decoding task is performed on the server, the server can provide higher decoding efficiency.
第二方面的一种可能设计,所述数据处理的系统还包括:In a possible design of the second aspect, the data processing system further includes:
云终端,用于向服务器发送处理规则,其中,该处理规则用于确定对该数据进行硬件编码或者软件解码,或者该处理规则用于确定对该数据进行软件编码或者软件解码。The cloud terminal is used to send a processing rule to the server, where the processing rule is used to determine whether to perform hardware encoding or software decoding on the data, or the processing rule is used to determine whether to perform software encoding or software decoding on the data.
云终端向服务器发送指令和数据,指令中包括处理规则,处理规则中包括编码方式或解码方式:编码方式包括硬件编码或者软件编码,解码方式包括硬件解码或者软件解码。服务器根据编码方式和解码方式的不同,调用不同的编码模块和解码模块分别进行运算,可参考前文的描述。The cloud terminal sends instructions and data to the server, the instructions include processing rules, and the processing rules include encoding or decoding methods: encoding methods include hardware encoding or software encoding, and decoding methods include hardware decoding or software decoding. According to the different encoding and decoding methods, the server calls different encoding modules and decoding modules to perform operations respectively. Please refer to the description above.
第二方面的一种可能设计,所述数据处理的系统还包括:In a possible design of the second aspect, the data processing system further includes:
云终端,用于获取终端对所述数据进行处理的请求。The cloud terminal is used to obtain a request from the terminal to process the data.
在云终端向服务器发送数据之前,云终端要先从终端获取一个数据处理的请求,这个请求来自一个物理终端,且是由终端的用户触发的。Before the cloud terminal sends data to the server, the cloud terminal must first obtain a data processing request from the terminal. This request comes from a physical terminal and is triggered by the user of the terminal.
第二方面的一种可能设计,所述数据处理的方法还包括:In a possible design of the second aspect, the data processing method further includes:
云终端,用于获取对该数据进行处理的请求,该请求是所述云终端上的应用触发的。The cloud terminal is used to obtain a request for processing the data, where the request is triggered by an application on the cloud terminal.
在云终端向服务器发送数据之前,云终端从应用获取一个数据处理的请求,该请求与应用层的编码或解码需求有关。如果该应用需要编码则发出编码请求,如果该应用需要解码则发出解码请求。Before the cloud terminal sends data to the server, the cloud terminal obtains a data processing request from the application, and the request is related to the encoding or decoding requirements of the application layer. An encoding request is issued if the application requires encoding, and a decoding request is issued if the application requires decoding.
其中,该应用所发出的请求中的处理规则,与本发明第二方面的第三种可能的实现方式中,云终端向服务器发送的处理规则并不等同,即云终端可以对该处理规则进行修改,并将修改后的处理规则发送给服务器。修改的方式有四种:软件编码改为硬件编码、硬件编码改为软件编码、软件解码改为硬件解码、硬件解码改为软件解码。其中,软件编码改为硬件编码和软件解码改为硬件解码,可以提高编码和解码的效率、减少对云终端CPU资源的效率,还可以解决部分应用在云终端上调用硬件编码或解码时不兼容的问题。The processing rule in the request sent by the application is not the same as the processing rule sent by the cloud terminal to the server in the third possible implementation manner of the second aspect of the present invention, that is, the cloud terminal can perform the processing rule on the processing rule. Modify and send the modified processing rules to the server. There are four ways to modify: software encoding to hardware encoding, hardware encoding to software encoding, software decoding to hardware decoding, and hardware decoding to software decoding. Among them, changing software encoding to hardware encoding and software decoding to hardware decoding can improve the efficiency of encoding and decoding, reduce the efficiency of cloud terminal CPU resources, and can also solve the incompatibility of some applications when calling hardware encoding or decoding on cloud terminals The problem.
第二方面的一种可能设计,所述数据处理的系统还包括:In a possible design of the second aspect, the data processing system further includes:
云终端,用于向终端发送根据所述数据得到的虚拟桌面。The cloud terminal is used for sending the virtual desktop obtained according to the data to the terminal.
云终端的应用基于处理后的数据获得虚拟桌面,并将该虚拟桌面下发至终端,以便终端显示该虚拟桌面给用户。The application of the cloud terminal obtains the virtual desktop based on the processed data, and delivers the virtual desktop to the terminal, so that the terminal displays the virtual desktop to the user.
第二方面的一种可能设计,所述数据处理的系统还包括:云终端是云手机。In a possible design of the second aspect, the data processing system further includes: the cloud terminal is a cloud mobile phone.
第三方面,本申请提供一种云终端,该云终端为本申请第二方面或者第二方面的任一可能设计提供的云终端。In a third aspect, the present application provides a cloud terminal, which is the cloud terminal provided by the second aspect of the present application or any possible design of the second aspect.
第四方面,本申请提供一种服务器,该服务器为本申请第二方面或者第二方面的任一可能设计提供的服务器。In a fourth aspect, the present application provides a server, which is the server provided by the second aspect of the present application or any possible design of the second aspect.
第五方面,本申请提供一种计算设备,所述计算设备包括处理器、存储器。所述处理器执行所述存储器中的指令,使得所述计算设备实现本申请第二方面或者第二方面的任一可能设计提供的云终端或者服务器。In a fifth aspect, the present application provides a computing device, where the computing device includes a processor and a memory. The processor executes the instructions in the memory, so that the computing device implements the cloud terminal or server provided by the second aspect or any possible design of the second aspect of the present application.
第六方面,本申请提供一种计算机程序产品,所述计算机程序产品包括指令,所述指令用于实现本申请第一方面或者第一方面的任一可能设计提供的方法中由云终端执行的步骤,和/或用于实现申请第一方面或者第一方面的任一可能设计提供的方法中由服务器执行的步骤。In a sixth aspect, the present application provides a computer program product, wherein the computer program product includes instructions for implementing the method executed by the cloud terminal in the first aspect of the present application or the method provided by any possible design of the first aspect. steps, and/or steps executed by a server for implementing the method provided by the first aspect of the application or any possible design of the first aspect.
本申请在上述各方面提供的实现方式的基础上,还可以进行进一步组合以提供更多实现方式。On the basis of the implementation manners provided by the above aspects, the present application may further combine to provide more implementation manners.
附图说明Description of drawings
图1是本申请实施例提供的数据处理的系统结构的举例示意图。FIG. 1 is a schematic diagram of an example of a system structure for data processing provided by an embodiment of the present application.
图2是本申请实施例提供的数据处理的系统结构的举例示意图。FIG. 2 is a schematic diagram of an example of a system structure for data processing provided by an embodiment of the present application.
图3是本申请实施例提供的数据处理的系统结构的举例示意图。FIG. 3 is an exemplary schematic diagram of a system structure for data processing provided by an embodiment of the present application.
图4是本申请举例提供的数据处理的系统结构的举例示意图。FIG. 4 is an example schematic diagram of a system structure for data processing provided by an example in the present application.
图5是本申请实施例提供的数据处理的方法流程图。FIG. 5 is a flowchart of a data processing method provided by an embodiment of the present application.
图6是本申请实施例提供的数据处理的系统结构的举例示意图。FIG. 6 is a schematic diagram illustrating an example of a system structure for data processing provided by an embodiment of the present application.
图7是本申请实施例提供的数据处理方法的系统结构的举例示意图FIG. 7 is a schematic diagram of an example of a system structure of a data processing method provided by an embodiment of the present application
图8是本申请实施例提供的数据处理的方法框架的举例示例图。FIG. 8 is an example diagram of a method framework for data processing provided by an embodiment of the present application.
图9是本申请实施例提供的云手机购物直播场景下涉及到数据处理的方法的举例示意图。FIG. 9 is a schematic diagram of an example of a method involving data processing in a cloud mobile phone shopping live broadcast scenario provided by an embodiment of the present application.
图10是本申请实施例提供的装置300的举例结构图。FIG. 10 is an example structural diagram of an apparatus 300 provided by an embodiment of the present application.
图11是申请实施例提供的计算设备600的举例结构图。FIG. 11 is an example structural diagram of a computing device 600 provided by an embodiment of the application.
具体实施方式detailed description
图1是本申请实施例提供的一种数据处理的系统结构示意图,如图1所示,该系统可以包括云终端001和服务器002。FIG. 1 is a schematic structural diagram of a data processing system provided by an embodiment of the present application. As shown in FIG. 1 , the system may include a cloud terminal 001 and a server 002 .
在一种实施例中,云终端001可以是提供虚拟桌面的虚拟设备,例如该虚拟设备可以是实例,实例可以是虚拟机或者容器。一种可以的实现方式,云终端001为云手机。In one embodiment, the cloud terminal 001 may be a virtual device that provides a virtual desktop, for example, the virtual device may be an instance, and the instance may be a virtual machine or a container. In a possible implementation manner, the cloud terminal 001 is a cloud mobile phone.
服务器002可以是具有计算能力的设备,服务器002具有存储器和处理器。服务器002的处理器可以为中央处理器(Central Processing Unit,CPU)。可选的,服务器002还可以有图形处理器(graphics processing unit,GPU)、神经网络处理器(Neural network Processing Unit,NPU)、FPGA(Field Programmable Gate Array)中的一种或多种,服务器002的存储器可以为随机存取存储器(random access memory,RAM)或者固态驱动器(solid-state drive,SSD)等其它具有存储能力的设备或者内存实例。固态驱动器也可以称为固态硬盘(solid-state drive,SSD)Server 002 may be a device having computing capabilities, server 002 having memory and a processor. The processor of the server 002 may be a central processing unit (Central Processing Unit, CPU). Optionally, the server 002 may also have one or more of a graphics processor (graphics processing unit, GPU), a neural network processor (Neural network Processing Unit, NPU), and an FPGA (Field Programmable Gate Array). The server 002 The memory can be random access memory (RAM) or solid-state drive (solid-state drive, SSD) and other devices or memory instances with storage capabilities. A solid-state drive may also be called a solid-state drive (SSD)
在本申请的实施例中,云终端001上可以安装有应用,应用可以包括视频直播、视频通话、视频会议、视频播放器、音频播放器、手机游戏等应用。可选的,云终端001上的应用可以发出编码或解码的请求,或者可以是同时发出编码和解码请求。In the embodiments of the present application, applications may be installed on the cloud terminal 001, and the applications may include applications such as live video, video calls, video conferences, video players, audio players, and mobile games. Optionally, the application on the cloud terminal 001 may issue a request for encoding or decoding, or may issue a request for encoding and decoding at the same time.
在一种实施例中,服务器002可以是部署在网络中的一台物理设备,云终端001和服务器002基于通讯协议或者调用协议进行通信,这样云终端001可以调用服务器002提供的服务或者和服务器002进行数据交互。例如,该通讯协议可以是套接字(Socket)。例如,该调用协议可以是远程过程调用(Remote Procedure Call,PRC)。In an embodiment, the server 002 may be a physical device deployed in the network, and the cloud terminal 001 and the server 002 communicate based on a communication protocol or a calling protocol, so that the cloud terminal 001 can call the service provided by the server 002 or communicate with the server 002 for data interaction. For example, the communication protocol may be Socket. For example, the calling protocol may be Remote Procedure Call (PRC).
一种实现场景举例,服务器002可以部署有软件编码模块和软件解码模块。软件编码模块用于对数据的进行编码。软件解码模块用于对数据进行解码。一种可以的实现方式,所述编码或解码的运算是在服务器002的CPU上运行的。一种可能实现方式,软件编码模块和软件编码模块可以直接部署在服务器002中,或者部署在服务器002运行的实例中。As an example of an implementation scenario, the server 002 may be deployed with a software encoding module and a software decoding module. The software encoding module is used to encode the data. The software decoding module is used to decode the data. In a possible implementation manner, the encoding or decoding operation is executed on the CPU of the server 002 . In a possible implementation manner, the software coding module and the software coding module can be directly deployed in the server 002, or deployed in an instance where the server 002 runs.
一种实现场景举例,服务器002可以是具备硬件编码能力的设备,服务器002部署有硬件编码模块和硬件解码模块。硬件编码模块用于对数据的进行编码。硬件解码模块用于对数据进行解码。一种可以的实现方式,该编码和解码的运算是在服务器002的硬件编码芯片上运行的,例如硬件编码芯片可以是GPU或者NPU或者其他具备硬件编码能力的芯片。As an example of an implementation scenario, the server 002 may be a device capable of hardware encoding, and the server 002 is deployed with a hardware encoding module and a hardware decoding module. The hardware encoding module is used to encode the data. The hardware decoding module is used to decode the data. In a possible implementation manner, the encoding and decoding operations are executed on a hardware encoding chip of the server 002 , for example, the hardware encoding chip may be a GPU or NPU or other chips with hardware encoding capability.
图2是本申请实施例提供的第二种数据处理的系统结构示意图,如图2所示,该服务器002还可以部署在一个云服务器集群003中。云服务器集群003中有多个与服务器002类似的服务器。云服务器集群003的服务器002还可以由一定数量的弹性云服务器(Elastic Cloud Server,ECS),即云服务器集群003中的服务器002的数量是可以弹性伸缩的。FIG. 2 is a schematic structural diagram of a second data processing system provided by an embodiment of the present application. As shown in FIG. 2 , the server 002 may also be deployed in a cloud server cluster 003 . There are multiple servers similar to the server 002 in the cloud server cluster 003 . The server 002 of the cloud server cluster 003 may also be composed of a certain number of elastic cloud servers (Elastic Cloud Server, ECS), that is, the number of the servers 002 in the cloud server cluster 003 can be elastically scaled.
图2是本申请实施例提供的第三种数据处理的系统结构示意图,如图3所示,该服务器002还可以部署在一个数据中心004中。FIG. 2 is a schematic structural diagram of a third data processing system provided by an embodiment of the present application. As shown in FIG. 3 , the server 002 may also be deployed in a data center 004 .
在一种可能的实施例中,在云服务器集群003(或数据中心004)中,可以包含一个或多个服务器,服务器可以提供编码能力,或者服务器可以提供解码能力,或者服务器同时提供编码和解码的能力。一种场景举例,用于编码的服务器和用于解码的服务器属于不同的集群或者数据中心。即用于编码的服务器组成的集群叫做编码集群,用于解码的服务器组成的集群叫做解码集群,用于编码的服务器组成所在的数据中心叫做编码数据中心,用于解码的服务器所在的数据中心叫做解码数据中心。In a possible embodiment, the cloud server cluster 003 (or the data center 004) may contain one or more servers, the server may provide encoding capability, or the server may provide decoding capability, or the server may provide encoding and decoding at the same time Ability. An example of a scenario is that the server used for encoding and the server used for decoding belong to different clusters or data centers. That is, the cluster consisting of the servers used for encoding is called the encoding cluster, the cluster consisting of the servers used for decoding is called the decoding cluster, the data center where the servers used for encoding are located is called the encoding data center, and the data center where the servers used for decoding are located is called the decoding cluster. Decode the data center.
图4是举例提供的另一种数据处理的系统结构示意图。如图4所示,基于图1至图3任一个系统结构示意图所描述的内容,该系统可以包括终端005。在一些实施例中,终端005可以是手机、平板或其它具有显示和通讯功能的物理设备。终端005可以通过网络和云终端001进行通讯,终端005将本地数据和指令上传到云终端001,云终端001可以将虚拟桌面下发至终端005,用户可以在终端005上对云终端001上运行的装有虚拟桌面操作系统进行控制。一种场景举例,图4中的服务器002还可以是图3和图4中的云服务器集群003或者数据中心004,云服务器集群003和数据中心004的实现方式请参照前文的描述。FIG. 4 is a schematic structural diagram of another data processing system provided by way of example. As shown in FIG. 4 , based on the content described in any one of the schematic diagrams of the system structure in FIG. 1 to FIG. 3 , the system may include a terminal 005 . In some embodiments, the terminal 005 may be a mobile phone, tablet or other physical device with display and communication functions. The terminal 005 can communicate with the cloud terminal 001 through the network, the terminal 005 uploads local data and instructions to the cloud terminal 001, the cloud terminal 001 can deliver the virtual desktop to the terminal 005, and the user can run the cloud terminal 001 on the terminal 005. is installed with a virtual desktop operating system for control. As an example of a scenario, the server 002 in FIG. 4 may also be the cloud server cluster 003 or the data center 004 in FIG. 3 and FIG.
示例性的,如图4所示,终端005可以从本地采集视频数据,上传采集的视频数据到云终端001的软件中。云终端001可以根据应用的需求向服务器002发送服务请求(例如编码请求或者解码请求),并将终端005在本地采集的视频数据转发给服务器002;服务器002将处理后的视频数据返回给云终端001的应用。云终端的应用基于处理后的视 频数据获得虚拟桌面,例如基于视频数据生成直播界面,该直播界面属于该虚拟桌面显示的部分或者全部内容。云终端001将该虚拟桌面下发至终端005的显示器上。Exemplarily, as shown in FIG. 4 , the terminal 005 may collect video data locally, and upload the collected video data to the software of the cloud terminal 001 . The cloud terminal 001 can send a service request (such as an encoding request or a decoding request) to the server 002 according to the needs of the application, and forward the video data locally collected by the terminal 005 to the server 002; the server 002 returns the processed video data to the cloud terminal 001 application. The application of the cloud terminal obtains a virtual desktop based on the processed video data, for example, a live broadcast interface is generated based on the video data, and the live broadcast interface belongs to part or all of the content displayed by the virtual desktop. The cloud terminal 001 delivers the virtual desktop to the display of the terminal 005 .
图5是本申请实施例提供的一种数据处理的方法流程图,该方法可以应用于如图1至图4所示的任一个系统中。图5是以该方法应用于如图1所示的系统架构的一个实施例,图1的系统中包括一个云终端和一个服务器。图2至图4的系统架构比图1复杂,应用于它们的方法实施例流程图的步骤会比图5更多,但它们的核心步骤仍然和图5所示的实施例的流程图相似。下面结合图1和图5举例说明本申请处理数据的方法的流程。该流程步骤包括步骤201至步骤205。FIG. 5 is a flowchart of a data processing method provided by an embodiment of the present application, and the method may be applied to any of the systems shown in FIG. 1 to FIG. 4 . FIG. 5 is an embodiment in which the method is applied to the system architecture shown in FIG. 1 . The system in FIG. 1 includes a cloud terminal and a server. The system architectures of FIGS. 2 to 4 are more complex than those of FIG. 1 , and the flowcharts of the method embodiments applied to them have more steps than those of FIG. 5 , but their core steps are still similar to the flowchart of the embodiment shown in FIG. 5 . The flow of the data processing method of the present application is illustrated below with reference to FIG. 1 and FIG. 5 . The flow steps include steps 201 to 205 .
步骤201、云终端向服务器发送数据。Step 201: The cloud terminal sends data to the server.
云终端将数据通过网络发送给服务器,该数据为待解码或者待编码的数据。The cloud terminal sends the data to the server through the network, and the data is the data to be decoded or encoded.
一种可能的实现的方式,云终端向服务器发送指示编码和指示解码的指令,指令包含编码或解码的规则。In a possible implementation manner, the cloud terminal sends instructions for encoding and decoding to the server, and the instructions include encoding or decoding rules.
可选地,该指令携带待编码或待解码的数据。Optionally, the instruction carries data to be encoded or decoded.
可选地,该指令和数据(待编码或待解码的数据)是独立发送的。Optionally, the instructions and data (data to be encoded or decoded) are sent independently.
在一个可能的实施例中,云终端可以是在持续发送一条视频流数据,在开始发送视频流的同时向服务器发送启动编码的指令,示例的,在视频流停止或应用发出停止的请求后,云终端会向服务器发出关闭编码服务的指令。In a possible embodiment, the cloud terminal may continuously send a piece of video stream data, and send an instruction to start encoding to the server while starting to send the video stream. For example, after the video stream stops or the application sends a stop request, The cloud terminal will send an instruction to the server to close the encoding service.
场景举例,云终端上安装有一些应用,应用可以根据自身业务需求发出编码或解码请求,示例的,直播应用可以发出编码请求,视频播放应用可以发出解码请求。该编码请求中的编码方式可以是硬件编码或软件编码。该解码请求中的解码方式可以是硬件解码或软件解码。For example, some applications are installed on the cloud terminal, and the applications can send encoding or decoding requests according to their own business requirements. For example, a live broadcast application can send an encoding request, and a video playback application can send a decoding request. The encoding method in the encoding request can be hardware encoding or software encoding. The decoding method in the decoding request may be hardware decoding or software decoding.
在一种可能的实施方式中,云终端根据应用发出的请求确定编码或解码的规则。In a possible implementation manner, the cloud terminal determines the encoding or decoding rules according to the request sent by the application.
在一种可能的实施方式中,该确定的规则中的编码或解码的方式可以与应用发出请求中的编码或解码的规则不同。例如,应用发出软件编码的请求,而该确定的编码规则为硬件编码,或,应用发出硬件编码的请求,而该确定的编码规则为软件编码,即云终端可以对应用发出的编码方式进行修改。In a possible implementation manner, the encoding or decoding manner in the determined rule may be different from the encoding or decoding rule in the application sending the request. For example, the application sends a software encoding request, and the determined encoding rule is hardware encoding, or the application sends a hardware encoding request, and the determined encoding rule is software encoding, that is, the cloud terminal can modify the encoding method sent by the application. .
在一种可能的实施方式中,该确定的规则中的编码或解码的方式还可以与应用发出请求中的编码或解码的规则相同,即云终端可以不对应用发出的编码方式进行修改。In a possible implementation manner, the encoding or decoding method in the determined rule may also be the same as the encoding or decoding rule in the request issued by the application, that is, the cloud terminal may not modify the encoding method issued by the application.
步骤202、服务器接收数据。 Step 202, the server receives data.
举例说明,服务器接收到云终端发送的数据后,还需要根据云终端同步发来的指令启动编码或解码任务,同时向云终端返回相应的服务响应。在一个可能的实施例中,服务器可以是在持续接收一条视频流数据,在接收到启动的命令后,服务器就会开始对持续接收到的视频帧进行编码或解码,并向云终端返回开始编码或解码的服务响应,直到服务器接收到关闭编码或解码任务的命令,再向云终端返回结束编码或解码的服务响应。For example, after the server receives the data sent by the cloud terminal, it also needs to start the encoding or decoding task according to the instruction synchronously sent by the cloud terminal, and at the same time return the corresponding service response to the cloud terminal. In a possible embodiment, the server may continuously receive a video stream data, after receiving the start command, the server will start to encode or decode the continuously received video frames, and return to the cloud terminal to start encoding or decoded service response, until the server receives the command to close the encoding or decoding task, and then returns the service response to end encoding or decoding to the cloud terminal.
步骤203、服务器进行编码或解码服务。 Step 203, the server performs encoding or decoding services.
举例说明,服务器根据接收到编码规则或解码规则对数据进行编码或解码,其中,编码规则可以包括编码标准、编码参数、编码方式。解码规则可以包括解码标准、解码参数、解码方式。For example, the server encodes or decodes the data according to the received encoding rule or decoding rule, where the encoding rule may include an encoding standard, an encoding parameter, and an encoding manner. The decoding rules may include decoding standards, decoding parameters, and decoding methods.
一种编码的举例实现,服务器接收到云终端发来的编码请求,编码请求中包含编码 标准可以为H.264、H.264等标准,编码参数可以包括分辨率、码率、帧率、DTS和PTS等,编码方式可以为软件编码或硬件编码。例如,视频编码是将原始视频格式文件转换成另一种视频格式文件的过程,主要目的是将原始视频进行压缩,以便于存储传输。编码后的数据就是压缩帧,压缩帧比原始帧数据量小。An example implementation of encoding, the server receives the encoding request sent by the cloud terminal, the encoding request contains the encoding standard can be H.264, H.264 and other standards, the encoding parameters can include resolution, bit rate, frame rate, DTS And PTS, etc., the encoding method can be software encoding or hardware encoding. For example, video encoding is the process of converting an original video format file into another video format file, and the main purpose is to compress the original video for storage and transmission. The encoded data is the compressed frame, and the compressed frame has a smaller amount of data than the original frame.
示例的,如果该编码方式为硬件编解码,服务器则调用硬件编码芯片(例如GPU芯片)对原始帧进行编码计算。如果该编码方式是软件编码,服务器则调用CPU对原始帧进行编码计算。For example, if the encoding method is hardware encoding and decoding, the server invokes a hardware encoding chip (eg, a GPU chip) to perform encoding calculations on the original frame. If the encoding method is software encoding, the server calls the CPU to perform encoding calculation on the original frame.
服务器采用的编码方式和接收到的指令中的编码方式可以是相同的,但在一些实施例中,服务器采用的编码方式可以与云终端应用发出的请求中编码方式不同,云终端对请求中的内容做了一些处理,该处理可以包括修改编码方式,可以参考步骤201中的描述。The encoding method adopted by the server may be the same as the encoding method in the received instruction, but in some embodiments, the encoding method adopted by the server may be different from the encoding method in the request sent by the cloud terminal application. The content has undergone some processing, the processing may include modifying the encoding mode, and reference may be made to the description in step 201 .
一种解码的举例实现,服务器接收到云终端发来的解码请求,其中的解码标准、解码参数、解码方式可以参考前文编码规则中的描述。例如,视频解码是视频编码的逆过程,通过解压缩技术,将压缩视频格式的文件转换成原始视频格式文件的过程,主要目的是将压缩视频帧进行解压缩,以支持画面的播放显示。解码后的数据就是解码帧(相对于原始帧可能是有损的),解码帧比压缩帧数据量大,可视化后的视觉效果更好。For an example implementation of decoding, the server receives a decoding request sent by the cloud terminal, and the decoding standard, decoding parameter, and decoding method can refer to the description in the preceding coding rules. For example, video decoding is the inverse process of video encoding. Through decompression technology, the process of converting the compressed video format file into the original video format file is mainly used to decompress the compressed video frame to support the playback and display of the picture. The decoded data is the decoded frame (which may be lossy relative to the original frame). The decoded frame has a larger amount of data than the compressed frame, and the visual effect after visualization is better.
示例的,如果该编码方式为硬件编解码,服务器则调用硬件解码芯片对压缩帧进行解码计算,例如GPU芯片。如果该解码方式是软件解码,服务器则调用CPU对压缩帧进行解码计算。For example, if the encoding method is hardware encoding and decoding, the server calls a hardware decoding chip to decode and calculate the compressed frame, such as a GPU chip. If the decoding method is software decoding, the server calls the CPU to decode and calculate the compressed frame.
在一些实施例中,服务器采用的解码方式和接收到的指令中的解码方式可以是相同的。In some embodiments, the decoding method adopted by the server and the decoding method in the received instruction may be the same.
在一些实施例中,服务器采用的解码方式可以与云终端应用发出的请求中解码方式不同,云终端对请求中的内容做了一些处理,该处理可以包括修改解码方式。举例说明,指令指示的解码方式为软件解码,但服务器采用的解码方式为硬件解码。In some embodiments, the decoding method adopted by the server may be different from the decoding method in the request sent by the cloud terminal application, and the cloud terminal performs some processing on the content in the request, and the processing may include modifying the decoding method. For example, the decoding method indicated by the instruction is software decoding, but the decoding method used by the server is hardware decoding.
步骤204、服务器发送处理后的数据。 Step 204, the server sends the processed data.
服务器将处理后的数据通过网络发送到云终端。The server sends the processed data to the cloud terminal through the network.
一种应用场景举例,服务器将编码后的编码帧发送给云终端,其中,编码帧是由服务器内部负责编码的模块处理生成的。An example of an application scenario is that the server sends the encoded encoded frame to the cloud terminal, where the encoded frame is processed and generated by a module responsible for encoding within the server.
一种应用场景举例,服务器将解码后的解码帧发送给云终端,其中,解码帧是由服务器内部负责解码的模块处理生成的。An example of an application scenario is that the server sends the decoded decoded frame to the cloud terminal, where the decoded frame is processed and generated by a module responsible for decoding inside the server.
一种可以的实现方式,服务器是在持续发送一个处理后的视频流。在一些可能的实施例中,在收到停止编解码指令或视频流传输停止后,服务器会在停止编解码服务后同时向云终端发送响应。In a possible implementation, the server is continuously sending a processed video stream. In some possible embodiments, after receiving an instruction to stop encoding and decoding or stopping video streaming, the server will simultaneously send a response to the cloud terminal after stopping the encoding and decoding service.
步骤205、云终端接收处理后的数据。Step 205: The cloud terminal receives the processed data.
云终端从网络接收到服务器返回的数据,示例的,该数据可以包含处理后的解码帧或压缩帧。The cloud terminal receives the data returned by the server from the network. For example, the data may include processed decoded frames or compressed frames.
一种应用场景举例,一个视频播放应用在之前发出了解码请求,云终端在收到服务器返回解码流后,通过框架层把数据转发给应用层的该视频播放应用,视频播放应用把解码后的视频流呈现在应用的用户界面中。一种可能的实现中,该应用用户界面所在的 桌面内容会被下发到某个终端上。An example of an application scenario is that a video playback application has previously sent a decoding request, and after receiving the decoded stream returned by the server, the cloud terminal forwards the data to the video playback application at the application layer through the framework layer, and the video playback application sends the decoded data. The video stream is presented in the user interface of the application. In a possible implementation, the desktop content on which the user interface of the application is located will be delivered to a terminal.
一种应用场景举例,一个视频通话应用在之前发出了编码请求,云终端在收到服务器返回编码流后,通过框架层把数据转发给应用层的该视频播放应用,视频通话应用把编码后的视频流通过网络发送到其他一个或多个终端或存储在云端,例如,与当前用户视频通话的对象所使用的终端会收到该编码视频流。An example of an application scenario: a video call application has previously sent an encoding request, and after receiving the encoded stream returned by the server, the cloud terminal forwards the data to the video playback application at the application layer through the framework layer, and the video call application The video stream is sent to one or more other terminals through the network or stored in the cloud. For example, the terminal used by the object of the video call with the current user will receive the encoded video stream.
图6是本申请实施例提供的一种数据处理方法的系统结构示意图,包括云终端001和服务器002的内部结构图。云终端包括应用层和架构层,其中应用层包括各类应用,本实施例中主要涉及101和102这两类应用。应用101需要架构层提供视频编码的服务,应用102需要架构层提供视频解码的服务。架构层包括编解码管理模块111,它由媒体编解码接口、软件编解码插件或硬件编解码插件以及相应控制模块组成,它负责接收直播、视频通话、视频播放等应用的编码或解码请求,根据不同应用的需求差异,调用相应软件或硬件插件,并返回目标视频帧数据。云终端的通讯模块114和服务器的通讯模块121是用于通过传输协议在网络中为云终端和转码集群传输数据和控制指令。服务器转码管理模块122是负责接收云手机编码或解码模块的编码或解码请求,并下发编码或解码任务给相应的外部编码或解码器模块,同时负责接收编码或解码后的数据转发给通讯模块121。编码器模块123负责真正的视频编码工作,接收原始视频帧,由硬件编码芯片进行编码后,返回压缩帧;解码器集模块124负责真正的视频解码工作,接收原始压缩帧,由硬件解码芯片进行解码后,返回解码帧。可选的,编码器模块123和解码器模块124也可以隶属同一个功能模块,不影响本实施例的方案。FIG. 6 is a schematic diagram of a system structure of a data processing method provided by an embodiment of the present application, including an internal structure diagram of a cloud terminal 001 and a server 002 . The cloud terminal includes an application layer and an architecture layer, wherein the application layer includes various types of applications, and this embodiment mainly involves two types of applications 101 and 102 . Application 101 requires the architecture layer to provide video encoding services, and application 102 requires the architecture layer to provide video decoding services. The architecture layer includes a codec management module 111, which consists of a media codec interface, a software codec plug-in or hardware codec plug-in, and a corresponding control module. It is responsible for receiving codec or decoding requests from applications such as live broadcast, video calls, and video playback. Depending on the requirements of different applications, call the corresponding software or hardware plug-in, and return the target video frame data. The communication module 114 of the cloud terminal and the communication module 121 of the server are used to transmit data and control instructions in the network for the cloud terminal and the transcoding cluster through a transmission protocol. The server transcoding management module 122 is responsible for receiving the encoding or decoding request of the cloud phone encoding or decoding module, and delivering the encoding or decoding task to the corresponding external encoding or decoding module, and is responsible for receiving the encoded or decoded data and forwarding it to the communication module 121. The encoder module 123 is responsible for the real video encoding work, receives the original video frame, encodes it by the hardware encoding chip, and returns the compressed frame; the decoder set module 124 is responsible for the real video decoding work, receives the original compressed frame, and is processed by the hardware decoding chip. After decoding, the decoded frame is returned. Optionally, the encoder module 123 and the decoder module 124 may also belong to the same functional module, which does not affect the solution of this embodiment.
在另一种实施例中,如图7所示,是本申请提供的另一种数据处理方法的系统结构示意图。相比图6,云终端的编解码服务是由云服务器集群或数据中心来承载,而不是一台物理服务器。在一些可能的实施例中,这样的部署方式可以增强外接编解码的服务效率。参照图7,云服务器集群003或数据中心004中可以包括一个或多个管理节点131和两个子集群,分别是编码集群132和解码集群133,分别负责真正的编码工作和解码工作。可选的,编码集群132和解码集群133也可以合并或分别分布在一个或多个服务集群中。在一些可能的实施例中,不同于图6中服务器002的编解码管理模块,图7中的管理节点131可以包含通信和集群管理两种功能,每个管理节点可以由一台服务器组成,该服务器可以不包括编码或解码模块。In another embodiment, as shown in FIG. 7 , it is a schematic diagram of the system structure of another data processing method provided by the present application. Compared with Figure 6, the codec service of the cloud terminal is carried by a cloud server cluster or data center, rather than a physical server. In some possible embodiments, such a deployment manner can enhance the service efficiency of the external codec. 7 , the cloud server cluster 003 or the data center 004 may include one or more management nodes 131 and two sub-clusters, namely the encoding cluster 132 and the decoding cluster 133, respectively responsible for the real encoding work and decoding work. Optionally, the encoding cluster 132 and the decoding cluster 133 may also be combined or separately distributed in one or more service clusters. In some possible embodiments, different from the codec management module of the server 002 in FIG. 6 , the management node 131 in FIG. 7 may include two functions of communication and cluster management, and each management node may be composed of a server, which The server may not include encoding or decoding modules.
图8给出了本申请实施例提供的一种数据处理的方法框架示例图,是对图7中系统的进一步解释。在一些实施例中,转码管理模块111中按照功能又划分为媒体编转码接口、软件或硬件编解码插件以及控制单元组成,其中,软件或硬件转码插件115和116需要负责创建线程并调用硬件转码控制模块113或软件转码模块112,来实现软件硬件编码和解码工作。硬件转码模块113是用于实现硬件编码或解解码的具体控制,包含启动编码或解码器、发送编码或解码参数、发送进行编码或解码的视频帧、接收编码或解码后的视频帧、关闭编码或解码器等。软件转码模块112是用于实现软件编码或解码的具体控制,包含启动编码或解码器、发送编码或解码参数、发送待编码或解码的视频帧、接收编码或解码后的视频帧、关闭编码或解码器等。FIG. 8 is an example diagram of a data processing method framework provided by an embodiment of the present application, which is a further explanation of the system in FIG. 7 . In some embodiments, the transcoding management module 111 is further divided into a media encoding/transcoding interface, a software or hardware encoding/decoding plug-in, and a control unit according to functions, wherein the software or hardware transcoding plug-ins 115 and 116 need to be responsible for creating threads and The hardware transcoding control module 113 or the software transcoding module 112 is invoked to implement software and hardware encoding and decoding. The hardware transcoding module 113 is used to implement specific control of hardware encoding or decoding, including enabling encoding or decoding, sending encoding or decoding parameters, sending encoded or decoded video frames, receiving encoded or decoded video frames, and closing Encoder or decoder, etc. The software transcoding module 112 is used to implement specific control of software encoding or decoding, including enabling encoding or decoding, sending encoding or decoding parameters, sending video frames to be encoded or decoded, receiving encoded or decoded video frames, and closing encoding. or decoder etc.
图8中所示的401-421为本实施例涉及的一些关键步骤,序号数字大小不代表实际 的执行顺序,仅作为标识代表某种动作和步骤,若某标识出现次数大于1次,则代表该标识所在位置执行了相同或相似的动作和步骤。下面参考图8举例说明本申请处理数据的方法的流程。该流程步骤包括步骤401至步骤420。401-421 shown in FIG. 8 are some key steps involved in this embodiment. The size of the serial number does not represent the actual execution order, but only serves as an identifier to represent a certain action and step. If the number of occurrences of a certain identifier is greater than one, it represents The same or similar actions and steps are performed at the identified location. The following describes the flow of the method for processing data of the present application with reference to FIG. 8 . The flow steps include steps 401 to 420 .
步骤401、请求视频编或解码。 Step 401 , request video encoding or decoding.
通常由应用发起所述视频编或解码的请求,不同类型应用会发出视频编码或解码的请求。例如手机直播类应用发出编码请求,视频播放类应用可以发出软件解码请求,云手机游戏和移动办公场景下的视讯通话时,可以同时发出编码和解码的请求。The video encoding or decoding request is usually initiated by the application, and different types of applications may issue the video encoding or decoding request. For example, mobile phone live broadcast applications can send encoding requests, video playback applications can send software decoding requests, and cloud mobile games and video calls in mobile office scenarios can send encoding and decoding requests at the same time.
步骤402、调用软件编解码插件。Step 402: Invoke a software codec plug-in.
媒体编解码接口调用软件编解码插件。在一些实施例中,该媒体编解码接口可以是云终端操作系统原生的接口。为了不影响应用层的调用,可以保留该原生的媒体编解码接口。The media codec interface calls the software codec plug-in. In some embodiments, the media codec interface may be a native interface of the cloud terminal operating system. In order not to affect the invocation of the application layer, the native media codec interface can be retained.
在一些实施例中,软件编解码插件可以是一些现有的插件,也可使发明人自己开发的插件。In some embodiments, the software codec plug-in may be some existing plug-ins, or a plug-in developed by the inventor.
步骤403、调用硬件编解码插件。 Step 403, calling the hardware codec plug-in.
媒体编解码接口调用硬件编解码插件。现有技术中的云手机仅支持步骤402,导致部分应用需要调用硬件编解码的软件功能不可用。示例的,发明人可以根据需求,自己开发硬件编解码插件。本方法的实施例可以实现调用硬件芯片进行编码或解码的功能,改善了云手机应用软件的兼容性。The media codec interface calls the hardware codec plug-in. The cloud phone in the prior art only supports step 402, so that some applications need to call the software function of hardware codec unavailable. For example, the inventor can develop a hardware codec plug-in according to the requirements. The embodiment of the method can realize the function of calling a hardware chip to perform encoding or decoding, thereby improving the compatibility of cloud mobile phone application software.
步骤404、软件编解码插件调用相应的软件编解码控制单元,创建线程、管理多条流,实现对硬件编码或解码工作的总控。 Step 404 , the software codec plug-in calls the corresponding software codec control unit, creates threads, manages multiple streams, and realizes overall control of hardware encoding or decoding work.
步骤405、硬件编解码插件调用相应的硬件编解码控制单元,创建线程、管理多条流,实现对硬件编码或解码工作的总控。 Step 405 , the hardware codec plug-in calls the corresponding hardware codec control unit, creates threads, manages multiple streams, and realizes overall control of the hardware codec or decoding work.
步骤406、发送原始帧或压缩帧。Step 406: Send the original frame or the compressed frame.
软件编解码控制单元112将待编码或解码的原始帧或压缩帧的数据发送给客户端Socket,可选地,还可以为客户端RPC。The software encoding/decoding control unit 112 sends the data of the original frame or the compressed frame to be encoded or decoded to the client Socket, optionally, the client RPC.
硬件编解码控制单元113将待编码或解码的原始帧或压缩帧的数据发送给客户端Socket,可选地,还可以为客户端RPC。The hardware codec control unit 113 sends the data of the original frame or the compressed frame to be encoded or decoded to the client Socket, optionally, the client RPC.
步骤407、启动或关闭编码或解码服务。 Step 407 , enable or disable the encoding or decoding service.
由软件编解码控制单元发出启动或关闭的请求,客户端Socket(或RPC)接收并通过网络转发到服务端Socket(或RPC),用于启动或关闭远端转码集群的编码或解码服务。The software codec control unit sends a start or stop request, and the client Socket (or RPC) receives it and forwards it to the server Socket (or RPC) through the network, which is used to start or close the encoding or decoding service of the remote transcoding cluster.
由硬件解编码控制单元发出启动或关闭的请求,客户端Socket(或RPC)接收并通过网络转发到服务端Socket(或RPC),用于启动或关闭远端转码集群的编码或解码服务。The hardware decoding control unit sends a start or stop request, and the client Socket (or RPC) receives it and forwards it to the server Socket (or RPC) through the network, which is used to start or stop the encoding or decoding service of the remote transcoding cluster.
在一些实施例中,该启动或关闭的请求可以是根据应用(或用户)发来的请求决定的。In some embodiments, the request to enable or disable may be determined according to a request sent by an application (or user).
步骤408、发送原始帧或压缩帧。Step 408: Send the original frame or the compressed frame.
客户端Socket(或RPC)将从网络接收到的编码帧或解码帧的数据,发送给软件编解码单元。The client Socket (or RPC) sends the data of the encoded frame or decoded frame received from the network to the software codec unit.
客户端Socket(或RPC)将从网络接收到的编码帧或解码帧的数据,发送给硬件编解码单元。The client Socket (or RPC) sends the data of the encoded frame or decoded frame received from the network to the hardware codec unit.
步骤409、启动或关闭响应。 Step 409, enable or disable the response.
客户端Socket(或RPC)从网络接收编码或解码集群的服务响应,发送到软件编解码单元,用于启动或关闭软件编解码单元响应操作。The client Socket (or RPC) receives the service response of the encoding or decoding cluster from the network, and sends it to the software codec unit, which is used to start or close the software codec unit response operation.
客户端Socket(或RPC)从网络接收编码或解码集群的服务响应,发送到硬件解编码单元,用于启动或关闭硬件解编码单元的响应操作。The client Socket (or RPC) receives the service response of the encoding or decoding cluster from the network, and sends it to the hardware decoding unit to enable or disable the response operation of the hardware decoding unit.
步骤410、发送请求指令。Step 410: Send a request instruction.
由服务端Socket(或RPC)将从网络接收的指令发送给转码集群管理131,在一些实施例中,该指令可以包括启动编码、启动解码、关闭编码、关闭解码等。The instruction received from the network is sent to the transcoding cluster management 131 by the server Socket (or RPC), and in some embodiments, the instruction may include starting encoding, starting decoding, closing encoding, closing decoding, and the like.
步骤411、发送原始的压缩帧或视频帧。Step 411: Send the original compressed frame or video frame.
由服务端Socket(或RPC)将从网络接收的图像原始帧或编码帧发送给转码集群管理单元122。The server Socket (or RPC) sends the original image frame or encoded frame received from the network to the transcoding cluster management unit 122 .
步骤412、返回处理后的解码帧或压缩帧。Step 412 , returning the processed decoded frame or compressed frame.
由转码集群管理131把处理后的解码帧或压缩帧返回给服务端Socket或RPC。The transcoding cluster management 131 returns the processed decoded frame or compressed frame to the server Socket or RPC.
步骤413、返回服务响应。 Step 413, returning a service response.
由转码集群管理单元返回处理响应,服务端Socket(或RPC)转发该响应。The processing response is returned by the transcoding cluster management unit, and the server Socket (or RPC) forwards the response.
步骤414、发送启动编码器的指令。 Step 414, sending an instruction to start the encoder.
转码集群管理131把启动编码器的指令发送到编码集群132,编码集群132接到启动指令后开始进行编码。The transcoding cluster management 131 sends an instruction to start the encoder to the encoding cluster 132, and the encoding cluster 132 starts encoding after receiving the startup instruction.
步骤415、发送原始视频帧。Step 415: Send the original video frame.
转码集群管理131把原始视频帧发送给编码集群132。Transcoding cluster management 131 sends raw video frames to encoding cluster 132 .
步骤416、发送关闭编码器的指令。 Step 416, sending an instruction to turn off the encoder.
转码集群管理131把关闭编码器的指令发送到编码集群132,编码集群132接到关闭指令后停止转码。The transcoding cluster management 131 sends the instruction of closing the encoder to the encoding cluster 132, and the encoding cluster 132 stops transcoding after receiving the closing instruction.
步骤417、返回压缩帧。 Step 417, returning to the compressed frame.
由编码集群132把处理后的压缩帧返回给转码集群管理131。The processed compressed frames are returned by the encoding cluster 132 to the transcoding cluster management 131 .
步骤418、发送启动解码器的指令。Step 418: Send an instruction to start the decoder.
转码集群管理131把启动解码器的指令发送到133解码集群,解码集群133接到启动指令后开始进行解码。The transcoding cluster management 131 sends the instruction of starting the decoder to the decoding cluster 133, and the decoding cluster 133 starts decoding after receiving the starting instruction.
步骤419、发送关闭解码器的指令。Step 419: Send an instruction to close the decoder.
转码集群管理131把关闭解码器的指令发送到解码集群133,解码集群133接到启动指令后停止转码。The transcoding cluster management 131 sends an instruction to close the decoder to the decoding cluster 133, and the decoding cluster 133 stops transcoding after receiving the activation instruction.
步骤420、发送原始压缩帧。Step 420: Send the original compressed frame.
由转码集群管理131把原始压缩帧发送给解码集群133。The original compressed frames are sent to the decoding cluster 133 by the transcoding cluster management 131 .
步骤421、返回解码帧。 Step 421, returning the decoded frame.
由解码集群133把处理后的解码帧返回给转码集群管理131。The processed decoded frames are returned to the transcoding cluster management 131 by the decoding cluster 133 .
以上401-421步骤的相关细节也可参照前文的描述。The relevant details of the above steps 401-421 may also refer to the foregoing description.
图9是本申请实施例提供的一次云手机购物直播场景下可能涉及到云终端数据处理的方法示意图。在一些实施例中,首先,要按照云手机使用场景及规模,购买一定数量的云手机及相应配比的云服务器集群,该云服务器集群可以提供前文描述的编解码服务,云手机直播比移动办公场景需要的云服务器集群规模要大。然后,需要完成云手机对接外部转码集群的配置,例如云手机上Socket的IP和端口配置等。最后,使用配置好的云手机和云服务器集群进行直播、移动办公。在图9所示的方法示意图中,序号501-514代表本实施例中涉及的关键步骤,描述了在一次云手机购物直播中,从用户A开始直播、购物直播应用发出软件编码请求一直到用户A关闭直播的过程中,本方法的一个实施例是如何基于云手机进行远程硬件视频编码的服务。FIG. 9 is a schematic diagram of a method that may involve cloud terminal data processing in a cloud mobile phone shopping live broadcast scenario provided by an embodiment of the present application. In some embodiments, first, according to the usage scenarios and scale of cloud mobile phones, a certain number of cloud mobile phones and a corresponding cloud server cluster should be purchased. The cloud server cluster can provide the encoding and decoding services described above. Office scenarios require a larger cloud server cluster. Then, you need to complete the configuration for connecting the cloud phone to the external transcoding cluster, such as the IP and port configuration of the socket on the cloud phone. Finally, use the configured cloud phone and cloud server cluster for live broadcast and mobile office. In the schematic diagram of the method shown in FIG. 9, the serial numbers 501-514 represent the key steps involved in this embodiment, which describe that in a cloud mobile phone shopping live broadcast, from user A starting the live broadcast, the shopping live broadcast application sends a software coding request until the user In the process of closing the live broadcast, one embodiment of this method is how to perform remote hardware video encoding services based on cloud mobile phones.
步骤501、用户A在云手机上打开购物直播应用软件,开始直播。在一些可能的实施例中,用户可以是基于图4所示的终端005的可视化界面远程操控云终端001上的应用。示例的,终端005上可以为一个智能手机,包括摄像头或其他拍摄装置,用于实时采集直播过程中用户的视频流,并将视频流同步传送给云手机。Step 501: User A opens the shopping live broadcast application software on the cloud mobile phone, and starts the live broadcast. In some possible embodiments, the user may remotely control the application on the cloud terminal 001 based on the visual interface of the terminal 005 shown in FIG. 4 . For example, the terminal 005 may be a smart phone, including a camera or other photographing device, which is used to collect the video stream of the user during the live broadcast in real time, and transmit the video stream to the cloud phone synchronously.
步骤502、购物直播应用调用MediaCodec接口启动视频编码操作。直播应用接收到视频流,向MediaCodec接口发出软件编码的请求,请求云服务器集群的编码服务;Step 502: The shopping live broadcast application invokes the MediaCodec interface to start the video encoding operation. The live application receives the video stream, sends a software encoding request to the MediaCodec interface, and requests the encoding service of the cloud server cluster;
步骤503-404、MediaCodec进程基于软件编码插件调用编码器控制单元,创建编码线程。Steps 503-404: The MediaCodec process invokes the encoder control unit based on the software encoding plug-in to create an encoding thread.
步骤505、编码器控制单元生成相关指令,该指令包括编码规则,并将编码规则中的编码方式由软件编码修改为硬件编码。接着,编码器控制单元通过客户端套接字与外部转码集群建立套接字连接,并把启动外部硬件编码器的请求发送给服务端套接字。Step 505: The encoder control unit generates a relevant instruction, the instruction includes an encoding rule, and modifies the encoding mode in the encoding rule from software encoding to hardware encoding. Next, the encoder control unit establishes a socket connection with the external transcoding cluster through the client socket, and sends a request to start the external hardware encoder to the server socket.
步骤506、云服务器集群的服务端套接字把接收到硬件编码的指令后,转发给转码集群管理节点,转码集群管理节点接收到启动具体的外部编码器的指令后,创建线程启动编码集群。Step 506: The server socket of the cloud server cluster forwards the received hardware coding instruction to the transcoding cluster management node. After the transcoding cluster management node receives the instruction to start the specific external encoder, it creates a thread to start the coding cluster.
步骤507、云手机编码器控制单元发送获取编码头信息的请求,客户端套接字转发该请求至云服务器集群的客户端套接字。Step 507: The cloud phone encoder control unit sends a request for obtaining the encoding header information, and the client socket forwards the request to the client socket of the cloud server cluster.
步骤508、转码集群管理节点向编码集群中某个具体的服务器的编码器模块请求并获取编码头,通过网络转发给云手机。Step 508: The transcoding cluster management node requests and obtains the encoding header from the encoder module of a specific server in the encoding cluster, and forwards it to the cloud mobile phone through the network.
步骤509、云手机编码器控制单元接收到该编码头信息的响应。Step 509: The cloud phone encoder control unit receives the response of the encoding header information.
步骤510、云手机编码器控制模块向云服务器集群的转码管理节点发送原始视频帧数据,请求外部编码集群进行硬件编码。Step 510: The cloud phone encoder control module sends the original video frame data to the transcoding management node of the cloud server cluster, and requests the external encoding cluster to perform hardware encoding.
步骤511、转码集群管理节点负责分配编码服务器给云手机,云手机向具体的服务器的编码器发送原始视频帧。Step 511: The transcoding cluster management node is responsible for allocating the encoding server to the cloud mobile phone, and the cloud mobile phone sends the original video frame to the encoder of the specific server.
步骤512、编码器把编码后的压缩视频帧返回给转码集群管理节点,通过网络转发给云手机。Step 512: The encoder returns the encoded compressed video frame to the transcoding cluster management node, and forwards it to the cloud mobile phone through the network.
步骤513、云手机的编码器模块通过套接字接收到压缩后的视频帧数据,并返回给直播应用使用。云手机上的直播应用将接到压缩帧数据流络转发到公有云,更多的网络用户可以在自己的手机或PC等终端上下载压缩帧数据流,在本地进行解码后,可以实时观看本场购物直播。Step 513: The encoder module of the cloud phone receives the compressed video frame data through the socket, and returns it to the live broadcast application for use. The live application on the cloud mobile phone will receive the compressed frame data stream and forward it to the public cloud. More network users can download the compressed frame data stream on their mobile phones or PCs and other terminals. After decoding locally, they can watch the video in real time. Live shopping.
步骤514、用户A在云手机上关闭购物直播应用,结束直播。Step 514: User A closes the shopping live broadcast application on the cloud mobile phone, and ends the live broadcast.
步骤515、购物直播应用软件通过调用MediaCodec接口结束视频编码操作。Step 515: The shopping live broadcast application software ends the video encoding operation by calling the MediaCodec interface.
步骤516-517、MediaCodec进程基于软件编码插件调用编码器控制单元,请求结束编码;Steps 516-517, the MediaCodec process calls the encoder control unit based on the software encoding plug-in, and requests to end encoding;
步骤518、编码器控制单元释放远程的编码器,发送关闭服务器的编码器的请求并关闭和云服务器集群的套接字连接。Step 518: The encoder control unit releases the remote encoder, sends a request to close the encoder of the server, and closes the socket connection with the cloud server cluster.
步骤519、转码集群管理节点关闭具体服务器的编码服务。Step 519: The transcoding cluster management node closes the encoding service of the specific server.
图10是本申请实施例提供的一种部署在服务器002上的装置300,装置300包括接收单元301、处理单元302、发送单元303。FIG. 10 is an apparatus 300 deployed on a server 002 according to an embodiment of the present application. The apparatus 300 includes a receiving unit 301 , a processing unit 302 , and a sending unit 303 .
接收单元301,用于从云终端001接收数据。在一些实施例中,该数据可以是待编码或待解码的数据。在另一些实施例中,该数据还可以包括用于指示编码或解码任务的指令,指令的内容请参考前文的相关描述。The receiving unit 301 is configured to receive data from the cloud terminal 001 . In some embodiments, the data may be data to be encoded or decoded. In other embodiments, the data may further include an instruction for instructing an encoding or decoding task. For the content of the instruction, please refer to the foregoing related description.
处理单元302,用于对数据进行编码或解码。一种实现场景举例,处理单元对待编码的数据进行编码,编码的方式包括硬件编码或软件编码,请参考前文的描述。一种实现场景举例,处理单元对待解码的数据进行解码,解码的方式包括硬件解码或软件解码,请参考前文的描述。The processing unit 302 is used for encoding or decoding data. As an example of an implementation scenario, the processing unit encodes the data to be encoded, and the encoding method includes hardware encoding or software encoding. Please refer to the foregoing description. As an example of an implementation scenario, the processing unit decodes the data to be decoded, and the decoding method includes hardware decoding or software decoding. Please refer to the foregoing description.
发送单元303,用于向云终端001发送数据。发送的数据是已经解码或编码后的数据。The sending unit 303 is configured to send data to the cloud terminal 001 . The transmitted data is already decoded or encoded data.
可选地,处理单元302,用于对所述数据进行硬件编码或者对所述数据进行软件编码。Optionally, the processing unit 302 is configured to perform hardware encoding on the data or perform software encoding on the data.
可选地,处理单元302,用于对所述数据进行硬件解码或者对所述数据进行软件解码。Optionally, the processing unit 302 is configured to perform hardware decoding on the data or perform software decoding on the data.
本申请实施例还提供了一种计算设备600,如图11。该计算设备600可以是用于部署云终端001的设备,或者该计算设备600可以是服务器002。This embodiment of the present application further provides a computing device 600, as shown in FIG. 11 . The computing device 600 may be a device for deploying the cloud terminal 001 , or the computing device 600 may be the server 002 .
图11提供了一种计算设备600的结构示意图,计算设备600包括总线601、处理器602和存储器603。处理器602、存储器603之间通过总线601通信。FIG. 11 provides a schematic structural diagram of a computing device 600 . The computing device 600 includes a bus 601 , a processor 602 and a memory 603 . The processor 602 and the memory 603 communicate through the bus 601 .
总线601可以是外设部件互连标准总线或扩展工业标准结构总线等。处理器602可以为中央处理器(Central Processing Unit,CPU),此外,还可以有图形处理器(graphics processing unit,GPU)、神经网络处理器(Neural network Processing Unit,NPU)、FPGA(Field Programmable Gate Array)中的一种或多种。存储器603可以包括随机存取存储器(random access memory,RAM)、只读存储器(read-only memory,ROM),快闪存储器,机械硬盘(hard drive drive,HDD)或固态硬盘(solid state drive,SSD)中的一种或多种。存储器603中存储有可执行的程序代码,处理器602执行该可执行的程序代码以实现前述云终端001的功能或者服务器002的功能,或者执行前述实施例描述的方法中由终端001执行的步骤或者由服务器002执行的步骤。The bus 601 may be a peripheral component interconnection standard bus or an extended industry standard structure bus or the like. The processor 602 may be a central processing unit (Central Processing Unit, CPU), in addition, there may also be a graphics processing unit (graphics processing unit, GPU), a neural network processor (Neural network Processing Unit, NPU), FPGA (Field Programmable Gate) Array) one or more. The memory 603 may include random access memory (RAM), read-only memory (ROM), flash memory, hard drive (HDD) or solid state drive (SSD) ) one or more of. Executable program codes are stored in the memory 603, and the processor 602 executes the executable program codes to realize the functions of the aforementioned cloud terminal 001 or the functions of the server 002, or to execute the steps performed by the terminal 001 in the methods described in the aforementioned embodiments. Or steps performed by server 002 .
上述各个附图对应的流程或结构的描述各有侧重,某个流程或结构中没有详述的部分,可以参见其他流程或结构的相关描述。The descriptions of the processes or structures corresponding to each of the above-mentioned drawings have their own emphasis, and for the parts that are not described in detail in a certain process or structure, reference may be made to the related descriptions of other processes or structures.

Claims (19)

  1. 一种处理数据的方法,其特征在于,包括:A method for processing data, comprising:
    云终端发送数据;The cloud terminal sends data;
    服务器接收所述数据;the server receives the data;
    所述服务器对所述数据进行处理,所述处理为对所述数据进行编码或者对所述数据进行解码;The server processes the data, and the processing is to encode the data or to decode the data;
    所述服务器向所述云终端发送处理后的数据。The server sends the processed data to the cloud terminal.
  2. 根据权利要求1所述的方法,其特征在于,所述对所述数据进行编码包括:The method of claim 1, wherein the encoding the data comprises:
    对所述数据进行硬件编码;或者,hardware-encode the data; or,
    对所述数据进行软件编码。The data is software encoded.
  3. 根据权利要求1所述的方法,其特征在于,所述对所述数据进行解码包括:The method of claim 1, wherein the decoding the data comprises:
    对所述数据进行硬件解码;或者,hardware decoding the data; or,
    对所述数据进行软件解码。The data is software decoded.
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述方法包括:The method according to any one of claims 1 to 3, wherein the method comprises:
    所述云终端向所述服务器发送处理规则;sending, by the cloud terminal, processing rules to the server;
    所述处理规则用于确定对所述数据进行硬件编码或者软件解码,或者所述处理规则用于确定对所述数据进行软件编码或者软件解码。The processing rule is used to determine to perform hardware encoding or software decoding on the data, or the processing rule is used to determine to perform software encoding or software decoding on the data.
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述方法包括:The method according to any one of claims 1 to 4, wherein the method comprises:
    在所述云终端发送所述数据之前,所述云终端获取终端对所述数据进行处理的请求。Before the cloud terminal sends the data, the cloud terminal obtains a request from the terminal to process the data.
  6. 根据权利要求1至4任一项所述的方法,其特征在于,所述方法包括:The method according to any one of claims 1 to 4, wherein the method comprises:
    在所述云终端发送所述数据之前,所述云终端获取对所述数据进行处理的请求,所述请求是所述云终端上的应用触发的。Before the cloud terminal sends the data, the cloud terminal obtains a request for processing the data, and the request is triggered by an application on the cloud terminal.
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述方法包括:The method according to any one of claims 1 to 6, wherein the method comprises:
    所述云终端向终端发送根据所述数据得到的虚拟桌面。The cloud terminal sends the virtual desktop obtained according to the data to the terminal.
  8. 一种处理数据的系统,其特征在于,所述系统包括:A system for processing data, wherein the system comprises:
    云终端,用于向服务器发送数据;Cloud terminal, used to send data to the server;
    所述服务器,用于接收所述数据,所述服务器对所述数据进行处理,向所述云终端发送处理后的数据,所述处理为对所述数据进行编码或者对所述数据进行解码。The server is configured to receive the data, the server processes the data, and sends the processed data to the cloud terminal, and the processing is to encode or decode the data.
  9. 根据权利要求8所述的系统,其特征在于,The system of claim 8, wherein:
    所述服务器,用于对所述数据进行硬件编码,或者对所述数据进行硬件编码。The server is configured to perform hardware encoding on the data, or perform hardware encoding on the data.
  10. 根据权利要求8所述的系统,其特征在于,The system of claim 8, wherein:
    所述服务器,用于对所述数据进行软件编码,或者对所述数据进行软件编码。The server is configured to perform software encoding on the data, or perform software encoding on the data.
  11. 根据权利要求8至10任一项所述的系统,其特征在于,The system according to any one of claims 8 to 10, characterized in that:
    所述云终端,用于向所述服务器发送处理规则,其中,所述处理规则用于确定对所述数据进行硬件编码或者软件解码,或者所述处理规则用于确定对所述数据进行软件编码或者软件解码。The cloud terminal is configured to send a processing rule to the server, where the processing rule is used to determine whether to perform hardware encoding or software decoding on the data, or the processing rule is used to determine whether to perform software encoding on the data Or software decoding.
  12. 根据权利要求8至11任一项所述的系统,其特征在于,The system according to any one of claims 8 to 11, wherein:
    所述云终端,用于获取终端对所述数据进行处理的请求。The cloud terminal is configured to obtain a request from the terminal to process the data.
  13. 根据权利要求8至11任一项所述的系统,其特征在于,The system according to any one of claims 8 to 11, wherein:
    所述云终端,用于获取对所述数据进行处理的请求,所述请求是所述云终端上的应用触发的。The cloud terminal is configured to obtain a request for processing the data, where the request is triggered by an application on the cloud terminal.
  14. 根据权利要求8至13任一项所述的系统,其特征在于,The system according to any one of claims 8 to 13, wherein:
    所述云终端,用于向终端发送根据所述数据得到的虚拟桌面。The cloud terminal is configured to send the virtual desktop obtained according to the data to the terminal.
  15. 根据权利要求8至14任一项所述的系统,其特征在于,The system according to any one of claims 8 to 14, wherein:
    所述云终端是云手机。The cloud terminal is a cloud mobile phone.
  16. 一种云终端,其特征在于,所述云终端为所述权利要求8至15任一项所述的云终端。A cloud terminal, wherein the cloud terminal is the cloud terminal according to any one of claims 8 to 15.
  17. 一种服务器,其特征在于,所述云终端为所述权利要求8至15任一项所述的服务器。A server, wherein the cloud terminal is the server according to any one of claims 8 to 15.
  18. 一种计算设备,其特征在于,所述计算设备包括处理器和存储器;所述处理器执行所述存储器中的指令,使得所述计算设备实现权利要求8至15任一项所述的云终端或者服务器。A computing device, characterized in that the computing device includes a processor and a memory; the processor executes instructions in the memory, so that the computing device implements the cloud terminal according to any one of claims 8 to 15 or server.
  19. 一种计算机程序产品,所述计算机程序产品包括指令,所述指令用于实现权利要求1至7任一项所述的方法中由云终端执行的步骤,或者用于实现权利要求1至7任一项所述的方法中由服务器执行的步骤。A computer program product, the computer program product comprising instructions for implementing the steps performed by the cloud terminal in the method of any one of claims 1 to 7, or for implementing any one of claims 1 to 7. A method of the steps performed by a server.
PCT/CN2021/101691 2020-09-07 2021-06-23 Data processing method and system, cloud terminal, server, and computing device WO2022048255A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202010928653 2020-09-07
CN202010928653.1 2020-09-07
CN202010990303.8A CN114157919A (en) 2020-09-07 2020-09-18 Data processing method and system, cloud terminal, server and computing equipment
CN202010990303.8 2020-09-18

Publications (1)

Publication Number Publication Date
WO2022048255A1 true WO2022048255A1 (en) 2022-03-10

Family

ID=80462166

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/101691 WO2022048255A1 (en) 2020-09-07 2021-06-23 Data processing method and system, cloud terminal, server, and computing device

Country Status (2)

Country Link
CN (1) CN114157919A (en)
WO (1) WO2022048255A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160198208A1 (en) * 2013-09-13 2016-07-07 Huawei Technologies Co.,Ltd. Desktop-cloud-based media control method and device
CN108449238A (en) * 2018-06-11 2018-08-24 西安万像电子科技有限公司 Communication means and communication system
CN108521581A (en) * 2018-03-05 2018-09-11 西安万像电子科技有限公司 Multi-medium data display methods, terminal and system
CN110636305A (en) * 2019-09-26 2019-12-31 华为技术有限公司 Image rendering and encoding method and related device
CN111273880A (en) * 2020-01-13 2020-06-12 奇安信科技集团股份有限公司 Remote display method and device based on cloud intelligent equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102377739A (en) * 2010-08-11 2012-03-14 中兴通讯股份有限公司 Mobile terminal as well as realization method, service system and cloud server thereof
CN103179431B (en) * 2013-03-21 2016-06-01 福建升腾资讯有限公司 Under VDI environment, audio frequency and video are redirected and turn code separation method
CN103873568A (en) * 2014-03-04 2014-06-18 赛特斯信息科技股份有限公司 System and method for realizing remote virtual desktop display based on cloud computing
WO2018119955A1 (en) * 2016-12-29 2018-07-05 深圳前海达闼云端智能科技有限公司 Cross-system multimedia data coding and decoding method, apparatus, electronic device and computer program product
CN108989811B (en) * 2017-06-05 2022-06-03 中兴通讯股份有限公司 Cloud desktop system, image sequence compression encoding method and medium thereof
US10303497B2 (en) * 2017-06-22 2019-05-28 Vmware, Inc. Hybrid software and GPU encoding for UI remoting
CN107911700B (en) * 2017-10-31 2020-07-03 深信服科技股份有限公司 Virtualization-based hardware decoding method, decoding equipment and storage medium
CN107809671A (en) * 2017-11-20 2018-03-16 深圳市青葡萄科技有限公司 Video is redirected to the method and system of server decoding under a kind of virtualized environment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160198208A1 (en) * 2013-09-13 2016-07-07 Huawei Technologies Co.,Ltd. Desktop-cloud-based media control method and device
CN108521581A (en) * 2018-03-05 2018-09-11 西安万像电子科技有限公司 Multi-medium data display methods, terminal and system
CN108449238A (en) * 2018-06-11 2018-08-24 西安万像电子科技有限公司 Communication means and communication system
CN110636305A (en) * 2019-09-26 2019-12-31 华为技术有限公司 Image rendering and encoding method and related device
CN111273880A (en) * 2020-01-13 2020-06-12 奇安信科技集团股份有限公司 Remote display method and device based on cloud intelligent equipment

Also Published As

Publication number Publication date
CN114157919A (en) 2022-03-08

Similar Documents

Publication Publication Date Title
US20220038724A1 (en) Video stream decoding method and apparatus, terminal device, and storage medium
US10924783B2 (en) Video coding method, system and server
WO2021047419A1 (en) Live broadcast interaction method, live broadcast system, electronic device and storage medium
US20200366920A1 (en) Region of Interest (ROI) Request and Inquiry in a Video Chain
WO2022257699A1 (en) Image picture display method and apparatus, device, storage medium and program product
WO2014139269A1 (en) Method and apparatus for playing and processing videos based on a virtual desktop
CN113542757A (en) Image transmission method and device for cloud application, server and storage medium
CN111880865A (en) Multimedia data pushing method and device, electronic equipment and storage medium
CN114363652A (en) Video live broadcast method, system and computer storage medium
WO2023040825A1 (en) Media information transmission method, computing device and storage medium
WO2022048255A1 (en) Data processing method and system, cloud terminal, server, and computing device
CN115209189B (en) Video stream transmission method, system, server and storage medium
KR20230006495A (en) Multi-grouping for immersive teleconferencing and telepresence
CN114938408A (en) Data transmission method, system, equipment and medium of cloud mobile phone
WO2016107174A1 (en) Method and system for processing multimedia file data, player and client
CN116546262A (en) Data processing method, device, equipment and storage medium
WO2022049020A1 (en) Orchestrating a multidevice video session
CN113630575A (en) Method, system and storage medium for displaying multi-person online video conference image
JP6404915B2 (en) Automatic data compression
WO2022068674A1 (en) Video call method, electronic device and system
US11800158B2 (en) Video production systems and methods
WO2024032189A1 (en) Data transmission method and apparatus
CN112738026B (en) Commanding and scheduling method
US11985181B2 (en) Orchestrating a multidevice video session
CN113938457B (en) Method, system and equipment for cloud mobile phone to apply remote camera

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: 21863323

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21863323

Country of ref document: EP

Kind code of ref document: A1