CN108079578B - Code rate adjusting method and device based on cloud game and storage medium - Google Patents

Code rate adjusting method and device based on cloud game and storage medium Download PDF

Info

Publication number
CN108079578B
CN108079578B CN201711014480.7A CN201711014480A CN108079578B CN 108079578 B CN108079578 B CN 108079578B CN 201711014480 A CN201711014480 A CN 201711014480A CN 108079578 B CN108079578 B CN 108079578B
Authority
CN
China
Prior art keywords
network condition
cloud game
time
determining
current network
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.)
Active
Application number
CN201711014480.7A
Other languages
Chinese (zh)
Other versions
CN108079578A (en
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.)
China Mobile Communications Group Co Ltd
MIGU Interactive Entertainment Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
MIGU Interactive Entertainment 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 China Mobile Communications Group Co Ltd, MIGU Interactive Entertainment Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201711014480.7A priority Critical patent/CN108079578B/en
Publication of CN108079578A publication Critical patent/CN108079578A/en
Application granted granted Critical
Publication of CN108079578B publication Critical patent/CN108079578B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • A63F13/358Adapting the game course according to the network or server load, e.g. for reducing latency due to different connection speeds between clients
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/53Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing
    • A63F2300/534Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing for network load management, e.g. bandwidth optimization, latency reduction
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/53Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing
    • A63F2300/538Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers details of basic data processing for performing operations on behalf of the game client, e.g. rendering

Abstract

The invention discloses a code rate adjusting method based on a cloud game, which comprises the following steps: determining a first moment when a client detects a first operation aiming at a cloud game and a second moment when the client sends first operation data corresponding to the first operation to a server; determining a third moment when the client detects a second operation aiming at the cloud game and a fourth moment when the client sends second operation data corresponding to the second operation to the server; calculating a first time difference according to the first time and the third time; calculating a second time difference according to the second time and the fourth time; and determining the current network condition according to the first time difference and the second time difference, and correspondingly adjusting the encoding rate of the display picture of the cloud game according to the current network condition. The invention also discloses a code rate adjusting device and a storage medium based on the cloud game.

Description

Code rate adjusting method and device based on cloud game and storage medium
Technical Field
The invention relates to a computer technology, in particular to a code rate adjusting method and device based on a cloud game and a storage medium.
Background
At present, with the rapid development of the game industry, terminal technology and network bandwidth, online games have become an indispensable internet application in people's lives. The growing maturity of cloud computing technology has brought forward a 'thin terminal-cloud' service mode, and in this mode, a user terminal is interconnected with high-performance computing resources at the cloud end, so that the user can enjoy high-quality service. The mode is applied to an online game environment, and a novel cloud computing service, namely a cloud game, is bred.
Fig. 1 is a schematic diagram of a basic architecture of a conventional cloud game platform, and as shown in fig. 1, a user registers and logs in a cloud game system through a gateway server, the gateway server provides a list of games that the user currently supports to run, and the user selects a suitable game according to needs or interests and requests to run the corresponding game. The gateway server allocates a special game server such as a physical server or a virtual machine to the user according to the characteristics of the user request, such as the user geographical area, the user level, the configuration requirement and the like, so that the user request is forwarded to the game server, the game server runs and appropriately configures the corresponding game, and the address of the game server is returned to the user; then, the user can directly communicate with the dedicated game server to start running and experience the game.
Through cloud game technology, a user terminal can enjoy different games only through a thin terminal without being installed on a client, actual game operation is stored in a cloud server, and a user can access the games at any place and any time through any terminal equipment such as a personal computer, a tablet personal computer, a mobile phone and the like, so that the threshold of playing games by the user is reduced. And the user terminal only needs to capture basic data of user operation, such as mouse click, keyboard click and the like, and transmits a user operation signal to a cloud server, such as a game server, through high-speed broadband connection, and after receiving the user operation signal, the game server replays the user operation and renders a game effect. That is, the user terminal only needs to receive and decode the video code stream, which greatly reduces the requirement of the user terminal for the configuration of high-end machines.
Along with popularization and popularization of cloud game concepts, more and more users can play games without downloading games to the local terminal in a cloud game mode, and the condition that the users may download games which are not liked by the users due to the fact that the traditional games need to download the games to the local terminal for trial play experience is avoided.
However, due to the characteristics of the cloud game, all the operation processing and rendering of the game images for the cloud game need to be uploaded to the server and sent to the terminal after the rendering processing of the server, so as to realize the game process. Specifically, when the network bandwidth is high or the network speed is high, the network is very smooth, at this time, the operation data of the user on the terminal is quickly uploaded to the server, and the processing result of the server for rendering and operation of the game picture can also be quickly transmitted to the terminal, at this time, the game of the user is very smooth; when the network bandwidth is small and the network speed is slow, the network is relatively blocked, the operation data uploaded to the server by the user in the local area is delayed, and the rendering picture and the operation processing result sent to the terminal by the server are also delayed, so that the game of the user is blocked and unsmooth.
Under the above circumstances, in order to reduce the problem of user game jam caused by network problems, in the prior art, the cloud game server often reduces the encoding rate of the game screen to ensure that the game can be normally performed, however, reducing the encoding rate of the game screen will cause the game screen to be unclear, and will also bring poor use experience to the user.
Therefore, there is no effective solution for how to effectively ensure the balance between the encoding rate of the cloud game display screen and the network bandwidth to better improve the user experience.
Disclosure of Invention
In view of this, embodiments of the present invention are intended to provide a code rate adjustment method, device and storage medium based on a cloud game, so as to solve the problem that it is difficult to effectively ensure the balance between the code rate of a cloud game display screen and the network bandwidth in the prior art.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
the embodiment of the invention provides a code rate adjusting method based on a cloud game, which comprises the following steps:
determining a first moment when a client detects a first operation aiming at a cloud game and a second moment when the client sends first operation data corresponding to the first operation to a server;
determining a third moment when the client detects a second operation aiming at the cloud game and a fourth moment when the client sends second operation data corresponding to the second operation to the server;
calculating a first time difference according to the first time and the third time;
calculating a second time difference according to the second time and the fourth time;
and determining the current network condition according to the first time difference and the second time difference, and correspondingly adjusting the encoding rate of the display picture of the cloud game according to the current network condition.
In the foregoing solution, the determining a current network condition according to the first time difference and the second time difference includes:
calculating a time delay between the first time difference and the second time difference;
and determining the current network condition according to the time delay.
In the foregoing solution, the determining a current network condition according to the time delay includes:
comparing the time delay with a preset time delay threshold value to obtain a comparison result;
and determining the current network condition according to the comparison result.
In the foregoing solution, the determining the current network status according to the comparison result includes:
when the comparison result is that the time delay is greater than the time delay threshold value, determining that the current network condition is a primary network condition;
and when the comparison result is that the time delay is smaller than the time delay threshold value, determining that the current network condition is a secondary network condition.
In the foregoing solution, the correspondingly adjusting the encoding rate of the display screen of the cloud game according to the current network status includes:
when the current network condition is determined to be a primary network condition, reducing the encoding rate of a display picture of the cloud game;
and when the current network condition is determined to be a secondary network condition, improving the encoding rate of the display picture of the cloud game.
The embodiment of the invention provides a code rate adjusting device based on a cloud game, which comprises: the device comprises a first determining module, a calculating module, a second determining module and an adjusting module; wherein the content of the first and second substances,
the first determining module is used for determining a first moment when a client detects a first operation aiming at a cloud game and a second moment when the client sends first operation data corresponding to the first operation to a server; the client is further used for determining a third moment when the client detects a second operation aiming at the cloud game and a fourth moment when the client sends second operation data corresponding to the second operation to the server;
the calculating module is used for calculating a first time difference according to the first time and the third time; the time difference calculating unit is further configured to calculate a second time difference according to the second time and the fourth time;
the second determining module is configured to determine a current network condition according to the first time difference and the second time difference;
and the adjusting module is used for correspondingly adjusting the encoding rate of the display picture of the cloud game according to the current network condition.
In the foregoing solution, the second determining module is specifically configured to:
calculating a time delay between the first time difference and the second time difference;
and determining the current network condition according to the time delay.
In the foregoing solution, the second determining module is specifically configured to:
comparing the time delay with a preset time delay threshold value to obtain a comparison result;
and determining the current network condition according to the comparison result.
In the foregoing solution, the second determining module is specifically configured to:
when the comparison result is that the time delay is greater than the time delay threshold value, determining that the current network condition is a primary network condition;
and when the comparison result is that the time delay is smaller than the time delay threshold value, determining that the current network condition is a secondary network condition.
In the foregoing solution, the adjusting module is specifically configured to:
when the current network condition is determined to be a primary network condition, reducing the encoding rate of a display picture of the cloud game;
and when the current network condition is determined to be a secondary network condition, improving the encoding rate of the display picture of the cloud game.
The embodiment of the invention provides a storage medium, wherein an executable program is stored on the storage medium, and when the executable program is executed by a processor, the steps of the code rate adjusting method based on the cloud game provided by the embodiment of the invention are realized.
The embodiment of the invention also provides a code rate adjusting device based on the cloud game, which comprises a memory, a processor and an executable program which is stored on the memory and can be run by the processor, wherein the processor executes the steps of the code rate adjusting method based on the cloud game provided by the embodiment of the invention when running the executable program.
The code rate adjusting method, the code rate adjusting device and the storage medium based on the cloud game provided by the embodiment of the invention are used for determining a first moment when a client detects a first operation aiming at the cloud game and a second moment when the client sends first operation data corresponding to the first operation to a server; determining a third moment when the client detects a second operation aiming at the cloud game and a fourth moment when the client sends second operation data corresponding to the second operation to the server; calculating a first time difference according to the first time and the third time; calculating a second time difference according to the second time and the fourth time; and determining the current network condition according to the first time difference and the second time difference, and correspondingly adjusting the encoding rate of the display picture of the cloud game according to the current network condition. Therefore, the encoding rate of the cloud game display picture can be adaptively adjusted according to the determined current network condition, so that the encoding rate of the cloud game display picture is more suitable for the current network condition.
Drawings
FIG. 1 is a basic architecture diagram of a conventional cloud gaming platform;
fig. 2 is a schematic flow chart illustrating an implementation process of a code rate adjustment method based on a cloud game according to an embodiment of the present invention;
fig. 3 is a functional structure diagram of a code rate adjustment device based on a cloud game according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a code rate adjustment device based on a cloud game according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail below with reference to the accompanying drawings and examples. It should be understood that the examples provided herein are merely illustrative of the present invention and are not intended to limit the present invention. In addition, the following embodiments are provided as partial embodiments for implementing the present invention, not all embodiments for implementing the present invention, and the technical solutions described in the embodiments of the present invention may be implemented in any combination without conflict.
Before further detailed description of the present invention, terms and expressions referred to in the embodiments of the present invention are described, and the terms and expressions referred to in the embodiments of the present invention are applicable to the following explanations.
Network latency, as used herein, refers to the round-trip time for a data packet to be sent from the user's computer to the web server, and then to be returned from the web server to the user's computer. The network delay mainly comprises the following types of delay:
1) propagation delay, that is, the time required for the electromagnetic wave to propagate in the channel, where the propagation delay is the channel length/the transmission rate of the electromagnetic wave on the channel;
2) sending delay, namely the time required for sending data, wherein the sending delay is the length of a data block/the bandwidth of a channel;
3) queuing delay, the delay experienced by data waiting to be sent in a queue at a switching node.
Generally, the total network delay is transmission delay + queuing delay.
Generally, when playing a conventional network game, watching a video or watching a live broadcast, a user can generally calculate the current network delay according to the delay calculation method. Taking a traditional network game as an example, when a user plays the game, the Processing and rendering of the game picture and the calculation of the user operation are performed through a client installed locally, the rendering and displaying are performed by using a Central Processing Unit (CPU) and a display card of a local terminal, the server only needs to store data uploaded by the user and sends a data packet to the client of the user in response to the request of the user, and the client can perform Processing by itself after receiving the data packet sent by the server, so the client can calculate the network delay according to the time for receiving the data packet and the time for sending the data packet by the server. The situation of watching live broadcast or video is similar, data interaction is carried out between the server and the client, the client carries out relevant processing after receiving the data sent by the server, and the server is only responsible for sending the data to the client, so that the delay condition is often caused by the reasons, and the client can also determine the current network delay condition in a traditional mode.
In the field of cloud games, the traditional network delay calculation method cannot be applied. Due to the adoption of the idea architecture of the cloud game, any picture rendering, game data calculation and player operation processing are completed on the server, and besides game picture data, operation data of a user also needs to be transmitted between the server and the user terminal. After receiving the data packet recorded with the user operation sent by the terminal, the server does not immediately feed back data to the terminal, but first performs calculation processing on the received data packet, which also needs time consuming, so that in the cloud game, the client cannot send the data packet from the terminal of the user to the website server, and then returns response data from the website server to the back-and-forth time of the user terminal as network delay. Therefore, the invention provides a novel method for calculating network time delay suitable for a cloud game.
Fig. 2 is a schematic diagram illustrating an implementation flow of a code rate adjustment method based on a cloud game according to an embodiment of the present invention, and as shown in fig. 2, the implementation flow of the code rate adjustment method based on the cloud game according to the embodiment of the present invention includes the following steps:
step 201: determining a first moment when a client detects a first operation aiming at a cloud game and a second moment when the client sends first operation data corresponding to the first operation to a server;
here, in the process of performing the cloud game through the terminal, when the user triggers and responds to the game operation through operations such as clicking or sliding, the terminal records the operation input by the user and uploads the operation to the background server of the cloud game, and meanwhile, the terminal records the time corresponding to the triggering of the operation by the user, where the time may be local time of the terminal or standard time on a network acquired by the terminal.
It should be noted that, in order to avoid the problem that the network condition determined according to the local time of the terminal is inaccurate, in one embodiment, the terminal may generally acquire the standard time on the network, and use the acquired standard time on the network as the time corresponding to the operation.
Here, since the network transmission speed is fast, the time for transmitting data between the terminal and the server can be accurate to milliseconds. In order to accurately determine the current network condition, when the game terminal records the time corresponding to the operation instruction, the time is often accurate to millisecond. For example, the operation instruction triggering time recorded by the game terminal is as follows: 10: 21: 30: 12, namely, the time for triggering the operation instruction by the user is: 10 o' clock 21 min 30 sec 12 msec.
It should be noted that, in order to ensure that the code rate of the game screen can be set according to the current network condition of the user at the beginning of the game, before the user starts the cloud game and prepares to perform the cloud game, the game terminal pops up a specific interface to prompt the user to perform network condition detection. In this case, the user may input several game operations on the terminal according to the prompt information popped up by the terminal, and the terminal records the time corresponding to the several game operations input by the user.
Here, when a user inputs a game operation instruction on the game terminal, the terminal uploads the game operation instruction to the game server, and the game server receives the game operation instruction and records the time when the operation instruction is received.
It should be noted that, while uploading the game operation instruction input by the user to the server, the game terminal also uploads the recorded time when the game operation instruction is received to the server, so that the server can determine the current network status of the user according to the time later.
Step 202: determining a third moment when the client detects a second operation aiming at the cloud game and a fourth moment when the client sends second operation data corresponding to the second operation to the server;
here, the second operation is different from the first operation, and accordingly, a first time when the first operation for the cloud game is detected is different from a third time when the second operation for the cloud game is detected. Similarly, a second time when the client sends the first operation data corresponding to the first operation to the server is different from a fourth time when the client sends the second operation data corresponding to the second operation to the server.
Step 203: calculating a first time difference according to the first time and the third time, and calculating a second time difference according to the second time and the fourth time;
step 204: determining the current network condition according to the first time difference and the second time difference;
in this embodiment, the step 204 specifically includes: calculating a time delay between the first time difference and the second time difference; and determining the current network condition according to the time delay.
Here, the determining the current network condition according to the time delay includes:
comparing the time delay with a preset time delay threshold value to obtain a comparison result;
and determining the current network condition according to the comparison result.
The determining the current network condition according to the comparison result includes:
when the comparison result is that the time delay is greater than the time delay threshold value, determining that the current network condition is a primary network condition;
and when the comparison result is that the time delay is smaller than the time delay threshold value, determining that the current network condition is a secondary network condition.
How to calculate and determine the current network conditions is further described below with a specific example.
Suppose that a user inputs two operations in sequence on a game terminal, and triggers two game operation instructions corresponding to the operations, which are respectively marked as a game operation instruction a and a game operation instruction b, and the time when the game terminal records that the two game operation instructions are detected is respectively: the operation trigger time tc (a) corresponding to the game operation command a is 14: 20: 30: 12, the operation trigger time tc (b) corresponding to the game operation command b is 14: 20: 35: 12; time ts (a) when the server receives operation data corresponding to the game operation command a is 14: 20: 31: 12, a time ts (b) when the server receives the operation data corresponding to the game operation command b is 14: 20: 36: 42, the current network condition of the user can be determined by the following formula (1):
t ═ ts (ts), (b) -ts (a) - (tc (b) -tc (a)) formula (1)
And comparing the calculated T value with a preset time delay threshold value to determine the current network condition.
For example, when T ≦ 5ms, then the current network condition is determined to be excellent;
when T is more than 5 and less than or equal to 10ms, the current network condition can be determined to be good;
when T is more than 10 and less than or equal to 15ms, the current network condition can be determined to be general;
when T >15ms, then the current network conditions may be determined to be poor.
Step 205: and correspondingly adjusting the encoding rate of the display picture of the cloud game according to the current network condition.
In this embodiment, the step 205 specifically includes: when the current network condition is determined to be a primary network condition, reducing the encoding rate of a display picture of the cloud game;
and when the current network condition is determined to be a secondary network condition, improving the encoding rate of the display picture of the cloud game.
If the server pre-stores the corresponding code rates under various network conditions, the server can adjust the code rate of the cloud game display picture according to the determined network conditions according to the calculation result so as to ensure that the game animation can be issued to the game terminal used by the user at the code rate suitable for the current network conditions.
It should be noted that, since the network condition may change at any time, in order to adjust the game code rate according to the current network condition in real time, in an embodiment, the server may perform the network condition detection according to the above steps at preset time intervals, so as to achieve the effects of determining the network condition in real time and adjusting the code rate in real time according to the network condition.
By adopting the method provided by the scheme, the terminal can record the time corresponding to the game operation input by the user in the process of the cloud game, the cloud game server can also record the time of the operation received by the server, further, the current network status is judged by comparing the time difference of the receiving operation, and the encoding rate of the cloud game display picture is adjusted according to the determined current network status, so that, the encoding rate of the cloud game display picture can be adaptively adjusted according to the determined current network condition, compared with the prior art that the display picture is coded by a fixed coding rate, the embodiment of the invention can effectively ensure the balance between the coding rate and the network bandwidth of the display picture of the cloud game, and greatly improve the use experience of users.
In order to implement the code rate adjustment method based on the cloud game, an embodiment of the present invention further provides a code rate adjustment device based on the cloud game, and fig. 3 is a schematic functional structure diagram of the code rate adjustment device based on the cloud game provided by the embodiment of the present invention, as shown in fig. 3, the code rate adjustment device based on the cloud game includes a first determining module 301, a calculating module 302, a second determining module 303, and an adjusting module 304; wherein the content of the first and second substances,
the first determining module 301 is configured to determine a first time when a client detects a first operation for a cloud game, and a second time when the client sends first operation data corresponding to the first operation to a server; the client is further used for determining a third moment when the client detects a second operation aiming at the cloud game and a fourth moment when the client sends second operation data corresponding to the second operation to the server;
the calculating module 302 is configured to calculate a first time difference according to the first time and the third time; the time difference calculating unit is further configured to calculate a second time difference according to the second time and the fourth time;
the second determining module 303 is configured to determine a current network condition according to the first time difference and the second time difference;
the adjusting module 304 is configured to correspondingly adjust the encoding rate of the display screen of the cloud game according to the current network status.
Here, the second determining module 303 is specifically configured to:
calculating a time delay between the first time difference and the second time difference;
and determining the current network condition according to the time delay.
For determining the current network condition according to the time delay, the following method can be adopted: comparing the time delay with a preset time delay threshold value to obtain a comparison result; and determining the current network condition according to the comparison result.
For determining the current network condition according to the comparison result, the following method can be adopted: when the comparison result is that the time delay is greater than the time delay threshold value, determining that the current network condition is a primary network condition; and when the comparison result is that the time delay is smaller than the time delay threshold value, determining that the current network condition is a secondary network condition.
Here, the adjusting module 304 is specifically configured to:
when the current network condition is determined to be a primary network condition, reducing the encoding rate of a display picture of the cloud game;
and when the current network condition is determined to be a secondary network condition, improving the encoding rate of the display picture of the cloud game.
It should be noted that: in the code rate adjusting device based on the cloud game provided in the foregoing embodiment, when performing the code rate adjustment, only the division of the program modules is exemplified, and in practical applications, the processing allocation may be completed by different program modules as needed, that is, the internal structure of the code rate adjusting device based on the cloud game is divided into different program modules to complete all or part of the processing described above. In addition, the code rate adjustment device based on the cloud game and the code rate adjustment method based on the cloud game provided by the embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment and is not described again.
In practical applications, the first determining module 301, the calculating module 302, the second determining module 303 and the adjusting module 304 may be implemented by a CPU, a Microprocessor (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like on a computer device.
In order to implement the code rate adjusting method based on the cloud game, the embodiment of the invention also provides a hardware structure of the code rate adjusting device based on the cloud game. A cloud game-based bitrate adjustment apparatus that implements an embodiment of the present invention will now be described with reference to the accompanying drawings, which may be implemented in various forms of terminal devices, such as various types of computer devices, e.g., desktop computers, notebook computers, smart phones, and the like. In the following, the hardware structure of the code rate adjustment device based on the cloud game according to the embodiment of the present invention is further described, it can be understood that fig. 4 only shows an exemplary structure of the code rate adjustment device based on the cloud game, and not a whole structure, and a part of the structure or a whole structure shown in fig. 4 may be implemented as needed.
Referring to fig. 4, fig. 4 is a schematic diagram of a hardware structure of a code rate adjustment apparatus based on a cloud game according to an embodiment of the present invention, which may be applied to various terminal devices running an application program in practical applications, where the code rate adjustment apparatus 400 based on the cloud game shown in fig. 4 includes: at least one processor 401, memory 402, a user interface 403, and at least one network interface 404. The various components of the cloud-based bitrate adjustment apparatus 400 are coupled together by a bus system 405. It will be appreciated that the bus system 405 is used to enable communications among the components. The bus system 405 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 405 in fig. 4.
The user interface 403 may include, among other things, a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touch pad, or a touch screen.
It will be appreciated that the memory 402 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory.
The memory 402 in the embodiment of the present invention is used to store various types of data to support the operation of the code rate adjustment apparatus 400 based on the cloud game. Examples of such data include: any computer program, such as the executable program 4021 and the operating system 4022, for operating on the cloud game based rate adjustment apparatus 400, and a program implementing the cloud game based rate adjustment method according to the embodiment of the present invention may be included in the executable program 4021.
The code rate adjustment method based on the cloud game disclosed by the embodiment of the invention can be applied to the processor 401, or can be realized by the processor 401. The processor 401 may be an integrated circuit chip having signal processing capabilities. In the implementation process, the steps of the code rate adjustment method based on the cloud game may be completed by an integrated logic circuit of hardware in the processor 401 or an instruction in the form of software. The processor 401 described above may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. Processor 401 may implement or perform the methods, steps, and logic blocks provided in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method provided by the embodiment of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 402, and the processor 401 reads the information in the memory 402 and performs the steps of the aforementioned methods in conjunction with its hardware.
In this embodiment, the cloud game-based bitrate adjustment apparatus 400 includes a memory 402, a processor 401, and an executable program 4021 stored on the memory 402 and capable of being executed by the processor 401, where the processor 401 implements, when executing the executable program 4021: determining a first moment when a client detects a first operation aiming at a cloud game and a second moment when the client sends first operation data corresponding to the first operation to a server; determining a third moment when the client detects a second operation aiming at the cloud game and a fourth moment when the client sends second operation data corresponding to the second operation to the server; calculating a first time difference according to the first time and the third time; calculating a second time difference according to the second time and the fourth time; and determining the current network condition according to the first time difference and the second time difference, and correspondingly adjusting the encoding rate of the display picture of the cloud game according to the current network condition.
As an embodiment, when the processor 401 runs the executable program 4021, it implements: calculating a time delay between the first time difference and the second time difference; and determining the current network condition according to the time delay.
As an embodiment, when the processor 401 runs the executable program 4021, it implements: comparing the time delay with a preset time delay threshold value to obtain a comparison result; and determining the current network condition according to the comparison result.
As an embodiment, when the processor 401 runs the executable program 4021, it implements: when the comparison result is that the time delay is greater than the time delay threshold value, determining that the current network condition is a primary network condition; and when the comparison result is that the time delay is smaller than the time delay threshold value, determining that the current network condition is a secondary network condition.
As an embodiment, when the processor 401 runs the executable program 4021, it implements: when the current network condition is determined to be a primary network condition, reducing the encoding rate of a display picture of the cloud game; and when the current network condition is determined to be a secondary network condition, improving the encoding rate of the display picture of the cloud game.
An embodiment of the present invention further provides a storage medium, for example, a memory 402 shown in fig. 4 and including a computer program, where the computer program is executable by a processor 401 of the code rate adjustment apparatus 400 based on a cloud game to perform the steps of the foregoing method. The storage medium provided by the embodiment of the invention can be a storage medium such as an optical disk, a flash memory or a magnetic disk, and can be selected as a non-instantaneous storage medium.
The storage medium provided by the embodiment of the present invention stores an executable program 4021 thereon, and when executed by the processor 401, the executable program 4021 implements: determining a first moment when a client detects a first operation aiming at a cloud game and a second moment when the client sends first operation data corresponding to the first operation to a server; determining a third moment when the client detects a second operation aiming at the cloud game and a fourth moment when the client sends second operation data corresponding to the second operation to the server; calculating a first time difference according to the first time and the third time; calculating a second time difference according to the second time and the fourth time; and determining the current network condition according to the first time difference and the second time difference, and correspondingly adjusting the encoding rate of the display picture of the cloud game according to the current network condition.
As an embodiment, the executable program 4021 when executed by the processor 401 implements: calculating a time delay between the first time difference and the second time difference; and determining the current network condition according to the time delay.
As an embodiment, the executable program 4021 when executed by the processor 401 implements: comparing the time delay with a preset time delay threshold value to obtain a comparison result; and determining the current network condition according to the comparison result.
As an embodiment, the executable program 4021 when executed by the processor 401 implements: when the comparison result is that the time delay is greater than the time delay threshold value, determining that the current network condition is a primary network condition; and when the comparison result is that the time delay is smaller than the time delay threshold value, determining that the current network condition is a secondary network condition.
As an embodiment, the executable program 4021 when executed by the processor 401 implements: when the current network condition is determined to be a primary network condition, reducing the encoding rate of a display picture of the cloud game; and when the current network condition is determined to be a secondary network condition, improving the encoding rate of the display picture of the cloud game.
The method comprises the steps of determining a first moment when a client detects a first operation aiming at a cloud game and a second moment when the client sends first operation data corresponding to the first operation to a server; determining a third moment when the client detects a second operation aiming at the cloud game and a fourth moment when the client sends second operation data corresponding to the second operation to the server; calculating a first time difference according to the first time and the third time; calculating a second time difference according to the second time and the fourth time; and determining the current network condition according to the first time difference and the second time difference, and correspondingly adjusting the encoding rate of the display picture of the cloud game according to the current network condition. Therefore, the encoding rate of the cloud game display picture can be adaptively adjusted according to the determined current network condition, so that the encoding rate of the cloud game display picture is more suitable for the current network condition.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or executable program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of an executable program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and executable program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by executable program instructions. These executable program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor with reference to a programmable data processing apparatus to produce a machine, such that the instructions, which execute via the computer or processor with reference to the programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These executable program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These executable program instructions may also be loaded onto a computer or reference programmable data processing apparatus to cause a series of operational steps to be performed on the computer or reference programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or reference programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.

Claims (10)

1. A code rate adjusting method based on a cloud game is characterized by comprising the following steps:
determining a first moment when a client detects a first operation aiming at a cloud game and a second moment when the client sends first operation data corresponding to the first operation to a server;
determining a third moment when the client detects a second operation aiming at the cloud game and a fourth moment when the client sends second operation data corresponding to the second operation to the server;
calculating a first time difference according to the first time and the third time;
calculating a second time difference according to the second time and the fourth time;
calculating the time delay between the first time difference and the second time difference, determining the current network condition according to the time delay, and correspondingly adjusting the encoding rate of the display picture of the cloud game according to the current network condition.
2. The code rate adjustment method based on the cloud game according to claim 1, wherein the determining a current network condition according to the time delay comprises:
comparing the time delay with a preset time delay threshold value to obtain a comparison result;
and determining the current network condition according to the comparison result.
3. The code rate adjustment method based on the cloud game according to claim 2, wherein the determining the current network condition according to the comparison result comprises:
when the comparison result is that the time delay is greater than the time delay threshold value, determining that the current network condition is a primary network condition;
and when the comparison result is that the time delay is smaller than the time delay threshold value, determining that the current network condition is a secondary network condition.
4. The method for adjusting code rate based on cloud game of claim 3, wherein the adjusting the code rate of the display screen of the cloud game according to the current network condition comprises:
when the current network condition is determined to be a primary network condition, reducing the encoding rate of a display picture of the cloud game;
and when the current network condition is determined to be a secondary network condition, improving the encoding rate of the display picture of the cloud game.
5. A code rate adjustment device based on a cloud game, the device comprising: the device comprises a first determining module, a calculating module, a second determining module and an adjusting module; wherein the content of the first and second substances,
the first determining module is used for determining a first moment when a client detects a first operation aiming at a cloud game and a second moment when the client sends first operation data corresponding to the first operation to a server; the client is further used for determining a third moment when the client detects a second operation aiming at the cloud game and a fourth moment when the client sends second operation data corresponding to the second operation to the server;
the calculating module is used for calculating a first time difference according to the first time and the third time; the time difference calculating unit is further configured to calculate a second time difference according to the second time and the fourth time;
the second determining module is configured to calculate a time delay between the first time difference and the second time difference, and determine a current network condition according to the time delay;
and the adjusting module is used for correspondingly adjusting the encoding rate of the display picture of the cloud game according to the current network condition.
6. The cloud-game-based bitrate adjustment device according to claim 5, wherein the second determining module is specifically configured to:
comparing the time delay with a preset time delay threshold value to obtain a comparison result;
and determining the current network condition according to the comparison result.
7. The cloud-game-based bitrate adjustment device according to claim 6, wherein the second determining module is specifically configured to:
when the comparison result is that the time delay is greater than the time delay threshold value, determining that the current network condition is a primary network condition;
and when the comparison result is that the time delay is smaller than the time delay threshold value, determining that the current network condition is a secondary network condition.
8. The cloud game-based bitrate adjustment device according to claim 7, wherein the adjustment module is specifically configured to:
when the current network condition is determined to be a primary network condition, reducing the encoding rate of a display picture of the cloud game;
and when the current network condition is determined to be a secondary network condition, improving the encoding rate of the display picture of the cloud game.
9. A storage medium having an executable program stored thereon, wherein the executable program when executed by a processor implements the steps of the code rate adjustment method based on the cloud game according to any one of claims 1 to 4.
10. A cloud game-based bitrate adjustment device, comprising a memory, a processor and an executable program stored on the memory and capable of being executed by the processor, wherein the processor executes the executable program to perform the steps of the cloud game-based bitrate adjustment method according to any one of claims 1 to 4.
CN201711014480.7A 2017-10-26 2017-10-26 Code rate adjusting method and device based on cloud game and storage medium Active CN108079578B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711014480.7A CN108079578B (en) 2017-10-26 2017-10-26 Code rate adjusting method and device based on cloud game and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711014480.7A CN108079578B (en) 2017-10-26 2017-10-26 Code rate adjusting method and device based on cloud game and storage medium

Publications (2)

Publication Number Publication Date
CN108079578A CN108079578A (en) 2018-05-29
CN108079578B true CN108079578B (en) 2020-12-01

Family

ID=62170616

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711014480.7A Active CN108079578B (en) 2017-10-26 2017-10-26 Code rate adjusting method and device based on cloud game and storage medium

Country Status (1)

Country Link
CN (1) CN108079578B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109040851B (en) * 2018-08-06 2021-02-12 广州方硅信息技术有限公司 Delay processing method, system, server and computer readable storage medium for playing game based on live broadcast
CN110743162A (en) * 2019-09-29 2020-02-04 深圳市九洲电器有限公司 Cloud game running method and system
CN110812835B (en) * 2019-11-06 2021-07-16 腾讯科技(深圳)有限公司 Cloud game detection method and device, storage medium and electronic device
CN110996125B (en) * 2019-11-18 2021-08-17 腾讯科技(深圳)有限公司 Video stream generation method and device, electronic equipment and storage medium
CN111135569B (en) * 2019-12-20 2024-01-19 RealMe重庆移动通信有限公司 Cloud game processing method and device, storage medium and electronic equipment
CN111107440B (en) * 2019-12-26 2022-02-25 腾讯科技(深圳)有限公司 Video transmission control method and device, equipment and storage medium
CN111245680B (en) * 2020-01-10 2021-10-08 腾讯科技(深圳)有限公司 Method, device, system, terminal and server for detecting cloud game response delay
CN113556261B (en) * 2020-04-26 2024-02-13 阿里巴巴集团控股有限公司 Data communication method, device, electronic equipment and computer readable storage medium
CN111617466B (en) * 2020-05-12 2023-04-28 咪咕文化科技有限公司 Method and device for determining coding format and method for realizing cloud game
CN111882626B (en) * 2020-08-06 2023-07-14 腾讯科技(深圳)有限公司 Image processing method, device, server and medium
CN113727152A (en) * 2021-08-27 2021-11-30 广州简悦信息科技有限公司 Method, device and storage medium for adjusting code rate
CN113891153A (en) * 2021-09-30 2022-01-04 杭州雾联科技有限公司 Cloud game streaming processing method, device and medium
CN114221870B (en) * 2021-12-16 2023-01-20 北京达佳互联信息技术有限公司 Bandwidth allocation method and device for server
CN114827104B (en) * 2022-05-17 2024-02-23 咪咕文化科技有限公司 Time delay adjustment method, device, equipment and computer readable storage medium
CN116896577B (en) * 2023-09-08 2023-11-17 深圳云天畅想信息科技有限公司 Streaming automatic degradation control method, recommended resolution and frame rate acquisition method

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101242359B (en) * 2008-02-27 2010-08-18 华为技术有限公司 Dynamic code rate allocation method and packet domain stream media server
CN101577715A (en) * 2009-06-19 2009-11-11 腾讯科技(深圳)有限公司 Method and device for synchronizing online game time
US9844728B2 (en) * 2011-12-16 2017-12-19 Zynga Inc. Providing social network content in games
CN103248682A (en) * 2013-04-27 2013-08-14 华为技术有限公司 Optimization method and device for bandwidth usage
CN103533386A (en) * 2013-10-21 2014-01-22 腾讯科技(深圳)有限公司 Live broadcasting control method and anchor equipment
CN105263066A (en) * 2014-06-13 2016-01-20 珠海全志科技股份有限公司 Mobile equipment video stream transmission control method and system
CN105611316B (en) * 2014-11-21 2019-05-03 华为终端(东莞)有限公司 A kind of method, apparatus and system adjusting frame per second
CN104598292B (en) * 2014-12-15 2017-10-03 中山大学 A kind of self adaptation stream adaptation and method for optimizing resources applied to cloud game system
CN106412628B (en) * 2015-07-30 2020-07-24 华为技术有限公司 Bandwidth adjusting method and related equipment
US11420114B2 (en) * 2015-09-30 2022-08-23 Sony Interactive Entertainment LLC Systems and methods for enabling time-shifted coaching for cloud gaming systems
CN106209500A (en) * 2016-06-28 2016-12-07 北京小米移动软件有限公司 For the method and apparatus detecting the network bandwidth
CN106730836B (en) * 2016-12-22 2019-12-13 Tcl集团股份有限公司 Method and system for reducing network delay of ARPG game
CN106791821A (en) * 2016-12-30 2017-05-31 合网络技术(北京)有限公司 Play appraisal procedure and device

Also Published As

Publication number Publication date
CN108079578A (en) 2018-05-29

Similar Documents

Publication Publication Date Title
CN108079578B (en) Code rate adjusting method and device based on cloud game and storage medium
US10080966B2 (en) System and method for experiencing advertised interactive applications
US10771565B2 (en) Sending application input commands over a network
US9060207B2 (en) Adaptive video streaming over a content delivery network
US9549152B1 (en) Application content delivery to multiple computing environments using existing video conferencing solutions
EP3343844B1 (en) System and method for use of a media content bot in a social messaging environment
US20130013671A1 (en) System and method for providing interactive content to non-native application environments
CN111277869B (en) Video playing method, device, equipment and storage medium
CN104506937A (en) Method and system for sharing processing of audios and videos
US11490173B2 (en) Switch of audio and video
CN112203111B (en) Multimedia resource preloading method and device, electronic equipment and storage medium
US10326704B2 (en) Enabling continuous content playback
US11837261B2 (en) Branching logic in a playback environment
CN110209975B (en) Method, apparatus, device and storage medium for providing object
US20150134846A1 (en) Method and apparatus for media segment request retry control
WO2019114330A1 (en) Video playback method and apparatus, and terminal device
US20150268808A1 (en) Method, Device and System for Multi-Speed Playing
CN107959659B (en) Streaming media playing control method and device and electronic equipment
CN104641655A (en) Terminal cache method, terminal and server
CN109603153B (en) Virtual event processing method and device, electronic equipment and storage medium
WO2017185632A1 (en) Data transmission method and electronic device
KR20140102838A (en) An apparatus for presenting cloud streaming services, a method thereof and a system thereof
JP7162019B2 (en) DATA STREAMING METHOD, DATA STREAMING DEVICE, AND COMPUTER PROGRAM
US20230291957A1 (en) Device and method for displaying video
CN113626402A (en) Log data acquisition method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant