[go: up one dir, main page]

CN105992060A - Method, device and system for filtering video ad - Google Patents

Method, device and system for filtering video ad Download PDF

Info

Publication number
CN105992060A
CN105992060A CN201510079330.9A CN201510079330A CN105992060A CN 105992060 A CN105992060 A CN 105992060A CN 201510079330 A CN201510079330 A CN 201510079330A CN 105992060 A CN105992060 A CN 105992060A
Authority
CN
China
Prior art keywords
video
address
filtering
description information
advertisement
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.)
Withdrawn
Application number
CN201510079330.9A
Other languages
Chinese (zh)
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201510079330.9A priority Critical patent/CN105992060A/en
Priority to PCT/CN2016/072160 priority patent/WO2016127799A1/en
Publication of CN105992060A publication Critical patent/CN105992060A/en
Withdrawn legal-status Critical Current

Links

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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/454Content or additional data filtering, e.g. blocking advertisements

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本发明公开了一种视频广告过滤的方法、装置和系统,涉及计算机网络技术领域,能够有效去除视频播放中的广告视频。包括:获取终端发送的第一HTTP请求报文,所述第一HTTP请求报文包括所述终端通过所述网关请求访问第一网络侧服务器的IP地址或者URL地址;当所述IP地址或者URL地址包含在第一过滤地址列表中时,向终端发送包含过滤广告播放的视频播放器下载地址的响应报文;和/或当所述IP地址或者URL地址包含在第二过滤地址列表中时,截获第一网络侧服务器返回的视频描述信息;删除或者修改所述视频描述信息中的广告视频描述信息,将获得的过滤广告播放的视频描述信息发送至终端。

The invention discloses a video advertisement filtering method, device and system, relates to the technical field of computer networks, and can effectively remove advertisement videos during video playback. Including: obtaining the first HTTP request message sent by the terminal, the first HTTP request message including the IP address or URL address of the terminal requesting to access the first network side server through the gateway; when the IP address or URL When the address is included in the first filtering address list, send to the terminal a response message containing the download address of the video player for filtering advertisement playback; and/or when the IP address or URL address is included in the second filtering address list, Intercepting the video description information returned by the first network side server; deleting or modifying the advertisement video description information in the video description information, and sending the obtained video description information for filtering advertisement playback to the terminal.

Description

一种视频广告过滤的方法、装置和系统Method, device and system for filtering video advertisements

技术领域technical field

本发明涉及计算机网络技术领域,尤其涉及一种视频广告过滤的方法、装置和系统。The invention relates to the technical field of computer networks, in particular to a method, device and system for filtering video advertisements.

背景技术Background technique

目前在家中观看网络视频已经成为家庭娱乐和休闲的主要方式。各大视频网站都推出可在PC(personal computer,个人计算机)、智能手机、平板电脑等不同终端上运行的视频播放软件,以满足不同人群观看视频的需要。然而,为了维护自身利益,几乎所有的视频网站都会在视频播放前播放一段或几段视频广告,长度在10秒到数十秒不等,浪费了较多的时间和资源,对用户体验影响极大。目前用户可通过安装专门软件的方式对视频播放前的广告进行过滤。Watching online video at home has become the main way of family entertainment and leisure. All major video websites have launched video playback software that can run on different terminals such as PCs (personal computers, personal computers), smart phones, and tablet computers, so as to meet the needs of different groups of people watching videos. However, in order to protect their own interests, almost all video websites will play one or several video advertisements before the video is played, the length of which varies from 10 seconds to tens of seconds, which wastes a lot of time and resources and has a great impact on user experience. Big. At present, users can filter the advertisements before the video is played by installing special software.

目前广告过滤软件主要针对网页中的广告进行过滤,视频广告过滤效果一般;另外,广告过滤软件大多针对特定的浏览器进行开发,不同的浏览器则需要安装不同的插件,用户使用非常不便;而且,当前广告过滤软件只能解决浏览器方式的视频广告过滤问题,而对于通过手机/平板电脑APP(Application,应用程序)观看视频的用户来说,则没有相应的解决方法。At present, advertising filtering software mainly filters advertisements in web pages, and the filtering effect of video advertisements is general; in addition, most advertising filtering software is developed for specific browsers, and different browsers need to install different plug-ins, which is very inconvenient for users to use; and , current advertisement filter software can only solve the video advertisement filtering problem of browser mode, and for the user of watching video by mobile phone/tablet computer APP (Application, application program), then there is no corresponding solution.

发明内容Contents of the invention

为了解决上述技术问题,本发明提供一种视频广告过滤的方法、装置和系统,能够有效去除视频播放中的广告视频。In order to solve the above technical problems, the present invention provides a method, device and system for filtering video advertisements, which can effectively remove advertisement videos during video playback.

为了达到本发明目的,本发明提供了一种视频广告过滤的方法,应用于网关,包括:In order to achieve the purpose of the present invention, the present invention provides a method for video advertisement filtering, which is applied to a gateway, including:

获取终端发送的第一超文本传输协议HTTP请求报文,所述第一HTTP请求报文包括所述终端通过所述网关请求访问第一网络侧服务器的网络协议IP地址或者统一资源定位器URL地址;Obtaining the first hypertext transfer protocol HTTP request message sent by the terminal, the first HTTP request message including the network protocol IP address or URL address of the first network side server requested by the terminal to access the first network side through the gateway ;

根据所述第一HTTP请求报文,确定所述IP地址或者URL地址是否包含在第一过滤地址列表中;According to the first HTTP request message, determine whether the IP address or the URL address is included in the first filtering address list;

当所述IP地址或者URL地址包含在第一过滤地址列表中时,向终端发送包含过滤广告播放的视频播放器下载地址的响应报文;When the IP address or the URL address is included in the first filtering address list, send to the terminal a response message that includes the download address of the video player for filtering advertisement playback;

和/或and / or

根据所述第一HTTP请求报文,确定所述IP地址或者URL地址是否包含在第二过滤地址列表中;According to the first HTTP request message, determine whether the IP address or the URL address is included in the second filtering address list;

当所述IP地址或者URL地址包含在第二过滤地址列表中时,截获第一网络侧服务器返回的视频描述信息;删除或者修改所述视频描述信息中的广告视频描述信息,将获得的过滤广告播放的视频描述信息发送至终端。When the IP address or URL address is included in the second filtering address list, intercept the video description information returned by the first network side server; delete or modify the advertisement video description information in the video description information, and obtain the filtered advertisement The description information of the played video is sent to the terminal.

进一步地,所述方法还包括:Further, the method also includes:

接收终端发送的第二HTTP请求报文,所述第二HTTP请求报文包括所述终端通过所述网关请求访问第二网络侧服务器的网络协议IP地址或者统一资源定位器URL地址;以使得所述终端通过所述网关从所述第二网络侧服务器请求下载过滤广告播放的视频播放器。receiving a second HTTP request message sent by the terminal, the second HTTP request message including the network protocol IP address or URL address of the server on the second network side requested by the terminal to access the second network side server through the gateway; so that the The terminal requests from the second network side server to download a video player for filtering advertisements through the gateway.

进一步地,接收终端发送的第二HTTP请求报文之后,还包括:向所述终端返回重定向报文。Further, after receiving the second HTTP request message sent by the terminal, the method further includes: returning a redirection message to the terminal.

进一步地,修改所述视频描述信息请求中的广告视频描述信息包括:Further, modifying the advertisement video description information in the video description information request includes:

将所述视频描述信息请求中的广告视频描述信息修改为报体内容为空的响应报文;Modifying the advertisement video description information in the video description information request to a response message whose body content is empty;

或者,将所述视频描述信息请求中的广告视频描述信息修改为播放时长小于阈值的替代视频描述信息。Or, modify the advertisement video description information in the video description information request to substitute video description information whose playback duration is shorter than a threshold.

进一步地,将所述视频描述信息请求中的广告视频描述信息修改为播放时长小于阈值的替代视频描述信息之前,还包括:向所述终端返回重定向报文。Further, before modifying the advertisement video description information in the video description information request to substitute video description information whose playback duration is shorter than the threshold, the method further includes: returning a redirect message to the terminal.

进一步地,所述方法还包括根据预定规则更新第一过滤地址列表和第二过滤地址列表。Further, the method further includes updating the first filtering address list and the second filtering address list according to a predetermined rule.

为了达到本发明目的,本发明还提供了一种视频广告过滤的装置,设置于网关,包括:In order to achieve the purpose of the present invention, the present invention also provides a device for filtering video advertisements, which is set on the gateway, including:

获取模块,用于获取终端发送的第一超文本传输协议HTTP请求报文,所述第一HTTP请求报文包括所述终端通过所述网关请求访问第一网络侧服务器的网络协议IP地址或者统一资源定位器URL地址;An acquisition module, configured to acquire a first hypertext transfer protocol HTTP request message sent by the terminal, where the first HTTP request message includes the network protocol IP address or unified resource locator URL address;

第一匹配模块,用于根据所述第一HTTP请求报文,确定所述IP地址或者URL地址是否包含在第一过滤地址列表中;A first matching module, configured to determine whether the IP address or the URL address is included in the first filtering address list according to the first HTTP request message;

第一处理模块,用于当所述IP地址或者URL地址包含在第一过滤地址列表中时,向终端发送包含过滤广告播放的视频播放器下载地址的响应报文;The first processing module is used to send to the terminal a response message containing a video player download address for filtering advertisement playback when the IP address or URL address is included in the first filtering address list;

和/或and / or

第二匹配模块,用于根据所述第一HTTP请求报文,确定所述IP地址或者URL地址是否包含在第二过滤地址列表中;A second matching module, configured to determine whether the IP address or the URL address is included in the second filtering address list according to the first HTTP request message;

第二处理模块,用于当所述IP地址或者URL地址包含在第二过滤地址列表中时,截获第一网络侧服务器返回的视频描述信息;删除或者修改所述视频描述信息中的广告视频描述信息,将获得的过滤广告播放的视频描述信息发送至终端。The second processing module is used to intercept the video description information returned by the first network side server when the IP address or URL address is included in the second filtering address list; delete or modify the advertisement video description in the video description information information, and send the acquired video description information for filtered advertisement playback to the terminal.

优选地,所述装置还包括:通信模块,用于接收终端发送的第二HTTP请求报文,所述第二HTTP请求报文包括所述终端通过所述网关请求访问第二网络侧服务器的网络协议IP地址或者统一资源定位器URL地址;以使得所述终端通过所述网关从所述第二网络侧服务器请求下载过滤广告播放的视频播放器。Preferably, the device further includes: a communication module, configured to receive a second HTTP request message sent by the terminal, where the second HTTP request message includes the network request that the terminal requests to access the second network side server through the gateway Protocol IP address or Uniform Resource Locator URL address; so that the terminal requests to download a video player that filters advertisements from the second network side server through the gateway.

优选地,所述通信模块,还用于在接收终端发送的第二HTTP请求报文之后,向所述终端返回重定向报文。Preferably, the communication module is further configured to return a redirect message to the terminal after receiving the second HTTP request message sent by the terminal.

优选地,第二处理模块包括:第一修改单元或第二修改单元,Preferably, the second processing module includes: a first modification unit or a second modification unit,

所述第一修改单元用于将所述视频描述信息请求中的广告视频描述信息修改为报体内容为空的响应报文;The first modifying unit is configured to modify the advertisement video description information in the video description information request into a response message whose body content is empty;

所述第二修改单元用于将所述视频描述信息请求中的广告视频描述信息修改为播放时长小于阈值的替代视频描述信息。The second modifying unit is configured to modify the advertisement video description information in the video description information request to substitute video description information whose playing time is shorter than a threshold.

优选地,所述通信模块还用于在将所述视频描述信息请求中的广告视频描述信息修改为播放时长小于阈值的替代视频描述信息之前,向所述终端返回重定向报文。Preferably, the communication module is further configured to return a redirection message to the terminal before modifying the advertisement video description information in the video description information request to substitute video description information whose playback duration is shorter than a threshold.

优选地,所述装置还包括更新模块,用于根据预定规则更新第一过滤地址列表和第二过滤地址列表。Preferably, the device further includes an updating module, configured to update the first filtering address list and the second filtering address list according to predetermined rules.

为了达到本发明目的,本发明还提供了一种视频广告过滤的系统,其特征在于,包括:上述的网关和第二网络侧服务器,所述第二网络侧服务器,用于提供更新视频广告过滤规则的过滤规则描述文档,以使所述网关更新第一过滤地址列表和第二过滤地址列表。In order to achieve the purpose of the present invention, the present invention also provides a video advertisement filtering system, which is characterized in that it includes: the above-mentioned gateway and a second network side server, and the second network side server is used to provide updated video advertisement filtering The filtering rule description document of the rule, so that the gateway updates the first filtering address list and the second filtering address list.

优选地,所述第二网络侧服务器,还用于获取终端通过所述网关发送的第二HTTP请求报文,所述第二请求报文包括请求访问第二网络侧服务器的IP地址或者URL地址;Preferably, the second network-side server is further configured to obtain a second HTTP request message sent by the terminal through the gateway, and the second request message includes an IP address or URL address requesting to access the second network-side server ;

向所述网关发送过滤广告播放的视频播放器的描述信息,以使得所述终端通过所述网关从所述第二网络侧服务器请求下载过滤广告播放的视频播放器。Sending the description information of the video player for filtering advertisement playback to the gateway, so that the terminal requests to download the video player for filtering advertisement playback from the second network side server through the gateway.

与现有技术相比,本发明基于HTTP透明代理的视频广告过滤方法,无需用户在客户端进行任何设置,即可有效去除视频播放中的广告视频,同时,该方法支持自动升级过滤规则功能,以适应不断更新的播放器软件。这种过滤方法可以方便地在家庭网关设备中实施,家庭网关下挂的所有终端在播放视频时都可以轻松过滤掉视频中的广告。Compared with the prior art, the video advertisement filtering method based on the HTTP transparent proxy of the present invention can effectively remove the advertisement video in the video playback without any setting by the user on the client end. At the same time, the method supports the function of automatically upgrading the filtering rules To accommodate the constantly updated player software. This filtering method can be conveniently implemented in the home gateway device, and all terminals connected to the home gateway can easily filter out the advertisements in the video when playing the video.

本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

附图说明Description of drawings

此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention and constitute a part of the application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention. In the attached picture:

图1为本发明实施例的视频广告过滤的方法的流程图;Fig. 1 is the flowchart of the method for the video advertisement filtering of the embodiment of the present invention;

图2为本发明实施例的视频广告过滤的方法的流程图;Fig. 2 is the flowchart of the method for the video advertisement filtering of the embodiment of the present invention;

图3为本发明实施例的视频广告过滤的装置的结构示意图;FIG. 3 is a schematic structural diagram of a device for filtering video advertisements according to an embodiment of the present invention;

图4为本发明实施例的视频广告过滤的系统的组网图;4 is a network diagram of a system for filtering video advertisements according to an embodiment of the present invention;

图5为本发明实施例的网关的功能模块关系图。FIG. 5 is a relationship diagram of functional modules of the gateway according to the embodiment of the present invention.

具体实施方式detailed description

为使本发明的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the purpose, technical solution and advantages of the present invention more clear, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined arbitrarily with each other.

目前视频播放的基本业务交互过程如下:The current basic business interaction process of video playback is as follows:

1.浏览器从视频网站下载播放器插件;1. The browser downloads the player plug-in from the video website;

2.浏览并选择想要播放的视频;2. Browse and select the video you want to play;

3.请求该视频的描述信息,包括视频文件大小、时长、下载地址等;3. Request the description information of the video, including video file size, duration, download address, etc.;

4.请求与该视频关联的广告视频描述信息,包括视频广告时长、下载地址等;4. Request the advertisement video description information associated with the video, including video advertisement duration, download address, etc.;

5.下载并播放广告视频;5. Download and play the advertising video;

6.下载并播放普通视频。6. Download and play normal video.

其中,步骤1中的下载播放器插件操作只针对于浏览器方式观看视频,当使用APP时无需该过程。Among them, the operation of downloading the player plug-in in step 1 is only for viewing videos in the browser mode, and this process is not required when using the APP.

由于上述交互过程都使用HTTP协议,且对于某个特定的视频网站,每个请求和响应的HTTP报文都具有一定的特征,这样,当家庭网关截获住客户端发往视频网站服务器的请求报文时,就可以根据请求报文的特征使用预先验证有效的方法控制发送客户端的响应报文,从而达到视频广告过滤的目的。本方法基于在播放视频时客户端(终端)同视频服务器(第一网络侧服务器)之间的交互使用HTTP传输协议进行设计。具体方式如下:Since the above-mentioned interactive process all uses the HTTP protocol, and for a specific video website, each request and response HTTP message has certain characteristics, so when the home gateway intercepts the request message sent by the client to the video website server According to the characteristics of the request message, an effective method of pre-authentication can be used to control the sending of the response message of the client, so as to achieve the purpose of video advertisement filtering. The method is designed based on the HTTP transmission protocol for the interaction between the client (terminal) and the video server (the first network side server) when playing the video. The specific method is as follows:

如图1和图2所示,本发明实施例提供的一种视频广告过滤的方法,应用于网关,包括:As shown in Figure 1 and Figure 2, a video advertisement filtering method provided by the embodiment of the present invention is applied to a gateway, including:

A、获取终端发送的第一超文本传输协议HTTP请求报文,所述第一HTTP请求报文包括所述终端通过所述网关请求访问第一网络侧服务器的网络协议IP地址或者统一资源定位器URL地址;A. Obtain the first hypertext transfer protocol HTTP request message sent by the terminal, the first HTTP request message includes the network protocol IP address or uniform resource locator that the terminal requests to access the first network side server through the gateway URL address;

B1、根据所述第一HTTP请求报文,确定所述IP地址或者URL地址是否包含在第一过滤地址列表中;B1. Determine whether the IP address or the URL address is included in the first filtering address list according to the first HTTP request message;

C1、当所述IP地址或者URL地址包含在第一过滤地址列表中时,向终端发送包含过滤广告播放的视频播放器下载地址的响应报文;C1. When the IP address or URL address is included in the first filtering address list, send a response message to the terminal that includes the download address of the video player for filtering advertisement playback;

和/或and / or

B2、根据所述第一HTTP请求报文,确定所述IP地址或者URL地址是否包含在第二过滤地址列表中;B2. According to the first HTTP request message, determine whether the IP address or the URL address is included in the second filtering address list;

C2、当所述IP地址或者URL地址包含在第二过滤地址列表中时,截获第一网络侧服务器返回的视频信息请求;删除或者修改所述视频描述信息请中的广告视频描述信息,将获得的过滤广告播放的视频描述信息发送至终端。C2. When the IP address or URL address is included in the second filtering address list, intercept the video information request returned by the first network side server; delete or modify the advertisement video description information in the video description information request, and obtain The video description information played by the filtered advertisement is sent to the terminal.

步骤C1之后还包括:After step C1 also include:

接收终端发送的第二HTTP请求报文,所述第二HTTP请求报文包括所述终端通过所述网关请求访问第二网络侧服务器的网络协议IP地址或者统一资源定位器URL地址;以使得所述终端通过所述网关从所述第二网络侧服务器请求下载过滤广告播放的视频播放器。receiving a second HTTP request message sent by the terminal, the second HTTP request message including the network protocol IP address or URL address of the server on the second network side requested by the terminal to access the second network side server through the gateway; so that the The terminal requests from the second network side server to download a video player for filtering advertisements through the gateway.

接收终端发送的第二HTTP请求报文之后,还包括:向所述终端返回状态码为302的重定向报文。After receiving the second HTTP request message sent by the terminal, the method further includes: returning a redirection message with a status code of 302 to the terminal.

本发明实施例中网关将终端发送的第二HTTP请求报文转发至第二网络侧服务器,并将第二网络侧服务器发送的过滤广告播放的视频播放器的描述信息转发至所述终端。In the embodiment of the present invention, the gateway forwards the second HTTP request message sent by the terminal to the second network side server, and forwards the description information of the video player for filtering advertisement playback sent by the second network side server to the terminal.

步骤C2中修改所述视频描述信息请求中的广告视频描述信息包括:Modifying the advertisement video description information in the video description information request in step C2 includes:

将所述视频描述信息请求中的广告视频描述信息修改为状态码为200OK的报体内容为空的响应报文;Modifying the advertisement video description information in the video description information request to a response message whose status code is 200OK and whose body content is empty;

或者,将所述视频描述信息请求中的广告视频描述信息修改为播放时长小于阈值的替代视频描述信息。Or, modify the advertisement video description information in the video description information request to substitute video description information whose playback duration is shorter than a threshold.

将所述视频描述信息请求中的广告视频描述信息修改为播放时长小于阈值的替代视频描述信息之前,还包括:向所述终端返回状态码为302的重定向报文。Before modifying the advertisement video description information in the video description information request to substitute video description information whose playback duration is shorter than the threshold, the method further includes: returning a redirect message with a status code of 302 to the terminal.

其中第一种方式步骤A与步骤B1、C1组合,可以称为替换视频播放器的方式。网关在收到终端的下载播放器请求报文(第一HTTP请求报文)时,通过回复状态码为302的重定向报文,将指向原视频网站(第一网络侧服务器)播放器的下载地址重定向至另一新地址(第二网络侧服务器),该地址存放的播放器为不带广告播放功能的被替换掉的视频播放器。Wherein the first way, step A is combined with steps B1 and C1, which can be called the way of replacing the video player. When the gateway receives the download player request message (the first HTTP request message) from the terminal, it will point to the original video website (the first network side server) player downloader by replying with a redirection message with a status code of 302. The address is redirected to another new address (the second network side server), and the player stored in this address is a replaced video player without advertisement playback function.

第二种方式步骤A与步骤B2、C2组合,可以称为视频广告描述信息控制的方式,对于网关在截获住播放器的广告视频描述信息的请求时,回复报体状态码为200OK的响应报文,终端由于无法获取视频广告描述信息,播放器会自动跳过视频广告的播放,直接播放正常的普通视频。对于网关截获住播放器的视频(广告)描述信息请求后,通过HTTP代理方式从目的服务器获取原始的视频(广告)描述信息,删除或修改掉原播放列表中的广告视频内容后再返回给播放器,从而达到去除广告的目的。对于网关截获住播放器发送的下载广告视频请求时,返回状态码为302重定向报文,将原广告视频替换成播放时长很短的替代视频,如1秒钟的短视频,从而达到快速跳过视频广告播放的效果。The second way is the combination of step A and steps B2 and C2, which can be called the method of video advertisement description information control. When the gateway intercepts the request for the advertisement video description information of the player, it returns a response report with a status code of 200 OK. Because the terminal cannot obtain the description information of the video advertisement, the player will automatically skip the playback of the video advertisement and directly play the normal ordinary video. After the gateway intercepts the player's video (advertisement) description information request, it obtains the original video (advertisement) description information from the destination server through HTTP proxy, deletes or modifies the advertisement video content in the original playlist, and then returns to the player. device, so as to achieve the purpose of removing advertisements. When the gateway intercepts the download advertisement video request sent by the player, it returns a redirect message with status code 302, and replaces the original advertisement video with an alternative video with a short playing time, such as a short video of 1 second, so as to achieve fast jumping. The effect of playing through the video ad.

本发明实施例提供的方法还能够根据预定规则更新第一过滤地址列表和第二过滤地址列表。The method provided by the embodiment of the present invention can also update the first filtering address list and the second filtering address list according to a predetermined rule.

第一过滤地址列表和第二过滤地址列表可以为合并形式的,也可以为独立形式的。The first filtering address list and the second filtering address list may be in a combined form or in an independent form.

上述视频广告过滤的方法可以通过设置广告过滤规则进行,本发明实施例中利用合并第一过滤地址列表和第二过滤地址列表,视频广告过滤规则示例可以如下表形式:The above-mentioned video advertisement filtering method can be performed by setting advertisement filtering rules. In the embodiment of the present invention, the first filtering address list and the second filtering address list are combined. An example of the video advertisement filtering rules can be in the form of the following table:

发明实施例还提供一种视频广告过滤的方法,应用于第二网络侧服务器,包括:用于提供更新视频广告过滤规则的过滤规则描述文档,以使所述网关更新第一过滤地址列表和第二过滤地址列表。The embodiment of the invention also provides a video advertisement filtering method, which is applied to the second network side server, including: providing a filtering rule description document for updating video advertisement filtering rules, so that the gateway updates the first filtering address list and the second filtering address list. 2. Filter the address list.

当所述第二网络侧服务器存放所述不带广告播放功能的视频播放器时,即网关向终端发送的包含过滤广告播放的视频播放器下载地址指向所述第二网络侧服务器时,所述方法还包括:When the second network side server stores the video player without advertisement playback function, that is, when the download address of the video player containing filtered advertisement playback sent by the gateway to the terminal points to the second network side server, the Methods also include:

获取终端通过所述网关发送的第二HTTP请求报文,所述第二请求报文包括请求访问第二网络侧服务器的IP地址或者URL地址;Obtaining a second HTTP request message sent by the terminal through the gateway, where the second request message includes an IP address or URL address requesting to access a server on the second network side;

向所述网关发送过滤广告播放的视频播放器的描述信息,以使得所述终端通过所述网关从所述第二网络侧服务器请求下载过滤广告播放的视频播放器。Sending the description information of the video player for filtering advertisement playback to the gateway, so that the terminal requests to download the video player for filtering advertisement playback from the second network side server through the gateway.

本发明实施例利用第二网络侧服务器提供的更新视频广告过滤规则的过滤规则描述文档是考虑到视频网站会不断调整视频交互协议,为了保证过滤规则始终有效,本发明实施例的视频广告过滤的方法还包括:提供更新视频广告过滤规则的过滤规则描述文档,以使所述网关更新第一过滤地址列表和第二过滤地址列表。The embodiment of the present invention utilizes the filtering rule description document for updating the video advertisement filtering rules provided by the second network side server to consider that the video website will constantly adjust the video interaction protocol. In order to ensure that the filtering rules are always valid, the video advertisement filtering in the embodiment of the present invention The method further includes: providing a filter rule description document for updating the video advertisement filter rule, so that the gateway updates the first filter address list and the second filter address list.

在其他实施例汇总网关向终端发送的包含过滤广告播放的视频播放器下载地址可以指向其他网元或者设备,或者过滤广告播放的视频播放器存储于所述网关上。In other embodiments, the download address of the video player containing filtered advertisements sent by the gateway to the terminal may point to other network elements or devices, or the video player for filtered advertisements is stored on the gateway.

更新视频广告过滤规则的过程如下:The process for updating video ad filtering rules is as follows:

1.当检测到某视频网站视频广告过滤功能失效时,根据其协议特征,找出新的有效的视频广告过滤方法;1. When it is detected that the video advertisement filtering function of a certain video website is invalid, according to its protocol characteristics, find out a new and effective video advertisement filtering method;

2.更新视频广告过滤规则服务器中的过滤规则描述文档;2. Update the filter rule description document in the video advertisement filter rule server;

3.网关定期(如每天)或由用户手动进行更新操作,向服务器查询是否有新的过滤规则,如果有,则下载至本地;3. The gateway periodically (for example, every day) or manually by the user performs an update operation, inquires from the server whether there is a new filtering rule, and if so, downloads it to the local;

4.家庭网关启用新的过滤规则并按新的过滤方法执行操作去掉视频广告。4. The home gateway enables new filtering rules and performs operations according to the new filtering method to remove video advertisements.

如图3和图4所示,本发明实施例提供一种视频广告过滤的装置,设置于网关,包括:As shown in Figure 3 and Figure 4, an embodiment of the present invention provides a device for filtering video advertisements, which is set on a gateway, including:

获取模块,用于获取终端发送的第一超文本传输协议HTTP请求报文,所述第一HTTP请求报文包括所述终端通过所述网关请求访问第一网络侧服务器的网络协议IP地址或者统一资源定位器URL地址;An acquisition module, configured to acquire a first hypertext transfer protocol HTTP request message sent by the terminal, where the first HTTP request message includes the network protocol IP address or unified resource locator URL address;

第一匹配模块,用于根据所述第一HTTP请求报文,确定所述IP地址或者URL地址是否包含在第一过滤地址列表中;A first matching module, configured to determine whether the IP address or the URL address is included in the first filtering address list according to the first HTTP request message;

第一处理模块,用于当所述IP地址或者URL地址包含在第一过滤地址列表中时,向终端发送包含过滤广告播放的视频播放器下载地址的响应报文;The first processing module is used to send to the terminal a response message containing a video player download address for filtering advertisement playback when the IP address or URL address is included in the first filtering address list;

和/或and / or

第二匹配模块,用于根据所述第一HTTP请求报文,确定所述IP地址或者URL地址是否包含在第二过滤地址列表中;A second matching module, configured to determine whether the IP address or the URL address is included in the second filtering address list according to the first HTTP request message;

第二处理模块,用于当所述IP地址或者URL地址包含在第二过滤地址列表中时,截获第一网络侧服务器返回的视频描述信息;删除或者修改所述视频描述信息中的广告视频描述信息,将获得的过滤广告播放的视频描述信息发送至终端。The second processing module is used to intercept the video description information returned by the first network side server when the IP address or URL address is included in the second filtering address list; delete or modify the advertisement video description in the video description information information, and send the acquired video description information for filtered advertisement playback to the terminal.

上述装置还包括:通信模块,用于接收终端发送的第二HTTP请求报文,所述第二HTTP请求报文包括所述终端通过所述网关请求访问第二网络侧服务器的网络协议IP地址或者统一资源定位器URL地址;以使得所述终端通过所述网关从所述第二网络侧服务器请求下载过滤广告播放的视频播放器。The above device also includes: a communication module, configured to receive a second HTTP request message sent by the terminal, where the second HTTP request message includes the network protocol IP address or Uniform resource locator URL address; so that the terminal requests to download a video player for filtering advertisements from the second network side server through the gateway.

进一步地,所述通信模块,还用于在接收终端发送的第二HTTP请求报文之后,向所述终端返回状态码为302的重定向报文。Further, the communication module is further configured to return a redirect message with a status code of 302 to the terminal after receiving the second HTTP request message sent by the terminal.

上述的装置,其特征在于,第二处理模块包括:第一修改单元或第二修改单元,The above device is characterized in that the second processing module includes: a first modifying unit or a second modifying unit,

所述第一修改单元用于将所述视频描述信息请求中的广告视频描述信息修改状态码为200OK的报体内容为空的响应报文;The first modifying unit is used to modify the advertisement video description information in the video description information request to a response message whose status code is 200OK and whose body content is empty;

所述第二修改单元用于将所述视频描述信息请求中的广告视频描述信息修改为播放时长小于阈值的替代视频描述信息。The second modifying unit is configured to modify the advertisement video description information in the video description information request to substitute video description information whose playing time is shorter than a threshold.

所述通信模块还用于在将所述视频描述信息请求中的广告视频描述信息修改为播放时长小于阈值的替代视频描述信息之前,向所述终端返回状态码为302的重定向报文。The communication module is further configured to return a redirect message with a status code of 302 to the terminal before modifying the advertisement video description information in the video description information request to substitute video description information whose playback duration is shorter than a threshold.

上述的装置还包括更新模块,用于根据预定规则更新第一过滤地址列表和第二过滤地址列表。The above device further includes an updating module, configured to update the first filtering address list and the second filtering address list according to a predetermined rule.

本发明实施例还提供一种视频广告过滤的装置,设置于第二网络侧服务器,包括:The embodiment of the present invention also provides a video advertisement filtering device, which is set on the second network side server, including:

过滤模块,用于提供更新视频广告过滤规则的过滤规则描述文档,以使所述网关更新第一过滤地址列表和第二过滤地址列表。The filtering module is configured to provide a filtering rule description document for updating video advertisement filtering rules, so that the gateway can update the first filtering address list and the second filtering address list.

上述装置,还包括:The above-mentioned device also includes:

接收模块,用于获取终端通过所述网关发送的第二HTTP请求报文,所述第二请求报文包括请求访问第二网络侧服务器的IP地址或者URL地址;A receiving module, configured to obtain a second HTTP request message sent by the terminal through the gateway, where the second request message includes an IP address or URL address requesting to access a server on the second network side;

下载模块,向所述网关发送过滤广告播放的视频播放器的描述信息,以使得所述终端通过所述网关从所述第二网络侧服务器请求下载过滤广告播放的视频播放器。The download module sends description information of the video player for filtering advertisement playback to the gateway, so that the terminal requests to download the video player for filtering advertisement playback from the second network side server through the gateway.

如图4所示,本发明实施例一种视频广告过滤的系统,包括:上述的网关,和上述的网络侧服务器。As shown in FIG. 4 , a video advertisement filtering system according to an embodiment of the present invention includes: the above-mentioned gateway, and the above-mentioned network side server.

另外,由于HTTP报文特征字段查询需要消耗较多的CPU,为提高家庭网关的数据转发性能,本发明实施例利用广告预过滤处理进行转发和过滤处理,如图5所示,即只将与视频过滤网站相关的HTTP报文上传至透明HTTP代理进行转发和过滤处理,与广告过滤无关的报文则由协议栈直接转发。预过滤处理过程如下:网关在接收到下挂终端的DNS查询请求后,查询过滤规则(与第一过滤地址列表和第二过滤地址列表对应),如果请求的域名出现在过滤规则中服务器主机名,本发明实施例中可以用HOST字段表示服务器主机名,则将该域名对应的IP地址或者URL地址添加至预过滤IP地址列表或者预过滤URL地址列表。后续如果下挂设备发送的HTTP报文的目的地址包含在预过滤IP地址列表,协议栈将该连接所有报文上交至透明HTTP代理服务器进行广告过滤处理。In addition, because the query of the feature field of the HTTP message needs to consume more CPU, in order to improve the data forwarding performance of the home gateway, the embodiment of the present invention uses the advertisement pre-filtering process to perform the forwarding and filtering process, as shown in FIG. HTTP messages related to video filtering websites are uploaded to the transparent HTTP proxy for forwarding and filtering, while messages not related to advertising filtering are directly forwarded by the protocol stack. The pre-filtering process is as follows: After the gateway receives the DNS query request from the downlink terminal, it queries the filtering rules (corresponding to the first filtering address list and the second filtering address list). If the requested domain name appears in the filtering rules, the server host name , in the embodiment of the present invention, the HOST field can be used to indicate the server host name, and then the IP address or URL address corresponding to the domain name is added to the pre-filtering IP address list or pre-filtering URL address list. Subsequently, if the destination address of the HTTP message sent by the downlink device is included in the pre-filtering IP address list, the protocol stack will hand over all the messages of the connection to the transparent HTTP proxy server for advertisement filtering processing.

实施一Implementation one

某家庭使用PC浏览器观看AAA网站视频并自动过滤视频广告;A family uses a PC browser to watch AAA website videos and automatically filters video advertisements;

前提:AAA网站视频可以通过替换视频播放器(flash播放器)的方式过滤视频广告。Premise: AAA website videos can filter video advertisements by replacing the video player (flash player).

为描述方便,假设与视频网站相关的信息为:AAA视频网站首页为www.aaa.com,该网站提供播放器下载的服务器域名为player.aaa.com,IP地址为“180.232.146.39”,浏览器发起的下载播放器的HTTP请求关键字段为,Host内容为“player.aaa.com”,且请求行包含:“player.swf”。替代播放器(不播放视频广告)的下载地址为http://202.198.35.136/player.swf。For the convenience of description, assume that the information related to the video website is: the homepage of the AAA video website is www.aaa.com, the domain name of the server that provides player downloads on this website is player.aaa.com, and the IP address is "180.232.146.39". The key field of the HTTP request initiated by the server to download the player is, the Host content is "player.aaa.com", and the request line contains: "player.swf". The download address of the alternative player (without playing video ads) is http://202.198.35.136/player.swf.

其实施步骤如下:Its implementation steps are as follows:

101.PC上打开浏览器,访问某视频网站主页,例如http://www.aaa.com;101. Open a browser on the PC and visit the homepage of a video website, such as http://www.aaa.com;

102.浏览器向网关发送域名为“player.aaa.com”的DNS查询请求,网关匹配过滤规则中的Host字段,命中,将该域名对应的IP地址(180.232.146.39)添加至“预过滤IP地址列表”;102. The browser sends a DNS query request with the domain name "player.aaa.com" to the gateway. The gateway matches the Host field in the filter rule, hits it, and adds the IP address (180.232.146.39) corresponding to the domain name to the "pre-filter IP Address List";

103.浏览器向IP地址为180.232.146.39的主机发起连接建立请求,网关在预过滤IP地址列表中查询目的IP地址,查询命中,此后,网关通过防火墙模块将发往目的IP为“180.232.146.39”的所有HTTP报文重定向至本地HTTP代理服务器;103. The browser initiates a connection establishment request to the host with the IP address 180.232.146.39, and the gateway queries the destination IP address in the pre-filtered IP address list, and the query hits. After that, the gateway sends the request to the host with the destination IP “180.232.146.39” through the firewall module. "All HTTP packets redirected to the local HTTP proxy server;

104.网关收到浏览器发送的请求播放器(player.swf)的HTTP报文,视频广告过滤的装置匹配广告过滤条件(与第一过滤地址列表进行匹配),命中后调用第一处理模块预先设定的钩子函数进行处理;104. The gateway receives the HTTP message requesting the player (player.swf) sent by the browser, and the device for video advertisement filtering matches the advertisement filtering condition (matching with the first filtering address list), and calls the first processing module to The set hook function is processed;

105.钩子函数构造HTTP响应报文,其中状态码为302,location字段内容为:http://202.198.35.136/player.swf,发送响应报文给浏览器;105. The hook function constructs an HTTP response message, in which the status code is 302, the content of the location field is: http://202.198.35.136/player.swf, and sends the response message to the browser;

106.浏览器从http://202.198.35.136/player.swf处下载替换播放器;106. The browser downloads the replacement player from http://202.198.35.136/player.swf;

107.用户选择视频,将视频ID号传送给播放器进行播放,此时播放的视频将不带广告视频。107. The user selects a video, and transmits the video ID number to the player for playback. At this time, the video played will not have an advertisement video.

通过以上流程,完成基于HTTP代理对广告视频过滤的应用。Through the above process, the application of advertising video filtering based on HTTP proxy is completed.

实施二Implementation two

某家庭使用PC浏览器观看CCC视频并过滤视频广告;A family uses a PC browser to watch CCC videos and filter video advertisements;

前提:CCC网站视频可以通过回复HTTP报体内容为空的广告视频描述信息请求响应报文来过滤广告视频。Premise: The CCC website video can filter advertisement videos by replying to an advertisement video description information request response message with an empty HTTP message body.

为描述方便,假设与视频广告过滤相关的信息为:CCC视频网站首页为www.ccc.com,提供广告视频描述信息文件的服务器域名为ad.ccc.com,IP地址为“186.111.26.52”,广告视频描述信息HTTP请求报文的关键字段为,Host字段内容为“ad.ccc.com”,且请求行包含:“adv”。For the convenience of description, it is assumed that the information related to video advertisement filtering is: the homepage of the CCC video website is www.ccc.com, the domain name of the server providing the advertisement video description information file is ad.ccc.com, and the IP address is "186.111.26.52", The key field of the advertisement video description information HTTP request message is, the content of the Host field is "ad.ccc.com", and the request line contains: "adv".

其实施步骤如下:Its implementation steps are as follows:

301.PC上打开浏览器,访问某视频网站主页,例如http://www.ccc.com,并从该网站下载视频播放器插件;301. Open a browser on the PC, visit the homepage of a video website, such as http://www.ccc.com, and download the video player plug-in from the website;

302.用户浏览并选择待播放的视频,设视频ID为vid=123456789;302. The user browses and selects a video to be played, and sets the video ID as vid=123456789;

303.播放器客户端向视频服务器发起HTTP请求,获取vid=123456789的视频描述信息文件;303. The player client initiates an HTTP request to the video server to obtain the video description information file of vid=123456789;

304.播放器客户端向广告视频服务器发起HTTP请求,获取vid=123456789对应的视频广告信息,由于该HTTP请求中Host字段为ad.ccc.com,且请求行包含:“adv”,网关查询过滤规则(与第二过滤地址列表进行匹配),命中,并调用第二处理模块相应的钩子函数处理;304. The player client initiates an HTTP request to the advertisement video server to obtain the video advertisement information corresponding to vid=123456789. Since the Host field in the HTTP request is ad.ccc.com, and the request line contains: "adv", the gateway query filters The rule (matches with the second filter address list), hits, and calls the corresponding hook function processing of the second processing module;

305.钩子函数构造HTTP响应报文,其中状态码为200,报体内容为空,并将响应报文发送至播放器;305. The hook function constructs an HTTP response message, wherein the status code is 200, and the content of the message body is empty, and sends the response message to the player;

306.由于播放器获取视频广告描述信息失败,播放器跳过视频广告的播放,并直接下载和播放普通视频。306. Since the player fails to obtain the description information of the video advertisement, the player skips playing the video advertisement and directly downloads and plays the normal video.

通过以上流程,完成整个基于HTTP代理对广告视频过滤的应用。Through the above process, the entire application of advertising video filtering based on HTTP proxy is completed.

实施三Implementation three

某家庭使用iPAD的APP软件观看BBB视频并滤视频广告;A family uses the APP software of iPAD to watch BBB videos and filter video advertisements;

前提:BBB网站视频可以通过修改视频描述信息文件方式过滤广告视频。Premise: BBB website video can filter advertising videos by modifying the video description information file.

为描述方便,假设与视频广告过滤相关的信息为:BBB视频网站首页为www.bbb.com,提供视频播放列表文件的服务器域名为video.bbb.com,IP地址为“182.139.26.46”,APP请求视频描述信息的HTTP请求关键字段为,Host字段内容为“video.bbb.com”,且请求行包含:“m3u8”。m3u8文件中的广告视频条目都带有关键字“video/other”,所述m3u8文件是一种描述媒体播放列表的文件格式。For the convenience of description, assume that the information related to video advertisement filtering is: the homepage of the BBB video website is www.bbb.com, the domain name of the server providing video playlist files is video.bbb.com, the IP address is "182.139.26.46", the APP The key field of the HTTP request requesting video description information is, the content of the Host field is "video.bbb.com", and the request line contains: "m3u8". The advertisement video entries in the m3u8 file all have the keyword "video/other", and the m3u8 file is a file format describing a media playlist.

其实施步骤如下:Its implementation steps are as follows:

201.用户打开iPAD上的APP软件,显示BBB视频首页信息;201. The user opens the APP software on the iPAD, and the BBB video home page information is displayed;

202.选择某一视频,如电影“天下无贼”,APP显示该电影相关描述信息;202. Select a video, such as the movie "A World Without Thieves", and the APP will display the relevant description information of the movie;

203.点击“播放”按钮,选择播放该视频;203. Click the "Play" button to choose to play the video;

204.APP向网关发送域名为“video.bbb.com”的DNS查询请求,网关匹配过滤规则中的Host字段,命中,将该域名对应的IP地址(182.139.26.46)添加至“预过滤IP地址列表”;204. The APP sends a DNS query request with the domain name "video.bbb.com" to the gateway. The gateway matches the Host field in the filter rule, hits it, and adds the IP address (182.139.26.46) corresponding to the domain name to the "pre-filter IP address list";

205.APP向IP地址为182.139.26.46的主机发起连接建立请求,网关在预过滤IP地址列表中查询目的IP地址,查询命中。网关通过防火墙模块将发往目的IP为“182.139.26.46”的所有HTTP报文重定向至本地HTTP代理服务器;205. The APP initiates a connection establishment request to the host with the IP address 182.139.26.46, the gateway queries the destination IP address in the pre-filtered IP address list, and the query hits. The gateway redirects all HTTP messages sent to the destination IP "182.139.26.46" to the local HTTP proxy server through the firewall module;

206.网关收到APP发送的请求“天下无贼”播放列表文件的HTTP报文,视频广告过滤的装置查询过滤规则(与第二过滤地址列表进行匹配),发现HTTP报文中的host字段和请求命令行符合广告过滤条件,查询命中,可以对该请求报文进行标记,要求收到响应报文后调用第二处理模块指定的钩子函数;206. The gateway receives the HTTP message requesting the "A World Without Thieves" playlist file sent by the APP, and the device for video advertisement filtering queries the filtering rules (matching with the second filtering address list), and finds the host field and The request command line meets the advertisement filtering condition, and the query hits, and the request message can be marked, and the hook function specified by the second processing module is required to be called after receiving the response message;

207.代理服务器工作,向请求报文中host字段对应的服务器发起TCP连接并获取到“天下无贼”播放列表文件,即m3u8文件;207. The proxy server works, initiates a TCP connection to the server corresponding to the host field in the request message and obtains the "A World Without Thieves" playlist file, that is, the m3u8 file;

208.钩子函数对m3u8文件进行处理,解析文件,逐条匹配播放条目检查是否包含关键字“video/other”,如果包含,则删除该条目;208. The hook function processes the m3u8 file, parses the file, matches the playback items one by one to check whether the keyword "video/other" is included, and if it does, delete the item;

209.代理服务器将钩子函数处理后的数据,即不包含广告视频条目的m3u8文件回送至APP;209. The proxy server returns the data processed by the hook function, that is, the m3u8 file that does not contain the advertisement video entry, to the APP;

210.APP播放m3u8文件,此时播放的视频将不带广告视频。210. The APP plays the m3u8 file, and the video played at this time will not have an advertisement video.

通过以上流程,完成整个基于HTTP代理对广告视频过滤的应用。Through the above process, the entire application of advertising video filtering based on HTTP proxy is completed.

实施四Implementation four

某家庭使用android手机的APP软件观看DDD视频并滤视频广告A family uses the APP software of the android mobile phone to watch DDD videos and filter video advertisements

为描述方便,假设DDD视频网站播放的广告视频文件下载请求都带有下列关键字:Host字段为“video.ddd.com”,且请求行包括“video/other”For the convenience of description, it is assumed that the download request of the advertisement video file played by the DDD video website has the following keywords: the Host field is "video.ddd.com", and the request line includes "video/other"

其实施步骤如下:Its implementation steps are as follows:

401.用户打开Android手机上的APP软件,显示DDD视频首页信息;401. The user opens the APP software on the Android phone, and the DDD video home page information is displayed;

402.选择某一视频,如电影“天下无贼”,APP显示该电影相关描述信息;402. Select a video, such as the movie "A World Without Thieves", and the APP displays the relevant description information of the movie;

403.点击“播放”按钮,选择播放该视频;403. Click the "Play" button to choose to play the video;

404.APP向服务器发送视频播放列表文件下载请求以获取m3u8文件,该文件除包括普通视频条目外还包括广告视频条目;404. The APP sends a video playlist file download request to the server to obtain the m3u8 file, which includes not only ordinary video items but also advertising video items;

405.APP解析M3U8文件,并依次播放m3u8文件中的视频文件。由于广告视频在播放列表的前部,APP首先播放广告,并向服务器发起广告视频的下载请求;405. The APP parses the M3U8 file, and plays the video files in the m3u8 file in sequence. Since the advertisement video is at the front of the playlist, the APP first plays the advertisement and initiates a download request to the server for the advertisement video;

406.网关收到广告视频的下载请求,由于HTTP请求host字段为“video.ddd.com”,且URL包含“video/other”符合广告过滤规则条件(与第二过滤地址列表进行匹配),网关调用对应的钩子函数进行处理;406. The gateway receives the download request of the advertisement video. Since the host field of the HTTP request is "video.ddd.com" and the URL contains "video/other", it meets the conditions of the advertisement filtering rule (matching with the second filtering address list), the gateway Call the corresponding hook function for processing;

407.钩子函数构造HTTP响应报文,其中状态码为302,location字段指向一条播放时长很短的替代视频,如Location:http://192.168.1.1/video-ad.ts;407. The hook function constructs an HTTP response message, in which the status code is 302, and the location field points to an alternative video with a short playing time, such as Location: http://192.168.1.1/video-ad.ts;

408.播放器下载并播放替代广告视频,由于该视频时长很短,广告播放很快结束;408. The player downloads and plays an alternative ad video. Since the video is short, the ad playback ends soon;

409.播放器继续下载并播放正常的视频。409. The player continues to download and play the normal video.

通过以上流程,完成整个基于HTTP代理对广告视频过滤的应用。Through the above process, the entire application of advertising video filtering based on HTTP proxy is completed.

本发明实施例具有以下优点:支持多种播放终端,包括PC浏览器、手机、平板电脑等,且无需用户在终端上进行任何设置或配置操作,适应性强、易用性好;视频广告过滤通过在家庭网关上增加透明HTTP代理服务器实现,当视频网站广告过滤规则更新后,可保持该框架不变,只调整视频广告规则和钩子函数即可去除广告,扩展性好;对HTTP流进行了预过滤处理,只将与视频广告相关的HTTP流交由HTTP代理处理,家庭网关的数据转发性能影响较小;内置规则更新模块,可自动升级视频广告过滤规则。The embodiment of the present invention has the following advantages: it supports a variety of playback terminals, including PC browsers, mobile phones, tablet computers, etc., and does not require the user to perform any setting or configuration operations on the terminal, with strong adaptability and good usability; video advertisement filtering Realized by adding a transparent HTTP proxy server on the home gateway, when the advertising filtering rules of the video website are updated, the framework can be kept unchanged, and the advertising can be removed only by adjusting the video advertising rules and hook functions, which has good scalability; Pre-filtering processing, only the HTTP stream related to video advertisements is processed by the HTTP proxy, and the data forwarding performance of the home gateway is less affected; the built-in rule update module can automatically update the video advertisement filtering rules.

以上所述,仅为本发明的较佳实例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred examples of the present invention, and are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (14)

1.一种视频广告过滤的方法,其特征在于,应用于网关,包括:1. A method for video advertisement filtering, characterized in that it is applied to a gateway, comprising: 获取终端发送的第一超文本传输协议HTTP请求报文,所述第一HTTP请求报文包括所述终端通过所述网关请求访问第一网络侧服务器的网络协议IP地址或者统一资源定位器URL地址;Obtaining the first hypertext transfer protocol HTTP request message sent by the terminal, the first HTTP request message including the network protocol IP address or URL address of the first network side server requested by the terminal to access the first network side through the gateway ; 根据所述第一HTTP请求报文,确定所述IP地址或者URL地址是否包含在第一过滤地址列表中;According to the first HTTP request message, determine whether the IP address or the URL address is included in the first filtering address list; 当所述IP地址或者URL地址包含在第一过滤地址列表中时,向终端发送包含过滤广告播放的视频播放器下载地址的响应报文;When the IP address or the URL address is included in the first filtering address list, send to the terminal a response message that includes the download address of the video player for filtering advertisement playback; 和/或and / or 根据所述第一HTTP请求报文,确定所述IP地址或者URL地址是否包含在第二过滤地址列表中;According to the first HTTP request message, determine whether the IP address or the URL address is included in the second filtering address list; 当所述IP地址或者URL地址包含在第二过滤地址列表中时,截获第一网络侧服务器返回的视频描述信息;删除或者修改所述视频描述信息中的广告视频描述信息,将获得的过滤广告播放的视频描述信息发送至终端。When the IP address or URL address is included in the second filtering address list, intercept the video description information returned by the first network side server; delete or modify the advertisement video description information in the video description information, and obtain the filtered advertisement The description information of the played video is sent to the terminal. 2.根据权利要求1所述的方法,其特征在于,还包括:2. The method according to claim 1, further comprising: 接收终端发送的第二HTTP请求报文,所述第二HTTP请求报文包括所述终端通过所述网关请求访问第二网络侧服务器的网络协议IP地址或者统一资源定位器URL地址;以使得所述终端通过所述网关从所述第二网络侧服务器请求下载过滤广告播放的视频播放器。receiving a second HTTP request message sent by the terminal, the second HTTP request message including the network protocol IP address or URL address of the server on the second network side requested by the terminal to access the second network side server through the gateway; so that the The terminal requests from the second network side server to download a video player for filtering advertisements through the gateway. 3.根据权利要求2所述的方法,其特征在于,接收终端发送的第二HTTP请求报文之后,还包括:向所述终端返回重定向报文。3. The method according to claim 2, further comprising: returning a redirection message to the terminal after receiving the second HTTP request message sent by the terminal. 4.根据权利要求1所述的方法,其特征在于,修改所述视频描述信息请求中的广告视频描述信息包括:4. The method according to claim 1, wherein modifying the advertisement video description information in the video description information request comprises: 将所述视频描述信息请求中的广告视频描述信息修改为报体内容为空的响应报文;Modifying the advertisement video description information in the video description information request to a response message whose body content is empty; 或者,将所述视频描述信息请求中的广告视频描述信息修改为播放时长小于阈值的替代视频描述信息。Or, modify the advertisement video description information in the video description information request to substitute video description information whose playback duration is shorter than a threshold. 5.根据权利要求4所述的方法,其特征在于,将所述视频描述信息请求中的广告视频描述信息修改为播放时长小于阈值的替代视频描述信息之前,还包括:向所述终端返回重定向报文。5. The method according to claim 4, characterized in that before modifying the advertisement video description information in the video description information request to substitute video description information whose playback duration is less than a threshold, further comprising: returning a replay to the terminal Directed message. 6.根据权利要求1所述的方法,其特征在于,还包括根据预定规则更新第一过滤地址列表和第二过滤地址列表。6. The method according to claim 1, further comprising updating the first filtering address list and the second filtering address list according to a predetermined rule. 7.一种视频广告过滤的装置,其特征在于,设置于网关,包括:7. A device for filtering video advertisements, characterized in that it is set on a gateway, including: 获取模块,用于获取终端发送的第一超文本传输协议HTTP请求报文,所述第一HTTP请求报文包括所述终端通过所述网关请求访问第一网络侧服务器的网络协议IP地址或者统一资源定位器URL地址;An acquisition module, configured to acquire a first hypertext transfer protocol HTTP request message sent by the terminal, where the first HTTP request message includes the network protocol IP address or unified resource locator URL address; 第一匹配模块,用于根据所述第一HTTP请求报文,确定所述IP地址或者URL地址是否包含在第一过滤地址列表中;A first matching module, configured to determine whether the IP address or the URL address is included in the first filtering address list according to the first HTTP request message; 第一处理模块,用于当所述IP地址或者URL地址包含在第一过滤地址列表中时,向终端发送包含过滤广告播放的视频播放器下载地址的响应报文;The first processing module is used to send to the terminal a response message containing a video player download address for filtering advertisement playback when the IP address or URL address is included in the first filtering address list; 和/或and / or 第二匹配模块,用于根据所述第一HTTP请求报文,确定所述IP地址或者URL地址是否包含在第二过滤地址列表中;A second matching module, configured to determine whether the IP address or the URL address is included in the second filtering address list according to the first HTTP request message; 第二处理模块,用于当所述IP地址或者URL地址包含在第二过滤地址列表中时,截获第一网络侧服务器返回的视频描述信息;删除或者修改所述视频描述信息中的广告视频描述信息,将获得的过滤广告播放的视频描述信息发送至终端。The second processing module is used to intercept the video description information returned by the first network side server when the IP address or URL address is included in the second filtering address list; delete or modify the advertisement video description in the video description information information, and send the acquired video description information for filtered advertisement playback to the terminal. 8.根据权利要求7所述的装置,其特征在于,还包括:通信模块,用于接收终端发送的第二HTTP请求报文,所述第二HTTP请求报文包括所述终端通过所述网关请求访问第二网络侧服务器的网络协议IP地址或者统一资源定位器URL地址;以使得所述终端通过所述网关从所述第二网络侧服务器请求下载过滤广告播放的视频播放器。8. The device according to claim 7, further comprising: a communication module, configured to receive a second HTTP request message sent by the terminal, the second HTTP request message including the terminal passing through the gateway Requesting access to the IP address of the network protocol or the URL address of the uniform resource locator of the second network side server; so that the terminal requests to download the video player for filtering advertisements from the second network side server through the gateway. 9.根据权利要求8所述的装置,其特征在于,所述通信模块,还用于在接收终端发送的第二HTTP请求报文之后,向所述终端返回重定向报文。9. The device according to claim 8, wherein the communication module is further configured to return a redirection message to the terminal after receiving the second HTTP request message sent by the terminal. 10.根据权利要求7所述的装置,其特征在于,第二处理模块包括:第一修改单元或第二修改单元,10. The device according to claim 7, wherein the second processing module comprises: a first modifying unit or a second modifying unit, 所述第一修改单元用于将所述视频描述信息请求中的广告视频描述信息修改为报体内容为空的响应报文;The first modifying unit is configured to modify the advertisement video description information in the video description information request into a response message whose body content is empty; 所述第二修改单元用于将所述视频描述信息请求中的广告视频描述信息修改为播放时长小于阈值的替代视频描述信息。The second modifying unit is configured to modify the advertisement video description information in the video description information request to substitute video description information whose playing time is shorter than a threshold. 11.根据权利要求10所述的装置,其特征在于,所述通信模块还用于在将所述视频描述信息请求中的广告视频描述信息修改为播放时长小于阈值的替代视频描述信息之前,向所述终端返回重定向报文。11. The device according to claim 10, wherein the communication module is further configured to send an advertisement to The terminal returns a redirect message. 12.根据权利要求7所述的装置,其特征在于,还包括更新模块,用于根据预定规则更新第一过滤地址列表和第二过滤地址列表。12. The device according to claim 7, further comprising an updating module, configured to update the first filtering address list and the second filtering address list according to a predetermined rule. 13.一种视频广告过滤的系统,其特征在于,包括:如权利要求7-12任一项所述的网关和第二网络侧服务器,所述第二网络侧服务器,用于提供更新视频广告过滤规则的过滤规则描述文档,以使所述网关更新第一过滤地址列表和第二过滤地址列表。13. A system for filtering video advertisements, comprising: the gateway according to any one of claims 7-12 and a second network-side server, the second network-side server being used to provide updated video advertisements The filtering rule description document of the filtering rule, so that the gateway updates the first filtering address list and the second filtering address list. 14.根据权利要求13所述的系统,其特征在于,所述第二网络侧服务器,还用于获取终端通过所述网关发送的第二HTTP请求报文,所述第二请求报文包括请求访问第二网络侧服务器的IP地址或者URL地址;14. The system according to claim 13, wherein the second network-side server is further configured to obtain a second HTTP request message sent by the terminal through the gateway, the second request message including the request Access the IP address or URL address of the server on the second network side; 向所述网关发送过滤广告播放的视频播放器的描述信息,以使得所述终端通过所述网关从所述第二网络侧服务器请求下载过滤广告播放的视频播放器。Sending the description information of the video player for filtering advertisement playback to the gateway, so that the terminal requests to download the video player for filtering advertisement playback from the second network side server through the gateway.
CN201510079330.9A 2015-02-13 2015-02-13 Method, device and system for filtering video ad Withdrawn CN105992060A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510079330.9A CN105992060A (en) 2015-02-13 2015-02-13 Method, device and system for filtering video ad
PCT/CN2016/072160 WO2016127799A1 (en) 2015-02-13 2016-01-26 Video advertisement filter method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510079330.9A CN105992060A (en) 2015-02-13 2015-02-13 Method, device and system for filtering video ad

Publications (1)

Publication Number Publication Date
CN105992060A true CN105992060A (en) 2016-10-05

Family

ID=56615301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510079330.9A Withdrawn CN105992060A (en) 2015-02-13 2015-02-13 Method, device and system for filtering video ad

Country Status (2)

Country Link
CN (1) CN105992060A (en)
WO (1) WO2016127799A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463926A (en) * 2017-09-11 2017-12-12 广西师范大学 A kind of art examination performance process video obtains and processing method
CN108024124A (en) * 2017-12-15 2018-05-11 中广热点云科技有限公司 A kind of advertisement filter method of video frequency program
CN108055586A (en) * 2017-11-28 2018-05-18 努比亚技术有限公司 Video ads control method, mobile terminal and computer readable storage medium
WO2018145609A1 (en) * 2017-02-07 2018-08-16 广州市动景计算机科技有限公司 Advertisement display control method and device, server, and client
CN109618230A (en) * 2018-12-21 2019-04-12 深圳Tcl数字技术有限公司 Advertisement filtering method, intelligent terminal and computer-readable storage medium
CN110110232A (en) * 2019-04-30 2019-08-09 努比亚技术有限公司 Page promotion link filter method, computer readable storage medium and mobile terminal
CN113242454A (en) * 2021-03-31 2021-08-10 深圳市鹰硕技术有限公司 Virtual view-based account management method, device, system and storage medium
CN113347496A (en) * 2021-06-22 2021-09-03 聚好看科技股份有限公司 Display device and advertisement exception handling method

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109325192B (en) * 2018-10-11 2021-11-23 网宿科技股份有限公司 Advertisement anti-shielding method and device
CN113268690B (en) * 2021-04-15 2023-08-29 微梦创科网络科技(中国)有限公司 A method and system for securely filtering website short video playback information
CN115277060A (en) * 2022-06-13 2022-11-01 新华三信息安全技术有限公司 URL (Uniform resource locator) filtering method based on HTTPS (Hypertext transfer protocol secure) protocol, security equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040255321A1 (en) * 2002-06-20 2004-12-16 Bellsouth Intellectual Property Corporation Content blocking
WO2008056358A2 (en) * 2006-11-10 2008-05-15 Media Layers Ltd Method and computer program product for providing advertisements to a mobile user device
CN103916702A (en) * 2014-03-20 2014-07-09 北京金山网络科技有限公司 Method and terminal for intercepting advertisements
CN104159154A (en) * 2014-07-22 2014-11-19 小米科技有限责任公司 Multimedia playing method, device and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040255321A1 (en) * 2002-06-20 2004-12-16 Bellsouth Intellectual Property Corporation Content blocking
WO2008056358A2 (en) * 2006-11-10 2008-05-15 Media Layers Ltd Method and computer program product for providing advertisements to a mobile user device
CN103916702A (en) * 2014-03-20 2014-07-09 北京金山网络科技有限公司 Method and terminal for intercepting advertisements
CN104159154A (en) * 2014-07-22 2014-11-19 小米科技有限责任公司 Multimedia playing method, device and system

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018145609A1 (en) * 2017-02-07 2018-08-16 广州市动景计算机科技有限公司 Advertisement display control method and device, server, and client
CN107463926A (en) * 2017-09-11 2017-12-12 广西师范大学 A kind of art examination performance process video obtains and processing method
CN107463926B (en) * 2017-09-11 2020-06-12 广西师范大学 A kind of video acquisition and processing method of art examination performance process
CN108055586A (en) * 2017-11-28 2018-05-18 努比亚技术有限公司 Video ads control method, mobile terminal and computer readable storage medium
CN108024124A (en) * 2017-12-15 2018-05-11 中广热点云科技有限公司 A kind of advertisement filter method of video frequency program
CN109618230A (en) * 2018-12-21 2019-04-12 深圳Tcl数字技术有限公司 Advertisement filtering method, intelligent terminal and computer-readable storage medium
CN109618230B (en) * 2018-12-21 2022-03-11 深圳Tcl数字技术有限公司 Advertisement filtering method, intelligent terminal and computer-readable storage medium
CN110110232A (en) * 2019-04-30 2019-08-09 努比亚技术有限公司 Page promotion link filter method, computer readable storage medium and mobile terminal
CN113242454A (en) * 2021-03-31 2021-08-10 深圳市鹰硕技术有限公司 Virtual view-based account management method, device, system and storage medium
CN113242454B (en) * 2021-03-31 2023-05-12 深圳市鹰硕技术有限公司 Account management method, device and system based on virtual view and storage medium
CN113347496A (en) * 2021-06-22 2021-09-03 聚好看科技股份有限公司 Display device and advertisement exception handling method

Also Published As

Publication number Publication date
WO2016127799A1 (en) 2016-08-18

Similar Documents

Publication Publication Date Title
CN105992060A (en) Method, device and system for filtering video ad
US12088651B2 (en) System and method for streaming content from multiple servers
CN104063460B (en) A kind of method and apparatus loading webpage in a browser
US10574771B2 (en) Methods and systems for rewriting scripts to redirect web requests
CN102999636B (en) Method and browser for intercepting and processing pop-up windows in web pages
US20140366117A1 (en) Method and system of managing a captive portal with a router
US20130061127A1 (en) Providing toolbars
RU2630380C2 (en) System and advertising push method (push) based on home gateway
CN103069413A (en) Customizing content displayed for a user based on user preferences of another user
CN103678508A (en) Method and device for opening a webpage
CN102571941B (en) Cloud point-to-point data transmission method and system
WO2012028103A1 (en) Method and system for accessing micro blog, and method and system for sending picture on micro blog website
CN103607454B (en) The method that android system browser arranges privately owned proxy server
CN104618805A (en) Video-on-demand method and video-on-demand equipment
CN102209116A (en) Method and device for acquiring Internet protocol television program information, and television
CN103916489B (en) The many IP of a kind of single domain name domain name analytic method and system
CN103118049B (en) A kind of method and system that file is downloaded by network-caching
CN103793459B (en) A method and device for opening a web page
CN104065678B (en) A kind of dual mode data based on built-in browser is received and access method
JP5898132B2 (en) Advertisement selection device, advertisement processing system, advertisement selection method, and program
CN103795848B (en) A kind of method and apparatus by mobile terminal browsing page
CN102227892B (en) Advertising method, device and system
CN114697317A (en) File access method and system
US10277695B1 (en) Identification of user-intended browsing behavior
CN107070973A (en) A mobile terminal resource loading method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20161005

WW01 Invention patent application withdrawn after publication