Cloud audio and video processing method, system, electronic device and storage medium
By implementing standardized interfaces for audio and video collection, encoding and event processing in the cloud service platform, the problem of module coupling and code redundancy under different hardware and operating system environments is solved, and the compatibility and stability of the cloud audio and video interactive system are improved. , simplifying the upgrade and migration process.
Patent Information
- Application Number
- CN202110401317.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-14
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-04-14
AI Technical Summary
Existing cloud service platforms have high module coupling and code redundancy under different hardware configurations and operating system environments, resulting in poor compatibility, stability and maintainability of the cloud audio and video interactive system.
By implementing standardized interfaces for audio and video collection, encoding, and event processing in the preset cloud service standardized base class, different hardware and operating systems are encapsulated and isolated, unified collection, encoding, and event services are provided, and module coupling and code redundancy are reduced.
It improves the compatibility and stability of the cloud audio and video interactive system, simplifies the upgrade and migration process of collection, encoding and event services, and reduces operation and maintenance costs.
Smart Images

Figure CN115278304B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to cloud technology, and in particular to a cloud audio and video processing method, system, electronic device and storage medium. Background Art
[0002] At present, the solutions of cloud service platforms used in cloud audio and video interactive systems such as cloud games or cloud live broadcasts usually integrate modules such as acquisition, encoding, transmission, and uplink event processing services for implementation. Due to different host operating systems and hardware configuration combinations, different hardware configurations or different host operating system operating environment systems and driver acquisition, encoding, transmission, and event underlying interfaces are also different, resulting in the current cloud service platform requiring different module combination configurations and different code implementations for different hardware configurations and host operating systems. Therefore, the current cloud service platform has a high degree of module coupling and code redundancy, which is not conducive to the stable operation and upgrade maintenance of the cloud service platform, thereby reducing the compatibility, stability, and maintainability of the cloud audio and video interactive system. Summary of the invention
[0003] The embodiments of the present application provide a cloud audio and video processing method, system, electronic device and storage medium, which can improve the compatibility, stability and maintainability of the cloud audio and video interaction system.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present application provides a cloud audio and video processing method, including:
[0006] Call the acquisition module through the audio and video acquisition standard interface to collect the audio and video data generated by the cloud audio and video process;
[0007] Calling the encoding module through the encoding transmission standard interface, performing audio and video encoding of the audio and video data in a preset standard encoding format to obtain an encoded audio and video stream, and transmitting the encoded audio and video stream to the interactive device;
[0008] Through the event standard input interface, an operation event initiated by the interactive device based on the encoded audio and video stream is received, and the operation event is mapped to a target driven event corresponding to the current operating system; the target driven event is used to drive the cloud audio and video process to update the audio and video data accordingly; wherein,
[0009] The audio and video acquisition standard interface, the encoding transmission standard interface, and the event standard input interface are standardized interfaces implemented in a cloud service standardized subclass derived from a preset cloud service standardized base class based on the respective configuration information of the acquisition module, the encoding module, and the operating system.
[0010] The present application provides a cloud audio and video processing method, including:
[0011] Receive the encoded audio and video stream, and decode and play the encoded audio and video stream to obtain the decoded video picture and decoded audio; the encoded audio and video stream is obtained by the first cloud host calling the acquisition module through the audio and video acquisition standard interface to collect the audio and video data generated by the cloud audio and video process; and calling the encoding module through the encoding transmission standard interface to perform audio and video encoding on the audio and video data in a preset standard encoding format;
[0012] Acquire an operation event initiated for the decoded video screen or decoded audio, and send the operation event to the event standard input interface of the first cloud host, so that the first cloud host maps the operation event to a target drive event corresponding to the current operating system through the event standard input interface; the target drive event is used to drive the cloud audio and video process to update the audio and video data accordingly; wherein,
[0013] The audio and video acquisition standard interface, the encoding transmission standard interface, and the event standard input interface are standardized interfaces implemented in a cloud service standardized subclass derived from a preset cloud service standardized base class based on the respective configuration information of the acquisition module, the encoding module, and the operating system.
[0014] The present application provides a cloud audio and video processing method, including:
[0015] Obtaining a coded audio and video stream through a preset downlink standard interface; the coded audio and video stream is obtained by the first cloud host calling a collection module through an audio and video collection standard interface to collect audio and video data generated by a cloud audio and video process; and calling a coding module through a coding transmission standard interface to perform audio and video coding of the audio and video data in a preset standard coding format; the preset downlink standard interface is respectively connected to the coding transmission standard interface and the interactive device on the first cloud host;
[0016] Using a preset standard transmission format, transmitting the encoded audio and video stream to the interactive device;
[0017] Receiving an operation event initiated by the interactive device based on the encoded audio and video stream through a preset uplink standard interface; the preset uplink standard interface is respectively connected to the event standard input interface on the first cloud host and the interactive device;
[0018] The operation event is transmitted to the event standard input interface using the preset standard transmission format.
[0019] The present application provides a first cloud host, including:
[0020] The acquisition module is used to collect audio and video data generated by the cloud audio and video process through the audio and video acquisition standard interface;
[0021] The encoding module is used to perform audio and video encoding in a preset standard encoding format on the audio and video data through a coding transmission standard interface to obtain an encoded audio and video stream, and transmit the encoded audio and video stream to an interactive device;
[0022] The event processing module is used to receive the operation event initiated by the interactive device based on the encoded audio and video stream through the event standard input interface, and map the operation event to a target drive event corresponding to the current operating system; the target drive event is used to drive the cloud audio and video process to update the audio and video data accordingly; wherein,
[0023] The audio and video acquisition standard interface, the encoding transmission standard interface, and the event standard input interface are standardized interfaces implemented in a cloud service standardized subclass derived from a preset cloud service standardized base class based on the respective configuration information of the acquisition module, the encoding module, and the operating system.
[0024] In the above-mentioned first cloud host, the first cloud host also includes an initialization module, and the initialization module is used to call the acquisition module through the audio and video acquisition standard interface. Before collecting the audio and video data generated by the cloud audio and video process, the local initialization interface corresponding to the acquisition module, the encoding module and the operating system is called through the initialization standard interface to initialize the acquisition module, the encoding module and the operating system, wherein the initialization standard interface is a standardized interface implemented in the cloud service standardized subclass.
[0025] In the above-mentioned first cloud host, the acquisition module is also used to collect the current video image and current audio generated by the cloud audio and video process according to the preset sampling frame rate, and obtain the audio and video data by calling the local acquisition driver interface through the audio and video acquisition standard interface at a regular interval; the preset sampling frame rate is a standardized sampling frame rate uniformly set in the preset cloud service standardized base class.
[0026] In the first cloud host, the encoding module is further used to call the local encoding driver interface through the encoding transmission standard interface, encode the audio and video data according to the preset encoding frame rate and the preset standard encoding format to obtain an encoded audio and video stream; the preset encoding frame rate is a standardized encoding frame rate uniformly set in the preset cloud service standardized base class;
[0027] In the above-mentioned first cloud host, the event processing module is also used to call the preset instruction conversion service through the event standard input interface, determine the target drive event corresponding to the operation event from the preset correspondence between at least one preset operation event and at least one standard drive event; the at least one standard drive event is a standard drive event in the current operating system; and convert the operation event into the target drive event.
[0028] The present application provides an interactive device, including:
[0029] A client standard component, wherein the client standard component is connected to the encoding transmission standard interface and the event standard input interface on the first cloud host; wherein,
[0030] The client standard component is used to receive the encoded audio and video stream sent by the encoding transmission standard interface; and decode and play the encoded audio and video stream to obtain a decoded video image and decoded audio; the encoded audio and video stream is obtained by the first cloud host calling the acquisition module through the audio and video acquisition standard interface to collect the audio and video data generated by the cloud audio and video process; and calling the encoding module through the encoding transmission standard interface to perform audio and video encoding of the audio and video data in a preset standard encoding format;
[0031] The client standardization component is also used to obtain the original operation instruction of at least one format type initiated for the decoded video screen or the decoded audio, and convert the format of the original operation instruction of at least one format type according to the preset standard event format to obtain the operation event, and send the operation event to the event standard input interface, so that the first cloud host maps the operation event to the target drive event corresponding to the current operating system through the event standard input interface; the target drive event is used to drive the cloud audio and video process to update the audio and video data accordingly; wherein,
[0032] The audio and video acquisition standard interface, the encoding transmission standard interface, and the event standard input interface are standardized interfaces implemented in a cloud service standardized subclass derived from a preset cloud service standardized base class based on the respective configuration information of the acquisition module, the encoding module, and the operating system.
[0033] The embodiment of the present application provides a second cloud host, including:
[0034] A preset downlink standard interface and a preset uplink standard interface; the preset downlink standard interface is respectively connected to the encoding transmission standard interface and the interactive device on the first cloud host, and the preset uplink standard interface is respectively connected to the interactive device and the event standard input interface on the first cloud host; wherein,
[0035] The preset downlink standard interface is used to receive the encoded audio and video stream sent by the first cloud host through the encoding transmission standard interface; the encoded audio and video stream is obtained by the first cloud host calling the acquisition module through the audio and video acquisition standard interface to collect the audio and video data generated by the cloud audio and video process; and calling the encoding module through the encoding transmission standard interface to perform audio and video encoding of the audio and video data in a preset standard encoding format; using the preset standard transmission format, the encoded audio and video stream is transmitted to the interactive device;
[0036] The preset uplink standard interface is used to receive an operation event initiated by the interactive device based on the encoded audio and video stream; and transmit the operation event to the event standard input interface on the first cloud host using the preset standard transmission format.
[0037] In the above-mentioned second cloud host, a client standard component is configured on the interactive device, and the client standard component is connected to the preset downlink standard interface and the preset uplink standard interface respectively. The preset downlink standard interface is also used to transmit the encoded audio and video stream to the client standard component on the interactive device using the preset standard transmission format, so that the client standard component decodes and plays the encoded audio and video stream in a preset decoding format to obtain a decoded video picture and decoded audio;
[0038] The preset uplink standard interface is also used to receive the operation event issued by the client standard component on the interactive device, wherein the operation event is obtained by the client standard component by obtaining at least one format type of original operation instructions initiated for the decoded video screen or decoded audio, and converting the format of the at least one format type of original operation instructions according to a preset standard event format.
[0039] In the above-mentioned second cloud host, a standardized transmission service is implemented between the preset uplink standard interface and the preset downlink standard interface, and the standardized transmission service includes at least one of the following:
[0040] Uplink and downlink network transmission bandwidth assessment service, congestion control service, connection maintenance and abnormal reconnection service.
[0041] In the above-mentioned second cloud host, the event standard input interface is connected to the preset uplink standard interface through a first socket; and the encoding transmission standard interface is connected to the preset downlink standard interface through a second socket.
[0042] In the above-mentioned second cloud host, the preset standard transmission format includes at least one of the following:
[0043] A preset application layer standard protocol format, a preset transport layer standard protocol format and a preset network layer standard protocol format; wherein the preset application layer standard protocol format includes: any one of the web instant messaging protocol or the real-time streaming transmission protocol; the preset transport layer standard protocol format includes: any one of the real-time transport protocol or the real-time transport control protocol; the preset network layer standard protocol format includes: any one of the user data packet protocol or the stream control transmission protocol.
[0044] The embodiment of the present application provides a cloud audio and video processing system, including: a first cloud host, a second cloud host and an interactive device; a cloud audio and video process is running on the first cloud host; a preset uplink standard interface and a preset downlink standard interface are deployed on the second cloud host; a client standard component is deployed on the interactive device; the client standard component is connected to the event standard input interface on the first cloud host through the preset uplink standard interface, and the client standard component is connected to the encoding transmission standard interface on the first cloud host through the preset downlink standard interface; wherein,
[0045] The first cloud host is used to call the acquisition module through the audio and video acquisition standard interface to collect the audio and video data generated by the cloud audio and video process; call the encoding module through the encoding transmission standard interface to perform audio and video encoding on the audio and video data in a preset standard encoding format to obtain an encoded audio and video stream, and transmit the encoded audio and video stream to the preset downlink standard interface;
[0046] The second cloud host is used to transmit the encoded audio and video stream to the client standardized component through the preset downlink standard interface using a preset standard transmission format;
[0047] The interactive device is used to decode and play the encoded audio and video stream through the client standard component to obtain a decoded video image and a decoded audio; obtain an operation event initiated for the decoded video image or the decoded audio, and send the operation event to the preset uplink standard interface;
[0048] The second cloud host is further configured to transmit the operation event to the event standard input interface via the preset uplink standard interface using the preset standard transmission format;
[0049] The first cloud host is further used to map the operation event to a target drive event corresponding to the current operating system through the event standard input interface; the target drive event is used to drive the cloud audio and video process to update the audio and video data accordingly;
[0050] Among them, the audio and video acquisition standard interface, the encoding transmission standard interface, and the event standard input interface are standardized interfaces implemented in the cloud service standardized subclass derived from the preset cloud service standardized base class based on the respective configuration information of the acquisition module, the encoding module and the operating system.
[0051] An embodiment of the present application provides an electronic device, including:
[0052] A memory for storing executable instructions;
[0053] The processor is used to implement any of the above-mentioned cloud audio and video processing methods provided in the embodiments of the present application when executing the executable instructions stored in the memory.
[0054] An embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute and implement any of the above-mentioned cloud audio and video processing methods provided in the embodiment of the present application.
[0055] The embodiments of the present application have the following beneficial effects:
[0056] By implementing standardized interfaces based on the configuration information of the acquisition module, encoding module and operating system on the cloud service platform host in the cloud service standardized subclass derived from the preset cloud service standardized base class, the acquisition module configured on the cloud service platform host can be called through the audio and video acquisition standard interface to collect audio and video data; the encoding module configured on the cloud service platform host can be called through the encoding transmission standard interface to perform audio and video standardized encoding and output, and the operation event can be mapped to the target drive event corresponding to the operating system of the cloud service platform host through the event standard input interface, thereby realizing the encapsulation and isolation of different module driver configurations and operating systems of different cloud hosts. Standardized acquisition encoding, transmission, event and other services can be provided to the outside through a unified cloud service standardized subclass on cloud hosts with different configurations, reducing module coupling and code redundancy, and improving the compatibility and stability of the cloud audio and video interaction system. In addition, when upgrading or migrating acquisition encoding, transmission, event and other services to new hardware or the host operating system operating environment, it is only necessary to implement the functional interface of the cloud service standardized subclass to complete the upgrade, thereby improving the maintainability of the cloud audio and video interaction system. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 This is a schematic diagram of the cloud gaming interaction process provided by an embodiment of the present application;
[0058] Figure 2 It is a schematic diagram of the architecture of the current cloud gaming server platform provided in the embodiment of the present application;
[0059] Figure 3It is an optional structural diagram of the cloud audio and video processing system architecture provided in the embodiment of the present application;
[0060] Figure 4 is an optional structural diagram of the first cloud host provided in an embodiment of the present application;
[0061] Figure 5 is an optional structural diagram of an interactive device provided in an embodiment of the present application;
[0062] Figure 6 is an optional structural diagram of a second cloud host provided in an embodiment of the present application;
[0063] Figure 7 This is an optional flow chart of the cloud audio and video processing method provided in the embodiment of the present application;
[0064] Figure 8 It is a schematic diagram of the relationship between the preset cloud service standardized base class, the cloud service standardized subclass and the standard virtual function interface included in the preset cloud service standardized base class provided by the embodiment of the present application;
[0065] Fig. 9 This is an optional flow chart of the cloud audio and video processing method provided in the embodiment of the present application;
[0066] Fig.10 This is an optional flow chart of the cloud audio and video processing method provided in the embodiment of the present application;
[0067] Fig.11 It is a schematic diagram of the client standardization component provided in an embodiment of the present application converting an original operation instruction of at least one format type;
[0068] Fig.12 This is an optional flow chart of the cloud audio and video processing method provided in the embodiment of the present application;
[0069] Fig.13 This is an optional flow chart of the cloud audio and video processing method provided in the embodiment of the present application;
[0070] Fig.14 It is an optional architectural diagram of the cloud gaming system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0072] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0073] If similar descriptions of "first / second" appear in the application documents, the following instructions are added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0074] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0075] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0076] 1) Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to achieve data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool that can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of technical network systems require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.
[0077] 2) Cloud computing is a computing model that distributes computing tasks on a resource pool consisting of a large number of computers, allowing various application systems to obtain computing power, storage space and information services as needed. The network that provides resources is called a "cloud". The resources in the "cloud" are infinitely expandable in the eyes of users, and can be obtained at any time, used on demand, expanded at any time, and paid for by use.
[0078] As a provider of basic cloud computing capabilities, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.
[0079] According to the logical function division, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on the PaaS layer. SaaS can also be deployed directly on IaaS. PaaS is a platform for software operation, such as databases, web virtual containers, etc. SaaS is a variety of business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.
[0080] 3) Cloud gaming: Also known as gaming on demand, it is an online gaming technology based on cloud computing technology. Cloud gaming technology enables thin clients with relatively limited graphics processing and data computing capabilities to run high-quality games. In a cloud gaming scenario, the game is not played on the player's game terminal, but on a cloud server, which renders the game scene into a video and audio stream and transmits it to the player's game terminal over the network. The player's game terminal does not need to have powerful graphics computing and data processing capabilities, but only needs to have basic streaming media playback capabilities and the ability to obtain player input commands and send them to the cloud server.
[0081] 4) Unreal Engine: It is a complete development framework for PC, Xbox 360, iOS and PlayStation 3, which provides a large number of core technologies, content creation tools and supporting infrastructure content. The design concept of all aspects of Unreal Engine is to make content creation and programming more convenient. Its design goal is to give artists and game designers as much control as possible to develop resources in the visual environment, minimize the assistance of programmers, and provide programmers with a highly modular, upgradeable and scalable architecture so that they can develop, test and publish various types of games.
[0082] 5) X86: The X86 architecture is a computer language instruction set executed by a microprocessor. It refers to a standard numbering abbreviation for an Intel general-purpose computer series. It also identifies a set of general-purpose computer instructions, which is a complex instruction set for a complex instruction set computer (CISC).
[0083] 6) ARM (Advanced RISC Machine): The ARM processor is the first low-power and low-cost Reduced Instruction Set Computing (RISC) microprocessor designed by Acorn Ltd. of the United Kingdom.
[0084] 7) Houdini: Houdini is an ARM binary translator developed by Intel. Its principle is to translate ARM binary code into X86 instruction set so that it can be executed on X86 CPU.
[0085] 8) Frames Per Second (FPS): FPS is a definition in the field of images, which refers to the number of frames transmitted per second. Generally speaking, it refers to the number of frames in an animation or video. FPS measures the amount of information used to save and display dynamic videos. The more frames per second, the smoother the displayed action will be. It can also be understood as the "refresh rate" (in Hz).
[0086] 9) A virtual container (also called an emulator) is a complete computer system that is simulated by a computer program and has complete hardware system functions and runs in a completely isolated environment. Any work that can be done in a physical computer can be done in an emulator. Emulators may include Android emulators, Java emulators, Linux emulators, Windows emulators, and so on.
[0087] 10) A virtual function is a member function modified by virtual, which is declared as virtual in the base class and redefined in one or more derived classes. When a pointer to a base class operates its polymorphic class object, it will call its corresponding function according to different class objects. Virtual functions can be used to implement polymorphism, which is to separate the interface from the implementation, and implement the same function, but use different methods and strategies due to individual differences.
[0088] 11) Real Time Streaming Protocol (RTSP) is an application layer protocol in the TCP / IP protocol system.
[0089] 12) Web Real-Time Communication (WebRTC) protocol is an API protocol that supports web browsers to conduct real-time voice or video conversations.
[0090] 13) Real-time Transport Protocol (RTP) is a network transmission protocol; Real-time Transport Control Protocol (RTCP) is its sister protocol.
[0091] 14) User Datagram Protocol (UDP) provides a method for applications to send encapsulated IP data packets without establishing a connection.
[0092] 15) Stream Control Transmission Protocol (SCTP) is a protocol for transmitting multiple data streams simultaneously between the two ends of a network connection.
[0093] 16)QEMU is a processor simulation system that distributes source code under a general public license and is widely used on GNU / Linux platforms.
[0094] At present, cloud gaming is a gaming method based on cloud computing. In the cloud gaming mode, all games are run on the server side, and the game screen generated by the server is encoded and compressed and transmitted to the cloud gaming client on the terminal through the network. The gaming device on the cloud gaming client does not need to be equipped with any high-end processors and graphics cards, nor does it need to actively adapt to different software and hardware platforms, or have powerful terminal rendering performance. It only needs basic audio and video decompression capabilities. The current interactive methods of cloud gaming can be as follows: Figure 1As shown. The main process of the cloud game runs on the cloud server 10, which is usually an edge computing node with a graphics processing unit (GPU). The cloud server 10 converts the game image generated by the GPU into a video stream in a format such as VP8, VP9, H.264, H265 or AV1, and audio stream data in a format such as silk, opus, aac, etc., and transmits the audio and video streams to various types of terminals 11 through the network, such as TVs, mobile phones, PCs, tablets, etc. The terminal can decode the received audio and video streams and render them to obtain the terminal game screen, which is displayed to the user on the terminal display device. In addition, the terminal can receive the operation instructions initiated by the user at the target coordinate position of the terminal game screen through operating devices such as keyboards, mice, handles, touch screens, etc., and use these operation instructions and coordinate positions as interactive operation information, which are transmitted uplink to the cloud server 10. The cloud server 10 then maps the received interactive operation information into the default game mouse button in the cloud game program, and then sends it to the cloud server 10 through the keyboard and mouse driver to complete the entire game service experience.
[0095] At present, the cloud gaming system mainly provides the basic service capabilities of the cloud gaming server through the PaaS layer. Figure 1 At present, the basic architecture of the cloud gaming PaaS layer can be as follows: Figure 2As shown, the PaaS layer on the edge computing node 10 of the cloud game may include an audio and video acquisition encoding module 15, a real-time communication transmission (RTC) channel 12, and an event input service 13. Among them, the audio and video acquisition encoding module 15 includes four sub-modules: audio acquisition, audio encoding, video acquisition, and video encoding. Correspondingly, the terminal is configured with an RTC channel 22, an audio and video decoding and rendering module 25, and an event input service 23 to interact with the edge computing node for cloud games. The audio and video acquisition and encoding module 15, the RTC channel 12 and the event input service 13 in the edge computing node 10 are all integrated in the same PaaS process service. The audio and video acquisition and encoding module 15 is used to acquire and encode the game rendering screen of the cloud gaming process 14 to obtain an audio and video stream; the audio and video stream is transmitted to the terminal 20 through the RTC channel 12, and the terminal operation instructions are received through the event input service 13, such as the operation instructions issued by the receiving terminal through the mouse, keyboard, touch, etc. as the terminal uplink event; the received terminal uplink event is simulated into the event drive or event instruction of the host OS system currently running on the edge computing node 10, and sent to the cloud gaming process 14 in the host OS. Since the hardware configuration of the computing node and the host software system are usually different combination solutions, for example, for PC cloud game servers, the host is usually a windows system, and the hardware configuration environment is mainly based on CPU (INTEL / AMD x86) + GPU (NVIDA / AMD) solutions. For mobile cloud game servers, the host is usually an Android virtual container, and the hardware configuration environment is mainly based on CPU (INTEL / AMD x86 houdini) or ARM+GPU (NVIDA / AMD / INTEL) + docker virtual container solutions. In the current PaaS layer structure, the audio and video acquisition encoding module 15, RTC channel 12 and event input service 13 are designed for different operating systems and different hardware configurations. The coupling between modules will be very large. In addition, due to different hardware or different host OS operating environment systems and driver acquisition encoding, transmission and event underlying APIs are different, resulting in the following defects in the current cloud game PaaS layer:
[0096] 1. The cost of upgrading the PaaS platform is high: When the server's hardware configuration combination and the host OS environment change, the previous PaaS layer code can basically not be reused, and most of the code related to the hardware and host OS environment needs to be rewritten.
[0097] 2. Poor stability of the PaaS platform: The entire platform architecture code is strongly related to the hardware configuration and the host OS. As long as the hardware configuration and the host OS change, the entire upstream and downstream end-to-end link module adaptation and rewritten code must be retested and adapted.
[0098] 3. High operation and maintenance costs of the PaaS platform: Different hardware configurations and host OS environment codes are different, resulting in independent deployment of platform codes and architectures for different hardware and host OS configurations, which increases operation and maintenance costs exponentially.
[0099] It can be seen that the current implementation of the PAAS service platform in cloud games will lead to code redundancy and confusion in PaaS services in different environments. If the hardware combination configuration is upgraded, adjusted, and the host OS operation changes, the entire PaaS service code must adapt to the new hardware driver and host OS-related API interfaces, which is not convenient for the PaaS layer to be upgraded and migrated to the new hardware and OS operating environment later, which in turn leads to high upgrade costs for the entire cloud game background service, and poor operation and maintenance and platform stability.
[0100] The embodiments of the present application provide a cloud audio and video processing method, system, electronic device and storage medium, which can improve the compatibility, stability and maintainability of the cloud audio and video interaction system. The exemplary application of the electronic device provided by the embodiments of the present application is described below.
[0101] See also Figure 3 , Figure 3It is an optional architectural diagram of the cloud audio and video processing system 100 provided in an embodiment of the present application. The cloud audio and video processing system 100 includes: a first cloud host 200, a second cloud host 500 and an interactive device 400 (interactive device 400-1 and interactive device 400-2 are shown as examples). The interactive device 400 is connected to the second cloud host 500 through a network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. In some embodiments, the first cloud host 200 can run on an edge computing node of a cloud network. The first cloud host 200 and the second cloud host 500 are connected to each other, and the interactive device 400 is connected to the first cloud host 200 through the second cloud host 500. The second cloud host 500 is deployed with a preset uplink standard interface 560 and a preset downlink standard interface 570; the interactive device 400 is deployed with a client standard component 460 (the client standard component 460-1 and the client standard component 460-2 are shown as examples); the first cloud host 200 runs a cloud audio and video process 200-2; the cloud audio and video process 200-2 can be the main process of a cloud audio and video application, such as the main game process of a cloud game. The first cloud host 200 is configured with an acquisition and coding event framework 200-1, which includes an acquisition module 260, an encoding module 270, and an event processing module 280, as well as an audio and video acquisition standard interface 261, an encoding transmission standard interface 271, and an event standard input interface 281. Among them, the audio and video acquisition standard interface 261, the encoding transmission standard interface 271, and the event standard input interface 281 are standardized interfaces implemented in the cloud service standardized subclass derived from the preset cloud service standardized base class based on the configuration information of the acquisition module 260, the encoding module 270 and the operating system respectively.
[0102] like Figure 3 As shown, the client standard component 460-1 is connected to the event standard input interface 281 on the first cloud host 200 through the preset uplink standard interface 560 on the second cloud host 500, and the client standard component 460-1 is connected to the encoding transmission standard interface 271 on the first cloud host 200 through the preset downlink standard interface 570 on the second cloud host 500; wherein,
[0103] The first cloud host 200 may be a cloud service platform host in the cloud audio and video interactive system 100, and is used to call the acquisition module 260 through the audio and video acquisition standard interface 261 to collect audio and video data generated by the cloud audio and video process 200-2; call the encoding module 270 through the encoding transmission standard interface 271 to perform audio and video encoding of the audio and video data in a preset standard encoding format to obtain an encoded audio and video stream, and transmit the encoded audio and video stream to the preset downlink standard interface 570;
[0104] The second cloud host 500 is used to transmit the encoded audio and video stream to the client standardized component through the preset downlink standard interface 570 using the preset standard transmission format;
[0105] The interactive device 400 belongs to the end user of the cloud audio and video processing system 100, such as a player of a cloud game, and is used to decode and play the encoded audio and video stream through the client standard component 460, obtain the decoded video image and the decoded audio, and display them on the graphical interface 470 (graphical interface 470-1 and graphical interface 470-2 are shown as examples); obtain the operation event initiated for the decoded video image or the decoded audio, and send the operation event to the preset uplink standard interface 560;
[0106] The second cloud host 500 is further used to transmit the operation event to the event standard input interface through the preset uplink standard interface 560 using the preset standard transmission format;
[0107] The first cloud host 200 is also used to map the operation event to the target drive event corresponding to the current operating system through the event standard input interface 281; the target drive event is used to drive the cloud audio and video process 200-2 to update the audio and video data accordingly.
[0108] In some embodiments, the first cloud host 200 and the second cloud host 500 can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The interactive device 400 can be a smart phone, a tablet computer, a laptop, a desktop computer, a set-top box, a mobile device (for example, a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device) and other types of user terminals, but is not limited thereto. The interactive device 400 and the second cloud host 500, the first cloud host 200 and the second cloud host 500 can be directly or indirectly connected by wired or wireless communication, which is not limited in the embodiments of the present application.
[0109] As disclosed in the present application, in the cloud audio and video processing method or device, multiple cloud hosts or servers can be combined into a blockchain, and the server is a node on the blockchain.
[0110] Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0111] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operation monitoring. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and the maintenance of the correspondence between the user's real identity and the blockchain address (authority management), etc., and, under authorization, supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records valid requests to storage after consensus is reached. For a new business request, the basic service first adapts the interface for parsing and authentication (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management). The smart contract module is responsible for the registration and issuance of contracts, as well as contract triggering and contract execution. Developers can define the contract logic in a programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the key or other events are called to trigger the execution and complete the contract logic. It also provides the function of contract upgrade and cancellation. The operation monitoring module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarm, network monitoring, node equipment health monitoring, etc.
[0112] The platform product service layer provides the basic capabilities and implementation framework of typical applications. Developers can superimpose the characteristics of the business based on these basic capabilities to complete the blockchain implementation of business logic. The application service layer provides application services based on blockchain solutions for business participants to use. In some embodiments, when the cloud audio and video processing system disclosed in this application is implemented in the form of a blockchain network, the platform product service layer can be installed and operated based on the first cloud host 200 and the second cloud host 500.
[0113] See also Figure 4 , Figure 4 is a schematic diagram of the structure of the first cloud host 200 provided in an embodiment of the present application, Figure 4The first cloud host 200 shown includes: at least one first processor 210, a first memory 250, at least one first network interface 220 and a first user interface 230. The various components in the first cloud host 200 are coupled together through a first bus system 240. It can be understood that the first bus system 240 is used to achieve connection and communication between these components. In addition to the data bus, the first bus system 240 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 4 In the figure, various buses are labeled as a first bus system 240 .
[0114] The first processor 210 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0115] The first user interface 230 includes one or more first output devices 231 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The first user interface 230 also includes one or more first input devices 232, including user interface components that facilitate user input, such as a keyboard, a mouse, a microphone, a touch screen display, a camera, other input buttons and controls.
[0116] The first memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The first memory 250 may optionally include one or more storage devices physically located away from the first processor 210.
[0117] The first memory 250 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The first memory 250 described in the embodiment of the present application is intended to include any suitable type of memory.
[0118] In some embodiments, the first memory 250 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0119] The first operating system 251 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0120] A first network communication module 252, used to reach other computing devices via one or more (wired or wireless) first network interfaces 220, exemplary network interfaces 220 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;
[0121] A first presentation module 253 for enabling presentation of information (e.g., a user interface for operating peripherals and displaying content and information) via one or more first output devices 231 (e.g., a display screen, a speaker, etc.) associated with the first user interface 230;
[0122] The first input processing module 254 is configured to detect one or more user inputs or interactions from one of the one or more first input devices 232 and to translate the detected inputs or interactions.
[0123] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 4 A first cloud audio and video processing device 255 stored in a first memory 250 is shown, which may be software in the form of a program and a plug-in, including the following software modules: an acquisition module 260, an encoding module 270, and an event processing module 280. These modules are logical, and therefore may be arbitrarily combined or further split according to the functions implemented.
[0124] The functions of each module will be described below.
[0125] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the cloud audio and video processing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs) or other electronic components.
[0126] See also Figure 5 , Figure 5 is a schematic diagram of the structure of an interactive device 400 provided in an embodiment of the present application, Figure 5 The second cloud audio and video processing device 455 stored in the second memory 450 is shown, which can be software in the form of programs and plug-ins, including the following software modules: client standardization components 460, which are logical and can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below. Figure 5 The functions of at least one second processor 410, a second memory 450, at least one second network interface 420 and a second user interface 430 are similar to those of the modules Figure 4 The functions of the same modules are the same and will not be repeated here.
[0127] See also Figure 6 , Figure 6 is a schematic diagram of the structure of the second cloud host 500 provided in an embodiment of the present application, Figure 6 The third cloud audio and video processing device 555 stored in the third memory 550 is shown, which can be software in the form of programs and plug-ins, including the following software modules: a preset downlink standard interface 570 and a preset uplink standard interface 560. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below. Figure 6 The functions of at least one third processor 510, a third memory 550, at least one third network interface 520 and a third user interface 530 are similar to those of the modules Figure 4 The functions of the same modules are the same and will not be repeated here.
[0128] The cloud audio and video processing method provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the first cloud host, the interactive device and the second cloud host provided in the embodiment of the present application.
[0129] See also Figure 7 , Figure 7 is an optional flow chart of the cloud audio and video processing method provided in the embodiment of the present application applied to the first cloud host and the interactive device, which will be combined with Figure 7 The steps shown are explained.
[0130] S101. The first cloud host calls a collection module through a standard audio and video collection interface to collect audio and video data generated by a cloud audio and video process.
[0131] The cloud audio and video processing method provided in the embodiment of the present application is mainly applied to cloud audio and video interaction scenarios, such as cloud games, cloud live broadcasts, and virtual engine application scenarios.
[0132] In an embodiment of the present application, the cloud audio and video process may be the main process of cloud audio and video applications such as cloud games and cloud live broadcasts, and the cloud audio and video applications are pre-installed and run on the audio and video application cloud server in the cloud. In some embodiments, the audio and video application cloud server may be a game application cloud server, and one or more emulators (Virtual Device) may be run on the game application cloud server. Exemplarily, the emulator may be a virtual machine, and the cloud audio and video process may run in the virtual machine. The memory of the virtual machine may contain game resources, such as image resources, character resources, audio resources, etc. of the game. During operation, the cloud game process may call the game resources according to the current program driving logic to render the relevant game data to obtain the game screen, and generate the corresponding game audio. The first cloud host may call its own acquisition module through the audio and video acquisition standard interface to obtain the game screen and game audio from the cloud audio and video process as audio and video data.
[0133] In the embodiment of the present application, for the acquisition modules on different cloud hosts, the driver interface and the software development kit (SDK) interface provided by the hardware configuration and the operating system are different. The audio and video acquisition standard interface in the embodiment of the present application can be realized by specifically implementing the call of the driver interface and SDK interface of the acquisition module in the standard audio and video acquisition virtual function interface in the cloud service standardization subclass according to the driver interface and SDK interface of the acquisition module configured on the first cloud host. Among them, the cloud service standardization subclass inherits from the preset cloud service standardization base class, and the preset cloud service standardization base class pre-defines the standard audio and video acquisition virtual function interface. The first cloud host can specifically implement its corresponding cloud service standardization subclass according to its own hardware configuration and operating system configuration to be applied on different cloud hosts. Here, the first cloud host implements the standard audio and video acquisition virtual function interface in the cloud service standardization subclass according to the driver interface and SDK interface corresponding to its own acquisition module, so that the standardized acquisition of audio and video data can be realized externally through a unified standard audio and video acquisition virtual function interface name, and the compatible shielding of acquisition modules with different hardware and software configurations can be realized internally.
[0134] In an embodiment of the present application, the first cloud host can access the GPU graphics interface on the audio and video application cloud server through the acquisition module, and obtain the current video screen from the GPU graphics interface. The first cloud host can access the audio interface, such as a sound card, on the audio and video application cloud server through the acquisition module, and obtain the current audio from the audio interface. The first cloud host uses the current video screen and the current audio as audio and video data. In some embodiments, the GPU graphics interface may include DirectX 9 / 10 / 11 / 12 and OpenGL interfaces, and the audio interface may be the Windows Audio Session API. The specific selection is made according to the actual situation, and the embodiment of the present application is not limited.
[0135] In some embodiments, the preset cloud service standardized base class may be predefined with a preset sampling frame rate. The first cloud host may periodically call the local acquisition driver interface of the acquisition module through the audio and video acquisition standard interface to acquire the current video image and current audio generated by the cloud audio and video process according to the preset sampling frame rate to obtain audio and video data; the preset sampling frame rate is a standardized sampling frame rate uniformly set in the preset cloud service standardized base class.
[0136] In some embodiments, the cloud audio and video process can be deployed and run on the same host machine, or can be deployed on other cloud hosts. The specific selection is made based on actual conditions and is not limited in the embodiments of the present application.
[0137] S102: The first cloud host calls the encoding module through the encoding transmission standard interface, performs audio and video encoding on the audio and video data in a preset standard encoding format, obtains an encoded audio and video stream, and transmits the encoded audio and video stream to the interactive device.
[0138] In an embodiment of the present application, when the first cloud host collects audio and video data, it can call up its own configured encoding module through the encoding output standard interface. In some embodiments, the encoding module may include a video encoder and an audio encoder. The first cloud host can redirect the current video screen in the audio and video data to the video encoder, and encode the current video screen in a preset standard video format through the video encoder; and take over the current audio in the audio and video data through the audio encoder, and encode the current audio in a preset standard audio format through the audio encoder; wherein the preset standard encoding format includes at least one of a preset video standard format and a preset standard audio format.
[0139] In some embodiments, the preset video standard format in the preset standard encoding format may include H.264 and H.265 formats, and the preset standard audio format in the preset standard encoding format may include AAC and Opus. The specific selection is made according to actual conditions. The embodiment of the present application does not limit the specific encoding format type and quantity of the preset standard encoding format.
[0140] In the embodiment of the present application, after the first cloud host with different software and hardware configurations performs audio and video encoding in a preset standard encoding format on the audio and video data, a uniform encoded audio and video stream in a preset standard encoding format can be obtained. The first cloud host transmits the encoded audio and video stream to the interactive device.
[0141] In some embodiments, the acquisition module may be a graphics card on the first cloud host, and the interactive device may be a cloud gaming terminal device, such as a computer, a mobile phone, a game console, a tablet computer, and the like.
[0142] In the embodiment of the present application, for the encoding modules on different cloud hosts, the driver interface and SDK interface provided by the hardware configuration and the operating system are different. The encoding transmission standard interface in the embodiment of the present application can be implemented by calling the driver interface and SDK interface of the encoding module in the internal implementation of the standard encoding output virtual function interface in the cloud service standardized subclass corresponding to the first cloud host, according to the driver interface and SDK interface of the encoding module configured on the first cloud host. Here, the first cloud host specifically implements the standard encoding output virtual function interface in the cloud service standardized subclass corresponding to itself according to the driver interface and SDK interface corresponding to its own encoding module, which can realize the compatibility shielding of encoding modules with different hardware and software configurations internally, and realize the standardized encoding output of audio and video data externally through the unified name of the standard encoding output virtual function interface.
[0143] In some embodiments, the preset cloud service standardized base class may pre-define a preset encoding frame rate. The first cloud host may call the local encoding driver interface of the encoding module through the encoding transmission standard interface, encode the audio and video data according to the preset encoding frame rate and the preset standard encoding format, and obtain an encoded audio and video stream; the preset encoding frame rate is a standardized encoding frame rate uniformly set in the preset cloud service standardized base class.
[0144] S201. The interactive device receives a coded audio and video stream, and decodes and plays the coded audio and video stream to obtain a decoded video image and a decoded audio.
[0145] In an embodiment of the present application, when the interactive device receives the encoded audio and video stream transmitted by the first cloud host, it can decode and render the encoded audio and video stream to obtain the decoded video image and decoded audio of the cloud audio and video, and present it to the operator of the interactive device, such as a cloud game user, on the interactive device.
[0146] S202: The interactive device obtains an operation event initiated for decoding a video image or decoding an audio, and sends the operation event to an event standard input interface of the first cloud host.
[0147] In the embodiment of the present application, the interactive device obtains an operation event initiated by the operator on the decoded video screen or decoded audio, such as an event generated by clicking, pressing or sliding on a virtual character, game scene, or game option. The interactive device sends the operation event to the event standard input interface of the first cloud host.
[0148] S103, the first cloud host receives an operation event initiated by the interactive device based on the encoded audio and video stream through the event standard input interface, and maps the operation event to a target drive event corresponding to the current operating system; the target drive event is used to drive the cloud audio and video process to update the audio and video data accordingly; wherein
[0149] The audio and video acquisition standard interface, the encoding transmission standard interface, and the event standard input interface are standardized interfaces implemented in the cloud service standardized subclass derived from the preset cloud service standardized base class based on the configuration information of the acquisition module, the encoding module, and the operating system.
[0150] In the embodiment of the present application, the first cloud host can receive an operation event initiated by the interactive device based on the encoded audio and video stream, and map the operation event to a target driven event corresponding to its own operating system through the event standard input interface.
[0151] In the embodiments of the present application, the program driving logic in the cloud audio and video process is usually implemented based on an operation mode corresponding to a preset default device type. For example, cloud games made by cloud game developers with mobile phones as the default device type usually use mobile phone type operation modes such as screen clicks or screen slides to implement the program execution logic corresponding to the driving event to control the operation of the cloud game process. Since cloud games and other cloud audio and video applications are oriented to many different types of interactive devices, it is necessary to convert the operation events initiated by interactive devices of different device types into standard driving events corresponding to the default device type of the cloud audio and video process, so as to realize the driving control of cloud audio and video on different interactive devices.
[0152] In some embodiments, the first cloud host can call the preset instruction conversion service through the event standard input interface, determine the target drive event corresponding to the operation event from the preset correspondence between at least one preset operation event and at least one standard drive event, and then convert the operation event into a target drive event. Among them, at least one standard drive event is a standard drive event in the current operating system. The first cloud host can continue to drive the cloud audio and video process through the target drive event, so that the cloud audio and video process updates the current video screen and current audio according to the instructions of the target drive event. The first cloud host can continue to collect and encode the updated audio and video data to obtain an updated encoded audio and video stream, and then transmit the updated encoded audio and video stream to the interactive device to achieve continuous interaction with the cloud audio and video process.
[0153] In the embodiment of the present application, the event standard input interface is obtained by specifically implementing the standard event input virtual function interface in the cloud service standard subclass according to the different hardware on different cloud service hosts and the driver and SDK interface provided by the operating system. The event standard input interface internally implements the interface call between the hardware driver and the operating system on the current cloud service host, and realizes the compatibility shielding of the operating system event driver with different hardware and software configurations; it provides a unified standard event input virtual function interface name externally, and realizes the standardized output of the operating system driver event.
[0154] In some embodiments, when the first cloud host determines a target driven event, the target driven event can be input into the running cloud audio and video process to trigger the corresponding target program driving logic in the cloud audio and video process through the target driven event, and the corresponding updated video screen and updated audio are output by executing the target program driving logic as updated audio and video data to achieve a response to the operation event.
[0155] In some embodiments, the relationship between the preset cloud service standardized base class, the cloud service standardized subclass, and the standard virtual function interface included in the preset cloud service standardized base class can be as follows: Figure 8 As shown. Among them, the preset cloud service standardized base class can include standard audio and video acquisition virtual function interface, standard encoding output virtual function interface, standard event processing virtual function interface and other customized standard virtual function interfaces, etc. On the first cloud hosts with different hardware and software configurations, you can inherit the preset cloud service standardized base class to obtain a unified standard audio and video acquisition virtual function interface, standard encoding output virtual function interface, standard event processing virtual function interface and other customized standard virtual function interfaces; and according to the different hardware and software configuration information of different first cloud hosts, different cloud service standardized subclasses are implemented on different first cloud hosts. Figure 8 As shown, in different cloud service standardized subclasses, the same virtual function interface name can have different implementation methods, so that on different first cloud hosts, the acquisition module, encoding module, operating system and other modules with different software and hardware configurations can be called through a unified virtual function interface.
[0156] It can be understood that in the embodiment of the present application, by implementing a standardized interface based on the configuration information of the acquisition module, the encoding module and the operating system on the first cloud host in the cloud service standardized subclass derived from the preset cloud service standardized base class, the acquisition module configured on the first cloud host can be called through the audio and video acquisition standard interface to collect audio and video data; the encoding module configured on the first cloud host is called through the encoding transmission standard interface to perform audio and video standardized encoding and output, and the operation event is mapped to the target drive event corresponding to the operating system of the first cloud host through the event standard input interface, thereby realizing the encapsulation and isolation of different module driver configurations and operating systems of different cloud hosts. On cloud hosts with different configurations, standardized acquisition encoding, transmission, event and other services can be provided to the outside through a unified cloud service standardized subclass, which reduces the module coupling and code redundancy, improves the compatibility and stability of the cloud audio and video interaction system, and when the acquisition encoding, transmission, event and other services are upgraded or migrated to new hardware or the host OS operating environment, it is only necessary to implement the functional interface of the cloud service standardized subclass to complete it, thereby improving the maintainability of the cloud audio and video interaction system.
[0157] In some embodiments, see Fig. 9 , Fig. 9 This is an optional flow chart of the cloud audio and video processing method provided in the embodiment of the present application. The first cloud host also includes an initialization standard interface. Before S101, S001 can also be executed, which will be explained in combination with each step.
[0158] S001. The first cloud host calls the local initialization interfaces corresponding to the acquisition module, the encoding module and the operating system through the initialization standard interface to initialize the acquisition module, the encoding module and the operating system, wherein the initialization standard interface is a standardized interface implemented in the cloud service standardized subclass.
[0159] In an embodiment of the present application, the preset cloud service standardized base class may also include an initialization standard interface. For the cloud service standardized subclasses corresponding to different first cloud hosts, the inherited initialization standard interface may be specifically implemented based on the driver configuration information corresponding to the acquisition module and the encoding module, such as the acquisition and encoding drivers and SDK initialization interface provided by different hardware / host OS to the outside world, so as to realize the initialization of the acquisition module and the encoding module through the initialization standard interface.
[0160] In some embodiments, a client standard component is deployed on the interactive device, and the client standard component can be connected to the encoding transmission standard interface on the first cloud host. The client standard component can be connected to the event standard input interface on the first cloud host. Fig.10 , Fig.10is an optional flow chart of the cloud audio and video processing method provided in the embodiment of the present application. S201 can be implemented by executing the process of S2011-S2012, and S202 can be implemented by executing the process of S2021-S2022. Fig.10 The steps shown are explained.
[0161] S2011. The interactive device receives the encoded audio and video stream output by the first cloud host through the encoding transmission standard interface through the client standardized component.
[0162] In the embodiment of the present application, the client standard component is a functional component provided by the cloud audio and video processing system in the embodiment of the present application for different types of interactive devices such as televisions, mobile phones, and computers, and includes a unified standardized client service. The interactive device can receive the encoded audio and video stream in a preset standard encoding format output by the first cloud host through the encoding transmission standard interface through the client standard component.
[0163] In some embodiments, the client standard component can be in the form of an SDK. In some embodiments, the client standard component can also be integrated on the first cloud host, or other network nodes in the cloud audio and video interactive system, which is specifically selected according to actual conditions and is not limited in the embodiments of this application.
[0164] S2012. The interactive device decodes and plays the encoded audio and video streams in a preset decoding format through a client standardized component to obtain a decoded video image and decoded audio.
[0165] In the embodiment of the present application, the client standard component may include a standard audio and video processing service. The standard audio and video processing service is used to decode and play the encoded audio and video stream using a preset decoding format. The interactive device can decode and play the encoded audio and video stream using the preset decoding format through the standard audio and video processing service in the client standard component to obtain a decoded video image and decoded audio.
[0166] S2021. The interactive device obtains, through a client standardized component, at least one format type of original operation instruction initiated for decoding a video image or decoding an audio, and converts the format of the original operation instruction of at least one format type according to a preset standard event format to obtain an operation event.
[0167] In the embodiment of the present application, the client standard component may include an uplink event processing standard service, wherein the uplink event processing standard service is used to obtain an original operation instruction of at least one format type on the interactive device, and convert the original operation instruction of at least one format type according to a preset standard event format to obtain an operation event.
[0168] In an embodiment of the present application, the hardware configuration and software driver and other configuration information of the user interface components on different interactive devices are different. For example, game controllers of different models and brands have different formats of the original operation instructions issued when performing the same controller button operation, such as pressing the up button. Exemplarily, the API interfaces supported by the game controller may include DirectInput, XInput, RawInput, etc., and the format types of the original operation instructions output by different types of API interfaces are also different. The uplink event processing standard service can convert the original operation instructions of at least one format type into an operation event of a unified standard format according to a preset standard event format, so as to unify the original operation instructions issued by interactive devices of the same type but with different hardware and software configurations, and send the operation event to the first cloud host.
[0169] Here, the user interface component can be a hardware and software component integrated inside the interactive device, such as a touch screen of a mobile phone, or it can be an extension device connected to the interactive device through a hardware and software extension interface, such as a mouse, keyboard, or game controller connected to a PC terminal, or it can be a microphone, camera, etc. that can issue original operation instructions through sound or gestures. The specific selection is based on actual conditions and is not limited in the embodiments of the present application.
[0170] In some embodiments, Fig.11 As shown, different user interface components such as mouse 1, mouse 2, mouse 3 and touch screen 1, touch screen 2, touch screen 3, when performing click operations, respectively issue original operation instructions of different formats, such as mouse 1 click instruction, mouse 2 click instruction, etc. The interactive device can convert mouse click instructions of different formats into standard mouse click events as operation events through client standard components; and convert touch screen click instructions of different formats into standard touch screen click events as operation events.
[0171] S2022. The interactive device sends the operation event to the event standard input interface of the first cloud host.
[0172] In an embodiment of the present application, the client standardization component transmits the converted operation event in a preset standard event format to the event standard input interface, so as to map the operation event into a target driven event through the event standard input interface and continue the subsequent cloud audio and video method processing.
[0173] It can be understood that in the embodiments of the present application, the client standardization component can be compatible with shielding the operation instructions initiated by interactive devices with different hardware and software configurations, and the original operation instructions of at least one format type can be converted into operation events in a preset standard event format and transmitted to the first cloud host for processing. In addition, the client standardization component can shield the differences between the software and hardware media playback devices on different interactive devices, and provide a unified audio and video decoding and playback service, which is conducive to troubleshooting, upgrading, maintenance and migration of the cloud audio and video interaction system, reduces the risk of instability caused by code redundancy, and further improves the compatibility, stability and maintainability of the cloud audio and video interaction system.
[0174] See also Fig.12 , Fig.12 is an optional flow chart of the cloud audio and video processing method provided in the embodiment of the present application applied to the second cloud host, which will be combined with Fig.12 The steps shown are explained.
[0175] S301, the second cloud host obtains the encoded audio and video stream through the preset downlink standard interface; the encoded audio and video stream is obtained by the first cloud host calling the acquisition module through the audio and video acquisition standard interface to collect the audio and video data generated by the cloud audio and video process; and calling the encoding module through the encoding transmission standard interface to perform audio and video encoding on the audio and video data in a preset standard encoding format; the preset downlink standard interface is respectively connected to the encoding transmission standard interface and the interactive device on the first cloud host.
[0176] In the embodiment of the present application, a standard data transmission service may be pre-integrated between the preset uplink standard interface and the preset downlink standard interface, and the standard data transmission service is used to encapsulate and transmit the data between the preset uplink standard interface and the preset downlink standard interface using a preset standard transmission format. In some embodiments, the preset uplink standard interface and the preset downlink standard interface may be deployed on the second cloud host, or may be deployed on the first cloud host or other cloud hosts, and the specific selection is made according to the actual situation, and the embodiment of the present application does not limit it.
[0177] In the embodiment of the present application, the preset downlink standard interface is respectively connected to the encoding transmission standard interface and the interactive device on the first cloud host, and is used to transmit the data stream sent from the first cloud host to the interactive device. The second cloud host can obtain the encoded audio and video stream from the encoding transmission standard interface of the first cloud host through the preset downlink standard interface. Among them, the encoded audio and video stream is obtained by the first cloud host calling the acquisition module through the audio and video acquisition standard interface to collect the audio and video data generated by the cloud audio and video process; and calling the encoding module through the encoding transmission standard interface to perform audio and video encoding of the audio and video data in a preset standard encoding format.
[0178] S302: The second cloud host transmits the encoded audio and video stream to the interactive device using a preset standard transmission format.
[0179] In the embodiment of the present application, the second cloud host can utilize the standard data transmission service and use the preset standard transmission format to encapsulate and channel transmit the encoded audio and video stream in the corresponding transmission format, and then transmit the encoded audio and video stream to the interactive device.
[0180] In some embodiments, the preset standard transmission format includes at least one of the following: a preset application layer standard protocol format, a preset transport layer standard protocol format, and a preset network layer standard protocol format; wherein the preset application layer standard protocol format includes: any one of WebRTC or RTSP; the preset transport layer standard protocol format includes: any one of RTP or RTCP; the preset network layer standard protocol format includes: any one of UDP or SCTP.
[0181] S303, the second cloud host receives an operation event initiated by the interactive device based on the encoded audio and video stream through a preset uplink standard interface; the preset uplink standard interface is connected to the event standard input interface on the first cloud host and the interactive device respectively;
[0182] In the embodiment of the present application, the preset uplink standard interface is connected to the event standard input standard interface and the interactive device on the first cloud host respectively, and is used to transmit the data stream sent from the interactive device to the first cloud host. The second cloud host can receive the operation event initiated by the interactive device based on the encoded audio and video stream through the preset downlink standard interface.
[0183] S304: The second cloud host transmits the operation event to the event standard input interface using a preset standard transmission format.
[0184] In an embodiment of the present application, the second cloud host can, through a standard data transmission service, encapsulate and channel-transmit the content data of the operation event in a corresponding transmission format according to a preset standard transmission format, and then output the operation event to the event standard input interface of the first cloud host through a preset uplink standard interface.
[0185] It can be understood that in the embodiments of the present application, by standardizing the transmission of operation events and encoded audio and video streams transmitted in the cloud audio and video interaction system, further decoupling of the cloud audio and video interaction system architecture is achieved, thereby further improving the compatibility, stability and maintainability of the cloud audio and video interaction system.
[0186] In some embodiments, the interactive device includes: a client standard component, the client standard component is connected to a preset downlink standard interface and a preset uplink standard interface respectively, see Fig.13 , Fig.13is an optional flow chart of a cloud audio and video processing method provided in an embodiment of the present application, based on Fig.12 S302 can be implemented by executing the process of S3021, and S303 can be implemented by executing the process of S3031, which will be explained in combination with each step.
[0187] S3021. The second cloud host transmits the encoded audio and video stream to the client standardized component on the interactive device through a preset downlink standard interface and using a preset standard transmission format, so that the client standardized component decodes and plays the encoded audio and video stream in a preset decoding format to obtain decoded video images and decoded audio.
[0188] In the embodiment of the present application, the preset downlink standard interface may include a preset downlink standard entry and a preset downlink standard exit, wherein the preset downlink standard entry is connected to the encoding transmission standard interface in the first cloud host, and the preset downlink standard exit is connected to the client standard component.
[0189] In the embodiment of the present application, the encoding module on the first cloud host can transmit the encoded audio and video stream in the preset standard encoding format to the preset downlink standard entry on the second cloud host through the encoding transmission standard interface.
[0190] In an embodiment of the present application, when the second cloud host receives the encoded audio and video stream through a preset downstream standard entry, it can use the preset standard transmission format to encapsulate and transmit the encoded audio and video stream in the corresponding transmission format through the encoding transmission standard interface, and output it to the client standardized component on the interactive device through the preset downstream standard exit.
[0191] S3031. The second cloud host receives an operation event issued by a client standard component on the interactive device through a preset uplink standard interface, wherein the operation event is obtained by the client standard component by obtaining an original operation instruction of at least one format type initiated for decoding a video screen or decoding an audio, and converting the original operation instruction of at least one format type according to a preset standard event format.
[0192] In the embodiment of the present application, the preset uplink standard interface may include a preset uplink standard entry and a preset uplink standard exit, wherein the preset uplink standard entry may be connected to the client standard component, and the preset uplink standard exit may be connected to the event standard input interface in the first cloud host.
[0193] In the embodiment of the present application, the client standardization component can transmit the operation event to the preset upstream standard entry on the second cloud host through the network connection. When the second cloud host receives the operation event through the preset upstream standard entry, it can use the preset standard transmission format to encapsulate and transmit the operation event in the corresponding transmission format through the encoding transmission standard interface, and output it to the event standard input interface in the first cloud host through the preset upstream standard exit.
[0194] In some embodiments, the standardized transmission service may include at least one of the following: an uplink and downlink network transmission bandwidth assessment service, a congestion control service, a connection maintenance and abnormal reconnection service.
[0195] In some embodiments, the event standard input interface is connected to the preset uplink standard interface through a first socket; the encoding transmission standard interface is connected to the preset downlink standard interface through a second socket, so that according to the network conditions, the edge computing nodes and CDN nearby access services can be fully utilized for flexible deployment to solve the problem of nearby access to the last mile network.
[0196] In some embodiments, the first socket and the second socket may be the same or corresponding sockets, which are selected according to actual conditions and are not limited in the embodiments of the present application.
[0197] It can be understood that in the embodiments of the present application, by decoupling the acquisition, encoding, transmission and events in the cloud audio and video interaction system, the encapsulation and isolation of different module driver configurations and operating systems of different cloud hosts are achieved, so that standardized acquisition coding, transmission, event and other services can be provided to the outside through a unified cloud service standardized subclass on cloud hosts with different configurations, thereby reducing code redundancy and improving the compatibility and stability of the cloud audio and video interaction system. In addition, when upgrading or migrating acquisition coding, transmission, event and other services to new hardware or the host OS operating environment, it is only necessary to implement the functional interface of the cloud service standardized subclass, thereby improving the maintainability of the cloud audio and video interaction system.
[0198] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0199] The present application embodiment provides an implementation architecture of a cloud gaming system, such as Fig.14As shown. Among them, the cloud game system includes a cloud game terminal 600, a platform access layer 700 and a cloud service platform host 800, wherein the cloud game terminal 600 is equivalent to the interactive device 400, which can be any cloud game terminal device such as a mobile phone, a computer, a TV, etc. The cloud game terminal 600 is configured with a cloud game software toolkit (cloud game SDK) 610 and a media player 620, wherein the cloud game SDK 610 is equivalent to the client standardization component 460. The platform access layer 700 is equivalent to the second host 500, and the cloud service platform host 800 is equivalent to the first cloud host 200. Among them, the cloud game host 800 is composed of a hardware layer 810, a virtual machine layer 820, an operating system layer 830 and a collection coding event standardization framework 840. Among them, the hardware layer 810 includes hardware components on the host, such as CPU, GPU, IO memory and other hardware. In some embodiments, the CPU model can be X86 or ARM, and the GPU model can be NVDIA, AMD or INTEL. The virtual machine layer 820 is a virtual machine environment running on a cloud service platform host with different hardware configurations. In some embodiments, the virtual machine layer 820 can be a virtual machine environment of KVM, Xen, VMware or Hyper-V version. The virtual machine layer 820 is equipped with an operating system layer 830, and the operating system layer 830 can be a Linux operating system or a Windows operating system, in which an Android virtual container based on QEMU or houdini implementation or a Windows system virtual container can be run. In the embodiment of the present application, the acquisition coding event standardization framework 840 defines a base class for standard acquisition coding and event input. Cloud service platform hosts with different hardware and software configurations can inherit the base class and implement different virtual function interfaces in different standardized subclasses (such as Intel processor + Android container corresponding subclass 1, ARM processor + NVIDA graphics card + Android container corresponding subclass 2, etc.), so as to be compatible with the different acquisition module drivers, encoding module drivers, and operation events of the underlying shielding host, and provide a unified standard acquisition coding stream output and event input parsing service to the platform access layer 700 and the cloud travel terminal 600. In some embodiments, the standardized subclass can implement the following standard interface to provide unified standard services to the outside:
[0200] 1. Initialize the standard interface to shield the acquisition and encoding drivers and SDK initialization interface provided by different hardware / host OS.
[0201] 2. Standard interface for audio and video acquisition, used for acquisition shield compatibility and to set FPS timer according to the base class to regularly acquire screen content.
[0202] 3. Encoding transmission standard interface, used to shield compatibility according to the base class to set the FPS timing encoding output standard audio and video stream and output it downstream to the access service.
[0203] 4. Event standard input interface, used to input relevant events into the game process according to the driver and SDK interface requirements provided by different hardware and OS hosts. For example, the received mouse operation instructions are mapped into corresponding game mouse buttons, and then sent to the real game server through the keyboard and mouse driver to complete the entire game service experience.
[0204] like Fig.14 As shown, the cloud service platform host machine 800 and the platform access layer 700 in the embodiment of the present application have completed the construction of the operating system, database, middleware, runtime library, etc., and realized the hardware equipment, storage, transmission, network bandwidth, security, game update and other software and hardware function configurations related to the cloud game server side. The cloud game terminal 600 only needs to integrate or install the cloud game SDK 610, and it can interact with the cloud game server side for audio and video data and operation instructions by calling the API in the cloud game SDK 610, so as to run the relevant functions of the cloud game on the cloud game terminal 600.
[0205] In the embodiment of the present application, the platform access layer 700 and the cloud service platform host 800 are independent of each other in software architecture, the platform access layer 700 and the cloud service platform host 800 are separated, and the platform access layer 700 and the collection and coding event standardization framework 840 on the cloud service platform host 800 adopt socket communication. Therefore, the platform access layer 700 can be deployed on the same machine as the cloud service platform host 800, and can also be deployed on different hosts. Specifically, it can be flexibly deployed according to the network conditions of the game users. The embodiment of the present application is not limited. The platform access layer 700 is connected to the cloud travel SDK 610 in a standard way externally, and is connected to the collection and coding event standardization framework 840 internally, which is used for the input of standardized operation events and the output of encoded audio and video streams. The platform access layer 700 provides unified event and stream transmission services for the cloud travel SDK 610 and the cloud service platform host 800. In some embodiments, the application layer transmission and control protocols in the streaming service can be unified as WebRTC / RTSP, the transmission application layer protocols uplink and downlink can be unified as RTP / RTCP, and the network transport layer protocols can be unified as UDP / SCTP. The platform access layer can make full use of the edge computing nodes and the content delivery network (Content Delivery Network, CDN) nearby access services to solve the problem of cloud game users' nearby access to the last mile network, and can provide cloud game users with unified standard services such as upstream and downstream network transmission bandwidth assessment, congestion control, connection maintenance and abnormal reconnection.
[0206] In the embodiment of the present application, the cloud gaming system provides a unified cloud gaming SDK 610 to game terminals and game applications of different software and hardware types, such as mobile games, PC games, and cloud rendering APP applications. In some embodiments, the types of game terminals compatible with the cloud gaming SDK 610 may include Android / iOS / PC / Web / H5 / TV / PSP / Xbox / Switch, etc. In some embodiments, the cloud gaming SDK 610 may be a software development kit that has integrated standard WebRTC access, audio and video decoding, and mouse, keyboard, and other uplink event processing methods. Yunyou SDK610 can receive control instructions of different formats input into the game terminal by users through various models and various types of control devices, such as keyboards of different models, game controllers of different models, etc., and uniformly convert control instructions of different formats into keyboard keys, controllers, and touch screen events in preset standard event formats. In addition, Yunyou SDK610 implements input and output interfaces of standard audio and video formats, receives encoded audio and video streams of standard audio and video formats transmitted from the platform access layer through the input interface of standard audio and video formats, and sends uplink audio and video data (such as voice input instructions, video input instructions, etc.) of standard audio and video formats to the platform access layer through the input interface of standard audio and video formats. In some embodiments, the standard audio and video formats for uplink and downlink preset in Yunyou SDK610 can be H.264 / H.265 / AAC / Opus, etc., and the preset standard event format can be customized, and the specific selection is made according to the actual situation, which is not limited in the embodiments of the present application.
[0207] It can be understood that the cloud gaming service platform provided in the embodiments of the present application, when applied to cloud gaming scenarios, can achieve rapid iteration on different hardware configurations of cloud games and cloud mobile games (such as CPU: X86 / ARM+GPU: NVDIA / ARM / INTEL, etc.) and different host OS (such as Windows / Android virtual containers, etc.). When the cloud gaming service platform needs to upgrade or migrate to new hardware configurations, drivers, and SDKs, it only needs to implement the subclass's four basic virtual function interfaces to quickly access and debug the online application, thereby improving the compatibility of cloud games, and greatly improving stability and operation and maintenance efficiency.
[0208] The following further describes the exemplary structure of the first cloud audio and video processing device 255 provided in the embodiment of the present application as a software module. In some embodiments, Figure 4 As shown, the software modules stored in the first cloud audio and video processing device 255 of the memory 250 may include:
[0209] The acquisition module 260 is used to acquire the audio and video data generated by the cloud audio and video process through the audio and video acquisition standard interface;
[0210] The encoding module 270 is used to perform audio and video encoding of the audio and video data in a preset standard encoding format through a coding transmission standard interface to obtain an encoded audio and video stream, and transmit the encoded audio and video stream to the interactive device 400;
[0211] The event processing module 280 is used to receive the operation event initiated by the interactive device based on the encoded audio and video stream through the event standard input interface, and map the operation event to a target drive event corresponding to the current operating system; the target drive event is used to drive the cloud audio and video process to update the audio and video data accordingly; wherein,
[0212] The audio and video acquisition standard interface, the encoding transmission standard interface, and the event standard input interface are standardized interfaces implemented in a cloud service standardized subclass derived from a preset cloud service standardized base class based on the respective configuration information of the acquisition module, the encoding module, and the operating system.
[0213] In some embodiments, the first cloud audio and video processing device 255 also includes an initialization module, which is used to call the acquisition module through the audio and video acquisition standard interface. Before collecting the audio and video data generated by the cloud audio and video process, the acquisition module, the encoding module and the operating system are initialized by calling the local initialization interface corresponding to each other through the initialization standard interface, wherein the initialization standard interface is a standardized interface implemented in the cloud service standardized subclass.
[0214] In some embodiments, the acquisition module 260 is also used to collect the current video image and current audio generated by the cloud audio and video process according to a preset sampling frame rate, and obtain the audio and video data by calling the local acquisition driver interface through the audio and video acquisition standard interface at a regular interval; the preset sampling frame rate is a standardized sampling frame rate uniformly set in the preset cloud service standardized base class.
[0215] In some embodiments, the encoding module 270 is further used to call the local encoding driver interface through the encoding transmission standard interface, encode the audio and video data according to the preset encoding frame rate and the preset standard encoding format to obtain an encoded audio and video stream; the preset encoding frame rate is the standardized encoding frame rate uniformly set in the preset cloud service standardized base class;
[0216] The event processing module 280 is also used to call the preset instruction conversion service through the event standard input interface, determine the target driving event corresponding to the operation event from the preset correspondence between at least one preset operation event and at least one standard driving event; the at least one standard driving event is a standard driving event in the current operating system; and convert the operation event into the target driving event.
[0217] The following further describes the exemplary structure of the second cloud audio and video processing device 455 provided in the embodiment of the present application as a software module. In some embodiments, Figure 5 As shown, the software modules stored in the second cloud audio and video processing device 455 of the second memory 450 may include:
[0218] The client standardization component 460 is connected to the encoding transmission standard interface and the event standard input interface on the first cloud host 200; wherein,
[0219] The client standardization component 460 is used to receive the encoded audio and video stream sent by the encoding transmission standard interface; and decode and play the encoded audio and video stream to obtain a decoded video image and decoded audio; the encoded audio and video stream is obtained by the first cloud host 200 calling the acquisition module 260 through the audio and video acquisition standard interface to collect the audio and video data generated by the cloud audio and video process; and calling the encoding module 270 through the encoding transmission standard interface to perform audio and video encoding of the audio and video data in a preset standard encoding format;
[0220] The client standardization component 460 is also used to obtain the original operation instruction of at least one format type initiated for the decoded video screen or the decoded audio, and convert the format of the original operation instruction of at least one format type according to the preset standard event format to obtain the operation event, and send the operation event to the event standard input interface, so that the first cloud host 200 maps the operation event to the target drive event corresponding to the current operating system through the event standard input interface; the target drive event is used to drive the cloud audio and video process to update the audio and video data accordingly; wherein,
[0221] The audio and video acquisition standard interface, the encoding transmission standard interface, and the event standard input interface are standardized interfaces implemented in a cloud service standardized subclass derived from a preset cloud service standardized base class based on the respective configuration information of the acquisition module, the encoding module, and the operating system.
[0222] The following further describes the exemplary structure of the third cloud audio and video processing device 555 provided in the embodiment of the present application as a software module. In some embodiments, Figure 6As shown, the software modules stored in the third cloud audio and video processing device 555 of the third memory 550 may include:
[0223] A preset downlink standard interface 570 and a preset uplink standard interface 560; the preset downlink standard interface 570 is respectively connected to the encoding transmission standard interface and the interactive device on the first cloud host 200, and the preset uplink standard interface 560 is respectively connected to the interactive device and the event standard input interface on the first cloud host 200; wherein,
[0224] The preset downlink standard interface 570 is used to obtain the encoded audio and video stream; the encoded audio and video stream is obtained by the first cloud host 200 calling the acquisition module 260 through the audio and video acquisition standard interface to collect the audio and video data generated by the cloud audio and video process; and calling the encoding module 270 through the encoding transmission standard interface to perform audio and video encoding of the audio and video data in a preset standard encoding format; using the preset standard transmission format, the encoded audio and video stream is transmitted to the interactive device 400;
[0225] The preset uplink standard interface 560 is used to receive an operation event initiated by the interactive device 400 based on the encoded audio and video stream; and transmit the operation event to the event standard input interface on the first cloud host 200 using the preset standard transmission format.
[0226] In some embodiments, the interactive device 400 includes: a client standardization component 460, the client standardization component 460 is connected to the preset downlink standard interface 570 and the preset uplink standard interface 560 respectively, and the preset downlink standard interface 570 is further used to use the preset standard transmission format to transmit the encoded audio and video stream to the client standardization component 460 on the interactive device 400, so that the client standardization component 460 decodes and plays the encoded audio and video stream in a preset decoding format to obtain a decoded video picture and decoded audio;
[0227] The preset uplink standard interface 560 is also used to receive the operation event issued by the client standardization component 460 on the interactive device 400, wherein the operation event is obtained by the client standardization component 460 by obtaining at least one format type of original operation instructions initiated for the decoded video screen or decoded audio, and formatting the at least one format type of original operation instructions according to the preset standard event format.
[0228] In some embodiments, a standardized transmission service is implemented between the preset uplink standard interface 560 and the preset downlink standard interface 570, and the standardized transmission service includes at least one of the following:
[0229] Uplink and downlink network transmission bandwidth assessment service, congestion control service, connection maintenance and abnormal reconnection service.
[0230] In some embodiments, the event standard input interface is connected to the preset upstream standard interface 560 via a first socket; and the encoding transmission standard interface is connected to the preset downstream standard interface 570 via a second socket.
[0231] In some embodiments, the preset standard transmission format includes at least one of the following:
[0232] A preset application layer standard protocol format, a preset transport layer standard protocol format and a preset network layer standard protocol format; wherein the preset application layer standard protocol format includes: any one of the web instant messaging protocol or the real-time streaming transmission protocol; the preset transport layer standard protocol format includes: any one of the real-time transport protocol or the real-time transport control protocol; the preset network layer standard protocol format includes: any one of the user data packet protocol or the stream control transmission protocol.
[0233] It should be noted that the description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0234] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the cloud audio and video processing method described in the embodiment of the present application.
[0235] The present application embodiment provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will be caused to execute the method provided by the present application embodiment, for example, Figure 7 , Fig. 9 , Fig.10 , Fig.12 and the method shown in 13.
[0236] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0237] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0238] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0239] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0240] In summary, the embodiment of the present application implements a standardized interface based on the configuration information of the acquisition module, encoding module and operating system on the cloud service platform host in the cloud service standardized subclass derived from the preset cloud service standardized base class, so that the acquisition module configured on the cloud service platform host can be called through the audio and video acquisition standard interface to collect audio and video data; the encoding module configured on the cloud service platform host is called through the encoding transmission standard interface to perform audio and video standardized encoding and output, and the operation event is mapped to the target drive event corresponding to the operating system of the cloud service platform host through the event standard input interface, thereby realizing the encapsulation and isolation of different module driver configurations and operating systems of different cloud hosts. On cloud hosts with different configurations, standardized acquisition encoding, transmission, event and other services can be provided to the outside through a unified cloud service standardized subclass, which reduces the module coupling and code redundancy, improves the compatibility and stability of the cloud audio and video interaction system, and when the acquisition encoding, transmission, event and other services are upgraded or migrated to new hardware or the host OS operating environment, it is only necessary to implement the functional interface of the cloud service standardized subclass to complete it, thereby improving the maintainability of the cloud audio and video interaction system.
[0241] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A cloud audio and video processing method, characterized in that: include: Call the acquisition module through the audio and video acquisition standard interface to collect the audio and video data generated by the cloud audio and video process; Calling the encoding module through the encoding transmission standard interface, performing audio and video encoding of the audio and video data in a preset standard encoding format to obtain an encoded audio and video stream, and transmitting the encoded audio and video stream to the interactive device; Receiving, through an event standard input interface, an operation event initiated by the interactive device based on the encoded audio and video stream, and mapping the operation event to a target drive event corresponding to the current operating system; The target driven event is used to drive the cloud audio and video process to update the audio and video data accordingly; wherein, The audio and video acquisition standard interface, the encoding transmission standard interface, and the event standard input interface are standardized interfaces implemented in a cloud service standardized subclass derived from a preset cloud service standardized base class based on the respective configuration information of the acquisition module, the encoding module, and the operating system.
2. The method according to claim 1, characterized in that: Before calling the acquisition module through the audio and video acquisition standard interface to acquire the audio and video data generated by the cloud audio and video process, the method further includes: The acquisition module, the encoding module and the operating system are initialized by calling the local initialization interfaces corresponding to each of the acquisition module, the encoding module and the operating system through the initialization standard interface, wherein the initialization standard interface is a standardized interface implemented in the cloud service standardized subclass.
3. The method according to claim 1 or 2, characterized in that: The method of calling the acquisition module through the audio and video acquisition standard interface to acquire the audio and video data generated by the cloud audio and video process includes: According to the preset sampling frame rate, the local acquisition driver interface of the acquisition module is called periodically through the audio and video acquisition standard interface to acquire the current video image and current audio generated by the cloud audio and video process to obtain the audio and video data; the preset sampling frame rate is a standardized sampling frame rate uniformly set in the preset cloud service standardized base class.
4. The method according to claim 1 or 2, characterized in that: The step of calling the encoding module through the encoding transmission standard interface to perform audio and video encoding of the audio and video data in a preset standard encoding format to obtain an encoded audio and video stream includes: The local encoding driver interface of the encoding module is called through the encoding transmission standard interface, and the audio and video data are encoded according to a preset encoding frame rate and the preset standard encoding format to obtain an encoded audio and video stream; the preset encoding frame rate is a standardized encoding frame rate uniformly set in the preset cloud service standardized base class.
5. The method according to claim 1 or 2, characterized in that: Mapping the operation event to a target drive event corresponding to the current operating system includes: Calling a preset instruction conversion service through the event standard input interface, determining a target drive event corresponding to the operation event from a preset correspondence between at least one preset operation event and at least one standard drive event; the at least one standard drive event is a standard drive event in the current operating system; The operation event is converted into the target driven event.
6. A cloud audio and video processing method, characterized in that: include: Receive the encoded audio and video stream, and decode and play the encoded audio and video stream to obtain decoded video images and decoded audio; The encoded audio and video stream is obtained by the first cloud host calling the acquisition module through the audio and video acquisition standard interface to collect the cloud audio and video process to generate audio and video data; and calling the encoding module through the encoding transmission standard interface to perform audio and video encoding on the audio and video data in a preset standard encoding format; Acquire an operation event initiated for the decoded video image or the decoded audio, and send the operation event to the event standard input interface of the first cloud host, so that the first cloud host maps the operation event to a target drive event corresponding to the current operating system through the event standard input interface; The target driven event is used to drive the cloud audio and video process to update the audio and video data accordingly; wherein, The audio and video acquisition standard interface, the encoding transmission standard interface, and the event standard input interface are standardized interfaces implemented in a cloud service standardized subclass derived from a preset cloud service standardized base class based on the respective configuration information of the acquisition module, the encoding module, and the operating system.
7. The method according to claim 6, characterized in that The receiving of the encoded audio and video stream, and decoding and playing the encoded audio and video stream to obtain a decoded video image and a decoded audio, includes: Receiving, through a client standard component, the encoded audio and video stream output by the first cloud host through the encoding transmission standard interface; Decoding and playing the encoded audio and video stream in a preset decoding format through the client standardization component to obtain the decoded video image and the decoded audio; The obtaining of an operation event initiated for the decoded video picture or the decoded audio includes: Through the client standardization component, at least one format type of original operation instruction initiated for the decoded video picture or decoded audio is obtained, and the format of the at least one format type of original operation instruction is converted according to a preset standard event format to obtain the operation event.
8. A cloud audio and video processing method, characterized in that: include: Obtaining a coded audio and video stream through a preset downlink standard interface; the coded audio and video stream is generated by the first cloud host calling a collection module through an audio and video collection standard interface to collect audio and video data generated by a cloud audio and video process; The encoding module is called through the encoding transmission standard interface to perform audio and video encoding of the audio and video data in a preset standard encoding format; the preset downlink standard interface is respectively connected to the encoding transmission standard interface and the interactive device on the first cloud host; Using a preset standard transmission format, transmitting the encoded audio and video stream to the interactive device; Receiving, via a preset uplink standard interface, an operation event initiated by the interactive device based on the encoded audio and video stream; The preset uplink standard interface is respectively connected to the event standard input interface on the first cloud host and the interactive device; The operation event is transmitted to the event standard input interface using the preset standard transmission format.
9. The method according to claim 8, characterized in that The interactive device is configured with a client standard component, the client standard component is connected to the preset downlink standard interface and the preset uplink standard interface respectively, and the use of the preset standard transmission format to transmit the encoded audio and video stream to the interactive device includes: The encoded audio and video stream is transmitted to the client standard component on the interactive device through the preset downlink standard interface and using the preset standard transmission format, so that the client standard component decodes and plays the encoded audio and video stream in a preset decoding format to obtain a decoded video image and decoded audio; The receiving, through a preset uplink standard interface, an operation event initiated by the interactive device based on the encoded audio and video stream includes: The operation event issued by the client standard component on the interactive device is received through a preset uplink standard interface, wherein the operation event is obtained by the client standard component through obtaining at least one format type of original operation instruction initiated for the decoded video screen or the decoded audio, and formatting the at least one format type of original operation instruction according to a preset standard event format.
10. A cloud audio and video processing system, comprising: The first cloud host, the second cloud host and the interactive device; A cloud audio and video process is running on the first cloud host; The second cloud host is deployed with a preset uplink standard interface and a preset downlink standard interface; The interactive device is equipped with a client standard component; the client standard component is connected to the event standard input interface on the first cloud host through the preset uplink standard interface, and the client standard component is connected to the encoding transmission standard interface on the first cloud host through the preset downlink standard interface; wherein, The first cloud host is used to call the acquisition module through the audio and video acquisition standard interface to collect the audio and video data generated by the cloud audio and video process; call the encoding module through the encoding transmission standard interface to perform audio and video encoding on the audio and video data in a preset standard encoding format to obtain an encoded audio and video stream, and transmit the encoded audio and video stream to the preset downlink standard interface; The second cloud host is used to transmit the encoded audio and video stream to the client standardized component through the preset downlink standard interface using a preset standard transmission format; The interactive device is used to decode and play the encoded audio and video stream through the client standard component to obtain a decoded video image and a decoded audio; obtain an operation event initiated for the decoded video image or the decoded audio, and send the operation event to the preset uplink standard interface; The second cloud host is further configured to transmit the operation event to the event standard input interface via the preset uplink standard interface using the preset standard transmission format; The first cloud host is further used to map the operation event to a target drive event corresponding to the current operating system through the event standard input interface; the target drive event is used to drive the cloud audio and video process to update the audio and video data accordingly; Among them, the audio and video acquisition standard interface, the encoding transmission standard interface, and the event standard input interface are standardized interfaces implemented in the cloud service standardized subclass derived from the preset cloud service standardized base class based on the respective configuration information of the acquisition module, the encoding module and the operating system.
11. A first cloud host, characterized in that: include: The acquisition module is used to collect audio and video data generated by the cloud audio and video process through the audio and video acquisition standard interface; The encoding module is used to perform audio and video encoding in a preset standard encoding format on the audio and video data through a coding transmission standard interface to obtain an encoded audio and video stream, and transmit the encoded audio and video stream to an interactive device; An event processing module, configured to receive, through an event standard input interface, an operation event initiated by the interactive device based on the encoded audio and video stream, and map the operation event to a target drive event corresponding to the current operating system; The target driven event is used to drive the cloud audio and video process to update the audio and video data accordingly; wherein, The audio and video acquisition standard interface, the encoding transmission standard interface, and the event standard input interface are standardized interfaces implemented in a cloud service standardized subclass derived from a preset cloud service standardized base class based on the respective configuration information of the acquisition module, the encoding module, and the operating system.
12. An interactive device, characterized in that: include: A client standard component, wherein the client standard component is connected to the encoding transmission standard interface and the event standard input interface on the first cloud host; wherein, The client standard component is used to receive the encoded audio and video stream sent by the encoding transmission standard interface; and decode and play the encoded audio and video stream to obtain a decoded video image and decoded audio; the encoded audio and video stream is obtained by the first cloud host calling the acquisition module through the audio and video acquisition standard interface to collect the audio and video data generated by the cloud audio and video process; and calling the encoding module through the encoding transmission standard interface to perform audio and video encoding of the audio and video data in a preset standard encoding format; The client standardization component is also used to obtain the original operation instruction of at least one format type initiated for the decoded video screen or the decoded audio, and convert the format of the original operation instruction of at least one format type according to the preset standard event format to obtain an operation event, and send the operation event to the event standard input interface, so that the first cloud host maps the operation event to a target drive event corresponding to the current operating system through the event standard input interface; the target drive event is used to drive the cloud audio and video process to update the audio and video data accordingly; wherein, The audio and video acquisition standard interface, the encoding transmission standard interface, and the event standard input interface are standardized interfaces implemented in a cloud service standardized subclass derived from a preset cloud service standardized base class based on the respective configuration information of the acquisition module, the encoding module, and the operating system.
13. A second cloud host, characterized in that: include: A preset downlink standard interface and a preset uplink standard interface; The preset downlink standard interface is respectively connected to the encoding transmission standard interface and the interactive device on the first cloud host, and the preset uplink standard interface is respectively connected to the interactive device and the event standard input interface on the first cloud host; wherein, The preset downlink standard interface is used to receive the encoded audio and video stream sent by the first cloud host through the encoding transmission standard interface; the encoded audio and video stream is obtained by the first cloud host calling the acquisition module through the audio and video acquisition standard interface to collect the audio and video data generated by the cloud audio and video process; and calling the encoding module through the encoding transmission standard interface to perform audio and video encoding of the audio and video data in a preset standard encoding format; using the preset standard transmission format, the encoded audio and video stream is transmitted to the interactive device; The preset uplink standard interface is used to receive an operation event initiated by the interactive device based on the encoded audio and video stream; and transmit the operation event to the event standard input interface on the first cloud host using the preset standard transmission format.
14. An electronic device, characterized in that: include: A memory for storing executable instructions; A processor, for implementing the method according to any one of claims 1 to 5, or claim 6 or 7, or claim 8 or 9 when executing the executable instructions stored in the memory.
15. A computer-readable storage medium, characterized in that: Executable instructions are stored, which are used to implement the method described in any one of claims 1 to 5, or claim 6 or 7, or claim 8 or 9 when executed by a processor.
