CN114339444A - Method, device and equipment for adjusting playing time of video frame and storage medium - Google Patents

Method, device and equipment for adjusting playing time of video frame and storage medium Download PDF

Info

Publication number
CN114339444A
CN114339444A CN202111508900.3A CN202111508900A CN114339444A CN 114339444 A CN114339444 A CN 114339444A CN 202111508900 A CN202111508900 A CN 202111508900A CN 114339444 A CN114339444 A CN 114339444A
Authority
CN
China
Prior art keywords
time length
video frame
playing
playing time
module
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
CN202111508900.3A
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202111508900.3A priority Critical patent/CN114339444A/en
Publication of CN114339444A publication Critical patent/CN114339444A/en
Pending legal-status Critical Current

Links

Images

Abstract

The present disclosure relates to a method and an apparatus for adjusting a playing time of a video frame, an electronic device and a storage medium, which are applied to a time adjustment module in a cloud platform, and include: receiving a play time length adjustment request of a video frame in a cloud game; the playing time length adjusting request carries the playing time length adjusting information of the video frame; obtaining the target playing time length of the video frame according to the initial playing time length and the playing time length adjusting information of the video frame; and responding to a time acquisition request triggered by a cloud game module in the cloud platform, and returning the target playing time length to the cloud game module. The video frame playing method and device can change the playing time of the video frame, achieve acceleration or deceleration of the video frame, and improve game experience of users.

Description

Method, device and equipment for adjusting playing time of video frame and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for adjusting a playing duration of a video frame.
Background
Cloud gaming is a new technology based on cloud computing. In the cloud game model, game logic and rendering are both run on the server side, and then compressed video is transmitted from the server side to the client side.
In the related art, the rhythm of the game (for example, the playing time length and the playing speed of a video frame in the game) generally complies with the settings of the game itself, but the playing time length of the game cannot be adjusted in response to the request of the user in a manner complying with the settings of the game itself, so that acceleration or deceleration of the game cannot be realized, and the game experience of the user is further reduced.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a device, and a storage medium for playing duration of a video frame, so as to at least solve the problem that in the related art, the playing duration of a game cannot be adjusted in response to a request of a user, so that acceleration or deceleration of the game cannot be realized, and further game experience of the user is reduced. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, a method for adjusting a playing duration of a video frame is provided, which is applied to a duration adjustment module in a cloud platform, and includes:
receiving a play time length adjustment request of a video frame in a cloud game; the playing time length adjusting request carries the playing time length adjusting information of the video frame;
obtaining the target playing time length of the video frame according to the initial playing time length of the video frame and the playing time length adjusting information;
responding to a time acquisition request triggered by a cloud game module in the cloud platform, and returning the target playing time length to the cloud game module; the cloud game module corresponds to the cloud game.
In an exemplary embodiment, hooking a time obtaining function in advance by the time length adjusting module, and returning the target playing time length to the cloud game module in response to a time obtaining request triggered by the cloud game module in the cloud platform includes:
intercepting the time acquisition function in response to the time acquisition request triggered by the time acquisition function called by the cloud game module;
jumping to the first address of the time acquisition function;
updating the instruction in the head address based on the target playing duration to obtain an updated time acquisition function;
returning the updated time acquisition function to the cloud game module; and the cloud game module is used for acquiring the target playing time length from the updated time acquisition function.
In an exemplary embodiment, the playback time adjustment information represents: increasing or shortening the initial playing time of the video frame by a preset number times; the obtaining of the target playing time length of the video frame according to the initial playing time length of the video frame and the playing time length adjustment information includes:
and performing multiplication and division operation on the initial playing time length and the playing time length adjustment information to obtain the target playing time length.
In an exemplary embodiment, the playback time adjustment information represents: skipping playing of preset content in the video frame; the obtaining of the target playing time length of the video frame according to the initial playing time length of the video frame and the playing time length adjustment information includes:
calculating the difference value between the initial playing time length and preset time to obtain the target playing time length; the preset time is the time required for playing the preset content.
In an exemplary embodiment, before the receiving a play time length adjustment request of a video frame in a cloud game, the method further includes:
and hooking the time acquisition function in an inline hooking mode.
In an exemplary embodiment, the receiving a play time length adjustment request of a video frame in a cloud game includes:
receiving the playing time length adjusting request sent by a client;
the method further comprises the following steps:
responding to the time acquisition request, and returning the target playing time length to the cloud game module; the cloud game module is used for adjusting the playing speed of the video frame through the target playing duration and sending the video frame with the adjusted speed to the client; and the client is used for playing the video frame after the speed adjustment.
According to a second aspect of the embodiments of the present disclosure, there is provided a device for adjusting playing duration of a video frame, which is applied to a duration adjustment module in a cloud platform, and includes:
the playing time length adjusting request receiving module is configured to execute a playing time length adjusting request for receiving video frames in the cloud game; the playing time length adjusting request carries the playing time length adjusting information of the video frame;
the target playing time length determining module is configured to execute the adjustment of the playing time length according to the initial playing time length of the video frame and the playing time length to obtain the target playing time length of the video frame;
a time acquisition request response module configured to execute a time acquisition request triggered in response to a cloud game module in the cloud platform, and return the target play duration to the cloud game module; the cloud game module corresponds to the cloud game.
In an exemplary embodiment, the duration adjustment module hooks a time obtaining function in advance, and the time obtaining request response module includes:
an interception unit configured to execute the time acquisition request triggered in response to the cloud game module calling the time acquisition function, and intercept the time acquisition function;
a jumping unit configured to perform jumping to a first address of the time acquisition function;
the updating unit is configured to execute an instruction for updating the head address based on the target playing duration to obtain an updated time acquisition function;
a return unit configured to perform returning the updated time acquisition function to the cloud game module; and the cloud game module is used for acquiring the target playing time length from the updated time acquisition function.
In an exemplary embodiment, the playback time adjustment information represents: increasing or shortening the initial playing time of the video frame by a preset number times; the target playing time length determining module is configured to perform multiplication and division operation on the initial playing time length and the playing time length adjusting information to obtain the target playing time length.
In an exemplary embodiment, the playback time adjustment information represents: skipping playing of preset content in the video frame; the target playing time length determining module is configured to calculate a difference value between the initial playing time length and a preset time to obtain the target playing time length; the preset time is the time required for playing the preset content.
In an exemplary embodiment, the apparatus further comprises:
and the hooking module is configured to perform hooking processing on the time acquisition function in an inline hooking manner.
In an exemplary embodiment, the play time length adjustment request receiving module is configured to execute receiving the play time length adjustment request sent by a client;
the time acquisition request response module is configured to execute the step of returning the target playing time length to the cloud game module in response to the time acquisition request; the cloud game module is used for adjusting the playing speed of the video frame through the target playing duration and sending the video frame with the adjusted speed to the client; and the client is used for playing the video frame after the speed adjustment.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method for adjusting the playing time length of the video frame as described above.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein when executed by a processor of an electronic device, instructions of the computer-readable storage medium cause the electronic device to execute the method for adjusting the playing time of a video frame as described above.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, which includes a computer program, and when the computer program is executed by a processor, the method for adjusting the playing duration of a video frame is implemented.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the time length adjusting module applied to the cloud platform can obtain the target playing time length of the video frame according to the initial playing time length and the playing time length adjusting information of the video frame when receiving the playing time length adjusting request carrying the playing time length adjusting information of the video frame, and return the target playing time length to the cloud game module when responding to the time obtaining request triggered by the cloud game module in the cloud platform. The target playing time returned to the cloud game module is different from the initial playing time, so that the playing time of the video frame is changed, the acceleration or deceleration of the video frame can be realized, and the game experience of a user is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a diagram illustrating an application environment for adjusting the play-out duration of a video frame according to an exemplary embodiment.
Fig. 2 is a schematic diagram illustrating a networking architecture of a cloud game according to an example embodiment.
Fig. 3 is a flowchart illustrating a method for adjusting a play-out duration of a video frame according to an exemplary embodiment.
Fig. 4 is a diagram illustrating a method for shortening an initial play time of a video frame by a preset number times according to an exemplary embodiment.
Fig. 5 is a diagram illustrating an increase in an initial play-out time length of a video frame by a preset number times according to an exemplary embodiment.
Fig. 6 is a diagram illustrating a skipping of preset content in a video frame according to an example embodiment.
Fig. 7 is a flowchart illustrating a process of returning the target play duration to the cloud game module in response to a time acquisition request triggered by the cloud game module in the cloud platform according to an exemplary embodiment.
Fig. 8 is a flowchart illustrating another method for adjusting a play-time duration of a video frame according to an example embodiment.
Fig. 9 is a block diagram of an apparatus for adjusting a playing time of a video frame according to an exemplary embodiment.
FIG. 10 is a block diagram illustrating an electronic device for play-time adjustment of video frames in accordance with an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Referring to fig. 1, fig. 1 is a diagram illustrating an application environment for adjusting a play duration of a video frame according to an exemplary embodiment, where the application environment may include a client 01 and a cloud platform 02.
The cloud platform 02 may include a duration adjustment module, a cloud game module, and a library file (e.g., libc. The library file includes a time acquisition function. Alternatively, the cloud platform may be a cloud host including any operating system type that supports cloud gaming. Optionally, the cloud platform may include, but is not limited to: the cloud host is constructed based on a Linux system, the cloud host is constructed based on a Windows system, the cloud host is constructed based on an Andriod system (android system), the cloud host is constructed based on an iOS system and the like.
The cloud platform may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
The time length adjusting module can be used for hooking a time obtaining function in a library file in advance, receiving a playing time length adjusting request carrying playing time length adjusting information of a video frame in a cloud game, obtaining a target playing time length of the video frame according to the initial playing time length and the playing time length adjusting information of the video frame, responding to the time obtaining request triggered by the cloud game module in the cloud platform, and returning the target playing time length to the cloud game module.
The cloud game module can be used for receiving the target playing time length returned by the time length adjusting module.
The client 01 may be configured to send a play duration adjustment request of a video frame in the cloud game to a duration adjustment module in the cloud platform 02. Alternatively, the client 01 may be a player game terminal held by a user, the player game terminal is used for starting a cloud game, and the player game terminal may include a terminal device such as a smartphone, a desktop computer, a tablet computer, a notebook computer, a digital assistant, an Augmented Reality (AR)/Virtual Reality (VR) device, and a smart wearable device.
It should be noted that the above application environment is only an example, and the embodiments of the present disclosure may also include other application environments.
Fig. 2 is a schematic diagram illustrating a networking architecture of a cloud game according to an example embodiment. As shown in fig. 2, an Application (APP) runs on a client 01, and a cloud game runs on a cloud platform, which may communicate over a network.
The control flow is used for representing game operation instructions (such as instructions triggered by various click operations in a game) for controlling a cloud game on the cloud platform by operating an APP on a user terminal by a user, and can also be used for representing business instructions (such as instructions triggered by login, payment and the like) related to the cloud game between the APP and the cloud game.
And the audio and video stream is used for indicating that the cloud platform can send the audio and video stream of the cloud game to the APP on the client, and the APP is used for displaying a game picture corresponding to the audio and video stream to the user so that the user can further execute game operation to play the game based on the displayed game picture.
Fig. 3 is a flowchart illustrating a method for adjusting a playing time length of a video frame according to an exemplary embodiment, where the method is applied to the time length adjusting module in fig. 1, and may include the following steps.
In step S11, a play time length adjustment request of a video frame in a cloud game is received; the playing time length adjusting request carries the playing time length adjusting information of the video frame.
Illustratively, the duration adjustment module may be a process for adjusting the playing duration in the cloud platform.
In particular, the cloud game may include any type of cloud game. Such as a stand-alone game, a multiplayer online game, etc. The plurality of persons may refer to at least two persons.
Optionally, the video frame corresponds to a cloud game running in the cloud platform, and the video frame may be any game frame in a cloud game video, that is, any playing picture in the cloud game video.
Specifically, the playing duration of a video frame refers to: the time required for playing the video frame can also be understood as the interval time between two picture switches (i.e. the time required for updating each video frame).
For example, in the process of participating in the game, if the playing time of the video frame in the game video is to be adjusted, the video frame in the cloud game video displayed in the client may be clicked and the like, so as to send the playing time adjustment request to the time adjustment module in the cloud platform. Optionally, the playing time length adjustment information may include, but is not limited to: the playing time of the video frame is prolonged, the playing time of the video frame is shortened, the playing of the preset content in the video frame is skipped, and the like.
In practical applications, most mobile phone games develop games by using two major engines (a Cocos2D engine and a Unity3D engine), and the two major engines calculate the playing time of each frame of the game (i.e. the time required for updating each frame) by using a fixed library file function. For example, the Cocos2D engine computes the updates per frame through the gettimeoffday function in the library file, and the Unity3D engine computes the updates per frame by calling clock _ gettime in the library file.
Optionally, the duration adjustment module may perform hooking processing on the time obtaining function in the library file in advance. The time acquisition function may include the gettimeoffday function described above, clock _ gettime, and the like.
In step S13, a target playing time length of the video frame is obtained according to the initial playing time length of the video frame and the playing time length adjustment information.
Specifically, the initial play duration of a video frame refers to: the preset time that is preset by the cloud platform and is required for playing the video frame may also be understood as a preset interval time for switching between two pictures (i.e., a preset time that is required for updating each video frame). The cloud game video generally includes a plurality of video frames, and the initial playing time of each video frame may be the same or different.
In the embodiment of the present disclosure, the initial playing time of the video frame is preset, and the time length adjusting module may obtain the preset initial playing time, and calculate the target playing time length of the video frame according to the initial playing time length of the video frame and the playing time length adjusting information.
It should be noted that, the initial playing time length of each video frame in the cloud game video may be the same or different. Under the condition that the initial playing time length of each video frame is the same, the target playing time length calculated by the time length adjusting module is suitable for all the video frames. For example, the game picture currently being watched by the user is a video frame a, if the user triggers a play duration adjustment request at this time, the duration adjustment module obtains an initial play duration of the video frame a (which is equivalent to obtaining the initial play duration of each video frame), and obtains a target play duration of the video frame a (which is equivalent to obtaining the target play duration of each video frame) according to the initial play duration and the play duration adjustment information of the video frame a.
And under the condition that the initial playing time length of each video frame is different, the target playing time length calculated by the time length adjusting module is suitable for each video frame. In this case, the duration adjustment module needs to obtain the initial playing duration of each video frame in real time, and calculate the target playing duration of each video frame according to the initial playing duration and the playing duration adjustment information. For example, the game picture currently watched by the user is a video frame a, and if the user triggers a play duration adjustment request at this time, the duration adjustment module first obtains an initial play duration of the video frame a, and obtains a target play duration of the video frame a according to the initial play duration and play duration adjustment information of the video frame a. When the game picture is switched from the video frame a to the next video frame (for example, the video frame B), the duration adjustment module may continue to obtain the initial playing duration of the video frame B, and obtain the target playing duration of the video frame B according to the initial playing duration and the playing duration adjustment information of the video frame B, and so on, thereby obtaining the target playing duration of each video frame.
In step S15, in response to a time acquisition request triggered by a cloud game module in the cloud platform, returning the target playing duration to the cloud game module; the cloud game module corresponds to the cloud game.
Specifically, the cloud game module may be a cloud game process in the cloud platform that controls the operation of the cloud game.
In the embodiment of the disclosure, the cloud game module can call the time obtaining function in the library file in real time, and when the time obtaining function is called, the time obtaining request is triggered. Since the time obtaining function is hooked in advance by the time length adjusting module, when the time obtaining function is called, the time length adjusting module can intercept the time length adjusting module, so that the target playing time length is returned to the cloud game module in response to the time obtaining request.
In the embodiment of the disclosure, when receiving a play duration adjustment request carrying play duration adjustment information of a video frame, a duration adjustment module may obtain a target play duration of the video frame according to an initial play duration and the play duration adjustment information of the video frame, and when responding to a time acquisition request triggered by a cloud game module in a cloud platform, return the target play duration to the cloud game module, where the target play duration returned to the cloud game module is different from the initial play duration, that is, change the play duration of the video frame (increase the play duration or shorten the play duration), thereby enabling acceleration or deceleration of the video frame and improving game experience of a user.
In an exemplary embodiment, the play-time adjustment information represents: increasing or shortening the initial playing time of the video frame by a preset number times; the obtaining the target playing duration of the video frame according to the initial playing duration of the video frame and the playing duration adjustment information may include:
and performing multiplication and division operation on the initial playing time length and the playing time length adjustment information to obtain the target playing time length.
Optionally, when the video frame is a cut-in animation, a leader animation, or the like of the cloud game, the user has a need to accelerate playing of the animation, so that time is saved. The user clicks the 'speed-doubling playing' button at the client to display a speed selection box for clicking the speed in the speed selection box, so as to trigger the playing time length adjustment information for shortening the initial playing time of the video frame by a preset time.
The cut scene is a part of the game, when the cut scene is displayed, a player generally cannot actively control the game (or has little control right), and the cut scene is often used for interrupting the current game, developing a story line, displaying the development of a character, or providing background information, environment atmosphere, conversation and clues. The cut scene may be in the form of animation, or may be an actual movie picture.
The leader animation refers to a plurality of animations which are played before the game is played and used for popularizing the brand of a game manufacturer.
Fig. 4 is a diagram illustrating a method for shortening an initial play time of a video frame by a preset number times according to an exemplary embodiment. As shown in fig. 4, when the video frame is a cut scene, a "double speed play" button may be displayed, and a user clicks the "double speed play" button at the client to display a speed selection box. Assuming that the user selects "2X" in the speed selection box, it indicates that the initial play time period of the cutscene needs to be shortened by 2 times. At this time, the time length adjusting module can calculate the ratio of the initial playing time length (assumed to be 5s) of the cut scene animation to the speed multiple speed selected by the user, and obtain the target playing time length of the cut scene animation to be 2.5s, so that the playing time of the cut scene animation is shortened, the acceleration of the cut scene animation is realized, the user can experience the plot content of the game in less time, and the game experience of the user is improved.
Alternatively, when the game rhythm in the cloud game is too fast, the user may not be able to fully draw the game content, or for a difficult game, the user may wish to slow down the game screen in order to easily pass through the level of the game. Therefore, when the video frame is the game picture, the 'one-key deceleration' button can be displayed in the cloud game. The user clicks the 'one-click speed reduction' button at the client to display a speed selection box for clicking the speed in the speed selection box, so as to trigger the change of the initial playing time of the video frame to the preset time of the playing duration adjustment information.
For example, when the user clicks the "speed play" button on the client, the speed selection box may not be displayed, and the initial play time of the game animation may be shortened by a preset number times by default.
Fig. 5 is a diagram illustrating an increase in an initial play-out time length of a video frame by a preset number times according to an exemplary embodiment. As shown in fig. 5, when a video frame is a game picture with high difficulty, a "one-click speed reduction" button can be displayed, and a user clicks the "one-click speed reduction" button at a client, so that the initial playing time of the game animation can be increased by a preset number of times by default, the playing time of the game animation is prolonged, the speed reduction of the game animation is realized, the speed of the whole game is slowed, more obstacle response time is provided for a player, the user can smoothly pass through a game stage, and the game experience of the user is improved.
Illustratively, when the user clicks the "speed-down by one button" button on the client, the speed-down selection box may be displayed, and if the user selects "2X" on the speed-down selection box, it indicates that the initial play time of the video frame needs to be increased by a preset number times (for example, 2 times). At this time, the duration adjustment module may calculate a product of the initial playing duration (assumed to be 5s) of the cut scene and the playing duration adjustment information, so as to obtain a target playing duration of the cut scene as 10 s.
Optionally, when the user clicks the "speed reduction by one key" button at the client, the speed reduction selection box may be displayed, and if the user selects "2X" in the speed reduction selection box, it indicates that the initial playing time of the video frame needs to be increased by 2 times.
In the embodiment of the disclosure, when the representation of the playing duration adjustment information increases or shortens the initial playing duration of the video frame by a preset number times, the multiplication and division operation is performed on the initial playing duration and the playing duration adjustment information to obtain the target playing duration, which not only can improve the precision of calculating the target playing duration, but also can calculate the target playing duration according to the playing duration adjustment information carried in the playing duration adjustment request triggered by the user at the client, so that the determination of the target playing duration can meet the actual requirement of the user, so that the user can experience the scenario content of the game in less time or slow down the speed of the whole game, give more obstacle response time to the user, and improve the game experience of the user.
In an exemplary embodiment, the play-time adjustment information represents: skipping playing of preset content in the video frame; the obtaining the target playing time length of the video frame according to the initial playing time length of the video frame and the playing time length adjustment information includes:
calculating the difference value between the initial playing time length and the preset time to obtain the target playing time length; the preset time is the time required for playing the preset content
Optionally, in the case that the video frame is any video frame in the cloud game video, the preset content may be a part of or all of the content in any video. At this time, the difference between the initial playing time and the preset time required for playing the preset content may be used as the target playing time of the video frame.
Optionally, in a case where the video frames are a plurality of video frames in the cloud game video, the preset content may be a part of or all of the content in the plurality of videos. At this time, the sum of the initial playing times corresponding to the plurality of video frames and the difference between the preset times required for playing the preset contents in the plurality of videos may be used as the target playing times corresponding to the plurality of video frames.
Illustratively, when the video frame is a live animation, a leader animation, a battle round picture (a long waiting time exists in the battle round, and many battle processes belong to full-automatic battles without user operation, and the user needs to watch a uniform battle animation at the moment and can receive a reward after the battle is finished), and the like, the "one-key skip" button can be displayed in the cloud game, and when the user clicks the "one-key skip" button at the client, the play duration adjustment request can be triggered, so that the play of the preset content is skipped.
Fig. 6 is a diagram illustrating a skipping of preset content in a video frame according to an example embodiment. As shown in fig. 6, when the video frame is a battle turn picture, a "one-click skip" button may be displayed, and the user clicks the "one-click skip" button at the client, so that the button may skip playing of the preset content, thereby accelerating the battle process and getting rewards faster. At this time, the duration adjustment module may calculate a difference between an initial playing duration (assumed to be 10s) of the battle round picture and a preset time (for example, 5s) required for playing the preset content, and obtain a target playing duration of the battle round picture as 5s, so that the playing duration of the battle round picture is shortened, skipping of the preset content in the battle round picture is realized, a user does not need to watch a uniform battle animation, rewards are received more quickly, and user game experience is improved.
Continuing with fig. 4, a "skip by one key" button may also be displayed in the scene of passage, and the user may skip playing the preset content by clicking the "skip by one key" button at the client, so that the user may experience the plot content of the game in less time.
In the embodiment of the present disclosure, in the representation of the playing duration adjustment information: when the playing of the preset content in the video frame is skipped, the difference between the initial playing time and the preset time required for playing the preset content can be calculated to obtain the target playing time. The target playing time length calculation method has the advantages that the target playing time length calculation precision can be improved, the target playing time length can be obtained through calculation according to the playing time length adjustment information carried in the playing time length adjustment request triggered by the user at the client, the target playing time length can be determined to meet the actual requirements of the user, the user can skip the uninteresting content, the user time is saved, and the user experience is improved.
In an optional embodiment, before the receiving the request for adjusting the playing time length of the video frame, the method further includes:
and hooking the time acquisition function in an inline hook mode.
In the embodiment of the disclosure, the time acquisition function in the library file can be hooked by an Inline Hook (Hook), and the Inline Hook can modify an instruction in the time acquisition function to change the return time of the time acquisition function, so that the playing duration of the video frame is changed, and the acceleration or deceleration of the game can be realized.
Fig. 7 is a flowchart illustrating a process of returning the target play duration to the cloud game module in response to a time acquisition request triggered by the cloud game module in the cloud platform according to an exemplary embodiment. As shown in fig. 7, in the step S15, the returning the target playing time length to the cloud game module in response to the time obtaining request triggered by the cloud game module in the cloud platform may include:
in step S1501, the time acquisition function is intercepted in response to the time acquisition request triggered by the cloud game module calling the time acquisition function.
In step S1503, jump is made to the head address of the time acquisition function.
In step S1505, the command in the first address is updated based on the target playing time length, and an updated time obtaining function is obtained.
In step S1507, returning the updated time acquisition function to the cloud game module; the cloud game module is used for acquiring the target playing time length from the updated time acquisition function.
For example, the instruction in the update header address may be an instruction in the modify header address, that is, an instruction in the header address is overwritten by the target play time length.
Specifically, the cloud game module may call a time obtaining function in the library in real time, and trigger a time obtaining request, and the library file may forward the event obtaining request to the duration adjustment module. Since the time length adjusting module has previously hook the time obtaining function, the time length adjusting module may intercept the time obtaining function in response to the time obtaining request, and jump to the first address of the time obtaining function. And the time length adjusting module modifies the first instruction in the first address by using the calculated target playing time length so as to obtain an updated time obtaining function. After the update is completed, the time length adjusting module returns the updated time obtaining function to the cloud game module, and the cloud game module can obtain the target playing time length from the time obtaining function.
In the embodiment of the disclosure, the target playing time is inserted into the time obtaining function to change the returning time of the time obtaining function, so that the playing duration of the video frame is changed, and further, the acceleration or deceleration of the game can be realized.
In a possible embodiment, in the step S11, the receiving a play time length adjustment request of a video frame in a cloud game may include:
and receiving the play time length adjustment request sent by the client.
Correspondingly, the method may further include:
responding to the time acquisition request, and returning the target playing time length to the cloud game module; the cloud game module is used for adjusting the playing speed of the video frame according to the target playing duration and sending the video frame with the adjusted speed to the client.
And the client is used for playing the video frame after the speed adjustment.
Specifically, after the cloud game module obtains the target playing time, the playing speed of the video frame can be adjusted through the target playing time, and the video with the speed being jumped to is sent to the client, so that the client plays the video with the speed adjusted. For example, if the target playing time is 2 times the initial playing time, the playing speed of the video frame is reduced by 2 times.
In the embodiment of the present disclosure, the video frame with the adjusted speed may be issued to the client according to the play duration adjustment request triggered by the client, and played by the client. The acceleration or one-key skipping of the video frames can accelerate the progress of the game, reduce the waiting feeling of the user and improve the game experience; the video frame is decelerated, so that the game progress can be slowed down, the challenge difficulty of the game is reduced, the user can smoothly pass the game without the condition of 'card closing', and the user can experience more game contents conveniently.
In the following, the method for adjusting the playing time of a video frame is introduced by taking the example of accelerating the video frame at double speed, the game engine is a Unity engine, and the time obtaining function is clock _ gettime:
fig. 8 is a flowchart illustrating another method for adjusting a play-time duration of a video frame according to an example embodiment. As shown in fig. 8, the method comprises the following steps:
in step S201, when the cloud platform is started, the duration adjustment module is automatically pulled up, and the duration adjustment module performs a clock _ gettime method from Hook to libc.
In step S203, after the user clicks and starts speed-doubling acceleration at the client, a play duration adjustment request carrying play duration adjustment information is triggered (the play duration adjustment information represents that the play duration of a video frame is shortened by a preset number of times), the client transmits the play duration adjustment request to a duration adjustment module, the duration adjustment module records the speed-doubling acceleration inside, and calculates a target play duration of the video frame (i.e., a time required to update the video frame) according to the initial play duration of the video frame and the play duration adjustment information.
In step S205, the cloud game module calls clock _ gettime in libc.
So forwards the time acquisition request to the duration adjustment module in step S207. Because the time length adjusting module is used for intercepting the time acquisition request in advance by a clock _ gettime method from Hook to libc.
In step S209, the duration adjustment module returns the clock _ gettime method with the modified head address to the cloud game module, where a first instruction in the head address of the modified clock _ gettime method is the calculated target playing duration.
In step S2011, the cloud game module executes the first instruction in the first address to increase the speed of the video frame according to the target playing time length.
In step S2013, the cloud game module compresses the accelerated video frames and transmits the compressed video frames to the client.
Fig. 9 is a block diagram of an apparatus for adjusting a playing time of a video frame according to an exemplary embodiment. Referring to fig. 9, the apparatus is applied to a duration adjustment module in a cloud platform, and includes a play duration adjustment request receiving module 31, a target play duration determination module 33, and a time obtaining request response module 35.
A play time length adjustment request receiving module 31 configured to execute a play time length adjustment request for receiving a video frame in a cloud game; the playing time length adjusting request carries the playing time length adjusting information of the video frame.
And a target playing time length determining module 33 configured to execute adjusting information according to the initial playing time length of the video frame and the playing time length to obtain a target playing time length of the video frame.
A time obtaining request responding module 35 configured to execute a time obtaining request triggered by a cloud game module in the cloud platform, and return the target playing time length to the cloud game module; the cloud game module corresponds to the cloud game.
In an exemplary embodiment, the duration adjusting module hooks a time obtaining function in advance, and the time obtaining request responding module includes:
an interception unit configured to execute the time acquisition request triggered in response to the cloud game module calling the time acquisition function, and intercept the time acquisition function;
a jump unit configured to perform jump to a head address of the time acquisition function;
the updating unit is configured to execute an instruction for updating the first address based on the target playing time length to obtain an updated time acquisition function;
a returning unit configured to perform returning of the updated time acquisition function to the cloud game module; the cloud game module is used for acquiring the target playing time length from the updated time acquisition function.
In an exemplary embodiment, the play-time adjustment information represents: increasing or shortening the initial playing time of the video frame by a preset number times; the target playing time length determining module is configured to perform a multiplication and division operation on the initial playing time length and the playing time length adjustment information to obtain the target playing time length.
In an exemplary embodiment, the play-time adjustment information represents: skipping playing of preset content in the video frame; the target playing time length determining module is configured to calculate a difference between the initial playing time length and a preset time to obtain the target playing time length; the preset time is the time required for playing the preset content.
In an exemplary embodiment, the apparatus further comprises:
and the hooking module is configured to perform hooking processing on the time acquisition function in an inline hooking manner.
In an exemplary embodiment, the playing time length adjustment request receiving module is configured to execute receiving of the playing time length adjustment request sent by a client;
the time obtaining request responding module is configured to execute responding to the time obtaining request and return the target playing duration to the cloud game module; the cloud game module is used for adjusting the playing speed of the video frame through the target playing duration and sending the video frame with the adjusted speed to the client; and the client is used for playing the video frame after the speed adjustment.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here
In an exemplary embodiment, there is also provided an electronic device, comprising a processor; a memory for storing processor-executable instructions; when the processor is configured to execute the instructions stored in the memory, the steps of the method for adjusting the playing time length of any video frame in the above embodiments are implemented.
The electronic device may be a terminal, a server, or a similar computing device, taking the electronic device as a server as an example, fig. 10 is a block diagram of an electronic device for adjusting a playing time duration of a video frame according to an exemplary embodiment, where the electronic device 40 may generate a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 41 (the CPU 41 may include but is not limited to a Processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 43 for storing data, and one or more storage media 42 (e.g., one or more mass storage devices) for storing an application 423 or data 422. Memory 43 and storage medium 42 may be, among other things, transient or persistent storage. The program stored on the storage medium 42 may include one or more modules, each of which may include a sequence of instructions operating on the electronic device. Still further, the central processor 41 may be configured to communicate with the storage medium 42, and execute a series of instruction operations in the storage medium 42 on the electronic device 40. The electronic device 40 may also include one or more power supplies 46, one or more wired or wireless network interfaces 45, one or more input-output interfaces 44, and/or one or more operating systems 421, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so forth.
The input output interface 44 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the electronic device 40. In one example, the input/output Interface 44 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In an exemplary embodiment, the input/output interface 44 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
It will be understood by those skilled in the art that the structure shown in fig. 10 is merely an illustration and is not intended to limit the structure of the electronic device. For example, electronic device 40 may also include more or fewer components than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
In an exemplary embodiment, a computer-readable storage medium is further provided, and when executed by a processor of an electronic device, instructions in the computer-readable storage medium enable the electronic device to perform the steps of the play duration adjustment method for any one of the video frames in the above embodiments.
In an exemplary embodiment, a computer program product is further provided, which includes a computer program, and when being executed by a processor, the computer program implements the method for adjusting the playing duration of a video frame provided in any one of the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided by the present disclosure may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for adjusting the playing time length of a video frame is characterized in that a time length adjusting module applied to a cloud platform comprises the following steps:
receiving a play time length adjustment request of a video frame in a cloud game; the playing time length adjusting request carries the playing time length adjusting information of the video frame;
obtaining the target playing time length of the video frame according to the initial playing time length of the video frame and the playing time length adjusting information;
responding to a time acquisition request triggered by a cloud game module in the cloud platform, and returning the target playing time length to the cloud game module; the cloud game module corresponds to the cloud game.
2. The method according to claim 1, wherein the time length adjusting module hooks a time obtaining function in advance, and the returning the target playing time length to the cloud game module in response to a time obtaining request triggered by the cloud game module in the cloud platform comprises:
intercepting the time acquisition function in response to the time acquisition request triggered by the time acquisition function called by the cloud game module;
jumping to the first address of the time acquisition function;
updating the instruction in the head address based on the target playing duration to obtain an updated time acquisition function;
returning the updated time acquisition function to the cloud game module; and the cloud game module is used for acquiring the target playing time length from the updated time acquisition function.
3. The method according to claim 1 or 2, wherein the playback time adjustment information represents: increasing or shortening the initial playing time of the video frame by a preset number times; the obtaining of the target playing time length of the video frame according to the initial playing time length of the video frame and the playing time length adjustment information includes:
and performing multiplication and division operation on the initial playing time length and the playing time length adjustment information to obtain the target playing time length.
4. The method according to claim 1 or 2, wherein the playback time adjustment information represents: skipping playing of preset content in the video frame; the obtaining of the target playing time length of the video frame according to the initial playing time length of the video frame and the playing time length adjustment information includes:
calculating the difference value between the initial playing time length and preset time to obtain the target playing time length; the preset time is the time required for playing the preset content.
5. The method according to claim 2, wherein before the receiving a request for adjusting the playing duration of a video frame in a cloud game, the method further comprises:
and hooking the time acquisition function in an inline hooking mode.
6. The method according to claim 1 or 2, wherein the receiving a request for adjusting the playing duration of a video frame in a cloud game comprises:
receiving the playing time length adjusting request sent by a client;
the method further comprises the following steps:
responding to the time acquisition request, and returning the target playing time length to the cloud game module; the cloud game module is used for adjusting the playing speed of the video frame through the target playing duration and sending the video frame with the adjusted speed to the client; and the client is used for playing the video frame after the speed adjustment.
7. The utility model provides a long adjusting device of broadcast of video frame which characterized in that, is applied to the long adjusting module in the cloud platform, includes:
the playing time length adjusting request receiving module is configured to execute a playing time length adjusting request for receiving video frames in the cloud game; the playing time length adjusting request carries the playing time length adjusting information of the video frame;
the target playing time length determining module is configured to execute the adjustment of the playing time length according to the initial playing time length of the video frame and the playing time length to obtain the target playing time length of the video frame;
a time acquisition request response module configured to execute a time acquisition request triggered in response to a cloud game module in the cloud platform, and return the target play duration to the cloud game module; the cloud game module corresponds to the cloud game.
8. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of adjusting a playout duration of video frames as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, cause the electronic device to perform the method of adjusting a playout duration of video frames as claimed in any one of claims 1 to 6.
10. A computer program product comprising a computer program, wherein the computer program when executed by a processor implements the method for adjusting the playing duration of a video frame according to any one of claims 1 to 6.
CN202111508900.3A 2021-12-10 2021-12-10 Method, device and equipment for adjusting playing time of video frame and storage medium Pending CN114339444A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111508900.3A CN114339444A (en) 2021-12-10 2021-12-10 Method, device and equipment for adjusting playing time of video frame and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111508900.3A CN114339444A (en) 2021-12-10 2021-12-10 Method, device and equipment for adjusting playing time of video frame and storage medium

Publications (1)

Publication Number Publication Date
CN114339444A true CN114339444A (en) 2022-04-12

Family

ID=81051021

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111508900.3A Pending CN114339444A (en) 2021-12-10 2021-12-10 Method, device and equipment for adjusting playing time of video frame and storage medium

Country Status (1)

Country Link
CN (1) CN114339444A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115495615A (en) * 2022-11-15 2022-12-20 浪潮电子信息产业股份有限公司 Method, device, equipment, storage medium and terminal for mutual detection of video and text
CN115514985A (en) * 2022-09-20 2022-12-23 广东省宏视智能科技有限公司 Video processing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541560A (en) * 2011-12-29 2012-07-04 奇智软件(北京)有限公司 Implementation method for speed change software and device
CN104239089A (en) * 2014-06-26 2014-12-24 北京奇虎科技有限公司 Game speed change implementing method and game speed change implementing device
CN111035922A (en) * 2019-10-31 2020-04-21 咪咕互动娱乐有限公司 Game assisting method, device and storage medium
CN112791388A (en) * 2021-01-22 2021-05-14 网易(杭州)网络有限公司 Information control method and device and electronic equipment
WO2021164532A1 (en) * 2020-02-18 2021-08-26 华为技术有限公司 Cloud gaming live broadcast method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541560A (en) * 2011-12-29 2012-07-04 奇智软件(北京)有限公司 Implementation method for speed change software and device
CN104239089A (en) * 2014-06-26 2014-12-24 北京奇虎科技有限公司 Game speed change implementing method and game speed change implementing device
CN111035922A (en) * 2019-10-31 2020-04-21 咪咕互动娱乐有限公司 Game assisting method, device and storage medium
WO2021164532A1 (en) * 2020-02-18 2021-08-26 华为技术有限公司 Cloud gaming live broadcast method and device
CN112791388A (en) * 2021-01-22 2021-05-14 网易(杭州)网络有限公司 Information control method and device and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115514985A (en) * 2022-09-20 2022-12-23 广东省宏视智能科技有限公司 Video processing method and device, electronic equipment and storage medium
CN115495615A (en) * 2022-11-15 2022-12-20 浪潮电子信息产业股份有限公司 Method, device, equipment, storage medium and terminal for mutual detection of video and text
CN115495615B (en) * 2022-11-15 2023-02-28 浪潮电子信息产业股份有限公司 Method, device, equipment, storage medium and terminal for mutual detection of video and text

Similar Documents

Publication Publication Date Title
US10771565B2 (en) Sending application input commands over a network
CN114339444A (en) Method, device and equipment for adjusting playing time of video frame and storage medium
CN108449409B (en) Animation pushing method, device, equipment and storage medium
CN108310766B (en) Data processing method and device, storage medium, processor and terminal
US20170173464A1 (en) Video game processing program, and video game processing system
CN109672918B (en) Animation synchronous playing method and device
CN114344892B (en) Data processing method and related device
CN109495427B (en) Multimedia data display method and device, storage medium and computer equipment
US20230107414A1 (en) Method for controlling virtual object
CN104998412A (en) Single-player game realization method and apparatus
CN111359220B (en) Game advertisement generation method and device and computer equipment
CN113365111A (en) Interaction method and device based on live broadcast
CN108174227B (en) Virtual article display method and device and storage medium
CN108939535B (en) Sound effect control method and device for virtual scene, storage medium and electronic equipment
CN111625353A (en) Virtual resource distribution processing method, device, server and storage medium
CN112169340A (en) Data synchronization verification method, system, computing device and storage medium
CN114666671A (en) Live broadcast praise interaction method, system, device, equipment and storage medium
CN111954041A (en) Video loading method, computer equipment and readable storage medium
CN115671711B (en) Cloud game-based device control method and device, electronic device and readable medium
US20230214084A1 (en) Method for displaying interface, device and storage medium
WO2023284428A1 (en) Live video playback method and apparatus, electronic device, storage medium, and program product
CN113873309A (en) Object playing method and device, electronic equipment and storage medium
CN112156475B (en) Business data processing method and device, electronic equipment and storage medium
CN109999490B (en) Method and system for reducing networking cloud application delay
CN108243356A (en) A kind of continuous playing method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220412

RJ01 Rejection of invention patent application after publication