CN115767169A - Video playing method and device, electronic equipment and storage medium - Google Patents
Video playing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115767169A CN115767169A CN202211353295.1A CN202211353295A CN115767169A CN 115767169 A CN115767169 A CN 115767169A CN 202211353295 A CN202211353295 A CN 202211353295A CN 115767169 A CN115767169 A CN 115767169A
- Authority
- CN
- China
- Prior art keywords
- playing
- target video
- video
- information
- playing information
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 87
- 230000008569 process Effects 0.000 claims abstract description 35
- 230000015654 memory Effects 0.000 claims description 32
- 238000012545 processing Methods 0.000 description 8
- 230000001360 synchronised effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 239000000284 extract Substances 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The embodiment of the invention relates to a video playing method, a video playing device, electronic equipment and a storage medium, wherein the method specifically comprises the following steps: when a playing instruction of a target video is received, first playing information of the target video is obtained from a first storage area of the client, and the first playing information is generated in the historical playing process of the target video; and acquiring the target video from a server side according to the first playing information for playing. Therefore, a part of latest playing records of the user can be stored in the local storage of the client, and the playing records are only read from the local storage when the video is played so as to support continuous playing. On the basis of meeting the continuous playing requirements of most users, network requests are reduced, the video playing starting speed is greatly improved, and the user experience is improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of video playing, in particular to a video playing method and device, electronic equipment and a storage medium.
Background
When a user watches a video on a video platform, the platform is expected to record the watching position and automatically continue playing the video at the next playing time. This requires that each time the platform client starts playing, the situation that the user last watched the current video/album is first read from the cloud and then played.
Therefore, in the prior art, in order to meet the continuous playing requirement, each playing needs to request the server to read the latest playing record of the currently played video by the user first, and then to request the playing, at least two network requests need to be performed, so that the playing speed is slow, and the user experience is reduced.
Disclosure of Invention
In view of this, to solve the technical problem that the video playback speed is slow, embodiments of the present invention provide a video playback method and apparatus, an electronic device, and a storage medium.
In a first aspect, an embodiment of the present invention provides a video playing method, including:
when a playing instruction of a target video is received, first playing information of the target video is obtained from a first storage area of the client, and the first playing information is generated in the historical playing process of the target video;
and acquiring the target video from a server side according to the first playing information for playing.
In one possible embodiment, the first playing information is generated during the history playing process of the target video, and includes:
in the historical playing process of the target video, acquiring a current first moment, a first playing moment of the target video, a first playing setting, a first video identifier and a first account number as first playing information at intervals of a preset time period;
or the like, or, alternatively,
and when the playing is paused or finished in the historical playing process of the target video, acquiring a current first moment, a first playing moment of the target video, first playing setting, a first video identifier and a first account number as the first playing information.
In one possible embodiment, the method further comprises:
synchronizing second playing information of the target video in other clients into the client, wherein the second playing information comprises: generating a second moment of the second playing information, a second playing moment of the target video, a second playing setting, a first video identifier and a first account;
and updating the first playing information according to the second playing information.
In a possible implementation manner, the performing an update operation on the first playing information according to the second playing information includes:
extracting a first time from the first playing information and extracting a second time from the second playing information;
and when the second moment is after the first moment, updating the first playing moment according to the second playing moment, and updating the first playing setting according to the second playing setting.
In a possible implementation manner, the acquiring, from a server, the target video according to the first playing information to play includes:
acquiring the target video from the server according to the first playing moment;
and controlling the target video to be played according to the first playing time and the first playing setting.
In one possible embodiment, the method further comprises:
when a plurality of target videos exist, storing playing information corresponding to a first preset number of target videos to the first storage area;
and sending playing information corresponding to a second preset number of target videos to a server so that the server stores the playing information in a second storage area, wherein the first preset number is smaller than the second preset number.
In one possible embodiment, the method further comprises:
when any one target video starts to be played, judging whether playing information corresponding to the target video exists in the first storage area or not according to the identification of the target video;
when the judgment result is yes, the target video is obtained from the server side according to the playing information to be played;
if not, acquiring playing information corresponding to the target video from the second storage area according to the identification of the target video and the account of the client, and acquiring the target video from the server side according to the playing information for playing.
In a second aspect, an embodiment of the present invention provides a video playing apparatus, including:
the acquisition module is used for acquiring first playing information of a target video from a first storage area of the client when a playing instruction of the target video is received, wherein the first playing information is generated in the historical playing process of the target video;
and the playing module is used for acquiring the target video from the server to play according to the first playing information.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor and a memory, wherein the processor is configured to execute a video playing program stored in the memory to implement the video playing method according to any one of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a storage medium, where the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the video playing method according to any one of the first aspects.
According to the video playing scheme provided by the embodiment of the invention, when a playing instruction of a target video is received, first playing information of the target video is acquired from a first storage area of a client, and the first playing information is generated in a historical playing process of the target video; and acquiring the target video from a server side according to the first playing information for playing. The latest part of the playing record of the user is stored in the local storage of the client, and the playing record is only read from the local storage when the video is played so as to support continuous playing. On the basis of meeting the continuous playing requirements of most users, network requests are reduced, the video playing starting speed is greatly improved, and the user experience is improved.
Drawings
Fig. 1 is a schematic flowchart of a video playing method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another video playing method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a video playback device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 1 is a schematic flowchart of a video playing method according to an embodiment of the present invention, and as shown in fig. 1, the method specifically includes:
s11, when a playing instruction of a target video is received, first playing information of the target video is obtained from a first storage area of the client, and the first playing information is generated in the historical playing process of the target video.
The audio playing method provided by the embodiment of the invention is applied to the electronic equipment, and the electronic equipment can be as follows: the smart television device, the mobile phone, the tablet computer, the computer and the like have a function of playing media data, and specifically, when the media data needs to be played, the playing information stored in advance is acquired from the local, and then the playing is requested from the server, so as to realize quick playing start, wherein the media data includes but is not limited to: audio data, video data, text data, etc.
In this embodiment, media data is described by taking a target video as an example, where the target video is a non-locally stored video that is being played by a client of an electronic device, a first storage area is constructed in the client in advance and used for locally storing first playing information at the client, and when the client receives a playing instruction for the target video triggered by a user, the first playing information that is stored in the first storage area in advance is acquired.
The first playing information is the latest playing record generated by the target video in the historical playing process, and the playing record can include, but is not limited to, the current playing time of the target video, the time of generating the playing record, the account id of the user, the id of the target video, the definition of video playing, the video playing speed, the video volume setting, whether to start the timed playing, whether to start the eye protection mode, whether to start the bullet screen, and the like.
Specifically, the method for acquiring the first playing information includes: in the historical playing process of the target video, when a user clicks the playing of the target video, pauses the playing of the target video, quits the playing of the target video and is triggered by a timer in the playing process of the target video, first playing information is acquired.
In a possible embodiment, a corresponding relationship between the first storage area and an application program for playing a target video is constructed, or a corresponding relationship between a certain folder in the first storage area and the application program is constructed, and when playing information of a video in a plurality of different application programs is stored, an area in which the playing information of the video in the current application program is stored can be quickly searched through the corresponding relationship.
In one possible implementation, the first playing information does not need to be acquired when the target video is played for the first time. Specifically, when a playing instruction for the target video is received, it is determined whether the current playing state of the target video is paused or not, and the method includes, but is not limited to, determining that the playing state is paused when the target video is paused, terminated, exited, enters a background, and shut down of the electronic device during playing, or searching for the first playing information from the first storage area according to the id of the target video, and determining that the playing state of the target video is paused when the first playing information can be found.
Furthermore, after the user clicks playing, the playing state of the target video is switched from pause to playing, and at this time, the video needs to be continuously played according to the playing record and the playing setting before pause, so that a first storage area corresponding to an application program for playing the target video is determined first, and first playing information is acquired from the first storage area according to the target video id.
In a possible implementation manner, when the first playing information is not queried through the target video id, it is indicated that the target video is not in a pause playing state, and playing information does not need to be acquired, and playing can be directly started from the start of the target video.
And S12, acquiring the target video from the server according to the first playing information to play.
In this embodiment, the current playing time of the target video is extracted from the first playing information, and the cloud video playing service of the server is accessed through the id of the target video and the current playing time, so as to read the video data starting from the current playing time. And loading the read video data to the client, controlling the application program to play the target video from the current playing time, and playing the target video according to the playing setting in the first playing information.
According to the video playing method provided by the embodiment of the invention, when a playing instruction of a target video is received, first playing information of the target video is acquired from a first storage area of a client, wherein the first playing information is generated in a historical playing process of the target video; and acquiring the target video from a server side according to the first playing information for playing. The latest part of the playing record of the user is stored in the local storage of the client, and the playing record is only read from the local storage when the video is played so as to support continuous playing. On the basis of meeting the continuous playing requirements of most users, network requests are reduced, the video playing starting speed is greatly improved, and the user experience is improved.
Fig. 2 is a schematic flowchart of another video playing method according to an embodiment of the present invention, and as shown in fig. 2, the method specifically includes:
s21, in the historical playing process of the target video, acquiring a current first moment, a first playing moment of the target video, a first playing setting, a first video identifier and a first account number as first playing information at intervals of a preset time period.
In this embodiment, first play information is generated in a history play process of a target video, the history play process is a process of playing the target video last time, and in the process of playing the target video last time by an application program, the first play information is obtained by triggering a timer in the application program or a client, and the first play information includes: the current first moment is used for representing the moment of generating the first playing information; the first playing time of the target video represents the time in the currently played target video; the method comprises the steps that first playing setting is conducted, and the playing speed, the playing definition, the playing sound type, the playing language type, whether a barrage is started or not, whether an eye protection mode is started or not and the like of a target video are represented; the first video identification represents the id of the target video; the first account is the account id of the user currently logged in.
Specifically, a timer is set to a preset time period (for example, one minute), the timer triggers and acquires first playing information of a currently played target video every other preset time period, and the previous playing information is updated, so that the generated first playing information is a latest playing record of the target video.
In a possible implementation manner, when a user clicks to play a target video, or pauses to play the target video, or quits playing the target video, or switches the target video to a background, it is described that the playing of the target video is paused or finished in the playing process, and at this time, a current first time, a first playing time of the target video, a first playing setting, a first video identifier, and a first account are obtained as the first playing information.
And S22, storing the first playing information to a first storage area of the client.
In this embodiment, a first storage area is constructed in advance in the client, and is used for locally storing first playing information in the electronic device, and constructing a corresponding relationship between the first storage area and an application program for playing a target video, or constructing a corresponding relationship between a folder in the first storage area and the application program, and when playing information of multiple videos is stored, an area in which the playing information of the video in the current application program is stored can be quickly searched through the corresponding relationship.
S23, sending the first playing information to a server side so that the server side stores the first playing information to a second storage area.
In this embodiment, the server is connected to the client for communication, and a second storage area is established in the server for storing the first playing information and establishing a corresponding relationship between the second storage area and the client and the target video. And each interval of preset time period, or after the first playing information is stored in the first storage area, the client calls the interface to upload the first playing information to the server, and stores the first playing information in the second storage area. The second storage area may pre-store second playing information of the target video sent by other clients, that is, when the user logs in the same first account at different clients, the playing information of the video played by the first account is uploaded to the server and stored in the second storage area, where the second playing information includes, but is not limited to: and generating a second moment of second playing information, a second playing moment of the target video, a second playing setting, a second video identifier and a second account, wherein the first account can be the same as the second account, and the first video identifier can be the same as the second video identifier.
In a possible implementation manner, when the second storage area has the second playing information, the second playing information may be updated by comparing a first time of the first playing information with a second time of the second playing information, so that when a plurality of pieces of playing information of the target video exist in the second storage area, only the newly generated playing information is stored in the second storage area, and the occupation of the storage space is reduced.
As an example, when the first account is the same as the second account and the first video identifier is the same as the second video identifier, a first time and a second time at which each piece of playing information is generated are obtained and compared, and when the first time is after the second time, the second playing information corresponding to the second time is updated by using the first playing information corresponding to the first time.
S24, synchronizing second playing information of the target video in other clients to the clients, and updating the first playing information according to the second playing information.
In this embodiment, the other clients are devices that log in the same account as the client (for example, an account of an application program of the user logs in a television and a mobile phone at the same time, the television is the client, and the mobile phone is the other client), and the second playing information is sent to the server by the other clients and is stored in the second storage area. When the client receives a target operation, receiving second playing information sent by the server, where the target operation may include but is not limited to: the user opens the application program corresponding to the target video, the user switches the application program into the background and then switches the application program back to the foreground, and the user opens the playing record management page of the application program and is triggered by the timer in the process that the user uses the application program. And after the client receives the target operation, acquiring second playing information from the server, analyzing the second playing information, and extracting a second moment, a second playing setting, a second video identifier and a second account number after determining that the format of the second playing information is correct.
Further, when it is determined that the first account is the same as the second account and the first video identifier is the same as the second video identifier, extracting a first time from the first playing information and extracting a second time from the second playing information; when the second time is after the first time, the first playing information is updated according to the second playing information, that is, the first playing time is updated according to the second playing time, the first playing setting is updated according to the second playing setting, and the updated first playing information is stored again. So as to update the playing information in the first storage area before playing the target video. And when the second moment is before the first moment, the updating operation is not carried out, and the second playing information is deleted.
In a possible implementation manner, it is determined that the first account is the same as the second account, and the first video identifier is different from the second video identifier, or when the video identifier that is the same as the second video identifier is not found in the first storage area, it is determined that the video corresponding to the second playing information is not played by the current client, so that the second playing information is written in the first storage area.
And S25, when a playing instruction of the target video is received, acquiring first playing information of the target video from a first storage area of the client.
In this embodiment, as in step S11, please refer to step S11 for detailed description, which is not described herein again.
S26, acquiring the target video from the server according to the first playing moment; and controlling the target video to be played according to the first playing time and the first playing setting.
In this embodiment, a first play time, a first play setting, and a first video identifier are extracted from the first play information, a video play service of a server corresponding to the target video is accessed from the server according to the first video identifier, video data starting from the first play time is read, the video data is played at the client, and the video data is played according to the first play setting.
In one possible implementation, when a plurality of target videos exist, storing playing information corresponding to a first preset number of target videos in the first storage area; and sending playing information corresponding to a second preset number of target videos to a server so that the server stores the playing information in a second storage area, wherein the first preset number is smaller than the second preset number. The method and the device have the advantages that part of the latest playing information generated by the client is stored locally, and all the playing information is stored to the cloud, so that the local storage space is reduced.
Further, when any target video starts to be played, whether playing information corresponding to the target video exists in the first storage area or not is judged according to the identification of the target video; when the judgment result is yes, acquiring the target video from the server side according to the playing information for playing; and if not, acquiring playing information corresponding to the target video from the second storage area according to the identification of the target video and the account number of the client, and acquiring the target video from the server for playing according to the playing information.
In one possible implementation, when a plurality of target videos exist, storing playing information corresponding to a third preset number of target videos in a first storage area; the third preset number may be the number of all currently played videos, that is, all playing information generated by the client is stored in the first storage area. When the client receives the target operation, receiving a fourth preset number of playing information sent by the server; and updating the third preset number of playing information according to the fourth preset number of playing information, wherein the fourth preset number is smaller than the third preset number.
Specifically, when there are multiple target videos, it is not necessary to obtain all play records from the server, and a fourth preset number of newly generated play information may be determined according to a second time in multiple play information in the server, so as to update the play information of the target videos played in the client in a recent period of time, and reduce the number of the obtained play information.
As an example, the client produces and uploads a video playback record of the user: step 1: when a user pauses video playing, acquiring the video playing time of 10 minutes and the current first time of 11 points, wherein the video id: a, account number: b, as first playing information, step 2: writing the first playing information into a local storage, and step 3: uploading the first playing information calling interface to a server, if uploading fails, entering a step 4, and the step 4: and after waiting for a period of time, retrying the uploading of the playing information until the uploading is successful. When the user clicks the playing video again, the playing information is obtained from the local part, and then the video data from ten minutes is obtained from the cloud end for playing.
The client synchronizes the latest video playing record from the server to the local storage: step 1: when the user opens the play record management page, the client calls the server interface to read the latest video play information with a certain number (such as 60 pieces), and the step 2: analyzing the playing information of the server, and extracting a second time 12 point which is 20 minutes of the video playing time and generates the playing information when the format is determined to be correct, wherein the video id: a, account number: b is used as second playing information; and 3, step 3: and merging the playing information of the server with the locally stored playing information, wherein only one piece of playing information of the same video is reserved. The merging principle is as follows: comparing the first time with the second time, wherein the 12 points are behind the 11 points, so that only the second playing information is reserved; and 4, step 4: and writing the merged playing information into a local storage. And then returns to step 1.
The client uses the locally stored play record to continue playing the video, and the step 1: the user clicks a certain video displayed by the app to play, and the client extracts a video id: a; step 2: the app queries a locally stored video playing record according to the A, extracts the video playing time to be 20 minutes, and if the video playing time is not 20 minutes, records the video playing time as 0; and step 3: and accessing the cloud video playing service according to the A and the 20 minutes, reading the video data starting from the 20 minutes, and playing the video data.
According to the video playing method provided by the embodiment of the invention, in the historical playing process of the target video, the current first moment, the first playing moment of the target video, the first playing setting, the first video identifier and the first account are obtained as first playing information at intervals of a preset time period; and storing the first playing information to a first storage area of the client. And sending the first playing information to the server so that the server stores the first playing information in a second storage area. And synchronizing second playing information of the target video in other clients to the clients, and updating the first playing information according to the second playing information. When a playing instruction of a target video is received, first playing information of the target video is obtained from a first storage area of the client. Acquiring a target video from a server according to a first playing moment; and controlling the target video to be played according to the first playing time and the first playing setting. The method has the advantages that the latest part of video playing records of the user are stored locally at the client, one-time network requests are reduced under the condition that the continuous playing requirements of most users are met, the video playing speed is greatly improved, the user experience is improved, the consistency of playing information stored locally in a plurality of clients is ensured through a local and cloud data synchronization method, and the condition that the continuous playing position of the user is wrong due to inaccurate local data is avoided.
Fig. 3 is a schematic structural diagram of a video playing apparatus according to an embodiment of the present invention, and as shown in fig. 3, the apparatus specifically includes:
the obtaining module 31 is configured to, when a playing instruction for a target video is received, obtain first playing information of the target video from a first storage area of the client, where the first playing information is generated in a history playing process of the target video;
and the playing module 32 is configured to acquire the target video from the server according to the first playing information and play the target video.
In a possible implementation manner, the obtaining module is specifically configured to obtain, at preset time intervals in a historical playing process of the target video, a current first time, a first playing time of the target video, a first playing setting, a first video identifier, and a first account as the first playing information;
or the like, or, alternatively,
the obtaining module is specifically configured to obtain a current first time, a first play time of the target video, a first play setting, a first video identifier, and a first account as the first play information when play is paused or finished in the history play process of the target video.
In a possible implementation manner, the processing module 33 is configured to synchronize second playing information of the target video in other clients to the client, where the second playing information includes: generating a second moment of the second playing information, a second playing moment of the target video, a second playing setting, a second video identifier and a second account;
the processing module is further configured to perform an update operation on the first playing information according to the second playing information.
In a possible implementation manner, the processing module is specifically configured to extract a first time from the first playing information, and extract a second time from the second playing information;
and when the second moment is after the first moment, updating the first playing moment according to the second playing moment, and updating the first playing setting according to the second playing setting.
In a possible implementation manner, the obtaining module is further configured to obtain the target video from the server according to the first play time;
the playing module is further configured to control the target video to be played according to the first playing time and the first playing setting.
In a possible implementation manner, the processing module is further configured to, when there are multiple target videos, store playing information corresponding to a first preset number of target videos to the first storage area;
and sending playing information corresponding to a second preset number of target videos to a server so that the server stores the playing information in a second storage area, wherein the first preset number is smaller than the second preset number.
In a possible implementation manner, the processing module is further configured to, when any one of the target videos starts to be played, determine whether playing information corresponding to the target video exists in the first storage area according to an identifier of the target video;
the playing module is further used for acquiring the target video from the server side for playing according to the playing information when the judgment result is yes;
and when the judgment result is negative, acquiring playing information corresponding to the target video from the second storage area according to the identification of the target video and the account number of the client, and acquiring the target video from a server for playing according to the playing information.
The video playing apparatus provided in this embodiment may be the apparatus shown in fig. 3, and may perform all the steps of the video playing method shown in fig. 1-2, so as to achieve the technical effect of the video playing method shown in fig. 1-2, and please refer to the related description of fig. 1-2 for brevity, which is not repeated herein.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device 400 shown in fig. 4 includes: at least one processor 401, memory 402, at least one network interface 404, and other user interfaces 403. The various components in the electronic device 400 are coupled together by a bus system 405. It is understood that the bus system 405 is used to enable connection communications between these components. The bus system 405 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 405 in fig. 4.
The user interface 403 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It will be appreciated that memory 402 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SDRAM, ddr SDRAM), enhanced Synchronous SDRAM (ESDRAM), synchlronous SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 402 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 402 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 4021 and application programs 4022.
The operating system 4021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is configured to implement various basic services and process hardware-based tasks. The application programs 4022 include various application programs, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. A program for implementing the method according to the embodiment of the present invention may be included in the application 4022.
In this embodiment of the present invention, by calling a program or an instruction stored in the memory 402, specifically, a program or an instruction stored in the application 4022, the processor 401 is configured to execute the method steps provided by the method embodiments, for example, including:
when a playing instruction of a target video is received, first playing information of the target video is obtained from a first storage area of the client, and the first playing information is generated in the historical playing process of the target video;
and acquiring the target video from a server side according to the first playing information for playing.
In a possible implementation manner, in the history playing process of the target video, every preset time period is obtained, and a current first time, a first playing time of the target video, a first playing setting, a first video identifier and a first account are taken as the first playing information;
or the like, or, alternatively,
and when the playing is paused or finished in the historical playing process of the target video, acquiring a current first moment, a first playing moment of the target video, first playing setting, a first video identifier and a first account number as the first playing information.
In one possible implementation, second playing information of the target video in other clients is synchronized to the client, where the second playing information includes: generating a second moment of the second playing information, a second playing moment of the target video, a second playing setting, a second video identifier and a second account;
and updating the first playing information according to the second playing information.
In a possible implementation manner, a first time is extracted from the first playing information, and a second time is extracted from the second playing information;
and when the second moment is after the first moment, updating the first playing moment according to the second playing moment, and updating the first playing setting according to the second playing setting.
In a possible implementation manner, the target video is obtained from the server according to the first playing time;
and controlling the target video to be played according to the first playing time and the first playing setting.
In one possible implementation, when a plurality of target videos exist, storing playing information corresponding to a first preset number of target videos in the first storage area;
and sending playing information corresponding to a second preset number of target videos to a server so that the server stores the playing information in a second storage area, wherein the first preset number is smaller than the second preset number.
In a possible implementation manner, when any one of the target videos starts to be played, whether the playing information corresponding to the target video exists in the first storage area is judged according to the video identifier of the target video;
when the judgment result is yes, the target video is obtained from the server side according to the playing information to be played;
and when the judgment result is negative, acquiring playing information corresponding to the target video from the second storage area according to the video identification and the account of the client, and acquiring the target video from the server to play according to the playing information.
The method disclosed in the above embodiments of the present invention may be applied to the processor 401, or implemented by the processor 401. The processor 401 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 401. The Processor 401 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 402, and the processor 401 reads the information in the memory 402 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The electronic device provided in this embodiment may be the electronic device shown in fig. 4, and may execute all the steps of the video playing method shown in fig. 1-2, so as to achieve the technical effect of the video playing method shown in fig. 1-2, and please refer to the related description of fig. 1-2 for brevity, which is not described herein again.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When the one or more programs in the storage medium are executable by the one or more processors, the video playback method executed on the device side is implemented.
The processor is used for executing the video playing program stored in the memory so as to realize the following steps of the video playing method executed on the equipment side:
when a playing instruction of a target video is received, first playing information of the target video is obtained from a first storage area of the client, and the first playing information is generated in the historical playing process of the target video;
and acquiring the target video from a server side according to the first playing information for playing.
In a possible implementation manner, in the history playing process of the target video, every preset time period is obtained, and a current first time, a first playing time of the target video, a first playing setting, a first video identifier and a first account are taken as the first playing information;
or the like, or a combination thereof,
and when the playing is paused or finished in the historical playing process of the target video, acquiring a current first moment, a first playing moment of the target video, first playing setting, a first video identifier and a first account number as the first playing information.
In one possible implementation, second playing information of the target video in other clients is synchronized to the client, where the second playing information includes: generating a second moment of the second playing information, a second playing moment of the target video, a second playing setting, a second video identifier and a second account;
and updating the first playing information according to the second playing information.
In a possible implementation, a first time is extracted from the first playing information, and a second time is extracted from the second playing information;
and when the second moment is after the first moment, updating the first playing moment according to the second playing moment, and updating the first playing setting according to the second playing setting.
In a possible implementation manner, the target video is obtained from the server according to the first playing time;
and controlling the target video to be played according to the first playing time and the first playing setting.
In one possible implementation, when a plurality of target videos exist, storing playing information corresponding to a first preset number of target videos in the first storage area;
and sending playing information corresponding to a second preset number of target videos to a server so that the server stores the playing information to a second storage area, wherein the first preset number is smaller than the second preset number.
In a possible implementation manner, when any one of the target videos starts to be played, whether playing information corresponding to the target video exists in the first storage area is judged according to a video identifier of the target video;
when the judgment result is yes, the target video is obtained from the server side according to the playing information to be played;
and when the judgment result is negative, acquiring playing information corresponding to the target video from the second storage area according to the video identification and the account of the client, and acquiring the target video from the server to play according to the playing information.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (10)
1. A video playing method is applied to a client side and comprises the following steps:
when a playing instruction of a target video is received, first playing information of the target video is obtained from a first storage area of the client, and the first playing information is generated in the historical playing process of the target video;
and acquiring the target video from a server according to the first playing information for playing.
2. The method according to claim 1, wherein the first playing information is generated during a history playing process of the target video, and comprises:
in the historical playing process of the target video, acquiring a current first moment, a first playing moment of the target video, a first playing setting, a first video identifier and a first account number as first playing information at intervals of a preset time period;
or the like, or, alternatively,
and when the playing is paused or finished in the historical playing process of the target video, acquiring a current first moment, a first playing moment of the target video, first playing setting, a first video identifier and a first account number as the first playing information.
3. The method of claim 1, further comprising:
synchronizing second playing information of the target video in other clients to the clients, wherein the second playing information comprises: generating a second moment of the second playing information, a second playing moment of the target video, a second playing setting, a second video identifier and a second account;
and updating the first playing information according to the second playing information.
4. The method according to claim 3, wherein the performing the update operation on the first playing information according to the second playing information comprises:
extracting a first time from the first playing information and extracting a second time from the second playing information;
and when the second moment is after the first moment, performing updating operation on the first playing moment according to the second playing moment, and performing updating operation on the first playing setting according to the second playing setting.
5. The method according to claim 2, wherein the obtaining the target video from a server according to the first playing information for playing comprises:
acquiring the target video from the server according to the first playing time;
and controlling the target video to be played according to the first playing time and the first playing setting.
6. The method of claim 1, further comprising:
when a plurality of target videos exist, storing playing information corresponding to a first preset number of target videos to the first storage area;
and sending playing information corresponding to a second preset number of target videos to a server so that the server stores the playing information in a second storage area, wherein the first preset number is smaller than the second preset number.
7. The method of claim 6, further comprising:
when any one target video starts to be played, judging whether playing information corresponding to the target video exists in the first storage area or not according to the video identification of the target video;
when the judgment result is yes, the target video is obtained from the server side according to the playing information to be played;
and when the judgment result is negative, acquiring playing information corresponding to the target video from the second storage area according to the video identification and the account of the client, and acquiring the target video from the server to play according to the playing information.
8. A video playback apparatus, comprising:
the acquisition module is used for acquiring first playing information of a target video from a first storage area of the client when a playing instruction of the target video is received, wherein the first playing information is generated in the historical playing process of the target video;
and the playing module is used for acquiring the target video from the server according to the first playing information and playing the target video.
9. An electronic device, comprising: a processor and a memory, the processor being configured to execute a video playback program stored in the memory to implement the video playback method of any one of claims 1 to 7.
10. A storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the video playback method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211353295.1A CN115767169B (en) | 2022-10-31 | 2022-10-31 | Video playing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211353295.1A CN115767169B (en) | 2022-10-31 | 2022-10-31 | Video playing method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115767169A true CN115767169A (en) | 2023-03-07 |
CN115767169B CN115767169B (en) | 2024-07-05 |
Family
ID=85355974
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211353295.1A Active CN115767169B (en) | 2022-10-31 | 2022-10-31 | Video playing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115767169B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103716703A (en) * | 2012-10-09 | 2014-04-09 | 腾讯科技(深圳)有限公司 | Video playing method and apparatus |
CN103841441A (en) * | 2012-11-26 | 2014-06-04 | 安凯(广州)微电子技术有限公司 | Video playing method and device for mobile network |
WO2014190720A1 (en) * | 2013-05-27 | 2014-12-04 | Tencent Technology (Shenzhen) Company Limited | A method and device for playing media synchronously |
CN104426853A (en) * | 2013-08-23 | 2015-03-18 | 腾讯科技(深圳)有限公司 | Multimedia synchronous playing method, server, terminal and system |
CN105049903A (en) * | 2015-07-03 | 2015-11-11 | 浪潮软件集团有限公司 | Method and system for cross-device synchronization of media files and media playing device |
CN105163156A (en) * | 2015-10-12 | 2015-12-16 | 华勤通讯技术有限公司 | Video resuming method, playing devices and system |
CN109905769A (en) * | 2017-12-08 | 2019-06-18 | 腾讯科技(深圳)有限公司 | Multimedia file plays record storing method, device, terminal and storage medium |
WO2022154641A1 (en) * | 2021-01-18 | 2022-07-21 | 삼성전자 주식회사 | Method and device for synchronizing audio signal and video signal of multimedia content |
CN114827698A (en) * | 2022-03-22 | 2022-07-29 | 北京字跳网络技术有限公司 | Synchronization method and device of playing information, terminal equipment and storage medium |
-
2022
- 2022-10-31 CN CN202211353295.1A patent/CN115767169B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103716703A (en) * | 2012-10-09 | 2014-04-09 | 腾讯科技(深圳)有限公司 | Video playing method and apparatus |
CN103841441A (en) * | 2012-11-26 | 2014-06-04 | 安凯(广州)微电子技术有限公司 | Video playing method and device for mobile network |
WO2014190720A1 (en) * | 2013-05-27 | 2014-12-04 | Tencent Technology (Shenzhen) Company Limited | A method and device for playing media synchronously |
CN104426853A (en) * | 2013-08-23 | 2015-03-18 | 腾讯科技(深圳)有限公司 | Multimedia synchronous playing method, server, terminal and system |
CN105049903A (en) * | 2015-07-03 | 2015-11-11 | 浪潮软件集团有限公司 | Method and system for cross-device synchronization of media files and media playing device |
CN105163156A (en) * | 2015-10-12 | 2015-12-16 | 华勤通讯技术有限公司 | Video resuming method, playing devices and system |
CN109905769A (en) * | 2017-12-08 | 2019-06-18 | 腾讯科技(深圳)有限公司 | Multimedia file plays record storing method, device, terminal and storage medium |
WO2022154641A1 (en) * | 2021-01-18 | 2022-07-21 | 삼성전자 주식회사 | Method and device for synchronizing audio signal and video signal of multimedia content |
CN114827698A (en) * | 2022-03-22 | 2022-07-29 | 北京字跳网络技术有限公司 | Synchronization method and device of playing information, terminal equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
吕冬冬: ""多终端协同同步技术研究"", 中国优秀硕士学位论文全文数据库, 15 May 2015 (2015-05-15) * |
Also Published As
Publication number | Publication date |
---|---|
CN115767169B (en) | 2024-07-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021244205A1 (en) | Interaction scenario start up method, apparatus, storage medium, client end, and server | |
US20180255359A1 (en) | Method for sharing a captured video clip and electronic device | |
US20140298395A1 (en) | Methods and systems for playing video on multiple terminals | |
JP2018026816A (en) | Video recording method and system | |
US11490173B2 (en) | Switch of audio and video | |
CN113158110B (en) | Data processing method and device | |
CN106998490B (en) | A kind of multi-medium data synchronous method and device | |
CN112738633B (en) | Video playing method, device, equipment and readable storage medium | |
US11837234B2 (en) | Subtitle generation method and apparatus, and device and storage medium | |
CN112162773B (en) | Differential upgrading method and device, storage medium and terminal | |
CN104756080A (en) | Augmenting capabilities of a host device | |
CN109379633B (en) | Video editing method and device, computer equipment and readable storage medium | |
CN111836067A (en) | Method, device and equipment for processing live component information and storage medium | |
US20170195384A1 (en) | Video Playing Method and Electronic Device | |
CN109240833A (en) | Resource allocation method, device, terminal and storage medium | |
CN113645481B (en) | Video recording method, camera equipment, control terminal and video recording system | |
CN107690093B (en) | Video playing method and device | |
CN111274205B (en) | Data block access method and device and storage medium | |
WO2014153963A1 (en) | Methods and systems for playing video on multiple terminals | |
JP7058795B2 (en) | Video processing methods, devices, terminals and storage media | |
CN108108294B (en) | Method and system for acquiring customized operation data according to reference time | |
CN107707985B (en) | Bullet screen control method, mobile terminal and server | |
US11956482B2 (en) | Systems and methods for storing and delivering content assets | |
CN115767169A (en) | Video playing method and device, electronic equipment and storage medium | |
JP2019029801A (en) | Reproduction device, control method therefor, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |