WO2014206109A1 - 文件下载方法、预览下载文件的方法及预览信息生成方法 - Google Patents

文件下载方法、预览下载文件的方法及预览信息生成方法 Download PDF

Info

Publication number
WO2014206109A1
WO2014206109A1 PCT/CN2014/072738 CN2014072738W WO2014206109A1 WO 2014206109 A1 WO2014206109 A1 WO 2014206109A1 CN 2014072738 W CN2014072738 W CN 2014072738W WO 2014206109 A1 WO2014206109 A1 WO 2014206109A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
preview
server
information
requested
Prior art date
Application number
PCT/CN2014/072738
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 WO2014206109A1 publication Critical patent/WO2014206109A1/zh

Links

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/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • 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

Definitions

  • the present invention relates to the field of file downloading, and more particularly to a file downloading method and a file downloading system.
  • Background Art A user downloads a compressed file (mr or zip type compressed file) and a document type file through a terminal device browser.
  • the present invention provides a file downloading method and system, which can obtain preview information of a file to be downloaded from a preview server after issuing a file download request to a download file server in a browser of the terminal device. Thereby determining whether to perform file downloading, thereby reducing the possibility of downloading to the file content that the user does not expect.
  • a file downloading method including: after transmitting a file download request to a file server, the terminal device sends a URL address included in the file download request to the preview server; the terminal device receives the preview server Preview information, wherein the preview information is information that the preview server matches in the preview server that is determined to match the requested file based on the received URL address; and the terminal device determines, according to the preview information, whether the file server needs to be downloaded from the file server Requested file.
  • the file downloading method further includes: receiving, by the terminal device, a file length returned by the file server and/or a hash value of the file; and the terminal device Sending the received file length and/or the hash value of the file to the preview server together with the URL address, wherein the preview server determines the preview server based on the received URL address, file length, and/or hash value of the file. Whether there is preview information matching the file to be requested.
  • the terminal device after transmitting the file download request to the file server, the terminal device sends the URL (Uniform Resource Locator) address included in the file download request to the preview server; the preview server is Determining, after the preview server has the preview information matching the requested downloaded file in the preview server, transmitting the preview information to the terminal device; and determining, by the terminal device, whether the The file server downloads the requested file.
  • URL Uniform Resource Locator
  • the file downloading method may further include: after the terminal device sends the file download request to the file server, the file server returns a file length and/or a hash value of the file to the terminal device; The terminal device sends the received file length and/or the hash value of the file to the preview server together with the URL address, wherein the preview server determines, according to the received URL address, whether there is a file requested to be downloaded in the preview server.
  • the matching preview information includes: The preview server determines whether there is preview information matching the file to be requested in the preview server based on the received URL address, the file length, and/or the hash value of the file.
  • the cookie information is further sent, and the file downloading method may further include: determining, at the preview server, based on the received URL address After the preview information matching the requested downloaded file does not exist in the preview server, the requested file is obtained from the file server based on the URL address and the cookie information; the preview server is based on the acquired file, according to the predetermined preview information. Generate a policy, generate a preview message and send it to the terminal device.
  • the terminal device when the terminal device transmits a file download request to the file server by using the user agent, the terminal device sends the user agent to the preview server in addition to transmitting the URL address and the cookie information to the preview server. And reference address.
  • a file downloading system including a terminal device, a file server, and a preview server
  • the terminal device includes: a file download request sending unit, configured to send a file download request to the file server,
  • the file download request includes a URL address;
  • a preview matching information sending unit configured to send the URL address to the preview server after sending the file download request to the file server;
  • a download determining unit configured to receive the preview information according to the preview server Determining whether it is necessary to download the requested file from the file server;
  • the preview server includes: a matching unit, configured to determine, based on the URL address received from the terminal device, whether there is a preview in the preview server that matches the requested downloaded file
  • the information sending unit is configured to send the preview information to the terminal device when there is preview information matching the requested downloaded file in the preview server.
  • the preview matching information transmitting unit is further configured to send the cookie information to the preview server
  • the preview server may further include: a file obtaining unit, configured to receive the The obtained URL address determines that the preview information matching the requested downloaded file does not exist in the preview server, acquires the requested file from the file server based on the URL address and the cookie information; and the preview information generating unit is configured to: Based on the acquired file, a policy is generated according to the predetermined preview information, and preview information is generated.
  • a file downloading method including: a preview matching information sending unit, configured to send a URL address included in a file download request to a preview server after sending a file download request to a file server; a unit, configured to receive preview information from a preview server, where the preview information is information that is determined by the preview server to be matched in the preview server and that is requested to be downloaded based on the received URL address; and a download determining unit, Used to determine from the preview information whether the requested file needs to be downloaded from the file server.
  • a method for previewing a downloaded file comprising: after transmitting a file download request to a file server, the terminal device sends the URL address included in the file download request to the preview server; the terminal device receives The preview information from the preview server, wherein the preview information is information that the preview server matches in the preview server that matches the requested downloaded file determined based on the received URL address; the terminal device displays the preview information.
  • a preview information generating method comprising: determining a type of a file requested to be downloaded; and when the type of the requested file is a document type file, The screenshots of the page capture form a picture to generate preview information; when the requested file is a compressed type file, the unzipped directory screenshot and the screenshot taken for the predetermined page in the randomly extracted document are combined to form a picture to generate Preview information; when the requested file is a video type file, a plurality of key frame screenshots taken based on the video time point are combined to form a picture to generate preview information.
  • a computer readable medium having program code executable by a processor, when executed, causes the processor to perform the steps of: transmitting a file download request to a file server After the terminal device sends the URL address included in the file download request to the preview server, and causes the terminal device to receive preview information from the preview server, where the preview information is received by the preview server.
  • the obtained URL address determines information existing in the preview server that matches the requested downloaded file; and causes the terminal device to determine whether it is necessary to download the requested file from the file server according to the preview information.
  • a computer program for performing any of the file downloading methods provided by the present invention is provided.
  • a file downloading apparatus comprising: a preview matching information sending unit, configured to send, after sending a file download request to a file server, a URL address included in the file download request to a preview unit, configured to receive preview information from the preview server, where the preview information is determined by the preview server based on the received URL address and is present in the preview server The downloaded file matching information; a download determining unit, configured to determine, according to the preview information, whether the requested file needs to be downloaded from the file server.
  • the preview information of the file to be downloaded is obtained from the preview server, thereby determining whether to perform file downloading, thereby reducing downloading to the user.
  • the possibility of undesired file content is described in the following detailed description.
  • the following description and the annexed drawings set forth in detail However, these aspects are indicative of only some of the various ways in which the principles of the invention may be employed. Further, the present invention is intended to include all such aspects and their equivalents.
  • FIG. 1 shows a flow chart of a file downloading method in accordance with an embodiment of the present invention
  • FIG. 2 shows a block schematic diagram of a file downloading system in accordance with an embodiment of the present invention.
  • the same reference numerals are used throughout the drawings to refer to the Specific Pulmonary Aspects Various aspects of the present disclosure are described below. It should be understood that the teachings herein may be embodied in a variety of forms, and that any specific structure, function, or both disclosed herein are merely representative.
  • FIG. 1 shows a flowchart of a file downloading method performed by a file downloading system including a terminal device, a file server, and a preview server, according to an embodiment of the present invention.
  • a browser is installed on the terminal device, and the browser has a download function.
  • the file server stores a file for downloading by the terminal device, and the file server is assigned a URL address, and the terminal device can use the URL address to access the file server to download the file.
  • the preview server is an intermediate server for searching for matching preview information in the preview server according to the URL address or other preview matching information, and sending the found preview information to the terminal device for preview viewing to determine whether to download. The details will be described below with reference to FIG. 1.
  • a file download request is sent to the file server, and the file download request includes a URL address of the file server.
  • the file server After receiving the file download request sent by the terminal device, in step S120, the file server returns the file length of the requested file, the hash value of the file, and the cookie value of the request to the terminal device.
  • the hash value of the file is obtained by performing a hash operation on the requested downloaded file by using the MD5 algorithm.
  • the terminal device transmits the URL address, the file length, the hash value of the file, and the cookie value to the preview server.
  • the preview server determines whether the preview server is based on the received URL address, the file length, and the hash value of the file. There is preview information that matches the file requested to be downloaded.
  • the preview information is generated based on a predetermined preview information generation policy, which is processed after processing the requested file previously acquired from the file server.
  • the preview information is generated as above, the preview information, the file length, and/or the hash value of the file are stored on the preview server, and the file is deleted at the same time.
  • the preview server determines whether there is matching preview information based on the received URL address, file length, and hash value of the file, the hash value of the file is preferentially utilized. After the hash value of the file is matched, it is determined whether the length of the file is equal to the length of the file stored in the preview server. If they are the same, the preview information is considered to be a match.
  • the predetermined preview information generating policy may include: when the requested file is a document type file, composing a screenshot of a screenshot taken for a predetermined page in the document to generate preview information; When the file is a compressed type file, a screenshot of the decompressed directory and a screenshot taken for a predetermined page in the randomly extracted document are combined to generate a preview image; and/or when the requested file is a video type file, A plurality of key frame screenshots taken based on the video time point form a picture to generate preview information.
  • the preview information may also be part of the content of the file, a certain piece of data of the audio and video, and the like.
  • the predetermined preview information generation policy may include: 1) for a document type file, such as pdf, ppt, word, exceL txt, html, etc., the preview information may be by the document 1 page, the 1/4 page, 3/4 page and the last page generated by the total number of pages, form a picture.
  • the number of pages can be set dynamically.
  • the preview information can be a screenshot of the decompressed directory, plus the randomly extracted document and according to the algorithm of 1 above The generated screenshot.
  • the number of documents can be set dynamically.
  • step S140 For video type files, such as mp4, 3gp, rawb, etc., according to the video time point from the video Get 9 keyframes, take a screenshot of the 9 keyframes and form a map as preview information. It is also possible to consider other screenshot modes, for example, for an average divided frame, the first frame, the middle 2 frames, and the last frame may be intercepted to form a picture.
  • step S140 a file download request is transmitted to the file server based on the URL address and the cookie information (step S150).
  • the file server transmits the requested downloaded file to the preview server (step S160).
  • step S170 the preview server generates a preview information according to the predetermined preview information generation strategy based on the acquired file, and then the flow proceeds to the step.
  • step S140 When it is determined in step S140 that the preview information exists, the flow proceeds to step S180.
  • step S180 the preview server transmits the preview information to the terminal device.
  • the terminal device determines, according to the preview information, whether to download the requested file from the file server, in step S190. For example, the terminal device can provide the user with a confirmation of whether the file is a file desired by the user by displaying the preview information to the user. If so, it is determined to download the requested file from the file server. If not, it is determined that the requested file is not downloaded from the file server.
  • the method may further include step S150 to step S170, but send a prompt message to the terminal device: "The preview information does not exist on the preview server. Then, the terminal device determines, by the prompt information, whether to download the requested file from the file server.
  • the information returned from the file server to the terminal device in step S120 may be one or more of a file length, a hash value of the file, and a cookie.
  • the terminal device when the terminal device sends a file download request to the file server by using the user agent, the terminal device sends a user agent and a reference address (Referer) to the preview server in addition to sending the URL address and the cookie information to the preview server.
  • the file downloading method may not include step S120, step S140 to step S170.
  • the terminal device transmits only the URL address to the preview server.
  • the preview server determines whether there is preview information based on the URL address.
  • the terminal device transmits the cookie address to the preview server
  • the cookie information is also transmitted
  • the downloaded file is a file supporting the partial processing
  • the preview server After determining that there is no preview information matching the requested downloaded file in the preview server based on the received URL address (or the URL address, the file length, and/or the hash value of the file), The URL address and cookie information are described, and the requested file is downloaded from the file server. Then, the preview server generates a policy according to the predetermined preview information based on the partial file content in the acquired file, generates the preview information, and sends the preview information to the terminal device without waiting for the entire content of the file to be acquired.
  • the preview server can allow the user to preview the content of the file to be downloaded, thereby reducing the false download rate, thereby saving user traffic and time. For example, if a user downloads a large video file, the method can be used to obtain a picture containing 9 key frame screenshot information to determine whether a download is needed. Alternatively, when the user downloads a large zip file, this method can be used to obtain a picture containing the directory and the screenshot of the document content to determine whether it needs to be downloaded.
  • FIG. 2 shows a block schematic diagram of a file download system 1 in accordance with an embodiment of the present invention. As shown in FIG. 2, the file download system 1 includes a terminal device 10, a file server 20, and a preview server 30.
  • the terminal device 10 includes a file download request transmitting unit 110, a preview matching information transmitting unit 120, and a download determining unit 130.
  • the preview server 30 includes a matching unit 310 and a preview information transmitting unit 320.
  • the file download request transmitting unit 110 sends the file to the file server
  • the file server 20 sends a file download request, the file download request including a URL address. Then, the preview matching information transmitting unit 120 transmits the URL address to the preview server 30. After receiving the URL address, the matching unit 310 determines whether there is preview information matching the requested downloaded file in the preview server based on the URL address received from the terminal device. When there is preview information, the preview information transmitting unit 320 transmits the preview information to the terminal device 10. After the preview information received from the preview server, the download determining unit 130 determines whether it is necessary to download the requested file from the file server based on the preview information. In an alternative example of the present invention, after receiving the file download request sent by the terminal device 10, the file server 20 may return the cookie information to the terminal device.
  • the preview matching information transmitting unit 120 is further configured to transmit cookie information to the preview server, and at this time, the preview server 30 may further include a file acquiring unit and a preview information generating unit (not shown).
  • the file obtaining unit is configured to determine, at the preview server based on the received URL address, that the download is not present in the preview server and the requested download After the file matches the preview information, the requested file is obtained from the file server based on the URL address and the cookie information.
  • the preview information generating unit is configured to generate a preview information according to the predetermined preview information generation strategy based on the acquired file.
  • the file server 20 may also return a hash value of the text length and/or text to the terminal device.
  • the matching unit 310 determines whether there is preview information matching the requested downloaded file in the preview server based on the URL address, the text length, and/or the hash value of the text. .
  • the terminal device may be a mobile terminal, or any other type of terminal device, such as a notebook, a PC, or the like.
  • the mobile terminal of the present invention may be various types of smart mobile terminals, such as smart phones.
  • the method according to the invention may also be embodied as a computer program product comprising a computer readable medium on which is stored a computer program for performing the above-described functions defined in the method of the invention .
  • An embodiment of the present invention provides a computer readable medium having program code executable by a processor.
  • the program code When executed, the program code causes the processor to perform the following steps: after transmitting a file download request to the file server, causing the terminal device Sending the URL address included in the file download request to the preview server; causing the terminal device to receive the preview information from the preview server, wherein the preview server determines the file existing in the preview server and the requested download based on the received URL address Matching preview information; causing the terminal device to determine whether it is necessary to download the requested file from the file server based on the preview information.
  • the method steps and system units described above may also be implemented with a controller and a computer readable storage device for storing a computer program that causes the controller to implement the steps or unit functions described above.
  • a program for executing the file downloading method of the embodiment of the present invention may be stored in a computer readable storage medium. Accordingly, an embodiment of the present invention further provides a computer readable storage medium storing a program for executing a file downloading method of an embodiment of the present invention.
  • the mobile terminal of the present invention may be various handheld terminal devices, such as a mobile phone, a personal digital assistant (PDA), etc., and thus the scope of protection of the present invention should not be limited to a particular type of mobile terminal.
  • the method according to the invention can also be implemented as a computer program executed by a CPU. When the computer program is executed by the CPU, the above-described functions defined in the method of the present invention are performed.
  • a computer readable storage device eg, a memory
  • a computer readable storage device can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory.
  • non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash.
  • Volatile memory can include random access memory (RAM), which can act as external cache memory.
  • RAM can be obtained in a variety of forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDR).
  • SDRAM Secure Digital RAM
  • ESDRAM Enhanced SDRAM
  • SLDRAM Synchronous Link DRAM
  • RAM DRRAM
  • DSP digital signal processor
  • ASIC dedicated An integrated circuit
  • FPGA field programmable gate array
  • a general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller or state machine.
  • the processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
  • a software unit may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to the processor, such that the processor can read information from or write information to the storage medium.
  • the storage medium can be integrated with a processor.
  • the processor and the storage medium can reside in an ASIC.
  • the ASIC can reside in the user terminal.
  • the processor and the storage medium may reside as a discrete component in the user terminal.
  • the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted as one or more instructions or code on a computer readable medium.
  • Computer readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another.
  • a storage medium may be any available media that can be accessed by a general purpose or special purpose computer.
  • the computer readable medium may comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage device, disk storage device or other magnetic storage device, or may be used to carry or store a form of instructions Or the required program code of the data structure and any other medium that can be accessed by a general purpose or special purpose computer or a general purpose or special purpose processor. Also, any connection is properly termed a computer-readable medium.
  • a magnetic disk and an optical disk include a compact disk (CD), a laser disk, an optical disk, a digital versatile disk (DVD), a floppy disk, a Blu-ray disk, in which a disk generally reproduces data magnetically, and the optical disk is optically reproduced using a laser. data.

Landscapes

  • Engineering & Computer Science (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)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明提供了一种文件下载方法和系统。该文件下载方法包括:在向文件服务器发送文件下载请求后,终端设备将所述文件下载请求中包含的URL地址发送给预览服务器;预览服务器在基于所接收到的URL地址确定出在所述预览服务器中存在与所请求下载的文件匹配的预览信息后,将所述预览信息发送给终端设备;以及终端设备根据所述预览信息确定是否需要从所述文件服务器下载所请求的文件。利用该方法,可以通过预览服务器,使得用户能够预览到即将下载文件内容,从而减少误下载率,节约用户的流量和时间。

Description

文件下载方法、 预览下载文件的方法及预览信息生成雄
技术领域 本发明涉及文件下载领域,更为具体地,涉及一种文件下载方法及文件下载系统。 背景技术 在用户通过终端设备浏览器下载压縮文件(mr或 zip型压縮文件)、文档类型文件
(pdf, ppt, doc, excel, txt等)、 视频等类型的文件时, 在下载前, 通常都无法预览 该文件内容, 因此也无法确认该文件内容是不是自己想要下载的内容。 比如, 如果某 个用户向服务器上传了一个名字为 "中华历史"但是内容却为 "英语教材"的文档; 则在 这种情况下, 一些用户通过搜索"中华历史"找到这个文档并进行下载, 然而该文档不 是用户想要的文档, 从而浪费了用户的时间和精力。 而且, 对于通过终端设备下载的 用户而言, 针对一些文件体积比较大的上述类型的文件, 如果下载的是一个错误的内 容, 还会浪费用户的流量, 增加用户不必要的成本。 发明内容 鉴于上述, 本发明提出了一种文件下载方法及系统, 该方法及系统可以通过在终 端设备浏览器向下载文件服务器发出文件下载请求后, 从预览服务器获取要下载的文 件的预览信息, 从而确定是否进行文件下载, 由此降低下载到用户不期望的文件内容 的可能性。 根据本发明的一个方面, 提供了一种文件下载方法, 包括: 在向文件服务器发送 文件下载请求后,终端设备将文件下载请求中包含的 URL地址发送给预览服务器; 终 端设备接收来自预览服务器的预览信息, 其中, 预览信息是预览服务器基于所接收到 的 URL地址确定出的在预览服务器中存在的与所请求下载的文件匹配的信息;以及终 端设备根据预览信息确定是否需要从文件服务器下载所请求的文件。 在上述方面本发明的一个或多个示例中, 在向文件服务器发送文件下载请求后, 文件下载方法还包括: 终端设备接收文件服务器返回的文件长度和 /或文件的哈希值; 以及终端设备将所接收的文件长度和 /或文件的哈希值与 URL地址一起发送给预览服 务器, 其中, 预览服务器基于所接收到的 URL地址、 文件长度和 /或文件的哈希值, 确定在预览服务器中是否存在与要请求的文件匹配的预览信息。 在本发明的一个或多个示例中, 在向文件服务器发送文件下载请求后, 终端设备 将文件下载请求中包含的 URL (统一资源标识符, Uniform Resource Locator) 地址发 送给预览服务器;预览服务器在基于所接收到的 URL地址确定出在预览服务器中存在 与所请求下载的文件匹配的预览信息后, 将所述预览信息发送给终端设备; 以及终端 设备根据所述预览信息确定是否需要从所述文件服务器下载所请求的文件。 在本发明的一个或多个示例中, 所述文件下载方法还可以包括: 在终端设备向文 件服务器发送文件下载请求后, 文件服务器向终端设备返回文件长度和 /或文件的哈希 值; 以及终端设备将所接收的文件长度和 /或文件的哈希值与所述 URL地址一起发送 给预览服务器,其中,预览服务器基于所接收到的 URL地址确定预览服务器中是否存 在与所请求下载的文件匹配的预览信息包括: 预览服务器基于所接收到的 URL地址、 文件长度和 /或文件的哈希值, 确定在预览服务器中是否存在与要请求的文件匹配的预 览信息。 在本发明的一个或多个示例中, 在终端设备向预览服务器发送所述 URL地址时, 还发送 Cookie信息, 所述文件下载方法还可以包括: 在预览服务器在基于所接收到的 URL地址确定出在预览服务器中不存在与所请求下载的文件匹配的预览信息后, 基于 所述 URL地址和 Cookie信息, 从文件服务器获取所请求的文件; 预览服务器基于所 获取的文件, 根据预定的预览信息生成策略, 生成预览信息并发送给终端设备。 在本发明的一个或多个示例中, 所述预定的预览信息生成策略可以包括: 在所请 求的文件是文档类型文件时, 将针对文档中的预定页截取的截图组成一张图片来生成 预览信息; 在所请求的文件是压縮类型文件时, 将解压后的目录截图以及针对随机抽 取的文档中预定页截取的截图组成一张图片来生成预览信息; 和 /或在所请求的文件是 视频类型文件时, 将基于视频时间点截取的多个关键帧截图组成一张图片来生成预览 =自 在本发明的一个或多个示例中, 当在终端设备向预览服务器发送所述 URL 地址 时, 还发送 Cookie信息, 并且所下载的文件是支持部分处理的文件时, 所述文件下载 方法可以包括:预览服务器在基于所接收到的 URL地址确定出在预览服务器中不存在 与所请求下载的文件匹配的预览信息后, 基于所述 URL地址和 Cookie信息, 从文件 服务器下载所请求的文件; 预览服务器基于所获取的文件中的部分文件内容, 根据预 定的预览信息生成策略, 生成预览信息并发送给终端设备。 在本发明的一个或多个示例中, 在终端设备利用用户代理向文件服务器发送文件 下载请求时, 除了向预览服务器发送所述 URL地址和 Cookie信息之外, 终端设备还 向预览服务器发送用户代理和引用地址。 根据本发明的另一方面, 提供了一种文件下载系统, 包括终端设备、 文件服务器 和预览服务器, 所述终端设备包括: 文件下载请求发送单元, 用于向文件服务器发送 文件下载请求, 所述文件下载请求包含 URL地址; 预览匹配信息发送单元, 用于在向 文件服务器发送文件下载请求后,将所述 URL地址发送给预览服务器; 以及下载确定 单元, 用于根据从预览服务器接收的预览信息确定是否需要从所述文件服务器下载所 请求的文件;所述预览服务器包括:匹配单元,用于基于从终端设备接收的 URL地址, 确定在预览服务器中是否存在与所请求下载的文件匹配的预览信息; 预览信息发送单 元, 用于在预览服务器中存在与所请求下载的文件匹配的预览信息时, 将预览信息发 送给终端设备。 在本发明的一个或多个示例中, 所述预览匹配信息发送单元还被配置为向预览服 务器发送 Cookie信息, 所述预览服务器还可以包括: 文件获取单元, 用于在预览服务 器在基于所接收到的 URL地址确定出在预览服务器中不存在与所请求下载的文件匹 配的预览信息后, 基于所述 URL地址和 Cookie信息, 从文件服务器获取所请求的文 件; 以及预览信息生成单元, 用于基于所获取的文件, 根据预定的预览信息生成策略, 生成预览信息。 根据本发明的一个方面, 提供了一种文件下载方法, 包括: 预览匹配信息发送单 元,用于在向文件服务器发送文件下载请求后,将文件下载请求中包含的 URL地址发 送给预览服务器; 接收单元, 用于接收来自预览服务器的预览信息, 其中, 预览信息 是预览服务器基于所接收到的 URL 地址确定出的在预览服务器中存在的与所请求下 载的文件匹配的信息; 以及下载确定单元, 用于根据预览信息确定是否需要从文件服 务器下载所请求的文件。 根据本发明的一个方面, 提供了一种预览下载文件的方法, 该方法包括: 在向文 件服务器发送文件下载请求后,终端设备将文件下载请求中包含的 URL地址发送给预 览服务器; 终端设备接收来自预览服务器的预览信息, 其中, 预览信息是预览服务器 基于所接收到的 URL地址确定出的在预览服务器中存在的与所请求下载的文件匹配 的信息; 终端设备显示预览信息。 根据本发明的一个方面, 提供了一种预览信息生成方法, 该方法包括: 判断所请 求下载的文件的类型; 在所请求的文件的类型是文档类型文件时, 将针对文档中的预 定页截取的截图组成一张图片来生成预览信息; 在所请求的文件是压縮类型文件时, 将解压后的目录截图以及针对随机抽取的文档中预定页截取的截图组成一张图片来生 成预览信息; 在所请求的文件是视频类型文件时, 将基于视频时间点截取的多个关键 帧截图组成一张图片来生成预览信息。 根据本发明的一个方面, 提供了一种具有处理器可执行的程序代码的计算机可读 介质, 在被执行时, 所述程序代码使得处理器执行下述步骤: 在向文件服务器发送文 件下载请求后, 使终端设备将所述文件下载请求中包含的 URL 地址发送给预览服务 器; 使所述终端设备接收来自所述预览服务器的预览信息, 其中, 所述预览信息是所 述预览服务器基于所接收到的 URL 地址确定出的在所述预览服务器中存在的与所请 求下载的文件匹配的信息; 使所述终端设备根据所述预览信息确定是否需要从文件服 务器下载所请求的文件。 根据本发明的一个方面, 提供了一种计算机程序, 其特征在于, 用于执行本发明 提供的任一种文件下载方法。 根据本发明的一个方面, 提供了一种文件下载装置, 该装置包括: 预览匹配信息 发送单元, 用于在向文件服务器发送文件下载请求后, 将所述文件下载请求中包含的 URL地址发送给预览服务器; 接收单元, 用于接收来自所述预览服务器的预览信息, 其中,所述预览信息是所述预览服务器基于所接收到的 URL地址确定出的在所述预览 服务器中存在的与所请求下载的文件匹配的信息; 下载确定单元, 用于根据所述预览 信息确定是否需要从文件服务器下载所请求的文件。 利用上述文件下载方法及系统, 可以通过在终端设备浏览器向下载文件服务器发 出文件下载请求后, 从预览服务器获取要下载的文件的预览信息, 从而确定是否进行 文件下载, 由此降低下载到用户不期望的文件内容的可能性。 为了实现上述以及相关目的, 本发明的一个或多个方面包括后面将详细说明并在 权利要求中特别指出的特征。 下面的说明以及附图详细说明了本发明的某些示例性方 面。 然而, 这些方面指示的仅仅是可使用本发明的原理的各种方式中的一些方式。 此 夕卜, 本发明旨在包括所有这些方面以及它们的等同物。 附图说明 根据下述参照附图进行的详细描述, 本发明的上述和其他目的、 特征和优点将变 得更加显而易见。 在附图中: 图 1示出了根据本发明的实施例的文件下载方法的流程图; 和 图 2示出了根据本发明的实施例的文件下载系统的方框示意图。 在所有附图中相同的标号指示相似或相应的特征或功能。 具体实肺式 下面描述本公开的各个方面。 应该明白的是, 本文的教导可以以多种多样形式 具体体现, 并且在本文中公开的任何具体结构、 功能或两者仅仅是代表性的。 基于 本文的教导, 本领域技术人员应该明白的是, 本文所公开的一个方面可以独立于任 何其它方面实现,并且这些方面中的两个或多个方面可以按照各种方式组合。例如, 可以使用本文所阐述的任何数目的方面, 实现装置或实践方法。 另外, 可以使用其 它结构、 功能、 或除了本文所阐述的一个或多个方面之外或不是本文所阐述的一个 或多个方面的结构和功能, 实现这种装置或实践这种方法。 此外, 本文所描述的任 何方面可以包括权利要求的至少一个元素。 下面将参照附图描述本发明的各个实施例。 图 1示出了根据本发明的实施例的文件下载方法的流程图, 所述文件下载方法 由文件下载系统执行, 该文件下载系统包括终端设备、 文件服务器和预览服务器。 所述终端设备上安装有浏览器, 该浏览器具备下载功能。 文件服务器上存储有供终 端设备下载的文件,该文件服务器被分配一个 URL地址,终端设备可以利用该 URL 地址访问该文件服务器来下载文件。 预览服务器是一个中间服务器, 用于根据 URL 地址或者其它预览匹配信息, 在预览服务器中查找匹配的预览信息, 并且将查找出 的预览信息发送给终端设备来进行预览查看, 从而确定是否进行下载。 下面结合图 1进行具体说明。 如图 1所示, 在终端设备需要从文件服务器下载文件时, 在步骤 S110, 向文件 服务器发送文件下载请求,所述文件下载请求包括该文件服务器的 URL地址。在接 收到终端设备发送的文件下载请求后, 在步骤 S120, 文件服务器向终端设备返回所 请求下载的文件的文件长度、 文件的哈希值以及该次请求的 Cookie值。所述文件的 哈希值是利用 MD5算法对所请求下载的文件执行散列运算获得。 然后,在步骤 S130,终端设备将 URL地址、文件长度、文件的哈希值以及 Cookie 值发送给预览服务器。 在接收到 URL地址、文件长度、文件的哈希值以及 Cookie值后,在步骤 S140, 预览服务器基于所接收到的 URL地址、文件长度以及文件的哈希值, 确定在所述预 览服务器中是否存在与所请求下载的文件匹配的预览信息。 所述预览信息是基于预 定的预览信息生成策略,对先前从文件服务器获取的所请求的文件进行处理后生成。 在如上生成预览信息后, 在预览服务器上存储预览信息、 文件长度和 /或文件的哈希 值, 同时删除该文件。 在预览服务器基于所接收到的 URL地址、文件长度和文件的哈希值确定是否存 在匹配的预览信息时, 优先利用文件的哈希值。 在文件的哈希值匹配后, 再判断该 文件长度是否与预览服务器中存储的文件长度相等。 如果相同, 则认为该预览信息 是匹配的。 在本发明中, 所述预定的预览信息生成策略可以包括: 在所请求的文件是文档 类型文件时, 将针对文档中的预定页截取的截图组成一张图片来生成预览信息; 在 所请求的文件是压縮类型文件时, 将解压后的目录截图以及针对随机抽取的文档中 预定页截取的截图组成一张图片来生成预览信息; 和 /或在所请求的文件是视频类型 文件时, 将基于视频时间点截取的多个关键帧截图组成一张图片来生成预览信息。 所述预览信息还可以是文件的部分内容、 音视频的其中某一段数据等。 例如, 在本发明的一个示例中, 所述预定的预览信息生成策略可以包括: 1 ) 针对文档类型文件, 如 pdf、 ppt、 word、 exceL txt、 html等格式, 预览信 息可以是由文档的第 1页, 总页数的 1/4页、 3/4页以及最后一页所生成的截图, 组 成一张图片。 这里, 页数可以动态设置。
2) 针对压縮类型文件, 如 mr、 zip, 7zip等格式, 其内容是由目录和文档类型 文件组成, 预览信息可以是解压后的目录截图, 再加上随机抽取文档并根据上述 1 的算法所生成的截图。 这里, 文档数可以动态设置。
3 )针对视频类型文件, 如 mp4、 3gp、 rawb等格式, 根据视频时间点从视频中 获取 9个关键帧, 对这 9个关键帧进行截图并形成一张图, 作为预览信息。 也可以 是考虑其他截图方式, 例如对于平均分的帧, 可以截取第一帧、 中间 2帧、 最后一 帧, 形成一张图。 当在步骤 S140中确定不存在预览信息时, 基于所述 URL地址和 Cookie信息, 向文件服务器发送文件下载请求 (步骤 S150)。 然后, 文件服务器将所请求下载的 文件发送给预览服务器 (步骤 S160)。 然后, 在步骤 S170, 预览服务器基于所获取 的文件, 根据上述预定的预览信息生成策略, 生成预览信息, 随后流程进行到步骤
在步骤 S140中确定存在预览信息时, 流程进行到步骤 S180。 在步骤 S180, 预 览服务器将所述预览信息发送给终端设备。 在接收到预览信息后, 在步骤 S190, 终 端设备根据所述预览信息确定是否从所述文件服务器下载所请求的文件。 例如, 终 端设备可以通过向用户显示该预览信息来供用户确认该文件是否是用户期望的文 件。 如果是, 则确定从所述文件服务器下载所请求的文件。 如果否, 则确定不从所 述文件服务器下载所请求的文件。 在本发明的替换示例中, 当在步骤 S140中确定不存在预览信息后,所述方法还 可以不包括步骤 S150到步骤 S170,而是向终端设备发送一个提示信息 "预览服务器 上不存在预览信息",然后, 终端设备根据该提示信息自行确定是否从文件服务器下 载所请求的文件。 在本发明的替换示例中,在步骤 S120中从文件服务器向终端设备返回的信息可 以是文件长度、 文件的哈希值和 Cookie中的一种或多种。 此外, 在终端设备利用用 户代理向文件服务器发送文件下载请求时,除了向预览服务器发送所述 URL地址和 Cookie信息之外, 终端设备还向预览服务器发送用户代理和引用地址 (Referer)。 在本发明的替换示例中,所述文件下载方法还可以不包括步骤 S120,步骤 S140 到步骤 S170。 并且在步骤 S130中, 终端设备仅仅向预览服务器发送 URL地址。 在 步骤 S140中, 预览服务器基于 URL地址确定是否存在预览信息。 此外,在本发明的替换示例中, 当在终端设备向预览服务器发送所述 URL地址 时, 还发送 Cookie信息, 并且所下载的文件是支持部分处理的文件时, 预览服务器 可以在基于所接收到的 URL地址(或者, URL地址、文件长度和 /或文件的哈希值) 确定出在所述预览服务器中不存在与所请求下载的文件匹配的预览信息后, 基于所 述 URL地址和 Cookie信息, 从文件服务器下载所请求的文件。 然后, 预览服务器 基于所获取的文件中的部分文件内容, 根据预定的预览信息生成策略, 生成预览信 息并发送给终端设备, 而无需等到获取文件的全部内容。 利用上述文件下载方法, 通过预览服务器, 可以让用户预览到即将下载文件内 容, 从而减少误下载率, 进而节约用户的流量和时间。 例如, 假设用户下载一个很 大的视频文件, 则可以利用该方法获取一张包含 9个关键帧截图信息的图片来判断 是否需要下载。 或者, 在用户下载一个很大的 zip压縮文件时, 可以利用该方法获 取一张包含了目录以及文档内容截图的图片来判断是否需要下载。 图 2示出了根据本发明的实施例的文件下载系统 1的方框示意图。如图 2所示, 文件下载系统 1包括终端设备 10、 文件服务器 20和预览服务器 30。 所述终端设备 10包括文件下载请求发送单元 110、预览匹配信息发送单元 120和下载确定单元 130。 所述预览服务器 30包括匹配单元 310和预览信息发送单元 320。 在需要从文件服务器 20下载文件时,文件下载请求发送单元 110向文件服务器
20发送文件下载请求, 所述文件下载请求包含 URL地址。 然后, 预览匹配信息发 送单元 120将所述 URL地址发送给预览服务器 30。 在接收到所述 URL地址后, 匹配单元 310基于从终端设备接收的 URL地址, 确定在所述预览服务器中是否存在与所请求下载的文件匹配的预览信息。 在存在预 览信息时, 预览信息发送单元 320将该预览信息发送给终端设备 10。 在从预览服务 器接收的预览信息后, 下载确定单元 130根据所述预览信息确定是否需要从所述文 件服务器下载所请求的文件。 在本发明的替换示例中,在接收到终端设备 10发送的文件下载请求后, 文件服 务器 20可以向终端设备返回 Cookie信息。 在这种情况下, 所述预览匹配信息发送 单元 120还被配置为向预览服务器发送 Cookie信息, 此时, 预览服务器 30还可以 包括文件获取单元和预览信息生成单元(未示出)。所述文件获取单元用于在预览服 务器在基于所接收到的 URL 地址确定出在所述预览服务器中不存在与所请求下载 的文件匹配的预览信息后, 基于所述 URL地址和 Cookie信息, 从文件服务器获取 所请求的文件。 所述预览信息生成单元用于基于所获取的文件, 根据预定的预览信 息生成策略, 生成预览信息。 在本发明的另一替换示例中, 除了 Cookie信息之外, 在接收到终端设备 10发 送的文件下载请求后, 文件服务器 20还可以向终端设备返回文字长度和 /或文字的 哈希值。 在接收到文字长度和 /或文字的哈希值后, 匹配单元 310基于 URL地址、 文字长度和 /或文字的哈希值, 确定在预览服务器中是否存在与所请求下载的文件匹 配的预览信息。 利用上述文件下载方法及系统, 可以通过在终端设备浏览器向下载文件服务器 发出文件下载请求后, 从预览服务器获取要下载的文件的预览信息, 从而确定是否 进行文件下载, 由此降低下载到用户不期望的文件内容的可能性。 这里, 所述终端设备可以是移动终端, 或者任何其它类型的终端设备, 比如笔 记本、 PC机等。 此外, 典型地, 本发明所述的移动终端可以为各种类型的智能移动终端, 比如 智能手机。 此外, 根据本发明的方法还可以实现为一种计算机程序产品, 该计算机程序产 品包括计算机可读介质, 在该计算机可读介质上存储有用于执行本发明的方法中限 定的上述功能的计算机程序。 本发明实施例提供了一种具有处理器可执行的程序代 码的计算机可读介质, 在被执行时, 程序代码使得处理器执行下述步骤: 在向文件 服务器发送文件下载请求后,使终端设备将文件下载请求中包含的 URL地址发送给 预览服务器; 使终端设备接收来自预览服务器的预览信息, 其中, 预览服务器基于 所接收到的 URL 地址确定出在预览服务器中存在的与所请求下载的文件匹配的预 览信息; 使终端设备根据预览信息确定是否需要从文件服务器下载所请求的文件。 此外, 上述方法步骤以及系统单元也可以利用控制器以及用于存储使得控制器 实现上述步骤或单元功能的计算机程序的计算机可读存储设备实现。 用于执行本发明实施例的文件下载方法的程序可以存储在计算机可读存储介质 中。 因而, 本发明实施例还提供了一种计算机可读存储介质, 该计算机可读存储介质 存储有用于执行本发明实施例的文件下载方法的程序。 此外, 典型地, 本发明所述的移动终端可为各种手持终端设备, 例如手机、 个人 数字助理 (PDA) 等, 因此本发明的保护范围不应限定为某种特定类型的移动终端。 此外,根据本发明的方法还可以被实现为由 CPU执行的计算机程序。在该计算机 程序被 CPU执行时, 执行本发明的方法中限定的上述功能。 此外, 上述方法步骤以及系统单元也可以利用控制器以及用于存储使得控制器实 现上述步骤或单元功能的计算机程序的计算机可读存储设备实现。 此外, 应该明白的是, 本文所述的计算机可读存储设备 (例如, 存储器) 可以是 易失性存储器或非易失性存储器,或者可以包括易失性存储器和非易失性存储器两者。 作为例子而非限制性的, 非易失性存储器可以包括只读存储器(ROM)、 可编程 ROM (PROM)、 电可编程 ROM (EPROM)、 电可擦写可编程 ROM (EEPROM)或快闪存 储器。易失性存储器可以包括随机存取存储器(RAM), 该 RAM可以充当外部高速缓 存存储器。 作为例子而非限制性的, RAM 可以以多种形式获得, 比如同步 RAM (DRAM)、动态 RAM (DRAM)、同步 DRAM (SDRAM )、双数据速率 SDRAM (DDR
SDRAM ) 增强 SDRAM (ESDRAM)、同步链路 DRAM ( SLDRAM)以及直接 Rambus
RAM (DRRAM) o所公开的方面的存储设备意在包括但不限于这些和其它合适类型的 存储器。 结合这里的公开所描述的各种示例性逻辑块、 单元和电路可以利用被设计成用于 执行这里所述功能的下列部件来实现或执行: 通用处理器、 数字信号处理器 (DSP)、 专用集成电路 (ASIC)、 现场可编程门阵列 (FPGA) 或其它可编程逻辑器件、 分立门 或晶体管逻辑、 分立的硬件组件或者这些部件的任何组合。 通用处理器可以是微处理 器, 但是可替换地, 处理器可以是任何传统处理器、 控制器、 微控制器或状态机。 处 理器也可以被实现为计算设备的组合, 例如, DSP和微处理器的组合、 多个微处理器、 一个或多个微处理器结合 DSP核、 或任何其它这种配置。 结合这里的公开所描述的方法或算法的步骤可以直接包含在硬件中、 由处理器执 行的软件单元中或这两者的组合中。 软件单元可以驻留在 RAM存储器、 快闪存储器、 ROM存储器、 EPROM存储器、 EEPROM存储器、寄存器、硬盘、可移动盘、 CD-ROM、 或本领域已知的任何其它形式的存储介质中。 示例性的存储介质被耦合到处理器, 使 得处理器能够从该存储介质中读取信息或向该存储介质写入信息。在一个替换方案中, 所述存储介质可以与处理器集成在一起。处理器和存储介质可以驻留在 ASIC中。 ASIC 可以驻留在用户终端中。 在一个替换方案中, 处理器和存储介质可以作为分立组件驻 留在用户终端中。 在一个或多个示例性设计中, 所述功能可以在硬件、 软件、 固件或其任意组合中 实现。 如果在软件中实现, 则可以将所述功能作为一个或多个指令或代码存储在计算 机可读介质上或通过计算机可读介质来传送。 计算机可读介质包括计算机存储介质和 通信介质, 该通信介质包括有助于将计算机程序从一个位置传送到另一个位置的任何 介质。 存储介质可以是能够被通用或专用计算机访问的任何可用介质。 作为例子而非 限制性的, 该计算机可读介质可以包括 RAM、 ROM、 EEPROM、 CD-ROM或其它光 盘存储设备、 磁盘存储设备或其它磁性存储设备, 或者是可以用于携带或存储形式为 指令或数据结构的所需程序代码并且能够被通用或专用计算机或者通用或专用处理器 访问的任何其它介质。 此外, 任何连接都可以适当地称为计算机可读介质。 例如, 如 果使用同轴线缆、 光纤线缆、 双绞线、 数字用户线路 (DSL) 或诸如红外线、 无线电 和微波的无线技术来从网站、 服务器或其它远程源发送软件, 则上述同轴线缆、 光纤 线缆、 双绞线、 DSL或诸如红外先、 无线电和微波的无线技术均包括在介质的定义。 如这里所使用的,磁盘和光盘包括压縮盘(CD)、激光盘、光盘、数字多功能盘(DVD)、 软盘、 蓝光盘, 其中磁盘通常磁性地再现数据, 而光盘利用激光光学地再现数据。 上 述内容的组合也应当包括在计算机可读介质的范围内。 本领域技术人员还将明白的是, 结合这里的公开所描述的各种示例性逻辑块、 模块、 电路和算法步骤可以被实现为电子硬件、 计算机软件或两者的组合。 为了清 楚地说明硬件和软件的这种可互换性, 已经就各种示意性组件、 方块、 模块、 电路 和步骤的功能对其进行了一般性的描述。 这种功能是被实现为软件还是被实现为硬 件取决于具体应用以及施加给整个系统的设计约束。 本领域技术人员可以针对每种 具体应用以各种方式来实现所述的功能, 但是这种实现决定不应被解释为导致脱离 本发明的范围。 尽管前面公开的内容示出了本发明的示例性实施例, 但是应当注意, 在不背离 权利要求限定的本发明的范围的前提下, 可以进行多种改变和修改。 根据这里描述 的发明实施例的方法权利要求的功能、 步骤和 /或动作不需以任何特定顺序执行。 此 夕卜, 尽管本发明的元素可以以个体形式描述或要求, 但是也可以设想多个, 除非明 确限制为单数。 虽然如上参照图描述了根据本发明的各个实施例进行了描述, 但是本领域技术 人员应当理解, 对上述本发明所提出的各个实施例, 还可以在不脱离本发明内容的 基础上做出各种改进。 因此, 本发明的保护范围应当由所附的权利要求书的内容确 定。

Claims

权 利 要 求 书 、 一种文件下载方法, 其特征在于, 包括:
在向文件服务器发送文件下载请求后, 终端设备将所述文件下载请求中包 含的 URL地址发送给预览服务器;
所述终端设备接收来自所述预览服务器的预览信息, 其中, 所述预览信息 是所述预览服务器基于所接收到的 URL 地址确定出的在所述预览服务器中存 在的与所请求下载的文件匹配的信息; 以及
所述终端设备根据所述预览信息确定是否需要从文件服务器下载所请求的 文件。 、 根据权利要求 1所述的文件下载方法, 其特征在于, 在向所述文件服务器发送 所述文件下载请求后, 所述文件下载方法还包括:
所述终端设备接收所述文件服务器返回的文件长度和 /或文件的哈希值; 以 及
所述终端设备将所接收的文件长度和 /或文件的哈希值与所述 URL地址一 起发送给所述预览服务器, 其中, 所述预览服务器基于所接收到的 URL地址、 文件长度和 /或文件的哈希值,确定在所述预览服务器中是否存在与要请求的文 件匹配的所述预览信息。 、 根据权利要求 1所述的文件下载方法, 其特征在于, 当在所述终端设备向所述 预览服务器发送所述 URL地址时, 还发送 Cookie信息, 并且所下载的文件是 支持部分处理的文件时, 所述文件下载方法包括:
所述预览服务器在基于所接收到的 URL 地址确定出在预览服务器中不存 在与所请求下载的文件匹配的预览信息后, 基于所述 URL地址和所述 Cookie 信息, 从所述文件服务器下载所请求的文件;
所述预览服务器基于所获取的文件中的部分文件内容, 根据预定的预览信 息生成策略, 生成所述预览信息并发送给所述终端设备。 、 根据权利要求 1所述的文件下载方法, 其特征在于, 在所述终端设备向所述预 览服务器发送所述 URL地址时, 还发送 Cookie信息, 所述文件下载方法还包 括: 在所述预览服务器在基于所接收到的 URL地址确定出在所述预览服务器 中不存在与所请求下载的文件匹配的预览信息后, 基于所述 URL地址和所述 Cookie信息从所述文件服务器获取所请求的文件;
所述预览服务器基于所获取的文件, 根据预定的预览信息生成策略, 生成 预览信息并发送给所述终端设备。 、 根据权利要求 4所述的文件下载方法, 其特征在于, 所述预定的预览信息生成 策略包括:
判断所请求的文件的类型;
在所请求的文件是文档类型文件时, 将针对文档中的预定页截取的截图组 成一张图片来生成所述预览信息;
在所请求的文件是压縮类型文件时, 将解压后的目录截图以及针对随机抽 取的文档中预定页截取的截图组成一张图片来生成所述预览信息;
在所请求的文件是视频类型文件时, 将基于视频时间点截取的多个关键帧 截图组成一张图片来生成所述预览信息。 、 根据权利要求 4所述的文件下载方法, 其特征在于, 按照以下方式判断在所述 预览服务器中是否存在与所请求下载的文件匹配的预览信息:
在所述预览服务器判断所接收到的文件的哈希值是否匹配;
在所述接收到的文件的哈希值匹配后, 判断所述接收到的文件的长度是否 与所述预览服务器中存储的文件长度相等; 以及
如果所述接收到的文件的长度与所述预览服务器中存储的文件长度相等, 则确定在所述预览服务器中存在与所请求下载的文件匹配的预览信息。 、 根据权利要求 1所述的文件下载方法, 其特征在于, 在所述终端设备利用用户 代理向所述文件服务器发送文件下载请求时, 除了向所述预览服务器发送所述 URL地址和所述 Cookie信息之外, 所述终端设备还向所述预览服务器发送用 户代理和引用地址。 、 一种文件下载系统, 其特征在于, 包括终端设备、 文件服务器和预览服务器, 所述终端设备包括:
文件下载请求发送单元, 用于向所述文件服务器发送文件下载请求, 所述 文件下载请求包含 URL地址; 预览匹配信息发送单元, 用于在向所述文件服务器发送所述文件下载请求 后, 将所述 URL地址发送给所述预览服务器; 以及
下载确定单元, 用于根据从所述预览服务器接收的预览信息确定是否需要 从所述文件服务器下载所请求的文件;
所述预览服务器包括:
匹配单元,用于基于从所述终端设备接收的 URL地址,确定在所述预览服 务器中是否存在与所请求下载的文件匹配的预览信息;
预览信息发送单元, 用于在所述预览服务器中存在与所请求下载的文件匹 配的所述预览信息时, 将所述预览信息发送给所述终端设备。 、 根据权利要求 8所述的文件下载系统, 其特征在于, 所述预览匹配信息发送单 元还被配置为向所述预览服务器发送 Cookie信息, 所述预览服务器还包括: 文件获取单元,用于在所述预览服务器在基于所接收到的 URL地址确定出 在所述预览服务器中不存在与所请求下载的文件匹配的预览信息后, 基于所述 URL地址和所述 Cookie信息从所述文件服务器获取所请求的文件; 以及
预览信息生成单元, 用于基于所获取的文件, 根据预定的预览信息生成策 略, 生成所述预览信息。 0、 一种具有处理器可执行的程序代码的计算机可读介质, 其特征在于, 在被执行 时, 所述程序代码使得处理器执行下述步骤:
在向文件服务器发送文件下载请求后, 使终端设备将所述文件下载请求中 包含的 URL地址发送给预览服务器;
使所述终端设备接收来自所述预览服务器的预览信息, 其中, 所述预览信 息是所述预览服务器基于所接收到的 URL地址确定出的在所述预览服务器中 存在的与所请求下载的文件匹配的信息; 以及
使所述终端设备根据所述预览信息确定是否需要从文件服务器下载所请求 的文件。 1、 一种计算机程序, 其特征在于, 用于执行权利要求 1至 7中任一项所述的文件 下载方法。 、 一种文件下载装置, 其特征在于, 包括:
预览匹配信息发送单元, 用于在向文件服务器发送文件下载请求后, 将所 述文件下载请求中包含的 URL地址发送给预览服务器;
接收单元, 用于接收来自所述预览服务器的预览信息, 其中, 所述预览信 息是所述预览服务器基于所接收到的 URL地址确定出的在所述预览服务器中 存在的与所请求下载的文件匹配的信息; 以及
下载确定单元, 用于根据所述预览信息确定是否需要从文件服务器下载所 请求的文件。 、 一种预览下载文件的方法, 包括:
在向文件服务器发送文件下载请求后, 终端设备将所述文件下载请求中包 含的 URL地址发送给预览服务器;
所述终端设备接收来自所述预览服务器的预览信息, 其中, 所述预览信息 是所述预览服务器基于所接收到的 URL 地址确定出的在所述预览服务器中存 在的与所请求下载的文件匹配的信息; 以及
所述终端设备显示所述预览信息。
、 一种预览信息生成方法, 包括: 判断所请求下载的文件的类型;
在所请求的文件的类型是文档类型文件时, 将针对文档中的预定页截取的 截图组成一张图片来生成所述预览信息;
在所请求的文件是压縮类型文件时, 将解压后的目录截图以及针对随机抽 取的文档中预定页截取的截图组成一张图片来生成所述预览信息;
在所请求的文件是视频类型文件时, 将基于视频时间点截取的多个关键帧 截图组成一张图片来生成所述预览信息。
PCT/CN2014/072738 2013-06-29 2014-02-28 文件下载方法、预览下载文件的方法及预览信息生成方法 WO2014206109A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310266915.2 2013-06-29
CN201310266915.2A CN103368951B (zh) 2013-06-29 2013-06-29 文件下载方法及系统

Publications (1)

Publication Number Publication Date
WO2014206109A1 true WO2014206109A1 (zh) 2014-12-31

Family

ID=49369488

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/072738 WO2014206109A1 (zh) 2013-06-29 2014-02-28 文件下载方法、预览下载文件的方法及预览信息生成方法

Country Status (2)

Country Link
CN (1) CN103368951B (zh)
WO (1) WO2014206109A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020247097A1 (en) * 2019-06-04 2020-12-10 Microsoft Technology Licensing, Llc Providing previews for uniform resource locators

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103368951B (zh) * 2013-06-29 2017-02-22 广州市动景计算机科技有限公司 文件下载方法及系统
CN105912367B (zh) * 2016-04-18 2019-09-13 徐亚萍 防止安装包误下载方法
CN107809447B (zh) * 2016-09-08 2022-05-31 腾讯科技(深圳)有限公司 一种文件传输的处理方法及相关设备
CN109739653A (zh) * 2017-10-27 2019-05-10 腾讯科技(深圳)有限公司 文件预览方法、文件处理方法及装置
CN109561146A (zh) * 2018-11-29 2019-04-02 深圳市买买提信息科技有限公司 文件下载方法、装置、终端设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1650597A (zh) * 2002-03-01 2005-08-03 诺基亚有限公司 处理可下载内容的支付的方法和通信终端
KR20060118246A (ko) * 2005-05-16 2006-11-23 주식회사 팬택앤큐리텔 이동 통신 단말기의 웹 컨텐츠 관리 방법
CN102196001A (zh) * 2010-03-15 2011-09-21 腾讯科技(深圳)有限公司 一种影片文件下载装置及方法
CN102200971A (zh) * 2010-03-22 2011-09-28 腾讯科技(深圳)有限公司 一种实现网页内容预览的方法和设备
CN103368951A (zh) * 2013-06-29 2013-10-23 广州市动景计算机科技有限公司 文件下载方法及系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719936A (zh) * 2009-12-09 2010-06-02 成都市华为赛门铁克科技有限公司 提供文件下载服务的方法、装置及缓存系统
CN102184177A (zh) * 2011-01-04 2011-09-14 北京开心人信息技术有限公司 一种预览文件的方法与系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1650597A (zh) * 2002-03-01 2005-08-03 诺基亚有限公司 处理可下载内容的支付的方法和通信终端
KR20060118246A (ko) * 2005-05-16 2006-11-23 주식회사 팬택앤큐리텔 이동 통신 단말기의 웹 컨텐츠 관리 방법
CN102196001A (zh) * 2010-03-15 2011-09-21 腾讯科技(深圳)有限公司 一种影片文件下载装置及方法
CN102200971A (zh) * 2010-03-22 2011-09-28 腾讯科技(深圳)有限公司 一种实现网页内容预览的方法和设备
CN103368951A (zh) * 2013-06-29 2013-10-23 广州市动景计算机科技有限公司 文件下载方法及系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020247097A1 (en) * 2019-06-04 2020-12-10 Microsoft Technology Licensing, Llc Providing previews for uniform resource locators

Also Published As

Publication number Publication date
CN103368951A (zh) 2013-10-23
CN103368951B (zh) 2017-02-22

Similar Documents

Publication Publication Date Title
US9454540B2 (en) Systems and methods for sharing files among multiple terminals
US8635360B2 (en) Media playback point seeking using data range requests
WO2014206109A1 (zh) 文件下载方法、预览下载文件的方法及预览信息生成方法
JP6114834B2 (ja) 情報提示方法、装置、プログラム、及び記録媒体
JP6086878B2 (ja) ネットワークを介して1つのデバイスから別のデバイスへファイルを送信すること
US8819168B2 (en) Link expansion service
WO2020199751A1 (zh) 用于加载页面图片的方法、装置和电子设备
JP4859549B2 (ja) 管理用シンボルを用いた情報管理方法、及び情報管理サーバ
WO2016070718A1 (zh) 进行文件下载的方法、装置和浏览器
US20180375962A1 (en) Facilitation of efficient web site page loading
WO2013159721A1 (zh) 一种移动浏览器网页分段加载方法及系统
WO2017114190A1 (zh) 一种文件上传处理方法及装置
WO2018107719A1 (zh) 数据分享方法、装置、终端设备和服务器
WO2014090082A1 (zh) 图片处理方法、装置及终端
WO2015154682A1 (zh) 一种网络请求处理方法、网络服务器和网络系统
US10101801B2 (en) Method and apparatus for prefetching content in a data stream
US9619577B2 (en) Reproducing a graphical user interface display
KR20140042883A (ko) 마이크로 블로그-기반 문서 파일 공유 방법 및 장치
KR101703963B1 (ko) 캐시 서버를 이용한 멀티미디어 서비스를 제공하는 방법 및 시스템
US9602562B2 (en) Terminal apparatus, information processing system and information processing method
CN104484338A (zh) 文件列表管理设备和方法
US20140365542A1 (en) Data processing system and method
CN116974998A (zh) 数据文件的更新方法、装置、计算机设备和存储介质
WO2015109730A1 (zh) 一种实现多媒体传输的方法及终端、服务器
CN104936044A (zh) 一种基于html5的传输视频文件的方法、客户端及服务器

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14817576

Country of ref document: EP

Kind code of ref document: A1