WO2015139540A1 - Method and device for parsing video webpage - Google Patents

Method and device for parsing video webpage Download PDF

Info

Publication number
WO2015139540A1
WO2015139540A1 PCT/CN2015/072345 CN2015072345W WO2015139540A1 WO 2015139540 A1 WO2015139540 A1 WO 2015139540A1 CN 2015072345 W CN2015072345 W CN 2015072345W WO 2015139540 A1 WO2015139540 A1 WO 2015139540A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
link
played
webpage
user equipment
Prior art date
Application number
PCT/CN2015/072345
Other languages
French (fr)
Chinese (zh)
Inventor
张宝良
李丁盼
马健
Original Assignee
北京金山网络科技有限公司
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 北京金山网络科技有限公司 filed Critical 北京金山网络科技有限公司
Publication of WO2015139540A1 publication Critical patent/WO2015139540A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/612Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for unicast

Definitions

  • the present application relates to the field of Internet technologies, and in particular, to a method and apparatus for parsing a video webpage.
  • the user equipment when a user views a video program through a video website, the user equipment usually needs to send an access request for the video to be played to the server corresponding to the video website; after receiving the access request, the server obtains the access request according to the access request. Playing the source code of the webpage where the video is located, and sending the source code to the user equipment; after receiving the source code, the user equipment parses the source code, obtains a link of the video to be played, and the like, and after completing the parsing, the corresponding The video corresponding to the link of the video to be played in the player.
  • the user equipment can parse all the video information of the to-be-played video only after receiving the source code of the webpage where the complete video to be played is located.
  • the source code of the webpage where the video to be played is included generally has more network elements, and the user equipment takes a period of time to receive the source code of the webpage where the video to be played is completely. In the case of unstable network, this time is even more If the data is not received, the method of parsing the video webpage in the prior art is time consuming and affects the user experience.
  • the embodiment of the present application discloses a method and a device for parsing a video webpage, so as to quickly parse a video webpage, save user time, and improve user experience.
  • the embodiment of the present application discloses a method for parsing a video webpage, which is applied to an application server.
  • the method includes:
  • the step of determining a link of the to-be-played video in a preset video information base according to a link of a webpage where the to-be-played video is carried in the access request include:
  • the link of the to-be-played video is obtained from the web server, and the correspondence between the link of the webpage where the video to be played is located and the link of the to-be-played video is recorded in the preset video information database. relationship.
  • the step of obtaining a link of the to-be-played video from a web server side includes:
  • the step of obtaining the link of the to-be-played video includes:
  • the access request further carries geographic location information of the user equipment.
  • the step of sending the link of the to-be-played video to the user equipment includes:
  • the embodiment of the present application discloses an apparatus for parsing a video webpage, which is applied to an application server, and the apparatus includes:
  • An access request receiving module configured to receive an access request for a video to be played from the user equipment, where the access request carries a link of a webpage where the video to be played is located;
  • a video link determining module configured to determine, according to a link of a webpage where the to-be-played video is carried in the access request, a link of the to-be-played video in a preset video information library, where the preset a video information library for providing a correspondence between a link of a webpage where the video is located and a link of the video;
  • a video link sending module configured to send a link of the to-be-played video to the user equipment, so that the user equipment obtains the link of the to-be-played video according to the webpage data of the to-be-played video without receiving the webpage data of the to-be-played video The video to be played.
  • the video link determining module includes: a correspondence detecting sub-module, a first video link obtaining sub-module, a video link obtaining sub-module, and a correspondence relationship recording sub-module;
  • the corresponding relationship detecting submodule is configured to detect whether a corresponding relationship between the preset video information library and the to-be-played video exists;
  • the first video link obtaining sub-module is configured to obtain a link of the to-be-played video according to the corresponding relationship of the video to be played when the detection result of the corresponding relationship detecting sub-module is YES;
  • the second video link obtaining sub-module is configured to obtain a link of the to-be-played video from the web server end when the detection result of the corresponding relationship detecting sub-module is no, and trigger the correspondence record sub-module record Corresponding relationship between the link of the webpage where the video to be played is located and the link of the video to be played;
  • the corresponding relationship record sub-module is configured to record, in the preset video information library, a correspondence between a link of a webpage where the to-be-played video is located and a link of the to-be-played video.
  • the second video link obtains a submodule, including:
  • An access request sending unit configured to send the access request information for the to-be-played video to the web server end;
  • a source code receiving unit configured to receive a source code of a webpage where the to-be-played video is sent by the web server;
  • a video link determining unit configured to determine a link of the to-be-played video according to the source code.
  • the first video link obtaining sub-module is specifically configured to obtain one or more links of the to-be-played video according to the link for the video to be played.
  • the access request further carries geographic location information of the user equipment.
  • the video link sending module includes:
  • a distance determining submodule configured to determine, between the respective servers that provide the video to be played, and the geographic location of the user equipment, in a case that the first video link obtaining sub-module obtains a link of multiple to-be-played videos distance;
  • a third video link obtaining sub-module configured to obtain a link of the to-be-played video provided by the server corresponding to the distance that meets the preset condition in the distance determined by the distance determining sub-module;
  • the video link sending submodule is configured to send a link of the obtained video to be played to the user equipment.
  • the embodiment of the present application further discloses a terminal, where the terminal includes:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
  • the embodiment of the present application further discloses an application program for executing a method for parsing a video webpage according to an embodiment of the present application at runtime.
  • the embodiment of the present application further discloses a storage medium for storing an application, and the application is used to execute the method for parsing a video webpage according to the embodiment of the present application.
  • the corresponding application server when the user browses the to-be-played video in the user equipment, the corresponding application server completes the function of parsing the webpage where the video is located, and directly provides the user equipment with a link of the video to be played.
  • the preset relationship between the link of the webpage where the video to be played is located and the link of the video to be played is pre-stored in the preset video information database of the application server, and the application server only sends the link of the video to be played to the user equipment, and the data amount is small. Therefore, the solution provided by the embodiment of the present application can quickly resolve the webpage where the video to be played is located, save user time, and improve user experience.
  • FIG. 1 is a schematic diagram of a signaling flow of a method for parsing a video webpage in the prior art according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a signaling process of a method for parsing a video webpage according to an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of a method for parsing a video webpage according to an embodiment of the present application
  • FIG. 4 is a schematic flowchart diagram of another method for parsing a video webpage according to an embodiment of the present application
  • FIG. 5 is a schematic structural diagram of an apparatus for parsing a video webpage according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of another apparatus for parsing a video webpage according to an embodiment of the present disclosure.
  • the embodiment of the present application provides a method for parsing a video webpage.
  • the method is first introduced in a manner that is compared with the prior art.
  • FIG. 1 is a schematic diagram of a signaling flow of a method for parsing a video webpage in the prior art according to an embodiment of the present disclosure.
  • the user equipment first sends an access request for the video to be played to the web server (S101), and after receiving the access request, the web server obtains the source code of the webpage where the video to be played is obtained according to the access request. (S102), the source code is sent to the user equipment (S103). After receiving the source code sent by the web server, the user equipment parses the source code, and obtains a link of the video to be played according to the parsing result (S104).
  • the web server includes the server corresponding to the webpage where the video to be played is located and the server corresponding to the link of the video to be played.
  • the application server is a server corresponding to an application in the user equipment, for example, a browser, a browser-enabled application, or a corresponding server such as a player.
  • FIG. 2 is a schematic diagram of a signaling process of a method for parsing a video webpage according to an embodiment of the present disclosure.
  • the user equipment first sends a video to the application server for the to-be-played video.
  • the access request information (S201)
  • the application server determines, according to the information carried in the access request, whether there is a corresponding relationship for the to-be-played video in the preset video information database (S202) If it exists, the application server will The link of the to-be-played video in the corresponding relationship of the to-be-played video is sent to the user equipment (S207).
  • the user equipment and the application server do not need to be used. After parsing the source code of the webpage where the video to be played is located, the user equipment can obtain a link of the video to be played, so that the user can quickly enter the video browsing state.
  • the application server may send an access request for the to-be-played video to the webpage server (S203), and the webpage server receives the sending by the application server.
  • the application server completes the to-be-played video.
  • the parsing of the source code of the webpage can reduce the work of the user equipment, and in addition, the application server is to be played.
  • the correspondence between the link and the link of the webpage where the video to be played is located may be stored in a preset video information library. If the user equipment wants to play the to-be-played video, the link of the to-be-played video can be obtained directly from the preset video information library, without further analyzing the source code of the webpage where the video is to be played.
  • the information sent by the application server to the user equipment is a link of the video to be played, so the video advertisement provided by the video website can be filtered out for the user to improve the user experience.
  • FIG. 3 is a schematic flowchart of a method for parsing a video webpage according to an embodiment of the present application, which is applied to an application server, and the method includes:
  • S301 Receive an access request for a video to be played from a user equipment.
  • the access request may be sent by a browser in the user equipment, an application having a browsing function, or a player.
  • the access request carries a link of the webpage where the video to be played is located, and in addition to the link of the webpage where the video to be played is located, the geographical location information of the user equipment may be carried.
  • the geographical location information of the user equipment can be determined by any of the following methods:
  • the foregoing is only a plurality of manners of obtaining the geographical location information of the user equipment, and the present application does not limit the specific implementation manner of obtaining the geographical location information of the user equipment.
  • S302 Determine, according to the link of the webpage where the to-be-played video is carried in the access request, a link of the to-be-played video in a preset video information database.
  • the preset video information library is used to provide a correspondence between a link of a webpage where the video is located and a link of the video.
  • a specific implementation manner of determining a link of a video to be played is provided.
  • the preset video information base is provided.
  • the specific implementation manner of the step (S302) of determining the link of the video to be played includes:
  • S302A Detect whether there is a corresponding relationship for the to-be-played video in the preset video information database. If yes, execute S302B. Otherwise, execute S302C.
  • the corresponding correspondence between the preset video information bases may be searched for whether there is a link of the webpage where the video to be played exists, and if so, Indicates that there is a link to the video to be played in the preset video information library.
  • S302B Obtain a link of the to-be-played video according to the corresponding relationship of the video to be played.
  • the corresponding relationship between the link of the webpage where the video is located and the link of the video is represented by the corresponding relationship in the preset video information library. Therefore, the S302A detects that the preset video information library has a video for the to-be-played video. After the correspondence, the link of the video to be played can be obtained from the corresponding relationship.
  • the line storage that is, the same video to be played may correspond to a plurality of links of the to-be-played video. Therefore, there may be multiple corresponding relationships for the to-be-played video in the preset video information library. In this case, the to-be-played game can be obtained.
  • a link to one or more videos to be played corresponding to the link of the web page where the video is located.
  • S302C Obtain a link of the to-be-played video from a web server.
  • the application server may first send the access request information for the to-be-played video to the web server corresponding to the webpage where the video to be played; the web server receives the access request sent by the application server.
  • the access request the source code of the webpage where the video to be played is obtained is obtained, and the source code is sent to the application server; after receiving the source code, the application server parses the source code, and obtains a link of the to-be-played video according to the parsing result.
  • S302D Record, in the preset video information library, a correspondence between a link of a webpage where the video to be played is located and a link of the to-be-played video.
  • the S302B can be directly executed, thereby saving the analysis.
  • the existing mapping relationship recorded in the preset video information database is abnormal due to the change of the link of the video. Therefore, in the actual application, when the application server generates the corresponding relationship, a timestamp can be generated for each corresponding relationship. According to the timestamp, the validity of the corresponding relationship is periodically verified. If the corresponding relationship is abnormal during the verification process, the corresponding data is updated to ensure normal use of the user. In addition, if the corresponding relationship is abnormal during the use of the user, the error message may be reported to the application server, and the application server may update the corresponding data in the corresponding relationship according to the reported error information.
  • S303 Send a link of the to-be-played video to the user equipment, so that the user equipment acquires the to-be-played video according to the link of the to-be-played video without receiving the webpage data of the to-be-played video.
  • the distance between each server that provides the video to be played and the geographic location of the user equipment may be determined first. And obtaining a link of the to-be-played video provided by the server corresponding to the distance that meets the preset condition in the determined distance, and finally sending the link of the obtained video to be played to the user equipment.
  • the preset condition may be less than a preset threshold, such as less than 100. Kilometers, etc., can also be the first few from the nearest and so on.
  • the user equipment After receiving the link of the to-be-played video sent by the application server, the user equipment obtains the video data from the corresponding server according to the link, and starts playing the video, where the server corresponding to the link of the to-be-played video and the webpage where the video to be played is located
  • the servers corresponding to the links may or may not be the same.
  • the server corresponding to the link of the webpage where the A video is located is X
  • the server corresponding to the link of the A video is Y
  • the application server corresponding to the user equipment is Z
  • the user equipment receives the sending by the application server Z.
  • the video data is obtained from the server Y for playing, wherein the server X and the server Y may be one server or not.
  • the player in the user equipment can directly receive the link of the video to be played, and obtain the video data according to the link and play it; the user equipment wants to be in the browser or has the browser function.
  • the browser or the browser-enabled application can directly receive the link of the video to be played.
  • the preset player needs to be loaded first, and then played in the preset player. The video corresponding to the link of the video to be played.
  • the corresponding application server when the user equipment browses the to-be-played video, the corresponding application server completes the function of parsing the webpage where the video is located, and directly provides the user equipment with a link of the video to be played.
  • the preset relationship between the link of the webpage where the video to be played is located and the link of the video to be played is pre-stored in the preset video information database of the application server, and the application server only sends the link of the video to be played to the user equipment, and the data amount is small. Therefore, the solution provided by the embodiment of the present application can quickly resolve the webpage where the video to be played is located, save user time, and improve user experience.
  • FIG. 5 is a schematic structural diagram of an apparatus for parsing a video webpage according to an embodiment of the present application, which is applied to an application server.
  • the device includes an access request receiving module 501, a video link determining module 502, and a video link sending module 503.
  • the access request receiving module 501 is configured to receive an access request for the to-be-played video from the user equipment, where the access request carries a link of the webpage where the video to be played is located;
  • a video link determining module 502 configured to determine, according to a link of a webpage where the to-be-played video is carried in the access request, a link of the to-be-played video in a preset video information library, where The preset video information library is configured to provide a correspondence between a link of a webpage where the video is located and a link of the video;
  • a video link sending module 503 configured to send a link of the to-be-played video to the user equipment, so that the user equipment does not receive the link of the to-be-played video without receiving the webpage data of the to-be-played video. Obtain the video to be played.
  • FIG. 6 is a schematic structural diagram of another apparatus for parsing a video webpage according to an embodiment of the present application.
  • the video link determining module 502 may include: a correspondence detecting submodule 5021, a first video link obtaining submodule 5022, a video link obtaining submodule 5023, and a correspondence relationship recording submodule 5024.
  • the corresponding relationship detecting sub-module 5021 is configured to detect whether a corresponding relationship between the preset video information library and the to-be-played video exists;
  • the first video link obtaining sub-module 5022 is configured to obtain a link of the to-be-played video according to the corresponding relationship of the video to be played when the detection result of the corresponding relationship detecting sub-module 5021 is YES;
  • the second video link obtaining sub-module 5023 is configured to obtain a link of the to-be-played video from the web server end when the detection result of the corresponding relationship detecting sub-module 5021 is negative, and trigger the correspondence record sub-module 5024 Recording a correspondence between a link of the webpage where the video to be played is located and a link of the video to be played;
  • the correspondence record sub-module 5024 is configured to record, in the preset video information library, a correspondence between a link of the webpage where the video to be played is located and a link of the to-be-played video.
  • the second video link obtaining submodule 5023 may include: an access request sending unit, a source code receiving unit, and a video link determining unit (not shown in the figure).
  • the access request sending unit is configured to send the access request information for the to-be-played video to the web server
  • the source code receiving unit is configured to receive the source code of the webpage where the to-be-played video is sent by the web server
  • a link determining unit configured to determine a link of the to-be-played video according to the source code.
  • the first video link obtaining sub-module 5022 is specifically configured to obtain one or more links of the to-be-played video according to the corresponding relationship for the to-be-played video.
  • the access request further carries geographic location information of the user equipment.
  • the video link sending module 503 may include: a distance determining submodule, a third video link obtaining submodule, and a video link sending submodule (not shown).
  • the distance determining sub-module is configured to determine, when the first video link obtaining sub-module 5022 obtains a link of multiple to-be-played videos, the geographic location of each server that provides the to-be-played video and the user equipment. the distance between;
  • a third video link obtaining sub-module configured to obtain a link of the to-be-played video provided by the server corresponding to the distance that meets the preset condition in the distance determined by the distance determining sub-module;
  • the video link sending submodule is configured to send a link of the obtained video to be played to the user equipment.
  • the corresponding application server when the user equipment browses the to-be-played video, the corresponding application server completes the function of parsing the webpage where the video is located, and directly provides the user equipment with a link of the video to be played.
  • the preset relationship between the link of the webpage where the video to be played is located and the link of the video to be played is pre-stored in the preset video information database of the application server, and the application server only sends the link of the video to be played to the user equipment, and the data amount is small. Therefore, the solution provided by the embodiment of the present application can quickly resolve the webpage where the video to be played is located, save user time, and improve user experience.
  • the embodiment of the present application provides a terminal, where the terminal includes:
  • processor a memory, a communication interface, and a bus
  • the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
  • the memory stores executable program code
  • the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
  • the preset video information database Determining, in the preset video information database, a link of the to-be-played video according to the link of the webpage of the to-be-played video that is carried in the access request, where the preset video information database is a correspondence between a link for providing a web page where the video is located and a link for the video;
  • the embodiment of the present application provides an application program for executing a method for parsing a video webpage provided by an embodiment of the present application at runtime.
  • the method for parsing a video webpage includes:
  • the embodiment of the present application provides a storage medium for storing an application, which is used to execute a method for parsing a video webpage provided by an embodiment of the present application.
  • the method for parsing a video webpage includes:
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

Disclosed in an embodiment of the present application are a method and device for parsing a video webpage, being applied to an application server side; the method comprises: receiving from a user equipment an access request for a video to be played, the access request carrying the link of the webpage of the video to be played; according to the webpage link carried in the access request, determining in a preset video information base the link of the video to be played, the preset video information base being used to provide a correspondence between the link of the video and the link of the webpage of the video; and sending to the user equipment the link of the video to be played, so that the user equipment obtains the video to be played according to the link of the video to be played without receiving the webpage data of the video to be played. The solution in the embodiment of the present application can quickly parse the webpage of a video to be played, save time for the user and improve user experience.

Description

一种用于解析视频网页的方法及装置Method and device for parsing video webpage
本申请要求于2014年03月21日提交中国专利局、申请号为201410109149.3发明名称为“一种用于解析视频网页的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201410109149.3, entitled "A Method and Apparatus for Resolving Video Web Pages", filed on March 21, 2014, the entire contents of which are incorporated herein by reference. In this application.
技术领域Technical field
本申请涉及互联网技术领域,特别涉及一种用于解析视频网页的方法及装置。The present application relates to the field of Internet technologies, and in particular, to a method and apparatus for parsing a video webpage.
背景技术Background technique
随着视频网站的快速发展,越来越多用户选择通过视频网站在线观看视频节目。With the rapid development of video websites, more and more users choose to watch video programs online through video websites.
现有技术中,用户通过视频网站观看视频节目时,用户设备通常需先向视频网站对应的服务器端发送针对待播放视频的访问请求;服务器端接收到该访问请求后,根据该访问请求获得待播放视频所在网页的源代码,并将源代码发送给用户设备;用户设备接收到上述的源代码后,对源代码进行解析,从中获得待播放视频的链接等信息,完成解析后,在相应的播放器中播放待播放视频的链接对应的视频。In the prior art, when a user views a video program through a video website, the user equipment usually needs to send an access request for the video to be played to the server corresponding to the video website; after receiving the access request, the server obtains the access request according to the access request. Playing the source code of the webpage where the video is located, and sending the source code to the user equipment; after receiving the source code, the user equipment parses the source code, obtains a link of the video to be played, and the like, and after completing the parsing, the corresponding The video corresponding to the link of the video to be played in the player.
实际应用中,用户设备只有在接收到完整的待播放视频所在网页的源代码后才能解析出全部待播放视频的视频信息。而待播放视频所在网页的源代码中所包含的网络元素一般较多,用户设备需要一段时间才能接收到完整的待播放视频所在网页的源代码,在网络不稳定的情况下,这一时间更长,甚至会出现接收数据失败的情况,由此可见,现有技术中解析视频网页的方法比较耗时,影响用户的体验。In actual applications, the user equipment can parse all the video information of the to-be-played video only after receiving the source code of the webpage where the complete video to be played is located. The source code of the webpage where the video to be played is included generally has more network elements, and the user equipment takes a period of time to receive the source code of the webpage where the video to be played is completely. In the case of unstable network, this time is even more If the data is not received, the method of parsing the video webpage in the prior art is time consuming and affects the user experience.
发明内容Summary of the invention
本申请实施例公开了一种用于解析视频网页的方法及装置,以快速解析视频网页、节省用户时间、提高用户体验。The embodiment of the present application discloses a method and a device for parsing a video webpage, so as to quickly parse a video webpage, save user time, and improve user experience.
为达到上述目的,本申请实施例公开了一种用于解析视频网页的方法,应用于应用服务器端,所述方法包括:To achieve the above objective, the embodiment of the present application discloses a method for parsing a video webpage, which is applied to an application server. The method includes:
接收来自用户设备的针对待播放视频的访问请求,其中,所述访问请求 中,携带所述待播放视频所在网页的链接;Receiving an access request from a user equipment for a video to be played, wherein the access request a link carrying the web page where the video to be played is located;
根据所述访问请求中携带的所述待播放视频所在网页的链接,在预设的视频信息库中,确定所述待播放视频的链接,其中,所述预设的视频信息库,用于提供视频所在网页的链接与该视频的链接之间的对应关系;Determining, in the preset video information database, a link of the to-be-played video according to the link of the webpage of the to-be-played video that is carried in the access request, where the preset video information library is used to provide The correspondence between the link of the webpage where the video is located and the link of the video;
向所述用户设备发送所述待播放视频的链接,以便所述用户设备在不接收所述待播放视频所在网页数据的情况下,根据所述待播放视频的链接获取所述待播放视频。Sending, to the user equipment, the link of the to-be-played video, so that the user equipment acquires the to-be-played video according to the link of the to-be-played video without receiving the webpage data of the to-be-played video.
在本申请的一个具体实施例中,所述根据所述访问请求中携带的所述待播放视频所在网页的链接,在预设的视频信息库中,确定所述待播放视频的链接的步骤,包括:In a specific embodiment of the present application, the step of determining a link of the to-be-played video in a preset video information base according to a link of a webpage where the to-be-played video is carried in the access request, include:
检测预设的视频信息库中是否存在针对所述待播放视频的对应关系;Detecting, in the preset video information library, whether there is a corresponding relationship for the to-be-played video;
若存在,根据所述针对待播放视频的对应关系,获得所述待播放视频的链接;If yes, obtaining a link of the to-be-played video according to the corresponding relationship of the video to be played;
若不存在,从网页服务器端获得所述待播放视频的链接,并在所述预设的视频信息库中记录所述待播放视频所在网页的链接与所述待播放视频的链接之间的对应关系。If not, the link of the to-be-played video is obtained from the web server, and the correspondence between the link of the webpage where the video to be played is located and the link of the to-be-played video is recorded in the preset video information database. relationship.
在本申请的一个具体实施例中,所述从网页服务器端获得所述待播放视频的链接的步骤,包括:In a specific embodiment of the present application, the step of obtaining a link of the to-be-played video from a web server side includes:
向网页服务器端发送所述针对待播放视频的访问请求信息;Sending the access request information for the video to be played to the web server side;
接收网页服务器端发送的所述待播放视频所在网页的源代码;Receiving, by the web server, a source code of a webpage where the to-be-played video is sent;
根据所述源代码,确定所述待播放视频的链接。Determining a link of the to-be-played video according to the source code.
在本申请的一个具体实施例中,所述获得所述待播放视频的链接的步骤,包括:In a specific embodiment of the present application, the step of obtaining the link of the to-be-played video includes:
获得一个或多个所述待播放视频的链接。Get one or more links to the video to be played.
在本申请的一个具体实施例中,所述访问请求中,还携带用户设备的地理位置信息。In a specific embodiment of the present application, the access request further carries geographic location information of the user equipment.
在本申请的一个具体实施例中,在获得多个待播放视频的链接的情况下,所述向所述用户设备发送所述待播放视频的链接的步骤,包括:In a specific embodiment of the present application, in the case that a link of a plurality of to-be-played videos is obtained, the step of sending the link of the to-be-played video to the user equipment includes:
确定提供所述待播放视频的各个服务器与所述用户设备的地理位置之间 的距离;Determining between the respective servers providing the video to be played and the geographic location of the user equipment the distance;
获得所确定的距离中满足预设条件的距离对应的服务器提供的待播放视频的链接,并向所述用户设备发送所获得待播放视频的链接。Obtaining a link of the to-be-played video provided by the server corresponding to the distance that meets the preset condition in the determined distance, and transmitting a link of the obtained video to be played to the user equipment.
为达到上述目的,本申请实施例公开了一种用于解析视频网页的装置,应用于应用服务器端,所述装置包括:To achieve the above objective, the embodiment of the present application discloses an apparatus for parsing a video webpage, which is applied to an application server, and the apparatus includes:
访问请求接收模块,用于接收来自用户设备的针对待播放视频的访问请求,其中,所述访问请求中,携带所述待播放视频所在网页的链接;An access request receiving module, configured to receive an access request for a video to be played from the user equipment, where the access request carries a link of a webpage where the video to be played is located;
视频链接确定模块,用于根据所述访问请求中携带的所述待播放视频所在网页的链接,在预设的视频信息库中,确定所述待播放视频的链接,其中,所述预设的视频信息库,用于提供视频所在网页的链接与该视频的链接之间的对应关系;a video link determining module, configured to determine, according to a link of a webpage where the to-be-played video is carried in the access request, a link of the to-be-played video in a preset video information library, where the preset a video information library for providing a correspondence between a link of a webpage where the video is located and a link of the video;
视频链接发送模块,用于向所述用户设备发送所述待播放视频的链接,以便所述用户设备在不接收所述待播放视频所在网页数据的情况下,根据所述待播放视频的链接获取所述待播放视频。a video link sending module, configured to send a link of the to-be-played video to the user equipment, so that the user equipment obtains the link of the to-be-played video according to the webpage data of the to-be-played video without receiving the webpage data of the to-be-played video The video to be played.
在本申请的一个具体实施例中,所述视频链接确定模块,包括:对应关系检测子模块、第一视频链接获得子模块、视频链接获得子模块和对应关系记录子模块;In a specific embodiment of the present application, the video link determining module includes: a correspondence detecting sub-module, a first video link obtaining sub-module, a video link obtaining sub-module, and a correspondence relationship recording sub-module;
所述对应关系检测子模块,用于检测预设的视频信息库中是否存在针对所述待播放视频的对应关系;The corresponding relationship detecting submodule is configured to detect whether a corresponding relationship between the preset video information library and the to-be-played video exists;
所述第一视频链接获得子模块,用于在所述对应关系检测子模块的检测结果为是时,根据所述针对待播放视频的对应关系,获得所述待播放视频的链接;The first video link obtaining sub-module is configured to obtain a link of the to-be-played video according to the corresponding relationship of the video to be played when the detection result of the corresponding relationship detecting sub-module is YES;
所述第二视频链接获得子模块,用于在所述对应关系检测子模块的检测结果为否时,从网页服务器端获得所述待播放视频的链接,并触发所述对应关系记录子模块记录所述待播放视频所在网页的链接与所述待播放视频的链接之间的对应关系;The second video link obtaining sub-module is configured to obtain a link of the to-be-played video from the web server end when the detection result of the corresponding relationship detecting sub-module is no, and trigger the correspondence record sub-module record Corresponding relationship between the link of the webpage where the video to be played is located and the link of the video to be played;
所述对应关系记录子模块,用于在所述预设的视频信息库中记录所述待播放视频所在网页的链接与所述待播放视频的链接之间的对应关系。The corresponding relationship record sub-module is configured to record, in the preset video information library, a correspondence between a link of a webpage where the to-be-played video is located and a link of the to-be-played video.
在本申请的一个具体实施例中,所述第二视频链接获得子模块,包括: In a specific embodiment of the present application, the second video link obtains a submodule, including:
访问请求发送单元,用于向网页服务器端发送所述针对待播放视频的访问请求信息;An access request sending unit, configured to send the access request information for the to-be-played video to the web server end;
源代码接收单元,用于接收网页服务器端发送的所述待播放视频所在网页的源代码;a source code receiving unit, configured to receive a source code of a webpage where the to-be-played video is sent by the web server;
视频链接确定单元,用于根据所述源代码,确定所述待播放视频的链接。a video link determining unit, configured to determine a link of the to-be-played video according to the source code.
在本申请的一个具体实施例中,所述第一视频链接获得子模块,具体用于根据所述针对待播放视频的链接,获得一个或多个所述待播放视频的链接。In a specific embodiment of the present application, the first video link obtaining sub-module is specifically configured to obtain one or more links of the to-be-played video according to the link for the video to be played.
在本申请的一个具体实施例中,所述访问请求中,还携带用户设备的地理位置信息。In a specific embodiment of the present application, the access request further carries geographic location information of the user equipment.
在本申请的一个具体实施例中,所述视频链接发送模块,包括:In a specific embodiment of the present application, the video link sending module includes:
距离确定子模块,用于在所述第一视频链接获得子模块获得多个待播放视频的链接的情况下,确定提供所述待播放视频的各个服务器与所述用户设备的地理位置之间的距离;a distance determining submodule, configured to determine, between the respective servers that provide the video to be played, and the geographic location of the user equipment, in a case that the first video link obtaining sub-module obtains a link of multiple to-be-played videos distance;
第三视频链接获得子模块,用于获得所述距离确定子模块确定的距离中满足预设条件的距离对应的服务器提供的待播放视频的链接;a third video link obtaining sub-module, configured to obtain a link of the to-be-played video provided by the server corresponding to the distance that meets the preset condition in the distance determined by the distance determining sub-module;
视频链接发送子模块,用于向所述用户设备发送所获得待播放视频的链接。The video link sending submodule is configured to send a link of the obtained video to be played to the user equipment.
为达到上述目的,本申请实施例还公开了一种终端,所述终端包括:In order to achieve the above objective, the embodiment of the present application further discloses a terminal, where the terminal includes:
处理器、存储器、通信接口和总线;a processor, a memory, a communication interface, and a bus;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;The processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
所述存储器存储可执行程序代码;The memory stores executable program code;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:The processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
接收来自用户设备的针对待播放视频的访问请求,其中,所述访问请求中,携带所述待播放视频所在网页的链接;Receiving an access request for the to-be-played video from the user equipment, where the access request carries a link of the webpage where the video to be played is located;
根据所述访问请求中携带的所述待播放视频所在网页的链接,在预设的视频信息库中,确定所述待播放视频的链接,其中,所述预设的视频信息库,用于提供视频所在网页的链接与该视频的链接之间的对应关系; Determining, in the preset video information database, a link of the to-be-played video according to the link of the webpage of the to-be-played video that is carried in the access request, where the preset video information library is used to provide The correspondence between the link of the webpage where the video is located and the link of the video;
向所述用户设备发送所述待播放视频的链接,以便所述用户设备在不接收所述待播放视频所在网页数据的情况下,根据所述待播放视频的链接获取所述待播放视频。Sending, to the user equipment, the link of the to-be-played video, so that the user equipment acquires the to-be-played video according to the link of the to-be-played video without receiving the webpage data of the to-be-played video.
本申请实施例还公开了一种应用程序,该应用程序用于在运行时执行本申请实施例所述的用于解析视频网页的方法。The embodiment of the present application further discloses an application program for executing a method for parsing a video webpage according to an embodiment of the present application at runtime.
本申请实施例还公开了一种存储介质,用于存储应用程序,所述应用程序用于执行本申请实施例所述的用于解析视频网页的方法。The embodiment of the present application further discloses a storage medium for storing an application, and the application is used to execute the method for parsing a video webpage according to the embodiment of the present application.
由以上可见,本申请实施例提供的方案中,用户在用户设备中浏览待播放视频时,由相应的应用服务器完成解析视频所在网页的功能,直接为用户设备提供待播放视频的链接。由于应用服务器的预设视频信息库中,预先存储了待播放视频所在网页的链接与待播放视频的链接之间的对应关系,且应用服务器向用户设备只发送待播放视频的链接,数据量小,所以,应用本申请实施例提供的方案可以快速解析待播放视频所在网页、节省用户时间、提高用户体验。It can be seen from the above that, in the solution provided by the embodiment of the present application, when the user browses the to-be-played video in the user equipment, the corresponding application server completes the function of parsing the webpage where the video is located, and directly provides the user equipment with a link of the video to be played. The preset relationship between the link of the webpage where the video to be played is located and the link of the video to be played is pre-stored in the preset video information database of the application server, and the application server only sends the link of the video to be played to the user equipment, and the data amount is small. Therefore, the solution provided by the embodiment of the present application can quickly resolve the webpage where the video to be played is located, save user time, and improve user experience.
附图说明DRAWINGS
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application and the technical solutions of the prior art, the following description of the embodiments and the drawings used in the prior art will be briefly introduced. Obviously, the drawings in the following description are only Some embodiments of the application may also be used to obtain other figures from those of ordinary skill in the art without departing from the scope of the invention.
图1为本申请实施例提供的现有技术中用于解析视频网页的方法的信令流程示意图;FIG. 1 is a schematic diagram of a signaling flow of a method for parsing a video webpage in the prior art according to an embodiment of the present disclosure;
图2为本申请实施例提供的一种用于解析视频网页的方法的信令流程示意图;2 is a schematic diagram of a signaling process of a method for parsing a video webpage according to an embodiment of the present disclosure;
图3为本申请实施例提供的一种用于解析视频网页的方法的流程示意图;FIG. 3 is a schematic flowchart of a method for parsing a video webpage according to an embodiment of the present application;
图4为本申请实施例提供的另一种用于解析视频网页的方法的流程示意图;FIG. 4 is a schematic flowchart diagram of another method for parsing a video webpage according to an embodiment of the present application;
图5为本申请实施例提供的一种用于解析视频网页的装置的结构示意图;FIG. 5 is a schematic structural diagram of an apparatus for parsing a video webpage according to an embodiment of the present disclosure;
图6为本申请实施例提供的另一种用于解析视频网页的装置的结构示意图。 FIG. 6 is a schematic structural diagram of another apparatus for parsing a video webpage according to an embodiment of the present disclosure.
具体实施方式detailed description
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings. It is apparent that the described embodiments are only a part of the embodiments of the present application, and not all of them. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
本申请实施例提供了一种用于解析视频网页的方法,下面先以与现有技术对比的方式,对该方法进行介绍。The embodiment of the present application provides a method for parsing a video webpage. The method is first introduced in a manner that is compared with the prior art.
现有技术中,用户设备欲播放某一待播放视频时,需先解析待播放视频所在网页的源代码,获得待播放视频的链接,再根据该链接获得视频数据,进行播放。具体的,参见图1,图1为本申请实施例提供的现有技术中用于解析视频网页的方法的信令流程示意图。应用该方法解析视频网页时,用户设备先向网页服务器发送针对待播放视频的访问请求(S101),网页服务器在接收到该访问请求后,根据该访问请求,获得待播放视频所在网页的源代码(S102),并将该源代码发送给用户设备(S103),用户设备接收到网页服务器发送的源代码后,对该源代码进行解析,并根据解析结果获得待播放视频的链接(S104)。In the prior art, when the user equipment wants to play a certain video to be played, it needs to first parse the source code of the webpage where the video is to be played, obtain a link of the video to be played, and then obtain the video data according to the link for playing. Specifically, referring to FIG. 1 , FIG. 1 is a schematic diagram of a signaling flow of a method for parsing a video webpage in the prior art according to an embodiment of the present disclosure. When the video webpage is parsed by the method, the user equipment first sends an access request for the video to be played to the web server (S101), and after receiving the access request, the web server obtains the source code of the webpage where the video to be played is obtained according to the access request. (S102), the source code is sent to the user equipment (S103). After receiving the source code sent by the web server, the user equipment parses the source code, and obtains a link of the video to be played according to the parsing result (S104).
上述的网页服务器,包括:待播放视频所在网页对应的服务器和待播放视频的链接对应的服务器。The web server includes the server corresponding to the webpage where the video to be played is located and the server corresponding to the link of the video to be played.
由以上描述可知,现有技术中用于解析视频网页的方法,只涉及了用户设备与网页服务器之间的通信,而本申请实施例提供的用于解析视频网页的方法则不同,其涉及到用户设备、应用服务器和网页服务器三者之间的通信。其中,应用服务器为用户设备中的应用对应的服务器,例如浏览器、具有浏览器功能的应用或播放器等对应的服务器。It can be seen from the above description that the method for parsing a video webpage in the prior art only involves the communication between the user equipment and the webpage server, and the method for parsing the video webpage provided by the embodiment of the present application is different, which relates to Communication between the user device, the application server, and the web server. The application server is a server corresponding to an application in the user equipment, for example, a browser, a browser-enabled application, or a corresponding server such as a player.
具体的,参见图2,图2为本申请实施例提供的一种用于解析视频网页的方法的信令流程示意图,应用该方法解析视频网页时,用户设备先向应用服务器发送针对待播放视频的访问请求信息(S201),应用服务器在接收到用户设备发送的访问请求后,根据该访问请求中携带的信息,确定预设的视频信息库中是否存在针对待播放视频的对应关系(S202),若存在,应用服务器将 针对该待播放视频的对应关系中的待播放视频的链接发送给用户设备(S207),由上述过程可见,预设的视频信息库中存在待播放视频的链接时,用户设备和应用服务器均无需解析待播放视频所在网页的源代码,用户设备即可获得待播放视频的链接,这样用户可以快速进入视频浏览状态。Specifically, referring to FIG. 2, FIG. 2 is a schematic diagram of a signaling process of a method for parsing a video webpage according to an embodiment of the present disclosure. When the method is used to parse a video webpage, the user equipment first sends a video to the application server for the to-be-played video. The access request information (S201), after receiving the access request sent by the user equipment, the application server determines, according to the information carried in the access request, whether there is a corresponding relationship for the to-be-played video in the preset video information database (S202) If it exists, the application server will The link of the to-be-played video in the corresponding relationship of the to-be-played video is sent to the user equipment (S207). It can be seen from the above process that when there is a link of the video to be played in the preset video information database, the user equipment and the application server do not need to be used. After parsing the source code of the webpage where the video to be played is located, the user equipment can obtain a link of the video to be played, so that the user can quickly enter the video browsing state.
另外,在S202确定预设的视频信息库中不存在针对待播放视频的对应关系时,应用服务器可向网页服务器发送针对待播放视频的访问请求(S203),网页服务器在接收到应用服务器发送的访问请求后,根据该访问请求获得待播放视频所在网页的源代码(S204),并将该源代码发送给应用服务器(S205),应用服务器接收到该源代码后,解析该源代码,根据解析结果获得待播放视频的链接,并在预设的视频信息库中存储针对待播放视频的对应关系,即待播放视频的链接与待播放视频所在网页的链接之间的对应关系(S206),再将该对应关系中的待播放视频的链接发送给用户设备(S207),由以上过程可见,当预设的视频信息库中不存在针对待播放视频的对应关系时,由应用服务器完成待播放视频所在网页源代码的解析,可减少用户设备的工作,此外,应用服务器得到待播放视频的链接后,可在预设的视频信息库中存储该链接与待播放视频所在网页的链接之间的对应关系,因此。若再有用户设备欲播放该待播放视频时,则可直接从预设的视频信息库中获得该待播放视频的链接,而无需再进行对待播放视频所在网页的源代码的解析。In addition, when it is determined in S202 that there is no corresponding relationship for the to-be-played video in the preset video information library, the application server may send an access request for the to-be-played video to the webpage server (S203), and the webpage server receives the sending by the application server. After accessing the request, obtaining the source code of the webpage where the video to be played is located according to the access request (S204), and transmitting the source code to the application server (S205), after the application server receives the source code, parsing the source code, according to the parsing As a result, a link of the to-be-played video is obtained, and the corresponding relationship between the to-be-played video, that is, the correspondence between the link of the to-be-played video and the link of the webpage where the video to be played is located is stored in the preset video information library (S206), and then The link of the to-be-played video in the corresponding relationship is sent to the user equipment (S207). It can be seen from the above process that when there is no corresponding relationship for the to-be-played video in the preset video information database, the application server completes the to-be-played video. The parsing of the source code of the webpage can reduce the work of the user equipment, and in addition, the application server is to be played. After the link of the video, the correspondence between the link and the link of the webpage where the video to be played is located may be stored in a preset video information library. If the user equipment wants to play the to-be-played video, the link of the to-be-played video can be obtained directly from the preset video information library, without further analyzing the source code of the webpage where the video is to be played.
应用上述方法进行视频网页解析时,由于应用服务器向用户设备发送的信息为待播放视频的链接,所以可为用户过滤掉视频网站提供的视频广告,提高用户的体验。When the video webpage parsing is performed by using the above method, the information sent by the application server to the user equipment is a link of the video to be played, so the video advertisement provided by the video website can be filtered out for the user to improve the user experience.
下面再从应用服务器的角度对本申请进行详细介绍。The application will be described in detail below from the perspective of an application server.
图3为本申请实施例提供的一种用于解析视频网页的方法的流程示意图,应用于应用服务器端,该方法包括:FIG. 3 is a schematic flowchart of a method for parsing a video webpage according to an embodiment of the present application, which is applied to an application server, and the method includes:
S301:接收来自用户设备的针对待播放视频的访问请求。S301: Receive an access request for a video to be played from a user equipment.
其中,访问请求可以是用户设备中的浏览器、具有浏览功能的应用或者播放器发送的。The access request may be sent by a browser in the user equipment, an application having a browsing function, or a player.
访问请求中携带待播放视频所在网页的链接,除了待播放视频所在网页的链接外,还可以携带用户设备的地理位置信息等等。 The access request carries a link of the webpage where the video to be played is located, and in addition to the link of the webpage where the video to be played is located, the geographical location information of the user equipment may be carried.
用户设备的地理位置信息,可以通过以下几种方式中的任意一种确定:The geographical location information of the user equipment can be determined by any of the following methods:
通过用户设备中的卫星定位装置确定;Determined by a satellite positioning device in the user equipment;
根据用户设备接入网络的IP地址确定;Determine according to the IP address of the user equipment accessing the network;
根据用户设备接入网络的无线接入点的位置信息确定;Determining according to location information of the wireless access point where the user equipment accesses the network;
根据用户设备接收的移动通信网络信号确定。Determined based on the mobile communication network signal received by the user equipment.
当然,上述只是获得用户设备的地理位置信息的多种方式中的几种,本申请并不对获得用户设备的地理位置信息的具体实现方式进行限定。Certainly, the foregoing is only a plurality of manners of obtaining the geographical location information of the user equipment, and the present application does not limit the specific implementation manner of obtaining the geographical location information of the user equipment.
S302:根据所述访问请求中携带的所述待播放视频所在网页的链接,在预设的视频信息库中,确定所述待播放视频的链接。S302: Determine, according to the link of the webpage where the to-be-played video is carried in the access request, a link of the to-be-played video in a preset video information database.
其中,预设的视频信息库,用于提供视频所在网页的链接与该视频的链接之间的对应关系。The preset video information library is used to provide a correspondence between a link of a webpage where the video is located and a link of the video.
在本申请的一个具体实施例中,提供了一种确定待播放视频的链接的具体实现方式,具体的,参见图4,本实施例中提供的,根据访问请求,在预设的视频信息库中,确定待播放视频的链接的步骤(S302)的具体实现方式包括:In a specific embodiment of the present application, a specific implementation manner of determining a link of a video to be played is provided. Specifically, referring to FIG. 4, in the embodiment, according to the access request, the preset video information base is provided. The specific implementation manner of the step (S302) of determining the link of the video to be played includes:
S302A:检测预设的视频信息库中是否存在针对所述待播放视频的对应关系,若存在,执行S302B,否则,执行S302C。S302A: Detect whether there is a corresponding relationship for the to-be-played video in the preset video information database. If yes, execute S302B. Otherwise, execute S302C.
在检测预设的视频信息库中是否存在针对待播放视频的对应关系时,可以先在预设的视频信息库的各个对应关系中搜索是否存在待播放视频的所在网页的链接,若存在,则说明预设的视频信息库中存在针对待播放视频的链接。When detecting the corresponding relationship of the to-be-played video in the preset video information database, the corresponding correspondence between the preset video information bases may be searched for whether there is a link of the webpage where the video to be played exists, and if so, Indicates that there is a link to the video to be played in the preset video information library.
S302B:根据所述针对待播放视频的对应关系,获得所述待播放视频的链接。S302B: Obtain a link of the to-be-played video according to the corresponding relationship of the video to be played.
由于预设的视频信息库中每个对应关系,表示的是视频所在网页的链接与该视频的链接之间的对应关系,所以在S302A检测到预设的视频信息库中存在针对待播放视频的对应关系后,即可从对应关系中得到待播放视频的链接。The corresponding relationship between the link of the webpage where the video is located and the link of the video is represented by the corresponding relationship in the preset video information library. Therefore, the S302A detects that the preset video information library has a video for the to-be-played video. After the correspondence, the link of the video to be played can be obtained from the corresponding relationship.
另外,实际应用中,由于数据传输受传输距离等因素的影响,以及防止服务器故障后数据丢失等原因,视频网站往往将同一视频在不同服务器中进 行存储,也即同一个待播放视频可能对应多个待播放视频的链接,所以,预设的视频信息库中可能存在多个针对待播放视频的对应关系,这种情况下,可以获得待播放视频所在网页的链接对应的一个或多个待播放视频的链接。In addition, in practical applications, video websites tend to enter the same video in different servers because of the influence of transmission distance and other factors, as well as preventing data loss after server failure. The line storage, that is, the same video to be played may correspond to a plurality of links of the to-be-played video. Therefore, there may be multiple corresponding relationships for the to-be-played video in the preset video information library. In this case, the to-be-played game can be obtained. A link to one or more videos to be played corresponding to the link of the web page where the video is located.
S302C:从网页服务器端获得所述待播放视频的链接。S302C: Obtain a link of the to-be-played video from a web server.
从网页服务器端获得所述待播放视频的链接时,应用服务器可以先向待播放视频所在网页对应的网页服务器端发送针对待播放视频的访问请求信息;网页服务器接收到应用服务器发送的访问请求后,根据该访问请求获得待播放视频所在网页的源代码,并将该源代码发送给应用服务器;应用服务器接收到源代码后,对源代码进行解析,并根据解析结果获得待播放视频的链接。When obtaining the link of the to-be-played video from the web server, the application server may first send the access request information for the to-be-played video to the web server corresponding to the webpage where the video to be played; the web server receives the access request sent by the application server. According to the access request, the source code of the webpage where the video to be played is obtained is obtained, and the source code is sent to the application server; after receiving the source code, the application server parses the source code, and obtains a link of the to-be-played video according to the parsing result.
S302D:在所述预设的视频信息库中记录所述待播放视频所在网页的链接与所述待播放视频的链接之间的对应关系。S302D: Record, in the preset video information library, a correspondence between a link of a webpage where the video to be played is located and a link of the to-be-played video.
在预设的视频信息库中记录待播放视频所在网页的链接与待播放视频的链接之间的对应关系后,若以后再有用户设备欲播放该待播放视频,可直接进行S302B,节省了解析视频所在网页源代码、获得视频的链接的时间,使得用户能够快速得到视频数据。After the corresponding relationship between the link of the webpage where the video to be played is located and the link of the video to be played is recorded in the preset video information library, if the user equipment wants to play the to-be-played video later, the S302B can be directly executed, thereby saving the analysis. The source code of the webpage where the video is located and the time when the link to the video is obtained, so that the user can quickly obtain the video data.
由于视频的链接发生变化等原因,可导致预设的视频信息库中记录的已有对应关系异常,因此,实际应用中,应用服务器在生成对应关系时,可为每个对应关系生成一个时间戳,根据该时间戳定期验证对应关系的有效性,若验证过程中,发现对应关系异常,则更新相应数据,以保证用户正常使用。另外,在用户使用过程中,若发现对应关系异常,可向应用服务器上报错误信息,应用服务器可根据上报的错误信息,更新对应关系中的相应数据。The existing mapping relationship recorded in the preset video information database is abnormal due to the change of the link of the video. Therefore, in the actual application, when the application server generates the corresponding relationship, a timestamp can be generated for each corresponding relationship. According to the timestamp, the validity of the corresponding relationship is periodically verified. If the corresponding relationship is abnormal during the verification process, the corresponding data is updated to ensure normal use of the user. In addition, if the corresponding relationship is abnormal during the use of the user, the error message may be reported to the application server, and the application server may update the corresponding data in the corresponding relationship according to the reported error information.
S303:向所述用户设备发送所述待播放视频的链接,以便所述用户设备在不接收所述待播放视频所在网页数据的情况下,根据所述待播放视频的链接获取所述待播放视频。S303: Send a link of the to-be-played video to the user equipment, so that the user equipment acquires the to-be-played video according to the link of the to-be-played video without receiving the webpage data of the to-be-played video. .
在S302B获得多个待播放视频的链接且访问请求中还携带用户设备的地理位置信息的情况下,本步骤中,可以先确定提供待播放视频的各个服务器与用户设备的地理位置之间的距离;再获得所确定的距离中满足预设条件的距离对应的服务器提供的待播放视频的链接,最后向用户设备发送所获得待播放视频的链接。其中,预设条件可以是小于某一预设的阈值,如小于100 公里等等,也可以是距离最近的前若干个等等。In the case that the S302B obtains the link of the to-be-played video and the location information of the user equipment is also included in the access request, in this step, the distance between each server that provides the video to be played and the geographic location of the user equipment may be determined first. And obtaining a link of the to-be-played video provided by the server corresponding to the distance that meets the preset condition in the determined distance, and finally sending the link of the obtained video to be played to the user equipment. The preset condition may be less than a preset threshold, such as less than 100. Kilometers, etc., can also be the first few from the nearest and so on.
用户设备在接收到应用服务器发送的待播放视频的链接后,根据该链接从其对应的服务器获得视频数据,并开始播放视频,其中,待播放视频的链接对应的服务器与待播放视频所在网页的链接对应的服务器可以是同一个,也可以不是同一个。After receiving the link of the to-be-played video sent by the application server, the user equipment obtains the video data from the corresponding server according to the link, and starts playing the video, where the server corresponding to the link of the to-be-played video and the webpage where the video to be played is located The servers corresponding to the links may or may not be the same.
例如,用户设备欲播放视频A,A视频所在网页的链接对应的服务器为X,A视频的链接对应的服务器为Y,用户设备对应的应用服务器为Z,则用户设备接收到应用服务器Z发送的视频的链接后,从服务器Y获得视频数据进行播放,其中服务器X和服务器Y可以是一个服务器也可以不是一个服务器。For example, if the user equipment wants to play video A, the server corresponding to the link of the webpage where the A video is located is X, the server corresponding to the link of the A video is Y, and the application server corresponding to the user equipment is Z, then the user equipment receives the sending by the application server Z. After the link of the video, the video data is obtained from the server Y for playing, wherein the server X and the server Y may be one server or not.
在用户设备欲在播放器中播放视频时,用户设备中的播放器可直接接收待播放视频的链接,并根据该链接获得视频数据并进行播放;在用户设备欲在浏览器或者具有浏览器功能的应用中播放视频时,浏览器或者具有浏览器功能的应用可直接接收待播放视频的链接,接收到该链接信息后,需先加载预设的播放器,再在预设的播放器中播放待播放视频的链接对应的视频。When the user equipment wants to play the video in the player, the player in the user equipment can directly receive the link of the video to be played, and obtain the video data according to the link and play it; the user equipment wants to be in the browser or has the browser function. In the application playing video, the browser or the browser-enabled application can directly receive the link of the video to be played. After receiving the link information, the preset player needs to be loaded first, and then played in the preset player. The video corresponding to the link of the video to be played.
由以上可见,本申请实施例提供的方案中,用户在用户设备浏览待播放视频时,由相应的应用服务器完成解析视频所在网页的功能,直接为用户设备提供待播放视频的链接。由于应用服务器的预设视频信息库中,预先存储了待播放视频所在网页的链接与待播放视频的链接之间的对应关系,且应用服务器向用户设备只发送待播放视频的链接,数据量小,所以,应用本申请实施例提供的方案可以快速解析待播放视频所在网页、节省用户时间、提高用户体验。It can be seen from the above that, in the solution provided by the embodiment of the present application, when the user equipment browses the to-be-played video, the corresponding application server completes the function of parsing the webpage where the video is located, and directly provides the user equipment with a link of the video to be played. The preset relationship between the link of the webpage where the video to be played is located and the link of the video to be played is pre-stored in the preset video information database of the application server, and the application server only sends the link of the video to be played to the user equipment, and the data amount is small. Therefore, the solution provided by the embodiment of the present application can quickly resolve the webpage where the video to be played is located, save user time, and improve user experience.
与上述的方法实施例相对应,本申请实施例还提供了装置实施例,参见图5,图5为本申请实施例提供的一种用于解析视频网页的装置的结构示意图,应用于应用服务器端,该装置包括:访问请求接收模块501、视频链接确定模块502和视频链接发送模块503。Corresponding to the foregoing method embodiment, the embodiment of the present application further provides an apparatus embodiment. Referring to FIG. 5, FIG. 5 is a schematic structural diagram of an apparatus for parsing a video webpage according to an embodiment of the present application, which is applied to an application server. The device includes an access request receiving module 501, a video link determining module 502, and a video link sending module 503.
其中,访问请求接收模块501,用于接收来自用户设备的针对待播放视频的访问请求,其中,所述访问请求中,携带所述待播放视频所在网页的链接;The access request receiving module 501 is configured to receive an access request for the to-be-played video from the user equipment, where the access request carries a link of the webpage where the video to be played is located;
视频链接确定模块502,用于根据所述访问请求中携带的所述待播放视频所在网页的链接,在预设的视频信息库中,确定所述待播放视频的链接,其 中,所述预设的视频信息库,用于提供视频所在网页的链接与该视频的链接之间的对应关系;a video link determining module 502, configured to determine, according to a link of a webpage where the to-be-played video is carried in the access request, a link of the to-be-played video in a preset video information library, where The preset video information library is configured to provide a correspondence between a link of a webpage where the video is located and a link of the video;
视频链接发送模块503,用于向所述用户设备发送所述待播放视频的链接,以便所述用户设备在不接收所述待播放视频所在网页数据的情况下,根据所述待播放视频的链接获取所述待播放视频。a video link sending module 503, configured to send a link of the to-be-played video to the user equipment, so that the user equipment does not receive the link of the to-be-played video without receiving the webpage data of the to-be-played video. Obtain the video to be played.
在本申请的一个具体实施例中,提供了一种视频链接确定模块502的具体实现方法,参见图6,图6为本申请实施例提供的另一中用于解析视频网页的装置的结构示意图,其中视频链接确定模块502可以包括:对应关系检测子模块5021、第一视频链接获得子模块5022、视频链接获得子模块5023和对应关系记录子模块5024。In a specific embodiment of the present application, a specific implementation method of the video link determining module 502 is provided. Referring to FIG. 6, FIG. 6 is a schematic structural diagram of another apparatus for parsing a video webpage according to an embodiment of the present application. The video link determining module 502 may include: a correspondence detecting submodule 5021, a first video link obtaining submodule 5022, a video link obtaining submodule 5023, and a correspondence relationship recording submodule 5024.
其中,对应关系检测子模块5021,用于检测预设的视频信息库中是否存在针对所述待播放视频的对应关系;The corresponding relationship detecting sub-module 5021 is configured to detect whether a corresponding relationship between the preset video information library and the to-be-played video exists;
第一视频链接获得子模块5022,用于在所述对应关系检测子模块5021的检测结果为是时,根据所述针对待播放视频的对应关系,获得所述待播放视频的链接;The first video link obtaining sub-module 5022 is configured to obtain a link of the to-be-played video according to the corresponding relationship of the video to be played when the detection result of the corresponding relationship detecting sub-module 5021 is YES;
第二视频链接获得子模块5023,用于在所述对应关系检测子模块5021的检测结果为否时,从网页服务器端获得所述待播放视频的链接,并触发所述对应关系记录子模块5024记录所述待播放视频所在网页的链接与所述待播放视频的链接之间的对应关系;The second video link obtaining sub-module 5023 is configured to obtain a link of the to-be-played video from the web server end when the detection result of the corresponding relationship detecting sub-module 5021 is negative, and trigger the correspondence record sub-module 5024 Recording a correspondence between a link of the webpage where the video to be played is located and a link of the video to be played;
对应关系记录子模块5024,用于在所述预设的视频信息库中记录所述待播放视频所在网页的链接与所述待播放视频的链接之间的对应关系。The correspondence record sub-module 5024 is configured to record, in the preset video information library, a correspondence between a link of the webpage where the video to be played is located and a link of the to-be-played video.
具体的,所述第二视频链接获得子模块5023可以包括:访问请求发送单元、源代码接收单元和视频链接确定单元(图中未示出)。Specifically, the second video link obtaining submodule 5023 may include: an access request sending unit, a source code receiving unit, and a video link determining unit (not shown in the figure).
其中,访问请求发送单元,用于向网页服务器端发送所述针对待播放视频的访问请求信息;源代码接收单元,用于接收网页服务器端发送的所述待播放视频所在网页的源代码;视频链接确定单元,用于根据所述源代码,确定所述待播放视频的链接。The access request sending unit is configured to send the access request information for the to-be-played video to the web server, and the source code receiving unit is configured to receive the source code of the webpage where the to-be-played video is sent by the web server; a link determining unit, configured to determine a link of the to-be-played video according to the source code.
具体的,所述第一视频链接获得子模块5022,具体用于根据所述针对待播放视频的对应关系,获得一个或多个所述待播放视频的链接。 Specifically, the first video link obtaining sub-module 5022 is specifically configured to obtain one or more links of the to-be-played video according to the corresponding relationship for the to-be-played video.
具体的,所述访问请求中,还携带用户设备的地理位置信息。Specifically, the access request further carries geographic location information of the user equipment.
在本申请的一个具体实施例中,所述视频链接发送模块503,可以包括:距离确定子模块、第三视频链接获得子模块和视频链接发送子模块(图中未示出)。In a specific embodiment of the present application, the video link sending module 503 may include: a distance determining submodule, a third video link obtaining submodule, and a video link sending submodule (not shown).
其中,距离确定子模块,用于在所述第一视频链接获得子模块5022获得多个待播放视频的链接的情况下,确定提供所述待播放视频的各个服务器与所述用户设备的地理位置之间的距离;The distance determining sub-module is configured to determine, when the first video link obtaining sub-module 5022 obtains a link of multiple to-be-played videos, the geographic location of each server that provides the to-be-played video and the user equipment. the distance between;
第三视频链接获得子模块,用于获得所述距离确定子模块确定的距离中满足预设条件的距离对应的服务器提供的待播放视频的链接;a third video link obtaining sub-module, configured to obtain a link of the to-be-played video provided by the server corresponding to the distance that meets the preset condition in the distance determined by the distance determining sub-module;
视频链接发送子模块,用于向所述用户设备发送所获得待播放视频的链接。The video link sending submodule is configured to send a link of the obtained video to be played to the user equipment.
由以上可见,本申请实施例提供的方案中,用户在用户设备浏览待播放视频时,由相应的应用服务器完成解析视频所在网页的功能,直接为用户设备提供待播放视频的链接。由于应用服务器的预设视频信息库中,预先存储了待播放视频所在网页的链接与待播放视频的链接之间的对应关系,且应用服务器向用户设备只发送待播放视频的链接,数据量小,所以,应用本申请实施例提供的方案可以快速解析待播放视频所在网页、节省用户时间、提高用户体验。It can be seen from the above that, in the solution provided by the embodiment of the present application, when the user equipment browses the to-be-played video, the corresponding application server completes the function of parsing the webpage where the video is located, and directly provides the user equipment with a link of the video to be played. The preset relationship between the link of the webpage where the video to be played is located and the link of the video to be played is pre-stored in the preset video information database of the application server, and the application server only sends the link of the video to be played to the user equipment, and the data amount is small. Therefore, the solution provided by the embodiment of the present application can quickly resolve the webpage where the video to be played is located, save user time, and improve user experience.
另外,本申请实施例提供了一种终端,该终端包括:In addition, the embodiment of the present application provides a terminal, where the terminal includes:
处理器、存储器、通信接口和总线;a processor, a memory, a communication interface, and a bus;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;The processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
所述存储器存储可执行程序代码;The memory stores executable program code;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:The processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
接收来自用户设备的针对待播放视频的访问请求,其中,所述访问请求中,携带所述待播放视频所在网页的链接;Receiving an access request for the to-be-played video from the user equipment, where the access request carries a link of the webpage where the video to be played is located;
根据所述访问请求中携带的所述待播放视频所在网页的链接,在预设的视频信息库中,确定所述待播放视频的链接,其中,所述预设的视频信息库, 用于提供视频所在网页的链接与该视频的链接之间的对应关系;Determining, in the preset video information database, a link of the to-be-played video according to the link of the webpage of the to-be-played video that is carried in the access request, where the preset video information database is a correspondence between a link for providing a web page where the video is located and a link for the video;
向所述用户设备发送所述待播放视频的链接,以便所述用户设备在不接收所述待播放视频所在网页数据的情况下,根据所述待播放视频的链接获取所述待播放视频。Sending, to the user equipment, the link of the to-be-played video, so that the user equipment acquires the to-be-played video according to the link of the to-be-played video without receiving the webpage data of the to-be-played video.
本申请实施例提供了一种应用程序,该应用程序用于在运行时执行本申请实施例提供的用于解析视频网页的方法。其中,用于解析视频网页的方法,包括:The embodiment of the present application provides an application program for executing a method for parsing a video webpage provided by an embodiment of the present application at runtime. The method for parsing a video webpage includes:
接收来自用户设备的针对待播放视频的访问请求,其中,所述访问请求中,携带所述待播放视频所在网页的链接;Receiving an access request for the to-be-played video from the user equipment, where the access request carries a link of the webpage where the video to be played is located;
根据所述访问请求中携带的所述待播放视频所在网页的链接,在预设的视频信息库中,确定所述待播放视频的链接,其中,所述预设的视频信息库,用于提供视频所在网页的链接与该视频的链接之间的对应关系;Determining, in the preset video information database, a link of the to-be-played video according to the link of the webpage of the to-be-played video that is carried in the access request, where the preset video information library is used to provide The correspondence between the link of the webpage where the video is located and the link of the video;
向所述用户设备发送所述待播放视频的链接,以便所述用户设备在不接收所述待播放视频所在网页数据的情况下,根据所述待播放视频的链接获取所述待播放视频。Sending, to the user equipment, the link of the to-be-played video, so that the user equipment acquires the to-be-played video according to the link of the to-be-played video without receiving the webpage data of the to-be-played video.
本申请实施例提供了一种存储介质,用于存储应用程序,该应用程序用于执行本申请实施例提供的用于解析视频网页的方法。其中,用于解析视频网页的方法,包括:The embodiment of the present application provides a storage medium for storing an application, which is used to execute a method for parsing a video webpage provided by an embodiment of the present application. The method for parsing a video webpage includes:
接收来自用户设备的针对待播放视频的访问请求,其中,所述访问请求中,携带所述待播放视频所在网页的链接;Receiving an access request for the to-be-played video from the user equipment, where the access request carries a link of the webpage where the video to be played is located;
根据所述访问请求中携带的所述待播放视频所在网页的链接,在预设的视频信息库中,确定所述待播放视频的链接,其中,所述预设的视频信息库,用于提供视频所在网页的链接与该视频的链接之间的对应关系;Determining, in the preset video information database, a link of the to-be-played video according to the link of the webpage of the to-be-played video that is carried in the access request, where the preset video information library is used to provide The correspondence between the link of the webpage where the video is located and the link of the video;
向所述用户设备发送所述待播放视频的链接,以便所述用户设备在不接收所述待播放视频所在网页数据的情况下,根据所述待播放视频的链接获取所述待播放视频。Sending, to the user equipment, the link of the to-be-played video, so that the user equipment acquires the to-be-played video according to the link of the to-be-played video without receiving the webpage data of the to-be-played video.
对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来 将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this paper, relational terms such as first and second are used only to An entity or operation is distinguished from another entity or operation, and does not necessarily require or imply any such actual relationship or order. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机可读取存储介质中,这里所称得的存储介质,如:ROM/RAM、磁碟、光盘等。One of ordinary skill in the art can understand that all or part of the steps in implementing the above method embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium, which is referred to herein. Storage media such as ROM/RAM, disk, CD, etc.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。 The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., which are made within the spirit and principles of the present application, should be included in the present application. Within the scope of protection.

Claims (12)

  1. 一种用于解析视频网页的方法,应用于应用服务器端,其特征在于,所述方法包括:A method for parsing a video webpage is applied to an application server. The method includes:
    接收来自用户设备的针对待播放视频的访问请求,其中,所述访问请求中,携带所述待播放视频所在网页的链接;Receiving an access request for the to-be-played video from the user equipment, where the access request carries a link of the webpage where the video to be played is located;
    根据所述访问请求中携带的所述待播放视频所在网页的链接,在预设的视频信息库中,确定所述待播放视频的链接,其中,所述预设的视频信息库,用于提供视频所在网页的链接与该视频的链接之间的对应关系;Determining, in the preset video information database, a link of the to-be-played video according to the link of the webpage of the to-be-played video that is carried in the access request, where the preset video information library is used to provide The correspondence between the link of the webpage where the video is located and the link of the video;
    向所述用户设备发送所述待播放视频的链接,以便所述用户设备在不接收所述待播放视频所在网页数据的情况下,根据所述待播放视频的链接获取所述待播放视频。Sending, to the user equipment, the link of the to-be-played video, so that the user equipment acquires the to-be-played video according to the link of the to-be-played video without receiving the webpage data of the to-be-played video.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述访问请求中携带的所述待播放视频所在网页的链接,在预设的视频信息库中,确定所述待播放视频的链接的步骤,包括:The method according to claim 1, wherein the determining a link of the to-be-played video in the preset video information base according to the link of the webpage where the to-be-played video is carried in the access request Steps include:
    检测预设的视频信息库中是否存在针对所述待播放视频的对应关系;Detecting, in the preset video information library, whether there is a corresponding relationship for the to-be-played video;
    若存在,根据所述针对待播放视频的对应关系,获得所述待播放视频的链接;If yes, obtaining a link of the to-be-played video according to the corresponding relationship of the video to be played;
    若不存在,从网页服务器端获得所述待播放视频的链接,并在所述预设的视频信息库中记录所述待播放视频所在网页的链接与所述待播放视频的链接之间的对应关系。If not, the link of the to-be-played video is obtained from the web server, and the correspondence between the link of the webpage where the video to be played is located and the link of the to-be-played video is recorded in the preset video information database. relationship.
  3. 根据权利要求2所述的方法,其特征在于,所述从网页服务器端获得所述待播放视频的链接的步骤,包括:The method according to claim 2, wherein the step of obtaining a link of the to-be-played video from a web server side comprises:
    向网页服务器端发送所述针对待播放视频的访问请求信息;Sending the access request information for the video to be played to the web server side;
    接收网页服务器端发送的所述待播放视频所在网页的源代码;Receiving, by the web server, a source code of a webpage where the to-be-played video is sent;
    根据所述源代码,确定所述待播放视频的链接。Determining a link of the to-be-played video according to the source code.
  4. 根据权利要求2或3所述的方法,其特征在于,所述根据所述针对待播放视频的对应关系,获得所述待播放视频的链接的步骤,包括:The method according to claim 2 or 3, wherein the step of obtaining a link of the to-be-played video according to the corresponding relationship of the video to be played comprises:
    根据所述针对待播放视频的对应关系,获得一个或多个所述待播放视频的链接。 Obtaining one or more links of the to-be-played video according to the corresponding relationship for the video to be played.
  5. 根据权利要求4所述的方法,其特征在于,所述访问请求中,还携带用户设备的地理位置信息。The method according to claim 4, wherein the access request further carries geographical location information of the user equipment.
  6. 根据权利要求5所述的方法,其特征在于,在获得多个待播放视频的链接的情况下,所述向所述用户设备发送所述待播放视频的链接的步骤,包括:The method according to claim 5, wherein, in the case of obtaining a link of a plurality of videos to be played, the step of transmitting the link of the to-be-played video to the user equipment comprises:
    确定提供所述待播放视频的各个服务器与所述用户设备的地理位置之间的距离;Determining a distance between each server that provides the video to be played and a geographic location of the user equipment;
    获得所确定的距离中满足预设条件的距离对应的服务器提供的待播放视频的链接,并向所述用户设备发送所获得待播放视频的链接。Obtaining a link of the to-be-played video provided by the server corresponding to the distance that meets the preset condition in the determined distance, and transmitting a link of the obtained video to be played to the user equipment.
  7. 一种用于解析视频网页的装置,应用于应用服务器端,其特征在于,所述装置包括:An apparatus for parsing a video webpage, which is applied to an application server, wherein the apparatus comprises:
    访问请求接收模块,用于接收来自用户设备的针对待播放视频的访问请求,其中,所述访问请求中,携带所述待播放视频所在网页的链接;An access request receiving module, configured to receive an access request for a video to be played from the user equipment, where the access request carries a link of a webpage where the video to be played is located;
    视频链接确定模块,用于根据所述访问请求中携带的所述待播放视频所在网页的链接,在预设的视频信息库中,确定所述待播放视频的链接,其中,所述预设的视频信息库,用于提供视频所在网页的链接与该视频的链接之间的对应关系;a video link determining module, configured to determine, according to a link of a webpage where the to-be-played video is carried in the access request, a link of the to-be-played video in a preset video information library, where the preset a video information library for providing a correspondence between a link of a webpage where the video is located and a link of the video;
    视频链接发送模块,用于向所述用户设备发送所述待播放视频的链接,以便所述用户设备在不接收所述待播放视频所在网页数据的情况下,根据所述待播放视频的链接获取所述待播放视频。a video link sending module, configured to send a link of the to-be-played video to the user equipment, so that the user equipment obtains the link of the to-be-played video according to the webpage data of the to-be-played video without receiving the webpage data of the to-be-played video The video to be played.
  8. 根据权利要求7所述的装置,其特征在于,所述视频链接确定模块,包括:对应关系检测子模块、第一视频链接获得子模块、视频链接获得子模块和对应关系记录子模块;The device according to claim 7, wherein the video link determining module comprises: a correspondence detecting sub-module, a first video link obtaining sub-module, a video link obtaining sub-module, and a correspondence relationship recording sub-module;
    所述对应关系检测子模块,用于检测预设的视频信息库中是否存在针对所述待播放视频的对应关系;The corresponding relationship detecting submodule is configured to detect whether a corresponding relationship between the preset video information library and the to-be-played video exists;
    所述第一视频链接获得子模块,用于在所述对应关系检测子模块的检测结果为是时,根据所述针对待播放视频的对应关系,获得所述待播放视频的链接;The first video link obtaining sub-module is configured to obtain a link of the to-be-played video according to the corresponding relationship of the video to be played when the detection result of the corresponding relationship detecting sub-module is YES;
    所述第二视频链接获得子模块,用于在所述对应关系检测子模块的检测 结果为否时,从网页服务器端获得所述待播放视频的链接,并触发所述对应关系记录子模块记录所述待播放视频所在网页的链接与所述待播放视频的链接之间的对应关系;The second video link obtaining submodule for detecting the corresponding relationship detecting submodule If the result is no, the link of the to-be-played video is obtained from the web server, and the corresponding relationship recording sub-module is triggered to record the correspondence between the link of the webpage where the video to be played is located and the link of the to-be-played video. ;
    所述对应关系记录子模块,用于在所述预设的视频信息库中记录所述待播放视频所在网页的链接与所述待播放视频的链接之间的对应关系。The corresponding relationship record sub-module is configured to record, in the preset video information library, a correspondence between a link of a webpage where the to-be-played video is located and a link of the to-be-played video.
  9. 根据权利要求8所述的装置,其特征在于,所述第二视频链接获得子模块,包括:The apparatus according to claim 8, wherein the second video link obtaining submodule comprises:
    访问请求发送单元,用于向网页服务器端发送所述针对待播放视频的访问请求信息;An access request sending unit, configured to send the access request information for the to-be-played video to the web server end;
    源代码接收单元,用于接收网页服务器端发送的所述待播放视频所在网页的源代码;a source code receiving unit, configured to receive a source code of a webpage where the to-be-played video is sent by the web server;
    视频链接确定单元,用于根据所述源代码,确定所述待播放视频的链接。a video link determining unit, configured to determine a link of the to-be-played video according to the source code.
  10. 根据权利要求8或9所述的装置,其特征在于,所述第一视频链接获得子模块,具体用于根据所述针对待播放视频的对应关系,获得一个或多个所述待播放视频的链接。The device according to claim 8 or 9, wherein the first video link obtaining sub-module is specifically configured to obtain one or more of the to-be-played video according to the corresponding relationship of the video to be played. link.
  11. 根据权利要求10所述的装置,其特征在于,所述访问请求中,还携带用户设备的地理位置信息。The device according to claim 10, wherein the access request further carries geographical location information of the user equipment.
  12. 根据权利要求11所述的装置,其特征在于,所述视频链接发送模块,包括:The device according to claim 11, wherein the video link sending module comprises:
    距离确定子模块,用于在所述第一视频链接获得子模块获得多个待播放视频的链接的情况下,确定提供所述待播放视频的各个服务器与所述用户设备的地理位置之间的距离;a distance determining submodule, configured to determine, between the respective servers that provide the video to be played, and the geographic location of the user equipment, in a case that the first video link obtaining sub-module obtains a link of multiple to-be-played videos distance;
    第三视频链接获得子模块,用于获得所述距离确定子模块确定的距离中满足预设条件的距离对应的服务器提供的待播放视频的链接;a third video link obtaining sub-module, configured to obtain a link of the to-be-played video provided by the server corresponding to the distance that meets the preset condition in the distance determined by the distance determining sub-module;
    视频链接发送子模块,用于向所述用户设备发送所获得待播放视频的链接。 The video link sending submodule is configured to send a link of the obtained video to be played to the user equipment.
PCT/CN2015/072345 2014-03-21 2015-02-05 Method and device for parsing video webpage WO2015139540A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410109149.3A CN103873580A (en) 2014-03-21 2014-03-21 Method and device for analyzing video webpages
CN201410109149.3 2014-03-21

Publications (1)

Publication Number Publication Date
WO2015139540A1 true WO2015139540A1 (en) 2015-09-24

Family

ID=50911694

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/072345 WO2015139540A1 (en) 2014-03-21 2015-02-05 Method and device for parsing video webpage

Country Status (2)

Country Link
CN (1) CN103873580A (en)
WO (1) WO2015139540A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333560A (en) * 2020-08-25 2021-02-05 深圳Tcl新技术有限公司 Webpage video analyzing and playing method, device and equipment and readable storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873580A (en) * 2014-03-21 2014-06-18 北京金山网络科技有限公司 Method and device for analyzing video webpages
CN104135692B (en) * 2014-07-18 2017-11-10 北京奇虎科技有限公司 The loading display method and loaded and displayed device of video information

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635826A (en) * 2008-07-21 2010-01-27 中国科学院计算技术研究所 Method for acquiring addresses of network video programs
CN102098327A (en) * 2010-12-15 2011-06-15 百度在线网络技术(北京)有限公司 Method and device for downloading online video sniffer
CN103259802A (en) * 2013-06-03 2013-08-21 贝壳网际(北京)安全技术有限公司 Media file downloading method and device and client device
CN103607668A (en) * 2013-11-21 2014-02-26 优视科技有限公司 Video play method and apparatus
CN103873580A (en) * 2014-03-21 2014-06-18 北京金山网络科技有限公司 Method and device for analyzing video webpages

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635826A (en) * 2008-07-21 2010-01-27 中国科学院计算技术研究所 Method for acquiring addresses of network video programs
CN102098327A (en) * 2010-12-15 2011-06-15 百度在线网络技术(北京)有限公司 Method and device for downloading online video sniffer
CN103259802A (en) * 2013-06-03 2013-08-21 贝壳网际(北京)安全技术有限公司 Media file downloading method and device and client device
CN103607668A (en) * 2013-11-21 2014-02-26 优视科技有限公司 Video play method and apparatus
CN103873580A (en) * 2014-03-21 2014-06-18 北京金山网络科技有限公司 Method and device for analyzing video webpages

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333560A (en) * 2020-08-25 2021-02-05 深圳Tcl新技术有限公司 Webpage video analyzing and playing method, device and equipment and readable storage medium

Also Published As

Publication number Publication date
CN103873580A (en) 2014-06-18

Similar Documents

Publication Publication Date Title
US11134101B2 (en) Techniques for detecting malicious behavior using an accomplice model
US9552199B2 (en) Method and apparatus of prompting an update of an application
US9628349B2 (en) Interactivity analyses of web resources based on reload events
US10917397B2 (en) Establishing a trusted login procedure
WO2015139538A1 (en) Video information push method and device
US20150106905A1 (en) Login method for client application and corresponding server
US20160285781A1 (en) Data processing method, apparatus, client, server and system
US11012339B2 (en) Web site reachability management for content browsing
US10614223B2 (en) Security vulnerability detection
WO2015139539A1 (en) Video information push method and device
US10979532B2 (en) Resource download method, electronic device, and apparatus
CN111046310A (en) Page processing method, device, server and computer readable storage medium
US20210192563A1 (en) Webpage advertisement anti-blocking method, content delivery network, and client terminal
WO2015139540A1 (en) Method and device for parsing video webpage
US20230221952A1 (en) Disabling a script based on indications of unsuccessful execution of the script
TWI677223B (en) Page display method and device
US9686310B2 (en) Method and apparatus for repairing a file
CN106933858B (en) Page source statistical method and view controller
CN103885877A (en) Method and device for generating simulation browser testing script of HTTP
US20160056994A1 (en) Diagnosing Network Misconfiguration Externally
CN111010447A (en) Data communication method and device
JP2021033421A (en) Analyzer, detector, system and program
JP2010218538A (en) Method and system for detecting web service

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15764776

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 27/01/2017)

122 Ep: pct application non-entry in european phase

Ref document number: 15764776

Country of ref document: EP

Kind code of ref document: A1