WO2015149570A1 - 浏览器中的文件下载方法和浏览器装置 - Google Patents

浏览器中的文件下载方法和浏览器装置 Download PDF

Info

Publication number
WO2015149570A1
WO2015149570A1 PCT/CN2015/070054 CN2015070054W WO2015149570A1 WO 2015149570 A1 WO2015149570 A1 WO 2015149570A1 CN 2015070054 W CN2015070054 W CN 2015070054W WO 2015149570 A1 WO2015149570 A1 WO 2015149570A1
Authority
WO
WIPO (PCT)
Prior art keywords
browser
download
downloading
file
component
Prior art date
Application number
PCT/CN2015/070054
Other languages
English (en)
French (fr)
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 WO2015149570A1 publication Critical patent/WO2015149570A1/zh

Links

Images

Classifications

    • 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
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to a file downloading method and a browser device in a browser.
  • a browser is an application that displays files in a web server or file system for displaying text, images, and other information on the World Wide Web or a local area network. Based on these words or images, users can quickly and easily browse various information.
  • Common browsers on the PC include Internet Explorer, Firefox, Google's Chrome, and more. The browser interprets and renders the webpage through the kernel.
  • the Internet Explorer uses the Trident kernel
  • the Chrome browser uses the Webkit kernel
  • the Firefox uses the Gecko kernel.
  • non-IE kernels such as Webkit can achieve a better user experience, however, some web pages only support IE's Trident kernel, such as bank websites. Therefore, a dual-core browser has appeared, displaying a general web page through a fast Webkit kernel, etc., using a Trident kernel for a special web page such as a bank website, or a user-designated designated kernel.
  • the present invention has been made in order to provide a file downloading method and browser apparatus in a browser that overcomes the above problems or at least partially solves the above problems.
  • a file downloading method in a browser comprising a first browser kernel and a second browser kernel, the method comprising: initiating a pre-download on the first browser kernel side Downloading of the file; blocking the downloading of the pre-downloaded file by the kernel side of the first browser by the intercepting operation, and transmitting the downloading information of the pre-downloaded file to the downloading component of the kernel side of the second browser, by the downloading component in the second browser
  • the kernel side downloads the pre-download file.
  • a browser apparatus comprising a processor, wherein the browser client includes a first browser kernel component and a second browser kernel component, wherein:
  • the first browser kernel component is configured to initiate downloading of a pre-downloaded file, and block the downloading of the pre-downloaded file by the first browser kernel side by an intercepting operation, and send the download information of the pre-downloaded file Going to the second browser kernel component;
  • the second browser kernel component is configured to receive download information of the pre-downloaded file, and the pre-downloaded file is downloaded by the download component on a second browser kernel side.
  • a computer program comprising computer readable code, when said computer readable code is executed on a client device, causing said client device to execute in said browser File download method.
  • a computer readable medium storing the above computer program is provided.
  • the download operation is intercepted, and the first browser kernel side pair pre-download is blocked.
  • the file is downloaded, and the download information of the pre-download file is sent to the download component on the kernel side of the second browser, and the download component downloads the pre-download file on the kernel side of the second browser.
  • the download is completed by the download component of the second browser kernel side with higher performance, which improves the downloading efficiency, and provides a unified portal and a unified download interface for the browser download behavior, so that the user can view the history. , adjust the download options and other operations.
  • 1a is a flow chart showing a file downloading method in a browser according to an embodiment of the present invention
  • FIG. 1b is a schematic diagram showing a download interface of a download component on the second browser kernel side in the embodiment
  • FIG. 2a is a flow chart showing a file downloading method in a browser according to another embodiment of the present invention.
  • Figure 2b shows a schematic diagram of a download interface of the download component in this embodiment
  • Figure 2c shows each user setting item in the download component in this embodiment
  • FIG. 3 is a flowchart showing a file downloading method in a browser according to another embodiment of the present invention.
  • FIG. 4a is a flow chart showing a file downloading method in a browser according to another embodiment of the present invention.
  • Figure 4b shows a schematic diagram of a downloader with a user selection interface
  • FIG. 4c is a schematic diagram of a download interface for restarting downloading by the first browser kernel side
  • FIG. 5 is a block diagram showing the structure of a browser device according to an embodiment of the present invention.
  • FIG. 6 is a block diagram showing the structure of a browser device according to another embodiment of the present invention.
  • FIG. 7 is a block diagram showing the structure of a browser device according to another embodiment of the present invention.
  • Figure 8 shows schematically a block diagram of a client device for performing the method according to the invention
  • Fig. 9 schematically shows a storage unit for holding or carrying program code implementing the method according to the invention.
  • FIG. 1a is a flowchart showing a file downloading method in a browser according to an embodiment of the present invention.
  • the browser includes a first browser kernel and a second browser kernel. As shown in FIG. 1a, the method includes the following steps:
  • Step S110 initiating downloading of a pre-download file on the first browser kernel side.
  • the first browser kernel is the Trident kernel used by IE browser, and the kernel has strong compatibility.
  • Step S120 blocking the downloading of the pre-downloaded file by the first browser kernel side by the intercepting operation.
  • the interception of the pre-downloaded file is completed by implementing the download interface provided by the IE.
  • the download information of the pre-downloaded file is obtained from the parameters of the function under the interface, the download information includes the URL of the pre-downloaded file, and the download component of the kernel side of the second browser obtains the downloaded file data package from the corresponding server.
  • Step S130 the download information of the pre-downloaded file is sent to the download component on the kernel side of the second browser.
  • the step may be implemented by sending a message to the download component of the second browser kernel side by means of IPC (inter-process communication) or the like.
  • the second browser kernel is typically the Chromekit's Webkit kernel, or other kernel, for example, in the Avant browser, using the Gecko kernel. Second browser kernels such as Webkit have higher performance than Trident's first browser kernel.
  • Step S140 the download component downloads the pre-download file on the second browser kernel side.
  • the download can be performed through a built-in downloader on the kernel side of the second browser, such as an integrated download tool provided by Chrome, or through a download component provided by a browser-independent download software, such as a Thunder download tool.
  • a built-in downloader on the kernel side of the second browser such as an integrated download tool provided by Chrome
  • a download component provided by a browser-independent download software such as a Thunder download tool.
  • the entry of the independent download component is provided through the second browser kernel side.
  • FIG. 1b shows a download interface diagram of the download component of the second browser kernel side in the embodiment.
  • the download component is supported by the Thunder download independent of the browser.
  • the download operation is intercepted, and the download of the pre-download file by the kernel side of the first browser is blocked, and The download information of the pre-downloaded file is sent to the download component on the kernel side of the second browser, and the pre-downloaded file is downloaded by the download component on the second browser kernel side.
  • the download is completed by the download component of the second browser kernel side with higher performance, which improves the downloading efficiency, and provides a unified portal and a unified download interface for the browser download behavior, so that the user can view the history. Record, adjust download options and other operations.
  • FIG. 2a shows a flowchart of a file downloading method in a browser including a first browser kernel and a second browser kernel, in accordance with another embodiment of the present invention. As shown in FIG. 2a, the method includes the following steps:
  • Step S210 analyzing information carried in the http data packet fed back by the server on the first browser kernel side to determine whether to initiate downloading of the pre-download file; if yes, executing step S220; otherwise, parsing the http data packet by the rendering process and Rendering.
  • the rendering component of the first browser kernel invokes the resource loading interface to load the resource, and the resource loading interface sends a message to the browser, the browser A network request is made to the server, and the server feeds back the http packet to the browser.
  • the information carried in the http data packet fed back by the server is analyzed on the kernel side of the first browser, and whether the download of the pre-download file is initiated according to the information carried in the http data packet.
  • the MIME type information in the returned data may be used to determine whether the network request is a file download request, and maintain a list of MIME types on the first browser kernel side, if the MIME type of the returned data is recorded in the list, first The browser kernel renders the returned data directly as a resource, otherwise the network request is determined to be a file download.
  • the type information of the content-disposition carried in the http packet may be judged to determine whether to initiate downloading of the pre-download file.
  • Step S220 initiating downloading of a pre-download file on the first browser kernel side.
  • the browser sends the Download interface provided by the browser to notify the upper layer of the browser to display the download interface.
  • the upper layer determines whether to download. If the upper layer decides to download, the browser establishes a connection with the server through the first browser kernel to transfer the file.
  • Step S230 blocking the downloading of the pre-downloaded file by the first browser kernel side by implementing the IDownloadManager interface.
  • the step further includes: implementing a WebBrowser, implementing an IServiceProvider interface in the implemented WebBrowser, thereby intercepting a QueryService call to the IID_IDownloadManager Service interface, and returning a class instance pointer that implements the IDownloadManager interface.
  • Step S240 extracting a download address of the pre-download file as a download letter of the pre-download file interest.
  • the IDownloadManager::DownLoad function can be declared as follows:
  • the pmk parameter is used to specify a pre-downloaded object, intercept the parameter, and obtain the URL of the pre-downloaded file from the parameter as the download address.
  • Step S250 the download information of the pre-downloaded file is sent to the download component provided by the independent process in the second browser kernel.
  • the first browser kernel process for example, the IE process, sends the download information to the download component provided by the independent process in the second browser kernel by way of IPC (inter-process communication).
  • IPC inter-process communication
  • the URL information of the pre-downloaded file is sent to the downloader of the independent process built in Chrome through the IE process.
  • Step S260 downloading the pre-download file by using the download component provided by the independent process.
  • the download component provided by the independent process creates a download task, establishes a link with the server, and downloads the file.
  • the first browser kernel side is blocked from the pre-download by implementing the IDownloadManager interface. Download the file and send the download information to the download component provided by the independent process in the second browser kernel for download. According to the scheme, the download process of the file is only performed through the kernel side of the second browser, providing uniformity, Efficient download portal for easy viewing and management.
  • FIG. 2b shows a download interface diagram of the download component in the embodiment.
  • the download component interface is provided by an independent process in the second browser kernel, and may be a Chrome built-in download or the like.
  • Figure 2c shows the user setting items that the download component can provide, including downloading the directory, saving the location, etc., which is more convenient than the IE download.
  • FIG. 3 is a flow chart showing a file downloading method in a browser according to another embodiment of the present invention, wherein the browser includes a first browser kernel and a second browser kernel. As shown in FIG. 3, the method includes the following steps:
  • Step S310 analyzing information carried in the http data packet fed back by the server on the first browser kernel side to determine whether to initiate downloading of the pre-download file; if yes, executing step S320; otherwise, rendering the http data packet by the rendering process Rendering.
  • Step S320 initiating downloading of a pre-download file on the first browser kernel side.
  • Step S330 intercepting the QueryService call to the IID_IDownloadManager Service interface, and returning a class instance pointer that implements the IDownloadManager interface.
  • Step S340 extracting the download address of the pre-downloaded file as the download information of the pre-downloaded file.
  • Step S350 the download information of the pre-downloaded file is sent to the download component provided by the browser-free download software on the kernel side of the second browser.
  • the download component is independent of the browser.
  • the download component communicates with the Chrome main process through a set of interface functions.
  • the main process of the Chrome can send messages to these interfaces through IPC (inter-process communication), etc., and the process of the independent download component also sends the download progress and other information to the main Chrome process through the corresponding interface function, and is displayed on the interface by the Chrome main process.
  • IPC inter-process communication
  • the download information is obtained and the user is prompted.
  • the download component independent of the browser is called, and the download task is created according to the download information.
  • the browser main process can send the download configuration commonly used in the Chrome built-in download tool to the independent download process, for example, the file download directory, whether to ask for the save location, and the download is completed. Whether to execute after, etc., usually these configuration options are displayed in the Chrome built-in download interface.
  • an interface is provided for the user in the interface, for example, suspending downloading, deleting, stopping, re-downloading, etc., receiving user operations, and then transmitting the operation information to the independent downloading process to implement management and query of the download.
  • the above-mentioned browser-independent download components are provided by common download tools such as Thunder, Fastcast, Internet Express or Bit Comet.
  • Step S360 downloading the pre-downloaded file by using the download component provided by the browser-independent downloading software.
  • the download component provided by the independent download software is faster than the download component provided by the second browser kernel, such as the download component in Chrome, and the performance is better, and can be downloaded through P2P, etc., and the resource is limited. And can isolate the external program may damage the main process of the browser, to avoid interruption and interference to the file download.
  • Step S370 the security component is started to perform a security scan on the downloaded file, and the result of the security scan is given.
  • Step S380 installing the downloaded file in the mobile terminal according to the type of the downloaded file.
  • the downloaded file is of a specific type such as apk, it is directly installed in the mobile terminal.
  • the download interface of the browser-independent download component can refer to FIG. 2.
  • downloading is performed by using browser-independent download software, which has better performance and less resource limitation. And can isolate the external program may damage the main process of the browser, to avoid interruption and interference to the file download.
  • FIG. 4a is a flow chart showing a file downloading method in a browser according to another embodiment of the present invention, wherein the browser includes a first browser kernel and a second browser kernel. As shown in FIG. 4a, the method includes the following steps:
  • Step S410 initiating downloading of a pre-download file on the first browser kernel side.
  • Step S420 blocking the first browser kernel side pair by implementing the IDownloadManager interface The download of the pre-downloaded file.
  • Step S430 extracting a download address of the pre-downloaded file as download information of the pre-downloaded file.
  • Step S440 the download information of the pre-downloaded file is sent to the download component on the kernel side of the second browser.
  • steps S410-S440 For the implementation process of steps S410-S440, reference may be made to the previous embodiment, and details are not described herein again.
  • step S450 the download component gives a download interface.
  • the download interface contains an entry for downloading using the first browser kernel.
  • Step S460 detecting whether the user selects an entry for downloading using the first browser kernel; if yes, executing step S470, otherwise, performing step S480.
  • Step S470 the first browser kernel side re-initiates the downloading of the pre-downloaded file, and the first browser kernel side establishes a network connection to download the pre-downloaded file.
  • Step S480 the pre-downloaded file is downloaded by the download component on the second browser kernel side.
  • Figure 4b shows a schematic diagram of a download interface under this embodiment
  • Figure 4c shows a schematic diagram of a download interface for re-initiating a download via IE.
  • the download component of FIG. 4b gives an interface of “Download with IE”. After the user clicks, the download interface is closed, and the IE download interface shown in FIG. 4c pops up, and the IE re-initiates the download and establishment network of the pre-download file. , download it.
  • an entry for downloading by the first browser kernel is provided, and file downloading of a second browser kernel that is not compatible with Webkit may be re-initiated downloading by using IE, which is more compatible.
  • the present invention further provides a browser device, which may specifically include a processor, wherein the browser client may include a first browser kernel component and a second browser kernel component, wherein the processor is running, wherein :
  • the first browser kernel component is configured to initiate downloading of a pre-downloaded file, and block the downloading of the pre-downloaded file by the first browser kernel side by an intercepting operation, and send the download information of the pre-downloaded file Going to the second browser kernel component;
  • the second browser kernel component is configured to receive download information of the pre-downloaded file, by downloading The component downloads the pre-download file on the second browser kernel side.
  • FIG. 5 still another preferred embodiment of the browser device of the present invention is shown.
  • the description of the processor is omitted, but it is to be noted that the first browser kernel component and the second browser kernel component in the device are operated in at least one processor of the device.
  • FIG. 5 is a block diagram showing the structure of a browser device according to an embodiment of the present invention.
  • the browser device includes: a first browser kernel component 510 and a second browser kernel component 520, wherein:
  • the first browser kernel component 510 is configured to initiate downloading of a pre-download file, and block the downloading of the pre-downloaded file by the first browser kernel side by the intercepting operation, and send the download information of the pre-downloaded file to the second browser.
  • the kernel component 520 is configured to receive download information of the pre-download file, and the download component 530 downloads the pre-download file on the second browser kernel side.
  • the first browser kernel component 510 is further configured to analyze information carried in the http data packet fed back by the server before downloading, and determine whether to initiate downloading of the pre-download file according to the information carried in the http data packet.
  • the MIME type information in the returned data may be used to determine whether the network request is a file download request, and maintain a list of MIME types on the first browser kernel side, if the MIME type of the returned data is recorded in the list, first The browser kernel renders the returned data directly as a resource, otherwise the network request is determined to be a file download.
  • the first browser kernel component 510 may further determine whether to initiate downloading of the pre-download file by using the type information of the content-disposition carried in the http data packet.
  • the first browser kernel component 510 is further configured to: intercept the download behavior of the first browser kernel, and block the download of the pre-downloaded file by the first browser kernel side by implementing the IDownloadManager interface.
  • the first browser kernel component 510 intercepts the QueryService call to the IID_IDownloadManager Service interface and returns a class instance pointer that implements the IDownloadManager interface.
  • the first browser kernel component 510 is further configured to extract the download address of the pre-downloaded file as the download information of the pre-downloaded file according to the parameters pmk and pbc in the Download function of the IDownloadManager interface.
  • the download information is sent to the second browsing.
  • Kernel component 520 the download component 530 is provided by an independent process in the second browser kernel component.
  • the above process is specifically: the first browser kernel component 510 sends the URL download information of the pre-downloaded file to the download component 530 of the independent process built in Chrome.
  • the download component 530 provided by the independent process creates a download task, establishes a link with the server, and performs file download.
  • FIG. 6 still another preferred embodiment of the browser device of the present invention is shown.
  • the description of the processor is omitted, but it is to be noted that the first browser kernel component and the second browser kernel component in the device are operated in at least one processor of the device.
  • FIG. 6 is a block diagram showing the structure of a browser device according to another embodiment of the present invention.
  • the browser device includes: a first browser kernel component 610 and a second browser kernel component 620, wherein:
  • the first browser kernel component 610 is configured to initiate downloading of a pre-downloaded file, and block the downloading of the pre-downloaded file by the first browser kernel side by the intercepting operation, and send the download information of the pre-downloaded file to the second browser.
  • the kernel component 620 is configured to receive download information of the pre-download file, and the download component 630 downloads the pre-download file on the second browser kernel side.
  • the difference between this embodiment and the previous embodiment is that the download component 630 is integrated in the browser device and independent of the browser, and the download component 630 passes through a set of interface functions and the browser main process, for example, with the second browser kernel side.
  • the Chrome main process communicates for the Chrome main process to manage and status queries for download tasks.
  • the download component 630 communicates with the Chrome main process through a set of interface functions.
  • the main process of the Chrome can send messages to these interfaces through IPC (inter-process communication), etc., and the independent download component 630 also sends the download progress and other information to the main Chrome process through the corresponding interface function, which is displayed in the interface by the Chrome main process.
  • the second browser kernel 620 first obtains the download information and prompts the user according to the download process of Chrome. After the user confirms, the download component 630 independent of the browser is invoked, and the download task is created according to the download information, and the download is performed.
  • the second browser component 620 can be used in the Chrome built-in download tool.
  • the configuration is sent to the independent download process, for example, the file download directory, whether to ask for the save location, whether to execute after the download is completed, etc. Usually these configuration options are displayed in the Chrome built-in download interface.
  • the second browser kernel component 620 is further configured to provide an interface for the user in the interface, for example, suspending downloading, deleting, stopping, re-downloading, etc., receiving user operations, and then sending the operation information to the independent downloading process to implement Download management and queries.
  • the above-mentioned browser-independent download components are provided by common download tools such as Thunder, Fastcast, Internet Express or Bit Comet.
  • downloads are performed using browser-independent download software with better performance and less resource constraints. And can isolate the external program may damage the main process of the browser, to avoid interruption and interference to the file download.
  • FIG. 6 still another preferred embodiment of the browser device of the present invention is shown.
  • the description of the processor is omitted, but it is to be noted that the first browser kernel component and the second browser kernel component in the device are operated in at least one processor of the device.
  • FIG. 7 is a block diagram showing the structure of a browser device according to another embodiment of the present invention. As shown in FIG. 7, the browser device also includes a first browser kernel component 710 and a second browser kernel component 720 and a download component. 730.
  • the first browser kernel component 710 is further configured to: re-initiate downloading of the pre-downloaded file according to the user's selection of the portal, and establish a network connection to download the pre-downloaded file.
  • the download interface is provided by the download component 730 on the second browser kernel side, and the download interface includes an entry for downloading using the first browser kernel.
  • the download component 730 detects whether the user selects an entry for downloading using the first browser kernel, and if so, notifies the first browser kernel component 710 to re-initiate the download of the pre-download file, and the first browser kernel component 710 establishes a network connection download.
  • the pre-download file In this way, the browser device can download the file of the second browser kernel that is not compatible with Webkit, and can use IE to re-initiate the download, which is more compatible.
  • the second browser kernel component may be further configured to perform a security scan on the downloaded file and give a result of the security scan; and, according to the type of the downloaded file, Install the downloaded file in the mobile terminal.
  • the second device with higher relative performance is downloaded.
  • the download component on the browser kernel side is completed, which improves the efficiency of downloading, and provides a unified portal and unified download interface for browser download behavior, which is convenient for users to view history records and adjust download options.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of some or all of the components of the page label header in a browser in accordance with an embodiment of the present invention. All features.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 8 illustrates a client device, such as a browser, that can implement file downloading in a browser in accordance with the present invention.
  • the client device traditionally includes a processor 801 and a computer program product or computer readable medium in the form of a memory 802.
  • Memory 802 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • Memory 802 has a memory space 803 for program code 804 for performing any of the method steps described above.
  • storage space 803 for program code may include various program code 804 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • Such computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such a computer program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have a storage segment, a storage space, and the like arranged similarly to the memory 802 in the client device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes computer readable code 804', ie, code that can be read by a processor, such as 801, that when executed by the client device causes the client device to perform the method described above The various steps.

Landscapes

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

Abstract

一种浏览器中的文件下载方法和浏览器装置,其中,方法包括:在第一浏览器内核侧发起对一预下载文件的下载(S110);通过拦截操作阻断第一浏览器内核侧对预下载文件的下载(S120),并将预下载文件的下载信息发送到第二浏览器内核侧的下载组件(S130),由下载组件在第二浏览器内核侧下载预下载文件(S140)。由于下载由相对性能较高的第二浏览器内核侧的下载组件完成,因此提高了下载的效率,同时为浏览器下载行为提供统一的入口和统一的下载界面,便于用户查看历史记录,调整下载选项等操作。

Description

浏览器中的文件下载方法和浏览器装置 技术领域
本发明涉及互联网技术领域,具体涉及一种浏览器中的文件下载方法和浏览器装置。
背景技术
浏览器是显示网站服务器或文件系统内的文件,用于显示在万维网或局域网等内的文字、图像及其他信息的一种应用程序。依据这些文字或图像,用户可迅速及轻易地浏览各种信息。PC上常见的浏览器包括Intemet Explorer、Firefox、Google的Chrome等。浏览器通过内核对网页进行解释和渲染,在上述浏览器中,Intemet Explorer采用Trident内核,Chrome浏览器采用的是Webkit内核,Firefox采用Gecko内核。由于Webkit等非IE内核能实现更好的用户体验,然而,部分网页只支持IE的Trident内核,例如,银行网站等。因此出现了双核浏览器,通过速度快的Webkit内核等进行一般网页的显示,对银行网站等特殊网页采用Trident内核,或由用户选择指定的内核。
然而,在现有的双核浏览器,例如Webkit和Trident双核浏览器中进行文件下载时,由发起访问的内核侧负责进行下载,这一方面不便于进行下载管理,查看下载历史,没有一致的体验,另一方面,如果在IE中进行下载,则下载通过http进行数据传送,下载速度慢并受到资源等诸多方面的限制,在性能上远不如Chrome下载器或其他以P2P等方式进行下载的独立下载器。总而言之,现有的双核浏览器无法实现统一、高效的下载。
发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的浏览器中的文件下载方法和浏览器装置。
根据本发明的一个方面,提供了一种浏览器中的文件下载方法,浏览器包括第一浏览器内核和第二浏览器内核,该方法包括:在第一浏览器内核侧发起对一预下载文件的下载;通过拦截操作阻断第一浏览器内核侧对预下载文件的下载,并将预下载文件的下载信息发送到第二浏览器内核侧的下载组件,由下载组件在第二浏览器内核侧下载预下载文件。
根据本发明的另一方面,提供了一种浏览器装置,包括处理器,该处理器运行时其中的浏览器客户端包括第一浏览器内核组件和第二浏览器内核组件,其中:
所述第一浏览器内核组件用于发起对一预下载文件的下载,以及通过拦截操作阻断第一浏览器内核侧对所述预下载文件的下载,将所述预下载文件的下载信息发送到所述第二浏览器内核组件;
所述第二浏览器内核组件用于接收所述预下载文件的下载信息,由下载组件在第二浏览器内核侧下载所述预下载文件。
根据本发明的再一方面,提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在客户端装置上运行时,导致所述客户端装置执行上述的浏览器中的文件下载方法。
根据本发明的又一方面,提供了一种计算机可读介质,其中存储了上述的计算机程序。
根据本发明的浏览器中的文件下载方法和浏览器装置,当第一浏览器内核侧发起对一预下载文件的下载时,拦截该次下载操作,阻断第一浏览器内核侧对预下载文件的下载,并将预下载文件的下载信息发送到第二浏览器内核侧的下载组件,由下载组件在第二浏览器内核侧下载预下载文件。根据该方案,下载由相对性能较高的第二浏览器内核侧的下载组件完成,这提高了下载的效率,同时为浏览器下载行为提供统一的入口和统一的下载界面,便于用户查看历史记录,调整下载选项等操作。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1a示出了根据本发明一个实施例的浏览器中的文件下载方法的流程图;
图1b示出了该实施例中第二浏览器内核侧的下载组件的下载界面示意图;
图2a示出了根据本发明另一个实施例的浏览器中的文件下载方法的流程图;
图2b示出了该实施例中下载组件的下载界面示意图;
图2c示出了该实施例中下载组件中的各用户设置项;
图3示出了根据本发明另一个实施例的浏览器中的文件下载方法的流程图;
图4a示出了根据本发明另一个实施例的浏览器中的文件下载方法的流程图;
图4b示出了具有用户选择接口的下载器的示意图;
图4c示出了第一浏览器内核侧重新发起下载的下载界面示意图;
图5示出了根据本发明一个实施例的浏览器装置的结构框图;
图6示出了根据本发明另一个实施例的浏览器装置的结构框图;
图7示出了根据本发明另一个实施例的浏览器装置的结构框图;
图8示意性地示出了用于执行根据本发明的方法的客户端装置的框图;以及
图9示意性地示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单元。
具体实施例
下面结合附图和具体的实施方式对本发明作进一步的描述。
图1a示出了根据本发明一个实施例的浏览器中的文件下载方法的流程图,浏览器包括第一浏览器内核和第二浏览器内核,如图1a所示,该方法包括如下步骤:
步骤S110,在第一浏览器内核侧发起对一预下载文件的下载。
采用双浏览器内核的目的是为兼顾性能和兼容性,因此,现有的浏览器中,第一浏览器内核都为IE浏览器使用的Trident内核,该内核具有较强的兼容性。
步骤S120,通过拦截操作阻断第一浏览器内核侧对预下载文件的下载。
通过实现IE提供的下载接口完成对预下载文件的拦截。从该接口下的函数的参数中获取预下载文件的下载信息,下载信息包括预下载文件的URL,第二浏览器内核侧的下载组件从相应的服务器获取下载文件数据包。
步骤S130,将预下载文件的下载信息发送到第二浏览器内核侧的下载组件。
具体地,该步骤可通过IPC(进程间通信)等方式相第二浏览器内核侧的下载组件发送消息实现。第二浏览器内核一般为Chrome浏览器的Webkit内核,或其他内核,例如,在Avant浏览器中,采用的是Gecko内核。Webkit等第二浏览器内核与Trident第一浏览内核相比,性能更高。
步骤S140,下载组件在第二浏览器内核侧下载预下载文件。
具体地,可通过第二浏览器内核侧的内建下载器进行下载,例如Chrome提供的集成下载工具,或通过与浏览器独立的下载软件提供的下载组件进行,如,迅雷下载工具。该独立下载组件的入口通过第二浏览器内核侧提供。
图1b示出了实施例中第二浏览器内核侧的下载组件的下载界面示意图,在图1b中,下载组件由与浏览器独立的迅雷下载提供支持。
根据本发明上述实施例提供的方法,当第一浏览器内核侧发起对一预下载文件的下载时,拦截该次下载操作,阻断第一浏览器内核侧对预下载文件的下载,并将预下载文件的下载信息发送到第二浏览器内核侧的下载组件,由下载组件在第二浏览器内核侧下载预下载文件。根据该方案,下载由相对性能较高的第二浏览器内核侧的下载组件完成,这提高了下载的效率,同时为浏览器下载行为提供统一的入口和统一的下载界面,便于用户查看历史记 录,调整下载选项等操作。
图2a示出了根据本发明另一个实施例的浏览器中的文件下载方法的流程图,该浏览器装置包括第一浏览器内核和第二浏览器内核。如图2a所示,该方法包括如下步骤:
步骤S210,在第一浏览器内核侧分析服务器端反馈的http数据包中携带的信息以确定是否发起对预下载文件的下载;如果是,执行步骤S220,否则,由渲染进程解析http数据包并进行渲染。
对于一个普通的超链接,当用户在第一浏览器内核相应模式下点击该链接后,第一浏览器内核的渲染组件调用资源加载接口加载资源,该资源加载接口向浏览器发送消息,浏览器向服务器端进行网络请求,服务器端向浏览器反馈http数据包。在第一浏览器内核侧分析服务器端反馈的http数据包中携带的信息,依据http数据包中携带的信息确定是否发起对预下载文件的下载。
具体地,可以根据返回数据中的MIME类型信息判断该次网络请求是否为文件下载请求,在第一浏览器内核侧维护一个MIME类型的列表,如果返回数据的MIME类型记录在列表中,第一浏览器内核将返回数据作为资源直接渲染,否则将该次网络请求判断为文件下载。
在MIME类型判断不明确等情况下,还可以通过http数据包中携带的content-disposition的类型信息进行判断,确定是否发起对预下载文件的下载。
步骤S220,在第一浏览器内核侧发起对一预下载文件的下载。
由浏览器调用IE提供的Download接口通知浏览器上层显示下载界面,上层会决定是否下载,如果上层决定下载,浏览器通过第一浏览器内核建立与服务器端的连接,进行文件的传输。
步骤S230,通过实现IDownloadManager接口阻断第一浏览器内核侧对所述预下载文件的下载。
具体地,该步骤进一步包括:实现WebBrowser,在实现的WebBrowser中实现IServiceProvider接口,从而拦截到对IID_IDownloadManager Service接口的QueryService调用,返回实现IDownloadManager接口的类实例指针。
步骤S240,提取预下载文件的下载地址作为所述预下载文件的下载信 息。
具体地,实现IDownloadManager接口中,可对IDownloadManager::DownLoad函数做如下声明:
HRESULT Download(
IMoniker*pmk,
IBindCtx*pbc,
DWORD dwBindVerb,
LONG grfBINDF,
BINDINFO*pBindInfo,
LPCOLESTR pszHeaders,
LPCOLESTR pszRedir,
UINT uiCP
);
其中,pmk参数用于指定预下载的对象,截获该参数,从该参数中获取预下载文件的URL,作为下载地址。
步骤S250,将预下载文件的下载信息发送到由第二浏览器内核中的独立进程提供的下载组件。
第一浏览器内核进程,例如,IE进程,通过IPC(进程间通信)的方式将下载信息发送到由第二浏览器内核中的独立进程提供的下载组件。
例如,对于第二浏览器内核为WebKit的情况,具体为通过IE进程将预下载文件的URL信息发送到Chrome中内建的独立进程的下载器。
步骤S260,通过上述独立进程提供的下载组件下载预下载文件。
独立进程提供的下载组件创建下载任务,建立与服务器的链接,进行文件下载。
根据本发明上述实施例提供的方法,根据服务器端反馈的http数据包中携带的信息以确定是否发起对预下载文件的下载,通过实现IDownloadManager接口阻断第一浏览器内核侧对所述预下载文件的下载,并将下载信息发送给第二浏览器内核中的独立进程提供的下载组件进行下载。根据该方案,文件的下载过程只通过第二浏览器内核侧进行,提供了统一、 高效的下载入口,便于用户的查看和管理。
图2b示出了该实施例中下载组件的下载界面示意图,如图2b所示,该下载组件界面由第二浏览器内核中的独立进程提供,可以是Chrome内建下载等。图2c示出了该下载组件可提供的用户设置项,包括下载目录,保存位置等,与IE下载相比,操作更方便。
图3示出了根据本发明另一个实施例的浏览器中的文件下载方法的流程图,其中,浏览器包括第一浏览器内核和第二浏览器内核。如图3所示,该方法包括如下步骤:
步骤S310,在第一浏览器内核侧分析服务器端反馈的http数据包中携带的信息以确定是否发起对预下载文件的下载;如果是,执行步骤S320,否则,由渲染进程渲染对http数据包进行渲染。
步骤S320,在第一浏览器内核侧发起对一预下载文件的下载。
步骤S330,拦截对IID_IDownloadManager Service接口的QueryService调用,返回实现IDownloadManager接口的类实例指针。
步骤S340,提取预下载文件的下载地址作为所述预下载文件的下载信息。
步骤S310-S340的实现过程可参考上一实施例中的步骤S210-S240,此处不再赘述。
步骤S350,将预下载文件的下载信息发送到第二浏览器内核侧的,独立于浏览器的下载软件提供的下载组件。
区别于上一实施例的是,该实施例中,下载组件与浏览器独立,以Webkit内核为例,下载组件通过一组接口函数与Chrome主进程通信。Chrome主进程可通过IPC(进程间通信)等方式向这些接口发送消息,而该独立下载组件的进程也通过相应的接口函数将下载进度等信息发送给Chrome主进程,由Chrome主进程显示在界面中。也即,该实施例中,首先按照Chrome的下载流程,获取下载信息并提示用户,待用户确认后,调用与浏览器独立的下载组件,按照下载信息创建下载任务。
进一步地,浏览器主进程可将Chrome内建下载工具中常用的下载配置发送给独立下载进程,例如,文件下载目录,是否询问保存位置,下载完成 后是否执行等,通常这些配置选项显示在Chrome内建下载的界面中。
进一步地,在界面中为用户提供接口,例如,暂停下载、删除、停止、重新下载等,接收用户操作,再将操作信息发送给独立下载进程,实现对下载的管理和查询。
上述与浏览器独立的下载组件由迅雷、快播、网际快车或比特彗星等常见的下载工具提供。
步骤S360,通过上述独立于浏览器的下载软件提供的下载组件对预下载文件进行下载。
独立下载软件提供的下载组件与第二浏览器内核提供的下载组件,如Chrome中的下载组件相比下载速度更快,性能更佳,可通过P2P等方式进行下载,资源受限较少。并且能够隔离外部程序可能对浏览器主进程的破坏,避免对文件下载的中断和干扰。
步骤S370,启动安全组件对下载的文件进行安全扫描,并给出安全扫描的结果。
例如,在浏览器中集成扫描工具和木马特征库、恶意网址库等,这可以避免传统杀毒工具滞后查杀的缺陷。
步骤S380,依据下载的文件的类型,在移动终端中进行安装下载的文件。
例如,检测到智能手机等移动终端与PC端相连接时,若下载文件为apk等特定类型,直接安装至移动终端中。
该实施例中,独立于浏览器的下载组件的下载界面可参照图2。
根据本发明上述实施例提供的方法,采用独立于浏览器的下载软件进行下载,性能更佳,资源受限较少。并且能够隔离外部程序可能对浏览器主进程的破坏,避免对文件下载的中断和干扰。
图4a示出了根据本发明另一个实施例的浏览器中的文件下载方法的流程图,其中,浏览器包括第一浏览器内核和第二浏览器内核。如图4a所示,该方法包括如下步骤:
步骤S410,在第一浏览器内核侧发起对一预下载文件的下载。
步骤S420,通过实现IDownloadManager接口阻断第一浏览器内核侧对 所述预下载文件的下载。
步骤S430,提取预下载文件的下载地址作为所述预下载文件的下载信息。
步骤S440,将预下载文件的下载信息发送到第二浏览器内核侧的下载组件。
步骤S410-S440的实施过程可参照上一实施例,此处不再赘述。
步骤S450,下载组件给出下载界面。
区别于上一实施例的是,下载界面中含有使用第一浏览器内核进行下载的入口。
步骤S460,检测用户是否选择使用第一浏览器内核进行下载的入口;如果是,执行步骤S470,否则,执行步骤S480。
步骤S470,第一浏览器内核侧重新发起对预下载文件的下载,由第一浏览器内核侧建立网络连接下载所述预下载文件。
步骤S480,由下载组件在第二浏览器内核侧下载所述预下载文件。
该步骤的具体过程与上一实施例相同,此处不再赘述。
图4b示出了该实施例下的一种下载界面的示意图,图4c示出了通过IE重新发起下载的下载界面示意图。可见,图4b中的下载组件上给出“用IE下载”的接口,用户点击后,该下载界面关闭,而弹出图4c所示的IE下载界面,IE重新发起对预下载文件的下载建立网络,进行下载。
根据本发明上述实施例提供的方法,提供了第一浏览器内核进行下载的入口,对不兼容Webkit等第二浏览器内核的文件下载,可利用IE重新发起下载,更具兼容性。
本发明还提供了一种浏览器装置,该浏览器装置具体可以包括处理器,该处理器运行时其中的浏览器客户端具体可以包括第一浏览器内核组件和第二浏览器内核组件,其中:
所述第一浏览器内核组件用于发起对一预下载文件的下载,以及通过拦截操作阻断第一浏览器内核侧对所述预下载文件的下载,将所述预下载文件的下载信息发送到所述第二浏览器内核组件;
所述第二浏览器内核组件用于接收所述预下载文件的下载信息,由下载 组件在第二浏览器内核侧下载所述预下载文件。
进一步地在下述图5所示的实施例中,给出了本发明的浏览器装置的又一较佳实施例。为了简化描述,省去了处理器的描述,但是要说明的是该装置中的第一浏览器内核组件和第二浏览器内核组件是在该装置的至少一个处理器中运行的。
图5示出了根据本发明一个实施例的浏览器装置的结构框图,如图5所示,该浏览器装置包括:第一浏览器内核组件510和第二浏览器内核组件520,其中:
第一浏览器内核组件510用于发起对一预下载文件的下载,以及通过拦截操作阻断第一浏览器内核侧对预下载文件的下载,将预下载文件的下载信息发送到第二浏览器内核组件520;第二浏览器内核组件520用于接收预下载文件的下载信息,由下载组件530在第二浏览器内核侧下载预下载文件。
第一浏览器内核组件510还用于,在下载之前,分析服务器端反馈的http数据包中携带的信息,依据所述http数据包中携带的信息确定是否发起对预下载文件的下载。具体地,可以根据返回数据中的MIME类型信息判断该次网络请求是否为文件下载请求,在第一浏览器内核侧维护一个MIME类型的列表,如果返回数据的MIME类型记录在列表中,第一浏览器内核将返回数据作为资源直接渲染,否则将该次网络请求判断为文件下载。
在MIME类型判断不明确等情况下,第一浏览器内核组件510还可以通过http数据包中携带的content-disposition的类型信息进行判断,确定是否发起对预下载文件的下载。
第一浏览器内核组件510还用于:拦截第一浏览器内核的下载行为,通过实现IDownloadManager接口阻断第一浏览器内核侧对预下载文件的下载。
具体地,第一浏览器内核组件510拦截对IID_IDownloadManager Service接口的QueryService调用,返回实现IDownloadManager接口的类实例指针。
第一浏览器内核组件510还用于依据IDownloadManager接口的Download函数中的参数pmk和pbc,提取预下载文件的下载地址作为所述预下载文件的下载信息。
第一浏览器内核组件510提取下载信息后,将下载信息发送到第二浏览 器内核组件520。在该实施例中,下载组件530由第二浏览器内核组件中的独立进程提供。例如,对于第二浏览器内核为WebKit的情况,上述过程具体为:第一浏览器内核组件510将预下载文件的URL下载信息发送到Chrome中内建的独立进程的下载组件530。
独立进程提供的下载组件530创建下载任务,建立与服务器的链接,进行文件下载。
进一步地在下述图6所示的实施例中,给出了本发明的浏览器装置的又一较佳实施例。为了简化描述,省去了处理器的描述,但是要说明的是该装置中的第一浏览器内核组件和第二浏览器内核组件是在该装置的至少一个处理器中运行的。
图6示出了根据本发明另一个实施例的浏览器装置的结构框图,如图6所示,该浏览器装置包括:第一浏览器内核组件610和第二浏览器内核组件620,其中:
第一浏览器内核组件610用于发起对一预下载文件的下载,以及通过拦截操作阻断第一浏览器内核侧对预下载文件的下载,将预下载文件的下载信息发送到第二浏览器内核组件620;第二浏览器内核组件620用于接收预下载文件的下载信息,由下载组件630在第二浏览器内核侧下载预下载文件。
该实施例与上一实施例的区别在于:下载组件630集成在浏览器装置中且与浏览器独立,下载组件630通过一组接口函数与浏览器主进程,例如,与第二浏览器内核侧的Chrome主进程通信,以供Chrome主进程对下载任务进行管理和状态查询。
以下以Webkit作为第二浏览器内核为例,说明其工作过程。下载组件630通过一组接口函数与Chrome主进程通信。Chrome主进程可通过IPC(进程间通信)等方式向这些接口发送消息,而该独立下载组件630也通过相应的接口函数将下载进度等信息发送给Chrome主进程,由Chrome主进程显示在界面中。也即,第二浏览器内核620首先按照Chrome的下载流程,获取下载信息并提示用户,待用户确认后,调用与浏览器独立的下载组件630,按照下载信息创建下载任务,进行下载。
进一步地,第二浏览器组件620可将Chrome内建下载工具中常用的下 载配置发送给独立下载进程,例如,文件下载目录,是否询问保存位置,下载完成后是否执行等,通常这些配置选项显示在Chrome内建下载的界面中。
进一步地,第二浏览器内核组件620还用于在界面中为用户提供接口,例如,暂停下载、删除、停止、重新下载等,接收用户操作,再将操作信息发送给独立下载进程,实现对下载的管理和查询。
上述与浏览器独立的下载组件由迅雷、快播、网际快车或比特彗星等常见的下载工具提供。
在该实施例中,采用独立于浏览器的下载软件进行下载,性能更佳,资源受限较少。并且能够隔离外部程序可能对浏览器主进程的破坏,避免对文件下载的中断和干扰。
进一步地在下述图6所示的实施例中,给出了本发明的浏览器装置的又一较佳实施例。为了简化描述,省去了处理器的描述,但是要说明的是该装置中的第一浏览器内核组件和第二浏览器内核组件是在该装置的至少一个处理器中运行的。
图7示出了根据本发明另一个实施例的浏览器装置的结构框图,如图7所示,该浏览器装置同样包括第一浏览器内核组件710和第二浏览器内核组件720及下载组件730。
在该实施例中,第一浏览器内核组件710还用于:根据用户对所述入口的选择,重新发起对预下载文件的下载,建立网络连接下载所述预下载文件。
其中,下载界面由第二浏览器内核侧的下载组件730提供,下载界面中含有使用第一浏览器内核进行下载的入口。下载组件730检测用户是否选择使用第一浏览器内核进行下载的入口,如果是,通知第一浏览器内核组件710重新发起对预下载文件的下载,由第一浏览器内核组件710建立网络连接下载所述预下载文件。这样,浏览器装置对不兼容Webkit等第二浏览器内核的文件下载,可利用IE重新发起下载,更具兼容性。
在上述三个浏览器装置的实施例中,第二浏览器内核组件还可进一步用于对下载的文件进行安全扫描,并给出安全扫描的结果;以及,用于依据下载的文件的类型,在移动终端中进行安装下载的文件。
根据本发明上述实施例提供的浏览器装置,下载由相对性能较高的第二 浏览器内核侧的下载组件完成,这提高了下载的效率,同时为浏览器下载行为提供统一的入口和统一的下载界面,便于用户查看历史记录,调整下载选项等操作。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的浏览器中页面标签头的绘制设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图8示出了可以实现根据本发明的浏览器中的文件下载的客户端装置,例如浏览器。该客户端装置传统上包括处理器801和以存储器802形式的计算机程序产品或者计算机可读介质。存储器802可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器802具有用于执行上述方法中的任何方法步骤的程序代码804的存储空间803。例如,用于程序代码的存储空间803可以包括分别用于实现上面的方法中的各种步骤的各个程序代码804。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图9所述的便携式或者固定存储单元。该存储单元可以具有与图8的客户端装置中的存储器802类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码804’,即可以由例如诸如801之类的处理器读取的代码,这些代码当由客户端装置运行时,导致该客户端装置执行上面所描述的方法中的各个步骤。
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下被实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。

Claims (26)

  1. 一种浏览器中的文件下载方法,其中所述浏览器包括第一浏览器内核和第二浏览器内核,所述文件下载方法包括:
    在第一浏览器内核侧发起对一预下载文件的下载;
    通过拦截操作阻断第一浏览器内核侧对所述预下载文件的下载,并将所述预下载文件的下载信息发送到第二浏览器内核侧的下载组件,由所述下载组件在第二浏览器内核侧下载所述预下载文件。
  2. 根据权利要求1所述的文件下载方法,在所述在第一浏览器内核侧发起对一预下载文件的下载之前还包括:
    在所述第一浏览器内核侧分析服务器端反馈的http数据包中携带的信息,依据所述http数据包中携带的信息确定是否发起对预下载文件的下载。
  3. 根据权利要求2所述的文件下载方法,所述依据所述http数据包中携带的信息确定是否发起对预下载文件的下载具体为:依据所述http数据包中携带的content-disposition信息确定是否发起对预下载文件的下载。
  4. 根据权利要求1-3任一项所述的文件下载方法,所述通过拦截操作阻断第一浏览器内核侧对所述预下载文件的下载进一步包括:拦截第一浏览器内核的下载行为,通过实现IDownloadManager接口阻断第一浏览器内核侧对所述预下载文件的下载。
  5. 根据权利要求4所述的文件下载方法,所述拦截第一浏览器内核的下载行为,通过实现IDownloadManager接口阻断第一浏览器内核侧对所述预下载文件的下载进一步包括:拦截对IID_IDownloadManager Service接口的QueryService调用,返回实现IDownloadManager接口的类实例指针。
  6. 根据权利要求4或5所述的文件下载方法,所述方法还包括:依据IDownloadManager接口的Download函数中的参数pmk和pbc,提取预下载文件的下载地址作为所述预下载文件的下载信息。
  7. 根据权利要求1-6任一项所述的文件下载方法,其中:
    所述下载组件由所述第二浏览器内核中的独立进程提供;
    或者,所述下载组件由与浏览器独立的下载软件提供,所述与浏览器独 立的下载软件提供的下载组件通过一组接口函数与浏览器主进程通信,以供浏览器主进程对下载任务进行管理和状态查询。
  8. 根据权利要求7所述的文件下载方法,所述与浏览器独立的下载软件包括:迅雷、快播、网际快车或比特彗星。
  9. 根据权利要求1-8任一项所述的文件下载方法,在第二浏览器内核的下载组件进行下载的界面中,提供有使用第一浏览器内核进行下载的入口;
    所述文件下载方法还包括:根据用户对所述入口的选择,在所述第一浏览器内核侧重新发起对预下载文件的下载,由第一浏览器内核侧建立网络连接下载所述预下载文件。
  10. 根据权利要求1-9任一项所述的文件下载方法,在下载所述预下载文件之后还包括:启动安全组件对下载的文件进行安全扫描,并给出安全扫描的结果。
  11. 根据权利要求1-10任一项所述的文件下载方法,在下载所述预下载文件之后还包括:依据下载的文件的类型,在移动终端中进行安装下载的文件。
  12. 根据权利要求1-9任一项所述的文件下载方法,所述第一浏览器内核为Trident内核,所述第二浏览器内核为Webkit内核。
  13. 一种浏览器装置,包括处理器,该处理器运行时其中的浏览器客户端包括第一浏览器内核组件和第二浏览器内核组件,其中:
    所述第一浏览器内核组件用于发起对一预下载文件的下载,以及通过拦截操作阻断第一浏览器内核侧对所述预下载文件的下载,将所述预下载文件的下载信息发送到所述第二浏览器内核组件;
    所述第二浏览器内核组件用于接收所述预下载文件的下载信息,由下载组件在第二浏览器内核侧下载所述预下载文件。
  14. 根据权利要求13所述的浏览器装置,所述第一浏览器内核组件还用于分析服务器端反馈的http数据包中携带的信息,依据所述http数据包中携带的信息确定是否发起对预下载文件的下载。
  15. 根据权利要求14所述的浏览器装置,所述第一浏览器内核组件具 体用于依据所述http数据包中携带的content-disposition信息确定是否发起对预下载文件的下载。
  16. 根据权利要求13-15任一项所述的浏览器装置,所述第一浏览器内核组件具体用于:拦截第一浏览器内核的下载行为,通过实现IDownloadManager接口阻断第一浏览器内核侧对所述预下载文件的下载。
  17. 根据权利要求16所述的浏览器装置,所述第一浏览器内核组件具体用于:拦截对IID_IDownloadManager Service接口的QueryService调用,返回实现IDownloadManager接口的类实例指针。
  18. 根据权利要求16或17所述的浏览器装置,所述第一浏览器内核组件还用于依据IDownloadManager接口的Download函数中的参数pmk和pbc,提取预下载文件的下载地址作为所述预下载文件的下载信息。
  19. 根据权利要求13-18任一项所述的浏览器装置,其中:
    所述下载组件由所述第二浏览器内核组件中的独立进程提供;
    或者,所述下载组件与浏览器独立,所述下载组件通过一组接口函数与浏览器主进程通信,以供浏览器主进程对下载任务进行管理和状态查询。
  20. 根据权利要求19所述的浏览器装置,所述与浏览器独立的下载组件由迅雷、快播、网际快车或比特彗星提供。
  21. 根据权利要求13-20任一项所述的浏览器装置,在第二浏览器内核组件的下载组件进行下载的界面中,提供有使用第一浏览器内核组件进行下载的入口;
    所述第一浏览器内核组件还用于:根据用户对所述入口的选择,重新发起对预下载文件的下载,建立网络连接下载所述预下载文件。
  22. 根据权利要求13-21任一项所述的浏览器装置,所述第二浏览器内核组件还用于对下载的文件进行安全扫描,并给出安全扫描的结果。
  23. 根据权利要求13-22任一项所述的浏览器装置,所述第二浏览器内核组件还用于依据下载的文件的类型,在移动终端中进行安装下载的文件。
  24. 根据权利要求13-23任一项所述的浏览器装置,所述第一浏览器内核组件为Trident内核组件,所述第二浏览器内核组件为Webkit内核组件。
  25. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在客户端装置上运行时,导致所述客户端装置执行根据权利要求1-12中的任一个所述的浏览器中的文件下载方法。
  26. 一种计算机可读介质,其中存储了如权利要求25所述的计算机程序。
PCT/CN2015/070054 2014-03-31 2015-01-04 浏览器中的文件下载方法和浏览器装置 WO2015149570A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410126041.5 2014-03-31
CN201410126041.5A CN103853851B (zh) 2014-03-31 2014-03-31 浏览器中的文件下载方法和浏览器装置

Publications (1)

Publication Number Publication Date
WO2015149570A1 true WO2015149570A1 (zh) 2015-10-08

Family

ID=50861506

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/070054 WO2015149570A1 (zh) 2014-03-31 2015-01-04 浏览器中的文件下载方法和浏览器装置

Country Status (2)

Country Link
CN (1) CN103853851B (zh)
WO (1) WO2015149570A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111917807A (zh) * 2019-05-08 2020-11-10 深圳市云趣网络科技股份有限公司 一种安卓系统wap网页调起下载客户端的方法和系统

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853851B (zh) * 2014-03-31 2016-10-26 北京奇虎科技有限公司 浏览器中的文件下载方法和浏览器装置
CN104537020B (zh) * 2014-12-18 2018-03-02 北京奇虎科技有限公司 浏览器下载文件的方法、浏览器客户端和装置
CN105892830A (zh) * 2016-03-31 2016-08-24 北京金山安全软件有限公司 文件接收提醒方法及装置
CN111212418A (zh) * 2019-12-31 2020-05-29 北京指掌易科技有限公司 移动端应用安全下载装置和方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414770A (zh) * 2013-08-05 2013-11-27 贝壳网际(北京)安全技术有限公司 文件下载方法及装置、文件下载建议方法及装置
CN103605688A (zh) * 2013-11-01 2014-02-26 北京奇虎科技有限公司 一种网页广告的拦截方法、装置和浏览器
CN103853851A (zh) * 2014-03-31 2014-06-11 北京奇虎科技有限公司 浏览器中的文件下载方法和浏览器装置
CN103942277A (zh) * 2014-03-31 2014-07-23 北京奇虎科技有限公司 一种浏览器中的文件下载方法、装置和浏览器

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103294717B (zh) * 2012-02-29 2015-05-06 腾讯科技(深圳)有限公司 一种基于双内核浏览器的网页打开方法和装置
CN102932356B (zh) * 2012-11-07 2016-03-30 北京奇虎科技有限公司 多核浏览器中恶意网址拦截方法和装置
CN103391326B (zh) * 2013-08-01 2017-11-07 贝壳网际(北京)安全技术有限公司 基于浏览器的文件下载方法、系统及客户端

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103414770A (zh) * 2013-08-05 2013-11-27 贝壳网际(北京)安全技术有限公司 文件下载方法及装置、文件下载建议方法及装置
CN103605688A (zh) * 2013-11-01 2014-02-26 北京奇虎科技有限公司 一种网页广告的拦截方法、装置和浏览器
CN103853851A (zh) * 2014-03-31 2014-06-11 北京奇虎科技有限公司 浏览器中的文件下载方法和浏览器装置
CN103942277A (zh) * 2014-03-31 2014-07-23 北京奇虎科技有限公司 一种浏览器中的文件下载方法、装置和浏览器

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111917807A (zh) * 2019-05-08 2020-11-10 深圳市云趣网络科技股份有限公司 一种安卓系统wap网页调起下载客户端的方法和系统
CN111917807B (zh) * 2019-05-08 2023-04-18 深圳市云趣网络科技股份有限公司 一种安卓系统wap网页调起下载客户端的方法和系统

Also Published As

Publication number Publication date
CN103853851B (zh) 2016-10-26
CN103853851A (zh) 2014-06-11

Similar Documents

Publication Publication Date Title
US9832210B2 (en) Multi-core browser and method for intercepting malicious network address in multi-core browser
WO2015149570A1 (zh) 浏览器中的文件下载方法和浏览器装置
US9747441B2 (en) Preventing phishing attacks
TW201441829A (zh) 頁面處理方法和裝置以及頁面生成方法和裝置
US20150012924A1 (en) Method and Device for Loading a Plug-In
WO2016101635A1 (zh) 一种同步登录状态的方法、装置、设备和计算机存储介质
JP5757533B2 (ja) ウェブブラウザ経由のアプリケーションに対するコンテンツ入力
US11503070B2 (en) Techniques for classifying a web page based upon functions used to render the web page
WO2015043383A1 (zh) 一种进行网页加载的方法、装置和浏览器
US20160269433A1 (en) Method and system for checking security of url for mobile terminal
CN107291759B (zh) 浏览器页面资源的处理方法和装置
US11055408B2 (en) Endpoint detection and response attack process tree auto-play
WO2014176895A1 (en) Method, terminal, server and system for page jump
EP3213193B1 (en) Monitoring and correlating a binary process in a distributed business transaction
JP6687761B2 (ja) 結合装置、結合方法および結合プログラム
EP3175365A1 (en) Web redirection for content filtering
BR112016010052B1 (pt) Método e aparelho de processamento de operação de página, e terminal
US20140325089A1 (en) Method, terminal, server and system for page jump
WO2012094965A1 (zh) 提示消息呈现方法、终端和服务器
US10067862B2 (en) Tracking asynchronous entry points for an application
JP6196740B2 (ja) ダウンロードに利用可能なアプリケーションについてユーザに知らせるためのシステム及び方法
US11082437B2 (en) Network resources attack detection
WO2017088369A1 (zh) 数据跨域请求方法、设备及系统
JP6169497B2 (ja) 接続先情報判定装置、接続先情報判定方法、及びプログラム
WO2017054716A1 (zh) 识别被劫持浏览器的方法及浏览器

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: 15772418

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase
122 Ep: pct application non-entry in european phase

Ref document number: 15772418

Country of ref document: EP

Kind code of ref document: A1