Disclosure of Invention
The invention aims to solve at least one of the technical problems in the prior art, provides a method and a system for multi-player on-screen interaction of a cloud game, and solves the technical problems of poor interactivity between audiences and between the audiences due to the fact that a plurality of audiences cannot control a game played by a main broadcast simultaneously in the prior art in the live cloud game.
In a first aspect, the present invention provides a method for multi-player on-screen interaction in a cloud game, which is applied to a network including a cloud game host, a service server, a anchor client and a plurality of audience clients, and in a process of controlling a game process on the cloud game host by the anchor client, the method includes:
when the business server receives game control power relay requests from a plurality of audience client sides, the business server forwards the game control power relay requests to the anchor client side;
when the service server receives a relay response agreement instruction of the anchor client, the service server sends first link verification information to the cloud game host and sends second link verification information to the plurality of audience clients respectively, so that the plurality of audience clients establish control links with the cloud game host respectively;
wherein the second link information includes cloud game host information and second authentication information corresponding to each of the plurality of viewer clients; the first link authentication information includes information of a plurality of the viewer clients and first authentication information for authenticating the second authentication information.
As a further improvement, the process of establishing a control link between each of the plurality of viewer clients and the cloud game host specifically includes:
the audience client sends a control link establishment request to the cloud game host corresponding to the cloud game host information; the request for establishing the control link carries second verification information corresponding to the audience client;
when the cloud game host receives the control link establishment request, the cloud game host verifies second verification information corresponding to the audience client according to the first verification information;
and when the cloud game host determines that the spectator client passes the verification, the cloud game host allocates the control right of the game process to the corresponding spectator client.
As a further improvement, the process of allocating the control right of the game process to the corresponding spectator client by the cloud game host includes:
the audience client establishes a signaling link and an audio-video link with the signaling server and the media server respectively; the signaling link is used for transmitting the operation data of the spectator client to the game process, and the audio-video link is used for transmitting the video stream of the game process.
As a further improvement, after the plurality of viewer clients respectively establish the control links with the cloud game host, the method further includes:
when the service server receives a relay stop instruction of the anchor client, the service server sends a spectator control disconnection instruction to the cloud game host; wherein the spectator control disconnection instruction is used to instruct the cloud game host to disconnect the control link with the plurality of spectator clients.
As a further improvement, in the process of the anchor client controlling the game progress on the cloud game host, the method further comprises:
the cloud game host packages the video stream of the game process of the game and then pushes the video stream to the streaming media CDN, so that the streaming media CDN distributes the video stream of the game process to the plurality of audience client sides.
In a second aspect, the present invention provides a cloud game multi-player on-screen interaction system, which includes a cloud game host, a service server, an anchor client, and a plurality of audience clients, wherein in a process of controlling a game process on the cloud game host by the anchor client, the service server includes:
a forwarding module, configured to, when the service server receives game control power relay requests from multiple spectator clients, forward the game control power relay requests to the anchor client by the service server;
a link verification information sending module, configured to, when the service server receives a relay agreement response instruction from the anchor client, send, by the service server, first link verification information to the cloud game host and send, by the service server, second link verification information to the plurality of spectator clients, respectively, so that the plurality of spectator clients establish control links with the cloud game host, respectively;
wherein the second link information includes cloud game host information and second authentication information corresponding to each of the plurality of viewer clients; the first link authentication information includes information of a plurality of the viewer clients and first authentication information for authenticating the second authentication information.
As a further improvement, in the process of establishing a control link between each of the plurality of viewer clients and the cloud game host, the viewer client is configured to:
sending a control link establishment request to the cloud game host corresponding to the cloud game host information; the request for establishing the control link carries second verification information corresponding to the audience client;
the cloud game host is used for:
when the cloud game host receives the control link establishment request, verifying second verification information corresponding to the audience client according to the first verification information;
and when the cloud game host determines that the spectator client passes the verification, distributing the control right of the game process to the corresponding spectator client.
As a further improvement, the cloud game host includes a signaling server and a media server, and in the process of allocating the control right of the game process to the corresponding spectator client by the cloud game host, the spectator client is further configured to:
establishing a signaling link and an audio-video link with a signaling server and a media server respectively; the signaling link is used for transmitting the operation data of the spectator client to the game process, and the audio-video link is used for transmitting the video stream of the game process.
As a further improvement, after the plurality of viewer clients respectively establish control links with the cloud game host, the service server is further configured to:
when the service server receives a relay stop instruction of the anchor client, sending an audience control disconnection instruction to the cloud game host; wherein the spectator control disconnection instruction is used to instruct the cloud game host to disconnect the control link with the plurality of spectator clients.
As a further improvement, in the process of the anchor client controlling game progress on the cloud game host, the cloud game host is configured to:
and encapsulating the video stream of the game process of the game and then pushing the video stream to the streaming media CDN, so that the streaming media CDN transmits the video stream of the game process to the plurality of audience clients.
Compared with the prior art, the cloud game multi-person on-screen interaction method and system provided by the invention at least have the following beneficial effects:
by the multi-player on-screen interaction method for the cloud game, a plurality of audiences watching the same anchor can simultaneously control the same game process, and real-time interaction with the anchor is realized while real-time interaction among the audiences is realized. The game relay function transfers the control right from the anchor to other players singly, and the control right is changed into a sharing control right to other players for playing together, so that the generated interactivity is stronger.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
Reference will now be made in detail to the present preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like elements throughout.
To facilitate understanding of the present invention by those skilled in the art, technical terms related to the present invention will be briefly described below.
Cloud game: the game mode based on cloud computing is adopted, all games run at a server side in a running mode of the cloud game, and rendered game pictures are compressed and then transmitted to users through a network. At the client, the user's gaming device does not require any high-end processor and graphics card, but only basic video decompression capability.
Cloud game host computer: the server for running the game can be a physical machine or a virtual machine, different games have requirements on a CPU, a GPU and a memory thereof, the different games have the main responsibility of finishing the rendering of game pictures, and simultaneously, running environments are provided for the signaling server and the media server.
A signaling server: the cloud host computer and the media server assist to complete the functions of starting, running and monitoring of games on the cloud host computer, and meanwhile receive the control command of the service server and complete corresponding operations.
The media server: the core service of the cloud game platform is deployed on a cloud game host together with a signaling server, receives a control command of the signaling server and completes related work, and the core function of the cloud game platform is to capture a game picture, compress the picture by adopting a specific algorithm and send the picture to a user.
A service server: the cloud game platform management and distribution system is a control center of the cloud game platform and is responsible for completing scheduling and controlling users to specific cloud hosts and other business control logic such as wheat order, charging and other related functions.
The voice connection with the microphone means that two persons (and more than two persons) are not in the same place and communicate and chat through a network.
RTMP push streaming service: and pushing the current anchor audio and video stream to the service of the CDN network by an RTMP protocol running on the cloud host.
CDN: it is called Content Delivery Network, i.e. Content distribution Network. The CDN is a content delivery network constructed on the network, and by means of edge servers deployed in various places, a user can obtain required content nearby through functional modules of a central platform, such as load balancing, content delivery, scheduling and the like, so that network congestion is reduced, and the access response speed and hit rate of the user are improved. The key technology of the CDN is mainly content storage and distribution technology.
The relay refers to a process of changing the game process control right running on the cloud game host from being distributed to the anchor only to being distributed to the anchor and being distributed to the audience at the same time. The relay includes a game relay: the method is a game control right transfer mode based on cloud game live broadcast, after a player without the control right applies for controlling a game, a game controller and a game manager can immediately transfer or distribute the control right to the player, one or more players can immediately obtain the game control right, and the trend of game contents is controlled or changed according to own will. The relay further comprises a party relay: the game control interaction mode based on the cloud game live broadcast can support up to 4 players to control the game at the same time, and supports the audience without the upper limit of the number to perform real-time watching.
Fig. 1 is a block diagram of a multi-user on-screen interaction system of a cloud game in one embodiment. Referring to fig. 1, the multi-player on-screen interaction method for the cloud game is applied to a multi-player on-screen interaction system for the cloud game. The cloud game multi-person on-screen interaction system comprises a cloud game host, a service server, a main broadcasting client, a plurality of audience clients, a streaming media CDN source point and a CDN edge node (CDN is called a Content Delivery Network in full, namely a Content Delivery Network) which are connected with one another through a Network. The audience client may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The cloud game host and the business server can be realized by independent servers or a server cluster consisting of a plurality of servers.
Hereinafter, the method for multi-user on-screen interaction of cloud games provided by the embodiment of the present invention will be described and explained in detail through several specific embodiments.
As shown in fig. 2, in one embodiment, a method for multi-person on-screen interaction in a cloud game is provided. The embodiment is mainly illustrated by applying the method to computer equipment.
Referring to fig. 2, the method for multi-player on-screen interaction of a cloud game is applied to the multi-player on-screen interaction system of the cloud game in fig. 1, and in the process that an anchor client controls a game process on a cloud game host, the method includes:
step S100: the cloud game host packages the video stream of the game process of the game and then pushes the video stream to the streaming media CDN, so that the streaming media CDN distributes the video stream of the game process to the plurality of audience client sides.
It can be understood that when the anchor needs to start the cloud game live broadcast, the anchor client initiates a game request to the service server, and after the service server allocates the corresponding cloud host to the anchor client, the anchor controls a game process on the cloud host through the anchor client. The audience who watches the live broadcast of the anchor game watches the video picture of the anchor game process through the audience client, wherein, the audience client is linked with the service server through the network, and the login permission of each audience client (namely the permission of entering the live broadcast room of the anchor) is managed by the service server. In order to reduce the pressure of the service server, the streaming media CDN is adopted to transmit the video stream of the game process to the plurality of audience client sides, so that the pressure of the service server is reduced, the service server is not required to be used for transmitting the video stream of the game process to the audience client sides, and faults caused by overlarge data transmission pressure of the service server are avoided.
Specifically, in one example, the anchor creates a room in a game relay mode, and in the relay mode, 5 wheat positions are automatically created for other users to use in the microphone relay. Then the anchor client requests the service server to start playing, after the service server verifies that the anchor information is valid, the idle cloud game host is searched for the anchor, the anchor information, the game information selected by the anchor and the verification information used when the anchor logs in subsequently are sent to the cloud game host, the cloud game host checks the machine state, whether the anchor selected game is started normally or not, whether the game archiving and downloading is successful or not and the like, and if all preparations are normal, the service server is informed that the current cloud game host is normal and can be provided for the anchor to use. And after receiving the normal state message of the cloud game host, the service server informs the anchor service server of finding an idle cloud game host and verifies the information. And then, the anchor uses the anchor information sent by the service server and the login authentication information to authenticate with the authentication information sent by the user, and after the authentication is successful, the anchor can start playing the game.
Signaling links and audio and video links are respectively established between the anchor client and the cloud game host, the signaling links are used for sending and receiving data related to anchor and game operation, and the audio and video links are used for receiving game picture data and sound data. After the cloud game host starts a game, on one hand, video streams (including game pictures and sound data) are transmitted to the anchor client through audio and video links; on one hand, the RTMP protocol is used for pushing game pictures and sound data to the CDN server so that the under-microphone user can watch the main broadcasting game.
Step S102: and when the service server receives game control power relay requests from a plurality of audience client sides, the service server forwards the game control power relay requests to the anchor client side.
It should be noted that, the anchor client can control the number of the wheat locations in the live broadcast room by sending corresponding instructions to the service server, for example, in the relay mode, the room has 5 wheat locations, the default wheat location is in an open state, other users in the room can get on the wheat by themselves, the anchor can lock the idle wheat location, and the user in the room is not allowed to get on the wheat location at will; after the user logs in the phone, the user sends a game control right relay request to the service server through the audience client, wherein the request indicates that the user wants to obtain a controller of the game process, namely the user wants to interact with the anchor, and the game control right of the anchor is relayed to play the game for the anchor.
Step S104: when the service server receives a relay response agreement instruction of the anchor client, the service server sends first link verification information to the cloud game host and sends second link verification information to the plurality of audience clients respectively, so that the plurality of audience clients establish control links with the cloud game host respectively. Wherein the second link information includes cloud game host information and second authentication information corresponding to each of the plurality of viewer clients; the first link authentication information includes information of a plurality of the viewer clients and first authentication information for authenticating the second authentication information.
Specifically, as shown in fig. 3, the process of establishing a control link between each of the plurality of viewer clients and the cloud game host specifically includes:
step S1041: the audience client sends a control link establishment request to the cloud game host corresponding to the cloud game host information; and the request for establishing the control link carries second verification information corresponding to the audience client.
Step S1042: when the cloud game host receives the control link establishment request, the cloud game host verifies second verification information corresponding to the audience client according to the first verification information.
Step S1043: and when the cloud game host determines that the spectator client passes the verification, the cloud game host allocates the control right of the game process to the corresponding spectator client.
Further, the process of the cloud game host distributing the control right of the game process to the corresponding spectator client includes:
the audience client establishes a signaling link and an audio-video link with the signaling server and the media server respectively; the signaling link is used for transmitting the operation data of the spectator client to the game process, and the audio-video link is used for transmitting the video stream of the game process.
In one example, in a game scenario that supports party relay, where a cloud game host allows multiple handles to be configured, a anchor may choose to give secondary control to up to 3 other on-board users while retaining its own primary control. After the game starts, the anchor can control the progress of the game together with 3 players who have gained the secondary control.
As in the example provided in fig. 1, both the spectator client 1 and the spectator client 2 obtain the controller of the game process, and the spectator client 3 does not obtain the controller of the game process, so that the spectator client 3 obtains the video stream of the game process by means of the CDN, which greatly reduces the pressure on the cloud game host.
In conclusion, by the multi-player on-screen interaction method for the cloud game, provided by the invention, a plurality of audiences watching the same anchor can simultaneously control the same game process, and real-time interaction with the anchor is realized, and meanwhile, real-time interaction among the audiences is also realized. The game relay function transfers the control right from the anchor to other players singly, and the control right is changed into a sharing control right to other players for playing together, so that the generated interactivity is stronger.
In one embodiment, after the plurality of viewer clients respectively establish the control links with the cloud game host, the method further includes:
step S106: when the service server receives a relay stop instruction of the anchor client, the service server sends a spectator control disconnection instruction to the cloud game host; wherein the spectator control disconnection instruction is used to instruct the cloud game host to disconnect the control link with the plurality of spectator clients.
It can be understood that, although other spectator clients (spectator client 1 and spectator client 2) can control the game progress together with the anchor client, the anchor client still maintains the main control right on the game progress, when the anchor considers that the control right of the spectator clients needs to be interrupted, the corresponding service server sends a spectator control disconnection instruction to the cloud game host by sending a relay stop instruction to the service server, and the spectator control disconnection instruction is used for instructing the cloud game host to disconnect the control links with a plurality of spectator clients, so as to disconnect the control right of the other spectator clients, thereby providing a live broadcast interaction scheme with controllable anchor.
In some embodiments, after the plurality of viewer clients respectively establish the control links with the cloud game host, the method further comprises:
the business server judges whether the number of the audience client sides which establish control links with the cloud game host currently exceeds a threshold value;
when the threshold is exceeded, game control relay requests received from a plurality of said spectator clients are no longer forwarded to the anchor client.
It should be noted that the threshold may be configured in advance by the anchor client, for example, in this example, the threshold is 3, that is, the number of the spectator clients simultaneously operating the game process is at most 3, and when the number of the spectator clients exceeds 3, the anchor client does not receive the game control power relay requests of other spectator clients any more, and is automatically shielded by the service server, so as to reduce interference to the anchor.
Further, referring to fig. 1, the present invention also provides a multi-player on-screen interaction system for a cloud game, the system includes a cloud game host, a service server, an anchor client and a plurality of audience clients, and in the process of controlling a game process on the cloud game host by the anchor client, the service server includes:
a forwarding module, configured to, when the service server receives game control power relay requests from multiple spectator clients, forward the game control power relay requests to the anchor client by the service server;
a link verification information sending module, configured to, when the service server receives a relay agreement response instruction from the anchor client, send, by the service server, first link verification information to the cloud game host and send, by the service server, second link verification information to the plurality of spectator clients, respectively, so that the plurality of spectator clients establish control links with the cloud game host, respectively;
wherein the second link information includes cloud game host information and second authentication information corresponding to each of the plurality of viewer clients; the first link authentication information includes information of a plurality of the viewer clients and first authentication information for authenticating the second authentication information.
Further, in the process of establishing a control link between each of the plurality of spectator clients and the cloud game host, the spectator client is configured to:
sending a control link establishment request to the cloud game host corresponding to the cloud game host information; the request for establishing the control link carries second verification information corresponding to the audience client;
the cloud game host is used for:
when the cloud game host receives the control link establishment request, verifying second verification information corresponding to the audience client according to the first verification information;
and when the cloud game host determines that the spectator client passes the verification, distributing the control right of the game process to the corresponding spectator client.
Further, the cloud game host includes a signaling server and a media server, and in the process of allocating the control right of the game process to the corresponding spectator client by the cloud game host, the spectator client is further configured to:
establishing a signaling link and an audio-video link with a signaling server and a media server respectively; the signaling link is used for transmitting the operation data of the spectator client to the game process, and the audio-video link is used for transmitting the video stream of the game process.
Further, after the plurality of audience clients respectively establish control links with the cloud game host, the service server is further configured to:
when the service server receives a relay stop instruction of the anchor client, sending an audience control disconnection instruction to the cloud game host; wherein the spectator control disconnection instruction is used to instruct the cloud game host to disconnect the control link with the plurality of spectator clients.
Further, in the process of controlling a game process on the cloud game host by the anchor client, the cloud game host is configured to:
and encapsulating the video stream of the game process of the game and then pushing the video stream to the streaming media CDN, so that the streaming media CDN transmits the video stream of the game process to the plurality of audience clients.
It should be noted that the system embodiment and the method embodiment of the present invention are based on the same inventive concept, and are not described herein again for the system embodiment.
FIG. 4 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be the service server in fig. 1. As shown in fig. 4, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and also stores a computer program, and when the computer program is executed by the processor, the processor can realize the multi-player on-screen interaction method of the cloud game. The internal memory may also store a computer program, and when the computer program is executed by the processor, the processor may execute the method for multi-user co-screen interaction in the cloud game. Those skilled in the art will appreciate that the configuration shown in fig. 4 is a block diagram of only a portion of the configuration associated with aspects of the present invention and is not intended to limit the computing devices to which aspects of the present invention may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the cloud game multi-person on-screen interaction system provided by the application can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in fig. 4. The memory of the computer device can store various program modules which form the multi-person on-screen interaction system of the cloud game, such as a forwarding module and a link verification information sending module. The computer program formed by the program modules enables the processor to execute the steps of the multi-person on-screen interaction method of the cloud game described in the specification in the embodiments of the application.
For example, the computer device shown in fig. 4 may execute, through a forwarding module in the cloud game multi-player on-screen interaction system, a step in which, when the service server receives game control right relay requests from a plurality of the spectator clients, the service server forwards the game control right relay requests to the anchor client. Executing, by a link verification information sending module, when the service server receives a relay agreement response instruction from the anchor client, the service server sending first link verification information to the cloud game host and sending second link verification information to the plurality of spectator clients, respectively, so that the plurality of spectator clients establish control links with the cloud game host, respectively; wherein the second link information includes cloud game host information and second authentication information corresponding to each of the plurality of viewer clients; the first link authentication information includes information of a plurality of the viewer clients and first authentication information for authenticating the second authentication information.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRA), Rambus Direct RAM (RDRA), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.