CN115944910A - Cloud game interaction method and system, electronic equipment and storage medium - Google Patents

Cloud game interaction method and system, electronic equipment and storage medium Download PDF

Info

Publication number
CN115944910A
CN115944910A CN202211702601.8A CN202211702601A CN115944910A CN 115944910 A CN115944910 A CN 115944910A CN 202211702601 A CN202211702601 A CN 202211702601A CN 115944910 A CN115944910 A CN 115944910A
Authority
CN
China
Prior art keywords
layer
client
uplink
downlink
function
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202211702601.8A
Other languages
Chinese (zh)
Inventor
张畋
林水竹
郑鹏飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuanjingshengsheng Beijing Technology Co ltd
Original Assignee
Yuanjingshengsheng Beijing Technology Co ltd
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 Yuanjingshengsheng Beijing Technology Co ltd filed Critical Yuanjingshengsheng Beijing Technology Co ltd
Priority to CN202211702601.8A priority Critical patent/CN115944910A/en
Publication of CN115944910A publication Critical patent/CN115944910A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application provides a cloud game interaction method and system, electronic equipment and a storage medium, and relates to the technical field of cloud games. The method is applied to a server and comprises the following steps: establishing a plurality of channels with the client based on the type of the transmission object; responding to the operation of generating the downlink object by the function realization layer, and informing the transmission layer to send the downlink object to the client through a corresponding channel in the plurality of channels after the distribution layer distributes the downlink object based on the type of the downlink object; responding to the operation that the transmission layer receives the uplink object of the client, and sending the uplink object to a corresponding functional module in the function realization layer after the distribution layer distributes the uplink object based on the type of the uplink object; the function modules in the function implementation layer are used for executing interaction functions with the client in the cloud game. According to the cloud game interaction method and device, based on a multi-channel and layering mechanism, the security is high, the coupling degree is low, the expansion is easy, and the cloud game interaction capacity is improved.

Description

Cloud game interaction method and system, electronic equipment and storage medium
Technical Field
The present application relates to the field of cloud game technologies, and in particular, to a cloud game interaction method, system, electronic device, and storage medium.
Background
In a cloud game running scene, running of a cloud game and video collection are achieved on a server at the cloud end, then the video is transmitted to a client of the cloud game through a streaming real-time transmission technology, and video playing and game control are completed at the client. At present, the manipulation interaction of the cloud game is mostly the interaction of control instructions such as a touch screen or a key and the like, and the control instructions are transmitted to a server on the basis of a client side in an uplink manner to complete the manipulation interaction. With the improvement of cloud game functions and experience requirements, how to realize complex interaction functions such as camera shooting or sound recording in a cloud game becomes a pending requirement.
Disclosure of Invention
The embodiment of the application provides a cloud game interaction method, a cloud game interaction system, electronic equipment and a storage medium, so as to improve the interaction capacity of a cloud game.
In a first aspect, an embodiment of the present application provides a cloud game interaction method, which is applied to a server, where the server includes a function implementation layer, a distribution layer, and a transmission layer. The method comprises the following steps: establishing a plurality of channels with the client based on the type of the transmission object; responding to the operation of generating the downlink object by the function implementation layer, and informing the transmission layer to send the downlink object to the client through a corresponding channel in the plurality of channels after the distribution layer distributes the downlink object based on the type of the downlink object; and responding to the operation that the transmission layer receives the uplink object of the client, and sending the uplink object to a corresponding functional module in the function realization layer after the distribution layer distributes the uplink object based on the type of the uplink object. The function modules in the function implementation layer are used for executing interaction functions with the client in the cloud game.
In a second aspect, an embodiment of the present application provides a cloud game interaction method, which is applied to a client, where the client includes a function implementation layer, a distribution layer, and a transport layer. The method comprises the following steps: responding to the operation of generating the uplink object by the function realization layer, and informing the transmission layer to send the uplink object to the server through a corresponding channel in a plurality of channels between the transmission layer and the server after the distribution layer distributes the uplink object based on the type of the uplink object; and responding to the operation that the transmission layer receives the downlink object of the server, and sending the downlink object to a corresponding functional module in the function realization layer after the distribution layer distributes the downlink object based on the type of the downlink object. The function modules in the function implementation layer are used for executing an interactive function with the server in a cloud game, and the channels are established based on the type of the transmission object.
In a third aspect, an embodiment of the present application provides a cloud game interaction system, which includes a server and a client.
The server comprises a function realization layer, a distribution layer and a transmission layer and is used for establishing a plurality of channels between the server and the client based on the type of the transmission object; responding to the operation of generating the downlink object by the function implementation layer, and informing the transmission layer to send the downlink object to the client through a corresponding channel in the plurality of channels after the distribution layer distributes the downlink object based on the type of the downlink object; and responding to the operation that the transmission layer receives the uplink object of the client, and sending the uplink object to a corresponding functional module in the function realization layer after the distribution layer distributes the uplink object based on the type of the uplink object.
The client comprises a function realization layer, a distribution layer and a transmission layer, and is used for responding to the operation of generating an uplink object by the function realization layer, and the distribution layer informs the transmission layer to send the uplink object to the server through a corresponding channel in the plurality of channels after distributing the uplink object based on the type of the uplink object; and responding to the operation that the transmission layer receives the downlink object of the server, and the distribution layer distributes the downlink object based on the type of the downlink object and then sends the downlink object to the corresponding functional module in the function realization layer.
The function modules in the function implementation layers of the server and the client are used for executing the interactive function of the server and the client in the cloud game.
In a fourth aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory, where the processor implements the method of any one of the above when executing the computer program.
In a fifth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method of any one of the above.
Compared with the prior art, the method has the following advantages:
the cloud game system has the advantages that objects are transmitted between the server and the client of the cloud game based on the multiple channels, interference can be reduced, efficiency and safety are improved, transmission is carried out in the server and the client based on a layering mechanism of the function implementation layer, the distribution layer and the transmission layer, the coupling degree of the functional modules is low, expansion is easy, maintenance cost is low, and cloud game interaction capacity is improved.
The foregoing description is only an overview of the technical solutions of the present application, and the following detailed description of the present application is given to enable the technical means of the present application to be more clearly understood and to enable the above and other objects, features, and advantages of the present application to be more clearly understood.
Drawings
In the drawings, like reference numerals refer to the same or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily to scale. It is appreciated that these drawings depict only some embodiments in accordance with the disclosure and are not to be considered limiting of its scope.
FIG. 1 is a schematic diagram of a cloud gaming interaction scenario;
fig. 2 is a schematic view of an application scenario of the cloud game interaction method provided by the present application;
FIG. 3 is a server and client hierarchical mechanism framework diagram provided by the present application;
fig. 4 is a flowchart of a cloud game interaction method according to an embodiment of the present application;
fig. 5 is a flowchart of a cloud game interaction method according to another embodiment of the present application;
FIG. 6 is a schematic interaction diagram of a stub layer and a hub layer of the server according to another embodiment of the present application;
fig. 7 is a flowchart of a cloud game interaction method according to another embodiment of the present application;
FIG. 8 is a schematic interaction diagram of a stub layer and a hub layer of a client according to another embodiment of the present application;
FIG. 9 is a schematic diagram of a transport layer processing mechanism according to another embodiment of the present application;
fig. 10 is a block diagram of a cloud game interaction system according to an embodiment of the present application;
FIG. 11 is a block diagram of an electronic device used to implement embodiments of the present application.
Detailed Description
In the following, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments may be modified in various different ways, without departing from the spirit or scope of the present application. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive.
In order to facilitate understanding of the technical solutions of the embodiments of the present application, the following description is made of related art of the embodiments of the present application. The following related arts as alternatives can be arbitrarily combined with the technical solutions of the embodiments of the present application, and all of them belong to the scope of the embodiments of the present application.
The terms referred to in the present application will be explained first.
Cloud game: in a game mode based on cloud computing, all games run on a server in a running mode of a cloud game, and after the game is started and rendered, the game is compressed and transmitted to a client through a network. The client does not need to configure a high-performance processor and a display card for the game, and can execute the game only by basic video decompression capacity.
A server: the server is located at the cloud end and provides related services for the cloud games, the related services include but are not limited to setting the running environment of the cloud games, starting the cloud games and rendering the cloud games, and the rendered and compressed cloud games are sent to the client end through the network.
A client: and loading equipment of the cloud game on the user side. The device has video decompression capability, can communicate with a server at the cloud end and can interact with a user. The client includes, but is not limited to, a computer, a tablet computer, a notebook computer, a Personal Digital Assistant (PDA), or a mobile phone.
Cloud game interaction: and the server at the cloud end and the client side at the user side carry out data and control event interaction in the cloud game scene. For example, the control event and hardware data local to the client are synchronously transmitted to the server and then processed by the server.
Bus (Bus): a common communications backbone for the transmission of information between the various functional elements of the computer.
Soft bus: non-native software and hardware functions are mapped to a native virtual bus via a network protocol.
A Stub layer: also referred to as a function implementation layer, a layer for executing various function modules of the cloud game interaction, the function modules including but not limited to a camera module, a recording module, a photo album module, a log module, a sticker module or a sensor module, etc. Based on various functional modules, the functions of calling a camera, accessing a microphone, communicating a pasting board, storing an album, uploading pictures and the like can be realized in the cloud game.
Hub layer: the layer responsible for data and event distribution can parse data and instructions from the opposite end and route the data and instructions to the destination functional module of the stub layer, and encapsulate the data and instructions of the stub layer functional module and send the encapsulated data and instructions to the opposite end.
In order to improve the interaction capability of the cloud game, at present, there is a technical scheme that different functional interfaces are extended on a WebRTC (Web Real-Time Communications, audio-video data Real-Time communication) transmission component to implement the method. Fig. 1 is a schematic diagram of a cloud game interaction scheme. As shown in fig. 1, a server SDK (Software Development Kit) and a client SDK of a cloud game both extend multiple symmetric APIs (Application Programming interfaces) on a WebRTC component to implement functions of a touch screen, a camera, a sound recording and a sensor of the client on the server. However, the above solutions require additional interfaces to cope with the additional functions, and the function management is flat, inefficient and inflexible. And a plurality of functions are developed based on a lower-layer transmission component, so that the coupling degree is high, the function expansibility is poor, and the maintenance cost is high. Based on this, the embodiment of the application provides a cloud game interaction method, a cloud game interaction system, an electronic device and a storage medium, wherein objects are transmitted between a server and a client of a cloud game based on a plurality of channels, so that interference can be reduced, efficiency and safety are improved, transmission is performed inside the server and the client based on a layering mechanism of a function implementation layer, a distribution layer and a transmission layer, the coupling degree of function modules is low, expansion is easy, maintenance cost is low, and cloud game interaction capability is improved.
Fig. 2 is a schematic diagram of an application scenario for implementing a cloud game interaction method according to an embodiment of the present application. The server in the cloud end can provide relevant services of the cloud game for a plurality of clients. The type of the client may be various, such as a computer, a mobile phone, a tablet computer, a notebook computer, or the like. The cloud server can be deployed according to needs, including centralized deployment or distributed deployment. For example, a plurality of servers may be deployed in the cloud to respectively execute different services, or one server may be deployed to provide all relevant services of a cloud game. The figure only illustrates the deployment of one server as an example. After the server is started and renders the cloud game, the corresponding video data are compressed and transmitted to the client through the network, and the client decompresses and plays the video data after receiving the video data, so that a user can play the cloud game on the client. In the cloud game process, interaction is carried out between the server and the client based on a multi-channel and layering mechanism, and the cloud game interaction capacity is improved.
It should be noted that the server in the embodiment of the present application is not particularly limited to the server of the cloud game provider or the cloud game operator. The application focuses on providing services to clients around cloud game interaction, that is, the server in the embodiment of the application only needs to have the service function. Typically, a cloud gaming provider or cloud gaming operator has its own specialized server to provide or operate cloud games. Of course, according to actual application needs, the service function in the embodiment of the present application may be integrated on a cloud game providing or operating server, which is not limited to this.
The stub layer and various functional modules in the stub layer in the embodiment of the application are symmetrically arranged on the server and the client. That is to say, the modules with the same function are arranged in the stub layer of the server and the stub layer of the client, and cooperate with each other to complete the corresponding interactive function. For example, the camera module on the server stub layer and the camera module on the client stub layer realize the calling of the client camera in the cloud game together, and the recording module on the server stub layer and the recording module on the client stub layer are used for realizing the access of the client microphone and the intercommunication of the pasting board on the cloud side together, and storing the photo album and uploading the pictures and the like.
Fig. 3 is a framework diagram of a server and client hierarchical mechanism provided by the present application. As shown in fig. 3, the server includes a stub layer, a hub layer and a transport layer, and the client also includes a stub layer, a hub layer and a transport layer, all implemented in the form of an SDK. Each functional module in the stub layer of the server and each functional module in the stub layer of the client are symmetrically arranged, and the method comprises the following steps of: camera module, recording module, album module, log module, paste board module and sensor module etc.. Each functional module is responsible for performing a respective cloud game interaction function.
For example, the camera module is used for executing a photographing or shooting function of the client hardware camera on the server in the cloud game, and the sound recording module is used for executing a sound recording function of the client sound recording device on the server in the cloud game. The Hub layer is used for distributing instructions or data in the cloud game, and comprises the steps of encapsulating or decapsulating the data, splitting a file into data blocks, routing the data blocks to corresponding functional modules and the like. The transmission layer is used for communicating with an opposite terminal, transmitting data based on WebRTC, encoding or decoding the data and the like. In the process of the cloud game, 6 channels can be established between the transport layer of the server and the transport layer of the client according to the type of the transport object. As shown in the figure, the channel (1) is a SCTP (Stream Control Transmission Protocol) command channel for bidirectionally transmitting commands. The channel (2) is an SRTP (Secure Real-time Transport Protocol) downlink video channel, and is used for transmitting a video to the client by the server. And the channel (3) is an SRTP downlink audio channel and is used for transmitting audio to the client by the server. And the channel (4) is an SRTP uplink video channel and is used for transmitting videos to the server by the client. And the channel (5) is an SRTP uplink audio channel and is used for transmitting audio to the server by the client. The channel (6) is an SCTP data channel and is used for bidirectional transmission of non-streaming media files. In addition, the client is also provided with an authorization management module used for obtaining the authorization of the user when the server uses the hardware equipment of the client. After obtaining the authorization of the user, the server can access the devices such as the camera, the photo album or the sticky board of the client.
The embodiment of the application provides a cloud game interaction method which can be applied to a server at the cloud end, wherein the server comprises a function realization layer, a distribution layer and a transmission layer. Fig. 4 is a flowchart illustrating a cloud game interaction method according to an embodiment of the present application, where the method may include the following steps S401 to S403.
In step S401, a plurality of channels with the client are established based on the type of the transmission object.
In this embodiment, the transmission object includes but is not limited to: instructions, streaming media files, or non-streaming media files. The streaming media file includes audio or video, and usually adopts a mode of playing and transmitting simultaneously. During transmission, the size of the streaming media file is unknown, and a complete streaming media file is obtained after transmission is completed. The format of the streaming media file is various, such as YUV video, PCM (Pulse Code Modulation) audio frame. YUV is a color coding format, and is commonly used in video processing components. "Y" represents brightness (Luma) or gray scale value, "U" and "V" represent Chroma (Chroma or Chroma) for describing the color and saturation of the image, and is used to specify the color of the pixel. The non-streaming media file includes but is not limited to a file with multiple formats such as word, excel, pdf, ppt or zip. The size of the non-streaming media file is known, and the complete file is obtained before transmission, and the transmission is directly carried out. In view of the fact that the different types of files have different characteristics, the files are transmitted through independent channels, so that independent transmission of the channels can be guaranteed without mutual influence, interference is reduced to the maximum extent, concurrency processing capacity is improved, and safety and transmission efficiency are improved.
In this embodiment, the plurality of channels are established by the server when the client logs in the cloud game, and are used for transmitting instructions and files between the server and the client. During one login period of the client, the multiple channels can be reused, namely the multiple channels can be used for transmission for multiple times, and the multiple channels are in valid states during the login period. When the client logs out of the current login, the plurality of channels are released, namely the plurality of channels are in a failure state, and the channels are reestablished when the client logs in the cloud game next time.
In step S402, in response to the operation of generating the downlink object by the function implementation layer, after the distribution layer performs distribution processing on the downlink object based on the type of the downlink object, the distribution layer notifies the transmission layer to send the downlink object to the client through a corresponding channel of the multiple channels.
In this embodiment, the downlink object refers to an object, such as an instruction or a file, that is transmitted from the server to the client in a downlink manner. The distribution layer has a routing function, and can determine a corresponding channel according to the type of the downlink object, so that the transmission layer can be informed to transmit the downlink object by using the corresponding channel. Illustratively, the downstream object is a video, the distribution layer may notify the transport layer to use a downstream video channel to transmit the video to the client.
In step S403, in response to the operation that the transport layer receives the uplink object of the client, the distribution layer performs distribution processing on the uplink object based on the type of the uplink object and then sends the uplink object to a corresponding functional module in the function implementation layer.
In the embodiment of the present application, the uplink object refers to an object, such as an instruction or a file, transmitted to the server by the client. The distribution layer has a routing function, and can determine a corresponding functional module according to the type of the uplink object, so that the uplink object can be transmitted to the corresponding functional module of the function realization layer. For example, if the uplink object is a picture, the distribution layer may send the picture to the album module of the function implementation layer after determining the corresponding album module.
In this embodiment, the function module in the function implementation layer is used for executing an interactive function between the server and the client in the cloud game, and includes, but is not limited to, a camera module, a recording module, an album module, a log module, or a sensor module.
According to the method provided by the embodiment, the objects are transmitted between the server and the client of the cloud game based on the plurality of channels, so that the interference can be reduced, the efficiency and the safety are improved, the transmission is performed based on the layering mechanism of the function implementation layer, the distribution layer and the transmission layer in the server and the client, the coupling degree of the function modules is low, the expansion is easy, the maintenance cost is low, and the interaction capacity of the cloud game is improved.
The embodiment of the application provides a cloud game interaction method which can be applied to a server at the cloud end, wherein the server comprises a function realization layer, a distribution layer and a transmission layer, and a function module in the function realization layer is used for executing an interaction function between the server and a client in a cloud game. Fig. 5 is a flowchart illustrating a cloud game interaction method according to an embodiment of the present application, where the method may include steps S501 to S507.
In step S501, an SCTP-based command channel and a SCTP-based data channel, and an SRTP-based audio channel and a SRTP-based video channel are established with the client.
In this embodiment, the channels are established between a transport layer of the server and a transport layer of the client. And the transmission layer of the server and the transmission layer of the client are realized based on the WebRTC component. Therefore, based on the WebRTC component, the command channel and the data channel are established using SCTP, and the audio channel and the video channel are established using SRTP. The instruction channel is used for transmitting instructions, the data channel is used for transmitting non-streaming media files, and the audio channel and the video channel are used for transmitting streaming media files.
According to the mode for establishing the multiple independent channels, one channel is blocked, so that other channels cannot be influenced, the instruction transmission cannot be influenced in the transmission process of cloud game scene big data (such as files or video streams), and the quick response of cloud game remote interaction is ensured.
In step S502, in response to the operation of generating the downlink object by the function implementation layer, if the downlink object is a streaming media file, the distribution layer directly sends the streaming media file to the transmission layer, and notifies the transmission layer to send the streaming media file to the client through the audio channel or the video channel.
In this embodiment, for streaming media files such as audio or video, the distribution layer does not need to perform encapsulation processing and directly forwards the streaming media files to the transport layer, and the transport layer sends the audio through the audio channel or sends the video to the client through the video channel after receiving the audio or video.
Illustratively, a server in the cloud game initiates a recording function to generate a recording file, and after the recording file is confirmed to be a streaming media file by a distribution layer, the recording file is sent to a client by a transmission layer through an audio channel.
In step S503, if the downlink object is a non-streaming media file, the distribution layer encapsulates the non-streaming media file and sends the non-streaming media file to the transmission layer, and notifies the transmission layer to send the non-streaming media file to the client through the data channel.
In this embodiment, for a non-streaming media file, the distribution layer may perform encapsulation processing first, add a file header according to a protocol of the distribution layer, and then send the file header to the transport layer, and notify the transport layer to send the file header to the client through the data channel.
Illustratively, a server in the cloud game initiates a sticky board function to obtain a text file copied on the sticky board, and after the text file is confirmed to be a non-streaming media file by a distribution layer, the text file is sent to a client through a data channel by a transmission layer.
In one embodiment, the step S503 may include:
if the downlink object is a non-streaming media file, a file manager in the distribution layer divides the non-streaming media file into a plurality of data blocks and generates a file header, the data listener sends the file header and the plurality of data blocks to the transmission layer through the data processing module, and the transmission layer is informed to send the file header and the plurality of data blocks to the client through the data channel.
In this embodiment, the file manager and the data listener in the distribution layer may be obtained by the function implementation layer by registering in the distribution layer in advance. For example, the function implementation layer registers an instance for file management in the distribution layer in advance to obtain a file manager, and the function implementation layer registers an instance for data monitoring in the distribution layer in advance to obtain a data listener. The main functions of the file manager include: the method comprises the steps of splitting a file into a plurality of data blocks according to a protocol of a distribution layer, assembling the data blocks into the file, encapsulating a downlink object according to the protocol of the distribution layer, decapsulating an uplink object and the like.
In step S504, if the downlink object is an instruction, the distribution layer encapsulates the instruction and sends the instruction to the transport layer, and notifies the transport layer to send the instruction to the client through the instruction channel.
In this embodiment, the instruction distribution layer may be encapsulated first, a file header is added according to a protocol of the distribution layer, and then the file header is sent to the transport layer, so that the transport layer is notified to send to the client through the instruction channel.
Illustratively, a server in the cloud game initiates a screen recording request to obtain a request instruction, the request instruction is confirmed to be the instruction by a distribution layer, a file header is encapsulated and added according to a protocol of the distribution layer, then the file header is sent to a transmission layer and sent to a client through a data channel, and the client executes screen recording operation after receiving the file header.
Fig. 6 is a schematic interaction diagram of a stub layer and a hub layer of the server according to an embodiment of the present application. As shown in fig. 6, the stub layer of the server includes a plurality of functional modules, and an instruction listener, a file manager, a file listener, a data listener, an audio listener, and a video listener are registered in the hub layer, respectively. The instruction listener is used for monitoring the instruction and transmitting the instruction through the instruction processing module. The audio monitor is used for monitoring audio and transmitting the audio through the audio data interface. The video monitor is used for monitoring the video and transmitting the video through the video data interface. The file listener is used for monitoring files, and the data listener is used for monitoring data blocks. In a downlink transmission scene, a file monitor monitors a file generated by the functional module, the file manager splits the file to obtain a plurality of data blocks, and the data monitor monitors the data blocks and then sends the data blocks to the transmission layer through the data processing module.
In the embodiment, each function of the function realization layer can be independently registered to the distribution layer, coupling and interference do not exist between the functions, the new function can be conveniently expanded, the expansibility is greatly improved, the maintenance cost is reduced, and the great function integration flexibility is provided.
In step S505, in response to the operation that the transport layer receives the uplink object of the client, if the uplink object is a streaming media file received through an audio channel or a video channel, the distribution layer directly sends the streaming media file to the streaming media function module in the function implementation layer.
In this embodiment, the transmission layer receives a scene of a streaming media file through an audio channel or a video channel, and the distribution layer directly forwards the streaming media file to a functional module in the function implementation layer after determining the functional module corresponding to the streaming media file without splitting or assembling the file.
Illustratively, a client uses a local camera to record a screen in a cloud game to obtain a video, and a transmission layer of the client sends the video to a transmission layer of a server through a video channel. After the transmission layer of the server receives the video, the distribution layer determines that the corresponding functional module is the camera module of the function realization layer according to the video, and then the distribution layer directly sends the video to the camera module of the function realization layer, so that the screen recording interaction function between the server and the client in the cloud game is completed, the operation on the hardware equipment of the client is realized on the server, and the interaction capacity of the cloud game is improved.
In step S506, if the uplink object is a non-streaming media file received through the data channel, the distribution layer decapsulates the non-streaming media file and sends the non-streaming media file to the file function module of the function implementation layer.
In one embodiment, the step S506 may include:
if the uplink object is a non-streaming media file received through a data channel, a data listener in the distribution layer receives a file header and a plurality of data blocks and forwards the file header and the plurality of data blocks to a file manager, the file manager assembles the file header and the plurality of data blocks into the non-streaming media file, a function module corresponding to the non-streaming media file is determined through the file listener, and the non-streaming media file is sent to a function module of the function implementation layer.
In this embodiment, the data listener functions to listen to the data block, including the file header. However, the data listener does not care whether the data block or the file header is currently being listened to, and forwards the data block or the file header directly to the file manager. The function of the file listener is to listen to the file and not care about the data blocks. That is to say, the data listener and the file listener respectively monitor the data block and the file, and each plays its own role, and has distinct responsibilities, so that the independence is ensured, and the transmission efficiency is improved.
In this embodiment, the data block is a transmission mode of framing, which fully ensures fast response in a cloud game interaction scene, can realize reliable transmission and order preservation, ensures that each data block can reach in order, and ensures data accuracy while improving transmission efficiency.
In this embodiment, the file listener also maintains a list, and records a corresponding relationship between the function module and the file type. The list can determine the corresponding functional module according to the file type. For example, the file listener may monitor an audio file, and may determine that the corresponding functional module is a recording module through a list maintained by the file listener.
Referring to fig. 6, for the upstream non-streaming media file, the data listener in the hub layer listens to the file header and the multiple data blocks from the data processing module, and all the data are directly forwarded to the file manager. And after receiving the file, the file manager assembles the file header and the plurality of data blocks to obtain the file. After the file listener hears the file, the corresponding functional module can be determined according to the maintained list, and then the file is forwarded to the corresponding functional module of the stub layer.
In step S507, if the uplink object is an instruction received through the instruction channel, the distribution layer decapsulates the instruction and sends the decapsulated instruction to the corresponding function module in the function implementation layer.
In this embodiment, the decapsulation processing performed by the distribution layer refers to removing a file header based on a distribution layer protocol in a file to obtain a packet that can be identified by the function implementation layer, so as to facilitate the function implementation layer to continue subsequent operations, regardless of whether the file is an instruction or a non-streaming media file.
In this embodiment, the instruction received by the transport layer of the server may be an instruction corresponding to any functional module. For example, an instruction sent by the client to request the log file corresponds to the log module of the function implementation layer. If the client wants to add characters in the chat interface of the cloud game, copies a section of characters from the memo to the sticky board, returns to the chat interface of the cloud game, and initiates an instruction for copying the content of the sticky board, the instruction corresponds to the sticky board module of the function implementation layer.
In one embodiment, the step S507 may include:
if the uplink object is an instruction received through the instruction channel, the instruction processing module of the distribution layer decapsulates the instruction and sends the decapsulated instruction to the instruction listener, and the instruction listener determines a functional module corresponding to the instruction and sends the functional module to a functional module in the function implementation layer after receiving the decapsulated instruction.
In this embodiment, the instruction listener also maintains a list, and records a correspondence between the functional module and the instruction. The corresponding functional module can be determined by the list according to the instruction. For example, the instruction monitor monitors a recording success response instruction, and a list maintained by the instruction monitor can be inquired to determine that the corresponding functional module is a recording module; or the instruction listener monitors a log request instruction, and can query and determine that the corresponding functional module is the log module through the list maintained by the instruction listener.
Referring to fig. 6, for the uplink instruction, the instruction listener in the hub layer listens to the instruction from the instruction processing module, determines the functional module corresponding to the instruction according to the maintained list, and then forwards the instruction to the corresponding functional module in the stub layer, thereby completing the uplink transmission process.
The embodiment of the application provides a cloud game interaction method which can be applied to a client, wherein the client comprises a function realization layer, a distribution layer and a transmission layer, and a function module in the function realization layer is used for executing an interaction function between a server and the client in a cloud game. Fig. 7 is a flowchart illustrating a cloud game interaction method according to an embodiment of the present application, where the method may include steps S701 to S702.
In step S701, in response to the operation of generating the uplink object by the function implementation layer, after the distribution layer performs distribution processing on the uplink object based on the type of the uplink object, the notification transmission layer sends the uplink object to the server through a corresponding channel in the plurality of channels between the transmission layer and the server.
Illustratively, the distribution layer of the client sends the uplink audio to the transmission layer, and the uplink audio is sent to the server through the audio channel via the transmission layer, or the distribution layer of the client sends the uplink picture to the transmission layer, and the uplink picture is sent to the server through the data channel via the transmission layer, and the distribution layer of the client sends the uplink command to the transmission layer, and the uplink command is sent to the server through the command channel via the transmission layer.
In this embodiment of the application, the multiple channels are established between the client and the server based on the type of the transmission object in the cloud game, and include but are not limited to: an instruction channel, a data channel, an audio channel, a video channel, and the like.
In step S702, in response to the operation that the transport layer receives the downlink object of the server, the distribution layer performs distribution processing on the downlink object based on the type of the downlink object and then sends the downlink object to the corresponding functional module in the function implementation layer.
Illustratively, a distribution layer of the client directly sends a downlink video to a camera module of a stub layer through a transmission layer, or the distribution layer of the client decapsulates a downlink log file and sends the downlink log file to a log module of the stub layer, or the distribution layer of the client decapsulates a downlink positioning instruction and sends the downlink positioning instruction to a sensor module in a function implementation layer.
In one embodiment, the step S701 may include:
responding to the operation of generating the uplink object by the function realization layer, if the uplink object is a streaming media file, the distribution layer directly sends the uplink object to the transmission layer, and informs the transmission layer to send the uplink object to the server through an audio channel or a video channel;
responding to the operation of generating the uplink object by the function realization layer, if the uplink object is a non-streaming media file, the distribution layer encapsulates the uplink object and then sends the encapsulated uplink object to the transmission layer, and the transmission layer is informed to send the encapsulated uplink object to the server through the data channel;
and responding to the operation of generating the uplink object by the function realization layer, if the uplink object is an instruction, the distribution layer encapsulates the uplink object and then sends the uplink object to the transmission layer, and the transmission layer is informed to send the uplink object to the server through the instruction channel.
In one embodiment, the step S702 may include:
responding to the operation that the transmission layer receives the downlink object of the server, and if the downlink object is a streaming media file received through an audio channel or a video channel, the distribution layer directly sends the downlink object to a streaming media function module in the function realization layer;
responding to the operation that the transmission layer receives the downlink object of the server, and if the downlink object is a non-streaming media file received through a data channel, the distribution layer decapsulates the downlink object and sends the decapsulated downlink object to a file function module of the function implementation layer;
and responding to the operation that the transmission layer receives the downlink object of the server, and if the downlink object is an instruction received through the instruction channel, the distribution layer decapsulates the downlink object and sends the decapsulated downlink object to the corresponding functional module in the function implementation layer.
The streaming media function module includes but is not limited to: a camera module or a recording module, etc. The file function modules include but are not limited to: photo album module, log module, pasting board module or sensor module, etc.
In one embodiment, the method may further include:
and the audio and video function module of the function realization layer calls the audio and video API of the WebRTC to obtain a streaming media file as an uplink object.
Fig. 8 is a schematic interaction diagram of a stub layer and a hub layer of a client according to another embodiment of the present application. As shown in fig. 8, the stub layer of the client includes a plurality of functional modules, and an instruction listener, a file manager, a file listener, and a data listener are registered in the hub layer, respectively. The instruction listener is used for monitoring the instructions and transmitting the instructions through the instruction processing module. The file listener is used for monitoring files, and the data listener is used for monitoring data blocks. In an uplink transmission scene, a file monitor monitors files generated by the functional module, the files are split by the file manager to obtain a plurality of data blocks, and the data blocks are sent to the transmission layer through the data processing module after being monitored by the data monitor. In clear distinction from the hub layer of the server, the hub layer of the client does not require audio and video listeners. And a stub layer of the client can directly call an audio and video API of the WebRTC to acquire audio or video.
In this embodiment, the file listener in the hub layer of the client may maintain a list, in which the correspondence between the functional module and the file type is recorded. The list can determine the corresponding functional module according to the file type. For example, the file listener may monitor an audio file, and may determine that the corresponding functional module is a recording module through a list maintained by the file listener.
In this embodiment, the instruction listener in the hub layer of the client also maintains a list, and records a correspondence between the functional module and the instruction. The corresponding functional module can be determined by the list according to the instruction. For example, the instruction listener monitors a recording success response instruction, and a list maintained by the instruction listener can be inquired to determine that the corresponding functional module is a recording module; or the instruction listener monitors a log request instruction, and the corresponding functional module can be inquired and determined to be a log module through the maintained list.
In any of the above embodiments provided by the present application, a distribution layer of a server or a distribution layer of a client may split or assemble a file based on a structured data storage format protocol protobuf. For example, assembling the data blocks in the protobuf protocol format into a file, or splitting the file into the data blocks in the protobuf protocol format, etc.
In addition, the file header in the distribution layer encapsulation or decapsulation may specifically include: the identification of the functional module of the function implementation layer and the version number of the current protocol. The identifier is used for identifying the corresponding functional module, the version number can record the current protocol version, and the version number can be updated when the version is upgraded every time. The identification may be specifically implemented by a function ID field of an int type, and the version number may be specifically implemented by a version number field of an int type.
The manner for encapsulating the instruction or the file based on the protobuf protocol can realize quick response of interaction between the server and the client in the cloud game, improves the performance of the cloud game, can be realized in a cross-platform manner, and has strong compatibility.
In any of the above methods provided in the embodiments of the present application, establishing multiple channels between the server and the client may include: establishing a plurality of channels between the server and the client through a Peer Connection (Peer Connection) object of the webRTC; or, establish a socket connection and establish a plurality of channels between the server and the client based on the socket connection.
The data channel in this embodiment may be a binary data channel, a decimal data channel, or other binary data channels, which is not specifically limited in this embodiment of the present application.
Any of the above methods provided by the embodiments of the present application, whether it is a server side or a client side, may include a step of performing congestion processing by a transport layer. Fig. 9 is a schematic diagram of a transport layer processing mechanism according to another embodiment of the present application. As shown in fig. 9, the transport layer of the server and the transport layer of the client may both perform the handling of the congestion mechanism before sending the file. In the following, a server is taken as an example for explanation, and the congestion processing steps are specifically as follows:
after a distribution layer of the server sends the downlink object subjected to distribution processing to a transmission layer, the transmission layer takes the downlink object as data to be sent, and congestion judgment is carried out on the basis of the data capacity to be sent, the cache data capacity and a specified threshold value;
if the sum of the data capacity to be sent and the cache data capacity is not larger than a specified threshold value, caching the data to be sent to wait for sending;
if the sum of the data volume to be sent and the buffer data volume is larger than the designated threshold, repeatedly delaying the designated duration and retransmitting the data until the sending times do not reach the designated times and the sending is successful or the designated times and the sending is failed.
The designated threshold value may be set as needed, and the specific size is not limited. The buffer data capacity refers to the data capacity which is already in the buffer queue and waiting to be sent. In a scenario where the sum of the data volume to be sent and the buffer data volume is greater than a specified threshold, the capability of being able to send data is already exceeded, and therefore, the data needs to be sent again, the specified duration of the delay can also be set as required, and the specific size is not limited. If the specified time of the delay is up, the retransmission is executed, if the transmission is successful, the retransmission is completed, if the transmission is failed, the retransmission can be continuously tried until the transmission times do not reach the specified times and the transmission is successful or the specified times and the transmission fails.
Illustratively, the threshold X is specified to be 16MB, the cache data is 10MB, and the current data to be sent is 5MB. When the current data to be sent is sent, congestion judgment is firstly carried out, the sum of the capacity of the current data to be sent and the capacity of the cache data is 15MB and is smaller than the specified threshold value 16MB, the current data to be sent can be directly sent, and an instruction of successful sending is returned.
Illustratively, the threshold X is set to be 16MB, the cache data is set to be 10MB, and the current data to be sent is set to be 8MB. When the current data to be sent is sent, congestion judgment is firstly carried out, and the sum of the capacity of the current data to be sent and the capacity of the cache data is 18MB, which is larger than a specified threshold value of 16MB. Therefore, if the transmission is attempted again after a delay of 5ms and the number of times does not exceed the specified number of times, the instruction of the transmission success is returned if the transmission is successful. If the transmission is not successful in 10 continuous attempts, an instruction of failed transmission is returned, namely transmission failure.
In the embodiment of the application, after the server interacts with the client side in the cloud game, the file in the interaction process can be stored in the local Storage space of the server, and the file does not need to be stored in an independent Object Storage Service (OSS), so that resources and cost can be saved. For the cloud game service, because a plurality of users may log in the cloud game, after one user logs out, other users may log in. Therefore, if a file is stored during the login of a user, the server will usually empty the stored file when the user logs out of the login. Because the significance of the file is still not great after the cloud game logs out, the server can be completely deleted after the user logs out, and therefore data errors of the current user caused by the files stored for other users can be avoided after other subsequent users log in the cloud game. Even if the previous user logs in the cloud game again, the previous file is needed to be regenerated, so that the user is not affected, the independence of a plurality of users in the process of executing the cloud game is ensured, the interference is eliminated, the processing capacity of the cloud game is improved, and the user experience is improved.
Corresponding to the application scenario and the method of the method provided by the embodiment of the application, the embodiment of the application further provides a cloud game interaction system. Fig. 10 is a block diagram illustrating a cloud game interaction system according to an embodiment of the present application, where the system may include a server 1001 and a client 1002.
The server 1001 includes a function implementation layer, a distribution layer, and a transport layer, and is configured to establish a plurality of channels between the server and the client based on the types of transport objects; responding to the operation of generating the downlink object by the function realization layer, and informing the transmission layer to send the downlink object to the client through a corresponding channel in the plurality of channels after the distribution layer distributes the downlink object based on the type of the downlink object; and responding to the operation that the transmission layer receives the uplink object of the client, and sending the uplink object to a corresponding functional module in the function realization layer after the distribution layer distributes the uplink object based on the type of the uplink object.
The client 1002 includes a function implementation layer, a distribution layer, and a transport layer, and is configured to respond to an operation of generating an uplink object by the function implementation layer, where the distribution layer notifies the transport layer to send to the server through a corresponding channel of the multiple channels after distributing the uplink object based on the type of the uplink object; and responding to the operation that the transmission layer receives the downlink object of the server, and sending the downlink object to a corresponding functional module in the function realization layer after the distribution layer distributes the downlink object based on the type of the downlink object.
In this embodiment, the function modules in the function implementation layers of the server and the client are used to execute the interaction function between the server and the client in the cloud game.
The server in this embodiment may execute any method applied to the server, and the client in this embodiment may execute any method applied to the client, and the detailed process may refer to corresponding description in the above methods, and have corresponding beneficial effects, which are not described herein again.
The above-mentioned system that this embodiment provided, based on a plurality of passageways transmission object between the server of cloud recreation and client, can reduce the interference, raise the efficiency and security, realize the layering mechanism of layer, distribution layer and transmission layer based on the function in the inside of server and client and transmit, functional module coupling degree is low, easy extension, and the maintenance cost is low, has promoted cloud recreation interactive capability.
FIG. 11 is a block diagram of an electronic device used to implement embodiments of the present application. As shown in fig. 11, the electronic apparatus includes: a memory 1110 and a processor 1120, the memory 1110 having stored therein computer programs that may be executed on the processor 1120. The processor 1120, when executing the computer program, implements the methods in the embodiments described above. The number of the memory 1110 and the processor 1120 may be one or more.
The electronic device further includes: the communication interface 1130 is used for communicating with an external device to perform data interactive transmission.
If the memory 1110, the processor 1120, and the communication interface 1130 are implemented independently, the memory 1110, the processor 1120, and the communication interface 1130 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
Optionally, in an implementation, if the memory 1110, the processor 1120, and the communication interface 1130 are integrated on a chip, the memory 1110, the processor 1120, and the communication interface 1130 may complete communication with each other through an internal interface.
Embodiments of the present application provide a computer-readable storage medium storing a computer program, which when executed by a processor implements the method provided in the embodiments of the present application.
The embodiment of the present application further provides a chip, where the chip includes a processor, and is configured to call and run an instruction stored in a memory from the memory, so that a communication device in which the chip is installed executes the method provided in the embodiment of the present application.
An embodiment of the present application further provides a chip, including: the system comprises an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method provided by the embodiment of the application.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be a processor supporting an Advanced reduced instruction set machine (ARM) architecture.
Further, the memory may optionally include a read only memory and a random access memory. The memory may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may include a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can include Random Access Memory (RAM), which acts as external cache Memory. By way of example, and not limitation, many forms of RAM are available. For example, static Random Access Memory (Static RAM, SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic Random Access Memory (SDRAM), double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM), enhanced SDRAM (ESDRAM), SLDRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the present application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable system. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
Any process or method described in a flow diagram or otherwise herein may be understood as representing a module, segment, or portion of code, which includes one or more executable instructions for implementing specific logical functions or steps of the process. And the scope of the preferred embodiments of the present application includes other implementations in which functions may be performed out of the order shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved.
The logic and/or steps described in the flowcharts or otherwise herein, such as an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, or device (such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, or device and execute the instructions).
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the method of the above embodiments may be implemented by hardware that is configured to be instructed to perform the relevant steps by a program, which may be stored in a computer-readable storage medium, and which, when executed, includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module may also be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
It should be noted that, in the embodiments of the present application, the user data may be used, and in practical applications, the user-specific personal data may be used in the scheme described herein within the scope permitted by the applicable law, under the condition of meeting the requirements of the applicable law and regulations in the country (for example, the user explicitly agrees, the user is informed, etc.).
The above description is only an exemplary embodiment of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of various changes or substitutions within the technical scope of the present application, and these should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (14)

1. A cloud game interaction method is applied to a server, wherein the server comprises a function implementation layer, a distribution layer and a transmission layer, and the method comprises the following steps:
establishing a plurality of channels with the client based on the type of the transmission object;
responding to the operation of generating the downlink object by the function implementation layer, and informing the transmission layer to send the downlink object to the client through a corresponding channel in the plurality of channels after the distribution layer distributes the downlink object based on the type of the downlink object;
responding to the operation that the transmission layer receives the uplink object of the client, and sending the uplink object to a corresponding functional module in the function realization layer after the distribution layer distributes the uplink object based on the type of the uplink object;
the function modules in the function implementation layer are used for executing interaction functions with the client in the cloud game.
2. The method according to claim 1, wherein the notifying, by the distribution layer, the transmission layer to send the downlink object to the client through a corresponding channel of the plurality of channels after the distribution layer performs distribution processing on the downlink object based on the type of the downlink object includes:
if the downlink object is a streaming media file, the distribution layer directly sends the downlink object to the transmission layer and informs the transmission layer to send the downlink object to the client through an audio channel or a video channel;
if the downlink object is a non-streaming media file, the distribution layer encapsulates the downlink object and sends the encapsulated downlink object to the transmission layer, and the transmission layer is informed to send the encapsulated downlink object to the client through a data channel;
and if the downlink object is an instruction, the distribution layer encapsulates the downlink object and then sends the encapsulated downlink object to the transmission layer, and informs the transmission layer of sending the encapsulated downlink object to the client through an instruction channel.
3. The method according to claim 1, wherein the distributing layer sends the uplink object to the corresponding functional module in the function implementation layer after distributing the uplink object based on the type of the uplink object, and the method includes:
if the uplink object is a streaming media file received through an audio channel or a video channel, the distribution layer directly sends the uplink object to a streaming media function module in the function implementation layer;
if the uplink object is a non-streaming media file received through a data channel, the distribution layer decapsulates the uplink object and sends the decapsulated uplink object to a file function module of the function implementation layer;
and if the uplink object is an instruction received through an instruction channel, the distribution layer decapsulates the uplink object and sends the decapsulated uplink object to a corresponding functional module in the function implementation layer.
4. The method according to claim 2, wherein if the downstream object is a non-streaming media file, the distribution layer encapsulates the downstream object and sends the encapsulated downstream object to the transport layer, and notifies the transport layer to send the encapsulated downstream object to the client through a data channel, including:
if the downlink object is a non-streaming media file, the file manager in the distribution layer splits the non-streaming media file into a plurality of data blocks and generates a file header, and the data listener sends the file header and the plurality of data blocks to a transmission layer through a data processing module and informs the transmission layer to send the file header and the plurality of data blocks to the client through a data channel.
5. The method according to claim 3, wherein if the upstream object is a non-streaming media file received through a data channel, the distribution layer decapsulates the upstream object and sends the decapsulated upstream object to the file function module of the function implementation layer, including:
if the uplink object is a non-streaming media file received through a data channel, a data listener in the distribution layer receives a file header and a plurality of data blocks and forwards the file header and the plurality of data blocks to a file manager, the file manager assembles the file header and the plurality of data blocks into the non-streaming media file, a function module corresponding to the non-streaming media file is determined through the file listener, and the non-streaming media file is sent to the function module of the function implementation layer.
6. The method according to claim 3, wherein if the uplink object is an instruction received through an instruction channel, the distribution layer decapsulates the uplink object and sends the decapsulated uplink object to a corresponding functional module in the function implementation layer, including:
if the uplink object is an instruction received through an instruction channel, the instruction processing module of the distribution layer decapsulates the instruction and sends the decapsulated instruction to the instruction listener, and the instruction listener determines a functional module corresponding to the instruction and sends the functional module to the functional module in the function implementation layer after receiving the decapsulated instruction.
7. The method of claim 1, further comprising:
before the transmission layer sends the downlink object after the distribution processing, the transmission layer judges the congestion based on the data capacity to be sent, the cache data capacity and the designated threshold value;
if the sum of the data capacity to be sent and the cache data capacity is not larger than a specified threshold value, caching the data to be sent to wait for sending;
if the sum of the data volume to be sent and the buffer data volume is larger than the designated threshold, repeatedly delaying the designated duration and retransmitting the data until the sending times do not reach the designated times and the sending is successful or the designated times and the sending is failed.
8. The method of claim 1, wherein establishing a plurality of channels with the client based on the type of the transport object comprises:
establishing an instruction channel and a data channel based on a stream control transmission protocol and an audio channel and a video channel based on a secure real-time transmission protocol between the client and the client;
the instruction channel is used for transmitting instructions, the data channel is used for transmitting non-streaming media files, and the audio channel and the video channel are used for transmitting streaming media files.
9. The method of claim 1, wherein the method comprises one of:
the distribution layer splits or assembles files based on a structured data storage format protocol;
and the file header in the encapsulation or the decapsulation of the distribution layer comprises an identifier of a functional module of the function realization layer and a version number of a current protocol.
10. A cloud game interaction method is applied to a client, wherein the client comprises a function realization layer, a distribution layer and a transmission layer, and the method comprises the following steps:
responding to the operation of generating the uplink object by the function realization layer, and informing the transmission layer to send the uplink object to the server through a corresponding channel in a plurality of channels between the transmission layer and the server after the distribution layer distributes the uplink object based on the type of the uplink object;
responding to the operation that the transmission layer receives the downlink object of the server, and sending the downlink object to a corresponding functional module in the function realization layer after the distribution layer distributes the downlink object based on the type of the downlink object;
the function modules in the function implementation layer are used for executing an interactive function with the server in a cloud game, and the channels are established based on the type of the transmission object.
11. The method of claim 10, further comprising:
and the audio and video function module of the function realization layer obtains a streaming media file as an uplink object by calling an audio and video application program interface for audio and video data real-time communication.
12. A cloud game interaction system is characterized by comprising a server and a client;
the server comprises a function realization layer, a distribution layer and a transmission layer and is used for establishing a plurality of channels between the server and the client based on the type of the transmission object; responding to the operation of generating the downlink object by the function implementation layer, and informing the transmission layer to send the downlink object to the client through a corresponding channel in the plurality of channels after the distribution layer distributes the downlink object based on the type of the downlink object; responding to the operation that the transmission layer receives the uplink object of the client, and sending the uplink object to a corresponding functional module in the function realization layer after the distribution layer distributes the uplink object based on the type of the uplink object;
the client comprises a function realization layer, a distribution layer and a transmission layer, and is used for responding to the operation of generating an uplink object by the function realization layer, and the distribution layer informs the transmission layer to send the uplink object to the server through a corresponding channel in the plurality of channels after distributing the uplink object based on the type of the uplink object; responding to the operation that the transmission layer receives the downlink object of the server, and sending the downlink object to a corresponding functional module in the function realization layer after the distribution layer distributes the downlink object based on the type of the downlink object;
the function modules in the function implementation layers of the server and the client are used for executing the interactive function of the server and the client in the cloud game.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory, the processor implementing the method of any one of claims 1-11 when executing the computer program.
14. A computer-readable storage medium, having stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-11.
CN202211702601.8A 2022-12-28 2022-12-28 Cloud game interaction method and system, electronic equipment and storage medium Pending CN115944910A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211702601.8A CN115944910A (en) 2022-12-28 2022-12-28 Cloud game interaction method and system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211702601.8A CN115944910A (en) 2022-12-28 2022-12-28 Cloud game interaction method and system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115944910A true CN115944910A (en) 2023-04-11

Family

ID=87296477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211702601.8A Pending CN115944910A (en) 2022-12-28 2022-12-28 Cloud game interaction method and system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115944910A (en)

Similar Documents

Publication Publication Date Title
KR100890236B1 (en) A method for capturing video data by utilizing a camera cell phone as a camera of a computer
CN108494817B (en) Data transmission method, related device and system
US20180225080A1 (en) Method and apparatus for processing data of a microphone of a terminal, and terminal
US20230118176A1 (en) Data transmission method and apparatus, computer-readable storage medium, electronic device, and computer program product
WO2022017007A1 (en) Audio data processing method, server, and storage medium
CN111092898B (en) Message transmission method and related equipment
WO2021197008A1 (en) Audio/video communication method, terminal, server, computer device, and storage medium
CN105141603A (en) Communication data transmission method and system
CN114124929A (en) Cross-network data processing method and device
CN112398754B (en) Data transmission method, device, medium, electronic equipment and network access equipment
CN113282548A (en) File saving method and device, electronic equipment and storage medium
US11070665B2 (en) Voice over internet protocol processing method and related network device
US20050165983A1 (en) System and method for processing data in kernel area by a user command
CN115944910A (en) Cloud game interaction method and system, electronic equipment and storage medium
EP1430401B1 (en) Extended content storage method and apparatus
CN115022725A (en) Video playing method and device
CN114244758A (en) Network diagnosis method, storage medium, electronic device and system of android platform
CN113726723B (en) UDP-based data transmission method, device and equipment
CN114679574B (en) Monitoring data distribution method and monitoring data distribution device
CN114679433B (en) Video access session management system, method, computer device and storage medium
CN117640594A (en) Data transmission method, apparatus, device, storage medium and computer program product
WO2022199484A1 (en) Media playback method and apparatus and electronic device
WO2022068674A1 (en) Video call method, electronic device and system
CN117896369A (en) File transmission system, file transmission method, man-machine interaction method and robot
CN117061586A (en) Service data sending method, receiving method, device, system and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination