CN111970570B - Method and device for prompting video content interaction position - Google Patents

Method and device for prompting video content interaction position Download PDF

Info

Publication number
CN111970570B
CN111970570B CN202010699145.0A CN202010699145A CN111970570B CN 111970570 B CN111970570 B CN 111970570B CN 202010699145 A CN202010699145 A CN 202010699145A CN 111970570 B CN111970570 B CN 111970570B
Authority
CN
China
Prior art keywords
target
interactive
picture
interaction
video
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.)
Active
Application number
CN202010699145.0A
Other languages
Chinese (zh)
Other versions
CN111970570A (en
Inventor
刘晓丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010699145.0A priority Critical patent/CN111970570B/en
Publication of CN111970570A publication Critical patent/CN111970570A/en
Application granted granted Critical
Publication of CN111970570B publication Critical patent/CN111970570B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation 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/4316Generation 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention provides a method and a device for prompting video content interaction positions, which are applied to an electronic terminal, wherein the method comprises the following steps: acquiring an interactive file corresponding to a target video; the interactive file comprises: and the at least one interactive picture and the corresponding relation between each interactive picture and the video frame in the target video. And in the playing process of the target video, determining the target mask corresponding to the currently played video frame according to the corresponding relation. And determining a target image area in the currently played video frame according to the position of the first area in the target mask. And displaying preset prompt information in a target image area in the currently played video frame to prompt a user that the target image area is provided with interactive information. In the process of playing the video, the invention determines the target image area in the current playing video frame through the interactive file, and then displays the preset prompt information in the target image area, thereby accurately prompting the user which video contents are set with interaction and realizing accurate interaction.

Description

Method and device for prompting video content interaction position
Technical Field
The invention relates to the technical field of videos, in particular to a method and a device for prompting video content interaction positions.
Background
With the increasing demand of people for video playing, the simple passive video playing mode is increasingly unable to meet the demand. Some video playing methods with video content interactive property appear in the prior art.
The existing video content interaction mode is usually presented in the form of an additional floating layer; i.e. pop up the floating layer and ask the user whether to interact in text form. For example, a scene in a video clip has a photo on the wall, the leading role in the video is moving around in the room, and the photo carries a piece of memory on the content setting. At the moment, a floating layer is presented on a video playing interface to inquire whether to check the memory borne by the photo; when the user clicks yes, the playing of a past affair fragment is triggered.
However, the floating layer can cover a part of the picture and the subtitle, and when more than one picture is on the wall, the prompt information can not accurately describe which specific picture is, so that the interaction of the video contents is not accurate enough.
Disclosure of Invention
In view of the above problems, embodiments of the present invention provide a method and an apparatus for prompting an interaction position of video content, so as to solve the problems in the prior art that a floating layer blocks a picture and a subtitle when video content interacts, and the interaction is not accurate enough.
In a first aspect of the present invention, a method for prompting a video content interaction location is provided, where the method is applied to an electronic terminal, and the method includes:
acquiring an interactive file corresponding to a target video; wherein the interactive file comprises: at least one interactive picture and the corresponding relation between each interactive picture and the video frame in the target video; the interactive picture and the video frame are in equal proportion;
in the playing process of the target video, determining a target interaction picture corresponding to the currently played video frame according to the corresponding relation;
determining a target image area in the currently played video frame according to the position of a first area in the target interactive picture;
and displaying preset prompt information in the target image area in the currently played video frame to prompt a user that the target image area is provided with interactive information.
Optionally, the first region of the target interactive picture has a first transparency, and the second region of the target interactive picture has a second transparency, where the first transparency is different from the second transparency, and the second region is a region of the target interactive picture other than the first region.
Optionally, the color of the first region is a preset color.
Optionally, the step of determining the target image area in the currently played video frame according to the position of the first area in the target interactive picture includes:
detecting the transparency of pixel points in the target interactive picture, and determining a first position of a region where the pixel points with the first transparency are located in the target interactive picture;
and determining a target image area corresponding to the first position in the currently played video frame according to the equal proportion relation between the interactive picture and the video frame.
Optionally, the step of detecting the transparency of the pixel point in the target interactive picture and determining the first position of the region where the pixel point with the first transparency is located in the target interactive picture includes:
detecting the transparency of the pixel points in the target interactive picture, and determining a first coordinate of a leftmost pixel point, a second coordinate of a rightmost pixel point, a third coordinate of a topmost pixel point and a fourth coordinate of a bottommost pixel point in the pixel points with the first transparency;
calculating to obtain a center coordinate according to the first coordinate, the second coordinate, the third coordinate and the fourth coordinate;
and taking the central coordinate as a first position of an area where the pixel point with the first transparency is located in the target interactive picture.
Optionally, the step of detecting the transparency of the pixel point in the target interactive picture and determining the first position of the region where the pixel point with the first transparency is located in the target interactive picture includes:
detecting the transparency of pixel points in the target interactive picture, and determining a plurality of pixel points with first transparency;
and taking the coordinate of any one of the pixel points as a first position of the area where the pixel point with the first transparency is located in the target interactive picture.
Optionally, the interactive file further includes: a preset time; in the playing process of the target video, the step of determining the target interaction picture corresponding to the currently played video frame according to the corresponding relation comprises the following steps:
and when the target video is played to the preset moment, determining a target interactive picture corresponding to the currently played video frame according to the corresponding relation.
Optionally, the interactive file further includes: presetting operation; after the step of displaying the preset prompt message in the target image area in the currently playing video frame, the method further includes:
under the condition of receiving an interaction instruction, determining an interaction position of the interaction instruction;
determining whether a mapping position corresponding to the interaction position in the target interaction picture is located in the first region or not according to the equal proportion relation between the interaction picture and the video frame;
and when the mapping position corresponding to the interaction position in the target interaction picture is located in the first area, executing the preset operation.
Optionally, a first region of the target interactive picture has a first transparency, a second region of the target interactive picture has a second transparency, and the first transparency is different from the second transparency, where the second region is a region of the target interactive picture other than the first region;
determining whether a mapping position corresponding to the interaction position in the target interaction picture is located in the first region according to the equal proportion relation between the interaction picture and the video frame, including:
determining a mapping position corresponding to the interaction position in the target interaction picture according to the equal proportion relation between the interaction picture and the video frame;
obtaining the transparency of the pixel point at the mapping position;
when the transparency of the pixel point at the mapping position is equal to the first transparency, the mapping position corresponding to the interaction position in the target interaction picture is located in the first region.
In a second aspect of the present invention, there is also provided an apparatus for prompting a video content interaction location, applied to an electronic terminal, the apparatus including:
the acquisition module is used for acquiring an interactive file corresponding to the target video; wherein the interactive file comprises: at least one interactive picture and the corresponding relation between each interactive picture and the video frame in the target video; the interactive picture and the video frame are in equal proportion;
the determining module is used for determining a target interactive picture corresponding to the currently played video frame according to the corresponding relation in the playing process of the target video;
the mapping module is used for determining a target image area in the current playing video frame according to the position of a first area in the target interactive picture;
and the interaction module is used for displaying preset prompt information in the target image area in the currently played video frame and prompting a user that the target image area is provided with interaction information.
Optionally, the first region of the target interactive picture has a first transparency, and the second region of the target interactive picture has a second transparency, where the first transparency is different from the second transparency, and the second region is a region of the target interactive picture other than the first region.
Optionally, the color of the first region is a preset color.
Optionally, the mapping module includes:
the first calculation unit is used for detecting the transparency of the pixel points in the target interactive picture and determining a first position of a region where the pixel points with the first transparency are located in the target interactive picture;
and the second calculating unit is used for determining a target image area corresponding to the first position in the currently played video frame according to the equal proportion relation between the interactive picture and the video frame.
Optionally, the first computing unit is specifically configured to detect the transparency of the pixel points in the target interaction picture, and determine a first coordinate of a leftmost pixel point, a second coordinate of a rightmost pixel point, a third coordinate of a topmost pixel point, and a fourth coordinate of a bottommost pixel point among the pixel points with the first transparency; calculating to obtain a center coordinate according to the first coordinate, the second coordinate, the third coordinate and the fourth coordinate; and taking the central coordinate as a first position of an area where the pixel point with the first transparency is located in the target interactive picture.
Optionally, the first computing unit is specifically configured to detect transparency of pixel points in the target interaction picture, and determine a plurality of pixel points with a first transparency; and taking the coordinate of any one of the pixel points as a first position of the area where the pixel point with the first transparency is located in the target interactive picture.
Optionally, the interactive file further includes: a preset time; the determining module is specifically configured to determine, according to the correspondence, a target interaction picture corresponding to a currently played video frame when the target video is played to the preset time.
Optionally, the interactive file further includes: presetting operation; the device further comprises:
the touch control module is used for determining the interaction position of the interaction instruction under the condition of receiving the interaction instruction;
the judging module is used for determining whether a mapping position corresponding to the interaction position in the target interaction picture is located in the first area or not according to the equal proportion relation between the interaction picture and the video frame;
and the execution module is used for executing the preset operation when the mapping position corresponding to the interaction position in the target interaction picture is positioned in the first area.
Optionally, a first region of the target interactive picture has a first transparency, and a second region of the target interactive picture has a second transparency, where the first transparency is different from the second transparency, and the second region is a region of the target interactive picture other than the first region; the judging module comprises:
the mapping unit is used for determining a mapping position corresponding to the interaction position in the target interaction picture according to the equal proportion relation between the interaction picture and the video frame;
the obtaining unit is used for obtaining the transparency of the pixel point at the mapping position;
and the judging unit is used for positioning the mapping position corresponding to the interaction position in the target interaction picture in the first area when the transparency of the pixel point at the mapping position is equal to the first transparency.
In a third aspect of the present invention, there is also 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;
and the processor is used for realizing the steps of the method for prompting the video content interaction position when executing the program stored in the memory.
In a fourth aspect implemented by the present invention, there is also provided a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method for prompting a video content interaction location according to any one of the first aspect.
In a fifth aspect of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the above method of prompting a video content interaction location.
Aiming at the prior art, the invention has the following advantages:
according to the method for prompting the video content interaction position, the interaction file corresponding to the target video can be obtained; wherein, the interactive file includes: at least one interactive picture and the corresponding relation between each interactive picture and a video frame in a target video; the interactive picture is in equal proportion to the video frame. And in the playing process of the target video, determining a target interactive picture corresponding to the currently played video frame according to the corresponding relation. Determining a target image area in a currently played video frame according to the position of a first area in a target interactive picture in the target interactive picture; by utilizing the equal proportion relation between the interactive picture and the video frame, the target image area corresponding to the first area can be quickly and accurately positioned. Compared with the method for directly determining the target image area in the video frame with complex content, the method is simpler. And displaying preset prompt information in a target image area in the currently played video frame to prompt a user that the target image area is provided with interactive information. The preset prompt information is directly displayed in the target image area for interaction, so that the prompt information can move along with a playing picture in the video playing process and is not limited to a fixed position. Meanwhile, the video content with the interactive information in the playing picture can be accurately locked, and the visual experience of the user is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a flowchart illustrating steps of a method for prompting a video content interaction location according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a second step of a method for prompting a video content interaction location according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a third step of a method for prompting a video content interaction location according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a fourth step of a method for prompting a video content interaction location according to an embodiment of the present invention;
FIG. 5 is a block diagram of an apparatus for indicating an interaction location of video content according to an embodiment of the present invention;
fig. 6 is a second block diagram illustrating a structure of an apparatus for prompting a video content interaction location according to an embodiment of the present invention;
fig. 7 is a third block diagram illustrating a structure of an apparatus for prompting a video content interaction location according to an embodiment of the present invention;
fig. 8 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
The embodiment of the invention provides a method for prompting video content interaction positions, which is applied to an electronic terminal, wherein the electronic terminal can be an electronic device with a video playing function, such as a mobile phone, a computer and the like.
Referring to fig. 1, the method for prompting the video content interaction position includes:
step 101, obtaining an interactive file corresponding to a target video.
It should be noted that the target video is a video file with a preset duration, and preferably, the target video is a video file including advertisements and red-covered points. The interactive file comprises: at least one interactive picture and the corresponding relation between each interactive picture and a video frame in a target video; the interactive picture is in equal proportion to the video frame. Preferably, the interactive picture may be a mask made from the video frame. For example, a picture masking technique is used to make a mask for a video frame of a target video, and the made mask is used as an interactive picture in an interactive file. The interactive file is used for displaying prompt information at the position of the playing picture, which is provided with the interactive function, in the process of playing the target video, so that a user is prompted to determine where interaction can be carried out. The interactive file can be generated in advance according to the target video, and then when the target video is obtained, the interactive file corresponding to the target video is obtained at the same time. Of course, after the target video is obtained, the corresponding interactive file may also be obtained according to the information of the target video. For example, storing an interactive file corresponding to a target video in a network server, and acquiring the address of the interactive file in the network server when the target video is acquired; and then acquiring the interactive file from the network server according to the address. After the target video and the interactive file are acquired, the target video and the interactive file are stored in a local standby mode.
In the interactive file, each interactive picture corresponds to at least one video frame. The number of the video frames corresponding to each interactive picture can be determined according to requirements. If the identified object or person in the target video is relatively immobile, the number of the interactive pictures can be properly reduced, that is, the number of the video frames corresponding to each interactive picture can be properly increased; if the identified object or person in the target video moves rapidly, the number of the interactive pictures can be increased appropriately, that is, the number of the video frames corresponding to each interactive picture can be decreased appropriately. The position of the identified object and the person is the position where the prompt interactive prompt information is expected to be displayed. Preferably, each interactive picture has a different timestamp, and the corresponding relationship between the interactive picture and the video frame can be established according to the timestamp of the interactive picture and the timestamp on the video frame, but is not limited thereto. For example, all interactive pictures in the interactive file can be orderly arranged, and each interactive picture has a unique position serial number; and establishing a corresponding relation between the interactive pictures and the video frames according to the position serial numbers of the interactive pictures and the positions of the video frames in the target video.
And 102, in the playing process of the target video, determining a target interaction picture corresponding to the currently played video frame according to the corresponding relation.
It should be noted that the target interactive picture is one of at least one interactive picture in the interactive file. Playing a video frame at each playing moment, and then determining an interactive picture corresponding to the video frame played at the playing moment, namely a target interactive picture, according to the played video frame and the corresponding relation. Therefore, in the process of playing the target video, one target interactive picture can be determined for each playing time. Preferably, the target interactive pictures determined at the adjacent playing time points can be the same or different.
Step 103, determining a target image area in the currently played video frame according to the position of the first area in the target interactive picture.
It should be noted that the first area is a partial area in the target interactive picture, and a figure enclosed by edges of the first area may be a regular figure or an irregular figure. Because the interactive picture is in equal proportion to the video frame; preferably, the target image area is an area of the first area mapped in the currently played video frame; that is to say, the position of the first region in the target interactive picture is the same as the position of the target image region in the currently playing video frame. Of course, the target image area may also be a part of the area mapped in the currently playing video frame for the first area; or the target image area is in the current playing video frame and comprises an area of the first area mapped in the current playing video frame.
And 104, displaying preset prompt information in a target image area in the currently played video frame to prompt a user that the target image area is provided with interactive information.
It should be noted that the preset prompt information may be prompt animation, prompt text, highlight, etc.
In the embodiment of the invention, an interactive file corresponding to a target video is obtained; wherein, the interactive file includes: at least one interactive picture and the corresponding relation between each interactive picture and a video frame in a target video; the interactive picture is in equal proportion to the video frame. And in the playing process of the target video, determining a target interactive picture corresponding to the currently played video frame according to the corresponding relation. Determining a target image area in a currently played video frame according to the position of a first area in a target interactive picture in the target interactive picture; by utilizing the equal proportion relation between the interactive picture and the video frame, the target image area corresponding to the first area can be quickly and accurately positioned. Compared with the method for directly determining the target image area in the video frame with complex content, the method is simpler. And displaying preset prompt information in a target image area in the currently played video frame to prompt a user that the target image area is provided with interactive information. The preset prompt information is directly displayed in the target image area for interaction, so that the prompt information can move along with a playing picture in the video playing process and is not limited to a fixed position. Meanwhile, the video content with the interactive information in the playing picture can be accurately locked, and the visual experience of the user is improved.
Fig. 2 is a flowchart illustrating steps of another method for prompting a video content interaction location according to an embodiment of the present invention, as shown in fig. 2, the method includes:
step 201, acquiring an interactive file corresponding to a target video.
It should be noted that the target video is a video file with a preset duration, and preferably, the target video is a video file including advertisements and red-covered points. The interactive file comprises: at least one interactive picture and the corresponding relation between each interactive picture and a video frame in a target video; the interactive picture is in equal proportion to the video frame. Preferably, the interactive picture may be a mask made from the video frame. For example, a picture masking technique is used to make a mask for a video frame of a target video, and the made mask is used as an interactive picture in an interactive file. The interactive file is used for displaying prompt information at the position of the playing picture, which is provided with the interactive function, in the process of playing the target video, so that a user is prompted to determine where interaction can be carried out. The interactive file can be generated in advance according to the target video, and then when the target video is obtained, the interactive file corresponding to the target video is obtained at the same time. Of course, after the target video is obtained, the corresponding interactive file may also be obtained according to the information of the target video. For example, storing an interactive file corresponding to a target video in a network server, and acquiring the address of the interactive file in the network server when the target video is acquired; and then acquiring the interactive file from the network server according to the address. After the target video and the interactive file are acquired, the target video and the interactive file are stored in a local standby mode.
In the interactive file, each interactive picture corresponds to at least one video frame. The number of the video frames corresponding to each interactive picture can be determined according to requirements. If the identified object or person in the target video is relatively immobile, the number of the interactive pictures can be properly reduced, that is, the number of the video frames corresponding to each interactive picture can be properly increased; if the identified object or person in the target video moves rapidly, the number of the interactive pictures can be increased appropriately, that is, the number of the video frames corresponding to each interactive picture can be decreased appropriately. The position of the identified object and the person is the position where the prompt interactive prompt information is expected to be displayed. Preferably, each interactive picture has a different timestamp, and the corresponding relationship between the interactive picture and the video frame can be established according to the timestamp of the interactive picture and the timestamp on the video frame, but is not limited thereto. For example, all interactive pictures in the interactive file can be orderly arranged, and each interactive picture has a unique position serial number; and establishing a corresponding relation between the interactive pictures and the video frames according to the position serial numbers of the interactive pictures and the positions of the video frames in the target video.
Step 202, in the playing process of the target video, according to the corresponding relation, determining a target interaction picture corresponding to the currently played video frame.
It should be noted that the target interactive picture is one of at least one interactive picture in the interactive file. Playing a video frame at each playing moment, and then determining an interactive picture corresponding to the video frame played at the playing moment, namely a target interactive picture, according to the played video frame and the corresponding relation. Therefore, in the process of playing the target video, one target interactive picture can be determined for each playing time. Preferably, the target interactive pictures determined at the adjacent playing time points can be the same or different.
Step 203, detecting the transparency of the pixel points in the target interactive picture, and determining a first position of a region where the pixel points with the first transparency are located in the target interactive picture.
It should be noted that the first region of the target interactive picture has a first transparency, and the second region has a second transparency, and the first transparency is different from the second transparency, wherein the second region is a region of the target interactive picture other than the first region. Therefore, the first area can be determined through the transparency of the pixel points in the target interactive picture. The color of the first region is a preset color, and the preset color may be any color, such as black, but is not limited thereto. The color of the second region may be the same as or different from the color of the first region. Preferably, the first transparency is a parameter value when the first region is completely opaque, and the color of the first region is black; the second transparency is the value of the parameter at full transparency and the color of the second area is white. When the parameter value range of the transparency is 0-1, the parameter value of 1 indicates complete opacity, and the parameter value of 0 indicates complete transparency.
Since the first region of the target interactive picture has the first transparency, the first position determined by the transparency of the pixel point is the position of the first region. Certainly, the position of the first region may also be determined according to the color of the pixel point, for example, the pixel points of the first region and the second region of the target interactive picture are set to have different colors, so that the position of the first region may be determined according to the color of the pixel point. When the position of the first region is determined by the color of the pixel point, the transparency of the pixel point does not need to be concerned, that is, the transparencies of the first region and the second region can be the same or different. Determining the position of the first area according to the transparency or the color of the pixel point; the process is similar. Here, the description will be given only by taking an example of determining the position of the first region according to the transparency of the pixel point.
It is noted that if the interactive picture corresponding to the currently played video frame is the same as the interactive picture corresponding to the previously played video frame, the first position does not need to be recalculated, and the first position determined in the process of processing the previously played video frame can be reused. The first position may be a coordinate or a region. When the first position is a coordinate, step 203 specifically includes:
detecting the transparency of pixel points in the target interactive picture, and determining a first coordinate of a leftmost pixel point, a second coordinate of a rightmost pixel point, a third coordinate of a topmost pixel point and a fourth coordinate of a bottommost pixel point in the pixel points with the first transparency;
calculating to obtain a center coordinate according to the first coordinate, the second coordinate, the third coordinate and the fourth coordinate;
and taking the central coordinate as a first position of the area where the pixel point with the first transparency is located in the target interactive picture.
Of course, the first position may also be a coordinate at any pixel point in the first area, and step 203 specifically includes:
detecting the transparency of pixel points in a target interactive picture, and determining a plurality of pixel points with first transparency;
and taking the coordinate of any one of the pixel points as a first position of the area where the pixel point with the first transparency is located in the target interactive picture.
And 204, determining a target image area corresponding to the first position in the currently played video frame according to the equal proportion relation between the interactive picture and the video frame.
It should be noted that, according to the equal proportion relation, the second position corresponding to the first position may be determined in the currently played video frame; the second position is a position of the first position in the target interactive picture mapped in the current playing video frame. When the first position is a coordinate, the second position is also a coordinate, and the target image area may be a circular range with the coordinate indicated by the second position as a center and the preset value as a radius, but is not limited thereto. When the first position indicates a region range, the second position also indicates a region range; preferably, the relative position of the area indicated by the second position with respect to the currently played video frame is the same as the relative position of the first area indicated by the first position with respect to the entire target interactive picture. Video frames are usually rectangular, and the equal proportion relationship indicates that the aspect ratio of the interactive picture is the same as that of the video frame. Therefore, when the target interactive picture and the currently played video frame are in the same coordinate system (for example, the target interactive picture and the currently played video frame both have the lower left corner as the origin of the coordinate system, the length direction is parallel to the x axis, the width direction is parallel to the y axis, and the target interactive picture and the currently played video frame are both located in the first quadrant of the coordinate system), and the sizes of the interactive picture and the video frame are completely the same, if the coordinate of the upper right corner of the target interactive picture in the coordinate system is (4, 6); the position in the currently playing video frame indicated by the coordinates (4, 6) in the coordinate system is the upper right corner of the currently playing video frame.
Step 205, displaying preset prompting information in a target image area in the currently played video frame to prompt a user that the target image area is provided with interaction information.
It should be noted that the preset prompt information may be prompt animation, prompt text, highlight, etc.
In the embodiment of the invention, an interactive file corresponding to a target video is obtained; wherein, the interactive file includes: at least one interactive picture and the corresponding relation between each interactive picture and a video frame in a target video; the interactive picture is in equal proportion to the video frame. And in the playing process of the target video, determining a target interactive picture corresponding to the currently played video frame according to the corresponding relation. Detecting the transparency of pixel points in the target interactive picture, and determining a first position of a region where the pixel points with the first transparency are located in the target interactive picture; determining a target image area corresponding to a first position in a currently played video frame according to the equal proportion relation between the interactive picture and the video frame; the first position of the first area in the target interactive picture can be determined through the transparency of the pixel points; and then, by utilizing the equal proportion relation between the interactive picture and the video frame and the determined first position, the target image area corresponding to the first area can be quickly and accurately positioned. Compared with the method for directly determining the target image area in the video frame with complex content, the method is simpler. And displaying preset prompt information in a target image area in the currently played video frame to prompt a user that the target image area is provided with interactive information. The preset prompt information is directly displayed in the target image area for interaction, so that the prompt information can move along with a playing picture in the video playing process and is not limited to a fixed position. Meanwhile, the video content with the interactive information in the playing picture can be accurately locked, and the visual experience of the user is improved.
Fig. 3 is a flowchart illustrating steps of another method for prompting a video content interaction location according to an embodiment of the present invention, as shown in fig. 3, the method includes:
step 301, acquiring an interactive file corresponding to a target video.
It should be noted that the target video is a video file with a preset duration, and preferably, the target video is a video file including advertisements and red-covered points. The interactive file comprises: at least one interactive picture and the corresponding relation between each interactive picture and a video frame in a target video; the interactive picture is in equal proportion to the video frame. Preferably, the interactive picture may be a mask made from the video frame. For example, a picture masking technique is used to make a mask for a video frame of a target video, and the made mask is used as an interactive picture in an interactive file. The interactive file is used for displaying prompt information at the position of the playing picture, which is provided with the interactive function, in the process of playing the target video, so that a user is prompted to determine where interaction can be carried out. The interactive file can be generated in advance according to the target video, and then when the target video is obtained, the interactive file corresponding to the target video is obtained at the same time. Of course, after the target video is obtained, the corresponding interactive file may also be obtained according to the information of the target video. For example, storing an interactive file corresponding to a target video in a network server, and acquiring the address of the interactive file in the network server when the target video is acquired; and then acquiring the interactive file from the network server according to the address. After the target video and the interactive file are acquired, the target video and the interactive file are stored in a local standby mode.
In the interactive file, each interactive picture corresponds to at least one video frame. The number of the video frames corresponding to each interactive picture can be determined according to requirements. If the identified object or person in the target video is relatively immobile, the number of the interactive pictures can be properly reduced, that is, the number of the video frames corresponding to each interactive picture can be properly increased; if the identified object or person in the target video moves rapidly, the number of the interactive pictures can be increased appropriately, that is, the number of the video frames corresponding to each interactive picture can be decreased appropriately. The position of the identified object and the person is the position where the prompt interactive prompt information is expected to be displayed. Preferably, each interactive picture has a different timestamp, and the corresponding relationship between the interactive picture and the video frame can be established according to the timestamp of the interactive picture and the timestamp on the video frame, but is not limited thereto. For example, all interactive pictures in the interactive file can be orderly arranged, and each interactive picture has a unique position serial number; and establishing a corresponding relation between the interactive pictures and the video frames according to the position serial numbers of the interactive pictures and the positions of the video frames in the target video.
And 302, when the target video is played to a preset time, determining a target interaction picture corresponding to the currently played video frame according to the corresponding relation.
It should be noted that the interactive file further includes: a predetermined time. And monitoring the playing time in the playing process of the target video, and when the playing time reaches the preset time and in the playing process later, executing the step of determining the target interactive picture corresponding to the currently played video frame according to the corresponding relation. For example, the duration of the target video is ten minutes, and the preset time is two minutes and thirty seconds. And in the target video playing process, the playing time starts from zero minutes and zero seconds to the end of ten seconds. And in the playing process of the target video from two minutes to thirty seconds to ten zero seconds, the step of determining the target interactive picture corresponding to the currently played video frame according to the corresponding relation is always executed.
The target interactive picture is one of at least one interactive picture in the interactive file. Playing a video frame at each playing moment, and then determining an interactive picture corresponding to the video frame played at the playing moment, namely a target interactive picture, according to the played video frame and the corresponding relation. Therefore, in the process of playing the target video, one target interactive picture can be determined for each playing time. Preferably, the target interactive pictures determined at the adjacent playing time points can be the same or different.
Step 303, determining a target image area in the currently played video frame according to the position of the first area in the target interactive picture.
It should be noted that the first area is a partial area in the target interactive picture, and a figure enclosed by edges of the first area may be a regular figure or an irregular figure. Because the interactive picture is in equal proportion to the video frame; preferably, the target image area is an area of the first area mapped in the currently played video frame; that is to say, the position of the first region in the target interactive picture is the same as the position of the target image region in the currently playing video frame. Of course, the target image area may also be a part of the area mapped in the currently playing video frame for the first area; or the target image area is in the current playing video frame and comprises an area of the first area mapped in the current playing video frame.
Step 304, displaying preset prompting information in a target image area in the currently played video frame to prompt a user that the target image area is provided with interaction information.
It should be noted that the preset prompt information may be prompt animation, prompt text, highlight, etc.
In the embodiment of the invention, the interactive file corresponding to the target video can be obtained; wherein, the interactive file includes: at least one interactive picture and the corresponding relation between each interactive picture and a video frame in a target video; the interactive picture is in equal proportion to the video frame. And when the target video is played to a preset moment, determining a target interactive picture corresponding to the currently played video frame according to the corresponding relation. When the target video is not played to the preset moment, the target interaction picture does not need to be determined, and therefore the preset prompt information does not need to be displayed. By setting the preset time, the time for prompting through the preset prompting information can be freely started. Determining a target image area in a currently played video frame according to the position of a first area in a target interactive picture in the target interactive picture; by utilizing the equal proportion relation between the interactive picture and the video frame, the target image area corresponding to the first area can be quickly and accurately positioned. Compared with the method for directly determining the target image area in the video frame with complex content, the method is simpler. And displaying preset prompt information in a target image area in the currently played video frame to prompt a user that the target image area is provided with interactive information. The preset prompt information is directly displayed in the target image area for interaction, so that the prompt information can move along with a playing picture in the video playing process and is not limited to a fixed position. Meanwhile, the video content with the interactive information in the playing picture can be accurately locked, and the visual experience of the user is improved.
Fig. 4 is a flowchart illustrating steps of another method for prompting a video content interaction location according to an embodiment of the present invention, where as shown in fig. 4, the method includes:
step 401, acquiring an interactive file corresponding to a target video.
It should be noted that the target video is a video file with a preset duration, and preferably, the target video is a video file including advertisements and red-covered points. The interactive file comprises: at least one interactive picture and the corresponding relation between each interactive picture and a video frame in a target video; the interactive picture is in equal proportion to the video frame. Preferably, the interactive picture may be a mask made from the video frame. For example, a picture masking technique is used to make a mask for a video frame of a target video, and the made mask is used as an interactive picture in an interactive file. The interactive file is used for displaying prompt information at the position of the playing picture, which is provided with the interactive function, in the process of playing the target video, so that a user is prompted to determine where interaction can be carried out. The interactive file can be generated in advance according to the target video, and then when the target video is obtained, the interactive file corresponding to the target video is obtained at the same time. Of course, after the target video is obtained, the corresponding interactive file may also be obtained according to the information of the target video. For example, storing an interactive file corresponding to a target video in a network server, and acquiring the address of the interactive file in the network server when the target video is acquired; and then acquiring the interactive file from the network server according to the address. After the target video and the interactive file are acquired, the target video and the interactive file are stored in a local standby mode.
In the interactive file, each interactive picture corresponds to at least one video frame. The number of the video frames corresponding to each interactive picture can be determined according to requirements. If the identified object or person in the target video is relatively immobile, the number of the interactive pictures can be properly reduced, that is, the number of the video frames corresponding to each interactive picture can be properly increased; if the identified object or person in the target video moves rapidly, the number of the interactive pictures can be increased appropriately, that is, the number of the video frames corresponding to each interactive picture can be decreased appropriately. The position of the identified object and the person is the position where the prompt interactive prompt information is expected to be displayed. Preferably, each interactive picture has a different timestamp, and the corresponding relationship between the interactive picture and the video frame can be established according to the timestamp of the interactive picture and the timestamp on the video frame, but is not limited thereto. For example, all interactive pictures in the interactive file can be orderly arranged, and each interactive picture has a unique position serial number; and establishing a corresponding relation between the interactive pictures and the video frames according to the position serial numbers of the interactive pictures and the positions of the video frames in the target video.
And 402, in the playing process of the target video, determining a target interactive picture corresponding to the currently played video frame according to the corresponding relation.
It should be noted that the target interactive picture is one of at least one interactive picture in the interactive file. Playing a video frame at each playing moment, and then determining an interactive picture corresponding to the video frame played at the playing moment, namely a target interactive picture, according to the played video frame and the corresponding relation. Therefore, in the process of playing the target video, one target interactive picture can be determined for each playing time. Preferably, the target interactive pictures determined at the adjacent playing time points can be the same or different.
Step 403, determining a target image area in the currently played video frame according to the position of the first area in the target interactive picture.
It should be noted that the first area is a partial area in the target interactive picture, and a figure enclosed by edges of the first area may be a regular figure or an irregular figure. Because the interactive picture is in equal proportion to the video frame; preferably, the target image area is an area of the first area mapped in the currently played video frame; that is to say, the position of the first region in the target interactive picture is the same as the position of the target image region in the currently playing video frame. Of course, the target image area may also be a part of the area mapped in the currently playing video frame for the first area; or the target image area is in the current playing video frame and comprises an area of the first area mapped in the current playing video frame.
Step 404, displaying preset prompting information in a target image area in the currently played video frame to prompt a user that the target image area is provided with interaction information.
It should be noted that the preset prompt information may be prompt animation, prompt text, highlight, etc.
Step 405, determining the interaction position of the interaction instruction under the condition that the interaction instruction is received.
It should be noted that, in the process of playing the target video by the electronic terminal, the video frame of the target video is displayed by the display screen. In this process, a user clicking on the display screen will trigger an interaction command. The interactive position of the interactive instruction is the position where the user clicks in the display screen or the currently played video frame.
Step 406, determining whether the mapping position of the corresponding interaction position in the target interaction picture is located in the first region according to the equal proportion relation between the interaction picture and the video frame.
It should be noted that, if the mapping position is located in the first region of the target interactive picture, it indicates that the interactive position is located in the target image region of the currently played video frame.
The first region of the target interactive picture has a first transparency, the second region has a second transparency, and the first transparency is different from the second transparency, wherein the second region is a region of the target interactive picture except the first region. In this step, the transparency of the pixel points in the target interactive picture can be utilized to judge whether the mapping position of the corresponding interactive position in the target interactive picture is located in the first region. Specifically, step 406 includes:
determining a mapping position of a corresponding interaction position in a target interaction picture according to the equal proportion relation between the interaction picture and the video frame;
acquiring the transparency of the pixel points at the mapping positions;
when the transparency of the pixel point at the mapping position is equal to the first transparency, the mapping position corresponding to the interaction position in the target interaction picture is located in the first area.
When the transparency of the pixel point at the mapping position is equal to the second transparency, the mapping position corresponding to the interaction position in the target interaction picture is located outside the first area.
Step 407, when the mapping position corresponding to the interaction position in the target interaction picture is located in the first region, a preset operation is performed.
It should be noted that the interactive file further includes: presetting operation; the preset operation may be to pop up a prompt floating layer, execute a section of animation or play a section of video, etc.
In the embodiment of the invention, the interactive file corresponding to the target video can be obtained; wherein, the interactive file includes: at least one interactive picture and the corresponding relation between each interactive picture and a video frame in a target video; the interactive picture is in equal proportion to the video frame. And in the playing process of the target video, determining a target interactive picture corresponding to the currently played video frame according to the corresponding relation. Determining a target image area in a currently played video frame according to the position of a first area in a target interactive picture in the target interactive picture; by utilizing the equal proportion relation between the interactive picture and the video frame, the target image area corresponding to the first area can be quickly and accurately positioned. Compared with the method for directly determining the target image area in the video frame with complex content, the method is simpler. And displaying preset prompt information in a target image area in the currently played video frame to prompt a user that the target image area is provided with interactive information. The preset prompt information is directly displayed in the target image area for interaction, so that the prompt information can move along with a playing picture in the video playing process and is not limited to a fixed position. Meanwhile, the video content with the interactive information in the playing picture can be accurately locked, and the visual experience of the user is improved. After the preset prompt information is displayed, determining the interaction position of the interaction instruction under the condition that the interaction instruction is received; determining whether the mapping position of the corresponding interaction position in the target interaction picture is located in the first area or not according to the equal proportion relation between the interaction picture and the video frame; and when the mapping position corresponding to the interaction position in the target interaction picture is positioned in the first area, executing preset operation. Thereby enabling user interaction with the video content.
In an application process of another method for prompting a video content interaction position provided by the embodiment of the invention, an interaction picture sequence is generated in advance according to a target video, wherein the interaction picture sequence is specifically a mask sequence, the mask sequence in the following whole description process refers to the interaction picture sequence, and the corresponding mask refers to an interaction picture; the generated mask sequence satisfies the following requirements:
first, each mask is used to represent the location of a person or object identified at a particular time in the target video.
Second, each mask size is proportional to the video frame, and the proportional relationship is 1: 1, the color in the mask is only one of black.
Third, a first area of the mask corresponding to the identified person or item of the video frame is filled with black, while the other portions are all filled with transparent pixels.
Fourth, the number of masks in a mask sequence can be determined from the scene. If the identified item or character is relatively immobile, the number of masks in the mask sequence may be reduced appropriately; if the identified item or character is moving rapidly, the number of masks in the mask sequence may be increased appropriately. The former case recommends 5 masks per second, the latter case recommends 15 masks per second.
Adding a timestamp for each mask, and establishing a corresponding relation between each mask and timestamps of a plurality of video frames in the target video;
setting the interaction starting time and the event description of the interaction operation, specifically setting according to the requirement, such as popping up a prompt floating layer, executing a section of animation or playing a section of video and the like.
And finally, packaging the mask sequence, the corresponding relation, the interaction starting time and the event description of the interaction operation into an interaction file in a JSON (JavaScript Object Notation) or XML (Extensible Markup Language) format, storing the interaction file in a network server, and generating a storage address of the interaction file in the network server.
The method for prompting the video content interaction position comprises the following steps:
step 1, when the electronic terminal acquires the target video, the electronic terminal simultaneously acquires the storage address.
And 2, downloading the interactive file from the Internet server according to the storage address and storing the interactive file into a local storage.
And 3, monitoring a target video playing progress changing event, checking whether the current playing time reaches or exceeds the interaction starting time in the interaction file when the target video playing progress is changed, if not, repeatedly executing the step 3, and if so, executing the step 4.
And 4, reading the mask A corresponding to the currently played video frame from the mask sequence according to the current playing time.
And step 5, determining a left boundary value leftSide, a right boundary value rightSide, an upper boundary value topSide and a lower boundary value bottomSide of the first area in the mask A. The method of determining each side boundary value is similar, and only the process of determining the left side boundary value will be described herein. Reading the color of each pixel point in the first row from left to right, if the color is transparent, continuing to search the next pixel point in the row until one pixel point is found, wherein the pixel color is black, recording the position leftA of the black pixel in the row, simultaneously setting leftSide to leftA, then ending the row search, and continuing to search the next row. If the second row finds that the black pixel position is leftB, the sizes of leftSide and leftB are compared, if the leftB is smaller than the leftSide, the value of the leftSide is updated, and the leftSide is set as leftB. Repeating the above operations can obtain the leftSide boundary value leftSide of the first region.
Step 6, determining the position (centerX, centerY) of the center point of the first area on the mask according to the side boundary values; wherein centerX ═ leftSide + (rightSide-leftSide)/2; centreyy ═ topSide + (bottside-topSide)/2.
And 7, drawing a prompt animation at the central point of the current playing video frame based on the position (centerX, centerY). (e.g., red blinking effect). When the playing progress is changed, steps 4 to 7 are repeatedly performed. If the obtained mask is the same as the current mask, the marker position is not changed at the time point, and the refreshing is carried out to reduce the processing and improve the performance.
And 8, acquiring the specific position clicked on the screen by the user when the user clicks the screen, and setting the position as (pointX, pointY). Reading the color of the point from the mask at the moment, if the point is transparent, indicating that the user does not click the identified person or object, and at the moment, executing a preset event is not needed; if the point is black, it indicates that the user clicks the identified person or object, and a preset event needs to be read from the interactive description file and executed.
According to the embodiment of the invention, the position of the first area in the target mask is easily determined by utilizing the characteristic of monotonous mask color. And then directly determining a target image area in the currently played video frame according to the relation between the mask and the corresponding video frame. Compared with the method for directly determining the target image area in the video frame, the method is simpler. In addition, preset prompt information is directly added to the target image area for interaction, so that the prompt information can move along with a playing picture in the video playing process and is not limited to a fixed position. Meanwhile, the video content with the interactive information in the playing picture can be accurately locked, and the visual experience of the user is improved.
The method for prompting the video content interaction position according to the embodiment of the present invention is described above, and the apparatus for prompting the video content interaction position according to the embodiment of the present invention is described below with reference to the accompanying drawings.
Referring to fig. 5, an embodiment of the present invention further provides a device for prompting an interactive position of video content, which is applied to an electronic terminal, and the device includes:
an obtaining module 501, configured to obtain an interaction file corresponding to a target video; wherein, the interactive file includes: at least one interactive picture and the corresponding relation between each interactive picture and a video frame in a target video; the interactive picture and the video frame are in equal proportion;
a determining module 502, configured to determine, according to the corresponding relationship, a target interaction picture corresponding to a currently played video frame in a playing process of a target video;
the mapping module 503 is configured to determine a target image area in the currently played video frame according to a position of a first area in the target interactive picture;
the interaction module 504 is configured to display preset prompt information in a target image area in a currently played video frame, so as to prompt a user that the target image area is provided with interaction information.
Optionally, the first region of the target interactive picture has a first transparency, the second region has a second transparency, and the first transparency is different from the second transparency, where the second region is a region of the target interactive picture other than the first region.
Optionally, the color of the first region is a preset color.
Optionally, referring to fig. 6, the mapping module 503 includes:
the first calculating unit 5031 is configured to detect the transparency of a pixel in the target interactive picture, and determine a first position of an area where the pixel with the first transparency is located in the target interactive picture;
the second calculating unit 5032 determines the target image region corresponding to the first position in the currently played video frame according to the equal proportion relationship between the interactive picture and the video frame.
Optionally, the first calculating unit 5031 specifically detects the transparency of the pixel points in the target interaction picture, and determines a first coordinate of a leftmost pixel point, a second coordinate of a rightmost pixel point, a third coordinate of a topmost pixel point, and a fourth coordinate of a bottommost pixel point among the pixel points with the first transparency; calculating to obtain a center coordinate according to the first coordinate, the second coordinate, the third coordinate and the fourth coordinate; and taking the central coordinate as a first position of the area where the pixel point with the first transparency is located in the target interactive picture.
Optionally, the first computing unit 5031 is specifically configured to detect the transparency of a pixel point in the target interaction picture, and determine a plurality of pixel points with a first transparency; and taking the coordinate of any one of the pixel points as a first position of the area where the pixel point with the first transparency is located in the target interactive picture.
Optionally, the interactive file further comprises: a preset time; the determining module 502 is specifically configured to determine, according to the corresponding relationship, a target interaction picture corresponding to a currently played video frame when the target video is played to a preset time.
Optionally, the interactive file further comprises: presetting operation; referring to fig. 7, the apparatus further includes:
the touch module 505 is configured to determine an interaction position of the interaction instruction in a case that the interaction instruction is received;
the judging module 506 is configured to determine whether a mapping position of a corresponding interaction position in the target interaction picture is located in the first region according to an equal proportion relationship between the interaction picture and the video frame;
the executing module 507 is configured to execute a preset operation when the mapping position corresponding to the interaction position in the target interaction picture is located in the first area.
Optionally, the first region of the target interactive picture has a first transparency, the second region has a second transparency, and the first transparency is different from the second transparency, wherein the second region is a region of the target interactive picture except the first region; the determining module 506 includes:
the mapping unit is used for determining the mapping position of the corresponding interaction position in the target interaction picture according to the equal proportion relation between the interaction picture and the video frame;
the obtaining unit is used for obtaining the transparency of the pixel point at the mapping position;
and the judging unit is used for positioning the mapping position corresponding to the interaction position in the target interaction picture in the first area when the transparency of the pixel point at the mapping position is equal to the first transparency.
The device for prompting the video content interaction position provided by the embodiment of the invention can realize each process realized by the method for prompting the video content interaction position in the method embodiments of fig. 1 to 4, and is not repeated here for avoiding repetition.
In the embodiment of the invention, the target image area corresponding to the first area can be quickly and accurately positioned by utilizing the equal proportional relation between the interactive picture and the video frame. Compared with the method for directly determining the target image area in the video frame with complex content, the method is simpler. And displaying preset prompt information in a target image area in the currently played video frame to prompt a user that the target image area is provided with interactive information. The preset prompt information is directly displayed in the target image area for interaction, so that the prompt information can move along with a playing picture in the video playing process and is not limited to a fixed position. Meanwhile, the video content with the interactive information in the playing picture can be accurately locked, and the visual experience of the user is improved.
An embodiment of the present invention further provides an electronic device, as shown in fig. 8, including a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete mutual communication through the communication bus 804;
a memory 803 for storing a computer program;
the processor 801 is configured to implement the following steps when executing the program stored in the memory 803:
acquiring an interactive file corresponding to a target video; wherein, the interactive file includes: at least one interactive picture and the corresponding relation between each interactive picture and a video frame in a target video; the interactive picture and the video frame are in equal proportion;
in the process of playing the target video, determining a target interactive picture corresponding to the currently played video frame according to the corresponding relation;
determining a target image area in a currently played video frame according to the position of a first area in a target interactive picture in the target interactive picture;
and displaying preset prompt information in a target image area in the currently played video frame to prompt a user that the target image area is provided with interactive information.
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 Integrated Circuit may 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 yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the instructions cause the computer to execute the method for prompting the video content interaction position in any of the above embodiments.
In yet another embodiment of the present invention, a computer program product containing instructions is also provided, which when run on a computer causes the computer to execute the method for prompting video content interaction location described in the above embodiments.
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 system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
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 (12)

1. A method for prompting video content interaction positions is applied to an electronic terminal, and the method comprises the following steps:
acquiring an interactive file corresponding to a target video; wherein the interactive file comprises: at least one interactive picture and the corresponding relation between each interactive picture and the video frame in the target video; the interactive picture and the video frame are in equal proportion;
in the playing process of the target video, determining a target interaction picture corresponding to the currently played video frame according to the corresponding relation;
determining a target image area in the currently played video frame according to the position of a first area in the target interactive picture;
and displaying preset prompt information in the target image area in the currently played video frame to prompt a user that the target image area is provided with interactive information.
2. The method of claim 1, wherein the first region of the target interactive picture has a first transparency and a second region has a second transparency, the first transparency is different from the second transparency, and wherein the second region is a region of the target interactive picture other than the first region.
3. The method of claim 2, wherein the color of the first region is a preset color.
4. The method according to claim 2, wherein the step of determining the target image area in the currently playing video frame according to the position of the first area in the target interactive picture comprises:
detecting the transparency of pixel points in the target interactive picture, and determining a first position of a region where the pixel points with the first transparency are located in the target interactive picture;
and determining a target image area corresponding to the first position in the currently played video frame according to the equal proportion relation between the interactive picture and the video frame.
5. The method according to claim 4, wherein the step of detecting the transparency of the pixel points in the target interactive picture and determining the first position of the region in the target interactive picture, where the pixel points with the first transparency are located, comprises:
detecting the transparency of the pixel points in the target interactive picture, and determining a first coordinate of a leftmost pixel point, a second coordinate of a rightmost pixel point, a third coordinate of a topmost pixel point and a fourth coordinate of a bottommost pixel point in the pixel points with the first transparency;
calculating to obtain a center coordinate according to the first coordinate, the second coordinate, the third coordinate and the fourth coordinate;
and taking the central coordinate as a first position of an area where the pixel point with the first transparency is located in the target interactive picture.
6. The method according to claim 4, wherein the step of detecting the transparency of the pixel points in the target interactive picture and determining the first position of the region in the target interactive picture, where the pixel points with the first transparency are located, comprises:
detecting the transparency of pixel points in the target interactive picture, and determining a plurality of pixel points with first transparency;
and taking the coordinate of any one of the pixel points as a first position of the area where the pixel point with the first transparency is located in the target interactive picture.
7. The method of claim 1, wherein the interactive file further comprises: a preset time; in the playing process of the target video, the step of determining the target interaction picture corresponding to the currently played video frame according to the corresponding relation comprises the following steps:
and when the target video is played to the preset moment, determining a target interactive picture corresponding to the currently played video frame according to the corresponding relation.
8. The method of claim 1, wherein the interactive file further comprises: presetting operation; after the step of displaying the preset prompt message in the target image area in the currently playing video frame, the method further includes:
under the condition of receiving an interaction instruction, determining an interaction position of the interaction instruction;
determining whether a mapping position corresponding to the interaction position in the target interaction picture is located in the first region or not according to the equal proportion relation between the interaction picture and the video frame;
and when the mapping position corresponding to the interaction position in the target interaction picture is located in the first area, executing the preset operation.
9. The method according to claim 8, wherein a first region of the target interactive picture has a first transparency and a second region has a second transparency, the first transparency being different from the second transparency, wherein the second region is a region of the target interactive picture other than the first region;
determining whether a mapping position corresponding to the interaction position in the target interaction picture is located in the first region according to the equal proportion relation between the interaction picture and the video frame, including:
determining a mapping position corresponding to the interaction position in the target interaction picture according to the equal proportion relation between the interaction picture and the video frame;
obtaining the transparency of the pixel point at the mapping position;
when the transparency of the pixel point at the mapping position is equal to the first transparency, the mapping position corresponding to the interaction position in the target interaction picture is located in the first region.
10. An apparatus for prompting video content interaction position, which is applied to an electronic terminal, the apparatus comprising:
the acquisition module is used for acquiring an interactive file corresponding to the target video; wherein the interactive file comprises: at least one interactive picture and the corresponding relation between each interactive picture and the video frame in the target video; the interactive picture and the video frame are in equal proportion;
the determining module is used for determining a target interactive picture corresponding to the currently played video frame according to the corresponding relation in the playing process of the target video;
the mapping module is used for determining a target image area in the current playing video frame according to the position of a first area in the target interactive picture;
and the interaction module is used for displaying preset prompt information in the target image area in the currently played video frame and prompting a user that the target image area is provided with interaction information.
11. An electronic device, comprising: a processor, a communication interface, a memory, and a communication bus; the processor, the communication interface and the memory complete mutual communication through a communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the method of prompting a video content interaction location according to any one of claims 1 to 9 when executing a program stored on a memory.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of hinting a video content interaction location according to any one of claims 1 to 9.
CN202010699145.0A 2020-07-17 2020-07-17 Method and device for prompting video content interaction position Active CN111970570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010699145.0A CN111970570B (en) 2020-07-17 2020-07-17 Method and device for prompting video content interaction position

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010699145.0A CN111970570B (en) 2020-07-17 2020-07-17 Method and device for prompting video content interaction position

Publications (2)

Publication Number Publication Date
CN111970570A CN111970570A (en) 2020-11-20
CN111970570B true CN111970570B (en) 2022-01-25

Family

ID=73362051

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010699145.0A Active CN111970570B (en) 2020-07-17 2020-07-17 Method and device for prompting video content interaction position

Country Status (1)

Country Link
CN (1) CN111970570B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112543340B (en) * 2020-12-30 2023-01-13 超幻人像科技(杭州)有限公司 Drama watching method and device based on augmented reality
CN113596354B (en) * 2021-07-23 2022-08-19 腾讯科技(深圳)有限公司 Image processing method, image processing device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245968A (en) * 2015-09-30 2016-01-13 天脉聚源(北京)科技有限公司 Method and device for dynamically displaying interactive entry information on video program
CN106919707A (en) * 2017-03-10 2017-07-04 腾讯科技(深圳)有限公司 A kind of page display method and terminal based on H5
CN109936774A (en) * 2019-03-29 2019-06-25 广州虎牙信息科技有限公司 Virtual image control method, device and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106210808B (en) * 2016-08-08 2019-04-16 腾讯科技(深圳)有限公司 Media information put-on method, terminal, server and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245968A (en) * 2015-09-30 2016-01-13 天脉聚源(北京)科技有限公司 Method and device for dynamically displaying interactive entry information on video program
CN106919707A (en) * 2017-03-10 2017-07-04 腾讯科技(深圳)有限公司 A kind of page display method and terminal based on H5
CN109936774A (en) * 2019-03-29 2019-06-25 广州虎牙信息科技有限公司 Virtual image control method, device and electronic equipment

Also Published As

Publication number Publication date
CN111970570A (en) 2020-11-20

Similar Documents

Publication Publication Date Title
CN108347657B (en) Method and device for displaying bullet screen information
CN111970570B (en) Method and device for prompting video content interaction position
TWI671647B (en) Method, device and electronic device for calculating the duration of the first screen of a page
CN113190781B (en) Page layout method, device, equipment and storage medium
JP2015503152A (en) Measuring the rendering time of a web page
CN105635848A (en) Bullet-screen display method and terminal
US9495348B2 (en) Template application error detection
WO2020007113A1 (en) Method and device for loading image
CN112272109A (en) Network topological graph generation method, equipment and system
CN110781823A (en) Screen recording detection method and device, readable medium and electronic equipment
CN111125433A (en) Popup window management method and device, electronic equipment and readable storage medium
CN110489041B (en) Method, device, equipment and medium for automatically aligning small program dragging elements
CN110781427A (en) Method, device, equipment and storage medium for calculating first screen time
CN114415882A (en) Floor dynamic display method, system, equipment and interaction medium
CN111612838A (en) Image acquisition method and device and electronic equipment
CN114730341A (en) Protecting user privacy in user interface data collection for native applications
US20170161871A1 (en) Method and electronic device for previewing picture on intelligent terminal
US20160335733A1 (en) Method and system for adaptive content protection
CN111698548A (en) Video playing method and device
CN111767206B (en) Statistical method and device for content unit exposure presentation rate and electronic equipment
CN110955480B (en) View display method and device
CN108335362B (en) Light control method and device in virtual scene and VR (virtual reality) equipment
CN111881050A (en) Method and device for clipping text layer and electronic equipment
CN112734876A (en) Graph drawing method, graph drawing device, electronic equipment and storage medium
CN112306336A (en) Document content display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant