CN111836093A - Video playing method, device, equipment and medium - Google Patents
Video playing method, device, equipment and medium Download PDFInfo
- Publication number
- CN111836093A CN111836093A CN201910304956.3A CN201910304956A CN111836093A CN 111836093 A CN111836093 A CN 111836093A CN 201910304956 A CN201910304956 A CN 201910304956A CN 111836093 A CN111836093 A CN 111836093A
- Authority
- CN
- China
- Prior art keywords
- component
- current
- determining
- main body
- shielding
- 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 55
- 238000012549 training Methods 0.000 claims description 25
- 238000002372 labelling Methods 0.000 claims description 15
- 210000000746 body region Anatomy 0.000 claims description 7
- 230000000712 assembly Effects 0.000 claims description 6
- 238000000429 assembly Methods 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 230000000903 blocking effect Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000012552 review Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
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/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
-
- 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/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
- H04N21/4316—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations for displaying supplemental content in a region of the screen, e.g. an advertisement in a separate window
-
- 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/485—End-user interface for client configuration
- H04N21/4858—End-user interface for client configuration for modifying screen layout parameters, e.g. fonts, size of the windows
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Business, Economics & Management (AREA)
- Marketing (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the invention discloses a video playing method, a video playing device, video playing equipment and a video playing medium, and relates to the technical field of video playing. The method comprises the following steps: in the process of playing the current video, determining position adjustment information of the component according to the current played video image, the current position of the component which is positioned in the same display area with the current video and the display size of the component; and adjusting the component according to the position adjustment information, so that the component can avoid shielding a main body in a video image, and taking the adjusted position of the component as the current position of the component. The video playing method, device, equipment and medium provided by the embodiment of the invention realize intelligent dynamic layout of short video web pages and avoid the shielding of components on video contents.
Description
Technical Field
The embodiment of the invention relates to the technical field of video playing, in particular to a video playing method, a video playing device, video playing equipment and a video playing medium.
Background
With the development of the internet short video technology, due to the characteristic full-screen content display characteristic of a short video page, a video page operation component and video content are displayed in the same display area of a webpage, and the video content may be blocked. The video page operation component refers to a component for operating a video, such as a video sharing component, a video approval component, a video comment component, and the like.
In order to provide more humanized video viewing and operation interaction experience for users, how to carry out intelligent dynamic layout on short video webpages so as to avoid the shielding of video contents becomes a problem to be solved urgently.
Disclosure of Invention
The embodiment of the invention provides a video playing method, a video playing device, video playing equipment and a video playing medium, which are used for realizing intelligent dynamic layout of a short video webpage and avoiding the shielding of a component on video content.
In a first aspect, an embodiment of the present invention provides a video playing method, where the method includes:
in the process of playing the current video, determining position adjustment information of the component according to the current played video image, the current position of the component which is positioned in the same display area with the current video and the display size of the component;
and adjusting the component according to the position adjustment information, so that the component can avoid shielding a main body in a video image, and taking the adjusted position of the component as the current position of the component.
In a second aspect, an embodiment of the present invention further provides a video playing apparatus, where the apparatus includes:
the information determining module is used for determining position adjusting information of the component according to a currently played video image, the current position of the component which is positioned in the same display area with the current video and the display size of the component in the process of playing the current video;
and the position adjusting module is used for adjusting the component according to the position adjusting information, so that the component can avoid shielding a main body in a video image, and the adjusted position of the component is used as the current position of the component.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the video playing method according to any one of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the video playing method according to any one of the embodiments of the present invention.
In the embodiment of the invention, in the process of playing the current video, the position adjustment information of the component is determined according to the current position of the currently played video image, the component which is positioned in the same display area with the current video and the display size of the component; and adjusting the component according to the position adjustment information to enable the component to avoid shielding a main body in a video image. Therefore, intelligent dynamic layout of the short video webpage is realized, and the shielding of the components on the video content is avoided.
Drawings
Fig. 1a is a flowchart of a video playing method according to an embodiment of the present invention;
FIG. 1b is a diagram illustrating an exemplary embodiment of an assembly according to the present invention;
fig. 2 is a flowchart of a video playing method according to a second embodiment of the present invention;
FIG. 3a is a schematic diagram of a web page structure provided by the third embodiment of the present invention;
fig. 3b is a flowchart of a video playing method according to a third embodiment of the present invention;
fig. 3c is a schematic view of a video playing effect according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a video playing apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1a is a flowchart of a video playing method according to an embodiment of the present invention. The embodiment can be applied to dynamic layout of the components which are positioned in the same display area with the video so as to avoid the situation that the components shield the video content. The method may be performed by a video playback device, which may be implemented in software and/or hardware. Referring to fig. 1a, the video playing method provided in this embodiment includes:
s110, in the process of playing the current video, determining position adjustment information of the assembly according to the current played video image, the current position of the assembly located in the same display area with the current video and the display size of the assembly.
Wherein, the current video can be any playable video.
The video image is a frame image currently played in the current video.
Referring to FIG. 1b, component 101 refers to an identification of an operation. Here, the component 101 is an identifier for operating on video. The operation may be a review, approval, sharing, forwarding, etc. of the video.
The number of the components may be one, two or more. The component is located in the same display area as the current video.
The current location of the component is the current location of the component. The display size of the assembly is preset, and can be specifically set according to actual needs.
The position adjustment information of the component refers to the position adjustment information of the component which avoids the shielding of the video content by the component. Specifically, the movement may be a certain distance in one direction.
In order to solve the problem of poor user experience caused by the movement of the component in a larger distance, the determining the position adjustment information of the component according to the currently played video image, the current position of the component located in the same display area as the current video and the display size of the component includes:
determining the moving distance of the component in at least two directions for avoiding shielding according to the currently played video image, the current position of the component in the same display area with the current video and the display size of the component;
taking the minimum value in the moving distances as a target distance, and taking the direction to which the target distance belongs as a target direction;
and determining position adjustment information of the component according to the target distance and the target direction.
The main body area refers to an area where a main body is located in the video image. The subject refers to a main part in the video image, and may be something in particular. Typically, the subject may be a person and the corresponding subject area is the area in the video image where the person is located.
Specifically, at least two directions may be set in advance, for example, 12 o 'clock direction, 3 o' clock direction, 6 o 'clock direction, and 9 o' clock direction.
Specifically, the determining, according to a currently played video image, a current position of a component located in the same display area as the current video, and a display size of the component, a movement distance of the component in at least two directions for avoiding shielding includes:
determining a minimum circumscribed graphic area of the component according to the current position of the component and the display size of the component;
drawing a straight line through the midpoint of the minimum circumscribed graphic area, wherein when the number of the components is at least two, the direction in which the straight line is located is the arrangement direction of the components;
identifying a subject region in a video image;
respectively taking intersection points of two boundaries of the partial area with the occlusion in the straight line and the main body area as target position points, and determining an initial position point of the target position point from the intersection points of the two boundaries of the straight line and the minimum circumscribed graph area;
and taking the distance between the target position point and the initial position point as the moving distance of the component in at least two directions for avoiding shielding.
The minimum circumscribed graphic region may be a minimum circumscribed rectangular region or a minimum circumscribed circular region. The minimum circumscribed graphic area of a component may be the minimum circumscribed graphic area of two or more components, or may be the minimum circumscribed graphic area of one component.
The partial region where the occlusion exists in the main body region refers to a partial region where the occlusion position belongs in the main body region.
For example, if the main body area is an area where a character is located and the blocking position is located on a fist of the character, the partial area where the blocking exists in the main body area refers to an outline area to which the fist of the character belongs.
Respectively taking intersection points of two boundaries of the partial area with occlusion in the straight line and the main body area as target position points, and determining an initial position point of the target position point from the intersection points of the two boundaries of the straight line and the minimum circumscribed graph area, wherein the initial position point comprises the following steps:
if all the areas in the minimum circumscribed graphic area shield the main area, that is, the minimum circumscribed graphic area is located in the main area, if one of the intersection points of the straight line and the two boundaries of the partial area in which the shield exists in the main area is taken as a target position point, the intersection point of the straight line and the two boundaries of the minimum circumscribed graphic area, which is farthest from the target position point, is taken as an initial position point of the target position point.
To avoid visual confusion caused by random movement of the component, the method further comprises the following steps of determining the movement distance of the component in at least two directions:
if the number of the assemblies is at least two, determining the arrangement direction of the assemblies according to the initial positions of the assemblies;
if the arrangement direction is horizontal, determining that the at least two directions are respectively leftward and rightward;
and if the arrangement direction is longitudinal, determining that the at least two directions are upward and downward respectively.
Specifically, in the process of playing the current video, determining the position adjustment information of the component according to the current position of the currently played video image, the component located in the same display area as the current video and the display size of the component, includes:
and if the fact that the assembly and a main body in the video image are shielded is determined according to the currently played video image, the current position of the assembly which is located in the same display area with the current video and the display size of the assembly in the process of playing the current video, determining position adjustment information of the assembly.
S120, adjusting the component according to the position adjusting information to enable the component to avoid shielding of a main body in a video image, and taking the adjusted position of the component as the current position of the component.
Specifically, adjusting the component according to the position adjustment information includes:
determining the adjusting position of the component according to the position adjusting information and the component position limiting condition;
and modifying the position attribute of the component according to the determined adjusting position of the component so as to display the component according to the adjusting position.
According to the technical scheme of the embodiment of the invention, in the process of playing the current video, the position adjustment information of the component is determined according to the current position of the currently played video image, the component which is positioned in the same display area with the current video and the display size of the component; and adjusting the component according to the position adjustment information to enable the component to avoid shielding a main body in a video image. Therefore, intelligent dynamic layout of the short video webpage is realized, and the shielding of the components on the video content is avoided.
When the number of the components is at least two, this embodiment can realize that only the position of the component shielding the main body is adjusted, and in order to avoid the adjusted component from shielding the component not adjusted in position, the determining the position adjustment information of the component according to the current position of the currently played video image, the component located in the same display area as the current video image, and the display size of the component includes:
if the fact that the components and the main body in the video image are shielded is determined according to the currently played video image, the current position of the components which are located in the same display area with the current video and the display size of the components, and the number of the components is at least two, the moving position of the components for shielding the main body is determined;
determining the position relation between the component of the shielding main body and other components according to the current positions of the component of the shielding main body and other components;
determining the moving positions of other components according to the position relation and the moving position of the component for shielding the main body;
and determining position adjustment information of the component shielding the main body and other components according to the moving position of the component shielding the main body and the moving positions of other components.
Through the steps, the components which do not shield the main body can be sequentially moved according to the moving position of the components which shield the main body, so that shielding among the components is avoided.
Example two
Fig. 2 is a flowchart of a video playing method according to a second embodiment of the present invention. The present embodiment is an alternative proposed on the basis of the above-described embodiments. Referring to fig. 2, the video playing method provided in this embodiment includes:
and S210, carrying out main body region labeling on the training image to generate a main body labeling image.
And S220, generating a positive sample and a negative sample according to the main body labeling image.
Wherein the component in the positive sample and the subject in the training image are not occluded, the component in the negative sample and the subject in the training image are occluded, and the negative sample further comprises the position of the component after the occlusion is avoided.
Specifically, the positive sample includes: a subject annotation image, a current position of the component, and a displayed size of the component, the negative examples including: the method comprises the steps of marking an image of a main body, the current position of the component, the display size of the component and the position of the component after the component is hidden.
And S230, training the initial adjustment model by using the positive sample and the negative sample to obtain a shielding adjustment model.
S240, projecting the currently played video image to the canvas to generate the current video image.
The current video image only comprises the currently played video image and does not comprise the component information.
And S250, inputting the current video image, the current position of the component which is positioned in the same display area with the current video and the display size of the component into a shielding adjustment model, and outputting the position adjustment information of the component.
Optionally, the output result of the occlusion adjustment model may further include whether the component has an occlusion with a subject in the current video image.
And when the assembly and the main body in the current video image are shielded, the output result of the shielding adjustment model comprises the position adjustment information of the assembly.
S260, adjusting the component according to the position adjusting information to enable the component to avoid shielding of a main body in a video image, and taking the adjusted position of the component as the current position of the component.
According to the technical scheme of the embodiment of the invention, a position relation between a main body area and a component area is learned through a model; and judging the occlusion of the component and the main body in the video image and determining the position adjustment information of the component based on the position relation. Therefore, intelligent dynamic layout of the short video webpage is realized, and the shielding of the components on the video content is avoided.
EXAMPLE III
The embodiment is an alternative provided by taking an application scene as a scene for playing a video based on a web page on the basis of the above embodiment. The video playing method provided by the embodiment comprises the following steps:
referring to fig. 3a, the web page structure is layered and mainly divided into three layers: the bottom layer 102 is a video playback layer that displays video content; the middle layer 103 is a mobile position calculation layer, and is mainly a floating layer provided for the display position of the component; the top level is a component level 104, which is primarily a component of various displayable components, such as buttons, information, etc., for specified movable properties. Each tangible individual that may be separately displayed may be a component.
The web page structure can judge whether the main body area in the video content is shielded from the display area of the component in real time. If the component exists, the position where the component can be displayed is calculated in the middle layer, and then the position of the component is set according to the position where the component can be displayed in the component layer.
Referring to FIG. 3b, details of how the middle layer calculates and moves components are as follows:
and acquiring the current video by using the video label on the webpage.
For example, the video resource content is obtained according to the current video resource pointing address in the video.
Projecting the content of a video image currently played in a current video onto a canvas to generate a current video image;
specifically, the front-end canvas technology can be used to draw the currently played video image content to the video projection area with the same size as the current webpage display video area in real time or at regular time.
Sending the current position of at least one component, the display size of the component and the current video image into a shielding adjustment model, outputting whether each component is shielded from a main body area in the current video image, and outputting position adjustment information of the component by the shielding adjustment model when shielding exists.
And determining the position adjusting information of the component according to the position adjusting information of the component and the position adjusting condition of the component.
The position adjusting condition of the component comprises whether the component is allowed to be adjusted or not and the adjusting direction is limited.
And calculating a new display position according to the position adjustment information of each component and the current position of the component, modifying the position attribute of the component by using the new display position, and taking the new actual position as the current position of the component.
Wherein, the shielding adjustment model is obtained by performing supervised regression training through machine learning. The training process specifically comprises the following steps: and taking the training image, the marked image of the main body, the current position of the component and the display size of the component, wherein the main body area in the image is blackened, as a group of samples. If the component is shielded from the main body area in the training image, marking the sample as a negative sample; and if the component is not blocked from the main body area in the training image, marking the sample as a positive sample. The negative examples also include position information to avoid occlusion.
And repeatedly training the initial model by using the positive sample and the negative sample, so that whether the component blocks the main body area in the image and the position adjustment information of the component can be output when the current position of the component and the display size of the component are input.
The effect of the method in the actual application scene can be described as follows: in the process that a user browses a short video page on a mobile phone or a PC, the page automatically and actively detects or passively receives information along with the movement of the user watching video content, and responds to an operation area and an information display area component on a video in a current webpage. If the appropriate avoidance area exists, the webpage moves the operation area and the information display area assembly on the video in the current webpage to avoid the main area of the video, and the main area can be the pre-trained main content such as the figure outline, the human face, the animal outline and the like. If the user touches the screen currently, the operation area and the information display area assembly on the video in the current webpage stop moving in an autonomous avoiding mode for a certain time, and operation convenience is provided for the user. And after the waiting time is exceeded, continuing to carry out the avoidance moving logic. See fig. 3c for a specific effect.
According to the technical scheme of the embodiment of the invention, the user can obtain more optimized user experience through the interaction of the video content and the user interface.
It should be noted that, through the technical teaching of this embodiment, a person skilled in the art has an incentive to combine any of the implementation manners described in the above embodiments to implement intelligent dynamic layout on a short video webpage, so as to avoid the component from blocking the video content.
Example four
Fig. 4 is a schematic structural diagram of a video playing apparatus according to a fourth embodiment of the present invention. Referring to fig. 4, the video playing apparatus provided in this embodiment includes: an information determination module 10 and a position adjustment module 20.
The information determining module 10 is configured to determine, during a process of playing a current video, position adjustment information of a component according to a currently played video image, a current position of the component located in a same display area as the current video, and a display size of the component;
and the position adjusting module 20 is configured to adjust the component according to the position adjusting information, so that the component can avoid shielding a main body in a video image, and use the adjusted position of the component as the current position of the component.
According to the technical scheme of the embodiment of the invention, in the process of playing the current video, the position adjustment information of the component is determined according to the current position of the currently played video image, the component which is positioned in the same display area with the current video and the display size of the component; and adjusting the component according to the position adjustment information to enable the component to avoid shielding a main body in a video image. Therefore, intelligent dynamic layout of the short video webpage is realized, and the shielding of the components on the video content is avoided.
Further, the information determination module includes: the device comprises an area identification unit, a moving distance determination unit, a target distance determination unit and an information determination unit.
The region identification unit is used for identifying a main body region in the video image;
the moving distance determining unit is used for determining the moving distance of the component in at least two directions for avoiding shielding according to the main body area, the current position of the component which is positioned in the same display area with the current video and the display size of the component;
a target distance determining unit, configured to use a minimum value in the moving distances as a target distance, and use a direction to which the target distance belongs as a target direction;
and the information determining unit is used for determining the position adjusting information of the assembly according to the target distance and the target direction.
Further, the information determination module includes: a first position determination unit, a positional relationship determination unit, a second position determination unit, and an information determination unit.
The device comprises a first position determining unit, a second position determining unit and a display unit, wherein the first position determining unit is used for determining the moving position of a component for shielding a main body if the component and the main body in the video image are shielded according to a currently played video image, the current position of the component which is positioned in the same display area with the current video and the display size of the component, and the number of the components is at least two;
the position relation determining unit is used for determining the position relation between the component of the shielding main body and other components according to the current positions of the component of the shielding main body and other components;
a second position determining unit for determining the moving position of the other component according to the position relation and the moving position of the component for shielding the main body;
and the information determining unit is used for determining the position adjustment information of the component shielding the main body and other components according to the moving position of the component shielding the main body and the moving positions of other components.
Further, the information determination module includes: an image generating unit and an information output unit.
The image generation unit is used for projecting a currently played video image onto a canvas to generate a current video image;
and the information output unit is used for inputting the current video image, the current position of the component which is positioned in the same display area with the current video and the display size of the component into the shielding adjustment model and outputting the position adjustment information of the component.
Further, the apparatus further comprises: the system comprises a main body labeling module, a sample generating module and a model training module.
The main body labeling module is used for performing main body region labeling on a training image before inputting a current video image, the current position of a component which is located in the same display region with the current video and the display size of the component into the shielding adjustment model, and generating a main body labeling image;
the sample generation module is used for generating a positive sample and a negative sample according to the main body labeling image, wherein the assembly in the positive sample and the main body in the training image are not shielded, the assembly in the negative sample and the main body in the training image are shielded, and the negative sample further comprises the position of the assembly after shielding;
and the model training module is used for training the initial adjustment model by using the positive sample and the negative sample to obtain the shielding adjustment model.
Further, the movement distance determining unit is specifically configured to:
determining a minimum circumscribed graphic area of the component according to the current position of the component and the display size of the component;
drawing a straight line through the midpoint of the minimum circumscribed graphic area, wherein when the number of the components is at least two, the direction in which the straight line is located is the arrangement direction of the components;
identifying a subject region in a video image;
respectively taking intersection points of two boundaries of the partial area with the occlusion in the straight line and the main body area as target position points, and determining an initial position point of the target position point from the intersection points of the two boundaries of the straight line and the minimum circumscribed graph area;
and taking the distance between the target position point and the initial position point as the moving distance of the component in at least two directions for avoiding shielding.
Further, the apparatus further comprises: the device comprises an arrangement direction determining module, a transverse determining module and a longitudinal determining module.
The device comprises an arrangement direction determining module, a display module and a display module, wherein the arrangement direction determining module is used for determining the arrangement direction of the components according to the initial positions of the components if the number of the components is at least two before the moving distances of the components in at least two directions are determined;
a transverse determination module, configured to determine that the at least two directions are leftward and rightward, respectively, if the arrangement direction is a transverse direction;
a longitudinal determination module, configured to determine that the at least two directions are upward and downward, respectively, if the arrangement direction is a longitudinal direction.
The video playing device provided by the embodiment of the invention can execute the video playing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 5 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in FIG. 5, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The processing unit 16 executes various functional applications and data processing, such as implementing a video playing method provided by an embodiment of the present invention, by running a program stored in the system memory 28.
EXAMPLE six
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a video playing method according to any one of the embodiments of the present invention, where the method includes:
in the process of playing the current video, determining position adjustment information of the component according to the current played video image, the current position of the component which is positioned in the same display area with the current video and the display size of the component;
and adjusting the component according to the position adjustment information, so that the component can avoid shielding a main body in a video image, and taking the adjusted position of the component as the current position of the component.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (14)
1. A video playback method, comprising:
in the process of playing the current video, determining position adjustment information of the component according to the current played video image, the current position of the component which is positioned in the same display area with the current video and the display size of the component;
and adjusting the component according to the position adjustment information, so that the component can avoid shielding a main body in a video image, and taking the adjusted position of the component as the current position of the component.
2. The method according to claim 1, wherein the determining the position adjustment information of the component according to the currently played video image, the current position of the component in the same display area as the current video and the display size of the component comprises:
determining the moving distance of the component in at least two directions for avoiding shielding according to the currently played video image, the current position of the component in the same display area with the current video and the display size of the component;
taking the minimum value in the moving distances as a target distance, and taking the direction to which the target distance belongs as a target direction;
and determining position adjustment information of the component according to the target distance and the target direction.
3. The method according to claim 2, wherein the determining a moving distance of the component avoiding occlusion in at least two directions according to the currently played video image, the current position of the component in the same display area as the current video and the display size of the component comprises:
determining a minimum circumscribed graphic area of the component according to the current position of the component and the display size of the component;
drawing a straight line through the midpoint of the minimum circumscribed graphic area, wherein when the number of the components is at least two, the direction in which the straight line is located is the arrangement direction of the components;
identifying a subject region in a video image;
respectively taking intersection points of two boundaries of the partial area with the occlusion in the straight line and the main body area as target position points, and determining an initial position point of the target position point from the intersection points of the two boundaries of the straight line and the minimum circumscribed graph area;
and taking the distance between the target position point and the initial position point as the moving distance of the component in at least two directions for avoiding shielding.
4. The method of claim 2, wherein prior to determining the distance of movement of the component in at least two directions, the method further comprises:
if the number of the assemblies is at least two, determining the arrangement direction of the assemblies according to the initial positions of the assemblies;
if the arrangement direction is horizontal, determining that the at least two directions are respectively leftward and rightward;
and if the arrangement direction is longitudinal, determining that the at least two directions are upward and downward respectively.
5. The method according to claim 1, wherein the determining the position adjustment information of the component according to the currently played video image, the current position of the component in the same display area as the current video and the display size of the component comprises:
if the fact that the components and the main body in the video image are shielded is determined according to the currently played video image, the current position of the components which are located in the same display area with the current video and the display size of the components, and the number of the components is at least two, the moving position of the components for shielding the main body is determined;
determining the position relation between the component of the shielding main body and other components according to the current positions of the component of the shielding main body and other components;
determining the moving positions of other components according to the position relation and the moving position of the component for shielding the main body;
and determining position adjustment information of the component shielding the main body and other components according to the moving position of the component shielding the main body and the moving positions of other components.
6. The method according to claim 1, wherein the determining the position adjustment information of the component according to the currently played video image, the current position of the component in the same display area as the current video and the display size of the component comprises:
projecting a currently played video image onto a canvas to generate a current video image;
and inputting the current video image, the current position of the component which is positioned in the same display area with the current video and the display size of the component into a shielding adjustment model, and outputting the position adjustment information of the component.
7. The method of claim 6, wherein before inputting the current video image, the current position of the component in the same display area as the current video, and the display size of the component into the occlusion adjustment model, the method further comprises:
carrying out main body region labeling on the training image to generate a main body labeling image;
generating a positive sample and a negative sample according to a subject labeling image, wherein the component in the positive sample is not shielded from a subject in a training image, the component in the negative sample is shielded from the subject in the training image, and the negative sample further comprises a position of the component after shielding is avoided;
and training the initial adjustment model by using the positive sample and the negative sample to obtain a shielding adjustment model.
8. A video playback apparatus, comprising:
the information determining module is used for determining position adjusting information of the component according to a currently played video image, the current position of the component which is positioned in the same display area with the current video and the display size of the component in the process of playing the current video;
and the position adjusting module is used for adjusting the component according to the position adjusting information, so that the component can avoid shielding a main body in a video image, and the adjusted position of the component is used as the current position of the component.
9. The apparatus of claim 8, wherein the information determining module comprises:
the moving distance determining unit is used for determining the moving distance of the component in at least two directions for avoiding shielding according to the currently played video image, the current position of the component which is positioned in the same display area with the current video and the display size of the component;
a target distance determining unit, configured to use a minimum value in the moving distances as a target distance, and use a direction to which the target distance belongs as a target direction;
and the information determining unit is used for determining the position adjusting information of the assembly according to the target distance and the target direction.
10. The apparatus of claim 8, wherein the information determining module comprises:
the first position determining unit is used for determining the moving position of the component for shielding the main body if the component and the main body in the video image are determined to be shielded according to the currently played video image, the current position of the component which is positioned in the same display area with the current video and the display size of the component, and the number of the components is at least two;
the position relation determining unit is used for determining the position relation between the component of the shielding main body and other components according to the current positions of the component of the shielding main body and other components;
a second position determining unit for determining the moving position of the other component according to the position relation and the moving position of the component for shielding the main body;
and the information determining unit is used for determining the position adjustment information of the component shielding the main body and other components according to the moving position of the component shielding the main body and the moving positions of other components.
11. The apparatus of claim 8, wherein the information determining module comprises:
the image generation unit is used for projecting the currently played video image onto the canvas to generate a current video image;
and the information output unit is used for inputting the current video image, the current position of the component which is positioned in the same display area with the current video and the display size of the component into the shielding adjustment model and outputting the position adjustment information of the component.
12. The apparatus of claim 11, further comprising:
the main body labeling module is used for performing main body region labeling on the training image before inputting the current video image, the current position of the component which is positioned in the same display region with the current video and the display size of the component into the shielding adjustment model to generate a main body labeling image;
the sample generation module is used for generating a positive sample and a negative sample according to the main body labeling image, wherein the assembly in the positive sample and the main body in the training image are not shielded, the assembly in the negative sample and the main body in the training image are shielded, and the negative sample further comprises the position of the assembly after shielding;
and the model training module is used for training the initial adjustment model by using the positive sample and the negative sample to obtain the shielding adjustment model.
13. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the video playback method of any of claims 1-7.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a video playback method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910304956.3A CN111836093B (en) | 2019-04-16 | 2019-04-16 | Video playing method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910304956.3A CN111836093B (en) | 2019-04-16 | 2019-04-16 | Video playing method, device, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111836093A true CN111836093A (en) | 2020-10-27 |
CN111836093B CN111836093B (en) | 2022-05-31 |
Family
ID=72915561
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910304956.3A Active CN111836093B (en) | 2019-04-16 | 2019-04-16 | Video playing method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111836093B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113641926A (en) * | 2021-07-21 | 2021-11-12 | 深圳市六度人和科技有限公司 | Information display method, device and storage medium |
CN113778397A (en) * | 2021-09-01 | 2021-12-10 | 粒子文化科技集团(杭州)股份有限公司 | Page generation method and device, electronic device and storage medium |
CN114217889A (en) * | 2021-11-11 | 2022-03-22 | 北京百度网讯科技有限公司 | Display method, device, equipment and storage medium |
Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1781153A (en) * | 2003-04-28 | 2006-05-31 | 松下电器产业株式会社 | Recording medium and method, reproducing apparatus and method, program and integrated circuit |
US20090237372A1 (en) * | 2008-03-20 | 2009-09-24 | Lg Electronics Inc. | Portable terminal capable of sensing proximity touch and method for controlling screen in the same |
CN102307318A (en) * | 2011-03-18 | 2012-01-04 | 海尔集团公司 | Method and system for processing network video through network television |
US20140087832A1 (en) * | 2012-09-25 | 2014-03-27 | Igt | Gaming system and method for providing a symbol matrix with a moveable symbol display window |
CN104699374A (en) * | 2015-03-23 | 2015-06-10 | 联想(北京)有限公司 | Control method and electronic device |
CN105872702A (en) * | 2015-12-09 | 2016-08-17 | 乐视网信息技术(北京)股份有限公司 | Method and device for displaying virtual keyboard |
US20160313913A1 (en) * | 2013-01-31 | 2016-10-27 | Lg Electronics Inc. | Mobile terminal and controlling method thereof |
CN106101856A (en) * | 2016-06-24 | 2016-11-09 | 腾讯科技(北京)有限公司 | The playing method and device of media file |
CN106371696A (en) * | 2016-08-31 | 2017-02-01 | 珠海市魅族科技有限公司 | Interface display method and device |
CN106488293A (en) * | 2016-09-14 | 2017-03-08 | 乐视控股(北京)有限公司 | Video broadcasting method and device |
CN107147941A (en) * | 2017-05-27 | 2017-09-08 | 努比亚技术有限公司 | Barrage display methods, device and the computer-readable recording medium of video playback |
CN107396165A (en) * | 2016-05-16 | 2017-11-24 | 杭州海康威视数字技术股份有限公司 | A kind of video broadcasting method and device |
CN107801096A (en) * | 2017-10-30 | 2018-03-13 | 广东欧珀移动通信有限公司 | Video playback control method, device, terminal equipment and storage medium |
CN108052565A (en) * | 2017-12-06 | 2018-05-18 | 深圳市茁壮网络股份有限公司 | A kind of transparent processing method and device of the page |
CN109257631A (en) * | 2018-09-30 | 2019-01-22 | 武汉斗鱼网络科技有限公司 | Video carousel playback method, device, computer equipment and storage medium |
CN109525877A (en) * | 2018-10-18 | 2019-03-26 | 百度在线网络技术(北京)有限公司 | Information acquisition method and device based on video |
US20190102062A1 (en) * | 2007-09-26 | 2019-04-04 | Aq Media, Inc. | Audio-visual navigation and communication dynamic memory architectures |
-
2019
- 2019-04-16 CN CN201910304956.3A patent/CN111836093B/en active Active
Patent Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1781153A (en) * | 2003-04-28 | 2006-05-31 | 松下电器产业株式会社 | Recording medium and method, reproducing apparatus and method, program and integrated circuit |
US20190102062A1 (en) * | 2007-09-26 | 2019-04-04 | Aq Media, Inc. | Audio-visual navigation and communication dynamic memory architectures |
US20090237372A1 (en) * | 2008-03-20 | 2009-09-24 | Lg Electronics Inc. | Portable terminal capable of sensing proximity touch and method for controlling screen in the same |
CN102307318A (en) * | 2011-03-18 | 2012-01-04 | 海尔集团公司 | Method and system for processing network video through network television |
US20140087832A1 (en) * | 2012-09-25 | 2014-03-27 | Igt | Gaming system and method for providing a symbol matrix with a moveable symbol display window |
US20160313913A1 (en) * | 2013-01-31 | 2016-10-27 | Lg Electronics Inc. | Mobile terminal and controlling method thereof |
CN104699374A (en) * | 2015-03-23 | 2015-06-10 | 联想(北京)有限公司 | Control method and electronic device |
CN105872702A (en) * | 2015-12-09 | 2016-08-17 | 乐视网信息技术(北京)股份有限公司 | Method and device for displaying virtual keyboard |
CN107396165A (en) * | 2016-05-16 | 2017-11-24 | 杭州海康威视数字技术股份有限公司 | A kind of video broadcasting method and device |
CN106101856A (en) * | 2016-06-24 | 2016-11-09 | 腾讯科技(北京)有限公司 | The playing method and device of media file |
CN106371696A (en) * | 2016-08-31 | 2017-02-01 | 珠海市魅族科技有限公司 | Interface display method and device |
CN106488293A (en) * | 2016-09-14 | 2017-03-08 | 乐视控股(北京)有限公司 | Video broadcasting method and device |
CN107147941A (en) * | 2017-05-27 | 2017-09-08 | 努比亚技术有限公司 | Barrage display methods, device and the computer-readable recording medium of video playback |
CN107801096A (en) * | 2017-10-30 | 2018-03-13 | 广东欧珀移动通信有限公司 | Video playback control method, device, terminal equipment and storage medium |
CN108052565A (en) * | 2017-12-06 | 2018-05-18 | 深圳市茁壮网络股份有限公司 | A kind of transparent processing method and device of the page |
CN109257631A (en) * | 2018-09-30 | 2019-01-22 | 武汉斗鱼网络科技有限公司 | Video carousel playback method, device, computer equipment and storage medium |
CN109525877A (en) * | 2018-10-18 | 2019-03-26 | 百度在线网络技术(北京)有限公司 | Information acquisition method and device based on video |
Non-Patent Citations (2)
Title |
---|
GUANGCHAO ZHAI: "《A useful Multi-Window Monitor Design》", 《2018 IEEE INTERNATIONAL CONFERENCE ON CONSUMER ELECTRONICS-ASIA》 * |
张曼舒: "《移动端阅读类应用界面的设计研究》", 《中国优秀硕士学位论文全文数据库》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113641926A (en) * | 2021-07-21 | 2021-11-12 | 深圳市六度人和科技有限公司 | Information display method, device and storage medium |
CN113641926B (en) * | 2021-07-21 | 2024-05-07 | 深圳市六度人和科技有限公司 | Information display method, device and storage medium |
CN113778397A (en) * | 2021-09-01 | 2021-12-10 | 粒子文化科技集团(杭州)股份有限公司 | Page generation method and device, electronic device and storage medium |
CN114217889A (en) * | 2021-11-11 | 2022-03-22 | 北京百度网讯科技有限公司 | Display method, device, equipment and storage medium |
CN114217889B (en) * | 2021-11-11 | 2023-08-11 | 北京百度网讯科技有限公司 | Display method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111836093B (en) | 2022-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11528535B2 (en) | Video file playing method and apparatus, and storage medium | |
CN108553894B (en) | Display control method and device, electronic equipment and storage medium | |
CN111836093B (en) | Video playing method, device, equipment and medium | |
US10346032B2 (en) | Controlling display object on display screen | |
CN110032700B (en) | Information release control method and device, storage medium and electronic equipment | |
CN109918685B (en) | Computer-aided translation method, device, computer equipment and storage medium | |
CN112307408B (en) | Method and device for determining element information in page, electronic equipment and storage medium | |
US12067223B2 (en) | Context aware annotations for collaborative applications | |
US12135864B2 (en) | Screen capture method and apparatus, and electronic device | |
CN112817790B (en) | Method for simulating user behavior | |
CN112667118A (en) | Method, apparatus and computer readable medium for displaying historical chat messages | |
CN110675361B (en) | Method and device for establishing video detection model and video detection | |
CN110215686B (en) | Display control method and device in game scene, storage medium and electronic equipment | |
CN109558118B (en) | Method, apparatus, device and storage medium for creating native components of a smart applet | |
US20240319848A1 (en) | Customizing user interface controls around a cursor | |
US20160234266A1 (en) | Partial likes of social media content | |
CN114092608B (en) | Expression processing method and device, computer readable storage medium and electronic equipment | |
CN109857244B (en) | Gesture recognition method and device, terminal equipment, storage medium and VR glasses | |
CN116737044A (en) | Text display method, text display device, display equipment, electronic equipment and storage medium | |
CN110618771B (en) | Content display method, device, terminal and storage medium | |
CN109960562B (en) | Information display method and device and computer readable storage medium | |
CN112947804B (en) | A control method, system, device and medium for measuring device | |
CN110147260A (en) | Realize method, medium, device and the calculating equipment of scene transition animation | |
CN113377220B (en) | Information storage method and device | |
CN113821282B (en) | Method and device for showing statistical graphs |
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 |