Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above 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 invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of an embodiment of the present invention, there is provided a method for controlling a play speed. Alternatively, the above-mentioned control method of the playing speed can be applied, but not limited, to the application environment as shown in fig. 1. As shown in fig. 1, a target client of a target application is running on a terminal device 102, and the target client can play a media file (e.g., a video), and the first media file is currently playing on the target client. The terminal device 102 may be connected to a server 106 through the network 104, and the server 106 may be a background server of the target client for providing the media file to the target client for playing.
The terminal device 102 or the server 106 may determine a first time required to move from the current location of the terminal device 102 to the target location; and adjusting the playing speed of the first media file on the target client according to the first time.
Alternatively, the target position may be a destination of a current trip of a target object corresponding to the terminal device 102.
Optionally, in this embodiment, the terminal device 102 may be a terminal device configured with the target client, and may include but is not limited to at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), notebook computers, tablet computers, palm computers, MID (Mobile Internet Devices), PAD, desktop computers, etc. Such networks may include, but are not limited to: a wired network, a wireless network, wherein the wired network comprises: a local area network, a metropolitan area network, and a wide area network, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communication. The server may be a single server or a server cluster composed of a plurality of servers. The above is only an example, and the present embodiment is not limited to this.
Optionally, in this embodiment, as an optional implementation manner, the method may be executed by a server, or may be executed by a terminal device, or may be executed by both the server and the terminal device. As shown in fig. 2, the flow of the method for controlling the play speed may include the steps of:
step S202, determining a first time required for moving from the current position of the terminal to the target position;
step S204, according to the first time, the playing speed of the first media file on the target client is adjusted.
Optionally, the above-mentioned control method of the playing speed may be, but not limited to, in the process of playing the media file using the client or in other scenes for controlling the playing speed of the client.
For example, a user plays a current video using a target client running on a terminal. The terminal or the background server of the target client may determine a first time required for the user to reach the destination (corresponding to the target location); and adjusting the playing speed of the current video according to the first time. For example, if the current video cannot be played at the current playing speed until the destination is reached, the playing speed of the current video may be adjusted faster so that as much content as possible is played before the user reaches the destination. For another example, if the current video has been played at the current playing speed for a period of time before the destination is reached, the playing speed of the current video may be slowed down to reduce the blank time that the user has in the process of reaching the destination.
By the embodiment, a first time required for moving from the current position of the terminal to the target position is determined by adopting a mode of adaptively adjusting the playing speed; according to the first time, the playing speed of the first media file on the target client is adjusted, the technical problems of complex operation and poor user experience existing in a playing speed control mode in the related technology are solved, the operation required for adjusting the video playing speed is simplified, and the user experience is improved.
The method for controlling the playback speed will be described with reference to fig. 2.
In step S202, a first time required to move from the current position of the terminal to the target position is determined.
The terminal can be operated with a target client, and the target client can be a client with a media file playing function. The target client may be a client that logs in using a target account, or may be a client that exists in a web page or other form, where the target account is used to identify a target object. The target client may also be a client that is not logged in using any account, wherein the terminal identification of the terminal may be used to identify the target object.
The media file can be a video, a PPT or other files with continuous playing function in time.
Optionally, in this embodiment, before determining a first time required to move from the current location of the terminal to the target location, obtaining, by the target client, selection information of a target object corresponding to the terminal, where the selection information includes: a target location.
Before or during the playing of the first media file is started, the user may set the play mode of the target client to the road mode by performing a specific operation. In the route mode, the user can set selection information (route-related information) related to the current route, and the selection information may include: target location (destination of current trip).
In addition to the target location, the selection information may include one of the following: the vehicle used to complete the current trip (e.g., bus, train, private car, walk, etc.). For different vehicles, the selection information may further include: vehicle information (e.g., train number information of a bus, train, bus, etc.) corresponding to a vehicle.
For example, after the user selects the playing mode as the route mode, the user enters the setting interface shown in fig. 3, the user may select information such as a destination of the current route, a vehicle used, a video to be played, and the like, the selected vehicle is a bus, and the user may further select information of the number of buses, a driving mode of the bus, and the like. When the selection box after the video to be played is selected is clicked, the user can jump to the video selection list to be played as shown in fig. 4. The user may select a video to be played or a designated episode.
For another example, if the user selects the route mode during playing the media file, the media file to be played may be defaulted as the current media file without the user selecting the media file to be played.
Through the embodiment, the target client side obtains the selection information containing the target position, so that the target position can be conveniently determined, and the accuracy of determining at the first time is further ensured.
In addition to the target location, the current location of the terminal may be obtained by a positioning system (e.g., global positioning system, GPS) on the terminal to determine a first time to move from the current location to the target location. The operation of acquiring the current position is event-triggered (for example, detecting that the road mode is entered, detecting an operation instruction for triggering the play speed update), or may be periodically triggered (for example, after the road mode is entered, periodically triggering the play speed update, periodically determining the first time and the remaining time, and updating the play speed).
The first time for moving from the current position to the target position may be determined in various ways, for example, the first time may be determined according to a real-time speed of the terminal and a moving path from the current position to the target position, the first time may be determined according to an average speed of the terminal and a moving path from the current position to the target position, and the first time may be determined according to auxiliary information (e.g., a train schedule, time information provided by a third party), for example.
As an alternative embodiment, determining the first time required to move from the current location of the terminal to the target location may include: determining a moving route for moving from a current position to a target position; acquiring the current moving speed of the terminal through a speed sensor on the terminal; a first time required to move to the target position along the movement route at the movement speed is determined.
After the user selects to enter the road mode, the current position and the target position of the terminal can be obtained, and a moving route from the current position to the target position is planned. In the case where there are a plurality of routes from the current location to the destination location, a plurality of routes may be displayed on the destination client (for example, as shown in fig. 5), and a moving route may be determined according to the selection of the user. For the determined movement route, the remaining length of the movement route (the distance S from the current position to the target position) may be calculated.
In the process of playing the first media file using the route mode, the target client may display a map interface including a moving route according to the operation of the user, and change the moving route according to the detected selection information.
The terminal may be provided with a speed sensor, and may determine a current moving speed of the terminal (target object) according to speed information of the terminal detected by the speed sensor, or may determine the current moving speed of the target object in other manners (for example, the moving speed of the terminal may be determined by using positioning information of the terminal and by a distance moved in a short time). It should be noted that the determination method of the moving speed may be similar to the method of detecting the moving speed of the terminal by the map software, and is not described herein again.
After the moving speed is determined, a first time required for moving to the target position according to the moving route at the current moving speed may be determined according to the distance from the current position to the target position and the current moving speed.
According to the embodiment, the current moving speed of the user determined by the speed sensor on the terminal determines the first time required for moving to the target position at the current moving speed according to the planned moving route, the determination mode is simple, and the occupation of software and hardware resources of the terminal is reduced.
As another alternative, determining the first time required to move from the current location of the terminal to the target location may include: determining a moving route from a current position to a target position; determining the stroke length of the finished stroke of the terminal and a second time consumed for finishing the finished stroke; determining the average moving speed for completing the finished stroke according to the stroke length and the second time; a first time required to move to a target location along a movement route at an average movement speed is determined.
The movement route can be planned in the same manner as described above. After the moving route is planned, the length of the completed journey (the length of the journey from the initial position for collecting the journey information to the current position) and the second time consumed for completing the completed journey can be recorded, and the average moving speed for completing the completed journey is calculated according to the completed journey length and the second time.
After determining the average moving speed, a first time required to move to the target location along the moving route at the average moving speed may be determined based on the distance from the current location to the target location and the average moving speed.
By the embodiment, the first time required for moving to the target position according to the planned moving route at the average moving speed is determined according to the average moving speed of the finished journey, so that the inaccurate determination of the moving speed caused by the change of the moving speed of the terminal (such as waiting for a red light, parking, acceleration and deceleration) can be avoided, and the accuracy of the determined first time is improved.
As still another alternative embodiment, determining the first time required to move from the current location of the terminal to the target location may include: the method comprises the steps that vehicle information is obtained through a target client, wherein the vehicle information is used for representing a vehicle used for moving from a current position to a target position, the vehicle runs according to a preset running route, one or more preset parking positions are arranged on the running route, each parking position in the one or more parking positions corresponds to one parking moment, and the one or more parking positions correspond to the target parking position corresponding to the target position; determining a target parking time corresponding to the target parking position; and determining the time difference between the target parking time and the current time as the first time.
For public transportation, each vehicle may have a predetermined stop location or locations, and each stop location may correspond to a predetermined stop time, or a predicted stop time (e.g., a predicted stop time for map-like software). The target position of the current trip may correspond to a target stop position, which corresponds to a target stop time. And if the time difference between the current time and the target stop time is smaller than the first time, the first time is the time difference between the target stop time and the current time.
For example, for a 10-line subway from an origin station a to a destination station B of 13:00 departure, a station C is a station corresponding to a target position, the stop time of the station C is 13:40, the target stop time corresponding to the target position is 13:40, and the first time is 20 minutes if the current time is 13: 20.
By the embodiment, the first time is determined by using the auxiliary information, so that the process of determining the first time can be simplified, and the accuracy of determining the first time is improved. And the first time is determined according to the stopping time of the vehicle, so that the first media file can be guaranteed to be played before the vehicle is taken, the potential safety hazard caused by the fact that a user watches the first media file when walking is avoided, and the safety of the user is guaranteed.
In step S204, a playing speed of the first media file on the target client is adjusted according to the first time.
After the first time is determined, the playing speed of the first media file can be adjusted according to the first time, the first media file is a media file played on a target client, and the target client can be a client running on a terminal.
Besides the first time, the remaining playing time of the first media file can be determined, and the remaining time refers to: the time required for the target client to play the first media file at the current playing speed may be: the playing from the current time to the last time of the first media file may also refer to: play from the current time to the time when the end of the slice starts (e.g., set to skip the beginning and end of the slice).
As yet another alternative implementation, determining the remaining time for the target client to play the currently played first media file may include: determining a first moment of current playing of a first media file and a second moment of beginning of the end of the first media file; and determining the time required for playing from the first time to the second time according to the first playing speed as the remaining playing time.
For example, if the total duration of the first media file is 1 hour, 58 minutes and 48 seconds, the current playing time is 1 hour, 20 minutes and 00 seconds, and the ending time of the first media file is 1 hour, 56 minutes and 00 seconds, the remaining playing time may be 38 minutes and 48 seconds, or 36 minutes.
By the embodiment, the remaining duration of the feature of the media file is used as the remaining time of the first media file, so that unnecessary play time of the end of the clip can be removed, and the accuracy of calculating the remaining time can be ensured.
Optionally, the remaining playing time may also be the total playing time of a particular segment (e.g., a highlight segment) remaining in the first media file, which may be identified together when the first media file is published, or may be identified before the target object plays the first media file.
After the remaining playing time is determined, the first time and the remaining playing time may be compared, and the playing speed of the first media file may be adjusted according to the comparison result.
Optionally, in this embodiment, when the first time is less than the remaining playing time and the current first playing speed of the first media file is less than the maximum playing speed allowed by the target client, the playing speed of the first media file is adjusted from the first playing speed to a second playing speed, where the second playing speed is greater than the first playing speed.
If the first time is less than the remaining playing time, and the current first playing speed of the first media file is less than the maximum playing speed allowed by the target client, the first media file is played at the current playing speed, and when the first media file reaches the target position, the first media file cannot be played completely, so that the playing speed of the first media file can be increased, and more media file contents can be played as far as possible.
By the embodiment, under the condition that the first time is less than the remaining playing time and the current first playing speed of the first media file is less than the maximum playing speed allowed by the target client, the playing speed of the first media file is increased, the capability of the target client for playing the media file can be improved, and the user experience is improved.
The playback speed allowed by the target client may be various, for example, as shown in fig. 6, normal playback (1 × speed), low speed (0.5 × speed, 0.75 × speed, etc.), high speed (1.25 × speed, 1.5 × speed, 1.75 × speed, 2 × speed, 2.5 × speed, 3 × speed, etc.).
The play speed of the first media file may be increased in a number of ways. For example, the play speed of the first media file may be increased from the first play speed by a play speed one step higher than the first play speed (e.g., from 1.5 times to 1.75 times).
Optionally, in this embodiment, after determining the remaining playing time of the first media file, determining a ratio of the remaining playing time to the first time; based on the ratio, an adjusted play speed (e.g., a second play speed, a third play speed) is determined.
Before adjusting the playing speed, the adjusted playing speed may be determined according to a ratio of the remaining playing time to the first time (the first ratio, for example, the determined first time is 20 minutes, the remaining time is 30 minutes, and the ratio of the remaining time to the first time is 1.5).
Through the embodiment, the adjusted playing speed is determined according to the ratio of the remaining playing time to the first time, and the rationality of the adjustment of the playing speed can be improved.
It should be noted that the adjusted play speed may also be determined according to a ratio of the remaining duration of the first media file (the time required for playing at the normal play speed) to the first time. For example, if the first time is 15 minutes, the video content of the first video that is still 30 minutes is not played, and the current playing speed is 1.5 times, the remaining duration of the first video is 30 minutes, and the remaining playing time for playing the first video is 20 minutes, then the ratio of the remaining playing time to the first time is: 2, the ratio of the remaining duration of the first video to the first time is: 4/3.
Optionally, in this embodiment, before the playing speed of the first media file is adjusted from the first playing speed to the second playing speed, a ratio of the remaining playing time to the first time may be determined, and in a case that a product of the ratio and the first playing speed is greater than or equal to the maximum playing speed, the maximum playing speed is determined as the second playing speed; and under the condition that the product of the ratio and the first playing speed is less than the maximum playing speed, determining the minimum playing speed which is greater than or equal to the product of the ratio and the first playing speed in a plurality of playing speeds allowed by the target client as a second playing speed.
After determining the ratio of the remaining playing time to the first time (first ratio), the product of the ratio and the first playing speed is the playing speed (target playing speed) required for playing the first media file at the first time. The playback speed may not be the playback speed allowed by the target client. After the target playing speed is determined, a second playing speed may be determined according to a relationship between the target playing speed and a playing speed allowed by the target client.
If the target play speed is greater than or equal to the maximum play speed, the maximum play speed may be determined as the second play speed. If the target play speed is less than the maximum play speed, a minimum play speed greater than or equal to the target play speed among a plurality of play speeds allowed by the target client may be determined as the second play speed.
For example, if the determined first ratio is 4/3, and the current playback speed is 1.5 times, the target playback speed is 2 times, the maximum playback speed allowed by the target client is 3 times, and the playback speed allowed by the target client is 2 times, the second playback speed is 2 times.
For another example, if the determined first ratio is 1.3, and the current playback speed is 1.25 times, the target playback speed is 1.625 times, the maximum playback speed allowed by the target client is 3 times, and if the 1.75 times speed is the minimum playback speed allowed by the target client that is greater than or equal to the target playback speed, the second playback speed is 1.75 times speed.
For another example, if the determined first ratio is 2, and the current playing speed is 2 times, the target playing speed is 4 times, the maximum playing speed allowed by the target client is 3 times, and the target playing speed is greater than the maximum playing speed, the second playing speed is 3 times.
It should be noted that the target playing speed may also be determined according to the remaining duration of the first media file and the first time, and a ratio of the remaining duration of the first media file to the first time may be used as the target playing speed.
Through the embodiment, the second playing speed is determined according to the comparison between the target playing speed (the product of the ratio and the first playing speed) and the playing speed allowed by the client, so that the setting of the second playing speed is facilitated, and the accuracy of determining the second playing speed can be improved.
The first time length may also be greater than or equal to the remaining time length, the first media file may be played back at the current playback speed before the destination is reached, no operation may be performed, and the first media file may be played back at the current speed.
Optionally, in this embodiment, after determining the remaining time for the target client to play the currently played first media file, in a case that the first time is greater than the remaining time and the current first play speed of the first media file is greater than the minimum play speed (or the normal play speed) allowed by the target client, the play speed of the first media file may be adjusted from the first play speed to a third play speed, where the third play speed is less than the first play speed.
The way of adjusting the play speed may be: first, determining a target play speed (the target play speed may be similar to the foregoing manner), and in the case that the target play speed is less than or equal to the minimum play speed, determining the minimum play speed as a second play speed; and under the condition that the target playing speed is greater than the minimum playing speed, determining the minimum playing speed which is greater than or equal to the target playing speed in a plurality of playing speeds allowed by the target client as a third playing speed.
Optionally, since the normal play speed better conforms to the viewing preference of the user, if the first time is longer than the remaining time and the current first play speed of the first media file is greater than the normal play speed (1 × speed play) of the target client, the play speed of the first media file may be slowed down to improve the viewing experience of the user. If the first time is greater than the remaining time and the current first playing speed of the first media file is less than or equal to the normal playing speed (1 × speed playing) of the target client, the current playing speed can be maintained to improve the viewing experience of the user.
Through the embodiment, when the first time is longer than the remaining time, the playing speed is adaptively slowed down, so that the playing of the media file is suitable for the playing habit of the user, and the watching experience of the user is improved.
Optionally, in this embodiment, after determining the remaining playing time of the first media file currently played by the target client, in a case that the first time is greater than or equal to the remaining playing time, a second media file having an association relationship with the first media file may be determined; determining total playing time corresponding to the first media file and the second media file, wherein the total playing time is the sum of the remaining playing time and the playing time required for playing the second media file at the first playing speed; under the condition that the first time is less than the total playing time and the current first playing speed of the first media file is less than the maximum playing speed allowed by the target client, adjusting the playing speed of the first media file from the first playing speed to a fourth playing speed, wherein the fourth playing speed is greater than the first playing time; and continuously playing the first media file and the second media file at a fourth playing speed.
When the first time is greater than or equal to the remaining play time, if the first media file is one media file in an associated media file set (a television drama, a drama associated with a drama in a television drama), determining a second media file having an association relationship with the first media file (the association relationship between the first media file and the second media file can be set when the media file is released or after the media file is released), determining the play time required for playing the second media file at the current play speed, and adding the remaining play time for playing the first media file and the play time required for playing the second media file to obtain the total play time; and determining whether the playing speed needs to be adjusted and the adjusting direction according to the relation between the first time and the total playing time.
The way of adjusting the playing speed according to the relationship between the first time and the total playing time is similar to the way of adjusting the playing speed according to the relationship between the first time and the remaining time, and the total playing time can be used as the remaining time to select the second playing speed, which is not described herein again.
Through the embodiment, the integrity of the content watched by the user is ensured and the user experience is improved by adding the second media file associated with the first media file.
Steps S202 to S206 may be performed in a loop (periodic trigger), or may be triggered after a target event is detected (for example, an update operation is detected and a traffic jam condition is detected). For event triggering, the operation of automatically adding the associated media files can be executed, more episodes are automatically added to participate in the calculation of the remaining time of the total media files, the completeness of watching the episodes by the user can be ensured, and the user experience is improved.
The following describes a method for controlling the playback speed in this embodiment with reference to an alternative example. The playing speed control method in this example can dynamically adjust the playing speed of the media according to the time of the user path planning. When the video is played, the time consumed by the user to reach the destination is estimated by calculating the current movement speed of the user, the playing speed is dynamically adjusted, and the user just finishes playing when the user reaches the vicinity of the destination.
As shown in fig. 7, the method for controlling the play speed in the present example may include the steps of:
in step S702, the video is set to the road mode.
The user can set the video play mode to the road mode on the client.
In step S704, a destination is set.
The user may select a target location on the client and calculate a route.
Step S706, calculates the path length of the route from the current position to the destination.
The background server of the terminal or the target client calculates the path length S of the route from the current position to the destination (the distance from the current position to the target location).
Step S708, the current movement speed of the user is obtained in real time.
The background server of the terminal or the target client may detect the movement speed V of the current user.
In step S710, the time required to reach the destination is calculated.
The terminal or the background server of the target client can calculate the time (first time) still needed to reach the target location: and T is S/V.
In step S712, the remaining playing time of the video is calculated.
The background server of the terminal or the target client may calculate the remaining playing time T2 of the current video.
Step S714, determining whether the playing is finished, if so, finishing, otherwise, executing step S716.
In step S716, the current double speed of the video is set to (T2/T).
The background server of the terminal or the target client can set the playing speed N which is currently required by the video to be T2/T. The double-speed playing refers to playing at a certain speed multiplied on the basis of the normal playing speed. The video playing interface for setting the double speed can be as shown in fig. 8.
With this example, reasonable viewing or listening times can be scheduled for users on the way according to the user's route planning time: the playing speed of the video is dynamically adjusted, when the video is long or the episode is large, the user can be guaranteed to finish normally (or finish the appointed episode) when arriving near the destination, and the integrity experience of watching the video or listening to the audio on the way of the user is improved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to still another aspect of the embodiments of the present invention, there is also provided a play-speed control apparatus for implementing the above-mentioned play-speed control method, as shown in fig. 9, the apparatus including:
(1) a first determining unit 902 for determining a first time required to move from a current location of the terminal to a target location;
(1) a first adjusting unit 904, configured to adjust a playing speed of the first media file on the target client according to the first time.
Optionally, the above-mentioned control device for the playing speed may be, but not limited to, in the process of playing the video using the client, or in other scenes that control the playing speed of the terminal.
Alternatively, the first determining unit 902 may be configured to perform step S202, and the first adjusting unit 904 may be configured to perform step S204.
By the embodiment, a first time required for moving from the current position of the terminal to the target position is determined by adopting a mode of adaptively adjusting the playing speed; according to the first time, the playing speed of the first media file on the target client is adjusted, and the playing speed of the media file is adjusted according to the time required for moving to the target position, so that the technical problems of complex operation and poor user experience of a control mode of the playing speed in the related technology are solved, the operation required for adjusting the video playing speed is simplified, and the user experience is improved.
As an optional technical solution, the first adjusting unit 904 includes:
(1) the first determining module is used for determining the remaining playing time of the first media file;
(2) and the first adjusting module is used for adjusting the playing speed of the first media file from the first playing speed to a second playing speed under the condition that the first time is less than the residual playing time and the current first playing speed of the first media file is less than the maximum playing speed allowed by the target client, wherein the second playing speed is greater than the first playing speed.
By the embodiment, under the condition that the first time is less than the remaining playing time and the current first playing speed of the first media file is less than the maximum playing speed allowed by the target client, the playing speed of the first media file is increased, the capability of the target client for playing the media file can be improved, and the user experience is improved.
As an optional technical solution, the apparatus further includes:
(1) a second determining unit, configured to determine a ratio of the remaining playing time to the first time before adjusting the playing speed of the first media file from the first playing speed to a second playing speed;
(2) a third determination unit configured to determine the maximum playback speed as the second playback speed in a case where a product of the ratio and the first playback speed is greater than or equal to the maximum playback speed;
(3) and a fourth determining unit, configured to determine, as the second play speed, a minimum play speed that is greater than or equal to a product of the ratio and the first play speed among the plurality of play speeds allowed by the target client, if the product of the ratio and the first play speed is less than the maximum play speed.
Through the embodiment, the second playing speed is determined according to the comparison between the target playing speed (the product of the ratio and the first playing speed) and the playing speed allowed by the client, so that the setting of the second playing speed is facilitated, and the accuracy of determining the second playing speed can be improved.
As an optional technical solution, the apparatus further includes:
and the second adjusting unit is used for adjusting the playing speed of the first media file from the first playing speed to a third playing speed under the condition that the first time is greater than the remaining playing time and the current first playing speed of the first media file is greater than the minimum playing speed allowed by the target client after the remaining playing time of the first media file is determined, wherein the third playing speed is less than the first playing speed.
Through the embodiment, when the first time is longer than the remaining time, the playing speed is adaptively slowed down, so that the playing of the media file is suitable for the playing habit of the user, and the watching experience of the user is improved.
As an optional technical solution, the apparatus further includes:
(1) a fifth determining unit, configured to determine, after determining the remaining playing time of the first media file, a second media file having an association relationship with the first media file if the first time is greater than the remaining playing time;
(2) a sixth determining unit, configured to determine a total playing time corresponding to the first media file and the second media file, where the total playing time is a sum of the remaining playing time and a playing time required for playing the second media file at the first playing speed;
(3) a third adjusting unit, configured to adjust the playing speed of the first media file from the first playing speed to a fourth playing speed when the first time is less than the total playing time and the current first playing speed of the first media file is less than the maximum playing speed allowed by the target client, where the fourth playing speed is greater than the first playing time;
(4) and the playing unit is used for continuously playing the first media file and the second media file at a fourth playing speed.
Through the embodiment, the integrity of the content watched by the user is ensured and the user experience is improved by adding the second media file associated with the first media file.
As an optional technical solution, the first determining module includes:
(1) the first determining submodule is used for determining a first moment when the first media file is played currently and a second moment when the first media file starts;
(2) and the second determining submodule is used for determining the time required for playing from the first moment to the second moment according to the first playing speed as the residual playing time.
By the embodiment, the remaining duration of the feature of the media file is used as the remaining time of the first media file, so that unnecessary play time of the end of the clip can be removed, and the accuracy of calculating the remaining time can be ensured.
As an optional technical solution, the first determining unit 902 includes:
(1) a second determination module for determining a movement route for moving from the current position to the target position;
(2) the acquisition module is used for acquiring the current moving speed of the terminal through a speed sensor on the terminal;
(3) and the third determination module is used for determining the first time required for moving to the target position at the moving speed according to the moving route.
According to the embodiment, the current moving speed of the terminal determined by the speed sensor on the terminal determines the first time required for moving to the target position at the current moving speed according to the planned moving route, the determination mode is simple, and the occupation of software and hardware resources of the terminal is reduced.
As an optional technical solution, the first determining unit 902 includes:
(1) a fourth determination module for determining a movement route for moving from the current position to the target position;
(2) the fifth determining module is used for determining the stroke length of the finished stroke of the terminal and the second time consumed for finishing the finished stroke;
(3) a sixth determining module, configured to determine, according to the stroke length and the second time, an average moving speed at which the stroke is completed;
(4) and the seventh determining module is used for determining the first time required for moving to the target position according to the moving route at the average moving speed.
By the embodiment, the first time required for moving to the target position according to the planned moving route at the average moving speed is determined according to the average moving speed of the finished journey, so that the inaccurate determination of the moving speed caused by the change of the moving speed of the terminal (such as waiting for a red light, parking, acceleration and deceleration) can be avoided, and the accuracy of the determined first time is improved.
As an optional technical solution, the first determining unit 902 includes:
(1) an eighth determining module, configured to obtain vehicle information through a target client, where the vehicle information is used to indicate a vehicle used for moving from a current location to a target location, the vehicle travels according to a predetermined travel route, and the travel route has one or more predetermined stop locations, where each stop location of the one or more stop locations corresponds to a stop time, and the one or more stop locations include the target stop location corresponding to the target location;
(2) a ninth determining module, configured to determine a target parking time corresponding to the target parking position;
(3) and the tenth determining module is used for determining the time difference between the target parking time and the current time as the first time.
By the embodiment, the first time is determined by using the auxiliary information, so that the process of determining the first time can be simplified, and the accuracy of determining the first time is improved. And the first time is determined according to the stopping time of the vehicle, so that the first media file can be guaranteed to be played before the vehicle is taken, the potential safety hazard caused by the fact that a user watches the first media file when walking is avoided, and the safety of the user is guaranteed.
As an optional technical solution, the apparatus further includes:
(1) the terminal comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring selection information of a target object corresponding to the terminal on a target client before determining a first time required for moving from the current position of the terminal to a target position, and the selection information comprises: a target location.
According to the embodiment, the target client acquires the travel information containing the target position, so that the destination of the current travel can be determined, and the accuracy of determining the first time is further ensured.
According to a further aspect of embodiments of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, determining a first time required for moving from the current position of the terminal to the target position;
s2, according to the first time, the playing speed of the first media file on the target client is adjusted.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, ROM (Read-Only Memory), RAM (Random Access Memory), magnetic or optical disks, and the like.
According to still another aspect of the embodiments of the present invention, there is also provided an electronic device for implementing the method for controlling a play speed, as shown in fig. 10, the electronic device including: processor 1002, memory 1004, transmission 1006, etc. The memory has stored therein a computer program, and the processor is arranged to execute the steps of any of the above method embodiments by means of the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, determining a first time required for moving from the current position of the terminal to the target position;
s2, according to the first time, the playing speed of the first media file on the target client is adjusted.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 10 is only an illustration, and the electronic device may also be the aforementioned terminal device 102 or the server 106. Fig. 10 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
The memory 1004 can be used for storing software programs and modules, such as program instructions/modules corresponding to the method and apparatus for controlling the playback speed in the embodiment of the present invention, and the processor 1002 executes various functional applications and controls the playback speed by running the software programs and modules stored in the memory 1004, that is, implements the method for controlling the playback speed. The memory 1004 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1004 may further include memory located remotely from the processor 1002, which may be connected to the terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 1006 is used for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 1006 includes a NIC (Network Interface Controller) that can be connected to a router via a Network cable and other Network devices so as to communicate with the internet or a local area Network. In one example, the transmission device 1006 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.