CN111726689A - Video playing control method and device - Google Patents
Video playing control method and device Download PDFInfo
- Publication number
- CN111726689A CN111726689A CN202010620860.0A CN202010620860A CN111726689A CN 111726689 A CN111726689 A CN 111726689A CN 202010620860 A CN202010620860 A CN 202010620860A CN 111726689 A CN111726689 A CN 111726689A
- Authority
- CN
- China
- Prior art keywords
- video
- playing
- played
- preset time
- screen
- 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
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/442—Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
- H04N21/44213—Monitoring of end-user related data
- H04N21/44218—Detecting physical presence or behaviour of the user, e.g. using sensors to detect if the user is leaving the room or changes his face expression during a TV program
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
- H04N21/4333—Processing operations in response to a pause request
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
- H04N21/47202—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Social Psychology (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The embodiment of the invention provides a video playing control method and a video playing control device, which relate to the technical field of data processing, wherein the method comprises the following steps: acquiring real-time acquired environmental video stream in front of a screen of the electronic equipment; judging whether a user watching a video played by the electronic equipment exists in front of a screen at intervals of a first preset time interval according to the environment video stream, and if not, pausing the playing of the video; after the video playing is paused, judging whether a user watching the video exists at intervals of a second preset time interval according to the continuously obtained environment video stream, if so, determining the continuous playing time according to the pause playing time, and continuing playing the video from the continuous playing time, wherein the pause playing time is as follows: and pausing the playing time of the video when the video is played. The scheme provided by the embodiment of the invention is applied to control the video playing, so that the efficiency of controlling the video playing is improved.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a video playing control method and apparatus.
Background
Other transactions may need to be processed temporarily while the user is watching the video. In order to prevent the video content from being missed while processing other transactions, a "pause key" is generally manually pressed to cause the electronic device to pause playing the video, then to process other transactions, and after processing other transactions, a "play key" is pressed to cause the electronic device to continue playing the video.
However, if the user needs to frequently process other transactions while watching the video, the user needs to frequently press the "pause key" and the "play key", which results in a complicated operation of the user, and thus the efficiency of the electronic device in controlling the video playing is low.
Disclosure of Invention
The embodiment of the invention aims to provide a video playing control method and a video playing control device so as to improve the efficiency of controlling video playing. The specific technical scheme is as follows:
in a first aspect of the embodiments of the present invention, a video playing control method is first provided, which is applied to an electronic device, and the method includes:
acquiring an environment video stream in front of a screen of the electronic equipment, which is acquired in real time;
judging whether a user watching the video played by the electronic equipment exists in front of the screen at intervals of a first preset time interval according to the environment video stream, and if not, pausing the playing of the video;
after the video is paused to be played, judging whether a user watching the video exists at intervals of a second preset time interval according to the continuously obtained environment video stream, if so, determining a continuous playing time according to the pause playing time, and continuing to play the video from the continuous playing time, wherein the pause playing time is as follows: and when the video is paused, the playing time of the video is stopped.
In an embodiment of the present invention, the determining, according to the environmental video stream, whether a user watching a video played by the electronic device exists in front of the screen at intervals of a first preset time interval includes:
detecting an unmanned video frame not containing face data in the environment video stream at every interval of a first preset time interval, wherein the face data are as follows: image data representing an arbitrary portion of a human face;
after the unmanned video frame is detected, if the video frames within a first preset time period from the detected unmanned video frame are all the unmanned video frames, judging that no user watching the video played by the electronic equipment exists in front of the screen, otherwise, judging that the user watching the video played by the electronic equipment exists in front of the screen.
In an embodiment of the present invention, the determining the play continuation time according to the pause time includes:
determining the time spaced by a second preset time length before the pause playing time as the continuous playing time, wherein the second preset time length is as follows: the video playing method comprises the following steps of presetting any time length, the first preset time interval or the accumulated time length of unmanned video frames before the video is paused to be played.
In an embodiment of the present invention, the obtaining of the real-time acquired environmental video stream in front of the screen of the electronic device includes:
and calling a front camera of the electronic equipment to acquire an environment video stream in real time.
The judging whether a user watching the video played by the electronic equipment exists in front of the screen at intervals of a first preset time interval according to the environment video stream comprises the following steps:
and calling a face tracking frame in the native system of the electronic equipment, performing face recognition on the video frames of the environment video stream at intervals of a first preset time interval based on a preset cross-platform visual library, and determining whether a user watching the video played by the electronic equipment exists according to a face recognition result.
In an embodiment of the present invention, after the pausing of playing the video, the determining whether there is a user watching the video at a second preset time interval according to the continuously obtained environmental video stream includes:
after the video is paused to be played, judging whether a target user watching the video exists at intervals of a second preset time interval according to the continuously obtained environment video stream, wherein the target user is: a user viewing the video before pausing playback of the video.
In a second aspect of the embodiments of the present invention, there is also provided a video playback control apparatus, applied to an electronic device, the apparatus including:
the video stream acquisition module is used for acquiring an environment video stream in front of a screen of the electronic equipment, which is acquired in real time;
the pause playing module is used for judging whether a user watching the video played by the electronic equipment exists in front of the screen at intervals of a first preset time interval according to the environment video stream, and if not, pausing the playing of the video;
a continuous playing module, configured to determine, after the video is paused to be played, whether a user watching the video exists at intervals of a second preset time interval according to the environment video stream obtained continuously, if yes, determine a continuous playing time according to the pause playing time, and continue to play the video from the continuous playing time, where the pause playing time is: and when the video is paused, the playing time of the video is stopped.
In an embodiment of the present invention, the pause playing module is specifically configured to:
detecting an unmanned video frame not containing face data in the environment video stream at every interval of a first preset time interval, wherein the face data are as follows: image data representing an arbitrary portion of a human face;
after the unmanned video frame is detected, if the video frames within a first preset time period from the detected unmanned video frame are all the unmanned video frames, judging that no user watching the video played by the electronic equipment exists in front of the screen, otherwise, judging that the user watching the video played by the electronic equipment exists in front of the screen;
and if the user watching the video played by the electronic equipment does not exist, pausing playing the video.
In an embodiment of the present invention, the resume playing module is specifically configured to:
after the video is paused to be played, judging whether a user watching the video exists at intervals of a second preset time interval according to the continuously obtained environment video stream, if so, determining the moment which is before the pause playing moment and has a second preset time interval as the continuous playing moment, wherein the second preset time interval is as follows: presetting any time length, the first preset time interval or the accumulated time length of the unmanned video frames before the video is paused to be played;
and continuing to play the video from the continuous playing moment.
In an embodiment of the present invention, the video stream obtaining module is specifically configured to:
calling a front camera of the electronic equipment to acquire an environmental video stream in real time;
the pause playing module is specifically configured to:
and calling a face tracking frame in the native system of the electronic equipment, carrying out face recognition on the video frame of the environment video stream at intervals of a first preset time interval based on a preset cross-platform visual library, determining whether a user watching the video played by the electronic equipment exists according to a face recognition result, and if not, pausing the playing of the video.
In an embodiment of the present invention, the resume playing module is specifically configured to:
after the video is paused to be played, judging whether a target user watching the video exists at intervals of a second preset time interval according to the continuously obtained environment video stream, wherein the target user is: a user viewing the video before pausing playback of the video;
if so, determining the playing continuing time according to the playing pause time, and continuing playing the video from the playing continuing time.
In a third aspect of the embodiments of the present invention, there is further provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a fourth aspect of the embodiments of the present invention, there is further provided a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of any one of the above first aspects.
In a further aspect of the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method steps of any one of the above first aspects.
As can be seen from the above, when the scheme provided by the embodiment of the present invention is applied to control video playing, it is determined whether there is a user watching a video played by the electronic device in front of the screen according to an environmental video stream in front of the screen acquired in real time, if there is no user watching the video in front of the screen of the device, the video playing is suspended, after the video playing is suspended, it is determined whether there is a user watching the video according to the environmental video stream obtained continuously, and if there is the environmental video stream obtained continuously, the video is played continuously from the moment of continuing playing. As can be seen from the above, in the scheme provided by the embodiment of the present invention, it can be determined whether a user watching the video exists in front of the screen according to the environment video stream, and if the user does not exist, it indicates that the user leaves the front of the screen of the electronic device and does not watch the video, so that the playing of the video can be suspended. And if the video is paused, determining that a user watching the video exists in front of the screen according to the environment video stream, and indicating that the user returns to the front of the screen of the electronic equipment, so that the video can be continuously played. Therefore, the pause playing and the continuous playing of the video do not need to be controlled by the user manually, and the efficiency of controlling the video playing is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic flowchart of a first video playing control method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a second video playing control method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a third video playing control method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a video playback control apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
Because the efficiency of currently controlling video playing is low, in order to solve the problem, embodiments of the present invention provide a video playing control method and apparatus.
In an embodiment of the present invention, a video playing control method is provided, which is applied to an electronic device, and the method includes:
and acquiring the real-time acquired environmental video stream in front of the screen of the electronic equipment.
And judging whether a user watching the video played by the electronic equipment exists in front of the screen at intervals of a first preset time interval according to the environment video stream, and if not, pausing the playing of the video.
After the video is paused to be played, judging whether a user watching the video exists at intervals of a second preset time interval according to the continuously obtained environment video stream, if so, determining a continuous playing time according to the pause playing time, and continuing to play the video from the continuous playing time, wherein the pause playing time is as follows: and when the video is paused to be played, the playing time of the video is stopped.
As can be seen from the above, in the scheme provided by the embodiment of the present invention, it can be determined whether a user watching the video exists in front of the screen according to the environment video stream, and if the user does not exist, it indicates that the user leaves the front of the screen of the electronic device and does not watch the video, so that the playing of the video can be suspended. And if the video is paused, determining that a user watching the video exists in front of the screen according to the environment video stream, and indicating that the user returns to the front of the screen of the electronic equipment, so that the video can be continuously played. Therefore, the pause playing and the continuous playing of the video do not need to be controlled by the user manually, and the efficiency of controlling the video playing is improved.
The following describes a video playing control method and apparatus provided in an embodiment of the present invention with specific embodiments.
Referring to fig. 1, an embodiment of the present invention provides a flowchart of a first video playing control method, where the method is applied to an electronic device.
The electronic device may be an electronic device with a front camera, such as a mobile phone with a front camera, a tablet computer, or the like, or an electronic device in communication connection with a video capture device, such as a computer in communication connection with a camera.
Specifically, the video playing control method includes the following steps S101 to S103.
S101: and acquiring the real-time acquired environmental video stream in front of the screen of the electronic equipment.
Specifically, the environmental video stream may be acquired in real time through a video acquisition device in communication connection with the electronic device, such as an external camera.
And a front-facing camera of the electronic equipment can be called to acquire the environmental video stream in real time.
S102: and judging whether a user watching the video played by the electronic equipment exists in front of the screen at intervals of a first preset time interval according to the environment video stream, and if not, pausing the playing of the video.
Since the content recorded in the environment video stream in front of the screen of the electronic device is limited by the display angle of the screen, and the user needs to watch the video played by the electronic device before the screen, if there is a user watching the video played by the electronic device, the user data of the user is recorded in the environment video stream.
And if the judgment result shows that the user data exists in the environment video stream, the user is proved to be in front of the screen, the user is probably watching the video, otherwise, the user is proved not to be in front of the screen, and the user does not watch the video.
The user data may be data of the whole body of the user, data of the face of the user, data of other body parts of the user, or the like.
The first preset time interval may be a time interval between adjacent video frames in the environmental video stream, which is equivalent to that each video frame in the environmental video stream is used to detect whether there is a user watching a video in front of the screen, and the detection result is accurate.
In addition, the first preset time interval may be 0.5 second, 1 second, etc., which is equivalent to that not every video frame in the ambient video stream is used for detecting whether there is a user watching a video in front of the screen. Because the action of the user before leaving the screen of the electronic equipment can be finished within a certain time, the user who watches the video played by the electronic equipment in front of the screen is detected without using all video frames in the environment video stream, a better detection result can be obtained, and the consumed computing resource when the video frame is detected can be reduced and the computing efficiency is improved because the detected video frames are fewer.
In an embodiment of the present invention, a target video frame may be determined in the environmental video stream at a first preset time interval, where the target video frame represents each video frame in the environmental video stream within the first preset time interval, and if the target video frame does not include user data, it is determined that there is no user in front of the screen in the first preset time interval to watch a video played by the electronic device.
Specifically, the target video frame in the environmental video stream may be identified through a trained user data identification model, and whether the target video frame contains user data is determined.
Whether the target video frame contains the user data or not can be judged in other modes.
In another embodiment of the present invention, it can be determined whether there is a user watching a video played by the electronic device in front of the screen through steps S102A-S102B, so as to determine whether to pause playing the video, which will not be described in detail herein.
In addition, if it is determined that there is a user watching the video played by the electronic device in front of the screen, and it is indicated that there is a video played by the user watching the electronic device, the video playing is not controlled otherwise, that is, the video is continuously played.
S103: after the video is paused to be played, judging whether a user watching the video exists at intervals of a second preset time interval according to the continuously obtained environment video stream, if so, determining the continuous playing time according to the paused playing time, and continuing to play the video from the continuous playing time.
Wherein, the pause playing time is as follows: and when the video is paused to be played, the playing time of the video is stopped.
The second predetermined time interval may be the same as or different from the first predetermined time interval.
For example, the second predetermined time interval and the first predetermined time interval may both be 1 second, the second predetermined time interval may be 1 second, and the first predetermined time interval may be 0.5 second.
Since the continuously acquired environment video stream is a video stream of an environment in front of the screen of the electronic device, after the video is paused, if it is determined from the environment video stream that there is a user watching the video, it is determined that the user returns to the screen to continue watching the video, and the video can be continuously played from the time of continuing playing.
Specifically, the continuous playing time may be the same as the pause playing time.
In an embodiment of the present invention, the user watching the video determined after the video is paused may not be the same user as the user watching the video determined before the video is paused, which is not limited in this embodiment.
In another embodiment of the present invention, after the video is paused to be played, whether a target user watching the video exists is determined at intervals of a second preset time interval according to the continuously obtained environmental video stream.
Wherein, the target user is: and the user watching the video before pausing the playing of the video.
If the target user watching the video before pausing the playing of the video leaves the front of the screen and then other users appear in the front of the screen, the video can be continuously played, so that the target user returns to the front of the screen and then the video is continuously played for a period of time, and the target user cannot completely watch the video.
Therefore, only when the user returning to the screen after the pause of the playing is the same user as the user watching the video before the pause of the playing, the video is continuously played, so that the target user can watch the video completely.
In addition, the playback continuation time can be determined in step S103A, and the video can be played back continuously from the playback continuation time, which will not be described in detail here.
As can be seen from the above, in the scheme provided by the embodiment of the present invention, it can be determined whether a user watching the video exists in front of the screen according to the environment video stream, and if the user does not exist, it indicates that the user leaves the front of the screen of the electronic device and does not watch the video, so that the playing of the video can be suspended. And if the video is paused, determining that a user watching the video exists in front of the screen according to the environment video stream, and indicating that the user returns to the front of the screen of the electronic equipment, so that the video can be continuously played. Therefore, the pause playing and the continuous playing of the video do not need to be controlled by the user manually, and the efficiency of controlling the video playing is improved.
Referring to fig. 2, a flow chart of a second video playing control method is provided, and compared with the embodiment shown in fig. 1, the above step S102 can be implemented by S102A-S102B.
S102A: and detecting the unmanned video frames which do not contain the face data in the environment video stream at every first preset time interval.
The face data is as follows: image data representing an arbitrary portion of a human face.
For example, any part of the human face may be a whole or a part of eyes, nose, mouth, and the like.
Because the human face is limited by the visual angle of human eyes, the human face is often positioned in front of the screen of the electronic equipment in the process of watching the video by the user, so that whether the user watching the video played by the electronic equipment exists can be determined by identifying whether the human face data is contained in the video frame in the environment video stream, and if the human face data is not contained in the video frame, the user watching the video played by the electronic equipment does not exist.
And the human face contains five sense organs, and the human face contains more features, so that the human face data in the video frame can be more easily recognized for the electronic equipment.
In an embodiment of the present invention, a face tracking frame in the native system of the electronic device may be called, and based on a preset cross-platform visual library, face recognition may be performed on video frames of the environmental video stream at intervals of a first preset time interval, and it is determined whether there is a user watching a video being played by the electronic device according to a face recognition result.
In a case where the native system of the electronic device is an iOS system, the face tracking frame may be a Vision frame. Specifically, because the user may perform actions such as head lowering, head raising, head turning and the like in the process of watching the video, the acquired face data of the user in the video frame of the environmental video stream only contains data of a part of the face of the user. Particularly, as the facial features of five sense organs in the face are more, and the five sense organs of the user cannot face the lens due to actions such as head lowering, head raising and head turning, the acquired data of the five sense organs in the video frame of the environment video stream are less, the feature data which can be used for face recognition is less, and the face recognition result is inaccurate. Therefore, even if the user still watches the video in front of the screen, it is possible to detect an unmanned video frame, thereby pausing the playing of the video, and thus the video playing cannot be accurately controlled.
And the Vision frame can still keep better face recognition effect under the condition that the five sense organs have less data, so that the accuracy of detecting the unmanned video frame is higher by selecting the Vision frame, and the video playing is controlled more accurately.
In addition, the face tracking frame may be a ColorReco frame, a fotoappaat frame, or the like.
The cross-platform visual library may be OpenCV. Specifically, OpenCV may be applied to various operating systems such as Linux, Windows, Mac OS, Android, and the like, and supports various programming languages such as Python, Ruby, MATLAB, and the like, so that the compatibility is high, and the scheme provided in this embodiment may be applied to various electronic devices by using OpenCV as a cross-platform visual library.
In addition, the video frames in the environmental video stream can be identified at intervals of a first preset time interval through the trained face data identification model, and whether the video frames contain face data or not is judged.
S102B: after the unmanned video frame is detected, if the video frames within a first preset time period from the detected unmanned video frame are all the unmanned video frames, judging that no user watching the video played by the electronic equipment exists in front of the screen, otherwise, judging that the user watching the video played by the electronic equipment exists in front of the screen, and if the user watching the video played by the electronic equipment does not exist in front of the screen, pausing playing the video.
Due to the limitation of the computing power of the electronic device, it may be difficult to perform face data recognition on each video frame in the acquired environmental video stream in a completely real-time manner and recognize an unmanned video frame, so that when the scheme provided by the above embodiment is applied to control video playing, a certain time delay may exist. If the face data identification is performed on each single video frame, when the unmanned video frame is identified, the user may appear in front of the screen again, and if the playing of the video is suspended, the user may be affected by watching the video, and the accuracy of controlling the video playing is low.
In addition, since a single video frame contains less information, the accuracy of determining whether there is a user watching a video played by the electronic device according to the single video frame is low, which results in low accuracy of controlling video playing.
Therefore, if the video frames within the first preset time period from the detected unmanned video frame are all unmanned video frames, which indicates that the user does not watch the video within the first preset time period, it is determined that the user watching the video does not exist in front of the screen, and the video playing is paused, so that the problem can be solved.
Specifically, the calculation time required by the user to watch the video in the environmental video stream may be counted by different electronic devices, and the first preset time duration may be determined according to the counted time, for example, the first preset time duration is 3 seconds, 5 seconds, and the like.
As can be seen from the above, when all video frames in the first preset time duration in the environmental video stream are unmanned video frames, it is determined that no video frame containing face data exists in the environmental video stream, which indicates that the user does not watch the video within the first preset time duration, and the video is paused to be played under the above condition, so that the accuracy of controlling the video playing is improved.
In addition, in this embodiment, it is determined that no video frame including face data exists in the environmental video stream only when video frames within a first preset time duration in the environmental video stream are all unmanned video frames, that is, when it is determined that there is no user watching a video played by the electronic device, the determination is jointly performed according to a plurality of video frames, and the information included in the plurality of video frames is more, so that the accuracy of the determination result of determining that there is no user watching the video is higher, and further, the accuracy of controlling video playing is higher.
Since it is often necessary to calculate a certain amount of time to determine whether the user watching the video exists in the environmental video stream, that is, when the scheme provided by the above embodiment is applied to control the video to pause playing, there may be a certain time delay, that is, the user does not watch the video, but the electronic device will pause playing the video after continuing playing the video for a period of time. In the above situation, if it is determined that there is a user watching the video according to the environmental video stream, the user continues to play the video from the pause time, and the user cannot directly watch the unviewed video segment due to the time delay.
To solve this problem, referring to fig. 3, a flowchart of a third video playing control method is provided, and compared with the foregoing embodiment shown in fig. 1, the step S103 can be implemented by the step S103A.
S103A: after the video is paused to be played, judging whether a user watching the video exists at intervals of a second preset time interval according to the continuously obtained environment video stream, if so, determining the time before the pause playing time at intervals of a second preset time length as the continuous playing time, and continuing to play the video from the continuous playing time.
Wherein the second preset duration is: a preset arbitrary time length, the first preset time interval or an accumulated time length of the unmanned video frames before the video is paused to be played.
Specifically, under the condition that the second preset time is a preset arbitrary time, different electronic devices may be counted to determine whether the computing time required by the user watching the video exists in the environmental video stream, and the preset arbitrary time is determined according to the counted time, for example, the preset arbitrary time is 3 seconds, 5 seconds, and the like.
In addition, since whether a user watching the video exists before the screen is judged once every first preset time interval, and the user may not completely watch the video clip with the duration of the first preset time interval between the two judging operations before the user leaves the screen of the electronic device between the two judging operations, the second preset time interval may be the first preset time interval, the video starts to rewind the first preset time interval from the playing pause time, and the video clip with the duration of the first preset time interval between the two judging operations is replayed, so that the user can watch the video clip which is not watched.
Moreover, because the existence of the unmanned video frame in the environment video stream indicates that the user does not view the video at the time corresponding to the unmanned video frame, the accumulated time length of the unmanned video frame is the accumulated time length of the video clip not viewed by the user, and therefore, the video is replayed after the accumulated time length of the unmanned video frame is backed from the pause playing time, so that the user can view the unviewed video clip.
Therefore, when the user watching the video is judged to exist in the environment video stream, and the video is continuously played for the user, the video is backed for a second preset time length from the playing pause time, and the video is continuously played from the time after the video is backed, so that the user can watch the video segment which is not watched due to the calculation of the time delay.
Corresponding to the video playing control method, the embodiment of the invention also provides a video playing control device.
Referring to fig. 4, a schematic structural diagram of a video playback control apparatus is provided, which is applied to an electronic device, and the apparatus includes:
a video stream obtaining module 401, configured to obtain an environment video stream in front of a screen of the electronic device, where the environment video stream is collected in real time;
a pause playing module 402, configured to determine, according to the environmental video stream, at intervals of a first preset time interval, whether a user watching a video being played by the electronic device exists in front of the screen, and if not, pause playing the video;
a play continuing module 403, configured to, after the video is paused to be played, determine, according to the environment video stream obtained continuously, whether there is a user watching the video at intervals of a second preset time interval, if yes, determine a play continuing time according to a pause playing time, and continue to play the video from the play continuing time, where the pause playing time is: and when the video is paused, the playing time of the video is stopped.
As can be seen from the above, in the scheme provided by the embodiment of the present invention, it can be determined whether a user watching the video exists in front of the screen according to the environment video stream, and if the user does not exist, it indicates that the user leaves the front of the screen of the electronic device and does not watch the video, so that the playing of the video can be suspended. And if the video is paused, determining that a user watching the video exists in front of the screen according to the environment video stream, and indicating that the user returns to the front of the screen of the electronic equipment, so that the video can be continuously played. Therefore, the pause playing and the continuous playing of the video do not need to be controlled by the user manually, and the efficiency of controlling the video playing is improved.
In an embodiment of the present invention, the pause playing module 402 is specifically configured to:
detecting an unmanned video frame not containing face data in the environment video stream at every interval of a first preset time interval, wherein the face data are as follows: image data representing an arbitrary portion of a human face;
after the unmanned video frame is detected, if the video frames within a first preset time period from the detected unmanned video frame are all the unmanned video frames, judging that no user watching the video played by the electronic equipment exists in front of the screen, otherwise, judging that the user watching the video played by the electronic equipment exists in front of the screen;
and if the user watching the video played by the electronic equipment does not exist, pausing playing the video.
As can be seen from the above, when all video frames in the first preset time duration in the environmental video stream are unmanned video frames, it is determined that no video frame containing face data exists in the environmental video stream, which indicates that the user does not watch the video within the first preset time duration, and the video is paused to be played under the above condition, so that the accuracy of controlling the video playing is improved.
In addition, in this embodiment, it is determined that no video frame including face data exists in the environmental video stream only when video frames within a first preset time duration in the environmental video stream are all unmanned video frames, that is, when it is determined that there is no user watching a video played by the electronic device, the determination is jointly performed according to a plurality of video frames, and the information included in the plurality of video frames is more, so that the accuracy of the determination result of determining that there is no user watching the video is higher, and further, the accuracy of controlling video playing is higher.
In an embodiment of the present invention, the continue playing module 403 is specifically configured to:
after the video is paused to be played, judging whether a user watching the video exists at intervals of a second preset time interval according to the continuously obtained environment video stream, if so, determining the moment which is before the pause playing moment and has a second preset time interval as the continuous playing moment, wherein the second preset time interval is as follows: presetting any time length, the first preset time interval or the accumulated time length of the unmanned video frames before the video is paused to be played;
and continuing to play the video from the continuous playing moment.
Therefore, when the user watching the video is judged to exist in the environment video stream, and the video is continuously played for the user, the video is backed for a second preset time length from the playing pause time, and the video is continuously played from the time after the video is backed, so that the user can watch the video segment which is not watched due to the calculation of the time delay.
In an embodiment of the present invention, the video stream obtaining module 401 is specifically configured to:
and calling a front camera of the electronic equipment to acquire an environment video stream in real time.
The pause playing module 402 is specifically configured to:
and calling a face tracking frame in the native system of the electronic equipment, carrying out face recognition on the video frame of the environment video stream at intervals of a first preset time interval based on a preset cross-platform visual library, determining whether a user watching the video played by the electronic equipment exists according to a face recognition result, and if not, pausing the playing of the video.
In an embodiment of the present invention, the continue playing module 403 is specifically configured to:
after the video is paused to be played, judging whether a target user watching the video exists at intervals of a second preset time interval according to the continuously obtained environment video stream, wherein the target user is: a user viewing the video before pausing playback of the video;
if so, determining the playing continuing time according to the playing pause time, and continuing playing the video from the playing continuing time.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, which includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501 is configured to implement the method steps of any of the above-described video playback control methods when executing the program stored in the memory 503.
When the electronic equipment provided by the embodiment of the invention is applied to control video playing, whether a user watching the video exists in front of the screen can be determined according to the environment video stream, if no user exists, the user leaves the front of the screen of the electronic equipment and does not watch the video, so that the video playing can be suspended. And if the video is paused, determining that a user watching the video exists in front of the screen according to the environment video stream, and indicating that the user returns to the front of the screen of the electronic equipment, so that the video can be continuously played. Therefore, the pause playing and the continuous playing of the video do not need to be controlled by the user manually, and the efficiency of controlling the video playing is improved.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the video playback control method in any of the above embodiments.
When the video playing is controlled by applying the computer program stored in the computer-readable storage medium provided in this embodiment, it may be determined whether a user watching the video exists in front of the screen according to the environment video stream, and if the user does not exist, it indicates that the user leaves the front of the screen of the electronic device and does not watch the video, so that the playing of the video may be suspended. And if the video is paused, determining that a user watching the video exists in front of the screen according to the environment video stream, and indicating that the user returns to the front of the screen of the electronic equipment, so that the video can be continuously played. Therefore, the pause playing and the continuous playing of the video do not need to be controlled by the user manually, and the efficiency of controlling the video playing is improved.
In another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to execute the video playback control method according to any one of the above embodiments.
When the computer program product provided by this embodiment is executed to control video playing, it may be determined whether a user watching the video exists in front of the screen according to the environment video stream, and if no user exists, it indicates that the user leaves the front of the screen of the electronic device and does not watch the video, so that playing of the video may be suspended. And if the video is paused, determining that a user watching the video exists in front of the screen according to the environment video stream, and indicating that the user returns to the front of the screen of the electronic equipment, so that the video can be continuously played. Therefore, the pause playing and the continuous playing of the video do not need to be controlled by the user manually, and the efficiency of controlling the video playing is improved.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium and the computer program product, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to what is described in the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (10)
1. A video playing control method is applied to electronic equipment, and the method comprises the following steps:
acquiring an environment video stream in front of a screen of the electronic equipment, which is acquired in real time;
judging whether a user watching the video played by the electronic equipment exists in front of the screen at intervals of a first preset time interval according to the environment video stream, and if not, pausing the playing of the video;
after the video is paused to be played, judging whether a user watching the video exists at intervals of a second preset time interval according to the continuously obtained environment video stream, if so, determining a continuous playing time according to the pause playing time, and continuing to play the video from the continuous playing time, wherein the pause playing time is as follows: and when the video is paused, the playing time of the video is stopped.
2. The method according to claim 1, wherein the determining whether a user watching a video played by the electronic device exists in front of the screen every first preset time interval according to the environmental video stream comprises:
detecting an unmanned video frame not containing face data in the environment video stream at every interval of a first preset time interval, wherein the face data are as follows: image data representing an arbitrary portion of a human face;
after the unmanned video frame is detected, if the video frames within a first preset time period from the detected unmanned video frame are all the unmanned video frames, judging that no user watching the video played by the electronic equipment exists in front of the screen, otherwise, judging that the user watching the video played by the electronic equipment exists in front of the screen.
3. The method of claim 1, wherein determining the resume play time from the pause play time comprises:
determining the time spaced by a second preset time length before the pause playing time as the continuous playing time, wherein the second preset time length is as follows: the video playing method comprises the following steps of presetting any time length, the first preset time interval or the accumulated time length of unmanned video frames before the video is paused to be played.
4. The method according to any one of claims 1-3, wherein the obtaining of the real-time captured ambient video stream in front of the screen of the electronic device comprises:
calling a front camera of the electronic equipment to acquire an environmental video stream in real time;
the judging whether a user watching the video played by the electronic equipment exists in front of the screen at intervals of a first preset time interval according to the environment video stream comprises the following steps:
and calling a face tracking frame in the native system of the electronic equipment, performing face recognition on the video frames of the environment video stream at intervals of a first preset time interval based on a preset cross-platform visual library, and determining whether a user watching the video played by the electronic equipment exists according to a face recognition result.
5. The method according to claim 1, wherein the determining whether there is a user watching the video every a second preset time interval according to the continuously obtained environmental video stream after the video is paused to be played comprises:
after the video is paused to be played, judging whether a target user watching the video exists at intervals of a second preset time interval according to the continuously obtained environment video stream, wherein the target user is: a user viewing the video before pausing playback of the video.
6. A video playing control device is applied to electronic equipment, and the device comprises:
the video stream acquisition module is used for acquiring an environment video stream in front of a screen of the electronic equipment, which is acquired in real time;
the pause playing module is used for judging whether a user watching the video played by the electronic equipment exists in front of the screen at intervals of a first preset time interval according to the environment video stream, and if not, pausing the playing of the video;
a continuous playing module, configured to determine, after the video is paused to be played, whether a user watching the video exists at intervals of a second preset time interval according to the environment video stream obtained continuously, if yes, determine a continuous playing time according to the pause playing time, and continue to play the video from the continuous playing time, where the pause playing time is: and when the video is paused, the playing time of the video is stopped.
7. The apparatus of claim 6, wherein the pause playing module is specifically configured to:
detecting an unmanned video frame not containing face data in the environment video stream at every interval of a first preset time interval, wherein the face data are as follows: image data representing an arbitrary portion of a human face;
after the unmanned video frame is detected, if the video frames within a first preset time period from the detected unmanned video frame are all the unmanned video frames, judging that no user watching the video played by the electronic equipment exists in front of the screen, otherwise, judging that the user watching the video played by the electronic equipment exists in front of the screen;
and if the user watching the video played by the electronic equipment does not exist, pausing playing the video.
8. The apparatus of claim 6, wherein the resume play module is specifically configured to:
after the video is paused to be played, judging whether a user watching the video exists at intervals of a second preset time interval according to the continuously obtained environment video stream, if so, determining the moment which is before the pause playing moment and has a second preset time interval as the continuous playing moment, wherein the second preset time interval is as follows: presetting any time length, the first preset time interval or the accumulated time length of the unmanned video frames before the video is paused to be played;
and continuing to play the video from the continuous playing moment.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010620860.0A CN111726689B (en) | 2020-06-30 | 2020-06-30 | Video playing control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010620860.0A CN111726689B (en) | 2020-06-30 | 2020-06-30 | Video playing control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111726689A true CN111726689A (en) | 2020-09-29 |
CN111726689B CN111726689B (en) | 2023-03-24 |
Family
ID=72570830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010620860.0A Active CN111726689B (en) | 2020-06-30 | 2020-06-30 | Video playing control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111726689B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112702652A (en) * | 2020-12-25 | 2021-04-23 | 珠海格力电器股份有限公司 | Smart home control method and device, storage medium and electronic device |
CN113938742A (en) * | 2021-10-11 | 2022-01-14 | 深圳创维-Rgb电子有限公司 | Control method, system, equipment and storage medium for automatically projecting screen content playing |
CN114125540A (en) * | 2021-11-11 | 2022-03-01 | 百度在线网络技术(北京)有限公司 | Video playing method, video playing device, electronic equipment, storage medium and program product |
WO2023071565A1 (en) * | 2021-10-25 | 2023-05-04 | 华为技术有限公司 | Automatic control method based on human body sensing, and first electronic device and system |
CN116156257A (en) * | 2022-11-10 | 2023-05-23 | 深圳康佳电子科技有限公司 | Display device control method and device, electronic device and storage medium |
CN116708900A (en) * | 2022-11-17 | 2023-09-05 | 荣耀终端有限公司 | Video playing method and electronic equipment |
CN117692717A (en) * | 2024-01-30 | 2024-03-12 | 利亚德智慧科技集团有限公司 | Breakpoint continuous broadcasting processing method and device for light show, storage medium and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107223337A (en) * | 2017-04-01 | 2017-09-29 | 深圳市智晟达科技有限公司 | The method and DTV of a kind of automatic pause video playback |
CN109195015A (en) * | 2018-08-21 | 2019-01-11 | 北京奇艺世纪科技有限公司 | A kind of video playing control method and device |
CN110113639A (en) * | 2019-05-14 | 2019-08-09 | 北京儒博科技有限公司 | Video playing control method, device, terminal, server and storage medium |
US20190340780A1 (en) * | 2016-06-23 | 2019-11-07 | Gaia System Solutions Inc. | Engagement value processing system and engagement value processing apparatus |
-
2020
- 2020-06-30 CN CN202010620860.0A patent/CN111726689B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190340780A1 (en) * | 2016-06-23 | 2019-11-07 | Gaia System Solutions Inc. | Engagement value processing system and engagement value processing apparatus |
CN107223337A (en) * | 2017-04-01 | 2017-09-29 | 深圳市智晟达科技有限公司 | The method and DTV of a kind of automatic pause video playback |
CN109195015A (en) * | 2018-08-21 | 2019-01-11 | 北京奇艺世纪科技有限公司 | A kind of video playing control method and device |
CN110113639A (en) * | 2019-05-14 | 2019-08-09 | 北京儒博科技有限公司 | Video playing control method, device, terminal, server and storage medium |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112702652A (en) * | 2020-12-25 | 2021-04-23 | 珠海格力电器股份有限公司 | Smart home control method and device, storage medium and electronic device |
CN113938742A (en) * | 2021-10-11 | 2022-01-14 | 深圳创维-Rgb电子有限公司 | Control method, system, equipment and storage medium for automatically projecting screen content playing |
WO2023071565A1 (en) * | 2021-10-25 | 2023-05-04 | 华为技术有限公司 | Automatic control method based on human body sensing, and first electronic device and system |
CN114125540A (en) * | 2021-11-11 | 2022-03-01 | 百度在线网络技术(北京)有限公司 | Video playing method, video playing device, electronic equipment, storage medium and program product |
CN116156257A (en) * | 2022-11-10 | 2023-05-23 | 深圳康佳电子科技有限公司 | Display device control method and device, electronic device and storage medium |
CN116708900A (en) * | 2022-11-17 | 2023-09-05 | 荣耀终端有限公司 | Video playing method and electronic equipment |
CN116708900B (en) * | 2022-11-17 | 2024-03-22 | 荣耀终端有限公司 | Video playing method and electronic equipment |
CN117692717A (en) * | 2024-01-30 | 2024-03-12 | 利亚德智慧科技集团有限公司 | Breakpoint continuous broadcasting processing method and device for light show, storage medium and electronic equipment |
CN117692717B (en) * | 2024-01-30 | 2024-05-07 | 利亚德智慧科技集团有限公司 | Breakpoint continuous broadcasting processing method and device for light show, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN111726689B (en) | 2023-03-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111726689B (en) | Video playing control method and device | |
US10373461B2 (en) | System and method for video preview | |
CN107613368A (en) | Video pause method and apparatus, computer installation and computer-readable recording medium | |
WO2017088360A1 (en) | Method and device for powering off terminal | |
CN103916711A (en) | Method and device for playing video signals | |
CN110969120B (en) | Image processing method and device, electronic equipment and readable storage medium | |
EP3104304B1 (en) | Electronic apparatus and method of extracting still images | |
CN106921883B (en) | Video playing processing method and device | |
CN109729429B (en) | Video playing method, device, equipment and medium | |
CN108090424B (en) | Online teaching investigation method and equipment | |
CN110705356B (en) | Function control method and related equipment | |
CN112055237B (en) | Method, system, apparatus, device and storage medium for determining screen-to-screen delay | |
CN109766473B (en) | Information interaction method and device, electronic equipment and storage medium | |
WO2020052062A1 (en) | Detection method and device | |
CN113379999A (en) | Fire detection method and device, electronic equipment and storage medium | |
CN110876079A (en) | Video processing method, device and equipment | |
CN110852196B (en) | Face recognition information display method and device | |
CN113891040A (en) | Video processing method, video processing device, computer equipment and storage medium | |
KR100827848B1 (en) | Method and system for recognizing person included in digital data and displaying image by using data acquired during visual telephone conversation | |
CN117095456A (en) | Examination behavior detection method and device, electronic equipment and storage medium | |
CN112153324A (en) | Monitoring video display method, device and system | |
CN110333903B (en) | Method and device for determining page loading duration | |
CN110636377A (en) | Video processing method, device, storage medium, terminal and server | |
EP3026923A1 (en) | Method for accessing media data and corresponding device and system | |
CN112749414B (en) | Data storage method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |