WO2022042004A1 - 一种数据处理方法、装置及存储介质 - Google Patents

一种数据处理方法、装置及存储介质 Download PDF

Info

Publication number
WO2022042004A1
WO2022042004A1 PCT/CN2021/102941 CN2021102941W WO2022042004A1 WO 2022042004 A1 WO2022042004 A1 WO 2022042004A1 CN 2021102941 W CN2021102941 W CN 2021102941W WO 2022042004 A1 WO2022042004 A1 WO 2022042004A1
Authority
WO
WIPO (PCT)
Prior art keywords
game
cloud
rendering
client
data
Prior art date
Application number
PCT/CN2021/102941
Other languages
English (en)
French (fr)
Inventor
任韬
华有为
许斌盛
郗英坤
李勇
杨坤
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to EP21859846.4A priority Critical patent/EP4122568A4/en
Publication of WO2022042004A1 publication Critical patent/WO2022042004A1/zh
Priority to US17/962,822 priority patent/US20230032554A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • A63F13/355Performing operations on behalf of clients with restricted processing capabilities, e.g. servers transform changing game scene into an encoded video stream for transmitting to a mobile phone or a thin client
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • A63F13/358Adapting the game course according to the network or server load, e.g. for reducing latency due to different connection speeds between clients
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game
    • A63F13/48Starting a game, e.g. activating a game device or waiting for other players to join a multiplayer session
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/73Authorising game programs or game devices, e.g. checking authenticity
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/77Game security or game management aspects involving data related to game devices or game servers, e.g. configuration data, software version or amount of memory
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/20Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterised by details of the game platform
    • A63F2300/203Image generating hardware
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/53Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing
    • A63F2300/534Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing for network load management, e.g. bandwidth optimization, latency reduction
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/53Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing
    • A63F2300/538Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing for performing operations on behalf of the game client, e.g. rendering
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/63Methods for processing data by generating or executing the game program for controlling the execution of the game in time
    • A63F2300/636Methods for processing data by generating or executing the game program for controlling the execution of the game in time involving process of starting or resuming a game
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of computer computing, in particular to the field of cloud technology, and in particular to a data processing method, device and storage medium.
  • the rendering of existing cloud games needs to send the graphics rendering interface inside a certain operating system (for example, Android system) to an external rendering device for rendering, thereby reducing the rendering delay of cloud games, so that in large-scale In the running scenario of cloud games, the frame rate of the game will be reduced.
  • Android system for example, Android system
  • graphics rendering will be performed outside the system, which means that before the game data to be rendered outside the system is rendered in a format, it is necessary to pre-process the internal and external system.
  • the different rendering methods used are used for conversion, so when the game data to be rendered (that is, the game data after format conversion) is rendered in a format outside the system, there will be a phenomenon of wrong conversion, for example, when the game is rendered outside the system. , maybe only 40% of the game can render properly, reducing the compatibility of the game.
  • Embodiments of the present application provide a data processing method, device, and storage medium, which can enhance game compatibility and reduce rendering delay.
  • the embodiments of the present application provide a data processing method, which includes:
  • the graphics rendering library is called in the cloud virtual container to obtain graphics rendering instructions
  • an embodiment of the present application provides a data processing apparatus, the apparatus includes:
  • the request acquisition module is used to acquire the cloud game data acquisition request sent by the game client;
  • the game process startup module is used to start the game process according to the cloud game data acquisition request in the cloud virtual container corresponding to the game client;
  • the rendering instruction determination module is used to call the graphics rendering library in the cloud virtual container to obtain the graphics rendering instruction when the frame buffer allocated for the game process is obtained;
  • the rendering processing module is used to access the physical rendering device associated with the frame buffer based on the graphics rendering instruction, and perform the rendering processing in the container for the game data corresponding to the game process through the physical rendering device, so as to obtain the rendered game data corresponding to the game process;
  • the synthetic picture generation module is used for generating a synthetic picture of the game according to the rendered game data.
  • the embodiments of the present application provide a data processing method, which includes:
  • the cloud game data acquisition request is used to instruct the cloud server to start the game process, and when the frame buffer allocated for the game process is acquired, the cloud virtual In the container, the graphics rendering instruction in the graphics rendering library is called to access the physical rendering device associated with the frame buffer, and the game data corresponding to the game process is rendered in the container through the physical rendering device, and the rendered game data corresponding to the game process is obtained;
  • an embodiment of the present application provides a data processing apparatus, the apparatus includes:
  • the operation response module is used to send a cloud game data acquisition request to the cloud server in response to a trigger operation for the game client; the cloud game data acquisition request is used to instruct the cloud server to start the game process, and after the frame buffer allocated for the game process is acquired
  • the graphics rendering instruction in the graphics rendering library is called in the cloud virtual container to access the physical rendering device associated with the frame buffer, and the game data corresponding to the game process is rendered in the container through the physical rendering device, and the game process is obtained.
  • the composite picture receiving module is used for receiving the game composite picture generated by the cloud server according to the rendered game data, and displaying the game composite picture in the game client.
  • An aspect of the embodiments of the present application provides a computer device, including: a processor and a memory;
  • the processor is connected to the memory, where the memory is used for storing program codes, and the processor is used for calling the program codes to execute the method in one aspect of the embodiments of the present application.
  • An aspect of an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program includes program instructions. method.
  • FIG. 1 is a schematic structural diagram of a network architecture provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a scenario of data interaction in a cloud game scenario provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a data processing method provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a scenario of a cloud server provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a scenario for sending a cloud game data acquisition request provided by an embodiment of the present application
  • 6a is a schematic diagram of a scenario of running multiple Android operating environments on a cloud server provided by an embodiment of the present application
  • 6b is a schematic diagram of a scene in which a graphics rendering library is invoked in a container according to an embodiment of the present application;
  • FIG. 7 is a schematic diagram of a frame buffer allocated for a game process in a cloud virtual container according to an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a data processing method provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a scenario for acquiring multiple touch event streams provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a scenario of a simulation output rendering display interface in the cloud provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a data processing apparatus provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a data processing apparatus provided by an embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a data processing system provided by an embodiment of the present application.
  • cloud technology refers to a kind of hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize the calculation, storage, processing and sharing of data.
  • Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on cloud computing business models. Cloud computing technology will become an important support. Background services of technical network systems require a lot of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the back-end system for logical processing. Data of different levels will be processed separately, and all kinds of industry data need to be strong. The system backing support can only be achieved through cloud computing.
  • Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers, enabling various application systems to obtain computing power, storage space and information services as needed.
  • the network that provides the resources is called the “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 according to usage.
  • cloud platform As a basic capability provider of cloud computing, it will establish a cloud computing resource pool (referred to as cloud platform, generally referred to as IaaS (Infrastructure as a Service, Infrastructure as a Service) platform, and deploy various types of virtual resources in the resource pool for External customers choose to use.
  • the cloud computing resource pool mainly includes: computing devices (which are virtualized machines, including operating systems), storage devices, and network devices.
  • Cloud gaming also known as gaming on demand, 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.
  • the game does not run on the player's game terminal (also called the game terminal corresponding to the game user), but runs on the cloud server, and the cloud server renders the game scene into a video and audio stream, which is transmitted through the network Game terminal for players.
  • the rendering technology adopted by the cloud server belongs to a rendering technology in a container, and the container here refers to the virtual cloud container obtained in the cloud server, that is, the present invention.
  • the embodiment of the application can transmit the video and audio stream rendered in the cloud virtual container to the player's game terminal through the network. It is understandable that the player's game terminal here 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 input instructions from players (ie game users) and send them to the cloud server.
  • the player can interact with the cloud server through the game client running in the player's game terminal, so that when the cloud server completes the game client in the cloud virtual container in the cloud
  • an encoding operation may be performed on the audio and video data of the rendered game screen, so as to deliver the encoded data stream (for example, the audio stream and the video stream) to the player's game terminal for processing. Decoding operation.
  • FIG. 1 is a schematic structural diagram of a network architecture provided by an embodiment of the present application.
  • the data processing system may specifically include the cloud server 2000 shown in FIG. 1 and a cluster of user terminals.
  • the user terminal cluster may specifically include one or more user terminals, and the number of user terminals in the user terminal cluster will not be limited here.
  • the multiple user terminals may specifically include a user terminal 3000a, a user terminal 3000b, a user terminal 3000c, . . . , a user terminal 3000n; as shown in FIG. .
  • the user terminal 3000n can respectively perform network connection with the cloud server 2000, so that each user terminal can perform data interaction with the cloud server 2000 through the network connection.
  • the cloud server 2000 shown in FIG. 1 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud service, cloud database, cloud computing, cloud function, Cloud servers for cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms.
  • each user terminal in the user terminal cluster shown in FIG. 1 can be installed with a game client.
  • the game client here may include a racing game client, a parkour game client, a shooting game client, a chess and card game client, and the like.
  • one user terminal may be selected as a game terminal among the multiple user terminals shown in FIG. 1 , and the game terminal here may include: a smart phone, a tablet computer, a notebook computer, and a desktop computer , smart TV and other smart terminals with multimedia data loading function.
  • the user terminal 3000a shown in FIG. 1 may be used as a game terminal, and the game terminal here may specifically include, but is not limited to, a mobile game terminal.
  • the game client can be respectively deployed on the game terminal (for example, the user terminal 3000a in the embodiment corresponding to FIG. 1 above) and the background server (for example, the implementation corresponding to the above FIG. 1 ).
  • Example cloud server 2000 for example, the data processing method provided by the embodiment of the present application may relate to the above-mentioned cloud technology field.
  • the game terminal can be used as the front end of the game client, and the cloud server 2000 can be used as the backend of the game client (ie, the aforementioned backend server).
  • the cloud server 2000 can quickly locate the cloud virtual container corresponding to the client environment system where the game client is located, and then can locate the cloud virtual container in the cloud virtual container. (ie the above container), the game process is started according to the cloud game data acquisition request.
  • the game process here may include an associated process for instructing to start the game client in the cloud virtual container.
  • the game display interface in the terminal (for example, the game home page of the game client, etc.).
  • the game display interface may include business controls with corresponding business functions.
  • the business controls here mainly refer to controls that can control game attribute behaviors of virtual objects, and the like.
  • the game process here may also include one or more associated processes associated with these business controls.
  • a cloud game data acquisition request may be sent to the cloud server 2000 based on a trigger event between the game user and the game client.
  • the cloud server 2000 receives the cloud game data acquisition request, it can start one or more associated processes associated with the service controls in the cloud virtual container corresponding to the client environment system of the game client, and then can One or more associated processes started in the cloud virtual container are collectively referred to as game processes associated with the service control.
  • the cloud server 2000 when the cloud server 2000 obtains the frame buffer allocated for the game process, in the cloud virtual container, through the bridge channel between the game process and the graphics rendering library, it can directly access the frame buffer.
  • Graphics rendering library the graphics rendering library here can be Mesa graphics library, which can be understood as a user-mode graphics driver, which can be used to provide games (for example, game processes) and cloud game environment systems (for example, in the The rendering service between the Android system virtualized in the cloud server.
  • the cloud server accesses the graphics rendering library (eg, Mesa graphics library) in the cloud virtual container, graphics rendering can be directly performed in the cloud virtual container to obtain rendered game data corresponding to the game process.
  • FIG. 2 is a schematic diagram of a scenario of data interaction in a cloud game scenario provided by an embodiment of the present application.
  • the cloud server 20a in FIG. 2 may be the cloud server 2000 in the embodiment corresponding to FIG. 1 above, and the game terminal shown in FIG. 2 may be any user terminal in the embodiment corresponding to FIG. 1 .
  • the embodiment of the present application takes the user terminal 3000a shown in FIG. 1 as the game terminal as an example to illustrate the specific process of data interaction between the cloud server 20a shown in FIG. 2 and the game terminal 10a.
  • the game terminal 10a shown in FIG. 2 may run the above-mentioned game client (for example, the client of the cloud game X), and the game display page corresponding to the cloud game X may display the game shown in FIG. 2 . virtual object.
  • the game display page may also include a service control (eg, service control 10b shown in FIG. 2 ) for requesting the cloud server 20a shown in FIG. 2 to control the game attribute behavior of the virtual object.
  • the game terminal 10a may respond to the trigger operation on the service control 10b and send the data shown in FIG. 2 to the cloud server 20a shown in FIG. 2 .
  • Cloud game data acquisition request 1 it can be understood that the cloud game data acquisition request can be used to instruct the cloud server 20a to perform rendering processing in the cloud virtual container 30a shown in FIG. 2 to obtain the rendering shown in FIG. 2 . game data.
  • the cloud game data acquisition request 1 may be used to instruct the cloud server 20a to start one or more associated processes associated with the service control 10b.
  • one or more associated processes started by the cloud server 20a and associated with the service control 10a may be collectively referred to as game processes associated with the service control 10b.
  • the cloud server 20a can allocate a frame buffer area for each associated process in the cloud virtual container 30a shown in FIG. 2.
  • each frame buffer area here is respectively associated with the cloud server 20a.
  • the cloud server 20a can apply for K frame buffers in the cloud virtual container 30a for the K associated processes associated with the service control 10b, and each frame buffer here can be Corresponds to a video memory address.
  • K can be a positive integer. Therefore, when the cloud server 20a directly accesses the graphics rendering node in the cloud virtual container 30a by using the graphics rendering library shown in FIG. 2 in the cloud virtual container 30a, rendering processing can be performed in the cloud virtual container 30a to Get the rendered game data shown in Figure 2.
  • the rendered game data here may specifically include sub-rendering data obtained by rendering the game data of each associated process in the cloud virtual container 30a.
  • K sub-rendering data can be obtained, where the K sub-rendering data may specifically include sub-rendering data 40a, . . . , and sub-rendering data 40b shown in FIG. 2 .
  • each sub-rendering data here can be stored in a video memory address of a corresponding video memory of the cloud server.
  • the cloud server 20a can generate the game composite screen shown in FIG. 2 based on the rendered game data shown in FIG. 2 (ie, K sub-render data), so that the game can be composited into the screen later. After the encoding process is performed, it returns to the game terminal 10a shown in FIG. 2 .
  • the cloud server 20a can run multiple cloud virtual containers, and each cloud virtual container is a container instance.
  • a remote mobile game that matches the client environment system (for example, the Android system) in the corresponding user terminal (for example, the game terminal 10a shown in FIG. 2 ) can be run.
  • the remote mobile game operating environment virtualized for each user terminal in the cloud server 20a may be collectively referred to as a cloud game environment system.
  • a remote Android system is virtualized for each user terminal in the server 20a, so that any cloud virtual container can be used to provide a basic Android operating environment for the corresponding user terminal.
  • the multiple cloud virtual containers shown in FIG. 2 may specifically be cloud virtual containers 30a, cloud virtual containers 30b, . . . , cloud virtual containers 30n shown in FIG. 2 .
  • the cloud virtual container 30a may be a container instance pre-configured by the cloud server 20a for the game terminal 10a shown in FIG. 2 (eg, the user terminal 3000a in the embodiment corresponding to FIG. 1).
  • the cloud virtual container 30b may be a container instance pre-configured by the cloud server 20a for other game terminals (for example, the user terminal 3000b in the above-mentioned embodiment corresponding to FIG. 1 ), and so on.
  • the virtual container 30n may be a container instance pre-configured by the cloud server for other game terminals (for example, the user terminal 3000n in the embodiment corresponding to FIG. 1). It should be understood that, in this embodiment of the present application, a cloud virtual container may be configured for each user terminal that accesses the cloud server 20a through the above-mentioned game client (for example, the client of cloud game X). When data interaction is performed between the cloud servers 20a, rendering processing may be performed in the corresponding cloud virtual container. Wherein, the cloud server 20a performs rendering processing in other cloud virtual containers (for example, cloud virtual containers 30b, . Rendering data is performed in the cloud virtual container shown in 2 to obtain a description of the specific implementation manner of game rendering data, which will not be repeated here.
  • the cloud server 20a determines a cloud virtual container (for example, the cloud virtual container 30a shown in FIG. 2) that matches the client environment system of the game terminal 10a
  • the above-mentioned image rendering node is directly accessed through the graphics rendering database 30b in the cloud virtual container 30a, so as to directly realize the internal rendering of the corresponding game process in the cloud virtual container 30a, that is, the corresponding game process in the game client
  • the existing graphics rendering mode can be changed through the reconstructed system graphics stack in the cloud virtual container 30a, so as to directly realize the rendering process through the internal rendering technology in the cloud virtual container 30a, Thereby, the rendering delay can be effectively reduced or reduced.
  • the present application does not need to convert different rendering modes, the compatibility of the game can be enhanced in the cloud virtual container 30a.
  • the specific process for the cloud server 20a to acquire the cloud virtual container, perform rendering processing through a physical rendering device, and generate a game composite screen may refer to the embodiments corresponding to FIG. 3 to FIG. 10 below.
  • FIG. 3 is a schematic flowchart of a data processing method provided by an embodiment of the present application.
  • the method can be executed by a computer device, and the computer device can run a game terminal, and the game terminal can be the game terminal 10a in the embodiment corresponding to the above-mentioned FIG. 2; the computer device can also be the game client
  • the backend server corresponding to the terminal in the cloud game scenario, the backend server here is a cloud server
  • the cloud server may be the cloud server 20a in the embodiment corresponding to FIG. 2 above.
  • the methods involved in the embodiments of the present application may be executed by a game terminal corresponding to a game user, may also be executed by a cloud server, or may be jointly executed by a game terminal and a cloud server.
  • this embodiment is described by taking the method being executed by a cloud server (for example, the cloud server 20a in the embodiment corresponding to FIG. 2 above) as an example, to illustrate the process of obtaining the rendered game data corresponding to the game process in the cloud server.
  • the method may at least include the following steps S101-S105: the method at least includes:
  • Step S101 obtaining a cloud game data obtaining request sent by the game client
  • the cloud server can be used to receive a cloud game data acquisition request sent by the game client running in the game terminal.
  • FIG. 4 is a schematic diagram of a scenario of a cloud server provided by an embodiment of the present application.
  • the cloud server can run N cloud virtual containers, where N can be a positive integer.
  • the N cloud virtual containers can be container 1 shown in Figure 4. , container 2, container 3, ..., container N.
  • the terminal A1, the terminal A2, the terminal A3, . . . , and the terminal A4 shown in FIG. 4 can all establish a data connection relationship with the cloud server shown in FIG. 4 .
  • the terminal A1 may be a certain user terminal in the embodiment corresponding to FIG. 1 above.
  • the above-mentioned user terminal 3000a the above-mentioned user terminal 3000a.
  • the terminal A2 may be a web terminal associated with the terminal A1.
  • a certain game user for example, game user A
  • the terminal A1 and the terminal A2 can synchronously receive the information about the game from the cloud server.
  • the same audio and video encoded stream sent by user A It can be understood that the number of other terminals that are associated with the terminal A1 will not be limited here.
  • the terminal A1 when the game user starts the game client (eg, the client of cloud game A) through the game account information (eg, game account information B1) in the terminal A1, the terminal A1 can communicate with the A data connection relationship is established between the cloud servers, so that data interaction with the cloud server can be performed subsequently through the established data connection relationship.
  • the terminal A1 when the game user A performs a triggering operation on a certain service control in the client of the cloud game A within a unit time, the terminal A1 Or a plurality of consecutive trigger operations are collectively referred to as a touch event flow.
  • the touch event flow may be touch event flow 1 shown in FIG. 4 .
  • FIG. 4 As shown in FIG.
  • the terminal A1 can add the touch event stream 1 for the service control to the cloud game data acquisition request, so as to send the cloud game data acquisition request with the touch event stream 1 added to the cloud server, so that the cloud server can execute the corresponding business logic in the container 1 shown in FIG. 4 through the processor 60a shown in FIG.
  • the graphics renderer 60b acquires the in-container rendering technology for the container 1, so as to use the in-container rendering technology to perform rendering processing in the container 1, so as to further encode the rendered game data obtained after the rendering processing, to
  • the audio and video encoding stream associated with the touch event stream 1 is obtained, where the audio and video encoding stream may be the audio and video encoding stream 1 ′ shown in FIG. 4 .
  • the coded audio and video stream 1' can be synchronously delivered to multiple terminals associated with the game user A, for example, terminal A1 and terminal A2 as shown in FIG. 4 .
  • the terminal A3 may be a PC terminal.
  • the PC terminal may be the user terminal 3000n in the embodiment corresponding to FIG. 1 .
  • the cloud server may be the terminal A3 (
  • the terminal used by game user B) configures the container 3 shown in FIG. 4 to obtain a touch event flow with the game user B in the container 3 (for example, trigger event flow 2, not shown in the figure) Associated audio and video encoding stream 2'.
  • the terminal A4 may be another terminal (for example, a tablet terminal).
  • the tablet terminal may be the user terminal 3000b in the embodiment corresponding to FIG. 1 .
  • FIG. 1 As shown in FIG.
  • the cloud The server can configure the container N shown in FIG. 4 for the terminal A4 (for example, the terminal used by the game user C), so as to obtain the touch event flow with the game user C in the container N (for example, the trigger event flow 3, not shown in the figure) the associated audio and video encoded stream 3'.
  • the game user A may be a game user in the embodiment corresponding to FIG. 2, and at this time, the cloud game data acquisition request here may be the game terminal 10a in the embodiment corresponding to FIG. 2.
  • the embodiment of the present application still takes the game client as the client corresponding to the above game X (for example, client 1) as an example, at this time, the cloud game data acquisition request may be made by the game client (that is, The client 1) corresponding to the game X is generated in response to the game user (for example, the game user A in the above-mentioned embodiment corresponding to FIG. 2 ) performing a trigger operation on the service controls in the game display page.
  • FIG. 5 is a schematic diagram of a scenario for sending a cloud game data acquisition request provided by an embodiment of the present application.
  • the display interface 100 a shown in FIG. 5 can be obtained, and the display interface 100 a can be the settings in the game client interface.
  • the display interface displayed in the game client ie, the client 1 corresponding to the game X
  • the display interface 100a may include the service control C1 shown in FIG.
  • the service control C1 may be a setting control.
  • the setting control may be used to indicate the server return diagram shown in FIG. 5 .
  • the virtual display interface 100b shown in FIG. 5, that is, the virtual display interface 100b can be used to instruct the game user 5 to change the game attribute (eg, clan name) to which the virtual object shown in FIG. 5 belongs.
  • the game user A can perform a trigger operation on the service control C1 in the game display interface (ie, the display interface 100a shown in FIG. 5 ) at time T1, and at this time, the game terminal can In response to the trigger operation at the time T1, the trigger operation (eg, click operation) performed on the service control C1 is collectively referred to as a touch event stream, and a cloud game data acquisition request carrying the touch event stream can be further generated.
  • the game client can send the aforementioned cloud game data acquisition request to the cloud server (ie, the cloud server shown in FIG.
  • the cloud server may further perform the following step S102, that is, the cloud server may remotely predict the next moment of the game client at time T1 (ie, time T2) based on the touch event stream at the time T1.
  • the business logic predicted here is mainly used to modify the game attribute behavior of the game attribute to which the virtual object currently belongs (that is, modify the game attribute behavior of the tribe name to which the virtual object currently belongs) in the corresponding cloud virtual container).
  • the game display page (eg, the display interface 100a shown in FIG. 5 ) includes a virtual object associated with the game user, and the game display interface where the virtual object is located includes a game for controlling the virtual object in the cloud server
  • a service control is used for the behavior (for example, the game attribute behavior for controlling the virtual object to move left or right in the game map of the game client)
  • the cloud server can further respond
  • the business logic of this type of business control is used to control the game attribute behavior of virtual objects in the cloud game environment system corresponding to the game client.
  • Step S102 in the cloud virtual container corresponding to the game client, start the game process according to the cloud game data acquisition request;
  • the cloud virtual container may correspond to the client environment system where the game client is located.
  • the cloud server may determine, based on the client environment system (for example, the Android system) where the current game client is located, the corresponding cloud game environment system (for example, the virtualized remote Android system) that matches the client environment system.
  • Cloud virtual container further, the cloud server can extract the attribute behavior event of the virtual object indicated by the business control from the cloud game data acquisition request, and can determine the process start instruction associated with the attribute behavior event; further, the cloud server can Input the process start instruction into the cloud virtual container, control the virtual object in the cloud virtual container to execute the game attribute behavior, and start K associated processes associated with the game attribute behavior; K is a positive integer; further, the cloud server can Each of the associated processes is collectively referred to as the game process associated with the business control.
  • the attribute behavior event here may include the above-mentioned touch event flow for changing the game attribute of the virtual object in the cloud, and the above-mentioned another touch event flow for controlling the game behavior in the virtual object in the cloud.
  • the game attributes here may include, but are not limited to, the names of the teams participating in the competition by forming a group.
  • the game user for example, the game user A shown in FIG. 4 above
  • the trigger on the above-mentioned display interface 100a that is, the setting interface where the setting control C1 is located).
  • the cloud server can be further enabled to extract the attribute behavior event indicated by the business control C1 in the cloud for changing the tribe name of the aforementioned virtual object (for example, the above-mentioned touch event flow 1 ), and then the process startup instruction associated with the attribute behavior event can be determined.
  • the game display interface may also include a service control for controlling the game behavior of the virtual object in the cloud, for example, the service control 10b shown in FIG. 2 above.
  • the cloud controls the controls for moving the virtual object to the right in the game display interface. Therefore, after the above-mentioned game user A triggers the above-mentioned service control 10b (ie, moves the control to the right), the cloud server can further enable the cloud server to extract the game behavior indicated by the service control 10b for controlling the aforementioned virtual object in the cloud.
  • the attribute behavior event eg, new touch event stream 1
  • another process start instruction associated with the attribute behavior event eg, new touch event stream 1
  • the cloud server can further input the process start instruction into the cloud virtual container corresponding to the client environment system of the game client, for example, the container 1 shown in FIG. 5 above.
  • the virtual object can be controlled in the cloud virtual container (for example, container 1) to execute the business logic corresponding to the game attribute behavior, and then one or more associated processes associated with the game attribute behavior can be started when the business logic is executed,
  • one or more associated processes started in the cloud virtual container may be collectively referred to as game processes associated with the above-mentioned service controls, and then the following may be further executed: Step S103.
  • FIG. 6a is a schematic diagram of a scenario of running multiple Android operating environments on a cloud server according to an embodiment of the present application.
  • the operating system of the cloud server as shown in FIG. 6a may be an open source OS operating system, for example, a Linux system.
  • the cloud server can run multiple virtualized cloud game environment systems in the form of containers, that is, one cloud game environment system can run in one container, and the cloud game environment system here It may be a remote game running environment virtualized for the client environment system in the corresponding terminal shown in FIG. 4 .
  • each container is a cloud virtual container
  • the container 1 here can be the container 1 in the embodiment corresponding to the above-mentioned FIG. 4.
  • the container here 2 may be the container 2 in the above embodiment corresponding to FIG. 4
  • the container N here may be the container N in the above embodiment corresponding to FIG. 4 .
  • the same physical object may be shared among the multiple containers shown in FIG. 6a (ie, multiple containers, for example, the above-mentioned container 1, container 2, container 3, . . . , container N, which are independent of each other).
  • Resources on a server eg, share the same system kernel, eg, the Linux kernel.
  • the system kernel (Kernel) shown in FIG. 6a is the most basic part of the operating system shown in FIG. 6a, through which the system kernel can be used to manage the computer program of the data I/O requirements issued by the software, and These requirements are translated into data processing instructions and handed over to the central processing unit (CPU, for example, the above-mentioned processor 60a shown in FIG. 4 ) of the cloud server and other electronic components in the cloud server for processing.
  • CPU central processing unit
  • the system kernel here generally refers to a system software for providing functions such as a hardware abstraction layer, disk and file system control, and multitasking.
  • the system kernel is mainly responsible for managing the system's processes, memory, device drivers, files and network systems in the cloud server, and determines the performance and stability of the system.
  • a set of concise and unified interfaces can be provided for the application software and hardware in the cloud server shown in Fig. 6a, which makes the program design simpler.
  • process management means that the system kernel can be used to be responsible for creating and destroying processes, and to handle their contact with the outside world (input and output). It is understood that communication between different processes (via signals, pipes, or inter-process communication) primitives) are also handled by the system kernel.
  • memory management means that in this embodiment of the present application, the memory in the cloud server can be collectively referred to as an available resource, and the system kernel can be used for each process in all the processes in the cloud server on limited available resources.
  • a virtual address space is created. For example, in the rendering business of the cloud game scene, you can apply for a video memory in the physical rendering device configured for the game process in the corresponding container, and a video memory can correspond to a video memory address, and the video memory address here can be used to point to the frame buffer.
  • a frame buffer in the component so that the cloud server can quickly execute the following step S103 when acquiring the frame buffer of the corresponding game process.
  • file management means that the Linux system is largely based on the concept of the file system.
  • the system kernel can establish a structured file system on the unstructured hardware, that is, the corresponding file system shown in Figure 6a
  • the system library in the container the files in the system library can be widely used in the whole system.
  • Linux supports multiple file system types, that is, different data organization methods on physical media can be formatted into standard Linux file systems, such as the commonly used FAT file system, in the corresponding cloud virtual container.
  • the multiple containers in FIG. 1 belong to the same Android image (for example, the installation package of the above application client) when running in the corresponding game client.
  • the underlying Android-specific drivers for example, anonymous shared content drivers
  • Binder process communication are isolated through namespaces (namely namespaces).
  • namespaces namely namespaces
  • anonymous shared memory 1 anonymous shared memory 2, . . . , anonymous shared memory N are isolated by namespaces (namely, namespaces).
  • the communication process 1 the communication process 2, . . . , and the communication process N shown in FIG. 6a are also isolated by namespaces (namely, namespaces).
  • FIG. 6b is a schematic diagram of a scene in which a graphics rendering library is called in a container according to an embodiment of the present application.
  • the container shown in FIG. 6b may be any container in the cloud server shown in FIG. 6a.
  • the embodiment of the present application takes the container 1 running in the cloud server as an example to illustrate the The specific process of calling the graphics rendering library in the container 1 (that is, the above-mentioned container 1).
  • the game client running in the container shown in FIG. 6b may be the Android application shown in FIG. 6b, and the running environment of the Android application may be the running environment 1 and/or the running environment 2 shown in FIG. 6b.
  • the process management service shown in FIG. 6b may specifically include service 1, service 2, service 3, service 4, service 5, etc. shown in FIG. 6b.
  • service 1 can be a window management service, that is, a game process can provide a window.
  • service 2 can be a graphics synthesis service, that is, in the same cloud virtual container, the rendering game data stored in different video memories can be synthesized and pushed to the frame buffer corresponding to the screen kernel for simulation output.
  • Service 3 may be an installation service corresponding to an installation package of the game client (that is, the Android application shown in FIG. 6b ) (here, it may be an Android installation package, and may also be referred to as an Android image).
  • the Android image when installed in the game terminal, it can become an Android instance in the game terminal, that is, the Android application corresponding to the Android image can be run in the game terminal.
  • the service 4 may be a rendering service in a corresponding cloud virtual container.
  • Service 5 can serve the destruction process.
  • the running environment 1 in the container can be the running environment corresponding to the programming language (for example, Java language) used by the cloud game environment system where the Android application is located.
  • the running environment 2 in the container can be the running environment where the Android application is located.
  • the system library shown in Fig. 6b can be used to provide different system files.
  • the system library can include but not limited to the graphics rendering library shown in Fig. 6b, and Fig. 6b
  • the graphics rendering library may contain encapsulation components with an instruction encapsulation function.
  • the cloud server performs data interaction with a certain game terminal, the following step S103 may be further performed, so as to pass the method shown in FIG. 6b.
  • the image rendering library can quickly access the packaged component shown in FIG. 6b, and then can quickly access the graphics rendering driver in the container to perform rendering processing in the container.
  • Step S103 when the frame buffer allocated for the game process is obtained, call the graphics rendering library in the cloud virtual container to obtain the graphics rendering instruction;
  • the cloud server may send a frame buffer application instruction to the frame buffer component through the game process; the frame buffer application instruction is used to instruct the frame buffer component to send a buffer allocation instruction to the buffer allocator; further, the cloud server may When the buffer allocator allocates frame buffers for the game process based on the buffer allocation instruction, the graphics rendering driver is called through the graphics rendering node that has an associated relationship with the buffer allocator to allocate frames in the physical rendering device that has a hierarchical relationship with the graphics rendering driver.
  • the bridge channel between the game process and the graphics rendering library is determined in The following step S103 may be further performed subsequently.
  • FIG. 7 is a schematic diagram of a scene of a frame buffer allocated for a game process in a cloud virtual container according to an embodiment of the present application.
  • the embodiment of the present application takes the number of game processes started in the cloud virtual container as an example.
  • the game process may be the game process 70a shown in FIG. The specific process of allocating a frame buffer area for the game process 70a in the virtual container.
  • the cloud virtual container shown in FIG. 7 may be a container in the embodiment corresponding to FIG. 6a, for example, the container 1 in the embodiment corresponding to FIG. 6a.
  • the cloud virtual container may contain a reconstructed system graphics stack, and the system graphics stack here may be used to instruct the cloud server to directly access the graphics rendering function in the cloud virtual container shown in FIG. 7 .
  • a physical rendering device for example, the physical rendering device 70f shown in FIG. 7
  • the graphics rendering in the container can be implemented in the cloud virtual container shown in FIG. 7 ; it can be understood that the system in the cloud virtual container
  • the graphics stack may specifically include: the game process 70a shown in FIG. 7, the frame buffer component 70b, the buffer allocator 70c, the graphics rendering node 70d, the graphics rendering driver 70e and the physical rendering device 70f, the graphics rendering library 70g and the graphics compositor 70h.
  • the graphics rendering solution in the container provided by the embodiment of the present application specifically involves the cloud game environment system (that is, the remote Android system) in the cloud virtual container shown in FIG.
  • the graphics rendering interface (API, Application Programming Interface) of the game process 70a inside the system) is bridged to the graphics rendering library shown in FIG.
  • the graphics rendering library can be the above-mentioned Mesa graphics library
  • the Mesa graphics library and the encapsulation components in the Mesa graphics library can further issue the graphics rendering operation indicated by the above graphics rendering instruction to the graphics rendering driver 70e shown in FIG. 7 .
  • the graphics rendering driver 70e shown in FIG. 7 .
  • a kernel-state GPU graphics driver ie, a kernel-state GPU graphics driver
  • the graphics rendering library 70g may have an associated relationship with the game process shown in FIG. 7 .
  • the cloud server obtains information about the game process shown in FIG. 7 in the cloud virtual container
  • the association relationship between the game process 70a and the graphics rendering library 70g can be used in the cloud virtual container, and then the relationship between the game process 70a and the graphics rendering library 70g can be determined in the cloud virtual container through the association relationship.
  • the graphics rendering interface used in the Android system called in the cloud virtual container for instructing graphics rendering
  • the graphics rendering library can be called through the bridge channel, and the graphics rendering library can be obtained from the graphics rendering library.
  • the client environment system has a graphics rendering instruction with a remote mapping relationship, so that the following step S104 can be continuously performed subsequently.
  • a frame buffer may be pre-allocated for the game process 70a shown in FIG. 7 in the cloud virtual container shown in FIG. 7 .
  • the specific implementation manner of the cloud server allocating the frame buffer for the game process 70a can be described as follows:
  • the game client in the game terminal used by the game user can establish a connection with the cloud server.
  • a data connection relationship can be established between the cloud server and the game client.
  • the game client of the device can acquire the touch event stream for the service control, and then can send the cloud game data acquisition request carrying the touch event stream to the cloud server based on the data connection relationship.
  • the cloud server will pre-allocate a cloud virtual container (for example, the cloud virtual container shown in FIG. 7 ) for the game client.
  • the cloud server may issue an instruction for starting a certain game process (eg, the game process 70a shown in FIG. 7 ) to the cloud virtual container shown in FIG. 7 .
  • a certain game process eg, the game process 70a shown in FIG. 7
  • the cloud server can determine the cloud virtual container corresponding to the cloud game environment system that matches the client environment system based on the client environment system (for example, the Android system) where the game client is located, to obtain the cloud game data from the cloud game data request.
  • the attribute behavior event of the virtual object indicated by the service control is extracted, and then the process start instruction associated with the attribute behavior event can be determined, so that the information used to start a certain game process (for example, the game process 70a shown in FIG. 7 ) can be used.
  • Instructions ie, process startup instructions
  • the cloud virtual container ie, the container for running the cloud game environment system
  • the game process eg, the game process 70a shown in FIG. 7
  • the virtual object can also be controlled in the cloud virtual container based on the acquired input time of the touch event stream (that is, one touch operation corresponds to one touch timestamp).
  • Execute game attribute behavior For example, in this embodiment of the present application, the game attribute of the virtual object can be changed to execute game attribute behavior.
  • the clan name 1 to which the virtual object currently belongs can be changed to clan name 2, so that it can be used in cloud games in the future.
  • a visual display interface for instructing to change the game properties is presented.
  • This embodiment of the present application can control the game attribute behavior of the virtual object moving in a certain direction in the game map in the cloud. For example, in the game map, the virtual object can be controlled to move a corresponding distance to the right relative to the game position when the timestamp is touched , so that the visual display interface after moving to the right can be rendered in the cloud game scene later.
  • the game process (eg, game process 70a) applies for a frame buffer from the frame buffer component;
  • the frame buffer component can be the frame buffer component 70b shown in FIG. 7, and the service provided by the frame buffer component 70b can be the service 1 in the process management service shown in FIG. 6a.
  • the service 1 here can be It is a SurfaceFlinger service used to provide window management services.
  • the cloud server can send a frame buffer application instruction to the frame buffer component 70 b shown in FIG. 7 through the game process 70 a; the frame buffer application instruction here can be used to instruct the frame buffer component 70 b to further allocate the buffer to the buffer. 70c sends a buffer allocation command.
  • the frame buffer component can further apply for a frame buffer from the buffer allocator;
  • the buffer allocator here may be the buffer allocator 70c shown in FIG. 7 .
  • the buffer allocator can call the graphics rendering driver through the graphics rendering node, and then can allocate a piece of video memory in the physical rendering startup through the graphics rendering driver, so that the video memory address corresponding to the video memory can be returned to the upper layer, where the upper layer refers to the game process in the cloud virtual container;
  • the buffer allocator ie, the buffer allocator 70c shown in FIG. 7
  • the buffer allocator 70c allocates a frame buffer for the game process 70a based on the buffer allocation instruction in 4
  • the graphics rendering node 70d that has an associated relationship with the buffer allocator 70c calls the graphics rendering driver 70e to allocate the video memory corresponding to the corresponding frame buffer in the physical rendering device that has a hierarchical relationship with the graphics rendering driver 70e, where the video memory can be The video memory in the physical rendering device 70f shown in FIG. 7 .
  • the game process 70a determines the frame buffer based on the video memory address, it can start to call the graphics rendering library (for example, the Mesa graphics library) to make a rendering call;
  • the graphics rendering library for example, the Mesa graphics library
  • the graphics rendering library (for example, the Mesa graphics library) can standardize the graphics rendering instructions, and then render the standardized graphics through a graphics rendering node (for example, the image rendering node 70d shown in FIG. 7 ).
  • the instruction is issued to the kernel GPU driver (ie, the graphics rendering driver 70e shown in FIG. 7 ), and then based on the hierarchical relationship between the graphics rendering driver and the graphics rendering device, the physical rendering device 70f shown in FIG. 7 can be directly accessed (here Refers to the physical GPU on the hardware).
  • the graphics synthesizer may further perform synthesis processing on all the video memory (ie, the rendered game data in the video memory corresponding to each game process).
  • the embodiment of the present application can also use the window management service provided by the graphics compositor to push the composited rendered game data to the FrameBuffer (ie, the frame buffer corresponding to the screen kernel).
  • Step S104 accessing the physical rendering device associated with the frame buffer based on the graphics rendering instruction, and performing rendering processing in the container on the game data corresponding to the game process through the physical rendering device, to obtain the rendered game data corresponding to the game process;
  • the cloud server after the cloud server performs the above step S103, it can obtain a graphics rendering instruction that has a remote mapping relationship with the client environment system; further, the cloud server can use a graphics rendering library (for example, the above figure The encapsulation component in the graphics rendering library 70g of 7) performs standardization processing on the graphics rendering instructions obtained in step S103, so that the graphics rendering instructions after the standardized processing are passed through the graphics rendering node (for example, the graphics in the corresponding embodiment of the above-mentioned FIG. 7 ).
  • the rendering node 70d) is transmitted to the graphics rendering driver (for example, the graphics rendering driver 70e in the above-mentioned embodiment corresponding to FIG.
  • the cloud server may render the driver based on the graphics (for example, the graphics in the above-mentioned embodiment corresponding to FIG. 7 )
  • the hierarchical relationship between the rendering driver 70e) and the graphics rendering device eg, the physical rendering device 70f in the embodiment corresponding to the above FIG. 7
  • accesses the physical rendering device associated with the frame buffer for example, the above-mentioned FIG. 7 corresponds to The physical rendering device 70f in the embodiment
  • the cloud server can perform rendering processing in the container for the game data corresponding to the game process through the graphics rendering function of the physical rendering device, so as to use the rendered game data as the corresponding game process. render game data.
  • the cloud server can reconstruct the entire system graphics stack, and can directly use the graphics rendering library in the cloud virtual container to access the physical rendering device associated with the frame buffer, and then can use the physical rendering library to directly access the physical rendering device associated with the frame buffer.
  • the rendering device performs rendering processing in the container on the game data corresponding to the game process (for example, the above-mentioned game process 70a shown in FIG. 7 ), so as to obtain the rendered game data corresponding to the game process.
  • Step S105 generating a game synthesis screen according to the rendered game data.
  • the game composite screen is used for display on the game client.
  • each game process is referred to as the above-mentioned associated process, which means that the game process here may specifically include K associated with the business controls.
  • K is a positive integer; it can be understood that, at this time, the physical rendering device involved in this embodiment of the present application specifically includes K video memories corresponding to the K associated processes; therefore, when the cloud server finishes executing
  • the rendered game data may specifically include K sub-rendering data obtained by rendering the game data of the K associated processes; one video memory is used to store one sub-rendering data corresponding to one associated process.
  • the cloud server can output the sub-rendering data stored in the K video memories to the frame buffer mapped by the video memory address of the corresponding video memory, so as to output the data interface corresponding to the K sub-rendering data in each frame buffer, here
  • a data interface is a window corresponding to an associated process; further, the cloud server can synthesize the data interfaces (that is, multiple windows) corresponding to the K sub-rendering data through the graphics synthesizer in the cloud virtual container, so as to Based on the data interface of the K sub-rendering data after the composite processing, a game composite screen for display on the game client is generated.
  • the embodiment of the present application takes the game synthesis interface as the rendering synthesis interface 100c in the embodiment corresponding to FIG. 5 as an example, that is, the rendering synthesis interface 100c is obtained by superimposing windows corresponding to multiple processes respectively.
  • the above-mentioned rendering synthesis interface 100c may include a window corresponding to the text input area (that is, the operable area for changing the tribe name shown in FIG. 5 above), and may also include a text determination area (that is, the “” The window corresponding to the operable area where the "Complete” control is located), and the window corresponding to the prompt text information area (that is, the area where the prompt text information of "Username is too short! shown in Figure 5 above is located).
  • the windows involved in the above-mentioned rendering and synthesis interface 100c will not be listed one by one here.
  • the computer device reconstructs the system graphics stack in the entire cloud virtual container (for example, a bridge channel is established between the game process and the graphics rendering library), so that the game data corresponding to the entire game process can be stored in the Internal rendering is performed in the cloud virtual container, that is, the computer device can directly access a physical renderer (for example, a physical GPU) in the cloud virtual container at this time, thereby reducing the rendering delay of the game in the rendering scene of game data .
  • a physical renderer for example, a physical GPU
  • the compatibility of the game can be enhanced.
  • the cloud game can be run at a higher frame rate in the cloud virtual container to enhance the stability of the system.
  • FIG. 8 is a schematic flowchart of a data processing method provided by an embodiment of the present application.
  • the method can be executed by a computer device, and the computer device can be a game terminal running the above-mentioned game client, and the game terminal can be the game terminal 10a in the embodiment corresponding to the above-mentioned FIG. 2 ; the computer device also It may be a background server corresponding to the game client, and the background server may be the cloud server 20a in the embodiment corresponding to FIG. 2 above.
  • the methods involved in the embodiments of the present application may be executed by a game terminal corresponding to a game user, may also be executed by a cloud server, or may be jointly executed by a game terminal and a cloud server.
  • this embodiment is described by taking the method jointly executed by the game terminal and the cloud server as an example, and the method may include:
  • Step S201 when acquiring the remote connection request sent by the game client, the cloud server performs remote authentication on the game client corresponding to the game client based on the remote connection request, and obtains a remote authentication result;
  • the remote connection request is obtained when the game user accesses the game client through the game account information; the remote connection request carries the client environment system where the game client is located; this means that the remote connection request can start the game client for the game user. generated at the end.
  • the cloud server obtains the remote connection request sent by a certain game terminal (for example, the terminal A1 in the above-mentioned embodiment corresponding to FIG. 4 ), it can extract the game user's game carried in the remote connection request.
  • Account information for example, personal attribute information such as mobile phone numbers, social accounts, etc.
  • Account information for example, personal attribute information such as mobile phone numbers, social accounts, etc.
  • to perform authentication processing on the game user through the game account information so that in the case of successful authentication, continue to perform the following step S202, otherwise, then If the authentication fails, the remote connection request initiated by the game user this time will be rejected.
  • the identity of the game user in the embodiments of the present application, access control of the game user's access to the game client can be implemented, thereby ensuring access security.
  • this embodiment of the present application can also record the number of different terminal devices that the game user accesses the cloud server through the same game account information, so as to record the number of different terminal devices that access the cloud server through the same game account information.
  • the game composite screen corresponding to the rendered game data obtained by rendering in the container will be synchronously delivered to multiple terminals associated with the game user.
  • the terminal A1 and the terminal A2 may receive the game composite screen synchronously delivered by the cloud server. Based on this, by configuring the same cloud virtual container for multiple terminals associated with the same user, the cloud server can independently configure the cloud virtual container while concurrently accessing a large number of terminals of different users, thereby avoiding computing resources. of waste.
  • Step S202 if the cloud server determines that the remote authentication result indicates that the game user has the right to remotely access the game client, establish a data connection relationship with the game client;
  • Step S203 when the cloud server configures the cloud virtual container for the game client based on the data connection relationship, starts and runs the game client through the cloud game startup instruction in the cloud virtual container;
  • the cloud server can configure a cloud virtual container for the game client based on the data connection relationship, and virtualize a cloud game environment system matching the client environment system in the cloud virtual container; further, the cloud server can The associated cloud game startup instruction starts and runs the game client in the cloud game environment system, and outputs the game display page corresponding to the game client to the game terminal corresponding to the game user.
  • steps S201 to S203 For the specific implementation manner of steps S201 to S203, reference may be made to the description of the container 1 in the cloud server in the embodiment corresponding to FIG. 4, which will not be repeated here. It should be understood that by virtualizing a cloud game environment system that matches the client environment system in the cloud virtual container in the embodiment of the present application, a super running environment for running cloud games can be provided in the cloud for current game users, and further Make full use of the cloud computing function of the cloud server, so that the corresponding business logic of the cloud game (for example, business logic for controlling the game behavior of virtual objects in the cloud, etc.) can be improved in the cloud virtual container. processing efficiency.
  • business logic of the cloud game for example, business logic for controlling the game behavior of virtual objects in the cloud, etc.
  • Step S204 the game terminal sends a cloud game data acquisition request to the cloud server in response to the triggering operation for the game client;
  • Step S205 the cloud server starts the game process according to the cloud game data acquisition request in the cloud virtual container corresponding to the client environment system where the game client is located;
  • Step S206 when the cloud server obtains the frame buffer allocated for the game process, in the cloud virtual container, through the bridge channel between the game process and the graphics rendering library, call the graphics rendering library to obtain a remote mapping with the client environment system.
  • Graphical rendering instructions for relationships
  • the cloud virtual container may contain the reconstructed system graphics stack; the system graphics stack may be used to direct access to the physical rendering device with graphics rendering function in the cloud virtual container; the system graphics stack includes: game process, frame buffer component , buffer allocator, graphics rendering node, graphics rendering driver and physical rendering device; therefore, it can be understood that the cloud server can also allocate corresponding frame buffers for the game process in the cloud virtual container before executing step S207.
  • the cloud server can send a frame buffer application instruction to the frame buffer component through the game process; the frame buffer application instruction can be used to instruct the frame buffer component to send a buffer allocation instruction to the buffer allocator; further, the cloud server can be used in the buffer allocator.
  • the graphics rendering driver When a frame buffer is allocated to a game process based on the buffer allocation instruction, the graphics rendering driver is called through a graphics rendering node that has an associated relationship with the buffer allocator to allocate a frame buffer corresponding to a physical rendering device that has a hierarchical relationship with the graphics rendering driver.
  • the video memory further, the cloud server can return the video memory address corresponding to the display to the game process; wherein, the video memory address can be used to point to the frame buffer corresponding to the game process.
  • Step S207 the cloud server accesses the physical rendering device associated with the frame buffer based on the graphics rendering instruction, and performs rendering processing in the container on the game data corresponding to the game process through the physical rendering device, to obtain the rendered game data corresponding to the game process;
  • Step S208 the cloud server generates a game composite screen for display on the game client according to the rendered game data
  • the cloud server when it obtains the composite image of the game in the cloud, it can encode the composite image of the game in the cloud (for example, the game can be synthesized in the cloud through audio and video coding technology, such as h264/h265 technology.
  • the picture is encoded), so as to deliver the encoded code stream to the game terminal.
  • the corresponding video data can be quickly output in the game terminal through the audio and video decoding capability of the game terminal. (for example, game synthesis screen) and audio data to improve the interface display effect of the local terminal.
  • step S204-step S208 reference may be made to the description of step S101-step S105 in the embodiment corresponding to FIG. 3, which will not be repeated here.
  • Step S209 the game terminal receives the game composite screen generated by the cloud server according to the rendered game data, and displays the game composite screen in the game client.
  • the game terminal after the game terminal receives the encoded code stream sent by the cloud server, it can further use the audio and video decoding technology in the local terminal to decode the encoded code stream to obtain the decoding result.
  • the game composite screen can then be outputted to the game user in the game client.
  • the cloud server may be configured to receive touch event streams sent by one or more game users.
  • FIG. 9 is a schematic diagram of a scenario for acquiring multiple touch event streams provided by an embodiment of the present application.
  • the multiple game terminals shown in FIG. 9 may specifically include the game terminal 1 , the game terminal 2 and the game terminal 3 shown in FIG. 9 .
  • the touch event streams corresponding to the three game terminals may be respectively the touch event stream 1, the touch event stream 2 and the touch event stream 3 in the embodiment corresponding to FIG. 9 above.
  • FIG. 9 shows a two-dimensional map of a competitive game (for example, a MOBA game) in a virtual scene of a cloud game, and the two-dimensional map may be the game map shown in FIG. 9 .
  • a competitive game for example, a MOBA game
  • virtual objects can be roughly divided into two competitive camps, for example, a first camp and a second camp.
  • H for example, 3
  • 2*H for example, 6
  • virtual objects in the first camp may include virtual object 1, virtual object 2 and virtual object 3 located in the game map shown in FIG. 9 .
  • the three virtual objects (not shown in FIG. 9 ) in the second camp may specifically include virtual object 4 , virtual object 5 and virtual object 6 .
  • the game map in the virtual scene can be a square, and the game map can be divided into the following parts, and there are bases of the two camps at both ends of a diagonal line of the square. (Crystal), namely the base 1001 of the first camp and the base 1002 of the second camp; there are three offensive routes connecting the base 1001 of the first camp and the base 1002 of the second camp in the game map, which are : 1003 on the upper road, 1004 on the middle road, 1005 on the lower road; public areas: 1006 in the river, and 1007 in the wild area.
  • the virtual objects in the two camps were born at their respective base positions, and the three virtual objects in the same camp attacked the enemy in three offensive directions to destroy the enemy.
  • the base of the opposing faction is the base of the opponent's faction
  • the game will be won.
  • the 3 virtual objects in the first camp were born in the base 1001 shown in FIG. 9
  • the 3 virtual objects in the second camp were born in the base 1002 shown in FIG. 9
  • the virtual objects of the two camps were all named I
  • the square base is located in the lower left corner of the viewing angle to observe the virtual scene.
  • the virtual objects in the first camp can observe the virtual scene in the game map from the first perspective 1008, the virtual objects in the second camp can observe the virtual scene in the game map from the second perspective 1009, and each virtual object Each can attack from a certain attacking direction (top, middle, and bottom) for their respective perspectives.
  • the game user B shown in FIG. 9 can see the game display interface 200a presented by the game terminal 2 from the first viewing angle 1008 when the game duration is T duration.
  • the virtual object 1 controlled by game user B and the virtual objects controlled by other game users eg, game user C
  • the virtual object 2 shown is in the same attack area (for example, both are located at the intersection of the bottom road 1005 and the river 1006 of the game map), at this time, the game user B who controls the virtual object 1 can In the display interface 200a, the virtual object 2 shown in FIG. 9 (that is, the virtual object controlled by the game user C) can be seen.
  • the attack area where the virtual object controlled by another game user (for example, game user D) is located is different from the attack area where the virtual object 1 is located, the game user B cannot be displayed in the game temporarily.
  • the virtual object 3 controlled by the game user D is seen in the interface 200a.
  • the game user D can display the virtual object 3 he controls on his own game display interface.
  • the game terminal 2 may have data related to the game terminal 2 .
  • the cloud server of the connection relationship sends the touch event flow shown in FIG. 9, and then the game process corresponding to the city return event can be triggered in the container 2 of the cloud server, so that the game event corresponding to the city return event in the container 2 corresponds to the game event.
  • the game data of the virtual object realizes the rendering processing in the container, and then after the rendering processing, a game synthesis screen including the animation special effects of returning to the city associated with the city-returning event of the virtual object 1 can be generated, which can then be displayed in the container 2 shown in FIG. 9 .
  • the generated game synthesis screen is encoded to obtain the audio and video encoded stream 2 ′ shown in FIG. 9 . In this way, after the game terminal 2 decodes the audio and video coded stream, the game terminal 2 can display the above-mentioned game synthesis screen including the special effects of returning to the city.
  • the cloud server can also simulate and output game synthesis interfaces of multiple game users.
  • FIG. 10 is a schematic diagram of a scene of a simulation output rendering display interface in the cloud provided by an embodiment of the present application.
  • the rendering display interface shown in FIG. 10 may specifically include the game composite screens corresponding to game user B, game user C, and game user D shown in FIG. 9 .
  • the game synthesis screen corresponding to the game user B may be the simulation output interface 300a shown in FIG. 10
  • the simulation output interface 300a may be the game synthesis screen including the animation special effects of returning to the city of the virtual object 1 shown in FIG. 10 .
  • the simulation output interface 300a when rendering is performed in the container 2 in the cloud, the simulation output interface 300a is determined by the screen parameter information of the game terminal 2 shown in FIG. 9 (for example, the resolution of the game terminal 2, for example, 1280 ⁇ 720) .
  • the game synthesis screen corresponding to the game user C may be the simulation output interface 300b shown in FIG. 10
  • the simulation output interface 300b may be a game synthesis screen including the virtual object 2 shown in FIG. 10 to send skill special effects.
  • the simulation output interface 300b When rendering in the container 1 in the cloud, the simulation output interface 300b may be determined by the screen parameter information of the game terminal 1 shown in FIG. 9 (for example, the resolution of the game terminal 1, for example, 1280 ⁇ 720). .
  • the game synthesis screen corresponding to the game user D may be the simulation output interface 300c shown in FIG. 10
  • the simulation output interface 300c may be a game synthesis screen including the virtual object 3 shown in FIG. 10 to send skill special effects.
  • the simulation output interface 300c may be the screen parameter information of the game terminal 3 shown in FIG. ) determined.
  • Android containers for example, container 1, container 2, and container 3 shown in FIG. 9 above
  • a cloud game environment system is provided for the corresponding game terminal, and the cloud game environment system may be a remote Android system.
  • a packaged component for example, the above-mentioned libdrm component
  • an instruction encapsulation function can be located through the Mesa graphics library, so as to further issue the graphics rendering operation indicated by the standardized graphics rendering instruction to the graphics rendering driver (for example, the above-mentioned kernel-state GPU graphics driver) to finally complete graphics rendering on specific hardware (for example, the above-mentioned physical rendering device).
  • the above-mentioned buffer allocator (for example, a self-defined GBM_GRALLOC module that applies for a frame buffer for a corresponding game process) can be used for the game process running in the Android system of the container. Allocate the corresponding graphics buffer. It can be understood that, in this embodiment of the present application, the buffer allocator can also provide a complete Android gralloc interface to manage the life cycle of the entire graphics buffer (that is, the frame buffer). The frame buffer corresponding to the corresponding game process is destroyed in the container.
  • the embodiment of the present application can provide a window management service (that is, the SurfaceFlinger service), so as to synthesize the windows corresponding to the multiple processes through the SurfaceFlinger service of the Android system, so as to A game composite screen is obtained that superimposes the windows of K associated processes.
  • a window management service that is, the SurfaceFlinger service
  • the embodiment of the present application can provide a window management service (that is, the SurfaceFlinger service), so as to synthesize the windows corresponding to the multiple processes through the SurfaceFlinger service of the Android system, so as to A game composite screen is obtained that superimposes the windows of K associated processes.
  • a certain graphics rendering node that is, the above-mentioned GPU node
  • Containers configured for each game terminal.
  • the container id can be mapped to a specific GPU node, so that the N containers running in the cloud server are evenly distributed on all GPU nodes, so as to complete the load balancing of rendering, thereby enhancing the system stability.
  • the encoded audio and video streams are collectively referred to as the encoded audio and video streams (that is, the above-mentioned video and audio streams), and are given to the corresponding game terminals, so that the corresponding game terminals can perform decoding processing based on the received audio and video streams, so that In the end, a game display page with the same content as the rendered composite image in the cloud can be obtained by decoding in the corresponding game terminal. Since the embodiment of the present application performs the rendering processing in the container, there is no need to perform format conversion between different rendering modes, thereby effectively improving the compatibility of the system and reducing the rendering delay.
  • FIG. 11 is a schematic structural diagram of a data processing apparatus provided by an embodiment of the present application.
  • the data processing apparatus 1 can be applied to the above-mentioned cloud server, and the cloud server can be the cloud server 2000 in the embodiment corresponding to the above-mentioned FIG. 1 .
  • the data processing device 1 may include: a request acquisition module 11, a game process startup module 12, a rendering instruction determination module 13, a rendering processing module 14, and a composite screen generation module 15; the data processing device 1 may also include: remote authentication rights module 16, connection establishment module 17, client startup module 18, application instruction sending module 19, rendering driver calling module 20 and address return module 21, buffer destruction module 22, data determination module 23, video stream determination module 24, audio a stream determination module 25, an encoded stream issuing module 26;
  • the request obtaining module 11 is used to obtain the cloud game data obtaining request sent by the game client;
  • the game process start module 12 is used to start the game process according to the cloud game data acquisition request in the cloud virtual container corresponding to the client environment system where the game client is located;
  • the game display page corresponding to the game client includes virtual objects associated with the game user, and the service controls in the game display page are used to manipulate the game attribute behavior of the virtual object in the cloud game environment system corresponding to the game client;
  • the game process start module 12 includes: a container determination unit 121, a start instruction determination unit 122, a process start unit 123 and a game progress determination unit 124;
  • the container determination unit 121 is configured to determine, based on the client environment system where the game client is located, a cloud virtual container corresponding to the cloud game environment system that matches the client environment system;
  • a startup instruction determination unit 122 configured to extract the attribute behavior event of the virtual object indicated by the service control from the cloud game data acquisition request, and determine the process activation instruction associated with the attribute behavior event;
  • the process start unit 123 is used to input the process start instruction into the cloud virtual container, control the virtual object to execute the game attribute behavior in the cloud virtual container, and start K associated processes associated with the game attribute behavior; K is a positive integer;
  • the game process determination unit 124 is configured to take the K associated processes as game processes associated with the service control.
  • step S102 The specific implementation of the container determination unit 121, the startup instruction determination unit 122, the process initiation unit 123 and the game progress determination unit 124 can be referred to the description of step S102 in the embodiment corresponding to FIG. 3, which will not be repeated here. Continue to elaborate.
  • the rendering instruction determination module 13 is used to call the graphics rendering library to obtain a connection with the client environment system through the bridge channel between the game process and the graphics rendering library in the cloud virtual container when the frame buffer allocated for the game process is obtained.
  • system graphics stack includes: a graphics rendering library associated with the game process;
  • the rendering instruction determination module 13 includes: an association relationship acquisition unit 131, a bridge channel determination unit 132 and a rendering instruction acquisition unit 133;
  • the association relationship obtaining unit 131 is used to obtain the association relationship between the game process and the graphics rendering library when the frame buffer allocated for the game process is obtained;
  • a bridge channel determination unit 132 configured to determine a bridge channel between the game process and the graphics rendering library in the cloud virtual container based on the association relationship;
  • the rendering instruction obtaining unit 133 is configured to call the graphics rendering library through the bridge channel, and obtain the graphics rendering instruction having a remote mapping relationship with the client environment system from the graphics rendering library.
  • association relationship obtaining unit 131 the bridge channel determination unit 132 and the rendering instruction obtaining unit 133 can be referred to the description of step S103 in the embodiment corresponding to FIG. 3, and will not be repeated here.
  • the rendering processing module 14 is used for accessing the physical rendering device associated with the frame buffer based on the graphics rendering instruction, and performing rendering processing in the container on the game data corresponding to the game process through the physical rendering device, so as to obtain the rendering game data corresponding to the game process;
  • the graphics rendering library includes encapsulation components with instruction encapsulation function
  • the rendering processing module 14 includes: a normalization processing unit 141, a physical device access unit 142 and a rendering processing unit 143;
  • the standardized processing unit 141 is used to standardize the graphics rendering instruction through the package component, and transmit the standardized graphics rendering instruction to the graphics rendering driver through the graphics rendering node;
  • a physical device access unit 142 configured to access the physical rendering device associated with the frame buffer based on the hierarchical relationship between the graphics rendering driver and the graphics rendering device;
  • the rendering processing unit 143 is configured to perform rendering processing on the game data corresponding to the game process in the container through the graphics rendering function of the physical rendering device, and use the rendered game data as the rendered game data corresponding to the game process.
  • step S104 For specific implementations of the standardization processing unit 141, the physical device access unit 142 and the rendering processing unit 143, reference may be made to the description of step S104 in the embodiment corresponding to FIG. 3, which will not be repeated here.
  • the composite picture generation module 15 is configured to generate a game composite picture for display on the game client according to the rendered game data.
  • the cloud game data acquisition request carries the business controls triggered by the game user corresponding to the game client in the game display interface; the game process includes K associated processes associated with the business controls; the physical rendering device includes K associated processes K video memory corresponding to each process; the rendered game data includes K sub-rendering data after rendering the game data of K associated processes; one video memory is used to store one sub-rendering data corresponding to one associated process;
  • the composite picture generation module 15 includes: a data interface output unit 151, a composite processing unit 152 and an analog output unit 153;
  • the data interface output unit 151 is used to output the sub-rendering data stored in the K display memories to the frame buffer mapped by the display memory address of the corresponding display memory, and output the data interface corresponding to the K sub-rendering data in each frame buffer;
  • the synthesis processing unit 152 is configured to perform synthesis processing on the data interface corresponding to the K sub-rendering data through the graphics synthesizer in the cloud virtual container, and generate a data interface for the game client based on the data interface of the K sub-rendering data after synthesis processing. Make the displayed game composition screen.
  • the graphics synthesizer is used to provide window management services for game clients
  • the simulation output unit 153 is configured to determine the screen parameter information of the game terminal corresponding to the game client based on the window management service, and simulate and output the game composite screen in the kernel environment corresponding to the cloud virtual container based on the screen parameter information.
  • step S105 The specific implementation of the data interface output unit 151 , the synthesis processing unit 152 and the analog output unit 153 may refer to the description of step S105 in the embodiment corresponding to FIG. 3 , which will not be repeated here.
  • the remote authentication module 16 is configured to perform remote authentication on the game client corresponding to the game client based on the remote connection request when obtaining the remote connection request sent by the game client, and obtain a remote authentication result;
  • the remote connection request is the game user Obtained when accessing the game client through game account information;
  • the remote connection request carries the client environment system where the game client is located;
  • the connection establishment module 17 is configured to establish a data connection relationship with the game client if the remote authentication result indicates that the game user has the right to remotely access the game client;
  • the client startup module 18 is configured to start and run the game client through the cloud game startup instruction in the cloud virtual container when the cloud virtual container is configured for the game client based on the data connection relationship.
  • the cloud virtual container contains the reconstructed system graphics stack;
  • the system graphics stack is used to direct access to the physical rendering device with graphics rendering function in the cloud virtual container;
  • the system graphics stack includes: game process, frame buffer component, buffer Distributors, graphics rendering nodes, graphics rendering drivers and physical rendering devices;
  • the application instruction sending module 19 is used to send the frame buffer application instruction to the frame buffer component through the game process; the frame buffer application instruction is used to instruct the frame buffer component to send the buffer allocation instruction to the buffer allocator;
  • the rendering driver calling module 20 is configured to, when the buffer allocator allocates the frame buffer for the game process based on the buffer allocation instruction, call the graphics rendering driver through the graphics rendering node that has an associated relationship with the buffer allocator, so as to have the same relationship with the graphics rendering driver.
  • the video memory corresponding to the frame buffer is allocated in the physical rendering device of the hierarchical relationship;
  • the address returning module 21 is used to return the video memory address corresponding to the video memory to the game process; the video memory address is used to point to the frame buffer corresponding to the game process.
  • the buffer allocator can manage the entire life cycle of the frame buffer
  • the buffer destruction module 22 is configured to destroy the frame buffer corresponding to the game process through the buffer allocator when it is detected that the process state of the game process is the end state.
  • the data determination module 23 is used for taking the rendered game data in the game synthesis picture as the video data to be encoded, and the audio data corresponding to the game synthesis picture as the audio data to be encoded;
  • the video stream determination module 24 is used for encoding the video data to be encoded based on the audio and video encoding rules in the cloud virtual container to obtain an encoded video stream;
  • the audio stream determination module 25 is used to encode the audio data to be encoded based on the audio and video encoding rules in the cloud virtual container to obtain an encoded audio stream;
  • the coded stream issuing module 26 is used to use the coded video stream and the coded audio stream as the coded audio and video stream of the trigger event corresponding to the service control, and issue the coded audio and video stream to the game client, so that the game client can respond to the coded audio and video.
  • the stream is decoded.
  • step S105 for the specific implementation of the request acquisition module 11, the game process startup module 12, the rendering instruction determination module 13, the rendering processing module 14 and the composite screen generation module 15, please refer to the above-mentioned embodiment corresponding to FIG. 3 for steps S101- The description of step S105 will not be repeated here; for the specific implementation of the remote authentication module 16, the connection establishment module 17, and the client startup module 18, please refer to the specific implementation of the game client startup in the embodiment corresponding to FIG. 3 above. The description of the process will not be repeated here.
  • FIG. 12 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • the computer device 1000 may be a cloud server, and the cloud server may be the cloud server 2000 in the embodiment corresponding to FIG. 1 above.
  • the computer device 1000 may include a processor 1001 , a network interface 1004 and a memory 1005 , in addition, the computer device 1000 may further include a user interface 1003 , and at least one communication bus 1002 .
  • the communication bus 1002 is used to realize the connection and communication between these components.
  • the user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may include a standard wired interface, a wireless interface (eg, a WI-FI interface).
  • the memory 1004 may be a high-speed RAM memory, or a non-volatile memory (non-transitory memory), such as at least one disk memory.
  • the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001 . As shown in FIG. 12 , the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.
  • the network interface 1004 in the computer device 1000 may also be connected to the game terminal 10a in the embodiment corresponding to FIG. 2 above.
  • the network interface 1004 can provide a network communication function;
  • the user interface 1003 is mainly used to provide an input interface for the user;
  • the processor 1001 can be used to call the device control application stored in the memory 1005 program to achieve:
  • the graphics rendering library is called to obtain the graphics rendering instruction that has a remote mapping relationship with the client environment system ;
  • the physical rendering device associated with the frame buffer is accessed, and the game data corresponding to the game process is rendered in the container through the physical rendering device, and the rendered game data corresponding to the game process is obtained;
  • the computer device 1000 described in the embodiment of the present application can execute the data processing method in the embodiment corresponding to FIG. 3 or FIG. 8, and can also execute the function of the data processing apparatus 1 in the embodiment corresponding to FIG. 11. It is not repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated.
  • the embodiment of the present application also provides a computer storage medium, and the computer storage medium stores the computer program executed by the aforementioned data processing apparatus 1, and the computer program includes program instructions.
  • the processor executes the program instructions, it can execute the data processing method in the foregoing embodiment corresponding to FIG. 3 or FIG. 8 , and thus will not be repeated here.
  • the description of the beneficial effects of using the same method will not be repeated.
  • program instructions may be deployed to execute on one computing device, or on multiple computing devices located at one site, or alternatively, on multiple computing devices distributed across multiple sites and interconnected by a communications network
  • multiple computing devices distributed in multiple locations and interconnected by a communication network can form a blockchain system.
  • One aspect of the present application provides a computer program product or computer program, the computer program product or computer program including computer instructions stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device can execute the data processing method in the embodiment corresponding to FIG. 3 or FIG. Repeat.
  • the description of the beneficial effects of using the same method will not be repeated.
  • FIG. 13 is a schematic structural diagram of a data processing apparatus provided by an embodiment of the present application.
  • the data processing device 2 may include: an operation response module 100 and a composite picture receiving module 200;
  • the operation response module 100 is configured to send a cloud game data acquisition request to the cloud server in response to a trigger operation for the game client; the cloud game data acquisition request is used to instruct the cloud server to start the game process, and after acquiring the frame allocated for the game process
  • the cloud virtual container When buffering, in the cloud virtual container, through the bridge channel between the game process and the graphics rendering library, call the graphics rendering instruction in the graphics rendering library to access the physical rendering device associated with the frame buffer, and use the physical rendering device to control the game process.
  • the corresponding game data is rendered in the container to obtain the rendered game data corresponding to the game process;
  • the composite picture receiving module 200 is configured to receive the game composite picture generated by the cloud server according to the rendered game data, and display the game composite picture in the game client.
  • FIG. 14 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • the computer device 4000 may be a game terminal, and the game terminal may be the user terminal 3000 a in the embodiment corresponding to FIG. 1 above. at this time.
  • the computer device 4000 may include a processor 4001 , a network interface 4004 and a memory 4005 , in addition, the computer device 4000 may further include a user interface 4003 , and at least one communication bus 4002 .
  • the communication bus 4002 is used to realize the connection and communication between these components.
  • the user interface 4003 may include a display screen (Display) and a keyboard (Keyboard).
  • the network interface 4004 may include a standard wired interface, a wireless interface (eg, a WI-FI interface).
  • the memory 4004 can be a high-speed RAM memory, or a non-volatile memory (non-transitory memory), such as at least one disk memory.
  • the memory 4005 may also be at least one storage device located remotely from the aforementioned processor 4001 . As shown in FIG. 14 , the memory 4005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.
  • the network interface 4004 in the computer device 4000 can also provide a network communication function.
  • the network interface 4004 can provide network communication functions;
  • the user interface 4003 is mainly used to provide an input interface for the user; and
  • the processor 4001 can be used to call the device control application stored in the memory 4005 program to achieve:
  • the cloud game data acquisition request is used to instruct the cloud server to start the game process, and when the frame buffer allocated for the game process is acquired, the cloud virtual In the container, through the bridge channel between the game process and the graphics rendering library, the graphics rendering instruction in the graphics rendering library is called to access the physical rendering device associated with the frame buffer, and the game data corresponding to the game process is processed in the container through the physical rendering device. Rendering processing to obtain the rendering game data corresponding to the game process;
  • the embodiments of the present application also provide a computer program product or computer program, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the data processing method in the embodiment corresponding to FIG. 3 or FIG. Let's go into details. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer storage medium embodiments involved in the present application, please refer to the description of the method embodiments of the present application.
  • FIG. 15 is a schematic structural diagram of a data processing system provided by an embodiment of the present application.
  • the data processing system 3 may include a data processing device 1a and a data processing device 2a.
  • the data processing apparatus 1a may be the data processing apparatus 1 in the embodiment corresponding to FIG. 11. It is understood that the data processing apparatus 1a may be integrated into the cloud server 20a in the embodiment corresponding to FIG. 2. Therefore, It will not be repeated here.
  • the data processing device 2a may be the data processing device 2 in the embodiment corresponding to FIG. 13. It can be understood that the data processing device 2a can be integrated into the game terminal 10a in the embodiment corresponding to FIG. 2. Therefore, here No further description will be given. In addition, the description of the beneficial effects of using the same method will not be repeated.
  • the description of the beneficial effects of using the same method will not be repeated.
  • For technical details not disclosed in the embodiments of the video data processing system involved in the present application please refer to the description of the method embodiments of the present application.
  • the computer device when the computer device acquires the cloud game data acquisition request sent by the game client, it can virtualize the cloud virtual machine corresponding to the client environment system where the game client is located (for example, the Android system where the game client is located).
  • the game process is started according to the cloud game data acquisition request; it can be understood that the cloud game data acquisition request here is generated by the game client in response to the trigger operation of the game user.
  • a game user also referred to as a player
  • the operation control for moving the virtual object in the game terminal performs a trigger operation, so that the game client running in the game terminal can initiate a cloud game data acquisition request to the computer device.
  • the graphics rendering library is called to obtain the graphics rendering instructions that have a remote mapping relationship with the client environment system.
  • the rendering instruction accesses the physical rendering device associated with the frame buffer, and then the game data corresponding to the game process can be rendered in the container through the physical rendering device, so that the rendered game data corresponding to the currently started game process can be obtained.
  • the computer device reconstructs the system graphics stack in the entire cloud virtual container (for example, when a bridge channel is established between the game process and the graphics rendering library), so that the entire game
  • the game data corresponding to the process can be rendered internally in the cloud virtual container, that is, the computer device can directly access the physical renderer (for example, a physical GPU) in the cloud virtual container at this time, and then can render the scene in the game data. Decrease the rendering latency of the game.
  • the computer device performs internal rendering in the cloud virtual container, since there is no need to convert between different rendering modes, the compatibility of the game can be enhanced.
  • the cloud game can be run at a higher frame rate in the cloud virtual container to enhance the stability of the system.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM) or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Processing Or Creating Images (AREA)

Abstract

一种数据处理方法、装置及存储介质,其中方法包括:获取游戏客户端发送的云游戏数据获取请求;在游戏客户端对应的云虚拟容器(30a)中,根据云游戏数据获取请求启动游戏进程;在获取到为游戏进程所分配的帧缓冲区时,调用图形渲染库得到图形渲染指令;基于图形渲染指令访问与帧缓冲区相关联的物理渲染器件(70f),以对游戏进程对应的游戏数据进行容器内的渲染处理,得到渲染游戏数据;根据渲染游戏数据生成游戏合成画面。

Description

一种数据处理方法、装置及存储介质
本申请要求于2020年8月28日提交中国专利局、申请号为202010883519.4、发明名称为“一种数据处理方法、装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机计算领域,具体涉及云技术领域,尤其涉及一种数据处理方法、装置及存储介质。
发明背景
在云游戏场景下,所有游戏都在服务器端运行,并可以在该服务器端将渲染完毕后的游戏画面返回给相应游戏玩家所对应的终端。然而,现有的云游戏的渲染需要将某个运行系统(比如,安卓系统)内部的图形渲染接口外发到外部渲染器件上进行渲染,进而降低了云游戏的渲染时延,以至于在大型云游戏的运行场景下,会降低游戏的帧率。
此外,通过将系统内部的图形渲染接口进行外发,会在该系统的外部进行图形渲染,这意味着在系统外部对待渲染的游戏数据进行渲染格式之前,需要预先对系统内部和系统外部之间所采用的不同渲染方式进行转换,所以,当在系统外部对待渲染的游戏数据(即格式转换后的游戏数据)进行渲染格式时,会存在误转换的现象,例如,当在系统外部进行游戏渲染时,可能只有40%的游戏可以正常渲染,以至于降低了游戏的兼容性。
发明内容
本申请实施例提供一种数据处理方法、装置及存储介质,可以增强游戏兼容性,并降低渲染时延。
本申请实施例一方面提供了一种数据处理方法,方法包括:
获取游戏客户端发送的云游戏数据获取请求;
在游戏客户端对应的云虚拟容器中,根据云游戏数据获取请求启动游戏进程;
在获取到为游戏进程所分配的帧缓冲区时,在云虚拟容器中调用图形渲染库得到图形渲染指令;
基于图形渲染指令访问与帧缓冲区相关联的物理渲染器件,通过物理渲染器件对游戏进程对应的游戏数据进行容器内的渲染处理,得到游戏进程对应的渲染游戏数据;
根据渲染游戏数据生成游戏合成画面。
本申请实施例一方面提供了一种数据处理装置,装置包括:
请求获取模块,用于获取游戏客户端发送的云游戏数据获取请求;
游戏进程启动模块,用于在游戏客户端对应的云虚拟容器中,根据云游戏数据获取请求启动游戏进程;
渲染指令确定模块,用于在获取到为游戏进程所分配的帧缓冲区时,在云虚拟容器中调用图形渲染库得到图形渲染指令;
渲染处理模块,用于基于图形渲染指令访问与帧缓冲区相关联的物理渲染器件,通过物理渲染器件对游戏进程对应的游戏数据进行容器内的渲染处理,得到游戏进程对应的渲染游戏数据;
合成画面生成模块,用于根据渲染游戏数据生成游戏合成画面。
本申请实施例一方面提供了一种数据处理方法,方法包括:
响应针对游戏客户端的触发操作,向云服务器发送云游戏数据获取请求;云游戏数据获取请求用于指示云服务器启动游戏进程,且在获取到为游戏进程所分配的帧缓冲区时,在云虚拟容器中调用图形渲染库中的图形渲染指令访问与帧缓冲区相关联的物理渲染器件,通过物理渲染器件对游戏进程对应的游戏数据进行容器内的渲染处理,得到游戏进程对应的渲染游戏数据;
接收云服务器根据渲染游戏数据所生成的游戏合成画面,在游戏客户端中显示游戏合成画面。
本申请实施例一方面提供了一种数据处理装置,装置包括:
操作响应模块,用于响应针对游戏客户端的触发操作,向云服务器发送云游戏数据获取请求;云游戏数据获取请求用于指示云服务器启动游戏进程,且在获取到为游戏进程所分配的帧缓冲区时,在云虚拟容器中调用图形渲染库中的图形渲染指令访问与帧缓冲区相关联的物理渲染器件,通过物理渲染器件对游戏进程对应的游戏数据进行容器内的渲染处理,得到游戏进程对应的渲染游戏数据;
合成画面接收模块,用于接收云服务器根据渲染游戏数据所生成的游戏合成画面,在游戏客户端中显示游戏合成画面。
本申请实施例一方面提供了一种计算机设备,包括:处理器和存储器;
处理器与存储器相连,其中,存储器用于存储程序代码,处理器用于调用程序代码,以执行本申请实施例一方面中的方法。
本申请实施例一方面提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序包括程序指令,程序指令被处理器执行时,执行如本申请实施例一方面中的方法。
附图简要说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种网络架构的结构示意图;
图2是本申请实施例提供的一种在云游戏场景下进行数据交互的场景示意图;
图3是本申请实施例提供的一种数据处理方法的流程示意图;
图4是本申请实施例提供的一种云服务器的场景示意图;
图5是本申请实施例提供的一种发送云游戏数据获取请求的场景示意图;
图6a是本申请实施例提供的一种在云服务器上运行多个安卓运行环境的场景示意图;
图6b是本申请实施例提供的一种在容器内调用图形渲染库的场景示意图;
图7是本申请实施例提供的一种在云虚拟容器中为游戏进程分配的帧缓冲区的场景示意图;
图8是本申请实施例提供的一种数据处理方法的流程示意图;
图9是本申请实施例提供的一种获取多个触摸事件流的场景示意图;
图10是本申请实施例提供的一种在云端模拟输出渲染显示界面的场景示意图;
图11是本申请实施例提供的一种数据处理装置的结构示意图;
图12是本申请实施例提供的一种计算机设备的结构示意图;
图13是本申请实施例提供的一种数据处理装置的结构示意图;
图14是本申请实施例提供的一种计算机设备的结构示意图;
图15是本申请实施例提供的一种数据处理系统的结构示意图。
实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请实施例涉及云技术(cloud technology),云计算(cloud computing)和云游戏(cloud gaming)。其中,云技术是指在广域网或局域网内将硬件、软件、网络等系列资源统一起来,实现数据的计算、储存、处理和共享的一种托管技术。云技术是基于云计算商业模式应用的网络技术、信息技术、整合技术、管理平台技术、应用技术等的总称,可以组成资源池,按需所用,灵活便利。云计算技术将变成重要支撑。技术网络系统的后台服务需要大量的计算、存储资源,如视频网站、图片类网站和更多的门户网站。伴随着互联网行业的高度发展和应用,将来每个物品都有可能存在自己的识别标志,都需要传输到后台系统进行逻辑处理,不同程度级别的数据将会分开处理,各类行业数据皆需要强大的系统后盾支撑,只能通过云计算来实现。
云计算是一种计算模式,它将计算任务分布在大量计算机构成的资源池上,使各种应用系统能够根据需要获取计算力、存储空间和信息服务。提供资源的网络被称为“云”。“云”中的资源在使用者看来是可以无限扩展的,并且可以随时获取,按需使用,随时扩展,按使用付费。作为云计算的基础能力提供商,会建立云计算资源池(简称云平台,一般称为IaaS(Infrastructure as a Service,基础设施即服务)平台,在资源池中部署多种类型的虚拟资源,供外部客户选择使用。云计算资源池中主要包括:计算设备(为虚拟化机器,包含操作系统)、存储设备、网络设备。
云游戏又可称为游戏点播(gaming on demand),是一种以云计算技术为基础的在线游戏技术。云游戏技术使图形处理与数据运算能力相对有限的轻端设备(thin client)能运行高品质游戏。在云游戏场景下,游戏并不在玩家游戏终端(也可以称之为游戏用户对应的游戏终端),而是在云服务器中运行,并由云服务器将游戏场景渲染为视频音频流,通过网络传输给玩家游戏终端。可以理解的是,比如,在本申请实施例中,该云服务器所采用的渲染技术属于一种容器内的渲染技术,这里的容器是指在云服务器中所虚拟得到的云虚拟容器,即本申请实施例可以将在云虚拟容器中所渲染得到的视频音频流通过网络传输给玩家游戏终端。可以理解的是,这里的玩家游戏终端无需拥有强大的图形运算与数据处理能力,仅需拥有基本的流媒体播放能力与获取玩家(即游戏用户)输入指令并发送给云服务器的能力即可。
可以理解的是,在云游戏场景下,玩家可以通过玩家游戏终端中所运行的游戏客户端与云服务器之间进行数据交互,这样,当云服务器在云端的云虚拟容器中完成对该游戏客户端中的游戏数据的渲染操作之后,可以进一步对渲染所得到的游戏画面的音视频数据进行编码操作,以将编码后的数据流(比如,音频流和视频流)下发给玩家游戏终端进行解码操作。
进一步的,请参见图1,图1是本申请实施例提供的一种网络架构的结构示意图。如图1所示,网络架构可以应用于游戏场景下的数据处理系统。该数据处理系统具体可以包括图1所示的云服务器2000和用户终端集群。其中,用户终端集群具体可以包括一个或者多个用户终端,这里将不对用户终端集群中的用户终端的数量进行限制。如图1所示,多个用户终端具体可以包括用户终端3000a、用户终端3000b、用户终端3000c、…、用户终端3000n;如图1所示,用户终端3000a、用户终端3000b、用户终端3000c、…、用户终端3000n可以分别与云服务器2000进行网络连接,以便于每个用户终端可以通过该网络连接与云服务器2000之间进行数据交互。
其中,如图1所示的云服务器2000可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器。
应当理解,在游戏场景下,如图1所示的用户终端集群中的每个用户终端均可以安装有游戏客户端,当该游戏客户端运行于各用户终端中时,可以分别与上述图1所示的云服务器2000之间进行数据交互。其中,可以理解的是,这里的游戏客户端可以包含竞速类游戏客户端、跑酷类游戏客户端、射击类游戏客户端以及棋牌类游戏客户端等。其中,为便于理解,本申请实 施例可以在图1所示的多个用户终端中选择一个用户终端作为游戏终端,这里的游戏终端可以包括:智能手机、平板电脑、笔记本电脑、桌上型电脑、智能电视等具有多媒体数据加载功能的智能终端。例如,本申请实施例可以将图1所示的用户终端3000a作为游戏终端,这里的游戏终端具体可以包括但不限于手游终端。
可以理解的是,在数据处理系统中,可以将该游戏客户端分别部署在游戏终端(例如,上述图1所对应实施例中的用户终端3000a)和后台服务器(例如,上述图1所对应实施例中的云服务器2000)。这样,本申请实施例提供的数据处理方法可以涉及上述云技术领域。
其中,可以理解的是,在本申请实施例中,该游戏终端可以用于作为该游戏客户端的前端,且该云服务器2000可以用于作为该游戏客户端的后台(即前述后台服务器),这样,当云服务器2000获取到该游戏终端中的游戏用户发送的云游戏数据获取请求之后,可以快速定位到该游戏客户端所在的客户端环境系统所对应的云虚拟容器,进而可以在该云虚拟容器(即上述容器)中,根据该云游戏数据获取请求启动游戏进程。可以理解的是,这里的游戏进程可以包含用于指示在云虚拟容器中启动游戏客户端所需要的关联进程,这样,当游戏用户在游戏终端中触发游戏客户端的游戏图标时,可以在该云虚拟容器中启动与该游戏图标相关联的关联进程,进而可以在该云虚拟容器中为该启动进程分配帧缓冲区,以利用容器内的渲染技术实现内部渲染,以渲染得到用于显示在游戏终端中的游戏显示界面(例如,游戏客户端的游戏首页等)。该游戏显示界面中可以包含具有相应业务功能的业务控件,比如,这里的业务控件主要是指能够控制虚拟对象的游戏属性行为的控件等。
这里的游戏进程还可以包含与这些业务控件相关联的一个或者多个关联进程。比如,当游戏用户在该游戏客户端的客户端环境系统下进行数据交互时,可以基于该游戏用户与该游戏客户端之间的触发事件,向该云服务器2000发送云游戏数据获取请求,这样,当该云服务器2000接收到该云游戏数据获取请求时,可以在该游戏客户端的客户端环境系统所对应的云虚拟容器中,启动与业务控件相关联的一个或者多个关联进程,进而可以将在该云虚拟容器中所启动的一个或者多个关联进程统称为与该业务控件相关联的游戏进程。可以理解的是,此时,该云服务器2000可以在获取到为游戏进程所分配的帧缓冲区时,在该云虚拟容器中通过游戏进程与图形渲染库之间的桥接通道,直接访问到该图形渲染库,这里的图形渲染库可以为Mesa图形库,该Mesa图形库可以理解为一种用户态图形驱动,它可以用于提供游戏(比如,游戏进程)与云游戏环境系统(比如,在云服务器中所虚拟出的安卓系统)之间的渲染服务。基于此,当该云服务器在该云虚拟容器中访问到该图形渲染库(例如,Mesa图形库)时,可以直接在该云虚拟容器中进行图形渲染,以得到游戏进程对应的渲染游戏数据。
为便于理解,进一步的,请参见图2,图2是本申请实施例提供的一种在云游戏场景下进行数据交互的场景示意图。如图2的云服务器20a可以为上述图1所对应实施例中的云服务器2000,如图2所示的游戏终端可以为上述图1所对应实施例中的任意一个用户终端,为便于理解,本申请实施例以上述图1所示的用户终端3000a作为该游戏终端为例,以阐述图2所示的云服务器20a与该游戏终端10a之间进行数据交互的具体过程。
可以理解的是,如图2所示的游戏终端10a中可以运行有上述游戏客户端(例如,云游戏X的客户端),该云游戏X对应的游戏显示页面中可以显示图2所示的虚拟对象。可以理解的是,该游戏显示页面中还可以包含用于向图2所示的云服务器20a请求控制该虚拟对象的游戏属性行为的业务控件(比如,图2所示的业务控件10b)。如图2所示,当该游戏用户A针对该业务控件10b执行触发操作时,该游戏终端10a可以响应针对该业务控件10b的触发操作,向图2所示的云服务器20a发送图2所示的云游戏数据获取请求1,可以理解的是,该云游戏数据获取请求可以用于指示该云服务器20a在图2所示的云虚拟容器30a中进行渲染处理,以得到图2所示的渲染游戏数据。
其中,可以理解的是,该云游戏数据获取请求1可以用于指示该云服务器20a启动与该业务控件10b相关联的一个或者多个关联进程。本申请实施例可以将该云服务器20a所启动的与该业务控件10a相关联的一个或者多个关联进程统称为与该业务控件10b相关联的游戏进程。这样,该云服务器20a可以在图2所示的云虚拟容器30a中为每个关联进程均分配一个帧缓存区,可以理解的是,这里的每个帧缓存区均分别与该云服务器20a中对应物理渲染器件中的显存之间存在地址映射关系。比如,在某个云虚拟容器中,一个物理渲染器件中所分配的某个显 存的地址可以用于指向在该云虚拟容器中所请求到的对应的帧缓冲区。
基于此,如图2所示,该云服务器20a可以在该云虚拟容器30a中为与该业务控件10b相关联的K个关联进程申请K个帧缓冲区,这里的每个帧缓存区均可以对应一个显存的显存地址。这里的K可以为正整数。所以,当该云服务器20a在该云虚拟容器30a中利用图2所示的图形渲染库直接访问到该云虚拟容器30a中的图形渲染节点时,可以在该云虚拟容器30a进行渲染处理,以得到图2所示的渲染游戏数据。如图2所示,这里的渲染游戏数据具体可以包含在该云虚拟容器30a中对每个关联进程的游戏数据进行渲染处理后所得到的子渲染数据,所以,当该云服务器20a在该云虚拟容器30a中对K个关联进程的游戏数据进行渲染处理之后,可以得到K个子渲染数据,这里的K个子渲染数据具体可以包括图2所示的子渲染数据40a、…、子渲染数据40b。可以理解的是,这里的每个子渲染数据均可以存储在该云服务器的相应显存的显存地址中。进一步的,如图2所示,该云服务器20a可以基于图2所示的渲染游戏数据(即K个子渲染数据),生成图2所示的游戏合成画面,以便于后续可以将该游戏合成画面进行编码处理之后,返回给图2所示的游戏终端10a。
其中,如图2所示,该云服务器20a中可以运行多个云虚拟容器,每个云虚拟容器均为一个容器实例。其中,可以理解的是,每个容器实例中均可以运行与相应用户终端(例如,图2所示的游戏终端10a)中的客户端环境系统(例如,安卓系统)相匹配的远程移动游戏运行环境,比如,本申请实施例可以将在该云服务器20a中为每个用户终端所虚拟出的远程移动游戏运行环境统称为云游戏环境系统,例如,这里的云游戏环境系统可以为在该云服务器20a中为每个用户终端所虚拟出的远程的安卓系统,这样,任意一个云虚拟容器均可以用于为对应用户终端提供基础的安卓运行环境。
其中,可以理解的是,如图2所示的多个云虚拟容器具体可以为图2所示的云虚拟容器30a、云虚拟容器30b、…、云虚拟容器30n。其中,云虚拟容器30a可以为该云服务器20a预先为图2所示的游戏终端10a(例如,上述图1所对应实施例中的用户终端3000a)所配置的容器实例。同理,可以理解的是,云虚拟容器30b可以为该云服务器20a预先为其他游戏终端(例如,上述图1所对应实施例中的用户终端3000b)所配置的容器实例,以此类推,云虚拟容器30n可以为该云服务器预先为其他游戏终端(例如,上述图1所对应实施例中的用户终端3000n)所配置的容器实例。应当理解,本申请实施例中可以为通过上述游戏客户端(比如,云游戏X的客户端)接入该云服务器20a的每个用户终端配置一个云虚拟容器,这样,在这些用户终端与该云服务器20a之间进行数据交互时,可以在相应云虚拟容器中进行渲染处理。其中,云服务器20a在其他云虚拟容器(例如,图2所示的云虚拟容器30b、…、云虚拟容器30n)中进行渲染处理,得到游戏渲染数据的具体实现方式,可以一并参见在图2所示的云虚拟容器中进行渲染数据,得到游戏渲染数据的具体实现方式的描述,这里将不再一一进行赘述。
可以理解的是,在本申请实施例中该云服务器20a可以在确定出与该游戏终端10a的客户端环境系统相匹配的云虚拟容器(例如,图2所示的云虚拟容器30a)时,直接在该云虚拟容器30a中通过图形渲染数据库30b访问到上述图像渲染节点,以直接在该云虚拟容器30a中实现对相应游戏进程的内部渲染,即在对该游戏客户端中的相应游戏进程的游戏数据进行渲染的过程中,可以在该云虚拟容器30a中通过重构的系统图形栈,改变现有的图形渲染方式,以在该云虚拟容器30a中直接通过内部渲染技术实现渲染处理,从而可以有效地降低或者缩减渲染时延。另外,由于本申请无需对不同的渲染方式进行转换,进而可以在该云虚拟容器30a中增强游戏的兼容性。
其中,云服务器20a获取云虚拟容器、通过物理渲染器件进行渲染处理、以及生成游戏合成画面的具体过程可以参见如下图3至图10所对应的实施例。
进一步地,请参见图3,图3是本申请实施例提供的一种数据处理方法的流程示意图。如图3所示,该方法可以由计算机设备执行,该计算机设备可以运行有游戏终端,该游戏终端可以为上述图2所对应实施例中的游戏终端10a;该计算机设备还可以为该游戏客户端对应的后台服务器(在云游戏场景下,这里的后台服务器为云服务器),该云服务器可以为上述图2所对应实施例中的云服务器20a。换言之,本申请实施例所涉及的方法可以由游戏用户所对应的游戏终端执行,也可以由云服务器执行,还可以由游戏终端和云服务器共同执行。为便于理解,本实施例以该方法由云服务器(比如,上述图2所对应实施例中的云服务器20a)执行为例进行说明,以 阐述在云服务器中获取游戏进程对应的渲染游戏数据的具体过程。其中,该方法至少可以包括以下步骤S101-步骤S105:方法至少包括:
步骤S101,获取游戏客户端发送的云游戏数据获取请求;
具体的,当云服务器和运行有该游戏客户端的游戏终端之间建立数据连接关系时,该云服务器可以用于接收该游戏终端中所运行的游戏客户端所发送的云游戏数据获取请求。
为便于理解,进一步的,请参见图4,图4是本申请实施例提供的一种云服务器的场景示意图。如图4所示,该云服务器中可以运行有N个云虚拟容器,这里的N可以为正整数,比如,如图4所示,N个云虚拟容器具体可以为图4所示的容器1、容器2、容器3、…、容器N。如图4所示的终端A1、终端A2、终端A3、…、终端A4均可以与图4所示的云服务器之间建立数据连接关系。其中,终端A1可以为上述图1所对应实施例中的某个用户终端。例如,上述用户终端3000a。其中,终端A2可以为与该终端A1相关联的web终端。例如,某个游戏用户(例如,游戏用户A)可以通过同一账号信息访问图4所示的终端A1和终端A2,这样,该终端A1和终端A2后续均可以同步接收到该云服务器针对该游戏用户A所下发的同一音视频编码流。可以理解的是,这里将不对与该终端A1具有关联关系的其他终端的数量进行限定。
其中,如图4所示,当游戏用户在该终端A1中通过游戏账户信息(例如,游戏账户信息B1)启动游戏客户端(例如,云游戏A的客户端)时,该终端A1可以与该云服务器之间建立数据连接关系,以便于后续可以通过该建立的数据连接关系与云服务器进行数据交互。比如,如图4所示,当该游戏用户A在单位时长内针对该云游戏A的客户端中的某个业务控件执行触发操作时,该终端A1可以将在单位时长内所获取到的一个或者多个连续的触发操作统称为触摸事件流,比如,该触摸事件流可以为图4所示的触摸事件流1。如图4所示,此时,该终端A1可以将针对该业务控件的触摸事件流1添加到云游戏数据获取请求中,以将添加有该触摸事件流1的云游戏数据获取请求发送给云服务器,以使该云服务器可以通过图4所示的处理器60a在图4所示的容器1中执行相应的业务逻辑,进而可以在执行业务逻辑之后,在该容器1中通过图4所示的图形渲染器60b获取针对该容器1的容器内渲染技术,以利用该容器内渲染技术在该容器1中进行渲染处理,从而可以进一步对渲染处理后所得到的渲染游戏数据进行编码处理,以得到与该触摸事件流1相关联的音视频编码流,这里的音视频编码流可以为图4所示的音视频编码流1’。如图4所示,由于该游戏用户A还通过同一游戏账户信息(即前述游戏账户信息B1)访问图4所示的终端A2,所以,当该云服务器在该容器1中得到图4所示的音视频编码流1’时,可以将该音视频编码流1’同步下发给与该游戏用户A相关联的多个终端,例如,如图4所示的终端A1和终端A2。
其中,如图4所示,终端A3可以为PC终端,比如,该PC终端可以为上述图1所对应实施例中的用户终端3000n,如图4所示,该云服务器可以为该终端A3(例如,游戏用户B所使用的终端)配置图4所示的容器3,以在该容器3中得到与该游戏用户B的触摸事件流(例如,触发事件流2,未在图上示出)相关联的音视频编码流2’。同理,如图4所示,终端A4可以为其他终端(例如,平板终端),比如,该平板终端可以为上述图1所对应实施例中的用户终端3000b,如图4所示,该云服务器可以为该终端A4(例如,游戏用户C所使用的终端)配置图4所示的容器N,以在该容器N中得到与该游戏用户C的触摸事件流(例如,触发事件流3,未在图上示出)相关联的音视频编码流3’。
其中,可以理解的是,该游戏用户A可以为上述图2所对应实施例中的游戏用户,此时,这里的云游戏数据获取请求可以为上述图2所对应实施例中的游戏终端10a所发送的云游戏数据获取请求1。为便于理解,本申请实施例仍以该游戏客户端为上述游戏X对应的客户端(例如,客户端1)为例,此时,该云游戏数据获取请求可以是由该游戏客户端(即游戏X对应的客户端1)响应游戏用户(例如,上述图2所对应实施例中的游戏用户A)针对游戏显示页面中的业务控件执行触发操作时所生成的。
为便于理解,进一步的,请参见图5,图5是本申请实施例提供的一种发送云游戏数据获取请求的场景示意图。如图5所示,当游戏用户A在图5所示的游戏终端中启动上述客户端1时,可以得到图5所示的显示界面100a,该显示界面100a可以为该游戏客户端中的设置界面。其中,可以理解的是,本申请实施例可以将显示在该游戏客户端(即游戏X对应的客户端1)中的显示界面统称为游戏显示页面。比如,如图5所示,该显示界面100a中可以包括图5所示的业务 控件C1,该业务控件C1可以为设置控件,比如,该设置控件可以用于指示图5所示的服务器返回图5所示的虚拟显示界面100b,即该虚拟显示界面100b可以用于指示该游戏用户5对图5所示的虚拟对象所属的游戏属性(例如,部落名称)进行更改。
比如,具体的,如图5所示,游戏用户A可以在T1时刻针对该游戏显示界面(即图5所示的显示界面100a)中的业务控件C1执行触发操作,此时,该游戏终端可以响应针对该T1时刻的触发操作,将针对该业务控件C1执行的触发操作(例如,点击操作)统称为触摸事件流,并可以进一步生成携带该触摸事件流的云游戏数据获取请求。可以理解的是,如图5所示,该游戏客户端可以向与该游戏终端建立关联关系的云服务器(即图5所示的云服务器)发送前述云游戏数据获取请求,以使该云服务器可以针对该输入时间为T1时刻的触摸事件流进行响应。比如,如图5所示,该云服务器可以进一步执行下述步骤S102,即该云服务器可以基于该T1时刻的触摸事件流远程预测该游戏客户端在T1时刻的下一时刻(即T2时刻)的业务逻辑(这里预测到的业务逻辑主要用于在相应的云虚拟容器中修改该虚拟对象当前所属的游戏属性(即修改虚拟对象的当前所属的部落名称)的游戏属性行为)。
当游戏显示页面(例如,图5所示的显示界面100a)中包括与游戏用户相关联的虚拟对象,且该虚拟对象所在的游戏显示界面中包含用于在云服务器中控制该虚拟对象的游戏行为(例如,用于控制该虚拟对象在该游戏客户端的游戏地图中向左或者向右移动的游戏属性行为)的业务控件时,游戏用户通过触发这类业务控件之后,该云服务器可以进一步响应针对这类业务控件的业务逻辑,以在游戏客户端对应的云游戏环境系统中操控虚拟对象的游戏属性行为。
步骤S102,在游戏客户端对应的云虚拟容器中,根据云游戏数据获取请求启动游戏进程;
在一种具体的实施方式中,云虚拟容器可以与游戏客户端所在的客户端环境系统对应。具体的,云服务器可以基于当前游戏客户端所在的客户端环境系统(例如,安卓系统),确定与客户端环境系统相匹配的云游戏环境系统(例如,虚拟化出的远程安卓系统)对应的云虚拟容器;进一步的,云服务器可以从云游戏数据获取请求中提取业务控件所指示的虚拟对象的属性行为事件,并可以确定与属性行为事件相关联的进程启动指令;进一步的,云服务器可以将进程启动指令输入云虚拟容器,在云虚拟容器中控制虚拟对象执行游戏属性行为,且启动与游戏属性行为相关联的K个关联进程;K为正整数;进一步的,云服务器可以将K个关联进程中的每个关联进程统称为与业务控件相关联的游戏进程。
其中,这里的属性行为事件可以包含上述用于在云端更改虚拟对象的游戏属性的触摸事件流,以及上述用于在云端控制虚拟对象中的游戏行为的另一触摸事件流。可以理解的是,在该游戏客户端为竞技类的游戏客户端时,这里的游戏属性可以包含但不限于通过组团的方式参与竞技的团队的名称。比如,以该游戏客户端为大型云游戏部落冲突为例,游戏用户(例如,上述图4所示的游戏用户A)通过在上述显示界面100a(即该设置控件C1所在的设置界面)上触发上述业务控件C1(即设置控件)之后,可以进一步使得该云服务器能够在云端提取到该业务控件C1所指示的用于更改前述虚拟对象的部落名称的属性行为事件(例如,上述触摸事件流1),进而可以确定与该属性行为事件相关联的进程启动指令。
该游戏显示界面中还可以包含用于在云端控制该虚拟对象的游戏行为的业务控件,例如,上述图2所示的业务控件10b,此时,该业务控件10b可以为用于指示云服务器在云端控制该游戏显示界面中虚拟对象向右移动的控件。所以,当上述游戏用户A针对该触发上述业务控件10b(即向右移动控件)之后,可以进一步使得该云服务器能够在云端提取到该业务控件10b所指示的用于控制前述虚拟对象的游戏行为的属性行为事件(例如,新的触摸事件流1),进而可以确定与该属性行为事件(例如,新的触摸事件流1)相关联的另一进程启动指令。
进一步的,可以理解的是,云服务器在获取到进程启动指令之后,可以进一步将进程启动指令输入该游戏客户端的客户端环境系统所对应的云虚拟容器,例如,上述图5所示的容器1,进而可以在云虚拟容器(例如,容器1)中控制虚拟对象执行游戏属性行为所对应的业务逻辑,进而可以在执行完业务逻辑时启动与游戏属性行为相关联的一个或者多个关联进程,可以理解的是,本申请实施例可以将在该云虚拟容器(例如,容器1)中所启动的一个或者多个关联进程统称为与上述业务控件相关联的游戏进程,进而可以进一步执行下述步骤S103。
其中,可以理解的是,通过在同一云服务器中运行不同的云虚拟容器,可以在云端的大型云游戏场景下直接以高帧率(例如,30帧每秒)运行,这样,当在单位时间内有大量用户终端 (也可以称之为大量游戏终端)并发接入该云服务器时,可以为接入该云服务器的每个用户终端配置不同的云虚拟容器,以便于后续可以在预先配置的不同的云虚拟容器中进行容器内的渲染处理,能够解决现有技术中在云虚拟容器外采用单一的渲染进程进行渲染所造成的稳定性较差的问题,这意味着通过在不同云虚拟容器中进行内部的容器渲染处理,可以有效地提升高帧率渲染下的整个操作系统(例如,上述安卓系统)的稳定性。
为便于理解,进一步的,请参见图6a,图6a是本申请实施例提供的一种在云服务器上运行多个安卓运行环境的场景示意图。如图6a所示的云服务器的操作系统可以为开源的OS操作系统,例如,Linux系统。如图6a所示,在云游戏场景下,该云服务器可以以容器的方式运行虚拟化出的多个云游戏环境系统,即一个容器中可以运行一个云游戏环境系统,这里的云游戏环境系统可以为针对上述图4所示的相应终端中的客户端环境系统所虚拟化出的远程游戏运行环境。此外,可以理解的是,在图6a所示云服务器中,每个集装箱即为一个云虚拟容器,这里的集装箱1可以为上述图4所对应实施例中的容器1,同理,这里的集装箱2可以为上述图4所对应实施例中的容器2,以此类推,这里的集装箱N可以为上述图4所对应实施例中的容器N。基于此,可以理解的是,在图6a所示的多个容器(即多个集装箱,例如,彼此相互独立的上述容器1、容器2、容器3、…、容器N)之间可以共享同一物理服务器上的资源,比如,会共享同一份系统内核,例如,Linux内核。
其中,可以理解的是,如图6a的系统内核(Kernel)是图6a所示的操作系统最基本的部分,通过该系统内核可以用来管理软件发出的数据I/O要求的计算机程序,并将这些要求转译为数据处理的指令并交由该云服务器的中央处理器(CPU,例如,上述图4所示的处理器60a)及该云服务器中其他电子组件进行处理。
其中,可以理解的是,这里的系统内核通常指的是一个用于提供硬件抽象层、磁盘及文件系统控制、多任务等功能的系统软件。在图6a所示的操作系统中,该系统内核主要负责管理云服务器中的系统的进程、内存、设备驱动程序、文件和网络系统等,并决定着系统的性能和稳定性。通过该系统内核可以为图6a所示的云服务器中的应用软件和硬件提供一套简洁,统一的接口,使程序设计更为简单。
其中,进程管理是指系统内核可以用于负责创建和销毁进程,并处理它们与外部世界的联系(输入和输出),可以理解的是,不同进程间通讯(通过信号,管道,或者进程间通讯原语)也由该系统内核处理。
其中,内存管理是指本申请实施例可以将该云服务器中的内存统称为一种可用资源,该系统内核能够为在该云服务器中的所有进程中的每一个进程,在有限的可用资源上建立了一个虚拟地址空间。比如,在该云游戏场景的渲染业务下,可以为在相应容器中的游戏进程所配置物理渲染器件中,申请一个显存,一个显存可以对应一个显存地址,这里的显存地址可以用于指向帧缓冲组件中一个帧缓冲区,这样,该云服务器可以在获取到相应游戏进程的帧缓存区时,快速执行下述步骤S103。
其中,文件管理是指Linux系统在很大程度上都基于文件系统的概念,此时,该系统内核可以在非结构化的硬件之上建立一个结构化的文件系统,即图6a所示的相应容器中的系统库,系统库中的文件可以非常多地在整个系统中应用。另外,Linux支持多个文件系统类型,就是说,物理介质上不同的数据组织方式之间,可以在相应云虚拟容器中被格式化成标准Linux的文件系统,比如,普遍使用的FAT文件系统等。
其中,可以理解的是,如图1的多个集装箱均属于同一份安卓镜像(例如,上述应用客户端的安装包)在相应游戏客户端中运行时的容器,应当理解,在如图6a所示的系统中,底层安卓的特有驱动(例如,匿名共享内容驱动)和Binder进程通信分别通过命名空间(即namespace)进行隔离。比如,如图6a所示的匿名共享内存1、匿名共享内存2、…、匿名共享内存N分别通过命名空间(即namespace)进行隔离。同理,如图6a所示的通信进程1、通信进程2、…、通信进程N也分别通过命名空间(即namespace)进行隔离。
其中,为便于理解,进一步的,请参见图6b,图6b是本申请实施例提供的一种在容器内调用图形渲染库的场景示意图。如图6b所示的容器可以为上述图6a所示的云服务器中的任意一个集装箱,为便于理解,本申请实施例以该容器为上述云服务器中所运行的集装箱1为例,以阐述该集装箱1(即上述容器1)中调用图形渲染库的具体过程。其中,图6b所示的容器中运 行的游戏客户端可以为图6b所示的安卓应用程序,该安卓应用程序的运行环境可以为图6b所示的运行环境1和/或运行环境2。
其中,如图6b所示的进程管理服务具体可以包含图6b所示的服务1、服务2、服务3、服务4、服务5等。其中,服务1可以为窗口管理服务,即一个游戏进程可以提供一个窗口。其中,服务2可以为图形合成服务,即可以在同一云虚拟容器中,对不同显存中所存储的渲染游戏数据进行合成处理,以推送到屏幕内核所对应的帧缓冲区中进行模拟输出。服务3可以为游戏客户端(即图6b所示的安卓应用程序)的安装包(这里可以为安卓安装包,也可以称之为安卓镜像)对应的安装服务。可以理解的是,当安卓镜像开始安装在游戏终端中时,可以在该游戏终端中变成安卓实例,即可以在游戏终端中运行该安卓镜像对应的安卓应用程序。其中,服务4可以为在相应云虚拟容器中的渲染服务。服务5可以为销毁进程服务。其中,容器中的运行环境1可以为安卓应用程序所在的云游戏环境系统所使用的编程语言(例如,Java语言)对应的运行环境,同理,容器中的运行环境2可以为安卓应用程序所在的云游戏环境系统所使用的另一编程语言(C语言)的运行环境。其中,图6b所示的系统库可以用于提供不同的系统文件,例如,在该容器对应的渲染业务下,该系统库可以包含但不限于图6b所示的图形渲染库,且如图6b所示,该图形渲染库中可以包含具有指令封装功能的封装组件,基于此,该云服务器在与某个游戏终端进行数据交互时,可以进一步执行下述步骤S103,以通过图6b所示的图像渲染库快速访问到图6b所示的封装组件,进而可以在该容器中快速访问到图形渲染驱动,以在该容器内进行渲染处理。
步骤S103,在获取到为游戏进程所分配的帧缓冲区时,在云虚拟容器中调用图形渲染库得到图形渲染指令;
具体的,在云虚拟容器中通过游戏进程与图形渲染库之间的桥接通道,调用图形渲染库得到与客户端环境系统具有远程映射关系的图形渲染指令。云服务器可以在执行步骤S103之前,通过游戏进程向帧缓冲组件发送帧缓冲区申请指令;帧缓冲区申请指令用于指示帧缓冲组件向缓冲分配器发送缓冲分配指令;进一步的,云服务器可以在缓冲分配器基于缓冲分配指令为游戏进程分配帧缓冲区时,通过与缓冲分配器具有关联关系的图形渲染节点,调用图形渲染驱动,以在与图形渲染驱动具有层级关系的物理渲染器件中分配帧缓冲区对应的显存;进一步的,云服务器可以将显示对应的显存地址返回给游戏进程;显存地址用于指向游戏进程对应的帧缓冲区。可以理解的是,当该云服务器获取到为游戏进程所分配的帧缓冲区时,可以进一步获取游戏进程与图形渲染库之间的关联关系;进一步的,云服务器可以基于关联关系在云虚拟容器中确定游戏进程与图形渲染库之间的桥接通道;进一步的,云服务器可以通过桥接通道调用图形渲染库,从图形渲染库中获取与客户端环境系统具有远程映射关系的图形渲染指令,以便于后续可以进一步执行下述步骤S103。
为便于理解,进一步的,请参见图7,图7是本申请实施例提供的一种在云虚拟容器中为游戏进程分配的帧缓冲区的场景示意图。为便于理解,本申请实施例以在该云虚拟容器中启动的游戏进程的数量为一个为例,如图7所示,该游戏进程可以为图7所示的游戏进程70a,以阐述在云虚拟容器中为该游戏进程70a分配一个帧缓存区的具体过程。
其中,可以理解的是,如图7所示的云虚拟容器可以为上述图6a所对应实施例中的某个集装箱,例如,上述图6a所对应实施例中的集装箱1。如图7所示,该云虚拟容器中可以包含已重构的系统图形栈,这里的系统图形栈可以用于指示该云服务器在图7所示的云虚拟容器中直接访问具有图形渲染功能的物理渲染器件(例如,图7所示的物理渲染器件70f),进而可以在图7所示的云虚拟容器中实现容器内的图形渲染;其中,可以理解的是,该云虚拟容器中的系统图形栈具体可以包括:图7所示的游戏进程70a、帧缓冲组件70b、缓冲分配器70c、图形渲染节点70d、图形渲染驱动70e和物理渲染器件70f、图形渲染库70g和图形合成器70h。
其中,可以理解的是,本申请实施例所提供的容器内的图形渲染方案(即上述内部图形渲染技术),具体涉及在图7所示的云虚拟容器中将云游戏环境系统(即远程安卓系统)内部的游戏进程70a的图形渲染接口(API,Application Programming Interface)桥接到图7所示的图形渲染库(该图形渲染库可以为上述Mesa图形库),这意味着本申请实施例通过利用该Mesa图形库以及该Mesa图形库中的封装组件(比如,具有指令封装功能的libdrm组件),可以进一步将上述图形渲染指令所指示的图形渲染操作下发给图7所示的图形渲染驱动70e(即一种内核态 的GPU图形驱动),进而可以快速访问到与图形渲染驱动70e具有层级关系的物理渲染器件70f,以最终在具体的物理硬件上完成图形渲染。
其中,如图7所示,该图形渲染库70g可以与图7所示的游戏进程之间存在关联关系,这样,当云服务器在该云虚拟容器中获取到为图7所示的游戏进程所分配的帧缓冲区时,可以在云虚拟容器中通过该游戏进程70a与图形渲染库70g之间的关联关系,进而可以通过关联关系在云虚拟容器中确定该游戏进程70a与图形渲染库70g之间的桥接通道(例如,在该云虚拟容器中所调用的安卓系统内部的用于指示进行图形渲染的图形渲染接口),从而可以通过该桥接通道调用图形渲染库,从图形渲染库中获取与客户端环境系统具有远程映射关系的图形渲染指令,以便于后续可以继续执行下述步骤S104。
其中,可以理解的是,本申请实施例在执行上述内部图形渲染技术之前,还可以在图7所示的云虚拟容器中,为图7所示的游戏进程70a预先分配一个帧缓冲区。其中,该云服务器为该游戏进程70a分配帧缓冲区的具体实现方式可以描述为:
1)当游戏用户启动云游戏(例如,上述云游戏X)时,该游戏用户所使用的游戏终端中的游戏客户端可以与该云服务器建立连接。
比如,可以理解的是,该云服务器可以与该游戏客户端之间建立数据连接关系,这样,当游戏用户在游戏终端中针对该游戏客户端中的业务控件执行触发操作时,该游戏终端中的游戏客户端可以获取到针对该业务控件的触摸事件流,进而可以基于该数据连接关系将携带该触摸事件流的云游戏数据获取请求发送给云服务器。应当理解,当游戏用户启动云游戏(例如,上述云游戏X)时,该云服务器会预先为该游戏客户端分配一个云虚拟容器(比如,图7所示的云虚拟容器)。
2)此时,该云服务器可以向图7所示的云虚拟容器下发用于启动某个游戏进程(例如,图7所示的游戏进程70a)的指令。
比如,云服务器可以基于游戏客户端所在的客户端环境系统(例如,安卓系统),确定与该客户端环境系统相匹配的云游戏环境系统对应的云虚拟容器,以从云游戏数据获取请求中提取业务控件所指示的虚拟对象的属性行为事件,进而可以确定与属性行为事件相关联的进程启动指令,从而可以将用于启动某个游戏进程(例如,图7所示的游戏进程70a)的指令(即进程启动指令)写入该云虚拟容器。
3)此时,云虚拟容器(即用于运行云游戏环境系统的容器)可以基于该进程启动指令启动游戏进程(例如,图7所示的游戏进程70a)。
可以理解的是,本申请实施例在启动该游戏进程70a之前,还可以基于获取到的触摸事件流的输入时间(即一个触摸操作对应一个触摸时间戳),在该云虚拟容器中控制虚拟对象执行游戏属性行为,比如,本申请实施例可以更改该虚拟对象的游戏属性执行游戏属性行为,例如,可以将该虚拟对象当前所属的部落名称1更改为部落名称2,以便于后续可以在云游戏场景下,呈现出用于指示更改游戏属性的视觉显示界面。本申请实施例可以在云端的游戏地图中控制该虚拟对象向某个方向移动的游戏属性行为,例如,可以在游戏地图中控制该虚拟对象相对于触摸时间戳时的游戏位置向右移动相应距离,以便于后续可以在云游戏场景下渲染出向右移动后的视觉显示界面。
4)游戏进程(例如,游戏进程70a)向帧缓冲组件申请一个帧缓冲区;
例如,该帧缓冲组件可以为图7所示的帧缓冲组件70b,该帧缓冲组件70b所提供的服务可以为上述图6a所示的进程管理服务中的服务1,比如,这里的服务1可以为一种用于提供窗口管理服务的SurfaceFlinger服务。如图7所示,该云服务器可以通过游戏进程70a向图7所示的帧缓冲组件70b发送帧缓冲区申请指令;这里的帧缓冲区申请指令可以用于指示帧缓冲组件70b进一步向缓冲分配器70c发送缓冲分配指令。
5)帧缓冲组件可以进一步向缓冲分配器申请一块帧缓冲区;
其中,这里的缓冲分配器可以为图7所示的缓冲分配器70c。
6)缓冲分配器可以通过图形渲染节点调用到图形渲染驱动,进而可以通过该图形渲染驱动在物理渲染启动中分配一块显存,从而可以将该显存对应的显存地址返回给上层,这里的上层是指在该云虚拟容器中的游戏进程;
其中,可以理解的是,在云虚拟容器中,该缓冲分配器(即图7所示的缓冲分配器70c)在 基于4)中的缓冲分配指令为游戏进程70a分配帧缓冲区时,可以通过与缓冲分配器70c具有关联关系的图形渲染节点70d,调用图形渲染驱动70e,以在与图形渲染驱动70e具有层级关系的物理渲染器件中分配相应帧缓冲区所对应的显存,这里的显存可以为图7所示的物理渲染器件70f中的显存。
7)游戏进程(例如,游戏进程70a)在基于显存地址确定出帧缓冲区之后,可以开始调用图形渲染库(例如,Mesa图形库)进行渲染调用;
8)此时,图形渲染库(例如,Mesa图形库)可以将图形渲染指令进行标准化处理之后,通过图形渲染节点(例如,图7所示的图像渲染节点70d)将该标准化处理后的图形渲染指令下发给内核GPU驱动(即图7所示的图形渲染驱动70e),进而可以基于图形渲染驱动与图形渲染器件之间的层级关系,直接访问到图7所示的物理渲染器件70f(这里指的是硬件上的物理GPU)。
9)在物理GPU(例如,物理渲染器件70f)上进行渲染;
10)图形合成器(例如,图7所示的图形合成器70h)可以进一步将所有的显存(即每个游戏进程对应的显存中的渲染游戏数据)进行合成处理。
此外,可以理解的是,本申请实施例还可以利用该图形合成器所提供的窗口管理服务,将合成处理后的渲染游戏数据一并推送到FrameBuffer(即屏幕内核对应的帧缓冲)中。
步骤S104,基于图形渲染指令访问与帧缓冲区相关联的物理渲染器件,通过物理渲染器件对游戏进程对应的游戏数据进行容器内的渲染处理,得到游戏进程对应的渲染游戏数据;
具体的,可以理解的是,云服务器在执行完上述步骤S103之后,可以得到与客户端环境系统具有远程映射关系的图形渲染指令;进一步的,该云服务器可以通过图形渲染库(例如,上述图7的图形渲染库70g)中的封装组件对步骤S103所得到的图形渲染指令进行标准化处理,以将标准化处理后的图形渲染指令通过图形渲染节点(例如,上述图7所对应实施例中的图形渲染节点70d)传输给图形渲染驱动(例如,上述图7所对应实施例中的图形渲染驱动70e);进一步的,云服务器可以基于图形渲染驱动(例如,上述图7所对应实施例中的图形渲染驱动70e)与图形渲染器件(例如,上述图7所对应实施例中的物理渲染器件70f)之间的层级关系,访问与帧缓冲区相关联的物理渲染器件(例如,上述图7所对应实施例中的物理渲染器件70f);进一步的,云服务器可以通过物理渲染器件的图形渲染功能对游戏进程对应的游戏数据进行容器内的渲染处理,以将渲染处理后的游戏数据作为游戏进程对应的渲染游戏数据。
由此可见,在本申请实施例中,该云服务器可以重构整个系统图形栈,可以直接在云虚拟容器中利用图形渲染库访问到与帧缓冲区相关联的物理渲染器件,进而可以通过物理渲染器件对游戏进程(例如,上述图7所示的游戏进程70a)对应的游戏数据进行容器内的渲染处理,以得到游戏进程对应的渲染游戏数据。
应当理解,当在上述云虚拟容器中所启动的游戏进程的数量为多个时,在该云虚拟容器中为每个游戏进程分配帧缓冲区的具体实现方式,可以一并参见为上述图7所示的游戏进程70a分配帧缓冲区的具体过程的描述,这里将不再继续进行赘述。
步骤S105,根据渲染游戏数据生成游戏合成画面。
具体的,游戏合成画面用于在游戏客户端进行显示。云服务器可以在该云虚拟容器中启动的游戏进程的数量为多个时,将每个游戏进程称之为上述关联进程,这意味着这里的游戏进程具体可以包括与业务控件相关联的K个关联进程,这里的K为正整数;可以理解的是,此时,本申请实施例所涉及的物理渲染器件中具体包含与K个关联进程分别对应的K个显存;所以,当云服务器执行完上述步骤S104之后,渲染游戏数据中具体可以包含对K个关联进程的游戏数据进行渲染处理后的K个子渲染数据;一个显存用于存储一个关联进程对应的一个子渲染数据。此时,云服务器可以将K个显存中所存储的子渲染数据输出至对应显存的显存地址所映射的帧缓冲区,以在每个帧缓冲区中输出K个子渲染数据对应的数据界面,这里的一个数据界面即为一个关联进程对应的窗口;进一步的,云服务器可以通过云虚拟容器中的图形合成器,对K个子渲染数据对应的数据界面(即多个窗口)进行合成处理,从而可以基于合成处理后的K个子渲染数据的数据界面,生成用于在游戏客户端进行显示的游戏合成画面。
为便于理解,本申请实施例以该游戏合成界面为上述图5所对应实施例中的渲染合成界面100c为例,即该渲染合成界面100c是由多个进程分别对应的窗口进行叠加处理后所得到的。比 如,上述渲染合成界面100c中可以包含文本输入区(即上述图5所示的用于更改部落名称的可操作区域)对应的窗口,还可以包含文本确定区(即上述图5所示的“完成”控件所在的可操作区域)对应的窗口,以及提示文本信息区(即上述图5所示的“用户名太短!”的提示文本信息所在的区域)所对应的窗口等。这里将不对上述渲染合成界面100c所涉及的窗口进行一一列举。
在本申请实施例中,该计算机设备通过重构整个云虚拟容器中的系统图形栈(比如,在游戏进程与图形渲染库之间建立了桥接通道),使得整个游戏进程对应的游戏数据可以在该云虚拟容器中进行内部渲染,即此时该计算机设备可以在该云虚拟容器中直接访问到物理渲染器(例如,物理GPU),进而可以在游戏数据的渲染场景下降低游戏的渲染时延。此外,当该计算机设备在云虚拟容器中进行内部渲染时,由于无需在不同渲染方式之间的转换,从而可以增强游戏的兼容性,所以,当该计算机设备根据渲染游戏数据生成用于在游戏客户端进行显示的游戏合成画面时,可以在该云虚拟容器中以较高的帧率运行该云游戏,以增强系统的稳定性。
进一步地,请参见图8,图8是本申请实施例提供的一种数据处理方法的流程示意图。如图8所示,该方法可以由计算机设备执行,该计算机设备可以为运行有上述游戏客户端的游戏终端,该游戏终端可以为上述图2所对应实施例中的游戏终端10a;该计算机设备还可以为该游戏客户端对应的后台服务器,该后台服务器可以为上述图2所对应实施例中的云服务器20a。换言之,本申请实施例所涉及的方法可以由游戏用户所对应的游戏终端执行,也可以由云服务器执行,还可以由游戏终端和云服务器共同执行。为便于理解,本实施例以该方法由游戏终端和云服务器共同执行为例进行说明,方法可以包括:
步骤S201,云服务器在获取到游戏客户端发送的远程连接请求时,基于远程连接请求对游戏客户端对应的游戏客户进行远程鉴权,得到远程鉴权结果;
其中,远程连接请求为游戏用户通过游戏账号信息访问游戏客户端时所得到的;远程连接请求中携带游戏客户端所在的客户端环境系统;这意味着该远程连接请求可以为游戏用户启动游戏客户端时所生成的。可以理解的是,云服务器在获取到某个游戏终端(例如,上述图4所对应实施例中的终端A1)发送的远程连接请求时,可以提取该远程连接请求中所携带的游戏用户的游戏账号信息(例如,手机号码、社交账号等个人属性信息),以通过该游戏账号信息对该游戏用户进行鉴权处理,以在鉴权成功的情况下,继续执行下述步骤S202,反之,则会在鉴权失败的情况下,拒绝该游戏用户本次发起的远程连接请求。基于此,本申请实施例通过对该游戏用户的身份进行鉴权,可以实现对该游戏用户访问该游戏客户端的访问控制,进而可以确保访问的安全性。此外,可以理解的是,在鉴权成功的情况下,本申请实施例还可以记录该游戏用户通过同一游戏账号信息接入该云服务器的不同终端设备的数量,以在接入的终端设备的数量不超过数量阈值的情况下,将在容器内渲染所得到的渲染游戏数据所对应的游戏合成画面,同步下发到该游戏用户相关联的多个终端。例如,上述图4所对应实施例中终端A1和终端A2可以接收到云服务器所同步下发的游戏合成画面。基于此,云服务器通过为与同一用户相关联的多个终端配置同一云虚拟容器,可以在并发接入大量的不同用户的终端的情况下,自主实现云虚拟容器的配置,进而可以避免计算资源的浪费。
步骤S202,若云服务器确定远程鉴权结果指示游戏用户具有远程访问游戏客户端的权限,则与游戏客户端建立数据连接关系;
步骤S203,云服务器在基于数据连接关系为游戏客户端配置好云虚拟容器时,通过云虚拟容器中的云游戏启动指令,启动并运行游戏客户端;
具体的,云服务器可以基于数据连接关系为游戏客户端配置云虚拟容器,在云虚拟容器中虚拟出与客户端环境系统相匹配的云游戏环境系统;进一步的,云服务器可以根据与云虚拟容器相关联的云游戏启动指令,在云游戏环境系统中启动并运行游戏客户端,将游戏客户端对应的游戏显示页面输出至游戏用户对应的游戏终端。
其中,步骤S201-步骤S203的具体实现方式,可以参见上述图4所对应实施例中对云服务器中的容器1的描述,这里将不再继续进行赘述。应当理解,本申请实施例通过在云虚拟容器中虚拟出与客户端环境系统相匹配的云游戏环境系统,可以在云端为当前游戏用户提供一种用于运行云游戏的超级运行环境,进而可以充分利用该云服务器的云计算功能,以便于后续可以在云虚拟容器中提高对该云游戏的相应业务逻辑(例如,用于在云端控制虚拟对象的游戏行为的业务逻辑等)进行处理时的处理效率。
步骤S204,游戏终端响应针对游戏客户端的触发操作,向云服务器发送云游戏数据获取请求;
步骤S205,云服务器在游戏客户端所在的客户端环境系统对应的云虚拟容器中,根据云游戏数据获取请求启动游戏进程;
步骤S206,云服务器在获取到为游戏进程所分配的帧缓冲区时,在云虚拟容器中通过游戏进程与图形渲染库之间的桥接通道,调用图形渲染库得到与客户端环境系统具有远程映射关系的图形渲染指令;
其中,云虚拟容器中可以包含已重构的系统图形栈;系统图形栈可以用于指示在云虚拟容器中直接访问具有图形渲染功能的物理渲染器件;系统图形栈包括:游戏进程、帧缓冲组件、缓冲分配器、图形渲染节点、图形渲染驱动和物理渲染器件;所以,可以理解的是,该云服务器在执行步骤S207之前,还可以在云虚拟容器中为游戏进程分配相应的帧缓冲区。比如,云服务器可以通过游戏进程向帧缓冲组件发送帧缓冲区申请指令;帧缓冲区申请指令可以用于指示帧缓冲组件向缓冲分配器发送缓冲分配指令;进一步的,云服务器可以在缓冲分配器基于缓冲分配指令为游戏进程分配帧缓冲区时,通过与缓冲分配器具有关联关系的图形渲染节点,调用图形渲染驱动,以在与图形渲染驱动具有层级关系的物理渲染器件中分配帧缓冲区对应的显存;进一步的,云服务器可以将显示对应的显存地址返回给游戏进程;其中,显存地址可以用于指向游戏进程对应的帧缓冲区。
步骤S207,云服务器基于图形渲染指令访问与帧缓冲区相关联的物理渲染器件,通过物理渲染器件对游戏进程对应的游戏数据进行容器内的渲染处理,得到游戏进程对应的渲染游戏数据;
步骤S208,云服务器根据渲染游戏数据生成用于在游戏客户端进行显示的游戏合成画面;
可以理解的是,当云服务器在云端得到该游戏合成画面时,可以在云端对该游戏合成画面进行编码处理(例如,可以通过音视频编码技术,例如,h264/h265技术在云端对该游戏合成画面进行编码处理),以将编码处理后的码流下发给游戏终端。这样,即使在该游戏用户当前所使用的游戏终端中不具备高端处理器和显卡的情况下,也可以通过该游戏终端中所具备的音视频解码能力,快速在游戏终端中输出相应的视频数据(例如,游戏合成画面)和音频数据,以提升本地终端的界面展示效果。
其中,步骤S204-步骤S208的具体实现方式,可以一并参见上述图3所对应实施例中对步骤S101-步骤S105的描述,这里将不再继续进行赘述。
步骤S209,游戏终端接收云服务器根据渲染游戏数据所生成的游戏合成画面,在游戏客户端中显示游戏合成画面。
可以理解的是,当游戏终端接收到云服务器所下发的编码处理后的码流之后,可以进一步在本地终端中利用音视频解码技术对该编码处理后的码流进行解码处理,以解码得到该游戏合成画面,进而可以在该游戏客户端中将该游戏合成画面输出展示给游戏用户。
可以理解的是,在本申请实施例中,该云服务器可以用于接收一个或者多个游戏用户发送的触摸事件流。为便于理解,进一步的,请参见图9,图9是本申请实施例提供的一种获取多个触摸事件流的场景示意图。如图9所示的多个游戏终端具体可以包含图9所示的游戏终端1、游戏终端2和游戏终端3。这三个游戏终端对应的触摸事件流可以分别为上述图9所对应实施例中的触摸事件流1、触摸事件流2和触摸事件流3。
其中,图9给出了在云游戏的虚拟场景下的竞技类游戏(例如,MOBA游戏)的二维地图,该二维地图可以为图9所示的游戏地图。在这种MOBA游戏中虚拟对象可以大致被划分为两个竞技阵营,例如,第一阵营和第二阵营。如图9所示,这里的每个阵营中可以分别有H(例如,3)个虚拟对象,一共2*H(例如,6)个虚拟对象共同进行一场MOBA游戏对局。其中,第一阵营中的虚拟对象可以包含图9所示的位于该游戏地图中的虚拟对象1、虚拟对象2和虚拟对象3。同理,在该游戏地图中,第二阵营中的3个虚拟对象(未在图9示出)可以具体可以包含虚拟对象4、虚拟对象5和虚拟对象6。
其中,如图9所示,该虚拟场景下的游戏地图可以呈正方形,且该游戏地图可以被分为以下几个部分,在正方形的一个对角线的两端分别有这两个阵营的基地(水晶),即第一阵营方的基地1001和第二阵营方的基地1002;在该游戏地图中存在连接第一阵营方的基地1001和第二 阵营方的基地1002的三条进攻路线,分别是:上路1003、中路1004、下路1005;公共区域:河道1006,以及野区1007。
可以理解的是,在云游戏场景下,这两个阵营中的虚拟对象分别出生在各自的基地位置,同一阵营的三个虚拟对象分别沿三个进攻方向,向敌方发起进攻,以在摧毁对方阵营的基地时获得本局游戏的胜利。其中,第一阵营中的3个虚拟对象出生在图9所示的基地1001,第二阵营中的3个虚拟对象出生在图9所示的基地1002,并且两个阵营的虚拟对象均以我方基地位于观察视角的左下角的视角观察虚拟场景。即第一阵营中的虚拟对象可以以第一视角1008观察该游戏地图中的虚拟场景,第二阵营中的虚拟对象可以以第二视角1009观察该游戏地图中的虚拟场景,并且每个虚拟对象均可以针对各自的视角从某个进攻方向(上路、中路和下路)发起进攻。比如,如图9所示的游戏用户B可以在游戏时长为T时长时,以第一视角1008看到该游戏终端2所呈现的游戏显示界面200a。
可以理解的是,如图9所示,在游戏时长为T时长时,游戏用户B所控制的虚拟对象1与其他游戏用户(例如,游戏用户C)所控制的虚拟对象(例如,图9所示的虚拟对象2)在同一进攻区域(例如,均位于该游戏地图的下路1005和河道1006的交汇处),此时,控制该虚拟对象1的游戏用户B可以在图9所示的游戏显示界面200a中,看到图9所示的虚拟对象2(即游戏用户C所控制的虚拟对象)。可以理解的是,由于另一游戏用户(例如,游戏用户D)所控制的虚拟对象所处的进攻区域不同于虚拟对象1所处的进攻区域,所以,该游戏用户B暂时无法在该游戏显示界面200a中看到该游戏用户D所控制的虚拟对象3。但是,游戏用户D可以在自己的游戏显示界面中展示自己所控制的虚拟对象3。
应当理解,如图9所示,当游戏用户B在该游戏显示界面200a针对业务控件(例如,图9所示的操作1对应的控件)执行触发操作时,可以向与该游戏终端2具有数据连接关系的云服务器发送图9所示的触摸事件流,进而可以在该云服务器的容器2中触发回城事件对应的游戏进程,以在该容器2中针对该回城事件针对该游戏事件对应的游戏数据实现容器内的渲染处理,进而可以在渲染处理后,生成与该虚拟对象1的回城事件相关联的包含回城动画特效的游戏合成画面,进而可以在图9所示的容器2对生成的游戏合成画面进行编码处理,以得到图9所示的音视频编码流2’。这样,当游戏终端2对该音视频编码流进行解码处理之后,可以在该游戏终端2中显示前述包含回城动画特效的游戏合成画面。
可以理解的是,本申请实施例在执行完上述步骤S209之后,还可以在该云服务器中模拟输出多个游戏用户的游戏合成界面。为便于理解,进一步的,请参见图10,图10是本申请实施例提供的一种在云端模拟输出渲染显示界面的场景示意图。如图10所示的渲染显示界面具体可以包含上述图9所示的游戏用户B、游戏用户C和游戏用户D分别对应的游戏合成画面。比如,游戏用户B对应的游戏合成画面可以为图10所示的模拟输出界面300a,该模拟输出界面300a可以为包含图10所示的虚拟对象1的回城动画特效的游戏合成画面,应当理解,在云端的容器2中进行渲染时,该模拟输出界面300a是由上述图9所示的游戏终端2的屏幕参数信息(例如,游戏终端2的分辨率,例如,1280×720)所确定的。又比如,游戏用户C对应的游戏合成画面可以为图10所示的模拟输出界面300b,该模拟输出界面300b可以为包含图10所示的虚拟对象2发送技能特效的游戏合成画面,应当理解,在云端的容器1中进行渲染时,该模拟输出界面300b可以是由上述图9所示的游戏终端1的屏幕参数信息(例如,游戏终端1的分辨率,例如,1280×720)所确定的。以此类推,又比如,游戏用户D对应的游戏合成画面可以为图10所示的模拟输出界面300c,该模拟输出界面300c可以为包含图10所示的虚拟对象3发送技能特效的游戏合成画面,应当理解,在云端的容器3中进行渲染时,该模拟输出界面300c可以是由上述图9所示的游戏终端3的屏幕参数信息(例如,游戏终端3的分辨率,例如,1280×720)所确定的。
可以理解的是,在本申请实施例中,Android容器(例如,上述图9所示的容器1、容器2和容器3)作为底层的环境,可以为相应的游戏终端提供远程的游戏运行环境(即可以为相应的游戏终端提供云游戏环境系统,该云游戏环境系统可以为远程的安卓系统)。这样,对于并发运行有多个容器的云服务器而言,通过在相应容器中重构整个图形栈,例如,通过将安卓系统内部的图形渲染接口桥接到Mesa图形库(即上述图形渲染库)之后,可以通过该Mesa图形库定位到具有指令封装功能的封装组件(例如,上述libdrm组件),以通过该封装组件进一步将标准 化后的图形渲染指令所指示的图形渲染操作下发给图形渲染驱动(例如,上述内核态的GPU图形驱动),以最终到具体硬件(例如,上述物理渲染器件)上完成图形渲染。
可以理解的是,在本申请实施例中,可以通过上述缓冲分配器(例如,一种自定义的具有为相应游戏进程申请帧缓冲区的GBM_GRALLOC模块),为运行在容器的安卓系统中游戏进程分配相应的图形缓冲区。可以理解的是,在本申请实施例中该缓冲分配器还可以提供完整的Android gralloc接口,以管理整个图形缓冲区(即帧缓冲区)的生命周期,比如,可以在进程执行结束时,在容器中销毁相应游戏进程所对应的帧缓冲区。另外,本申请实施例通过重写图形合成器(即上述hwcomposer器件),可以提供窗口管理服务(即SurfaceFlinger服务),以通过该安卓系统的SurfaceFlinger服务对多个进程分别对应的窗口进行合成,以得到叠加有K个关联进程的窗口的游戏合成画面。此外,应当理解,本申请实施例在云服务器中启动某个容器的时候,可以通过预先指定某个图形渲染节点(即上述GPU节点)到具体的容器中,具体可以参见上述图9所示的为每个游戏终端所配置的容器。这样,在多GPU环境中,可以通过容器id映射到具体的GPU节点,以使得该云服务器中所运行的N个容器均匀分布在所有GPU节点上,以完成渲染的负载均衡,进而可以增强系统的稳定性。
其中,应当理解,本申请实施例在将渲染合成画面中的视频数据下发给游戏终端的同时,还会一并下发与该渲染合成画面中的视频数据相关联的音频数据,即可以将编码后的音频流和视频流统称为编码后的音视频流(即上述视频音频流),给到相应的游戏终端,以使相应的游戏终端可以基于接收到的音视频流进行解码处理,以便于最终可以在相应的游戏终端中解码得到与云端的渲染合成画面具有相同内容的游戏显示页面。由于本申请实施例是在容器内进行渲染处理,无需在不同渲染方式之间进行格式转换,进而可以有效地提升系统的兼容性以及降低渲染时延。
进一步地,请参见图11,图11是本申请实施例提供的一种数据处理装置的结构示意图。数据处理装置1可以应用于上述云服务器,该云服务器可以为上述图1所对应实施例中的云服务器2000。进一步地,该数据处理装置1可以包括:请求获取模块11,游戏进程启动模块12,渲染指令确定模块13,渲染处理模块14和合成画面生成模块15;该数据处理装置1还可以包括:远程鉴权模块16,连接建立模块17,客户端启动模块18,申请指令发送模块19,渲染驱动调用模块20和地址返回模块21,缓冲区销毁模块22,数据确定模块23,视频流确定模块24,音频流确定模块25,编码流下发模块26;
请求获取模块11,用于获取游戏客户端发送的云游戏数据获取请求;
游戏进程启动模块12,用于在游戏客户端所在的客户端环境系统对应的云虚拟容器中,根据云游戏数据获取请求启动游戏进程;
其中,游戏客户端对应的游戏显示页面中包括与游戏用户相关联的虚拟对象,游戏显示页面中的业务控件用于在游戏客户端对应的云游戏环境系统中操控虚拟对象的游戏属性行为;
游戏进程启动模块12包括:容器确定单元121,启动指令确定单元122,进程启动单元123和游戏进程确定单元124;
容器确定单元121,用于基于游戏客户端所在的客户端环境系统,确定与客户端环境系统相匹配的云游戏环境系统对应的云虚拟容器;
启动指令确定单元122,用于从云游戏数据获取请求中提取业务控件所指示的虚拟对象的属性行为事件,确定与属性行为事件相关联的进程启动指令;
进程启动单元123,用于将进程启动指令输入云虚拟容器,在云虚拟容器中控制虚拟对象执行游戏属性行为,且启动与游戏属性行为相关联的K个关联进程;K为正整数;
游戏进程确定单元124,用于将K个关联进程作为与业务控件相关联的游戏进程。
其中,容器确定单元121,启动指令确定单元122,进程启动单元123和游戏进程确定单元124的具体实现方式,可以一并参见上述图3所对应实施例中对步骤S102的描述,这里将不再继续进行赘述。
渲染指令确定模块13,用于在获取到为游戏进程所分配的帧缓冲区时,在云虚拟容器中通过游戏进程与图形渲染库之间的桥接通道,调用图形渲染库得到与客户端环境系统具有远程映射关系的图形渲染指令;
其中,系统图形栈包括:与游戏进程具有关联关系的图形渲染库;
渲染指令确定模块13包括:关联关系获取单元131,桥接通道确定单元132和渲染指令获取单元133;
关联关系获取单元131,用于在获取到为游戏进程所分配的帧缓冲区时,获取游戏进程与图形渲染库之间的关联关系;
桥接通道确定单元132,用于基于关联关系在云虚拟容器中确定游戏进程与图形渲染库之间的桥接通道;
渲染指令获取单元133,用于通过桥接通道调用图形渲染库,从图形渲染库中获取与客户端环境系统具有远程映射关系的图形渲染指令。
其中,关联关系获取单元131,桥接通道确定单元132和渲染指令获取单元133的具体实现方式,可以一并参见上述图3所对应实施例中对步骤S103的描述,这里将不再继续进行赘述。
渲染处理模块14,用于基于图形渲染指令访问与帧缓冲区相关联的物理渲染器件,通过物理渲染器件对游戏进程对应的游戏数据进行容器内的渲染处理,得到游戏进程对应的渲染游戏数据;
其中,图形渲染库中包含具有指令封装功能的封装组件;
渲染处理模块14包括:标准化处理单元141,物理器件访问单元142和渲染处理单元143;
标准化处理单元141,用于将图形渲染指令通过封装组件进行标准化处理,将标准化处理后的图形渲染指令通过图形渲染节点传输给图形渲染驱动;
物理器件访问单元142,用于基于图形渲染驱动与图形渲染器件之间的层级关系,访问与帧缓冲区相关联的物理渲染器件;
渲染处理单元143,用于通过物理渲染器件的图形渲染功能对游戏进程对应的游戏数据进行容器内的渲染处理,将渲染处理后的游戏数据作为游戏进程对应的渲染游戏数据。
其中,标准化处理单元141,物理器件访问单元142和渲染处理单元143的具体实现方式,可以参见上述图3所对应实施例中对步骤S104的描述,这里将不再继续进行赘述。
合成画面生成模块15,用于根据渲染游戏数据生成用于在游戏客户端进行显示的游戏合成画面。
其中,云游戏数据获取请求中携带游戏客户端对应的游戏用户在游戏显示界面中所触发的业务控件;游戏进程包括与业务控件相关联的K个关联进程;物理渲染器件中包含与K个关联进程分别对应的K个显存;渲染游戏数据中包含对K个关联进程的游戏数据进行渲染处理后的K个子渲染数据;一个显存用于存储一个关联进程对应的一个子渲染数据;
合成画面生成模块15包括:数据界面输出单元151,合成处理单元152和模拟输出单元153;
数据界面输出单元151,用于将K个显存中所存储的子渲染数据输出至对应显存的显存地址所映射的帧缓冲区,在每个帧缓冲区中输出K个子渲染数据对应的数据界面;
合成处理单元152,用于通过云虚拟容器中的图形合成器,对K个子渲染数据对应的数据界面进行合成处理,基于合成处理后的K个子渲染数据的数据界面,生成用于在游戏客户端进行显示的游戏合成画面。
其中,图形合成器用于提供针对游戏客户端的窗口管理服务;
模拟输出单元153,用于基于窗口管理服务确定游戏客户端对应的游戏终端的屏幕参数信息,基于屏幕参数信息在云虚拟容器所对应的内核环境中模拟输出游戏合成画面。
其中,数据界面输出单元151,合成处理单元152和模拟输出单元153的具体实现方式,可以参见上述图3所对应实施例对步骤S105的描述,这里将不再继续进行赘述。
远程鉴权模块16,用于在获取到游戏客户端发送的远程连接请求时,基于远程连接请求对游戏客户端对应的游戏客户进行远程鉴权,得到远程鉴权结果;远程连接请求为游戏用户通过游戏账号信息访问游戏客户端时所得到的;远程连接请求中携带游戏客户端所在的客户端环境系统;
连接建立模块17,用于若远程鉴权结果指示游戏用户具有远程访问游戏客户端的权限,则与游戏客户端建立数据连接关系;
客户端启动模块18,用于在基于数据连接关系为游戏客户端配置好云虚拟容器时,通过云虚拟容器中的云游戏启动指令,启动并运行游戏客户端。
其中,云虚拟容器中包含已重构的系统图形栈;系统图形栈用于指示在云虚拟容器中直接 访问具有图形渲染功能的物理渲染器件;系统图形栈包括:游戏进程、帧缓冲组件、缓冲分配器、图形渲染节点、图形渲染驱动和物理渲染器件;
申请指令发送模块19,用于通过游戏进程向帧缓冲组件发送帧缓冲区申请指令;帧缓冲区申请指令用于指示帧缓冲组件向缓冲分配器发送缓冲分配指令;
渲染驱动调用模块20,用于在缓冲分配器基于缓冲分配指令为游戏进程分配帧缓冲区时,通过与缓冲分配器具有关联关系的图形渲染节点,调用图形渲染驱动,以在与图形渲染驱动具有层级关系的物理渲染器件中分配帧缓冲区对应的显存;
地址返回模块21,用于将显存对应的显存地址返回给游戏进程;显存地址用于指向游戏进程对应的帧缓冲区。
其中,缓冲分配器可以管理帧缓冲区的整个生命周期;
缓冲区销毁模块22,用于在检测到游戏进程的进程状态为结束状态时,通过缓冲分配器销毁游戏进程所对应的帧缓冲区。
数据确定模块23,用于将游戏合成画面中的渲染游戏数据作为待编码的视频数据,将游戏合成画面对应的音频数据作为待编码的音频数据;
视频流确定模块24,用于基于云虚拟容器中的音视频编码规则,对待编码的视频数据进行编码处理,得到编码视频流;
音频流确定模块25,用于基于云虚拟容器中的音视频编码规则,对待编码的音频数据进行编码处理,得到编码音频流;
编码流下发模块26,用于将编码视频流和编码音频流作为业务控件所对应的触发事件的编码音视频流,将编码音视频流下发给游戏客户端,以使游戏客户端对编码音视频流进行解码处理。
其中,请求获取模块11,游戏进程启动模块12,渲染指令确定模块13,渲染处理模块14和合成画面生成模块15的具体实现方式,可以一并参见上述图3所对应实施例中对步骤S101-步骤S105的描述,这里将不再继续进行赘述;远程鉴权模块16,连接建立模块17,客户端启动模块18的具体实现方式,可以参见上述图3所对应实施例中对启动游戏客户端的具体过程的描述,这里将不再继续进行赘述。其中,申请指令发送模块19,渲染驱动调用模块20,地址返回模块21,缓冲区销毁模块22,数据确定模块23,视频流确定模块24,音频流确定模块25,编码流下发模块26的具体实现方式,可以参见上述图8所对应实施例中对云服务器的描述,这里将不再继续进行赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。
进一步地,请参见图12,图12是本申请实施例提供的一种计算机设备的结构示意图。如图12所示,该计算机设备1000可以为云服务器,该云服务器可以为上述图1所对应实施例中的云服务器2000。该计算机设备1000可以包括:处理器1001,网络接口1004和存储器1005,此外,计算机设备1000还可以包括:用户接口1003,和至少一个通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。其中,用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1004可以是高速RAM存储器,也可以是非易失性的存储器(non-transitory memory),例如至少一个磁盘存储器。存储器1005还可以是至少一个位于远离前述处理器1001的存储装置。如图12所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及设备控制应用程序。
其中,计算机设备1000中的网络接口1004还可以与上述图2所对应实施例中的游戏终端10a进行网络连接。在图12所示的计算机设备1000中,网络接口1004可提供网络通讯功能;而用户接口1003主要用于为用户提供输入的接口;而处理器1001可以用于调用存储器1005中存储的设备控制应用程序,以实现:
获取游戏客户端发送的云游戏数据获取请求;
在游戏客户端所在的客户端环境系统对应的云虚拟容器中,根据云游戏数据获取请求启动游戏进程;
在获取到为游戏进程所分配的帧缓冲区时,在云虚拟容器中通过游戏进程与图形渲染库之间的桥接通道,调用图形渲染库得到与客户端环境系统具有远程映射关系的图形渲染指令;
基于图形渲染指令访问与帧缓冲区相关联的物理渲染器件,通过物理渲染器件对游戏进程 对应的游戏数据进行容器内的渲染处理,得到游戏进程对应的渲染游戏数据;
根据渲染游戏数据生成用于在游戏客户端进行显示的游戏合成画面。
应当理解,本申请实施例中所描述的计算机设备1000可执行前文图3或图8所对应实施例中的数据处理方法,也可执行前文图11所对应实施例中数据处理装置1的功能,在此不再赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。
此外,这里需要指出的是:本申请实施例还提供了一种计算机存储介质,且计算机存储介质中存储有前文提及的数据处理装置1所执行的计算机程序,且计算机程序包括程序指令,当处理器执行程序指令时,能够执行前文图3或图8所对应实施例中的数据处理方法,因此,这里将不再进行赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。对于本申请所涉及的计算机存储介质实施例中未披露的技术细节,请参照本申请方法实施例的描述。作为示例,程序指令可被部署为在一个计算设备上执行,或者在位于一个地点的多个计算设备上执行,又或者,在分布在多个地点且通过通信网络互连的多个计算设备上执行,分布在多个地点且通过通信网络互连的多个计算设备可以组成区块链系统。
本申请一方面提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备可执行前文图3或者图8所对应实施例中的数据处理方法,在此不再赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。
进一步地,请参见图13,图13是本申请实施例提供的一种数据处理装置的结构示意图。其中,该数据处理装置2可以包括:操作响应模块100和合成画面接收模块200;
操作响应模块100,用于响应针对游戏客户端的触发操作,向云服务器发送云游戏数据获取请求;云游戏数据获取请求用于指示云服务器启动游戏进程,且在获取到为游戏进程所分配的帧缓冲区时,在云虚拟容器中通过游戏进程与图形渲染库之间的桥接通道,调用图形渲染库中的图形渲染指令访问与帧缓冲区相关联的物理渲染器件,通过物理渲染器件对游戏进程对应的游戏数据进行容器内的渲染处理,得到游戏进程对应的渲染游戏数据;
合成画面接收模块200,用于接收云服务器根据渲染游戏数据所生成的游戏合成画面,在游戏客户端中显示游戏合成画面。
其中,操作响应模块100和合成画面接收模块200的具体实现方式,可以参见上述图8所对应实施例中对游戏终端的描述,这里将不再继续进行赘述。
进一步地,请参见图14,是本申请实施例提供的一种计算机设备的结构示意图。如图14所示,该计算机设备4000可以为游戏终端,该游戏终端可以为上述图1所对应实施例中的用户终端3000a。此时。该计算机设备4000可以包括:处理器4001,网络接口4004和存储器4005,此外,该计算机设备4000还可以包括:用户接口4003,和至少一个通信总线4002。其中,通信总线4002用于实现这些组件之间的连接通信。其中,用户接口4003可以包括显示屏(Display)、键盘(Keyboard)。网络接口4004可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器4004可以是高速RAM存储器,也可以是非易失性的存储器(non-transitory memory),例如至少一个磁盘存储器。存储器4005还可以是至少一个位于远离前述处理器4001的存储装置。如图14所示,作为一种计算机存储介质的存储器4005中可以包括操作系统、网络通信模块、用户接口模块以及设备控制应用程序。
其中,该计算机设备4000中的网络接口4004还可以提供网络通讯功能。在图14所示的计算机设备4000中,网络接口4004可提供网络通讯功能;而用户接口4003主要用于为用户提供输入的接口;而处理器4001可以用于调用存储器4005中存储的设备控制应用程序,以实现:
响应针对游戏客户端的触发操作,向云服务器发送云游戏数据获取请求;云游戏数据获取请求用于指示云服务器启动游戏进程,且在获取到为游戏进程所分配的帧缓冲区时,在云虚拟容器中通过游戏进程与图形渲染库之间的桥接通道,调用图形渲染库中的图形渲染指令访问与帧缓冲区相关联的物理渲染器件,通过物理渲染器件对游戏进程对应的游戏数据进行容器内的渲染处理,得到游戏进程对应的渲染游戏数据;
接收云服务器根据渲染游戏数据所生成的游戏合成画面,在游戏客户端中显示游戏合成画面。
可以理解的是,本申请实施例还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行前文图3或图8所对应实施例中的数据处理方法,因此,这里将不再进行赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。对于本申请所涉及的计算机存储介质实施例中未披露的技术细节,请参照本申请方法实施例的描述。
进一步的,请参见图15,图15是本申请实施例提供的一种数据处理系统的结构示意图。该数据处理系统3可以包含数据处理装置1a和数据处理装置2a。其中,数据处理装置1a可以为上述图11所对应实施例中的数据处理装置1,可以理解的是,该数据处理装置1a可以集成在上述图2所对应实施例中的云服务器20a,因此,这里将不再进行赘述。其中,数据处理装置2a可以为上述图13所对应实施例中的数据处理装置2,可以理解的是,该数据处理装置2a可以集成在上述图2对应实施例中的游戏终端10a,因此,这里将不再进行赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。对于本申请所涉及的视频数据处理系统实施例中未披露的技术细节,请参照本申请方法实施例的描述。
在本申请实施例中,计算机设备在获取到游戏客户端发送的云游戏数据获取请求时,可以在游戏客户端所在的客户端环境系统(例如,游戏客户端所在的安卓系统)对应的云虚拟容器中,根据云游戏数据获取请求启动游戏进程;可以理解的是,这里的云游戏数据获取请求是由该游戏客户端响应游戏用户的触发操作所生成的。这意味着在云游戏场景下,游戏用户(也可以称之为玩家)可以在该游戏客户端所运行的游戏终端中针对当前游戏显示界面中的业务控件(例如,用于控制该游戏显示界面中的虚拟对象进行移动的操作控件)执行触发操作,以使得该游戏终端中所运行的游戏客户端可以向该计算机设备发起云游戏数据获取请求,此时,该计算机设备可以在获取到为游戏进程所分配的帧缓冲区时,在云虚拟容器中通过游戏进程与图形渲染库之间的桥接通道,调用图形渲染库得到与客户端环境系统具有远程映射关系的图形渲染指令,以基于该图形渲染指令访问到与帧缓冲区相关联的物理渲染器件,进而可以通过该物理渲染器件对游戏进程对应的游戏数据进行容器内的渲染处理,从而可以得到当前所启动的游戏进程对应的渲染游戏数据。由此可见,在本申请实施例中,该计算机设备通过重构整个云虚拟容器中的系统图形栈(比如,在游戏进程与图形渲染库之间建立了桥接通道的情况下),使得整个游戏进程对应的游戏数据可以在该云虚拟容器中进行内部渲染,即此时该计算机设备可以在该云虚拟容器中直接访问到物理渲染器(例如,物理GPU),进而可以在游戏数据的渲染场景下降低游戏的渲染时延。此外,当该计算机设备在云虚拟容器中进行内部渲染时,由于无需在不同渲染方式之间的转换,从而可以增强游戏的兼容性,所以,当该计算机设备根据渲染游戏数据生成用于在游戏客户端进行显示的游戏合成画面时,可以在该云虚拟容器中以较高的帧率运行该云游戏,以增强系统的稳定性。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所揭露的仅为本申请较佳实施例而已,当然不能以此来限定本申请之权利范围,因此依本申请权利要求所作的等同变化,仍属本申请所涵盖的范围。

Claims (20)

  1. 一种数据处理方法,其特征在于,包括:
    获取游戏客户端发送的云游戏数据获取请求;
    在所述游戏客户端对应的云虚拟容器中,根据所述云游戏数据获取请求启动游戏进程;
    在获取到为所述游戏进程所分配的帧缓冲区时,在所述云虚拟容器中调用图形渲染库得到图形渲染指令;
    基于所述图形渲染指令访问与所述帧缓冲区相关联的物理渲染器件,通过所述物理渲染器件对所述游戏进程对应的游戏数据进行容器内的渲染处理,得到所述游戏进程对应的渲染游戏数据;
    根据所述渲染游戏数据生成游戏合成画面。
  2. 根据权利要求1所示的方法,其特征在于,所述云虚拟容器与所述游戏客户端所在的客户端环境系统对应,所述游戏合成画面用于在所述游戏客户端进行显示,
    所述方法进一步包括:
    在所述云虚拟容器中通过所述游戏进程与所述图形渲染库之间的桥接通道,调用所述图形渲染库得到与所述客户端环境系统具有远程映射关系的所述图形渲染指令。
  3. 根据权利要求2所示的方法,其特征在于,在所述获取游戏客户端发送的云游戏数据获取请求之前,所述方法还包括:
    在获取到游戏客户端发送的远程连接请求时,基于所述远程连接请求对所述游戏客户端对应的游戏客户进行远程鉴权,得到远程鉴权结果;所述远程连接请求为所述游戏用户通过游戏账号信息访问所述游戏客户端时所得到的;所述远程连接请求中携带所述游戏客户端所在的客户端环境系统;
    若所述远程鉴权结果指示所述游戏用户具有远程访问所述游戏客户端的权限,则与所述游戏客户端建立数据连接关系;
    在基于所述数据连接关系为所述游戏客户端配置好云虚拟容器时,通过所述云虚拟容器中的云游戏启动指令,启动并运行所述游戏客户端。
  4. 根据权利要求3所述的方法,其特征在于,所述游戏客户端对应的游戏显示页面中包括与所述游戏用户相关联的虚拟对象,所述游戏显示页面中的业务控件用于在所述游戏客户端对应的云游戏环境系统中操控所述虚拟对象的游戏属性行为;
    所述在所述游戏客户端所在的客户端环境系统对应的云虚拟容器中,根据所述云游戏数据获取请求启动游戏进程,包括:
    基于所述游戏客户端所在的客户端环境系统,确定与所述客户端环境系统相匹配的云游戏环境系统对应的云虚拟容器;
    从所述云游戏数据获取请求中提取所述业务控件所指示的所述虚拟对象的属性行为事件,确定与所述属性行为事件相关联的进程启动指令;
    将所述进程启动指令输入所述云虚拟容器,在所述云虚拟容器中控制所述虚拟对象执行所述游戏属性行为,且启动与所述游戏属性行为相关联的K个关联进程;所述K为正整数;
    将所述K个关联进程作为与所述业务控件相关联的游戏进程。
  5. 根据权利要求1所述的方法,其特征在于,所述云虚拟容器中包含已重构的系统图形栈;所述系统图形栈用于指示在所述云虚拟容器中直接访问具有图形渲染功能的物理渲染器件;所述系统图形栈包括:所述游戏进程、帧缓冲组件、缓冲分配器、图形渲染节点、图形渲染驱动和所述物理渲染器件;
    所述方法还包括:
    通过所述游戏进程向所述帧缓冲组件发送帧缓冲区申请指令;所述帧缓冲区申请指令用于指示所述帧缓冲组件向所述缓冲分配器发送缓冲分配指令;
    在所述缓冲分配器基于所述缓冲分配指令为所述游戏进程分配帧缓冲区时,通过与所述缓冲分配器具有关联关系的图形渲染节点,调用所述图形渲染驱动,以在与图形渲染驱动具有层级关系的所述物理渲染器件中分配所述帧缓冲区对应的显存;
    将所述显存对应的显存地址返回给所述游戏进程;所述显存地址用于指向所述游戏进程对应的所述帧缓冲区。
  6. 根据权利要求5所述的方法,其特征在于,所述系统图形栈包括:与所述游戏进程具有关联关系的图形渲染库;
    所述在获取到为所述游戏进程所分配的帧缓冲区时,在所述云虚拟容器中通过所述游戏进程与图形渲染库之间的桥接通道,调用所述图形渲染库得到与所述客户端环境系统具有远程映射关系的图形渲染指令,包括:
    在获取到为所述游戏进程所分配的帧缓冲区时,获取所述游戏进程与所述图形渲染库之间的所述关联关系;
    基于所述关联关系在所述云虚拟容器中确定所述游戏进程与图形渲染库之间的桥接通道;
    通过所述桥接通道调用所述图形渲染库,从所述图形渲染库中获取与所述客户端环境系统具有远程映射关系的图形渲染指令。
  7. 根据权利要求6所述的方法,其特征在于,所述图形渲染库中包含具有指令封装功能的封装组件;
    所述基于所述图形渲染指令访问与所述帧缓冲区相关联的物理渲染器件,通过所述物理渲染器件对所述游戏进程对应的游戏数据进行容器内的渲染处理,得到所述游戏进程对应的渲染游戏数据,包括:
    将所述图形渲染指令通过所述封装组件进行标准化处理,将标准化处理后的图形渲染指令通过所述图形渲染节点传输给所述图形渲染驱动;
    基于所述图形渲染驱动与所述图形渲染器件之间的层级关系,访问与所述帧缓冲区相关联的物理渲染器件;
    通过所述物理渲染器件的图形渲染功能对所述游戏进程对应的游戏数据进行容器内的渲染处理,将渲染处理后的游戏数据作为所述游戏进程对应的渲染游戏数据。
  8. 根据权利要求5所述的方法,其特征在于,所述缓冲分配器管理所述帧缓冲区的整个生命周期;
    所述方法还包括:
    在检测到所述游戏进程的进程状态为结束状态时,通过所述缓冲分配器销毁所述游戏进程所对应的所述帧缓冲区。
  9. 根据权利要求1所述的方法,其特征在于,所述云游戏数据获取请求中携带所述游戏客户端对应的游戏用户在游戏显示界面中所触发的业务控件;所述游戏进程包括与所述业务控件相关联的K个关联进程;所述物理渲染器件中包含与所述K个关联进程分别对应的K个显存;所述渲染游戏数据中包含对所述K个关联进程的游戏数据进行渲染处理后的K个子渲染数据;一个显存用于存储一个关联进程对应的一个子渲染数据;
    所述根据所述渲染游戏数据生成用于在所述游戏客户端进行显示的游戏合成画面,包括:
    将所述K个显存中所存储的子渲染数据输出至对应显存的显存地址所映射的帧缓冲区,在每个帧缓冲区中输出所述K个子渲染数据对应的数据界面;
    通过所述云虚拟容器中的图形合成器,对所述K个子渲染数据对应的数据界面进行合成处理,基于合成处理后的K个子渲染数据的数据界面,生成用于在所述游戏客户端进行显示的游戏合成画面。
  10. 根据权利要求9所述的方法,其特征在于,所述图形合成器用于提供针对所述游戏客户端的窗口管理服务;
    所述方法还包括:
    基于所述窗口管理服务确定所述游戏客户端对应的游戏终端的屏幕参数信息,基于所述屏幕参数信息在所述云虚拟容器所对应的内核环境中模拟输出所述游戏合成画面。
  11. 根据权利要求9所述的方法,其特征在于,所述方法还包括:
    将所述游戏合成画面中的所述渲染游戏数据作为待编码的视频数据,将所述游戏合成画面对应的音频数据作为待编码的音频数据;
    基于所述云虚拟容器中的音视频编码规则,对所述待编码的视频数据进行编码处理,得到编码视频流;
    基于所述云虚拟容器中的音视频编码规则,对所述待编码的音频数据进行编码处理,得到编码音频流;
    将所述编码视频流和所述编码音频流作为所述业务控件所对应的触发事件的编码音视频流,将所述编码音视频流下发给所述游戏客户端,以使所述游戏客户端对所述编码音视频流进行解码处理。
  12. 一种数据处理方法,其特征在于,包括:
    响应针对游戏客户端的触发操作,向云服务器发送云游戏数据获取请求;所述云游戏数据获取请求用于指示所述云服务器启动游戏进程,且在获取到为所述游戏进程所分配的帧缓冲区时,在云虚拟容器中调用图形渲染库中的图形渲染指令访问与所述帧缓冲区相关联的物理渲染器件,通过所述物理渲染器件对所述游戏进程对应的游戏数据进行容器内的渲染处理,得到所述游戏进程对应的渲染游戏数据;
    接收所述云服务器根据所述渲染游戏数据所生成的游戏合成画面,在所述游戏客户端中显示所述游戏合成画面。
  13. 一种数据处理装置,其特征在于,包括:
    请求获取模块,用于获取游戏客户端发送的云游戏数据获取请求;
    游戏进程启动模块,用于在所述游戏客户端对应的云虚拟容器中,根据所述云游戏数据获取请求启动游戏进程;
    渲染指令确定模块,用于在获取到为所述游戏进程所分配的帧缓冲区时,在所述云虚拟容器中调用图形渲染库得到图形渲染指令;
    渲染处理模块,用于基于所述图形渲染库中的图形渲染指令访问与所述帧缓冲区相关联的物理渲染器件,通过所述物理渲染器件对所述游戏进程对应的游戏数据进行容器内的渲染处理,得到所述游戏进程对应的渲染游戏数据;
    合成画面生成模块,用于根据所述渲染游戏数据生成游戏合成画面。
  14. 根据权利要求13所示的装置,其特征在于,所述云虚拟容器与所述游戏客户端所在的客户端环境系统对应,所述游戏合成画面用于在所述游戏客户端进行显示,
    所述渲染指令确定模块进一步用于,在所述云虚拟容器中通过所述游戏进程与所述图形渲染库之间的桥接通道,调用所述图形渲染库得到与所述客户端环境系统具有远程映射关系的所述图形渲染指令。
  15. 根据权利要求14所述的装置,其特征在于,所述装置还包括:
    远程鉴权模块,用于在获取到所述游戏客户端发送的远程连接请求时,基于所述远程连接请求对所述游戏客户端对应的游戏客户进行远程鉴权,得到远程鉴权结果;所述远程连接请求为游戏用户通过游戏账号信息访问所述游戏客户端时所得到的;所述远程连接请求中携带所述游戏客户端所在的客户端环境系统;
    连接建立模块,用于若远程鉴权结果指示所述游戏用户具有远程访问所述游戏客户端的权限,则与所述游戏客户端建立数据连接关系;
    客户端启动模块,用于在基于所述数据连接关系为所述游戏客户端配置好所述云虚拟容器时,通过所述云虚拟容器中的云游戏启动指令,启动并运行所述游戏客户端。
  16. 根据权利要求15所述的装置,其特征在于,所述游戏客户端对应的游戏显示页面中包括与游戏用户相关联的虚拟对象,游戏显示页面中的业务控件用于在所述游戏客户端对应的云游戏环境系统中操控虚拟对象的游戏属性行为;
    所述游戏进程启动模块包括:
    容器确定单元,用于基于所述游戏客户端所在的客户端环境系统,确定与所述客户端环境系统相匹配的云游戏环境系统对应的云虚拟容器;
    启动指令确定单元,用于从所述云游戏数据获取请求中提取所述业务控件所指示的虚拟对象的属性行为事件,确定与所述属性行为事件相关联的进程启动指令;
    进程启动单元,用于将所述进程启动指令输入所述云虚拟容器,在所述云虚拟容器中控制所述虚拟对象执行游戏属性行为,且启动与所述游戏属性行为相关联的K个关联进程;K为正整数;
    游戏进程确定单元,用于将所述K个关联进程作为与所述业务控件相关联的游戏进程。
  17. 根据权利要求13所述的装置,其特征在于,所述云虚拟容器中包含已重构的系统图形栈;所述系统图形栈用于指示在所述云虚拟容器中直接访问具有图形渲染功能的物理渲染器件; 所述系统图形栈包括:游戏进程、帧缓冲组件、缓冲分配器、图形渲染节点、图形渲染驱动和物理渲染器件;
    所述装置还包括:
    申请指令发送模块,用于通过所述游戏进程向所述帧缓冲组件发送帧缓冲区申请指令;所述帧缓冲区申请指令用于指示所述帧缓冲组件向所述缓冲分配器发送缓冲分配指令;
    渲染驱动调用模块,用于在所述缓冲分配器基于所述缓冲分配指令为游戏进程分配帧缓冲区时,通过与所述缓冲分配器具有关联关系的图形渲染节点,调用图形渲染驱动,以在与所述图形渲染驱动具有层级关系的物理渲染器件中分配帧缓冲区对应的显存;
    地址返回模块,用于将显存对应的显存地址返回给所述游戏进程;所述显存地址用于指向游戏进程对应的帧缓冲区。
  18. 一种数据处理装置,其特征在于,包括:
    操作响应模块,用于响应针对游戏客户端的触发操作,向云服务器发送云游戏数据获取请求;所述云游戏数据获取请求用于指示所述云服务器启动游戏进程,且在获取到为所述游戏进程所分配的帧缓冲区时,在云虚拟容器中调用图形渲染库中的图形渲染指令访问与所述帧缓冲区相关联的物理渲染器件,通过所述物理渲染器件对所述游戏进程对应的游戏数据进行容器内的渲染处理,得到所述游戏进程对应的渲染游戏数据;
    合成画面接收模块,用于接收所述云服务器根据所述渲染游戏数据所生成的游戏合成画面,在所述游戏客户端中显示所述游戏合成画面。
  19. 一种计算机设备,其特征在于,包括:处理器和存储器;
    所述处理器与存储器相连,其中,所述存储器用于存储计算机程序,所述处理器用于调用所述计算机程序,以执行权利要求1-12任一项所述的方法。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,执行权利要求1-12任一项所述的方法。
PCT/CN2021/102941 2020-08-28 2021-06-29 一种数据处理方法、装置及存储介质 WO2022042004A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21859846.4A EP4122568A4 (en) 2020-08-28 2021-06-29 DATA PROCESSING METHOD AND DEVICE AND STORAGE MEDIUM
US17/962,822 US20230032554A1 (en) 2020-08-28 2022-10-10 Data processing method and apparatus, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010883519.4 2020-08-28
CN202010883519.4A CN111729293B (zh) 2020-08-28 2020-08-28 一种数据处理方法、装置及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/962,822 Continuation US20230032554A1 (en) 2020-08-28 2022-10-10 Data processing method and apparatus, and storage medium

Publications (1)

Publication Number Publication Date
WO2022042004A1 true WO2022042004A1 (zh) 2022-03-03

Family

ID=72658094

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/102941 WO2022042004A1 (zh) 2020-08-28 2021-06-29 一种数据处理方法、装置及存储介质

Country Status (4)

Country Link
US (1) US20230032554A1 (zh)
EP (1) EP4122568A4 (zh)
CN (1) CN111729293B (zh)
WO (1) WO2022042004A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115292020A (zh) * 2022-09-26 2022-11-04 腾讯科技(深圳)有限公司 一种数据处理方法、装置、设备以及介质

Families Citing this family (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111729293B (zh) * 2020-08-28 2020-12-22 腾讯科技(深圳)有限公司 一种数据处理方法、装置及存储介质
CN112044079B (zh) * 2020-10-14 2023-02-07 腾讯科技(深圳)有限公司 一种游戏运行方法、装置、存储介质和电子设备
CN112950754A (zh) * 2020-10-17 2021-06-11 蔡娟 基于云计算的游戏兼容处理方法、系统及云端计算中心
CN112354178A (zh) * 2020-10-30 2021-02-12 上海小麦互动企业发展有限公司 一种基于云端自动进入街霸游戏对战的系统
CN114494546A (zh) * 2020-11-13 2022-05-13 华为技术有限公司 一种数据处理方法、装置和电子设备
CN112418790B (zh) * 2020-11-18 2024-03-26 江苏赞奇科技股份有限公司 一种基于区块链的服务链高有效性动态扩展追溯方法
CN112860364A (zh) * 2021-02-07 2021-05-28 麒麟软件有限公司 一种基于Linux内核的Android图形显示方法
CN112807678A (zh) * 2021-02-23 2021-05-18 北京字节跳动网络技术有限公司 一种云游戏的实现方法、装置、系统、设备及介质
CN113423018B (zh) * 2021-08-24 2021-11-02 腾讯科技(深圳)有限公司 一种游戏数据处理方法、装置及存储介质
CN113032095A (zh) * 2021-03-15 2021-06-25 深圳市瑞驰信息技术有限公司 一种在arm架构上实现安卓容器运算的系统及方法
CN115134416B (zh) * 2021-03-22 2023-04-25 中国联合网络通信集团有限公司 虚拟现实业务处理系统和方法
CN112988400B (zh) * 2021-04-30 2021-08-06 腾讯科技(深圳)有限公司 显存优化方法、装置、电子设备以及可读存储介质
CN117861194A (zh) * 2021-07-21 2024-04-12 腾讯科技(深圳)有限公司 基于云游戏的设备控制方法、装置、电子设备和可读介质
CN113282271A (zh) * 2021-07-22 2021-08-20 北京麟卓信息科技有限公司 一种Linux平台上安卓应用的音频处理方法及装置
CN113730922B (zh) * 2021-09-03 2024-06-04 网易(杭州)网络有限公司 图形渲染方法、装置、电子设备及存储介质
CN113559497B (zh) * 2021-09-24 2021-12-21 腾讯科技(深圳)有限公司 一种数据处理方法、装置、设备以及可读存储介质
CN114116124A (zh) * 2021-11-10 2022-03-01 支付宝(杭州)信息技术有限公司 一种云容器及基于云容器的人机交互方法和装置
CN114035967A (zh) * 2022-01-10 2022-02-11 北京蔚领时代科技有限公司 一种基于服务器的资源共享渲染方法和装置
CN114022344B (zh) * 2022-01-10 2022-04-05 北京蔚领时代科技有限公司 基于Linux服务器的Android容器渲染资源共享方法和装置
CN114513512B (zh) * 2022-02-08 2023-01-24 腾讯科技(深圳)有限公司 界面渲染的方法及装置
CN114708370B (zh) * 2022-03-29 2022-10-14 北京麟卓信息科技有限公司 一种Linux平台图形渲染方式的检测方法
CN116664375B (zh) * 2022-10-17 2024-04-12 荣耀终端有限公司 图像预测方法、装置、设备及存储介质
CN116567273B (zh) * 2023-07-10 2023-10-10 海马云(天津)信息技术有限公司 发送容器系统的显示画面的方法、服务器设备和存储介质
CN117085336B (zh) * 2023-07-21 2024-05-17 广州盈风网络科技有限公司 游戏运营数据导出方法、装置、设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100124992A1 (en) * 2008-11-20 2010-05-20 Nhn Corporation System and method for production of multiuser network game
US20160199731A1 (en) * 2009-03-23 2016-07-14 Sony Computer Entertainment America Llc Virtualization System and Method for Hosting Applications
US20190065619A1 (en) * 2017-08-24 2019-02-28 Coursera, Inc. Scalable server-side rendering
CN111084983A (zh) * 2019-11-25 2020-05-01 腾讯科技(深圳)有限公司 一种云游戏服务方法、装置、设备及存储介质
CN111214828A (zh) * 2020-01-03 2020-06-02 北京小米移动软件有限公司 游戏运行方法、装置、设备、介质及云端游戏平台
CN111450528A (zh) * 2020-03-31 2020-07-28 网易(杭州)网络有限公司 一种云游戏的渲染服务系统、方法及装置
CN111729293A (zh) * 2020-08-28 2020-10-02 腾讯科技(深圳)有限公司 一种数据处理方法、装置及存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7693078B2 (en) * 2003-11-13 2010-04-06 Rumi Sheryar Gonda Method for supporting SDH/SONET OAMP on Ethernet
CN102055727B (zh) * 2009-10-30 2013-06-26 华为技术有限公司 多业务传送网中的数据封装方法、封装设备和支路单元
CN103888485B (zh) * 2012-12-19 2018-03-09 华为技术有限公司 云计算资源的分配方法、装置及系统
CA2886282C (en) * 2013-05-23 2019-07-23 Stephan Georgiev Dynamic allocation of rendering resources in a cloud gaming system
US20160253664A1 (en) * 2015-02-27 2016-09-01 Samsung Electronics Co., Ltd Attestation by proxy
US10423782B2 (en) * 2016-12-19 2019-09-24 Mcafee, Llc Intelligent backup and versioning
US10610779B2 (en) * 2017-06-19 2020-04-07 Sony Interactive Entertainment LLC Methods and systems for scheduling game play of a video game

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100124992A1 (en) * 2008-11-20 2010-05-20 Nhn Corporation System and method for production of multiuser network game
US20160199731A1 (en) * 2009-03-23 2016-07-14 Sony Computer Entertainment America Llc Virtualization System and Method for Hosting Applications
US20190065619A1 (en) * 2017-08-24 2019-02-28 Coursera, Inc. Scalable server-side rendering
CN111084983A (zh) * 2019-11-25 2020-05-01 腾讯科技(深圳)有限公司 一种云游戏服务方法、装置、设备及存储介质
CN111214828A (zh) * 2020-01-03 2020-06-02 北京小米移动软件有限公司 游戏运行方法、装置、设备、介质及云端游戏平台
CN111450528A (zh) * 2020-03-31 2020-07-28 网易(杭州)网络有限公司 一种云游戏的渲染服务系统、方法及装置
CN111729293A (zh) * 2020-08-28 2020-10-02 腾讯科技(深圳)有限公司 一种数据处理方法、装置及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115292020A (zh) * 2022-09-26 2022-11-04 腾讯科技(深圳)有限公司 一种数据处理方法、装置、设备以及介质

Also Published As

Publication number Publication date
EP4122568A4 (en) 2023-11-15
US20230032554A1 (en) 2023-02-02
CN111729293A (zh) 2020-10-02
CN111729293B (zh) 2020-12-22
EP4122568A1 (en) 2023-01-25

Similar Documents

Publication Publication Date Title
WO2022042004A1 (zh) 一种数据处理方法、装置及存储介质
US12011660B2 (en) Augmenting video games with add-ons
US11617947B2 (en) Video game overlay
US8463980B2 (en) Shared memory between child and parent partitions
US9937423B2 (en) Voice overlay
CA2814420C (en) Load balancing between general purpose processors and graphics processors
US10226700B2 (en) Server system for processing graphic output and responsively blocking select input commands
CN113209632B (zh) 一种云游戏的处理方法、装置、设备及存储介质
WO2024037110A1 (zh) 数据处理方法、装置、设备以及介质
WO2024066828A1 (zh) 一种数据处理方法、装置、设备、计算机可读存储介质及计算机程序产品

Legal Events

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

Ref document number: 21859846

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021859846

Country of ref document: EP

Effective date: 20221019

NENP Non-entry into the national phase

Ref country code: DE