[go: up one dir, main page]

CN111949819A - Method and device for pushing video - Google Patents

Method and device for pushing video Download PDF

Info

Publication number
CN111949819A
CN111949819A CN201910408019.2A CN201910408019A CN111949819A CN 111949819 A CN111949819 A CN 111949819A CN 201910408019 A CN201910408019 A CN 201910408019A CN 111949819 A CN111949819 A CN 111949819A
Authority
CN
China
Prior art keywords
video
candidate push
similarity
videos
candidate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910408019.2A
Other languages
Chinese (zh)
Other versions
CN111949819B (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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910408019.2A priority Critical patent/CN111949819B/en
Publication of CN111949819A publication Critical patent/CN111949819A/en
Application granted granted Critical
Publication of CN111949819B publication Critical patent/CN111949819B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/73Querying
    • G06F16/732Query formulation
    • G06F16/7328Query by example, e.g. a complete video frame or video sequence
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/73Querying
    • G06F16/735Filtering based on additional data, e.g. user or group profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure discloses a method and a device for pushing videos. One embodiment of the method comprises: receiving an image sent by a target user through corresponding terminal equipment; acquiring a candidate push video set; determining similarity of an image and a candidate pushed video in a candidate pushed video set; selecting candidate push videos from the candidate push video set according to the similarity corresponding to the candidate push videos in the candidate push video set respectively; and pushing the selected candidate push video to the terminal equipment corresponding to the target user. The implementation mode is helpful for improving the matching degree of the video pushed to the user and the user intention.

Description

用于推送视频的方法和装置Method and device for pushing video

技术领域technical field

本公开的实施例涉及计算机技术领域,具体涉及用于推送视频的方法和装置。The embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method and apparatus for pushing videos.

背景技术Background technique

目前,基于关键词的信息推送是常见的信息推送方式之一。具体地,由用户根据搜索意图输入对应的关键词,然后由服务器根据关键词分析用户的搜索意图,并根据分析结果选取信息推送至用户。At present, keyword-based information push is one of the common information push methods. Specifically, the user inputs the corresponding keyword according to the search intent, and then the server analyzes the user's search intent according to the keyword, and selects information and pushes it to the user according to the analysis result.

发明内容SUMMARY OF THE INVENTION

本公开的实施例提出了用于推送视频的方法和装置。Embodiments of the present disclosure propose a method and apparatus for pushing video.

第一方面,本公开的实施例提供了一种用于推送视频的方法,该方法包括:接收目标用户通过对应的终端设备发送的图像;获取候选推送视频集;对于候选推送视频集中的候选推送视频,确定图像与该候选推送视频的相似度;根据候选推送视频集中的候选推送视频分别对应的相似度,从候选推送视频集中选取候选推送视频;向目标用户对应的终端设备推送所选取的候选推送视频。In a first aspect, embodiments of the present disclosure provide a method for pushing a video, the method comprising: receiving an image sent by a target user through a corresponding terminal device; acquiring a set of candidate push videos; for a candidate push video set in the candidate push video set video, determine the similarity between the image and the candidate push video; select the candidate push video from the candidate push video set according to the respective similarities of the candidate push videos in the candidate push video set; push the selected candidate push video to the terminal device corresponding to the target user Push video.

在一些实施例中,确定图像与该候选推送视频的相似度,包括:提取该候选推送视频的、第一数目帧;确定图像与第一数目帧的相似度作为图像与该候选推送视频的相似度。In some embodiments, determining the similarity between the image and the candidate push video includes: extracting a first number of frames of the candidate push video; determining the similarity between the image and the first number of frames as the similarity between the image and the candidate push video Spend.

在一些实施例中,提取该候选推送视频的、第一数目帧,包括:根据图像,提取该候选推送视频的、第一数目帧。In some embodiments, extracting the first number of frames of the candidate push video includes: extracting the first number of frames of the candidate push video according to the image.

在一些实施例中,根据图像,提取该候选推送视频的、第一数目帧,包括:将该候选推送视频均匀划分为第二数目个子视频;确定第二数目个子视频中的子视频分别与图像的相似度,得到相似度集;对于第二数目个子视频中的子视频,确定该子视频对应的相似度除以相似度集中的相似度的总和的商值,以及确定得到的商值与第一数目的乘积作为该子视频对应的目标数目;从该子视频中提取目标数目帧。In some embodiments, extracting the first number of frames of the candidate push video according to the image includes: evenly dividing the candidate push video into a second number of sub-videos; determining that the sub-videos in the second number of sub-videos are respectively different from the image for the sub-videos in the second number of sub-videos, determine the quotient of dividing the similarity corresponding to the sub-video by the sum of the similarities in the similarity set, and determine the obtained quotient and the first The product of a number is used as the target number corresponding to the sub-video; the target number of frames is extracted from the sub-video.

在一些实施例中,根据候选推送视频集中的候选推送视频分别对应的相似度,从候选推送视频集中选取候选推送视频,包括:按照对应的相似度从大到小的顺序,从候选推送视频集中选取候选推送视频。In some embodiments, selecting the candidate push videos from the candidate push video set according to the respective similarities of the candidate push videos in the candidate push video set includes: according to the corresponding similarity in descending order, from the candidate push video set Select a candidate push video.

第二方面,本公开的实施例提供了一种用于推送视频的装置,该装置包括:接收单元,被配置成接收目标用户通过对应的终端设备发送的图像;获取单元,被配置成获取候选推送视频集;确定单元,被配置成对于候选推送视频集中的候选推送视频,确定图像与该候选推送视频的相似度;选取单元,被配置成根据候选推送视频集中的候选推送视频分别对应的相似度,从候选推送视频集中选取候选推送视频;推送单元,被配置成向目标用户对应的终端设备推送所选取的候选推送视频。In a second aspect, an embodiment of the present disclosure provides an apparatus for pushing a video, the apparatus includes: a receiving unit configured to receive an image sent by a target user through a corresponding terminal device; an obtaining unit configured to obtain a candidate Pushing a video set; a determining unit, configured to determine the similarity between the image and the candidate pushing video for the candidate pushing video in the candidate pushing video set; the selecting unit, being configured to be based on the candidate pushing video in the candidate pushing video set respectively corresponding to the similarity degree, select the candidate push video from the candidate push video set; the push unit is configured to push the selected candidate push video to the terminal device corresponding to the target user.

在一些实施例中,上述确定单元进一步被配置成:提取该候选推送视频的、第一数目帧;确定图像与第一数目帧的相似度作为图像与该候选推送视频的相似度。In some embodiments, the above determining unit is further configured to: extract the first number of frames of the candidate push video; and determine the similarity between the image and the first number of frames as the similarity between the image and the candidate push video.

在一些实施例中,上述确定单元进一步被配置成:根据图像,提取该候选推送视频的、第一数目帧。In some embodiments, the above determining unit is further configured to: extract the first number of frames of the candidate push video according to the image.

在一些实施例中,上述确定单元进一步被配置成:将该候选推送视频均匀划分为第二数目个子视频;确定第二数目个子视频中的子视频分别与图像的相似度,得到相似度集;对于第二数目个子视频中的子视频,确定该子视频对应的相似度除以相似度集中的相似度的总和的商值,以及确定得到的商值与第一数目的乘积作为该子视频对应的目标数目;从该子视频中提取目标数目帧。In some embodiments, the above-mentioned determining unit is further configured to: evenly divide the candidate push video into a second number of sub-videos; determine the similarity between the sub-videos in the second number of sub-videos and the images, respectively, to obtain a similarity set; For sub-videos in the second number of sub-videos, determine the quotient of the similarity corresponding to the sub-video divided by the sum of the similarities in the similarity set, and determine the product of the obtained quotient and the first number as the corresponding sub-video the target number of frames; extract the target number of frames from this sub-video.

在一些实施例中,上述选取单元进一步被配置成:按照对应的相似度从大到小的顺序,从候选推送视频集中选取候选推送视频。In some embodiments, the above selecting unit is further configured to: select candidate push videos from the candidate push video set in descending order of the corresponding degrees of similarity.

第三方面,本公开的实施例提供了一种服务器,该服务器包括:一个或多个处理器;存储装置,用于存储一个或多个程序;当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如第一方面中任一实现方式描述的方法。In a third aspect, embodiments of the present disclosure provide a server, the server comprising: one or more processors; a storage device for storing one or more programs; when one or more programs are processed by one or more The processor executes such that the one or more processors implement the method as described in any one of the implementations of the first aspect.

第四方面,本公开的实施例提供了一种计算机可读介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如第一方面中任一实现方式描述的方法。In a fourth aspect, embodiments of the present disclosure provide a computer-readable medium on which a computer program is stored, and when the computer program is executed by a processor, implements the method described in any implementation manner of the first aspect.

本公开的实施例提供的用于推送视频的方法和装置,实现根据用户发送的图像,向用户推送相应的视频。由于用户发送的图像通常表达了用户的意图,因此,可以认为用户期望的推送信息与其发送的图像具有一定的相似度。基于此,通过比较各个候选推送视频分别与用户发送的图像的相似度,并根据得到的相似度,选取候选推送视频推送至用户对应的终端设备,有助于提升向用户推送的视频与用户意图的匹配度,进而减少用户接收到其期望的视频的时间,即减少用户在接收到其期望的视频之前所需要浏览的视频的数目。由此,减少了这个过程中用户对应的终端设备和推送视频的服务端的流量消耗。The method and device for pushing a video provided by the embodiments of the present disclosure realize pushing a corresponding video to the user according to the image sent by the user. Since the image sent by the user usually expresses the user's intention, it can be considered that the push information expected by the user has a certain degree of similarity with the image sent by the user. Based on this, by comparing the similarity between each candidate push video and the image sent by the user, and according to the obtained similarity, the candidate push video is selected and pushed to the terminal device corresponding to the user, which helps to improve the video pushed to the user and the user's intention. The matching degree is reduced, and the time for the user to receive the desired video is reduced, that is, the number of videos that the user needs to browse before receiving the desired video is reduced. As a result, the traffic consumption of the terminal device corresponding to the user and the server that pushes the video in this process is reduced.

附图说明Description of drawings

通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本公开的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present disclosure will become more apparent upon reading the detailed description of non-limiting embodiments taken with reference to the following drawings:

图1是本公开的一个实施例可以应用于其中的示例性系统架构图;FIG. 1 is an exemplary system architecture diagram to which an embodiment of the present disclosure may be applied;

图2是根据本公开的用于推送视频的方法的一个实施例的流程图;2 is a flowchart of one embodiment of a method for pushing video according to the present disclosure;

图3是根据本公开的实施例的用于推送视频的方法的一个应用场景的示意图;3 is a schematic diagram of an application scenario of a method for pushing a video according to an embodiment of the present disclosure;

图4是根据本公开的用于推送视频的方法的又一个实施例的流程图;4 is a flowchart of yet another embodiment of a method for pushing video according to the present disclosure;

图5是根据本公开的用于推送视频的装置的一个实施例的结构示意图;5 is a schematic structural diagram of an embodiment of an apparatus for pushing video according to the present disclosure;

图6是适于用来实现本公开的实施例的电子设备的结构示意图。6 is a schematic structural diagram of an electronic device suitable for implementing embodiments of the present disclosure.

具体实施方式Detailed ways

下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。The present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the related invention, but not to limit the invention. In addition, it should be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.

需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开。It should be noted that the embodiments of the present disclosure and the features of the embodiments may be combined with each other under the condition of no conflict. The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

图1示出了可以应用本公开的用于推送视频的方法或用于推送视频的装置的实施例的示例性架构100。FIG. 1 shows an exemplary architecture 100 to which embodiments of the method for pushing video or the apparatus for pushing video of the present disclosure may be applied.

如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , the system architecture 100 may include terminal devices 101 , 102 , and 103 , a network 104 and a server 105 . The network 104 is a medium used to provide a communication link between the terminal devices 101 , 102 , 103 and the server 105 . The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.

终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103上可以安装有各种客户端应用。例如浏览器类应用、搜索类应用、信息分享类应用等、社交类应用等。The terminal devices 101, 102, and 103 interact with the server 105 through the network 104 to receive or send messages and the like. Various client applications may be installed on the terminal devices 101 , 102 and 103 . For example, browser applications, search applications, information sharing applications, etc., social applications, etc.

终端设备101、102、103可以是硬件,也可以是软件。当终端设备101、102、103为硬件时,可以是具有显示屏并且支持图像和视频显示的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、膝上型便携计算机和台式计算机等等。当终端设备101、102、103为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供分布式服务的多个软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。The terminal devices 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they can be various electronic devices having a display screen and supporting image and video display, including but not limited to smart phones, tablet computers, e-book readers, laptop computers and desktop computer, etc. When the terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (eg, multiple software or software modules for providing distributed services), or as a single software or software module. There is no specific limitation here.

服务器105可以是提供各种服务的服务器,例如根据终端设备101、102、103发送的图像,向终端设备推送相应的视频的后端服务器。后端服务器可以分别确定用户发送的图像与各个候选推送视频的相似度,进而根据确定的相似度,选取候选推送视频推送至终端设备101、102、103。The server 105 may be a server that provides various services, for example, a backend server that pushes corresponding videos to the terminal devices according to the images sent by the terminal devices 101 , 102 and 103 . The back-end server may determine the similarity between the image sent by the user and each candidate push video, and then select the candidate push video to push to the terminal devices 101 , 102 , and 103 according to the determined similarity.

需要说明的是,本公开的实施例所提供的用于推送视频的方法一般由服务器105执行,相应地,用于推送视频的装置一般设置于服务器105中。It should be noted that the method for pushing a video provided by the embodiments of the present disclosure is generally performed by the server 105 , and accordingly, the apparatus for pushing a video is generally set in the server 105 .

需要说明的是,服务器可以是硬件,也可以是软件。当服务器为硬件时,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器。当服务器为软件时,可以实现成多个软件或软件模块(例如用来提供分布式服务的多个软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。It should be noted that the server may be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or can be implemented as a single software or software module. There is no specific limitation here.

应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.

继续参考图2,其示出了根据本公开的用于推送视频的方法的一个实施例的流程200。该用于推送视频的方法包括以下步骤:With continued reference to FIG. 2, a flow 200 of one embodiment of a method for pushing video according to the present disclosure is shown. The method for pushing a video includes the following steps:

步骤201,接收目标用户通过对应的终端设备发送的图像。Step 201: Receive an image sent by a target user through a corresponding terminal device.

在本实施例中,用于推送视频的方法的执行主体(如图1所示的服务器105)可以接收用户通过其使用的终端设备(如图1所示的终端设备101、102、103)发送的图像。In this embodiment, the execution body of the method for pushing video (the server 105 shown in FIG. 1 ) may receive the sending by the user through the terminal device (the terminal device 101 , 102 , 103 shown in FIG. 1 ) used by the user. Image.

目标用户可以是与上述执行主体通信连接的任意终端设备对应的用户。图像可以是上述终端设备中存储的图像,也可以是目标用户利用终端设备即时拍摄的图像。The target user may be a user corresponding to any terminal device communicatively connected to the above-mentioned execution subject. The image may be an image stored in the above-mentioned terminal device, or may be an image instantly shot by the target user using the terminal device.

目标用户在有期望浏览的视频时,可以通过发送图像表达期望浏览的视频。作为示例,用户在店铺看到一张音乐海报,想要观看这首音乐对应的MV(Music Video,音乐短片)时,就可以使用终端设备拍摄这张音乐海报,并发送至上述执行主体。When a target user has a video they want to browse, they can express the video they want to browse by sending an image. As an example, when a user sees a music poster in a store and wants to watch an MV (Music Video, music short film) corresponding to the music, he can use a terminal device to shoot the music poster and send it to the above-mentioned execution body.

步骤202,获取候选推送视频集。Step 202: Obtain a candidate push video set.

在本实施例中,候选推送视频集可以是由技术人员预先指定的一些视频的集合。候选推送视频也可以是根据预设条件筛选出的视频集合。In this embodiment, the candidate push video set may be a set of some videos pre-specified by a technician. The candidate push video may also be a set of videos filtered according to preset conditions.

例如,可以先获取上述执行主体连接的数据库中的一些视频作为目标视频,得到目标视频集。然后可以获取目标用户的历史行为数据,并且根据得到的历史行为数据,利用现有的一些点击率预测方法,预测目标用户对目标视频集中的各个目标视频的点击率。之后,可以根据设置的点击率阈值,从目标视频集中选取点击率大于点击率阈值的目标视频作为候选推送视频,从而得到候选推送视频集。For example, some videos in the database connected by the above-mentioned execution subject may be obtained as target videos to obtain a target video set. Then, the historical behavior data of the target user can be obtained, and according to the obtained historical behavior data, some existing click-through rate prediction methods are used to predict the click-through rate of the target user on each target video in the target video set. Afterwards, according to the set click-through rate threshold, target videos with a click-through rate greater than the click-through rate threshold may be selected from the target video set as candidate push videos, thereby obtaining a candidate push video set.

步骤203,对于候选推送视频集中的候选推送视频,确定图像与该候选推送视频的相似度。Step 203: For a candidate push video in the candidate push video set, determine the similarity between the image and the candidate push video.

在本实施例中,确定各个候选推送视频分别与目标用户发送的图像的相似度,可以根据不同的应用场景,灵活选取各种相似度确定方法。In this embodiment, to determine the similarity between each candidate push video and the image sent by the target user, various similarity determination methods can be flexibly selected according to different application scenarios.

可选地,以一个候选推送视频作为示例,可以利用现有的各种特征提取方法,提取用于表征该候选推送视频的特征的特征向量,以及提取用于表征目标用户发送的图像的特征的特征向量。进一步地,可也以直接计算提取的两个特征向量之间的相似度作为该候选推送视频与目标用户发送的图像的相似度。Optionally, taking a candidate push video as an example, various existing feature extraction methods can be used to extract a feature vector used to characterize the feature of the candidate push video, and a feature vector used to characterize the feature of the image sent by the target user. Feature vector. Further, the similarity between the two extracted feature vectors can also be directly calculated as the similarity between the candidate push video and the image sent by the target user.

在本实施例的一些可选的实现方式中,以一个候选推送视频作为示例,可以先提取该候选推送视频的、第一数目帧。然后可以确定目标用户发送的图像与第一数目帧的相似度作为目标用户发送的图像与该候选推送视频的相似度。In some optional implementation manners of this embodiment, taking a candidate push video as an example, the first number of frames of the candidate push video may be extracted first. Then, the similarity between the image sent by the target user and the first number of frames can be determined as the similarity between the image sent by the target user and the candidate push video.

其中,第一数目可以由技术人员预先设置,也可以根据候选推送视频的一些属性(如帧率等)而确定。The first number may be preset by a technician, or may be determined according to some attributes (such as frame rate, etc.) of the candidate push video.

其中,在提取该候选推送视频的帧时,可以随机提取该候选推送视频的第一数目帧,也可以利用现有的各种关键帧提取方法提取该候选推送视频的第一数目帧。Wherein, when extracting the frames of the candidate push video, the first number of frames of the candidate push video may be randomly extracted, or the first number of frames of the candidate push video may be extracted by using various existing key frame extraction methods.

可选地,可以根据用户发送的图像,提取该候选推送视频的、第一数目帧。Optionally, the first number of frames of the candidate push video may be extracted according to the image sent by the user.

作为示例,可以先对用户发送的图像进行分析以识别图像中显示的一个关键物体。然后,从该候选推送视频中优先选取显示有上述关键物体的帧。例如,若识别出该候选推送视频中没有显示有上述关键物体的帧,那么可以随机选取第一数目帧。若识别出该候选推送视频中显示有上述关键物体的帧,那么优先选取这些显示有上述关键物体的帧。As an example, an image sent by the user may first be analyzed to identify a key object displayed in the image. Then, the frames displaying the above-mentioned key objects are preferentially selected from the candidate push video. For example, if it is identified that there are no frames in which the above-mentioned key object is displayed in the candidate push video, the first number of frames may be randomly selected. If it is identified that the frames displaying the above-mentioned key objects in the candidate push video are identified, the frames displaying the above-mentioned key objects are preferentially selected.

在得到第一数目帧后,可以分别确定目标用户发送的图像与各个帧的相似度。之后,可以根据得到的各个相似度,确定目标用户发送的图像与该候选推送视频的相似度。After the first number of frames are obtained, the similarity between the image sent by the target user and each frame can be determined respectively. Afterwards, the similarity between the image sent by the target user and the candidate push video can be determined according to the obtained degrees of similarity.

例如,可以选取最大的相似度作为目标用户发送的图像与该候选推送视频的相似度。又例如,可以确定各个相似度的平均值作为目标用户发送的图像与该候选推送视频的相似度。For example, the maximum similarity may be selected as the similarity between the image sent by the target user and the candidate push video. For another example, the average value of each similarity may be determined as the similarity between the image sent by the target user and the candidate push video.

步骤204,根据候选推送视频集中的候选推送视频分别对应的相似度,从候选推送视频集中选取候选推送视频。Step 204: Select a candidate push video from the candidate push video set according to the respective similarities of the candidate push videos in the candidate push video set.

在本实施例中,可以先根据预先设置的相似度阈值,选取对应的相似度大于相似度阈值的候选推送视频。然后可以从选取的这些候选推送视频中随机选取若干候选推送视频,也可以根据选取的这些候选推送视频对应的相似度的分布情况,均匀地选取若干候选推送视频。In this embodiment, according to a preset similarity threshold, candidate push videos whose corresponding similarity is greater than the similarity threshold may be selected. Then, several candidate push videos may be randomly selected from the selected candidate push videos, or several candidate push videos may be evenly selected according to the distribution of the similarity corresponding to these selected candidate push videos.

其中,具体选取的数目可以由技术人员预先设置,也可以根据具体的筛选条件确定。Wherein, the number of specific selections may be preset by technical personnel, or may be determined according to specific screening conditions.

在本实施例的一些可选地实现方式中,可以按照对应的相似度从大到小的顺序,从候选推送视频集中选取候选推送视频。In some optional implementation manners of this embodiment, the candidate push videos may be selected from the candidate push video set in descending order of the corresponding degrees of similarity.

步骤205,向目标用户对应的终端设备推送所选取的候选推送视频。Step 205: Push the selected candidate push video to the terminal device corresponding to the target user.

继续参见图3,图3是根据本实施例的用于推送视频的方法的应用场景的一个示意图300。在图3的应用场景中,用户可以通过使用的终端设备301拍摄图像302,并将图像302发送至上述执行主体。上述执行主体可以从连接的数据库303中获取候选推送视频集304。Continuing to refer to FIG. 3 , FIG. 3 is a schematic diagram 300 of an application scenario of the method for pushing a video according to this embodiment. In the application scenario of FIG. 3 , the user can use the terminal device 301 to capture an image 302 and send the image 302 to the above-mentioned execution body. The above-mentioned executive body can obtain the candidate push video set 304 from the connected database 303 .

之后,可以分别确定候选推送视频集304中的各个候选推送视频与图像302的相似度。如图中所述,候选推送视频集304包括三个视频,分别与图像302的相似度为0.85、0.5和0.4。之后,可以选取相似度最大的候选推送视频推送至终端设备301。Afterwards, the similarity between each candidate pushed video in the candidate pushed video set 304 and the image 302 can be determined respectively. As shown in the figure, the candidate push video set 304 includes three videos, and the similarity with the image 302 is 0.85, 0.5, and 0.4, respectively. After that, the candidate push video with the greatest similarity may be selected and pushed to the terminal device 301 .

本公开的上述实施例提供的方法通过比较各个候选推送视频分别与用户发送的图像的相似度,并根据得到的相似度,选取候选推送视频推送至用户对应的终端设备。由于用户发送的图像通常表达了用户的意图,因此,可以认为用户期望的推送信息与其发送的图像具有一定的相似度。所以通过这种方式可以提升向用户推送的视频与用户意图的匹配度,进而减少用户接收到其期望的视频的时间,即减少用户在接收到其期望的视频之前所需要浏览的视频的数目。由此,减少了这个过程中用户对应的终端设备和推送视频的服务端的流量消耗。The method provided by the above embodiments of the present disclosure compares the similarity between each candidate push video and the image sent by the user, and selects the candidate push video to push to the terminal device corresponding to the user according to the obtained similarity. Since the image sent by the user usually expresses the user's intention, it can be considered that the push information expected by the user has a certain degree of similarity with the image sent by the user. Therefore, in this way, the matching degree of the video pushed to the user and the user's intention can be improved, thereby reducing the time for the user to receive the desired video, that is, reducing the number of videos that the user needs to browse before receiving the desired video. As a result, the traffic consumption of the terminal device corresponding to the user and the server that pushes the video in this process is reduced.

进一步参考图4,其示出了用于推送视频的方法的又一个实施例的流程400。该用于推送视频的方法的流程400,包括以下步骤:With further reference to FIG. 4, a flow 400 of yet another embodiment of a method for pushing video is shown. The process 400 of the method for pushing a video includes the following steps:

步骤401,接收目标用户通过对应的终端设备发送的图像。Step 401: Receive an image sent by a target user through a corresponding terminal device.

步骤402,获取候选推送视频集。Step 402: Obtain a candidate push video set.

上述步骤401和402的具体的执行过程可参考图2对应实施例中的步骤201和202的相关说明,在此不再赘述。For the specific execution process of the above steps 401 and 402, reference may be made to the related descriptions of the steps 201 and 202 in the embodiment corresponding to FIG. 2 , and details are not repeated here.

步骤403,对于候选推送视频集中的候选推送视频,执行如下步骤4031-4033提取该候选推送视频的、第一数目帧:Step 403, for the candidate push video in the candidate push video set, perform the following steps 4031-4033 to extract the first number of frames of the candidate push video:

步骤4031,将该候选推送视频均匀划分为第二数目个子视频。Step 4031: Evenly divide the candidate push video into a second number of sub-videos.

在本步骤中,第二数目可以由技术人员预先设置。第二数目也可以根据该候选推送视频的属性(如时长、帧频等)来确定。划分方式可以根据不同的应用场景选择合适的划分方式。In this step, the second number can be preset by a technician. The second number may also be determined according to attributes (eg, duration, frame rate, etc.) of the candidate push video. The division method can select an appropriate division method according to different application scenarios.

例如,可以根据该候选推送视频的时长和第二数目,确定每个子视频的时长,从而将该候选推送视频划分为第二数目个子视频。又例如,可以根据该候选推送视频的帧率和时长,确定该候选推送视频对应的总帧数。然后根据总帧数和第二数目,确定每个子视频对应的帧数,从而将该候选推送视频划分为第二数目个子视频。For example, the duration of each sub-video may be determined according to the duration of the candidate push video and the second number, so that the candidate push video is divided into the second number of sub-videos. For another example, the total number of frames corresponding to the candidate push video may be determined according to the frame rate and duration of the candidate push video. Then, according to the total number of frames and the second number, the number of frames corresponding to each sub-video is determined, so that the candidate push video is divided into the second number of sub-videos.

步骤4032,确定第二数目个子视频中的子视频分别与图像的相似度,得到相似度集。Step 4032: Determine the similarity between the sub-videos in the second number of sub-videos and the images, respectively, to obtain a similarity set.

在本实施例中,确定各个子视频分别与图像的相似度的方法可以灵活选取不同的方式。例如,可以参考上述图2对应实施例中描述的确定视频与图像的相似度计算方法确定各个子视频分别与图像的相似度。In this embodiment, the method for determining the similarity between each sub-video and the image can be flexibly selected in different ways. For example, the similarity between each sub-video and the image may be determined with reference to the calculation method for determining the similarity between the video and the image described in the embodiment corresponding to FIG. 2 .

可选地,以一个子视频作为示例,可以从该子视频中随机提取若干帧,然后计算提取的各帧分别与图像的相似度的平均值或最大值作为该子视频与图像的相似度。Optionally, taking a sub-video as an example, several frames can be randomly extracted from the sub-video, and then the average or maximum value of the similarity between the extracted frames and the image is calculated as the similarity between the sub-video and the image.

步骤4033,对于第二数目个子视频中的子视频,确定该子视频对应的相似度除以相似度集中的相似度的总和的商值,以及确定得到的商值与第一数目的乘积作为该子视频对应的目标数目;从该子视频中提取目标数目帧。Step 4033, for the sub-videos in the second number of sub-videos, determine the quotient value of the sum of the similarity degrees corresponding to the sub-videos divided by the similarity degrees in the similarity set, and determine the product of the obtained quotient value and the first number as the The target number corresponding to the sub-video; extract the target number of frames from the sub-video.

在一些情况下,例如在候选推送视频有部分视频与用户发送的图像的相似度很高,而剩余部分的视频与用户发送的图像的相似度很低的情况下,若随机地从候选推送视频提取第一数目帧,很可能会出现提取的帧大部分都是与用户发送的图像的相似度很低的那部分视频的帧。此时,就会导致后续根据提取的帧计算候选推送视频与用户发送的图像的相似度的计算结果的不准确。In some cases, for example, when some of the candidate videos have a high similarity with the images sent by the user, while the remaining part of the videos have a low similarity with the images sent by the user, if the candidate videos are randomly When extracting the first number of frames, it is likely that most of the extracted frames are the frames of the part of the video whose similarity to the image sent by the user is very low. In this case, the subsequent calculation result of the similarity between the candidate push video and the image sent by the user will be inaccurate according to the extracted frame.

在本实施例中,根据各个子视频分别对应的相似度,按照对应的相似度与从子视频中提取的帧的数目成正比的关系,确定从各个子视频中提取的帧的数目。和直接从候选推送视频中随机或均匀提取第一数目帧的方式相比,避免了由于提取的帧不合适的情况而导致的计算结果不准确的情况,保证计算结果的准确性。In this embodiment, the number of frames extracted from each sub-video is determined according to the respective degrees of similarity corresponding to each of the sub-videos, and according to the relationship that the corresponding degrees of similarity are proportional to the number of frames extracted from the sub-videos. Compared with the method of directly extracting the first number of frames randomly or uniformly from the candidate push video, inaccurate calculation results caused by inappropriate extracted frames are avoided, and the accuracy of the calculation results is guaranteed.

步骤404,确定图像与第一数目帧的相似度作为图像与该候选推送视频的相似度。Step 404: Determine the similarity between the image and the first number of frames as the similarity between the image and the candidate push video.

步骤405,根据候选推送视频集中的候选推送视频分别对应的相似度,从候选推送视频集中选取候选推送视频。Step 405: Select a candidate push video from the candidate push video set according to the respective similarities of the candidate push videos in the candidate push video set.

步骤406,向目标用户对应的终端设备推送所选取的候选推送视频。Step 406: Push the selected candidate push video to the terminal device corresponding to the target user.

上述步骤404、405和406的具体的执行过程可参考图2对应实施例中的步骤203、204和205的相关说明,在此不再赘述。For the specific execution process of the above steps 404 , 405 and 406 , reference may be made to the relevant descriptions of the steps 203 , 204 and 205 in the embodiment corresponding to FIG. 2 , and details are not repeated here.

现有技术中,在做图像与视频的匹配时,一般是先对图像的内容进行分析识别,以了解图像包含的内容。然后对匹配的视频的内容进行分析识别,以了解视频包含的内容。例如,分析图像和视频中显示的文字、显示的物体和物体的属性、显示的人物和人物的属性等等。然后根据识别结果,计算图像与视频的相似度。In the prior art, when an image and a video are matched, the content of the image is generally analyzed and identified to know the content contained in the image. Then, the content of the matched video is analyzed and identified to understand the content contained in the video. For example, analyze text displayed in images and videos, displayed objects and attributes of objects, displayed characters and attributes of people, and so on. Then according to the recognition result, the similarity between the image and the video is calculated.

从图4中可以看出,本实施例中的用于推送视频的方法通过从候选推送视频划分后的各个子视频中分别提取若干帧,并计算提取的各帧与用户发送的图像的相似度作为候选推送视频与用户发送的图像的相似度。和现有技术相比,省去了复杂的图像分析和视频分析的过程,即大大减少了确定候选推送视频与用户发送的图像的相似度的过程中的计算量,从而减轻了服务器的计算压力。As can be seen from FIG. 4 , the method for pushing a video in this embodiment extracts several frames from each sub-video divided by the candidate push video, and calculates the similarity between the extracted frames and the image sent by the user The similarity between the candidate push video and the image sent by the user. Compared with the prior art, the process of complex image analysis and video analysis is omitted, that is, the calculation amount in the process of determining the similarity between the candidate push video and the image sent by the user is greatly reduced, thereby reducing the calculation pressure of the server. .

进一步参考图5,作为对上述各图所示方法的实现,本公开提供了用于推送视频的装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。With further reference to FIG. 5 , as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an apparatus for pushing video. The apparatus embodiment corresponds to the method embodiment shown in FIG. 2 . Can be used in various electronic devices.

如图5所示,本实施例提供的用于推送视频的装置500包括接收单元501、获取单元502、确定单元503、选取单元504和推送单元505。其中,接收单元501被配置成接收目标用户通过对应的终端设备发送的图像;获取单元502被配置成获取候选推送视频集;确定单元503被配置成对于候选推送视频集中的候选推送视频,确定图像与该候选推送视频的相似度;选取单元504被配置成根据候选推送视频集中的候选推送视频分别对应的相似度,从候选推送视频集中选取候选推送视频;推送单元505被配置成向目标用户对应的终端设备推送所选取的候选推送视频。As shown in FIG. 5 , the apparatus 500 for pushing a video provided in this embodiment includes a receiving unit 501 , an obtaining unit 502 , a determining unit 503 , a selecting unit 504 , and a pushing unit 505 . The receiving unit 501 is configured to receive the image sent by the target user through the corresponding terminal device; the obtaining unit 502 is configured to obtain the candidate push video set; the determining unit 503 is configured to determine the image for the candidate push video set in the candidate push video set The similarity with the candidate push video; the selecting unit 504 is configured to select the candidate push video from the candidate push video set according to the corresponding similarity of the candidate push videos in the candidate push video set; the push unit 505 is configured to correspond to the target user The terminal device pushes the selected candidate push video.

在本实施例中,用于推送视频的装置500中:接收单元501、获取单元502、确定单元503、选取单元504和推送单元505的具体处理及其所带来的技术效果可分别参考图2对应实施例中的步骤201、步骤202、步骤203、步骤204和步骤205的相关说明,在此不再赘述。In this embodiment, in the apparatus 500 for pushing video: the specific processing of the receiving unit 501, the obtaining unit 502, the determining unit 503, the selecting unit 504 and the pushing unit 505 and the technical effects brought by them can be referred to FIG. 2 respectively. The descriptions corresponding to steps 201 , 202 , 203 , 204 , and 205 in the embodiment are not repeated here.

在本实施例的一些可选的实现方式中,上述确定单元503进一步被配置成:提取该候选推送视频的、第一数目帧;确定图像与第一数目帧的相似度作为图像与该候选推送视频的相似度。In some optional implementations of this embodiment, the above determining unit 503 is further configured to: extract the first number of frames of the candidate push video; determine the similarity between the image and the first number of frames as the image and the candidate push Similarity of videos.

在本实施例的一些可选的实现方式中,上述确定单元503进一步被配置成:根据图像,提取该候选推送视频的、第一数目帧。In some optional implementations of this embodiment, the above determining unit 503 is further configured to: extract, according to the image, the first number of frames of the candidate push video.

在本实施例的一些可选的实现方式中,上述确定单元503进一步被配置成:将该候选推送视频均匀划分为第二数目个子视频;确定第二数目个子视频中的子视频分别与图像的相似度,得到相似度集;对于第二数目个子视频中的子视频,确定该子视频对应的相似度除以相似度集中的相似度的总和的商值,以及确定得到的商值与第一数目的乘积作为该子视频对应的目标数目;从该子视频中提取目标数目帧。In some optional implementations of this embodiment, the above determining unit 503 is further configured to: evenly divide the candidate push video into a second number of sub-videos; determine that the sub-videos in the second number of sub-videos are respectively the same as similarity to obtain a similarity set; for the sub-videos in the second number of sub-videos, determine the quotient of dividing the similarity corresponding to the sub-video by the sum of the similarities in the similarity set, and determine the obtained quotient and the first The product of the numbers is used as the target number corresponding to the sub-video; the target number of frames is extracted from the sub-video.

在本实施例的一些可选的实现方式中,上述选取单元504进一步被配置成:按照对应的相似度从大到小的顺序,从候选推送视频集中选取候选推送视频In some optional implementations of this embodiment, the above selecting unit 504 is further configured to: select candidate push videos from the candidate push video set in descending order of the corresponding degrees of similarity

本公开的上述实施例提供的装置,通过接收单元接收目标用户通过对应的终端设备发送的图像;获取单元获取候选推送视频集;确定单元对于候选推送视频集中的候选推送视频,确定图像与该候选推送视频的相似度;选取单元根据候选推送视频集中的候选推送视频分别对应的相似度,从候选推送视频集中选取候选推送视频;推送单元向目标用户对应的终端设备推送所选取的候选推送视频,有助于提升向用户推送的视频与用户意图的匹配度,进而减少用户接收到其期望的视频的时间,即减少用户在接收到其期望的视频之前所需要浏览的视频的数目。由此,减少了这个过程中用户对应的终端设备和推送视频的服务端的流量消耗。In the apparatus provided by the above-mentioned embodiments of the present disclosure, the receiving unit receives the image sent by the target user through the corresponding terminal device; the obtaining unit obtains the candidate push video set; the determining unit determines the image and the candidate push video set for the candidate push video set. similarity of the pushed video; the selecting unit selects the candidate push video from the candidate push video set according to the respective similarities of the candidate push videos in the candidate push video set; the push unit pushes the selected candidate push video to the terminal device corresponding to the target user, This helps to improve the match between the video pushed to the user and the user's intention, thereby reducing the time for the user to receive the desired video, that is, reducing the number of videos that the user needs to browse before receiving the desired video. As a result, the traffic consumption of the terminal device corresponding to the user and the server that pushes the video in this process is reduced.

下面参考图6,其示出了适于用来实现本公开的实施例的电子设备(例如图1中的服务器)600的结构示意图。图6示出的服务器仅仅是一个示例,不应对本公开的实施例的功能和使用范围带来任何限制。Referring next to FIG. 6 , it shows a schematic structural diagram of an electronic device (eg, the server in FIG. 1 ) 600 suitable for implementing embodiments of the present disclosure. The server shown in FIG. 6 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.

如图6所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。As shown in FIG. 6, an electronic device 600 may include a processing device (eg, a central processing unit, a graphics processor, etc.) 601 that may be loaded into random access according to a program stored in a read only memory (ROM) 602 or from a storage device 608 Various appropriate actions and processes are executed by the programs in the memory (RAM) 603 . In the RAM 603, various programs and data necessary for the operation of the electronic device 600 are also stored. The processing device 601 , the ROM 602 , and the RAM 603 are connected to each other through a bus 604 . An input/output (I/O) interface 605 is also connected to bus 604 .

通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。图6中示出的每个方框可以代表一个装置,也可以根据需要代表多个装置。Typically, the following devices can be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 607 of a computer, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. Communication means 609 may allow electronic device 600 to communicate wirelessly or by wire with other devices to exchange data. While FIG. 6 shows electronic device 600 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in FIG. 6 may represent one device, or may represent multiple devices as required.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开的实施例的方法中限定的上述功能。In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication device 609 , or from the storage device 608 , or from the ROM 602 . When the computer program is executed by the processing apparatus 601, the above-described functions defined in the methods of the embodiments of the present disclosure are executed.

需要说明的是,本公开的实施例所述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开的实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开的实施例中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. Rather, in embodiments of the present disclosure, a computer-readable signal medium may include a data signal in baseband or propagated as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.

上述计算机可读介质可以是上述服务器中所包含的;也可以是单独存在,而未装配入该服务器中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该服务器执行时,使得该服务器:接收目标用户通过对应的终端设备发送的图像;获取候选推送视频集;对于候选推送视频集中的候选推送视频,确定图像与该候选推送视频的相似度;根据候选推送视频集中的候选推送视频分别对应的相似度,从候选推送视频集中选取候选推送视频;向目标用户对应的终端设备推送所选取的候选推送视频。The above-mentioned computer-readable medium may be included in the above-mentioned server; or may exist alone without being assembled into the server. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the server, the server is made to: receive the image sent by the target user through the corresponding terminal device; obtain the candidate push video set; Push a candidate push video in the video set, and determine the similarity between the image and the candidate push video; select the candidate push video from the candidate push video set according to the respective similarities of the candidate push videos in the candidate push video set; to the terminal corresponding to the target user The device pushes the selected candidate push video.

可以以一种或多种程序设计语言或其组合来编写用于执行本公开的实施例的操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out operations of embodiments of the present disclosure may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, or a combination thereof, Also included are conventional procedural programming languages - such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider to via Internet connection).

附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.

描述于本公开的实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括接收单元、获取单元、确定单元、选取单元和推送单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,接收单元还可以被描述为“接收目标用户通过对应的终端设备发送的图像的单元”。The units involved in the embodiments of the present disclosure may be implemented in software or hardware. The described unit may also be provided in the processor, for example, it may be described as: a processor includes a receiving unit, an acquiring unit, a determining unit, a selecting unit and a pushing unit. Wherein, the names of these units do not constitute a limitation of the unit itself in some cases, for example, the receiving unit may also be described as "a unit that receives images sent by the target user through the corresponding terminal device".

以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开的实施例中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开的实施例中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solution formed by the specific combination of the above technical features, and should also cover, without departing from the above inventive concept, the above Other technical solutions formed by any combination of technical features or their equivalent features. For example, a technical solution is formed by replacing the above-mentioned features with the technical features disclosed in the embodiments of the present disclosure (but not limited to) with similar functions.

Claims (12)

1.一种用于推送视频的方法,包括:1. A method for pushing a video, comprising: 接收目标用户通过对应的终端设备发送的图像;Receive the image sent by the target user through the corresponding terminal device; 获取候选推送视频集;Get the candidate push video set; 对于所述候选推送视频集中的候选推送视频,确定所述图像与该候选推送视频的相似度;For a candidate push video in the candidate push video set, determine the similarity between the image and the candidate push video; 根据所述候选推送视频集中的候选推送视频分别对应的相似度,从所述候选推送视频集中选取候选推送视频;According to the respective similarities of the candidate push videos in the candidate push video set, select a candidate push video from the candidate push video set; 向所述目标用户对应的终端设备推送所选取的候选推送视频。Pushing the selected candidate push video to the terminal device corresponding to the target user. 2.根据权利要求1所述的方法,其中,所述确定所述图像与该候选推送视频的相似度,包括:2. The method according to claim 1, wherein the determining the similarity between the image and the candidate push video comprises: 提取该候选推送视频的、第一数目帧;Extract the first number of frames of the candidate push video; 确定所述图像与所述第一数目帧的相似度作为所述图像与该候选推送视频的相似度。The similarity between the image and the first number of frames is determined as the similarity between the image and the candidate push video. 3.根据权利要求2所述的方法,其中,所述提取该候选推送视频的、第一数目帧,包括:3. The method according to claim 2, wherein the extracting, the first number of frames of the candidate push video, comprises: 根据所述图像,提取该候选推送视频的、第一数目帧。According to the image, extract the first number of frames of the candidate push video. 4.根据权利要求3所述的方法,其中,所述根据所述图像,提取该候选推送视频的、第一数目帧,包括:4. The method according to claim 3, wherein, according to the image, extracting the first number of frames of the candidate push video, comprising: 将该候选推送视频均匀划分为第二数目个子视频;evenly dividing the candidate push video into a second number of sub-videos; 确定所述第二数目个子视频中的子视频分别与所述图像的相似度,得到相似度集;determining the similarity between the sub-videos in the second number of sub-videos and the image, respectively, to obtain a similarity set; 对于所述第二数目个子视频中的子视频,确定该子视频对应的相似度除以所述相似度集中的相似度的总和的商值,以及确定得到的商值与第一数目的乘积作为该子视频对应的目标数目;从该子视频中提取所述目标数目帧。For sub-videos in the second number of sub-videos, determine the quotient of the similarity corresponding to the sub-video divided by the sum of the similarities in the similarity set, and determine the product of the obtained quotient and the first number as The target number corresponding to the sub-video; extract the target-number frame from the sub-video. 5.根据权利要求1-4之一所述的方法,其中,所述根据所述候选推送视频集中的候选推送视频分别对应的相似度,从所述候选推送视频集中选取候选推送视频,包括:5. The method according to one of claims 1-4, wherein, according to the respective similarity degrees of the candidate push videos in the candidate push video set, selecting a candidate push video from the candidate push video set, comprising: 按照对应的相似度从大到小的顺序,从所述候选推送视频集中选取候选推送视频。The candidate push videos are selected from the candidate push video set in descending order of the corresponding degrees of similarity. 6.一种用于推送视频的装置,包括:6. A device for pushing video, comprising: 接收单元,被配置成接收目标用户通过对应的终端设备发送的图像;a receiving unit, configured to receive the image sent by the target user through the corresponding terminal device; 获取单元,被配置成获取候选推送视频集;an acquisition unit, configured to acquire a candidate push video set; 确定单元,被配置成对于所述候选推送视频集中的候选推送视频,确定所述图像与该候选推送视频的相似度;a determining unit, configured to determine the similarity between the image and the candidate pushed video for a candidate pushed video in the candidate pushed video set; 选取单元,被配置成根据所述候选推送视频集中的候选推送视频分别对应的相似度,从所述候选推送视频集中选取候选推送视频;a selection unit, configured to select a candidate push video from the candidate push video set according to the respective similarities of the candidate push videos in the candidate push video set; 推送单元,被配置成向所述目标用户对应的终端设备推送所选取的候选推送视频。A push unit, configured to push the selected candidate push video to the terminal device corresponding to the target user. 7.根据权利要求6所述的装置,其中,所述确定单元进一步被配置成:7. The apparatus of claim 6, wherein the determining unit is further configured to: 提取该候选推送视频的、第一数目帧;Extract the first number of frames of the candidate push video; 确定所述图像与所述第一数目帧的相似度作为所述图像与该候选推送视频的相似度。The similarity between the image and the first number of frames is determined as the similarity between the image and the candidate push video. 8.根据权利要求7所述的装置,其中,所述确定单元进一步被配置成:8. The apparatus of claim 7, wherein the determining unit is further configured to: 根据所述图像,提取该候选推送视频的、第一数目帧。According to the image, extract the first number of frames of the candidate push video. 9.根据权利要求8所述的装置,其中,所述确定单元进一步被配置成:9. The apparatus of claim 8, wherein the determining unit is further configured to: 将该候选推送视频均匀划分为第二数目个子视频;evenly dividing the candidate push video into a second number of sub-videos; 确定所述第二数目个子视频中的子视频分别与所述图像的相似度,得到相似度集;determining the similarity between the sub-videos in the second number of sub-videos and the image, respectively, to obtain a similarity set; 对于所述第二数目个子视频中的子视频,确定该子视频对应的相似度除以所述相似度集中的相似度的总和的商值,以及确定得到的商值与第一数目的乘积作为该子视频对应的目标数目;从该子视频中提取所述目标数目帧。For sub-videos in the second number of sub-videos, determine the quotient of the similarity corresponding to the sub-video divided by the sum of the similarities in the similarity set, and determine the product of the obtained quotient and the first number as The target number corresponding to the sub-video; extract the target-number frame from the sub-video. 10.根据权利要求6-9之一所述的装置,其中,所述选取单元进一步被配置成:10. The apparatus of one of claims 6-9, wherein the selection unit is further configured to: 按照对应的相似度从大到小的顺序,从所述候选推送视频集中选取候选推送视频。The candidate push videos are selected from the candidate push video set in descending order of the corresponding degrees of similarity. 11.一种服务器,包括:11. A server comprising: 一个或多个处理器;one or more processors; 存储装置,其上存储有一个或多个程序;a storage device on which one or more programs are stored; 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-5中任一所述的方法。The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5. 12.一种计算机可读介质,其上存储有计算机程序,其中,该程序被处理器执行时实现如权利要求1-5中任一所述的方法。12. A computer-readable medium having stored thereon a computer program, wherein the program, when executed by a processor, implements the method of any one of claims 1-5.
CN201910408019.2A 2019-05-15 2019-05-15 Method and device for pushing video Active CN111949819B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910408019.2A CN111949819B (en) 2019-05-15 2019-05-15 Method and device for pushing video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910408019.2A CN111949819B (en) 2019-05-15 2019-05-15 Method and device for pushing video

Publications (2)

Publication Number Publication Date
CN111949819A true CN111949819A (en) 2020-11-17
CN111949819B CN111949819B (en) 2025-09-05

Family

ID=73336912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910408019.2A Active CN111949819B (en) 2019-05-15 2019-05-15 Method and device for pushing video

Country Status (1)

Country Link
CN (1) CN111949819B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023124793A1 (en) * 2021-12-27 2023-07-06 北京沃东天骏信息技术有限公司 Image pushing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106686404A (en) * 2016-12-16 2017-05-17 中兴通讯股份有限公司 Video analysis platform, matching method, accurate advertisement delivery method and system
CN107404656A (en) * 2017-06-26 2017-11-28 武汉斗鱼网络科技有限公司 Live video recommends method, apparatus and server
CN108416013A (en) * 2018-03-02 2018-08-17 北京奇艺世纪科技有限公司 Video matching, retrieval, classification and recommendation method, apparatus and electronic equipment
US20180276478A1 (en) * 2017-03-24 2018-09-27 International Business Machines Corporation Determining Most Representative Still Image of a Video for Specific User
CN109388721A (en) * 2018-10-18 2019-02-26 百度在线网络技术(北京)有限公司 The determination method and apparatus of cover video frame

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106686404A (en) * 2016-12-16 2017-05-17 中兴通讯股份有限公司 Video analysis platform, matching method, accurate advertisement delivery method and system
US20180276478A1 (en) * 2017-03-24 2018-09-27 International Business Machines Corporation Determining Most Representative Still Image of a Video for Specific User
CN107404656A (en) * 2017-06-26 2017-11-28 武汉斗鱼网络科技有限公司 Live video recommends method, apparatus and server
CN108416013A (en) * 2018-03-02 2018-08-17 北京奇艺世纪科技有限公司 Video matching, retrieval, classification and recommendation method, apparatus and electronic equipment
CN109388721A (en) * 2018-10-18 2019-02-26 百度在线网络技术(北京)有限公司 The determination method and apparatus of cover video frame

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023124793A1 (en) * 2021-12-27 2023-07-06 北京沃东天骏信息技术有限公司 Image pushing method and device

Also Published As

Publication number Publication date
CN111949819B (en) 2025-09-05

Similar Documents

Publication Publication Date Title
CN108830235B (en) Method and apparatus for generating information
US11436863B2 (en) Method and apparatus for outputting data
WO2020000879A1 (en) Image recognition method and apparatus
CN109447156B (en) Method and apparatus for generating a model
CN110070076B (en) Method and device for selecting training samples
CN108989882B (en) Method and apparatus for outputting music pieces in video
CN110213614B (en) Method and device for extracting key frame from video file
CN109981787B (en) Method and device for displaying information
CN109977905B (en) Method and apparatus for processing fundus images
CN108510084B (en) Method and apparatus for generating information
CN114697761B (en) A processing method, device, terminal equipment and medium
CN109862100B (en) Method and device for pushing information
CN111897950A (en) Method and apparatus for generating information
WO2024099171A1 (en) Video generation method and apparatus
CN110516678A (en) Image processing method and device
CN112182255A (en) Method and apparatus for storing and retrieving media files
CN110704294B (en) Method and apparatus for determining response time
CN109829117B (en) Method and device for pushing information
CN109919220B (en) Method and apparatus for generating feature vectors of video
CN111897951A (en) Method and apparatus for generating information
CN114495080B (en) Font recognition methods, devices, readable media and electronic devices
CN113033552B (en) Text recognition method, device and electronic device
CN110765304A (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN111062995B (en) Methods, devices, electronic devices and computer-readable media for generating facial images
CN111949819B (en) Method and device for pushing video

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