WO2015003664A1 - Method, device, server, and client device for download processing - Google Patents
Method, device, server, and client device for download processing Download PDFInfo
- Publication number
- WO2015003664A1 WO2015003664A1 PCT/CN2014/082178 CN2014082178W WO2015003664A1 WO 2015003664 A1 WO2015003664 A1 WO 2015003664A1 CN 2014082178 W CN2014082178 W CN 2014082178W WO 2015003664 A1 WO2015003664 A1 WO 2015003664A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- download
- page
- address
- preferred
- download address
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 20
- 230000014509 gene expression Effects 0.000 claims description 105
- 238000003672 processing method Methods 0.000 claims description 32
- 230000004044 response Effects 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 4
- 238000001514 detection method Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 238000004904 shortening Methods 0.000 description 2
- VYZAMTAEIAYCRO-UHFFFAOYSA-N Chromium Chemical compound [Cr] VYZAMTAEIAYCRO-UHFFFAOYSA-N 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
Definitions
- the present invention belongs to the field of Internet technologies, and in particular, to a download processing method, apparatus, server, and client device. Background technique
- the download page under the download website corresponds to a download object.
- a download web page is used to download the office software, and the download web page will have a download link of the office software.
- many download sites are currently used for a variety of purposes, often setting up complex content on the download page, including many interference links.
- Existing download sites typically display download links in two ways:
- download sites display promotional links in a conspicuous manner in order to promote interesting software, games or advertisements, misleading users to download, and the real download link, that is, the download link of the real download object is hidden Inconspicuous places, and in general there are more than one real download link. For the user, it is cumbersome to find the download link of the real download object from many interference links.
- the present invention provides a download processing. Methods, devices, servers, and client devices.
- An embodiment of the present invention provides a download processing method, including:
- the acquired preferred download address of the download object so that the client device presents the preferred download address to a user, and the user can download the download through the preferred download address
- the object does not need to open the download page.
- An embodiment of the present invention provides a second download processing method, including:
- the received preferred download address is presented to the user to enable the user to download the download object via the preferred download address without opening the download page.
- the embodiment of the present invention provides a third download processing method, including:
- An embodiment of the present invention further provides an apparatus for downloading processing, including:
- the first operation indication receiving module is configured to receive a first operation indication of the download page sent by the client device, where the download page corresponds to one download object;
- a page source code and a download address rule obtaining module configured to obtain, according to the first operation instruction, a page source code of the download page and a download address rule corresponding to the download page;
- the download address obtaining module is configured to obtain a preferred download address of the download object according to the obtained page source code and the download address rule corresponding to the download page;
- a first preferred download address returning module configured to return the obtained preferred download address of the downloaded object to the client device, so that the client device displays the preferred download address to a user, where the user can The download object is downloaded through the preferred download address without opening the download page.
- An embodiment of the present invention further provides a second download processing apparatus, including: a first operation instruction receiving module, configured to receive a first operation instruction of the user to download the page, where the download page corresponds to one download object;
- the first operation indication sending module is configured to send, according to the first operation instruction, a first operation indication of the download page to the server, so that the server acquires a preferred download address of the download object;
- the download address returning module is configured to receive a preferred download address corresponding to the download object returned by the server; and a second preferred download address display module, configured to display the received preferred download address to the user, so that the user can pass The preferred download address downloads the download object without opening the download page.
- the present invention also provides a server comprising the first type of download processing means.
- the present invention also provides a server comprising the second type of download processing device.
- the present invention also provides a readable storage medium for storing a computer program for performing the above-described download processing method at runtime.
- the beneficial effects of the above technical solution of the present invention are as follows:
- the present invention is directed to a download page corresponding to a download object, according to the page source code of the downloaded download page and the download address rule corresponding to the download page, to obtain a preferred download of the download object. Addressing, and displaying the preferred download address to the user, so that the user can directly obtain the preferred download address, avoiding the operation that the user needs to enter the download page and find the preferred download address from the download page, thereby shortening the time for the user to obtain the preferred download address. Improve the user's download efficiency, thus giving users a better browsing experience.
- FIG. 1 is a flowchart of a download processing method according to a first embodiment of the present invention
- FIG. 2 is a flowchart of a download processing method according to a second embodiment of the present invention.
- FIG. 3 is a structural block diagram of a download processing apparatus according to a first embodiment of the present invention.
- FIG. 4 is a structural block diagram of a download processing apparatus according to a second embodiment of the present invention.
- FIG. 5 is a schematic diagram of an interface provided by a client device according to an embodiment of the present invention. detailed description
- the method of the embodiment of the present invention is applicable to a large and medium-sized computer, a personal computer PC, and of course, to other smart devices such as mobile devices, for example, an IOS operating system (IOS is a handheld device operating system developed by Apple Inc.) Mobile device, Android operating system (Android system is a Linux-based free and open source code)
- IOS is a handheld device operating system developed by Apple Inc.
- Android is a Linux-based free and open source code
- the mobile device of the operating system the mobile device of the Windows Phone operating system (Windows Phone is a handheld device operating system developed by Microsoft), which is not limited by the present invention.
- a flowchart of a download processing method according to an embodiment of the present invention is used on a server side opposite to a mobile terminal or a personal computer PC, and is executed by a server, specifically, a server device installed on a server.
- the function module performs, specifically including the following steps:
- Step S101 Receive a first operation indication of a download page sent by the client device, where the download page corresponds to one download object;
- Step S102 Acquire, according to the first operation instruction, a page source code of the download page and a download address rule corresponding to the download page;
- Step S103 Obtain a preferred download address of the download object according to the acquired page source code and a download address rule corresponding to the download page.
- Step S104 Return, to the client device, the acquired preferred download address of the download object, so that the client device displays the preferred download address to a user, and the user can pass the preferred download address.
- the download object is downloaded without opening the download page.
- page in the embodiment of the present invention mainly refers to a webpage, and may also be other pages that can be browsed by the user, which is not limited by the present invention.
- the download address may be the real download address of the download object, or the download address of the download target may be a good quality or a relatively safe download address, such as an official download address, which is not limited by the present invention. It can be arbitrarily set by those skilled in the art.
- the download object may be software, an audio file, a video file, and any other object that can be downloaded.
- the office software is the corresponding download object of the page.
- this download page not only provides the download link of the office software (ie, the download address), but also has many popular links for other software, games or advertisements.
- the download link of the office software provided on the download page may have multiple, and the user may not easily select the preferred download link to the office software.
- the embodiment of the present invention provides such a download processing method.
- the preferred download address of the download object such as the official download address
- the downloading address "corresponding source code is regularly ruled in the page source code.
- the code representation manner commonly used for the preferred download address in the website webpage is called the download address rule, that is, Most websites generally have their corresponding download address rules, that is, the pages of these websites follow the corresponding download address of the website. Rules.
- a certain number of download address rules of the website are collected and set in advance, and a database or a data list of download address rules is established, and for a certain download page of a specific website, the The website corresponding to the webpage is further searched from the pre-set download address rule database or the data list, and the download address rule corresponding to the download webpage is found, and the preferred download address of the download object is found from the page source code of the webpage.
- the user can display the preferred download address, so that the user can directly obtain the preferred download address, and the user can directly download the download object through the download address, thereby avoiding the user needing to enter the download page and searching for the best among the download addresses in the download page.
- the operation of downloading the address shortens the time for the user to obtain the preferred download address, improves the download efficiency of the user, and brings a better browsing experience to the user.
- the server performs an operation of acquiring a download address when receiving the first operation instruction of the client.
- the first operation indication may trigger the client device to send to the server when the user performs some operation on the download page, and notify the server user to perform some operation on the download page, which is sent by the embodiment of the present invention to the first operation indication.
- the timing and the first operation are specifically limited.
- the first operation indication may be sent according to an instruction that is received by the client device to store a download page address, such as an instruction that the user collects a page address having a download object, or may be based on a user search received by the client device to download the page. The instruction is issued.
- the user performs a search, and the label of the download page is displayed in the search result page.
- the client device sends a first operation instruction to the server, instructing the server user to select the download page.
- the client device sends a first operation instruction to the server, informing the server client device that the user downloads the download page.
- the server obtains the page source code of the download page and its corresponding download address rule according to the first operation instruction, and further obtains the download address of the download object from the page source.
- step S101 a first operation indication of the download page sent by the client device is received, where the first operation indication carries the address information of the download page.
- step S102 acquiring the page source of the download page specifically includes:
- the page address of each download page refers to the unified Resource locator URL address.
- the first operation indication carries the address information of the download page.
- the source information acquisition request is sent to the site server corresponding to the download page, and the response information of the webpage source including the download page is obtained.
- a web page is a basic element of a website. It is a platform for carrying various web applications. It is generally edited by various languages, such as ASP, JSP, ASP.NET, PHP, CGI, etc.
- the source code will embed the download address.
- the PHP curl library can be used to simulate a user request, and the site server corresponding to the download page is requested to obtain the html source code of the video page.
- step S102 the obtaining, according to the first operation instruction, the download address rule corresponding to the download page, specifically includes:
- the address information of the download page is carried in the first operation indication, and the download address rule corresponding to the address information can be obtained according to the address information of the download page.
- the page address of each downloaded page refers to a uniform resource locator URL address.
- the URL address can be used to analyze which website page the download page is, and then the download address rule corresponding to the website, that is, the download address rule corresponding to the download page, is found.
- the download address rule may correspond to the domain name of the download page.
- the specific process of querying the preset download address rule to obtain the download address rule corresponding to the address information according to the address information carried in the first operation indication may be:
- Each download page has a corresponding domain name.
- the domain name is the address of the unit that is connected to the network through the computer, and is the character address corresponding to the digital IP address on the network. According to the domain name of the download page, you can query the pre-set download address rule to obtain the download address rule corresponding to the domain name.
- step S103 obtaining a preferred download address of the download object is obtained according to a page source code and a download address rule corresponding to the download page.
- the download address corresponding to the download page of the present invention conforms to a certain rule in the page source code, that is, the download address rule is satisfied. Therefore, the embodiment of the present invention pre-sets the download address rule.
- the download address rule corresponding to the download page of this embodiment may be represented by a regular expression. Since regular expressions are used to describe or match a series of strings that conform to a syntax rule, the source code of a web page is also a string with syntax rules. To this end, the preferred download address of the downloaded object can be obtained by matching the regular expression with the page source.
- Pre-configure a whitelist containing various download sites such as Huajun download, sky download, etc.
- the source code portion of the official download address is:
- the regular expression can also be other representations.
- the source code representation of the preferred download address of each website may be different.
- the corresponding regular expression is obtained according to the source code of the obtained whitelist website.
- the method for obtaining the preferred download address of the download object according to the obtained page source code and the download address rule corresponding to the download page includes:
- the download address rule corresponding to the download page of the present invention may include two or more regular expressions, such as a regular expression corresponding to an official download address, a regular expression corresponding to a mainstream download tool address, and a website recommendation.
- the regular expression corresponding to the download address may include two or more regular expressions, such as a regular expression corresponding to an official download address, a regular expression corresponding to a mainstream download tool address, and a website recommendation.
- the regular expression corresponding to the download address may include two or more regular expressions, such as a regular expression corresponding to an official download address, a regular expression corresponding to a mainstream download tool address, and a website recommendation.
- the present invention obtains a preferred download address of the download object according to the obtained page source code and the download address rule corresponding to the download page, including:
- the download address rule includes a regular expression corresponding to an official download address, a mainstream download tool address, a website recommended download address, and the like, and the matching order of the regular expression is: The regular expression corresponding to the download address, the regular expression corresponding to the address of the mainstream download tool, and the regular expression corresponding to the recommended download address of the website.
- the regular expression corresponding to the official download address will be matched first.
- the regular expression corresponding to the address of the mainstream download tool is matched, and if the download address is not matched, Then match the regular expression corresponding to the recommended download address of the website until the download address is found. In turn, the found download address can be returned to the client device for display to the user.
- the obtained page source code and the at least two regular expressions may also be respectively obtained from the Finding a source code matching each of the at least two regular expressions in the page source to obtain a corresponding one of each of the at least two regular expressions, The preferred download address of the download object, and then the download addresses are presented to the user for user selection to enhance the user experience.
- a regular expression can be configured for each website having a download site, and a database or a list of correspondence between the website and the regular expression can be established.
- each website may correspond to a regular expression, or may correspond to multiple regular expressions.
- a regular expression may also correspond to multiple websites.
- the regular expression of this embodiment may correspond to the domain name according to the download site. Since the preferred download address of each website has multiple addresses, there are a plurality of regular expressions, for example, including a regular expression corresponding to the official download address, the mainstream download tool address, and the website recommended download address. At this time, the regular expression needs to be prioritized, and the source code of the webpage corresponding to the object to be downloaded is matched in turn.
- the order in which the preferred download address is recommended is generally the official download address, the download address of the mainstream download tool (such as QQ whirlwind, etc.), and the website recommended download address (Unicom, Telecom, Tietong main station, etc.). That is, firstly, according to the regular expression that obtains the official download address, the official download address is matched. When the official download address is matched, the official download address is used as the preferred download address; if the official download address is not matched, the download address is obtained according to the download of the mainstream download tool. The regular expression matches the download address of the mainstream download tool.
- the download address of the mainstream download tool is used as the preferred download address; if the official download address and the download address of the mainstream download tool do not exist, according to the user's IP address, select one of the main download addresses (usually the first download address) in Telecom, China Unicom or China Railcom as the preferred download address.
- the download resource of the official download address is better than other download addresses. Therefore, the recommended download address is recommended in the order of the official download address to the download address of the mainstream download tool to the recommended download address of the website, which is more in line with the actual situation. It can also improve user download efficiency.
- the order of the above regular expression is not limited to the above embodiment, and may be set according to actual conditions.
- the order may be a regular expression corresponding to a website recommended download address, a regular expression corresponding to an official download address, and a mainstream. Download the regular expression corresponding to the tool address.
- the preferred download address can be directly returned to the client device, so that the client device can display the preferred download address to the user.
- the client device can pop up a corresponding information of the download page.
- the window is slightly displayed, and the preferred download address is displayed in the window.
- the client device can directly display the preferred download address at a certain position of the current user interface.
- the user of the client device does not need to open the download page, and can download the download object directly through the displayed preferred download address.
- the preferred download address may be first stored, and when the client device requests the preferred download address, the preferred download address is returned to the client device, that is, in step S104, Before returning the obtained preferred download address of the download object to the client device, the method further includes: receiving a download address acquisition request sent by the client device;
- Returning the obtained preferred download address of the downloaded object to the client device includes: returning a response message to the client device according to the download address obtaining request, where the response message includes the downloading The preferred download address for the object.
- the server may first store the download address on the server or other location outside the server.
- the server may return the preferred download address of the download object to the client. device.
- the client device can send a preferred download address of the download object when the user performs some operation on the download page, for example, when the user selects the title corresponding to the download page.
- the title or URL of the download page is displayed in an interface.
- the client device sends a download address acquisition request to the server.
- the server returns a preferred download address including the download object to the client device, so that the client device displays the preferred download address to the user.
- the client device may pop up the corresponding download page.
- the received preferred download address is displayed in the thumbnail information window, and may also be in the form of a WEB folder.
- the display area is displayed in the preview area of the WEB folder.
- the preferred download address received.
- the manner in which the download address is preferably displayed is not limited to the above two methods.
- the present invention further provides a second download processing method, which can be used on a mobile terminal or a personal computer PC side, and is executed by a mobile terminal or a PC, specifically, by a mobile terminal or a client device or a function module installed on a PC.
- a second download processing method which can be used on a mobile terminal or a personal computer PC side, and is executed by a mobile terminal or a PC, specifically, by a mobile terminal or a client device or a function module installed on a PC.
- a second download processing method which can be used on a mobile terminal or a personal computer PC side, and is executed by a mobile terminal or a PC, specifically, by a mobile terminal or a client device or a function module installed on a PC.
- Step S201 Receive a first operation instruction of the user to download the page, where the download page corresponds to one download object;
- Step S202 Send, according to the first operation instruction, a first operation instruction of the download page to the server, so that Determining, by the server, a preferred download address of the download object;
- Step S203 Receive a preferred download address corresponding to the download object returned by the server;
- Step S204 Present the received preferred download address to the user, so that the user can download the download object through the preferred download address without opening the download page.
- the first operation instruction is performed by the user for the download page
- the first operation instruction may be an operation instruction that the user performs some operation on the download page, and may be the user storage download page address received by the client device. Instructing, for example, that the user collects an indication of the page address of the download object, for example, the user selects a label of the download page displayed on the screen or a selected operation instruction of the title link, and when the user collects the first video page, the page of the first video page is stored. The favorite instruction at the address.
- the first operation indication is sent by the client device to the server according to the first operation instruction received by the client device, and the first operation indication may carry the page address of the download page operated by the user.
- the address is a URL address
- the server can analyze the webpage of the website by using the URL address, and then find the download address rule with the website from the page source, that is, the download corresponding to the download page. Address rules.
- the displaying, by the user, the received preferred download address to the user includes:
- the thumbnail information window corresponding to the download page is popped up, and the received preferred download address is displayed in the thumbnail information window.
- the method further includes:
- the first interface includes a page address area and a preview area, where the page address area displays a page list, the page list includes identification information of the download page, and the identifier information includes the downloading The title of the page and/or the address of the downloaded page;
- the preferred download address corresponding to the download object returned by the receiving server includes:
- the second operation instruction may be an instruction for the user to select the download page.
- the instruction is to select the first video page by the user by clicking a horizontal blank area after the title of the download page in the page address area.
- the client device requests the server to obtain the preferred download address, and the server returns the obtained preferred download address to the client device through the response message.
- the present invention for presenting the received preferred download address to the user includes:
- the received preferred download address is displayed in the preview area.
- the method further includes: detecting a click operation of the user on the preferred download address of the display;
- the download object is downloaded according to the preferred download address.
- the web favorite client When the web favorite client receives the message of the user's favorite download page (equivalent to the first operation instruction), sends a request (equivalent to the first operation instruction) to the web favorites server, where the request includes the downloaded page of the user's favorite The page address (the address URL of the download page), the web favorite server simulates the user request using the PHP curl library according to the page address of the user's favorite page, and requests the download site server to obtain the html source code of the download page. That is, when the user collects a download page, the web favorites server obtains the html source code of the user's favorite download page from the corresponding download site.
- FIG. 5 is an exemplary schematic diagram of the main interface of the web favorites, including three content columns, the folder bar on the far left, the page address bar in the middle, and the preview bar on the far right.
- the page address bar displays the list of page addresses included in the folder selected by the user in the folder bar.
- the address in the page address list is usually displayed in the form of an address name, that is, when the user selects a folder in the folder bar.
- the address contained in the folder is displayed in the address bar as a list; the preview bar displays the preview information of the web page corresponding to the address selected by the user in the page address bar.
- the download page corresponding to the URL can be opened.
- the web favorites client sends a download address acquisition request to the server, and the server returns the preferred download address to the web collection.
- the web favorites client displays a preferred download address of the download page in the preview bar on the right side.
- the present invention further provides a third download processing method, which specifically includes the following steps:
- Step 1 According to the page address of the download page, obtain the page source code of the download page and the download address rule corresponding to the download page, where the download page corresponds to a download object;
- Step 2 Acquire a preferred download address of the downloaded object according to the obtained page source code and the download address rule corresponding to the download page.
- the foregoing method provided by the embodiment of the present invention may be used on a mobile terminal or a PC side of a personal computer, and is executed by a mobile terminal or a PC, and specifically executed by a mobile terminal or a client device or a function module installed on a PC. It can be used on the server side opposite to the mobile terminal or personal computer PC, and is executed by the server, specifically by the server device or function module installed by the server.
- the download address rule corresponding to the download page is represented by a regular expression
- the preferred download address of the download object including:
- a block diagram of a download processing apparatus includes: a first operation indication receiving module 101, configured to receive a first operation indication of a download page sent by a client device, where The download page corresponds to a download object;
- the page source and download address rule obtaining module 201 is configured to obtain, according to the first operation instruction, a page source code of the download page and a download address rule corresponding to the download page;
- the preferred download address acquisition module 301 is configured to obtain a preferred download address of the download object according to the obtained page source code and the download address rule corresponding to the download page.
- a first preferred download address returning module 401 configured to return the obtained preferred download address of the downloaded object to the client device, so that the client device displays the preferred download address to a user, the user
- the download object can be downloaded through the preferred download address without opening the download page.
- the present invention is directed to a download page corresponding to the download object, according to the page source code of the downloaded download page and the download address rule corresponding to the download page, to obtain a preferred download address of the download object, and present the preferred download address to the user.
- the user can directly obtain the preferred download address, avoiding the user's need to enter the download page and find the preferred download address from the download page, shortening the time for the user to obtain the preferred download address, and improving the download efficiency of the user, thereby bringing the user Come to a better browsing experience.
- the first operation indication carries the address information of the download page
- the address rule obtaining module 201 is specifically configured to: query a preset download address rule according to the address information carried in the first operation indication, to obtain a download address rule corresponding to the address information.
- the page source code and download address rule obtaining module 201 is specifically configured to: determine, according to the address information carried in the first operation indication, a domain name of the download page, and a download page according to the determined For the domain name, query the pre-set download address rule to obtain the download address rule corresponding to the domain name.
- the page source code and download address rule obtaining module 201 is specifically configured to: send, according to the address information carried in the first operation indication, a source code acquisition request to a site server corresponding to the download page; and The response information sent by the site server, where the response information includes a webpage source code of the download page.
- the download address rule corresponding to the download page is represented by a regular expression
- the preferred download address obtaining module 301 is specifically configured to: according to the regular expression indicating the download address rule, from the obtained page source code A source code matching the regular expression is found to obtain a preferred download address of the download object.
- the download address rule corresponding to the download page is set to include at least two regular expressions
- the preferred download address obtaining module 301 is specifically configured to: match according to the preset at least two regular expressions Sequence, first searching for source code matching the sequential regular expression from the obtained page source code; if no source code matching the prior-order regular expression is found, according to the preset Matching order of two regular expressions, searching for source code matching the sequential regular expression from the obtained page source code, until finding the source code matching the regular expression, thereby obtaining the download object Preferred download address.
- the download address rule corresponding to the download page includes at least two regular expressions
- the preferred download address obtaining module is specifically configured to:
- the download processing device further includes: a download address obtaining request module, configured to: before the first preferred download address returning module returns the obtained preferred download address of the download object to the client device, Receiving a download address acquisition request sent by the client device;
- a download address obtaining request module configured to: before the first preferred download address returning module returns the obtained preferred download address of the download object to the client device, Receiving a download address acquisition request sent by the client device;
- the first preferred download address returning module is specifically configured to: return a response message to the client device according to the download address obtaining request, where the response message includes a preferred download address corresponding to the download object.
- the present invention also provides a second download processing apparatus, which includes:
- the first operation instruction receiving module 102 is configured to receive a first operation instruction of the user to download the page, where the download page corresponds to one download object;
- the first operation indication sending module 202 is configured to send, according to the first operation instruction, a first operation indication of the download page to the server, so that the server acquires a preferred download address of the download object;
- the preferred download address returning module 302 is configured to receive a preferred download address corresponding to the download object returned by the server;
- the second preferred download address display module 402 is configured to present the received preferred download address to the user to enable the user to download the download object through the preferred download address without opening the download page.
- the second preferred download address display module 402 is specifically configured to: pop up a thumbnail information window corresponding to the download page, where the received preferred download address is displayed in the thumbnail information window.
- the device further includes:
- a first interface providing module configured to provide a first interface, where the first interface includes a page address area and a preview area, before the preferred download address returning module receives a preferred download address corresponding to the download object returned by the server, where Displaying a page list in the page address area, where the page list includes identification information of the download page, where the identifier information includes a title of the download page and/or an address of the download page.
- a second operation instruction receiving module configured to receive a second operation instruction of the user for the identification information of the download page, and a download address acquisition request module, configured to send a download address acquisition request to the server according to the second operation instruction ;
- the preferred download address returning module is specifically configured to: receive, by the receiving server, a response message that is returned according to the download address, where the response message includes a preferred download address corresponding to the download object;
- the second preferred download address display module is specifically configured to: display the received preferred download address in the preview area.
- the download processing device further includes:
- a click operation detection module configured to detect, by the second preferred download address display module, the click operation of the preferred download address of the display after the second preferred download address display module displays the received preferred download address in the preview area;
- An embodiment of the present invention further provides a server, including the foregoing first download processing apparatus.
- the embodiment of the invention further provides a client device, which comprises the above second download processing device.
- the present invention also provides a browser comprising the download processing device, the download processing device being embedded in the browser.
- Embodiment 1 is a diagrammatic representation of Embodiment 1:
- a PC browser can be IE browser, Mozilla Firefox, Apple Safari, Opera Google Chrome, GreenBrowser browser, 360 security browser, Sogou high speed browser, Tencent TT, Maxthon browser, Baidu browser, Tencent QQ browser, etc., the browser has embedded the above download processing device, the browser is as follows Steps to proceed:
- Step 1 receiving a first operation indication of the download page sent by the client device, where the download page corresponds to one download object;
- Step 2 Obtain, according to the first operation indication, a page source code of the download page and a download address rule corresponding to the download page;
- Step 3 Obtain a preferred download address of the downloaded object according to the obtained page source code and a download address rule corresponding to the download page.
- Step 4 Return the obtained preferred download address of the downloaded object to the client device, so that the client device displays the preferred download address to the user, and the user can download through the preferred download address.
- the download object does not need to open the download page.
- the preferred download address of the download object is obtained, and the preferred download address is displayed to the user, so that the user
- the user can directly obtain the preferred download address, which avoids the user's need to enter the download page and find the preferred download address from the download page, shortens the time for the user to obtain the preferred download address, improves the download efficiency of the user, and thus provides better users. Browsing experience.
- Embodiment 2 is a diagrammatic representation of Embodiment 1:
- Step 1 Receive a first operation instruction of the download page sent by the client device, where the download page corresponds to a download object;
- Step 2 Obtain, according to the first operation indication, a page source code of the download page and a download address rule corresponding to the download page;
- Step 3 Obtain a preferred download address of the downloaded object according to the obtained page source code and a download address rule corresponding to the download page.
- Step 4 Return the obtained preferred download address of the downloaded object to the client device, so that the client device displays the preferred download address to the user, and the user can download through the preferred download address. Said Download the object without opening the download page.
- the mobile phone browser obtains the preferred download address of the download object according to the obtained page source code of the downloaded page and the download address rule corresponding to the download page, and displays the preferred download address to the user, so that the user
- the user can directly obtain the preferred download address, which avoids the user's need to enter the download page and find the preferred download address from the download page, shortens the time for the user to obtain the preferred download address, improves the download efficiency of the user, and thus provides better users. Browsing experience.
- the embodiment of the present invention further provides a readable storage medium for storing a computer program, which is used to execute the download processing method disclosed in the above embodiment of the present invention.
- the download address is obtained, so that the user can directly obtain the preferred download address, which avoids the user's need to enter the download page and find the preferred download address from the download page, shortens the time for the user to obtain the preferred download address, and improves the download efficiency of the user. Give users a better browsing experience.
- the modules may be implemented in software for execution by various types of processors.
- an identified executable code module can comprise one or more physical or logical blocks of computer instructions, which can be constructed, for example, as an object, procedure, or function. Nonetheless, the executable code of the identified modules need not be physically located together, but may include different instructions stored in different physicalities. When these instructions are logically combined, they form a module and implement the specified purpose of the module. .
- the executable code module can be a single instruction or a number of instructions, and can even be distributed over multiple different code segments, distributed among different programs, and distributed across multiple memory devices.
- operational data can be identified within the module and can be implemented in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations (including on different storage devices), and may at least partially exist as an electronic signal on a system or network.
- the module can be implemented by software, considering the level of the existing hardware process, the module can be implemented in software. Without considering the cost, a person skilled in the art can construct a corresponding hardware circuit to implement the corresponding function.
- the hardware circuitry includes conventional Very Large Scale Integration (VLSI) circuits or gate arrays as well as existing semiconductors such as logic chips, transistors, or other discrete components.
- VLSI Very Large Scale Integration
- Modules can also be implemented with programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices, and the like.
- the sequence numbers of the steps are not used to limit the sequence of the steps. For those skilled in the art, the steps of the steps are changed without any creative work. It is also within the scope of the invention.
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
A method, a device, a server, and a client device for download processing are disclosed, the method comprising: receiving from a client device a first operation instruction of a download page, the download page corresponding to a download object; obtaining, according to the first operation instruction, the page source code of the download page and the download address rules corresponding to the download page; obtaining, according to the obtained page source code and the download address rules corresponding to the download page, the preferred download address of the download object; returning to the client device the obtained preferred download address of the download object, enabling the client device to display to a user the preferred download address.
Description
一种下载处理方法、 装置、 服务器及客户端设备 Download processing method, device, server and client device
技术领域 Technical field
本发明属于互联网技术领域, 特别是涉及一种下载处理方法、 装置、 服务器及客户端 设备。 背景技术 The present invention belongs to the field of Internet technologies, and in particular, to a download processing method, apparatus, server, and client device. Background technique
通常来讲, 下载网站下的下载网页都对应一个下载对象, 例如, 一个下载网页用于下 载 office 软件, 这个下载网页中将具有 office 软件的下载链接。 但是目前很多下载站点出 于各种各样的目的, 经常在下载页面上设置繁杂的内容, 包含很多干扰链接。 现有的下载 站点通常以以下两种方式展示下载链接: Generally speaking, the download page under the download website corresponds to a download object. For example, a download web page is used to download the office software, and the download web page will have a download link of the office software. However, many download sites are currently used for a variety of purposes, often setting up complex content on the download page, including many interference links. Existing download sites typically display download links in two ways:
一种方式是, 一些下载站点为了推广有利益关系的软件、 游戏或广告, 将推广链接以 醒目的方式显示, 误导用户下载, 而真正的下载链接, 即真正下载对象的下载链接却隐藏 在很不显眼的地方, 而且一般情况下真正的下载链接也不止一个。 对于用户而言, 从众多 干扰链接中查找到真正下载对象的下载链接是比较麻烦的事情。 One way is that some download sites display promotional links in a conspicuous manner in order to promote interesting software, games or advertisements, misleading users to download, and the real download link, that is, the download link of the real download object is hidden Inconspicuous places, and in general there are more than one real download link. For the user, it is cumbersome to find the download link of the real download object from many interference links.
另一种方式是, 一些下载站点为了增加 PV (页面浏览量, Page View), 往往将软件描述 页面和软件下载页面分成两个页面, 这样, 用户需要点击软件下载页面的链接进入下级页 面, 从下级页面上查找软件的下载链接。 例如, 对于华军下载, 当用户点击"下载地址"按 钮时进入下级页面, 在下级页面中出现很多下载链接(即下载地址), 而用户所关心的只是 一个比较官方的、 且下载速度较快的优选下载地址, 但是一般情况下, 用户并不知道哪个 下载地址是优选下载地址, 因此只能随便选择一个进行下载, 不但降低用户的下载效率, 而且会给用户造成很大的困扰。 发明内容 Another way is that some download sites often divide the software description page and the software download page into two pages in order to increase the PV (Page View). In this way, the user needs to click the link of the software download page to enter the lower level page. Find the download link for the software on the subordinate page. For example, for Huajun download, when the user clicks the "Download Address" button, the user enters the lower level page, and many download links (ie, download addresses) appear in the lower level page, and the user is concerned only with a more official one, and the download speed is faster. The download address is preferred, but in general, the user does not know which download address is the preferred download address, so only one can be selected for downloading, which not only reduces the user's download efficiency, but also causes great trouble to the user. Summary of the invention
为了解决现有的浏览器中进行下载时受到无关内容的干扰, 降低用户的下载效率, 会 给用户造成很大的困扰, 用户很难获得较好的浏览体验, 本发明提供了一种下载处理方法、 装置、 服务器及客户端设备。 In order to solve the interference caused by irrelevant content when downloading in an existing browser, and reducing the download efficiency of the user, the user is greatly troubled, and it is difficult for the user to obtain a better browsing experience. The present invention provides a download processing. Methods, devices, servers, and client devices.
本发明的实施例提供一种下载处理方法, 包括: An embodiment of the present invention provides a download processing method, including:
接收客户端设备发送的下载页面的第一操作指示, 所述下载页面对应一个下载对象;
根据所述第一操作指示, 获取所述下载页面的页面源码和所述下载页面对应的下载地 址规则; Receiving a first operation indication of the download page sent by the client device, where the download page corresponds to one download object; Obtaining, according to the first operation indication, a page source code of the download page and a download address rule corresponding to the download page;
根据所述获取的页面源码和所述下载页面对应的下载地址规则, 获取所述下载对象的 优选下载地址; Obtaining a preferred download address of the download object according to the obtained page source code and a download address rule corresponding to the download page;
向所述客户端设备返回所述获取的所述下载对象的优选下载地址, 以使所述客户端设 备向用户展示所述优选下载地址, 所述用户能够通过所述优选下载地址下载所述下载对象 而无需打开所述下载页面。 Returning, to the client device, the acquired preferred download address of the download object, so that the client device presents the preferred download address to a user, and the user can download the download through the preferred download address The object does not need to open the download page.
本发明的实施例提供第二种下载处理方法, 包括: An embodiment of the present invention provides a second download processing method, including:
接收用户对下载页面的第一操作指令, 所述下载页面对应一个下载对象; Receiving a first operation instruction of the user to download the page, where the download page corresponds to one download object;
根据所述第一操作指令, 向服务器发送所述下载页面的第一操作指示, 以使所述服务 器获取所述下载对象的优选下载地址; And sending, according to the first operation instruction, a first operation indication of the download page to a server, so that the server acquires a preferred download address of the download object;
接收服务器返回的所述下载对象对应的优选下载地址; Receiving a preferred download address corresponding to the download object returned by the server;
向用户展示所述接收的优选下载地址, 以使所述用户能够通过所述优选下载地址下载 所述下载对象而无需打开所述下载页面。 The received preferred download address is presented to the user to enable the user to download the download object via the preferred download address without opening the download page.
本发明的实施例提供第三种下载处理方法, 包括: The embodiment of the present invention provides a third download processing method, including:
根据下载页面的页面地址, 获取所述下载页面的页面源码和所述下载页面对应的下载 地址规则, 所述下载页面对应一个下载对象; Obtaining, according to the page address of the download page, the page source code of the download page and the download address rule corresponding to the download page, where the download page corresponds to one download object;
根据所述获取的页面源码和所述下载页面对应的下载地址规则, 获取所述下载对象的 优选下载地址。 Obtaining a preferred download address of the download object according to the obtained page source code and the download address rule corresponding to the download page.
本发明的实施例还提供了第一种下载处理的装置, 包括: An embodiment of the present invention further provides an apparatus for downloading processing, including:
第一操作指示接收模块, 用于接收客户端设备发送的下载页面的第一操作指示, 所述 下载页面对应一个下载对象; The first operation indication receiving module is configured to receive a first operation indication of the download page sent by the client device, where the download page corresponds to one download object;
页面源码和下载地址规则获取模块, 用于根据所述第一操作指示, 获取所述下载页面 的页面源码和所述下载页面对应的下载地址规则; a page source code and a download address rule obtaining module, configured to obtain, according to the first operation instruction, a page source code of the download page and a download address rule corresponding to the download page;
优选下载地址获取模块, 用于根据所述获取的页面源码和所述下载页面对应的下载地 址规则, 获取所述下载对象的优选下载地址; Preferably, the download address obtaining module is configured to obtain a preferred download address of the download object according to the obtained page source code and the download address rule corresponding to the download page;
第一优选下载地址返回模块, 用于向所述客户端设备返回所述获取的所述下载对象的 优选下载地址, 以使所述客户端设备向用户展示所述优选下载地址, 所述用户能够通过所 述优选下载地址下载所述下载对象而无需打开所述下载页面。 a first preferred download address returning module, configured to return the obtained preferred download address of the downloaded object to the client device, so that the client device displays the preferred download address to a user, where the user can The download object is downloaded through the preferred download address without opening the download page.
本发明的实施例还提供了第二种下载处理的装置, 包括:
第一操作指令接收模块, 用于接收用户对下载页面的第一操作指令, 所述下载页面对 应一个下载对象; An embodiment of the present invention further provides a second download processing apparatus, including: a first operation instruction receiving module, configured to receive a first operation instruction of the user to download the page, where the download page corresponds to one download object;
第一操作指示发送模块, 用于根据所述第一操作指令, 向服务器发送所述下载页面的 第一操作指示, 以使所述服务器获取所述下载对象的优选下载地址; The first operation indication sending module is configured to send, according to the first operation instruction, a first operation indication of the download page to the server, so that the server acquires a preferred download address of the download object;
优选下载地址返回模块, 用于接收服务器返回的所述下载对象对应的优选下载地址; 第二优选下载地址展示模块, 用于向用户展示所述接收的优选下载地址, 以使所述用 户能够通过所述优选下载地址下载所述下载对象而无需打开所述下载页面。 Preferably, the download address returning module is configured to receive a preferred download address corresponding to the download object returned by the server; and a second preferred download address display module, configured to display the received preferred download address to the user, so that the user can pass The preferred download address downloads the download object without opening the download page.
本发明还提供了一种服务器, 包括所述的第一种下载处理装置。 The present invention also provides a server comprising the first type of download processing means.
本发明还提供了一种服务器, 包括所述的第二种下载处理装置。 The present invention also provides a server comprising the second type of download processing device.
本发明还提供了一种可读存储介质, 用于存储计算机程序, 所述计算机程序在运行时 用于执行上述下载处理方法。 The present invention also provides a readable storage medium for storing a computer program for performing the above-described download processing method at runtime.
本发明的上述技术方案的有益效果如下: 本发明针对对应于下载对象的下载页面, 根 据获取的下载页面的页面源码和所述下载页面对应的下载地址规则, 以获取所述下载对象 的优选下载地址, 并向用户展示所述优选下载地址, 使得用户能够直接获取优选下载地址, 避免了用户需要进入下载页面并从下载页面中查找优选下载地址的操作, 缩短了用户获取 优选下载地址的时间, 提高了用户的下载效率, 从而给用户带来较好的浏览体验。 附图说明 The beneficial effects of the above technical solution of the present invention are as follows: The present invention is directed to a download page corresponding to a download object, according to the page source code of the downloaded download page and the download address rule corresponding to the download page, to obtain a preferred download of the download object. Addressing, and displaying the preferred download address to the user, so that the user can directly obtain the preferred download address, avoiding the operation that the user needs to enter the download page and find the preferred download address from the download page, thereby shortening the time for the user to obtain the preferred download address. Improve the user's download efficiency, thus giving users a better browsing experience. DRAWINGS
图 1为本发明第一种实施例的下载处理方法的流程图; 1 is a flowchart of a download processing method according to a first embodiment of the present invention;
图 2为本发明第二种实施例的下载处理方法的流程图; 2 is a flowchart of a download processing method according to a second embodiment of the present invention;
图 3为本发明第一种实施例的下载处理装置的结构框图; 3 is a structural block diagram of a download processing apparatus according to a first embodiment of the present invention;
图 4为本发明第二种实施例的下载处理装置的结构框图; 4 is a structural block diagram of a download processing apparatus according to a second embodiment of the present invention;
图 5为本发明实施例中一种客户端设备提供的界面的示例性示意图。 具体实施方式 FIG. 5 is a schematic diagram of an interface provided by a client device according to an embodiment of the present invention. detailed description
为使本发明要解决的技术问题、 技术方案和优点更加清楚, 下面将结合附图及具体实 施例进行详细描述。 In order to make the technical problems, technical solutions, and advantages of the present invention more apparent, the following detailed description will be made in conjunction with the accompanying drawings and specific embodiments.
需要说明的是, 本发明的实施例的方法适用于大中型计算机、 个人计算机 PC, 当然也 适用于移动设备等其他智能设备, 例如, IOS操作系统 (IOS是由苹果公司开发的手持设备 操作系统) 的移动设备、安卓操作系统 (Android系统是一种基于 Linux的自由及开放源代码
的操作系统)的移动设备, Windows Phone操作系统 (Windows Phone是由微软开发的手持 设备操作系统) 的移动设备, 本发明对此不作限定。 It should be noted that the method of the embodiment of the present invention is applicable to a large and medium-sized computer, a personal computer PC, and of course, to other smart devices such as mobile devices, for example, an IOS operating system (IOS is a handheld device operating system developed by Apple Inc.) Mobile device, Android operating system (Android system is a Linux-based free and open source code) The mobile device of the operating system, the mobile device of the Windows Phone operating system (Windows Phone is a handheld device operating system developed by Microsoft), which is not limited by the present invention.
如图 1所示, 为本发明一种实施例的下载处理方法的流程图, 用于与移动终端或个人 计算机 PC 相对的服务器侧, 由服务器执行, 具体而言由服务器上安装的服务端设备或功 能模块执行, 具体包括如下步骤: As shown in FIG. 1 , a flowchart of a download processing method according to an embodiment of the present invention is used on a server side opposite to a mobile terminal or a personal computer PC, and is executed by a server, specifically, a server device installed on a server. Or the function module performs, specifically including the following steps:
步骤 S 101 : 接收客户端设备发送的下载页面的第一操作指示, 所述下载页面对应一个 下载对象; Step S101: Receive a first operation indication of a download page sent by the client device, where the download page corresponds to one download object;
步骤 S102:根据所述第一操作指示,获取所述下载页面的页面源码和所述下载页面对 应的下载地址规则; Step S102: Acquire, according to the first operation instruction, a page source code of the download page and a download address rule corresponding to the download page;
步骤 S103 :根据所述获取的页面源码和所述下载页面对应的下载地址规则,获取所述 下载对象的优选下载地址; Step S103: Obtain a preferred download address of the download object according to the acquired page source code and a download address rule corresponding to the download page.
步骤 S 104: 向所述客户端设备返回所述获取的所述下载对象的优选下载地址, 以使所 述客户端设备向用户展示所述优选下载地址, 所述用户能够通过所述优选下载地址下载所 述下载对象而无需打开所述下载页面。 Step S104: Return, to the client device, the acquired preferred download address of the download object, so that the client device displays the preferred download address to a user, and the user can pass the preferred download address. The download object is downloaded without opening the download page.
需要说明的是, 本发明实施例中所谓页面, 主要是指网页, 当然也可以是能够被用户 浏览的其它页面, 本发明对此不作限定。 It should be noted that the so-called page in the embodiment of the present invention mainly refers to a webpage, and may also be other pages that can be browsed by the user, which is not limited by the present invention.
本发明实施例中, 优选下载地址可以是下载对象真正的下载地址、 也可以使下载对象 真正的下载地址中质量较好、 或者较为安全的下载地址, 例如官方下载地址, 本发明对此 不作限定, 本领域技术人员可以任意设置。 In the embodiment of the present invention, the download address may be the real download address of the download object, or the download address of the download target may be a good quality or a relatively safe download address, such as an official download address, which is not limited by the present invention. It can be arbitrarily set by those skilled in the art.
本发明实施例中, 下载对象可以为软件、 音频文件、 视频文件以及其他任意一种能够 被下载的对象。 举例说明, 当一个页面为 office软件的下载页面时, office软件就是该页面 对应的下载对象。 通常来讲, 现有技术中, 这个下载页面中不仅仅只提供 office软件的下 载链接(即下载地址), 还可能具有很多其他软件、 游戏或广告的推广链接。 而且, 下载页 面所提供的 office软件的下载链接可能具有多个,用户不容易选择到 office软件的优选下载 链接。 为了解决这个问题, 本发明实施例提供了这种下载处理方法。 In the embodiment of the present invention, the download object may be software, an audio file, a video file, and any other object that can be downloaded. For example, when a page is a download page of an office software, the office software is the corresponding download object of the page. Generally speaking, in the prior art, this download page not only provides the download link of the office software (ie, the download address), but also has many popular links for other software, games or advertisements. Moreover, the download link of the office software provided on the download page may have multiple, and the user may not easily select the preferred download link to the office software. In order to solve this problem, the embodiment of the present invention provides such a download processing method.
通常来讲, 在大部分网站 (例如下载网站) 的下载网页的页面源码中, 下载对象的优 选下载地址, 例如官方下载地址都有其常规使用的一种或几种代码表示方式, 即 "优选下 载地址"对应的源码在页面源码中是有规律可循的, 本发明实施例中将网站网页中针对优 选下载地址常规使用的代码表示方式即这种规律称之为下载地址规则, 也就是说, 大部分 网站一般都有其对应的下载地址规则, 亦即这些网站的网页都遵循该网站对应的下载地址
规则。 Generally speaking, in the page source of the download page of most websites (such as download sites), the preferred download address of the download object, such as the official download address, has one or several code representations that are conventionally used, that is, "preferred" The downloading address "corresponding source code is regularly ruled in the page source code. In the embodiment of the present invention, the code representation manner commonly used for the preferred download address in the website webpage is called the download address rule, that is, Most websites generally have their corresponding download address rules, that is, the pages of these websites follow the corresponding download address of the website. Rules.
基于此, 本发明实施例中, 预先收集并设置了一定数目的网站的下载地址规则, 建立 一个下载地址规则的数据库或数据列表, 针对于特定网站的某个下载网页来讲, 可确定出 该网页对应的网站, 进而从预先设置的下载地址规则数据库或数据列表中, 查找到该网站 即该下载网页对应的下载地址规则, 进而从该网页的页面源码中查找到其下载对象的优选 下载地址, 进而可以向用户展示所述优选下载地址, 使得用户能够直接获取优选下载地址, 用户可以直接通过该下载地址下载下载对象, 避免了用户需要进入下载页面并从下载页面 中众多下载地址中查找优选下载地址的操作, 缩短了用户获取优选下载地址的时间, 提高 了用户的下载效率, 从而给用户带来较好的浏览体验。 Based on this, in the embodiment of the present invention, a certain number of download address rules of the website are collected and set in advance, and a database or a data list of download address rules is established, and for a certain download page of a specific website, the The website corresponding to the webpage is further searched from the pre-set download address rule database or the data list, and the download address rule corresponding to the download webpage is found, and the preferred download address of the download object is found from the page source code of the webpage. The user can display the preferred download address, so that the user can directly obtain the preferred download address, and the user can directly download the download object through the download address, thereby avoiding the user needing to enter the download page and searching for the best among the download addresses in the download page. The operation of downloading the address shortens the time for the user to obtain the preferred download address, improves the download efficiency of the user, and brings a better browsing experience to the user.
本发明实施例中, 步骤 S101中, 服务器在收到客户端的第一操作指示时, 执行获取下 载地址的操作。 这里, 第一操作指示可以在用户针对下载页面进行某种操作时触发客户端 设备向服务器发送的, 告知服务器用户执行了针对下载页面的某种操作, 本发明实施例对 第一操作指示发送的时机和第一操作具体为何操作不做限定。 具体的, 该第一操作指示可 以根据是客户端设备接收的用户存储下载页面地址的指令发出, 如用户收藏具有下载对象 的页面地址的指令, 也可以根据客户端设备接收的用户搜索下载页面的指令发出。 例如, 用户进行搜索, 下载页面的标签显示在搜索结果页中, 当用户选中搜索结果页中的下载页 面的标签时, 客户端设备向服务器发送第一操作指示, 指示服务器用户选中了下载页面。 再例如, 在用户收藏下载页面时, 即存储下载页面的页面地址时, 客户端设备向服务器发 送第一操作指示, 告知服务器客户端设备用户收藏了该下载页面。 此时, 服务器就会根据 所述第一操作指示, 来获取所述下载页面的页面源码和其对应的下载地址规则, 并进而从 所述页面源码中获得下载对象的下载地址。 In the embodiment of the present invention, in step S101, the server performs an operation of acquiring a download address when receiving the first operation instruction of the client. Here, the first operation indication may trigger the client device to send to the server when the user performs some operation on the download page, and notify the server user to perform some operation on the download page, which is sent by the embodiment of the present invention to the first operation indication. The timing and the first operation are specifically limited. Specifically, the first operation indication may be sent according to an instruction that is received by the client device to store a download page address, such as an instruction that the user collects a page address having a download object, or may be based on a user search received by the client device to download the page. The instruction is issued. For example, the user performs a search, and the label of the download page is displayed in the search result page. When the user selects the label of the download page in the search result page, the client device sends a first operation instruction to the server, instructing the server user to select the download page. For another example, when the user collects the download page, that is, when the page address of the download page is stored, the client device sends a first operation instruction to the server, informing the server client device that the user downloads the download page. At this time, the server obtains the page source code of the download page and its corresponding download address rule according to the first operation instruction, and further obtains the download address of the download object from the page source.
具体的, 在步骤 S101中, 接收客户端设备发送的下载页面的第一操作指示, 该第一操 作指示中携带有所述下载页面的地址信息。 Specifically, in step S101, a first operation indication of the download page sent by the client device is received, where the first operation indication carries the address information of the download page.
这时, 步骤 S102中, 根据所述第一操作指示, 获取所述下载页面的页面源码具体包 括: At this time, in step S102, according to the first operation instruction, acquiring the page source of the download page specifically includes:
根据所述第一操作指示中携带的地址信息, 向所述下载页面对应的站点服务器发送源 码获取请求; And sending, according to the address information carried in the first operation indication, a source code acquisition request to a site server corresponding to the download page;
接收所述站点服务器发送的响应信息, 其中, 所述响应信息中包括所述下载页面的网 页源码。 Receiving response information sent by the site server, where the response information includes a webpage source of the download page.
需要说明的, 本发明实施例中, 当页面为网页时, 每个下载页面的页面地址是指统一
资源定位符 URL地址。 It should be noted that, in the embodiment of the present invention, when the page is a webpage, the page address of each download page refers to the unified Resource locator URL address.
由于第一操作指示中携带有所述下载页面的地址信息, 为此, 向所述下载页面对应的 站点服务器发送源码获取请求, 就可以获取包括所述下载页面的网页源码的响应信息。 网 页是构成网站的基本元素, 是承载各种网站应用的平台, 一般是由各种语言进行编辑实现 的, 例如 ASP, JSP, ASP.NET, PHP, CGI等脚本语言, 下载对象对应的网页的源码会将 下载地址嵌入其中。 The first operation indication carries the address information of the download page. To this end, the source information acquisition request is sent to the site server corresponding to the download page, and the response information of the webpage source including the download page is obtained. A web page is a basic element of a website. It is a platform for carrying various web applications. It is generally edited by various languages, such as ASP, JSP, ASP.NET, PHP, CGI, etc. The source code will embed the download address.
具体的, 可使用 PHP的 curl库模拟用户请求, 向下载页面对应的站点服务器请求获 取该视频页面的 html源码。 Specifically, the PHP curl library can be used to simulate a user request, and the site server corresponding to the download page is requested to obtain the html source code of the video page.
步骤 S102中, 所述根据所述第一操作指示, 获取所述下载页面对应的下载地址规则, 具体包括: In step S102, the obtaining, according to the first operation instruction, the download address rule corresponding to the download page, specifically includes:
根据所述第一操作指示中携带的地址信息, 查询预先设置的下载地址规则, 以获取所 述地址信息对应的下载地址规则。 由于第一操作指示中携带有所述下载页面的地址信息, 为此, 根据该下载页面的地址信息就可以获取该地址信息对应的下载地址规则。 And querying, according to the address information carried in the first operation indication, a preset download address rule, to obtain a download address rule corresponding to the address information. The address information of the download page is carried in the first operation indication, and the download address rule corresponding to the address information can be obtained according to the address information of the download page.
本发明实施例中, 当页面为网页时, 每个下载页面的页面地址是指统一资源定位符 URL地址。 通过 URL地址可以分析出该下载页面为哪个网站的网页, 进而找到与该网站 的下载地址规则, 即与下载页面对应的下载地址规则。 In the embodiment of the present invention, when the page is a webpage, the page address of each downloaded page refers to a uniform resource locator URL address. The URL address can be used to analyze which website page the download page is, and then the download address rule corresponding to the website, that is, the download address rule corresponding to the download page, is found.
具体的, 下载地址规则可以与下载页面的域名相对应。 这时, 所述根据所述第一操作 指示中携带的地址信息, 查询预先设置的下载地址规则, 以获取所述地址信息对应的下载 地址规则的具体过程可以是: Specifically, the download address rule may correspond to the domain name of the download page. In this case, the specific process of querying the preset download address rule to obtain the download address rule corresponding to the address information according to the address information carried in the first operation indication may be:
根据所述第一操作指示中携带的地址信息, 确定所述下载页面的域名; Determining, according to the address information carried in the first operation indication, a domain name of the download page;
根据所述确定的下载页面的域名, 查询预先设置的下载地址规则, 以获取所述域名对 应的下载地址规则。 And according to the determined domain name of the downloaded page, querying a preset download address rule to obtain a download address rule corresponding to the domain name.
每个下载页面都具有相应的域名, 域名是一个通过计算机登上网络的单位在该网中的 地址, 是与网络上的数字型 IP地址相对应的字符型地址。 根据下载页面的域名可以查询到 预先设置的下载地址规则, 从而可以获取该域名对应的下载地址规则。 Each download page has a corresponding domain name. The domain name is the address of the unit that is connected to the network through the computer, and is the character address corresponding to the digital IP address on the network. According to the domain name of the download page, you can query the pre-set download address rule to obtain the download address rule corresponding to the domain name.
步骤 S103 中, 获取所述下载对象的优选下载地址是根据页面源码和所述下载页面对 应的下载地址规则得到的。 In step S103, obtaining a preferred download address of the download object is obtained according to a page source code and a download address rule corresponding to the download page.
本发明的下载页面对应的下载地址在页面源码中是符合一定的规律的, 即满足下载地 址规则的。 因此, 本发明实施例预先设定了下载地址规则, 在需要获取下载地址时, 根据 该规则从页面源码中将下载地址找到并提取出来。
本实施例的下载页面对应的下载地址规则可以通过正则表达式进行表示的。 由于正则 表达式是用来描述或者匹配一系列符合某个句法规则的字符串, 而网页的源码也是具有句 法规则的字符串。 为此, 利用正则表达式与页面源码进行匹配就可以获取下载对象的优选 下载地址。 The download address corresponding to the download page of the present invention conforms to a certain rule in the page source code, that is, the download address rule is satisfied. Therefore, the embodiment of the present invention pre-sets the download address rule. When the download address needs to be obtained, the download address is found and extracted from the page source according to the rule. The download address rule corresponding to the download page of this embodiment may be represented by a regular expression. Since regular expressions are used to describe or match a series of strings that conform to a syntax rule, the source code of a web page is also a string with syntax rules. To this end, the preferred download address of the downloaded object can be obtained by matching the regular expression with the page source.
本实施例的正则表达式的获取过程, 详细描述如下: The acquisition process of the regular expression in this embodiment is described in detail as follows:
预先配置一个包含各个下载站点的白名单, 如华军下载、 天空下载等, 收集从白名单 中各个下载站点的页面源码中找到下载地址的规则, 并通过正则表达式表示, 即根据白名 单中各个下载站点的网页源码, 配置从下载页面获取各个下载地址的正则表达式。 Pre-configure a whitelist containing various download sites, such as Huajun download, sky download, etc., collect rules for downloading addresses from the page source of each download site in the whitelist, and express them by regular expressions, that is, according to each of the whitelists. Download the web page source code of the site, and configure the regular expression for each download address from the download page.
例如, 在下载页面的页面源码中, 官方下载地址的源码部分为: For example, in the page source of the download page, the source code portion of the official download address is:
<p><a class="other" href="http:〃 down.360safe.com/cse/360cse_7.3.0.116.exe"><i style="b ackground:url(/images/index.3.0/other.jpg) no-repeafx/ ^方下载 l</ax/p> <p><a class="other" href="http:〃 down.360safe.com/cse/360cse_7.3.0.116.exe"><i style="b ackground:url(/images/index.3.0/ Other.jpg) no-repeafx/ ^ party download l</ax/p>
根据上述官方下载地址的源码, 依据其源码格式配置获取优选下载地址的正则表达 式: /href=\"([A;]+)\"\sclass=\"other\" .+?官方下载 /s。 According to the source code of the above official download address, configure the regular expression of the preferred download address according to its source code format: /href=\"([ A ;]+)\"\sclass=\"other\" .+?Official download/ s.
当然该正则表达式还可以是其他的表示形式, 每种网站的优选下载地址的源码表示方 式可能存在不同, 相应的正则表达式是根据获取的白名单网站的源码得到的。 Of course, the regular expression can also be other representations. The source code representation of the preferred download address of each website may be different. The corresponding regular expression is obtained according to the source code of the obtained whitelist website.
本发明根据所述获取的页面源码和所述下载页面对应的下载地址规则, 获取所述下载 对象的优选下载地址具体包括: The method for obtaining the preferred download address of the download object according to the obtained page source code and the download address rule corresponding to the download page includes:
根据所述表示下载地址规则的正则表达式, 从所述获取的页面源码中查找到匹配所述 正则表达式的源码, 以获取到所述下载对象的优选下载地址。 And searching, according to the regular expression indicating the download address rule, a source code matching the regular expression from the obtained page source to obtain a preferred download address of the download object.
本发明的下载页面对应的下载地址规则可包括两个或者两个以上的正则表达式, 例如 与官方下载地址相对应的正则表达式、 与主流下载工具地址相对应的正则表达式、 与网站 推荐下载地址相对应的正则表达式。 The download address rule corresponding to the download page of the present invention may include two or more regular expressions, such as a regular expression corresponding to an official download address, a regular expression corresponding to a mainstream download tool address, and a website recommendation. The regular expression corresponding to the download address.
在一种实现方式中, 本发明根据所述获取的页面源码和所述下载页面对应的下载地址 规则, 获取所述下载对象的优选下载地址包括: In an implementation manner, the present invention obtains a preferred download address of the download object according to the obtained page source code and the download address rule corresponding to the download page, including:
根据预先设定的所述至少两个正则表达式的匹配顺序, 首先从所述获取的页面源码中 查找匹配所述顺序在先的正则表达式的源码; And searching, according to a preset matching order of the at least two regular expressions, a source code matching the sequential regular expression from the acquired page source;
如果没有查找到匹配所述顺序在先的正则表达式的源码, 根据预先设定的所述至少两 个正则表达式的匹配顺序, 从所述获取的页面源码中查找匹配所述顺序其次的正则表达式 的源码, 直到查找到匹配所述正则表达式的源码, 从而获取到所述下载对象的优选下载地 址。
在本发明的一个实施例中, 下载地址规则中包括与官方下载地址、主流下载工具地址、 网站推荐下载地址等分别相对应的正则表达式, 而所述正则表达式的匹配顺序为: 与官方 下载地址相对应的正则表达式、 与主流下载工具地址相对应的正则表达式、 与网站推荐下 载地址相对应的正则表达式。 在获取下载地址时, 将先匹配与官方下载地址相对应的正则 表达式, 如果未匹配到下载地址, 接下来匹配与主流下载工具地址相对应的正则表达式, 如果未匹配到下载地址, 接下来匹配与网站推荐下载地址相对应的正则表达式, 直到查找 到下载地址。 进而可将查找到的下载地址返回给客户端设备展示给用户。 If no source code matching the preceding regular expression is found, according to a preset matching order of the at least two regular expressions, searching for the regular order matching the order from the obtained page source code The source code of the expression, until the source code matching the regular expression is found, thereby obtaining the preferred download address of the download object. In an embodiment of the present invention, the download address rule includes a regular expression corresponding to an official download address, a mainstream download tool address, a website recommended download address, and the like, and the matching order of the regular expression is: The regular expression corresponding to the download address, the regular expression corresponding to the address of the mainstream download tool, and the regular expression corresponding to the recommended download address of the website. When the download address is obtained, the regular expression corresponding to the official download address will be matched first. If the download address is not matched, the regular expression corresponding to the address of the mainstream download tool is matched, and if the download address is not matched, Then match the regular expression corresponding to the recommended download address of the website until the download address is found. In turn, the found download address can be returned to the client device for display to the user.
作为一种可选方式,当所述下载页面对应的下载地址规则包括至少两个正则表达式时, 也可以根据所述获取的页面源码和所述至少两个正则表达式, 分别从所述获取的页面源码 中查找到匹配所述至少两个正则表达式中每个所述正则表达式的源码, 以获取到与所述至 少两个正则表达式中每个所述正则表达式分别对应的、 所述下载对象的优选下载地址, 进 而将这些下载地址都展现给用户, 供用户选择, 提升用户体验。 As an optional manner, when the download address rule corresponding to the download page includes at least two regular expressions, the obtained page source code and the at least two regular expressions may also be respectively obtained from the Finding a source code matching each of the at least two regular expressions in the page source to obtain a corresponding one of each of the at least two regular expressions, The preferred download address of the download object, and then the download addresses are presented to the user for user selection to enhance the user experience.
为了实现准确获取各个网站的优选下载地址, 可以针对每个具有下载站点的网站都分 别配置一个正则表达式, 建立一个网站和正则表达式的对应关系的数据库或者列表。 In order to accurately obtain the preferred download address of each website, a regular expression can be configured for each website having a download site, and a database or a list of correspondence between the website and the regular expression can be established.
通常情况下, 每一个网站可能对应一个正则表达式, 也可能对应多个正则表达式, 如 下载站点的源码中有多个下载对象的下载地址的源码表示方式, 则需要配置多个正则表达 式。 当然, 某个正则表达式也可能对应多个网站。 Usually, each website may correspond to a regular expression, or may correspond to multiple regular expressions. For example, if the source code representation of the download address of multiple download objects in the source code of the download site, you need to configure multiple regular expressions. . Of course, a regular expression may also correspond to multiple websites.
本实施例的正则表达式可与根据下载站点的域名相对应。 由于每个网站的优选下载地 址有多个地址, 为此, 正则表达式也存在多个的情况, 例如包括与官方下载地址、 主流下 载工具地址、 网站推荐下载地址分别相对应的正则表达式。 此时, 需要将所述正则表达式 设定优先顺序, 依次去匹配所述待下载对象所对应网页的源码。 The regular expression of this embodiment may correspond to the domain name according to the download site. Since the preferred download address of each website has multiple addresses, there are a plurality of regular expressions, for example, including a regular expression corresponding to the official download address, the mainstream download tool address, and the website recommended download address. At this time, the regular expression needs to be prioritized, and the source code of the webpage corresponding to the object to be downloaded is matched in turn.
推荐优选下载地址的顺序一般是官方下载地址、 主流下载工具下载地址 (如 QQ旋风 等)、 网站推荐下载地址 (联通、 电信、 铁通主站等)。 即首先根据获取官方下载地址的正 则表达式匹配官方下载地址, 当匹配到官方下载地址时, 将官方下载地址作为优选下载地 址; 如果匹配不到官方下载地址, 则根据获取主流下载工具下载地址的正则表达式匹配主 流下载工具下载地址, 当匹配到主流下载工具下载地址时, 则将主流下载工具下载地址作 为优选下载地址; 如果官方下载地址和主流下载工具下载地址都不存在时, 根据用户的 ip 地址,选择电信、联通或铁通中的一个主下载地址 (一般为第一个下载地址)作为优选下载地 址。 一般情况下, 官方下载地址的下载资源优于其他下载地址, 因此按照官方下载地址到 主流下载工具下载地址到网站推荐下载地址的顺序推荐优选下载地址, 比较符合实际情况,
也可以提高用户下载效率。 The order in which the preferred download address is recommended is generally the official download address, the download address of the mainstream download tool (such as QQ whirlwind, etc.), and the website recommended download address (Unicom, Telecom, Tietong main station, etc.). That is, firstly, according to the regular expression that obtains the official download address, the official download address is matched. When the official download address is matched, the official download address is used as the preferred download address; if the official download address is not matched, the download address is obtained according to the download of the mainstream download tool. The regular expression matches the download address of the mainstream download tool. When it matches the download address of the mainstream download tool, the download address of the mainstream download tool is used as the preferred download address; if the official download address and the download address of the mainstream download tool do not exist, according to the user's IP address, select one of the main download addresses (usually the first download address) in Telecom, China Unicom or China Railcom as the preferred download address. In general, the download resource of the official download address is better than other download addresses. Therefore, the recommended download address is recommended in the order of the official download address to the download address of the mainstream download tool to the recommended download address of the website, which is more in line with the actual situation. It can also improve user download efficiency.
上述正则表达式的顺序不局限于上述实施例, 也可以根据实际情况进行设置, 例如顺 序可以是与网站推荐下载地址相对应的正则表达式、与官方下载地址相对应的正则表达式、 与主流下载工具地址相对应的正则表达式。 The order of the above regular expression is not limited to the above embodiment, and may be set according to actual conditions. For example, the order may be a regular expression corresponding to a website recommended download address, a regular expression corresponding to an official download address, and a mainstream. Download the regular expression corresponding to the tool address.
在服务器获取了下载对象的优选下载地址后, 可以直接将优选下载地址返回客户端设 备, 使得客户端设备可以将该优选下载地址展示给用户, 例如客户端设备可以弹出一个下 载页面对应的信息缩略窗口, 在该窗口中显示优选下载地址, 或者, 客户端设备还可以在 当前用户界面的某个位置, 直接显示出优选下载地址。 而且, 客户端设备的用户不需要打 开下载页面, 能够通过所显示的优选下载地址直接下载下载对象。 After the server obtains the preferred download address of the download object, the preferred download address can be directly returned to the client device, so that the client device can display the preferred download address to the user. For example, the client device can pop up a corresponding information of the download page. The window is slightly displayed, and the preferred download address is displayed in the window. Alternatively, the client device can directly display the preferred download address at a certain position of the current user interface. Moreover, the user of the client device does not need to open the download page, and can download the download object directly through the displayed preferred download address.
此外, 在服务器获取了下载对象的优选下载地址后, 也可以先将优选下载地址存储, 在客户端设备请求优选下载地址时, 再将优选下载地址返回给客户端设备, 即在步骤 S104 中, 向所述客户端设备返回所述获取的所述下载对象的优选下载地址前, 所述方法还包括: 接收所述客户端设备发送的下载地址获取请求; In addition, after the server obtains the preferred download address of the download object, the preferred download address may be first stored, and when the client device requests the preferred download address, the preferred download address is returned to the client device, that is, in step S104, Before returning the obtained preferred download address of the download object to the client device, the method further includes: receiving a download address acquisition request sent by the client device;
所述向所述客户端设备返回所述获取的所述下载对象的优选下载地址包括: 根据所述下载地址获取请求, 向所述客户端设备返回响应消息, 所述响应消息中包括 所述下载对象对应的优选下载地址。 Returning the obtained preferred download address of the downloaded object to the client device includes: returning a response message to the client device according to the download address obtaining request, where the response message includes the downloading The preferred download address for the object.
服务器获取了下载对象的优选下载地址后, 可以先存储在服务器上或服务器之外的其 他位置, 当接收到客户端设备发送的下载地址获取请求时, 才将下载对象的优选下载地址 返回客户端设备。 After obtaining the preferred download address of the download object, the server may first store the download address on the server or other location outside the server. When receiving the download address acquisition request sent by the client device, the server may return the preferred download address of the download object to the client. device.
举例而言, 客户端设备可以在用户针对下载页面执行某种操作时, 发送下载对象的优 选下载地址,例如,在用户选中了下载页面对应的标题时。具体的,下载页面的标题或 URL 显示在一界面中, 当用户在该界面中通过鼠标选中下载页面的标题或 URL时, 客户端设备 向服务器发送下载地址获取请求。 For example, the client device can send a preferred download address of the download object when the user performs some operation on the download page, for example, when the user selects the title corresponding to the download page. Specifically, the title or URL of the download page is displayed in an interface. When the user selects the title or URL of the download page by the mouse in the interface, the client device sends a download address acquisition request to the server.
本发明实施例中在服务器向客户端设备返回包含下载对象的优选下载地址, 以使客户 端设备向用户展示所述优选下载地址, 具体地, 客户端设备可以是弹出所述下载页面对应 的缩略信息窗口, 所述缩略信息窗口中显示有所述接收的优选下载地址, 还可以是 WEB 文件夹的形式, 当用户选中该下载地址对应网页时, 在 WEB 文件夹的预览区中展示所述 接收的优选下载地址。 当然, 优选下载地址进行展示的方式不局限于以上两种方式。 In the embodiment of the present invention, the server returns a preferred download address including the download object to the client device, so that the client device displays the preferred download address to the user. Specifically, the client device may pop up the corresponding download page. In the thumbnail information window, the received preferred download address is displayed in the thumbnail information window, and may also be in the form of a WEB folder. When the user selects the corresponding webpage of the download address, the display area is displayed in the preview area of the WEB folder. The preferred download address received. Of course, the manner in which the download address is preferably displayed is not limited to the above two methods.
相应的, 本发明还提供了第二种下载处理方法, 可用于移动终端或个人计算机 PC侧, 由移动终端或 PC执行, 具体而言由移动终端或 PC上安装的客户端设备或功能模块执行,
包括: Correspondingly, the present invention further provides a second download processing method, which can be used on a mobile terminal or a personal computer PC side, and is executed by a mobile terminal or a PC, specifically, by a mobile terminal or a client device or a function module installed on a PC. , include:
步骤 S201 : 接收用户对下载页面的第一操作指令, 所述下载页面对应一个下载对象; 步骤 S202: 根据所述第一操作指令, 向服务器发送所述下载页面的第一操作指示, 以 使所述服务器获取所述下载对象的优选下载地址; Step S201: Receive a first operation instruction of the user to download the page, where the download page corresponds to one download object; Step S202: Send, according to the first operation instruction, a first operation instruction of the download page to the server, so that Determining, by the server, a preferred download address of the download object;
其中, 服务器获得优选下载地址可参见前述实施例, 这里不再赘述。 For the server to obtain the preferred download address, refer to the foregoing embodiment, and details are not described herein again.
步骤 S203: 接收服务器返回的所述下载对象对应的优选下载地址; Step S203: Receive a preferred download address corresponding to the download object returned by the server;
步骤 S204: 向用户展示所述接收的优选下载地址, 以使所述用户能够通过所述优选下 载地址下载所述下载对象而无需打开所述下载页面。 Step S204: Present the received preferred download address to the user, so that the user can download the download object through the preferred download address without opening the download page.
步骤 S201中, 该第一操作指令是用户针对下载页面进行的, 第一操作指令可以是用户 这里用户针对下载页面进行某种操作的操作指令, 可以是客户端设备接收的用户存储下载 页面地址的指示, 如用户收藏具有下载对象的页面地址的指示, 例如用户选中显示在屏幕 上的下载页面的标签或标题链接的选中操作指令, 用户收藏第一视频页面时, 即存储第一 视频页面的页面地址时的收藏指令。 In step S201, the first operation instruction is performed by the user for the download page, and the first operation instruction may be an operation instruction that the user performs some operation on the download page, and may be the user storage download page address received by the client device. Instructing, for example, that the user collects an indication of the page address of the download object, for example, the user selects a label of the download page displayed on the screen or a selected operation instruction of the title link, and when the user collects the first video page, the page of the first video page is stored. The favorite instruction at the address.
步骤 S202中, 该第一操作指示根据客户端设备接收到的第一操作指令, 客户端设备 向服务器发出的, 该第一操作指示可以携带用户所操作的下载页面的页面地址。 当页面为 网页时, 该地址为 URL地址, 服务器可以通过 URL地址可以分析出该下载页面为哪个网 站的网页, 进而从页面源码中找到与该网站的下载地址规则, 即与下载页面对应的下载地 址规则。 In step S202, the first operation indication is sent by the client device to the server according to the first operation instruction received by the client device, and the first operation indication may carry the page address of the download page operated by the user. When the page is a webpage, the address is a URL address, and the server can analyze the webpage of the website by using the URL address, and then find the download address rule with the website from the page source, that is, the download corresponding to the download page. Address rules.
可选的, 本发明的所述向用户展示所述接收的优选下载地址包括: Optionally, the displaying, by the user, the received preferred download address to the user includes:
弹出所述下载页面对应的缩略信息窗口, 所述缩略信息窗口中显示有所述接收的优选 下载地址。 The thumbnail information window corresponding to the download page is popped up, and the received preferred download address is displayed in the thumbnail information window.
可选的, 本发明的在所述接收服务器返回的所述下载对象对应的优选下载地址前, 所 述方法还包括: Optionally, before the preferred download address corresponding to the download object returned by the receiving server, the method further includes:
提供第一界面, 所述第一界面包括页面地址区和预览区, 所述页面地址区中显示页面 列表, 所述页面列表中包括所述下载页面的标识信息, 所述标识信息包括所述下载页面的 标题和 /或所述下载页面的地址; Providing a first interface, where the first interface includes a page address area and a preview area, where the page address area displays a page list, the page list includes identification information of the download page, and the identifier information includes the downloading The title of the page and/or the address of the downloaded page;
接收用户对所述下载页面的标识信息的第二操作指令; Receiving, by the user, a second operation instruction of the identification information of the download page;
根据所述第二操作指令, 向所述服务器发送下载地址获取请求; Sending a download address acquisition request to the server according to the second operation instruction;
所述接收服务器返回的所述下载对象对应的优选下载地址包括: The preferred download address corresponding to the download object returned by the receiving server includes:
接收服务器根据所述下载地址获取请求返回的响应消息, 所述响应消息中包括所述下
载对象对应的优选下载地址。 Receiving, by the receiving server, a response message returned by the request according to the download address, where the response message includes the next The preferred download address corresponding to the loaded object.
其中, 第二操作指令可以是用户选择该下载页面的指令, 例如, 该指令为用户通过鼠 标在页面地址区中点击下载页面的标题后的横向空白区域, 将第一视频页面选中。 这时, 客户端设备向服务器请求获取优选下载地址, 服务器将获取到的优选下载地址通过响应消 息返回给客户端设备。 The second operation instruction may be an instruction for the user to select the download page. For example, the instruction is to select the first video page by the user by clicking a horizontal blank area after the title of the download page in the page address area. At this time, the client device requests the server to obtain the preferred download address, and the server returns the obtained preferred download address to the client device through the response message.
本发明的所述向用户展示所述接收的优选下载地址包括: The present invention for presenting the received preferred download address to the user includes:
在所述预览区中展示所述接收的优选下载地址。 The received preferred download address is displayed in the preview area.
本发明在所述预览区中展示所述接收的优选下载地址后, 所述方法还包括: 检测用户对所述展示的优选下载地址的点击操作; After the present invention displays the received preferred download address in the preview area, the method further includes: detecting a click operation of the user on the preferred download address of the display;
当检测到所述点击操作时, 根据所述优选下载地址下载所述下载对象。 When the click operation is detected, the download object is downloaded according to the preferred download address.
以下以本发明的下载处理方法在 web收藏夹中的应用为例进行详细说明: The following is an example of the application of the download processing method of the present invention in a web collection as an example:
当 web收藏夹客户端接收到用户收藏下载页面的消息 (相当于第一操作指令)时,向 web 收藏夹服务器发出请求 (相当于第一操作指示),该请求中包含用户收藏的下载页面的页面地 址 (下载页面的地址 URL), web收藏夹服务器根据用户收藏的页面的页面地址, 使用 PHP 的 curl库模拟用户请求, 向下载站点服务器请求获取该下载页面的 html源码。 也就是当用 户收藏一个下载页面时, web 收藏夹服务器就会从相应的下载站点获取用户收藏的下载页 面的 html源码。 另外, 根据下载页面的页面地址确定下载页面对应的下载站点的域名, 根 据该域名到预先设置的下载地址规则库或者列表中, 获得相应的正则表达式。 图 5为 web 收藏夹的主界面的一种示例性示意图, 包括三个内容栏, 最左边为文件夹栏, 中间为页面 地址栏, 最右边为预览栏。 其中文件夹栏中, 显示默认或者用户建立的若干个文件夹, 文 件夹中保存有用户收藏的页面地址。 页面地址栏中显示用户在文件夹栏中选中的文件夹中 包含的页面地址列表, 页面地址列表中的地址通常以地址名称的形式显示出来, 即当用户 在文件夹栏中选中一个文件夹时, 该文件夹中包含的地址以列表的形式显示在地址栏中; 预览栏中显示用户在页面地址栏中选中的地址所对应的网页的预览信息。 当用户点击到页 面地址栏中的一个下载页面的网址时, 即可打开网址对应的下载页面。 当用户在地址栏中 点击某个下载页面网址周围横向空白区域时 (即选中用户收藏的下载页面网址), web收藏夹 客户端向服务器发送下载地址获取请求,服务器将优选下载地址返回给 web收藏夹客户端, web 收藏夹客户端在右侧的预览栏中显示一个该下载页面的优选下载地址, 在用户点击右 侧预览栏中的下载地址时, 即可完成下载, 避免了用户需要进入下载页面并从下载页面中 查找真正或优选下载地址的操作。
相应的, 本发明还提供第三种下载处理方法, 具体包括以下步骤: When the web favorite client receives the message of the user's favorite download page (equivalent to the first operation instruction), sends a request (equivalent to the first operation instruction) to the web favorites server, where the request includes the downloaded page of the user's favorite The page address (the address URL of the download page), the web favorite server simulates the user request using the PHP curl library according to the page address of the user's favorite page, and requests the download site server to obtain the html source code of the download page. That is, when the user collects a download page, the web favorites server obtains the html source code of the user's favorite download page from the corresponding download site. In addition, the domain name of the download site corresponding to the download page is determined according to the page address of the download page, and the corresponding regular expression is obtained according to the domain name to the preset download address rule base or the list. Figure 5 is an exemplary schematic diagram of the main interface of the web favorites, including three content columns, the folder bar on the far left, the page address bar in the middle, and the preview bar on the far right. In the folder bar, several folders created by default or by the user are displayed, and the folder address of the user's favorite is saved in the folder. The page address bar displays the list of page addresses included in the folder selected by the user in the folder bar. The address in the page address list is usually displayed in the form of an address name, that is, when the user selects a folder in the folder bar. The address contained in the folder is displayed in the address bar as a list; the preview bar displays the preview information of the web page corresponding to the address selected by the user in the page address bar. When the user clicks on the URL of a download page in the address bar of the page, the download page corresponding to the URL can be opened. When the user clicks on the horizontal blank area around the URL of a download page in the address bar (ie, selects the download page URL of the user's favorite), the web favorites client sends a download address acquisition request to the server, and the server returns the preferred download address to the web collection. In the folder client, the web favorites client displays a preferred download address of the download page in the preview bar on the right side. When the user clicks the download address in the preview bar on the right side, the download can be completed, and the user needs to enter the download. The page finds the action of the real or preferred download address from the download page. Correspondingly, the present invention further provides a third download processing method, which specifically includes the following steps:
步骤 1 : 根据下载页面的页面地址, 获取所述下载页面的页面源码和所述下载页面对 应的下载地址规则, 所述下载页面对应一个下载对象; Step 1: According to the page address of the download page, obtain the page source code of the download page and the download address rule corresponding to the download page, where the download page corresponds to a download object;
步骤 2: 根据所述获取的页面源码和所述下载页面对应的下载地址规则, 获取所述下 载对象的优选下载地址。 Step 2: Acquire a preferred download address of the downloaded object according to the obtained page source code and the download address rule corresponding to the download page.
需要说明的是, 本发明实施例提供的上述方法可用于移动终端或个人计算机 PC 侧, 由移动终端或 PC执行, 具体而言由移动终端或 PC上安装的客户端设备或功能模块执行, 也可用于与移动终端或个人计算机 PC 相对的服务器侧, 由服务器执行, 具体而言由服务 器安装的服务端设备或功能模块执行。 It should be noted that the foregoing method provided by the embodiment of the present invention may be used on a mobile terminal or a PC side of a personal computer, and is executed by a mobile terminal or a PC, and specifically executed by a mobile terminal or a client device or a function module installed on a PC. It can be used on the server side opposite to the mobile terminal or personal computer PC, and is executed by the server, specifically by the server device or function module installed by the server.
具体地, 所述下载页面对应的下载地址规则通过正则表达式表示; Specifically, the download address rule corresponding to the download page is represented by a regular expression;
所述根据所述获取的页面源码和所述下载页面对应的下载地址规则, 获取所述下载对 象的优选下载地址包括: And obtaining, according to the obtained page source code and the download address rule corresponding to the download page, the preferred download address of the download object, including:
根据所述表示下载地址规则的正则表达式, 从所述获取的页面源码中查找到匹配所述 正则表达式的源码, 以获取到所述下载对象的优选下载地址。 And searching, according to the regular expression indicating the download address rule, a source code matching the regular expression from the obtained page source to obtain a preferred download address of the download object.
如图 3所示, 为本发明一种实施例提供的下载处理装置的结构框图, 包括: 第一操作指示接收模块 101, 用于接收客户端设备发送的下载页面的第一操作指示, 所述下载页面对应一个下载对象; As shown in FIG. 3, a block diagram of a download processing apparatus according to an embodiment of the present invention includes: a first operation indication receiving module 101, configured to receive a first operation indication of a download page sent by a client device, where The download page corresponds to a download object;
页面源码和下载地址规则获取模块 201, 用于根据所述第一操作指示, 获取所述下载 页面的页面源码和所述下载页面对应的下载地址规则; The page source and download address rule obtaining module 201 is configured to obtain, according to the first operation instruction, a page source code of the download page and a download address rule corresponding to the download page;
优选下载地址获取模块 301, 用于根据所述获取的页面源码和所述下载页面对应的下 载地址规则, 获取所述下载对象的优选下载地址; The preferred download address acquisition module 301 is configured to obtain a preferred download address of the download object according to the obtained page source code and the download address rule corresponding to the download page.
第一优选下载地址返回模块 401, 用于向所述客户端设备返回所述获取的所述下载对 象的优选下载地址, 以使所述客户端设备向用户展示所述优选下载地址, 所述用户能够通 过所述优选下载地址下载所述下载对象而无需打开所述下载页面。 a first preferred download address returning module 401, configured to return the obtained preferred download address of the downloaded object to the client device, so that the client device displays the preferred download address to a user, the user The download object can be downloaded through the preferred download address without opening the download page.
本发明针对对应于下载对象的下载页面, 根据获取的下载页面的页面源码和所述下载 页面对应的下载地址规则, 以获取所述下载对象的优选下载地址, 并向用户展示所述优选 下载地址, 使得用户能够直接获取优选下载地址, 避免了用户需要进入下载页面并从下载 页面中查找优选下载地址的操作, 缩短了用户获取优选下载地址的时间, 提高了用户的下 载效率, 从而给用户带来较好的浏览体验。 The present invention is directed to a download page corresponding to the download object, according to the page source code of the downloaded download page and the download address rule corresponding to the download page, to obtain a preferred download address of the download object, and present the preferred download address to the user. The user can directly obtain the preferred download address, avoiding the user's need to enter the download page and find the preferred download address from the download page, shortening the time for the user to obtain the preferred download address, and improving the download efficiency of the user, thereby bringing the user Come to a better browsing experience.
优选地, 所述第一操作指示中携带有所述下载页面的地址信息, 所述页面源码和下载
地址规则获取模块 201具体用于: 根据所述第一操作指示中携带的地址信息, 查询预先设 置的下载地址规则, 以获取所述地址信息对应的下载地址规则。 Preferably, the first operation indication carries the address information of the download page, the page source code and the download The address rule obtaining module 201 is specifically configured to: query a preset download address rule according to the address information carried in the first operation indication, to obtain a download address rule corresponding to the address information.
优选地, 所述页面源码和下载地址规则获取模块 201具体用于: 根据所述第一操作指 示中携带的地址信息, 确定所述下载页面的域名, 以及用于根据所述确定的下载页面的域 名, 查询预先设置的下载地址规则, 以获取所述域名对应的下载地址规则。 Preferably, the page source code and download address rule obtaining module 201 is specifically configured to: determine, according to the address information carried in the first operation indication, a domain name of the download page, and a download page according to the determined For the domain name, query the pre-set download address rule to obtain the download address rule corresponding to the domain name.
优选地, 所述页面源码和下载地址规则获取模块 201具体用于: 根据所述第一操作指 示中携带的地址信息, 向所述下载页面对应的站点服务器发送源码获取请求; 以及用于接 收所述站点服务器发送的响应信息, 其中, 所述响应信息中包括所述下载页面的网页源码。 Preferably, the page source code and download address rule obtaining module 201 is specifically configured to: send, according to the address information carried in the first operation indication, a source code acquisition request to a site server corresponding to the download page; and The response information sent by the site server, where the response information includes a webpage source code of the download page.
优选地, 所述下载页面对应的下载地址规则通过正则表达式表示, 所述优选下载地址 获取模块 301具体用于: 根据所述表示下载地址规则的正则表达式, 从所述获取的页面源 码中查找到匹配所述正则表达式的源码, 以获取到所述下载对象的优选下载地址。 Preferably, the download address rule corresponding to the download page is represented by a regular expression, and the preferred download address obtaining module 301 is specifically configured to: according to the regular expression indicating the download address rule, from the obtained page source code A source code matching the regular expression is found to obtain a preferred download address of the download object.
优选地, 所述下载页面对应的下载地址规则设定为包括至少两个正则表达式, 所述优 选下载地址获取模块 301具体用于:根据预先设定的所述至少两个正则表达式的匹配顺序, 首先从所述获取的页面源码中查找匹配所述顺序在先的正则表达式的源码; 如果没有查找 到匹配所述顺序在先的正则表达式的源码, 根据预先设定的所述至少两个正则表达式的匹 配顺序, 从所述获取的页面源码中查找匹配所述顺序其次的正则表达式的源码, 直到查找 到匹配所述正则表达式的源码, 从而获取到所述下载对象的优选下载地址。 Preferably, the download address rule corresponding to the download page is set to include at least two regular expressions, and the preferred download address obtaining module 301 is specifically configured to: match according to the preset at least two regular expressions Sequence, first searching for source code matching the sequential regular expression from the obtained page source code; if no source code matching the prior-order regular expression is found, according to the preset Matching order of two regular expressions, searching for source code matching the sequential regular expression from the obtained page source code, until finding the source code matching the regular expression, thereby obtaining the download object Preferred download address.
优选地, 所述下载页面对应的下载地址规则包括至少两个正则表达式; Preferably, the download address rule corresponding to the download page includes at least two regular expressions;
所述优选下载地址获取模块具体用于: The preferred download address obtaining module is specifically configured to:
根据所述获取的页面源码和所述至少两个正则表达式, 分别从所述获取的页面源码中 查找到匹配所述至少两个正则表达式中每个所述正则表达式的源码, 以获取到与所述至少 两个正则表达式中每个所述正则表达式分别对应的、 所述下载对象的优选下载地址。 And searching, according to the obtained page source code and the at least two regular expressions, the source code that matches each of the at least two regular expressions in the obtained page source to obtain And a preferred download address of the download object corresponding to each of the at least two regular expressions.
优选地, 所述下载处理装置还包括: 下载地址获取请求模块, 用于在所述第一优选下 载地址返回模块向所述客户端设备返回所述获取的所述下载对象的优选下载地址前, 接收 所述客户端设备发送的下载地址获取请求; Preferably, the download processing device further includes: a download address obtaining request module, configured to: before the first preferred download address returning module returns the obtained preferred download address of the download object to the client device, Receiving a download address acquisition request sent by the client device;
所述第一优选下载地址返回模块具体用于: 根据所述下载地址获取请求, 向所述客户 端设备返回响应消息, 所述响应消息中包括所述下载对象对应的优选下载地址。 The first preferred download address returning module is specifically configured to: return a response message to the client device according to the download address obtaining request, where the response message includes a preferred download address corresponding to the download object.
本发明还提供了第二种下载处理装置, 其特征在于, 包括: The present invention also provides a second download processing apparatus, which includes:
第一操作指令接收模块 102, 用于接收用户对下载页面的第一操作指令, 所述下载页 面对应一个下载对象;
第一操作指示发送模块 202, 用于根据所述第一操作指令, 向服务器发送所述下载页 面的第一操作指示, 以使所述服务器获取所述下载对象的优选下载地址; The first operation instruction receiving module 102 is configured to receive a first operation instruction of the user to download the page, where the download page corresponds to one download object; The first operation indication sending module 202 is configured to send, according to the first operation instruction, a first operation indication of the download page to the server, so that the server acquires a preferred download address of the download object;
优选下载地址返回模块 302, 用于接收服务器返回的所述下载对象对应的优选下载地 址; The preferred download address returning module 302 is configured to receive a preferred download address corresponding to the download object returned by the server;
第二优选下载地址展示模块 402, 用于向用户展示所述接收的优选下载地址, 以使所 述用户能够通过所述优选下载地址下载所述下载对象而无需打开所述下载页面。 The second preferred download address display module 402 is configured to present the received preferred download address to the user to enable the user to download the download object through the preferred download address without opening the download page.
优选地, 所述第二优选下载地址展示模块 402具体用于: 弹出所述下载页面对应的缩 略信息窗口, 所述缩略信息窗口中显示有所述接收的优选下载地址。 Preferably, the second preferred download address display module 402 is specifically configured to: pop up a thumbnail information window corresponding to the download page, where the received preferred download address is displayed in the thumbnail information window.
优选地, 所述装置还包括: Preferably, the device further includes:
第一界面提供模块, 用于在所述优选下载地址返回模块接收服务器返回的所述下载对 象对应的优选下载地址之前, 提供第一界面, 所述第一界面包括页面地址区和预览区, 所 述页面地址区中显示页面列表, 所述页面列表中包括所述下载页面的标识信息, 所述标识 信息包括所述下载页面的标题和 /或所述下载页面的地址, a first interface providing module, configured to provide a first interface, where the first interface includes a page address area and a preview area, before the preferred download address returning module receives a preferred download address corresponding to the download object returned by the server, where Displaying a page list in the page address area, where the page list includes identification information of the download page, where the identifier information includes a title of the download page and/or an address of the download page.
第二操作指令接收模块, 用于接收用户对所述下载页面的标识信息的第二操作指令; 下载地址获取请求模块, 用于根据所述第二操作指令, 向所述服务器发送下载地址获 取请求; a second operation instruction receiving module, configured to receive a second operation instruction of the user for the identification information of the download page, and a download address acquisition request module, configured to send a download address acquisition request to the server according to the second operation instruction ;
优选下载地址返回模块具体用于: 接收服务器根据所述下载地址获取请求返回的响应 消息, 所述响应消息中包括所述下载对象对应的优选下载地址; The preferred download address returning module is specifically configured to: receive, by the receiving server, a response message that is returned according to the download address, where the response message includes a preferred download address corresponding to the download object;
第二优选下载地址展示模块具体用于:在所述预览区中展示所述接收的优选下载地址。 优选地, 所述下载处理装置还包括: The second preferred download address display module is specifically configured to: display the received preferred download address in the preview area. Preferably, the download processing device further includes:
点击操作检测模块, 用于在所述第二优选下载地址展示模块在所述预览区中展示所述 接收的优选下载地址后, 检测用户对所述展示的优选下载地址的点击操作; a click operation detection module, configured to detect, by the second preferred download address display module, the click operation of the preferred download address of the display after the second preferred download address display module displays the received preferred download address in the preview area;
下载模块, 用于当检测到所述点击操作时, 根据所述优选下载地址下载所述下载对象。 本发明实施例还提供一种服务器, 包括上述第一种下载处理装置。 And a downloading module, configured to download the download object according to the preferred download address when the click operation is detected. An embodiment of the present invention further provides a server, including the foregoing first download processing apparatus.
本发明实施例还提供一种客户端设备, 包括上述第二种下载处理装置。 The embodiment of the invention further provides a client device, which comprises the above second download processing device.
本发明还提供了一种浏览器, 包括所述的下载处理装置, 所述下载处理装置嵌入在所 述浏览器中。 The present invention also provides a browser comprising the download processing device, the download processing device being embedded in the browser.
实施例一: Embodiment 1:
以 PC浏览器为例进行说明,可以是 IE浏览器、 Mozilla的 Firefox、Apple的 Safari, Opera
Google Chrome, GreenBrowser浏览器、 360安全浏览器、 搜狗高速浏览器、 腾讯 TT、 傲 游浏览器、 百度浏览器、腾讯 QQ浏览器等等, 该浏览器中嵌入了上述下载处理装置, 浏览 器按照如下步骤进行操作: Take a PC browser as an example, it can be IE browser, Mozilla Firefox, Apple Safari, Opera Google Chrome, GreenBrowser browser, 360 security browser, Sogou high speed browser, Tencent TT, Maxthon browser, Baidu browser, Tencent QQ browser, etc., the browser has embedded the above download processing device, the browser is as follows Steps to proceed:
步骤一: 接收客户端设备发送的下载页面的第一操作指示, 所述下载页面对应一个下 载对象; Step 1: receiving a first operation indication of the download page sent by the client device, where the download page corresponds to one download object;
步骤二: 根据所述第一操作指示, 获取所述下载页面的页面源码和所述下载页面对应 的下载地址规则; Step 2: Obtain, according to the first operation indication, a page source code of the download page and a download address rule corresponding to the download page;
步骤三: 根据所述获取的页面源码和所述下载页面对应的下载地址规则, 获取所述下 载对象的优选下载地址; Step 3: Obtain a preferred download address of the downloaded object according to the obtained page source code and a download address rule corresponding to the download page.
步骤四: 向所述客户端设备返回所述获取的所述下载对象的优选下载地址, 以使所述 客户端设备向用户展示所述优选下载地址, 所述用户能够通过所述优选下载地址下载所述 下载对象而无需打开所述下载页面。 Step 4: Return the obtained preferred download address of the downloaded object to the client device, so that the client device displays the preferred download address to the user, and the user can download through the preferred download address. The download object does not need to open the download page.
本实施例在 PC 浏览器中根据获取的下载页面的页面源码和所述下载页面对应的下载 地址规则, 以获取所述下载对象的优选下载地址, 并向用户展示所述优选下载地址, 使得 用户能够直接获取优选下载地址, 避免了用户需要进入下载页面并从下载页面中查找优选 下载地址的操作, 缩短了用户获取优选下载地址的时间, 提高了用户的下载效率, 从而给 用户带来较好的浏览体验。 In the PC browser, according to the obtained page source code of the downloaded page and the download address rule corresponding to the downloaded page, the preferred download address of the download object is obtained, and the preferred download address is displayed to the user, so that the user The user can directly obtain the preferred download address, which avoids the user's need to enter the download page and find the preferred download address from the download page, shortens the time for the user to obtain the preferred download address, improves the download efficiency of the user, and thus provides better users. Browsing experience.
实施例二: Embodiment 2:
以手机浏览器为例进行说明, 在手机浏览器中嵌入了上述下载处理装置, 本发明的手 机浏览器还可以对网页的内容进行调整, 根据不同型号手机的参数对显示内容进行调整, 以适合手机屏幕显示。 当用户利用该手机浏览器进行浏览页面时, 按照如下步骤进行操作: 步骤一: 接收客户端设备发送的下载页面的第一操作指示, 所述下载页面对应一个下 载对象; Taking the mobile phone browser as an example, the above-mentioned download processing device is embedded in the mobile phone browser, and the mobile phone browser of the present invention can also adjust the content of the webpage, and adjust the display content according to the parameters of different models of mobile phones to suit the The phone screen is displayed. When the user browses the page by using the mobile phone browser, the following steps are performed: Step 1: Receive a first operation instruction of the download page sent by the client device, where the download page corresponds to a download object;
步骤二: 根据所述第一操作指示, 获取所述下载页面的页面源码和所述下载页面对应 的下载地址规则; Step 2: Obtain, according to the first operation indication, a page source code of the download page and a download address rule corresponding to the download page;
步骤三: 根据所述获取的页面源码和所述下载页面对应的下载地址规则, 获取所述下 载对象的优选下载地址; Step 3: Obtain a preferred download address of the downloaded object according to the obtained page source code and a download address rule corresponding to the download page.
步骤四: 向所述客户端设备返回所述获取的所述下载对象的优选下载地址, 以使所述 客户端设备向用户展示所述优选下载地址, 所述用户能够通过所述优选下载地址下载所述
下载对象而无需打开所述下载页面。 Step 4: Return the obtained preferred download address of the downloaded object to the client device, so that the client device displays the preferred download address to the user, and the user can download through the preferred download address. Said Download the object without opening the download page.
本实施例在手机浏览器中根据获取的下载页面的页面源码和所述下载页面对应的下载 地址规则, 以获取所述下载对象的优选下载地址, 并向用户展示所述优选下载地址, 使得 用户能够直接获取优选下载地址, 避免了用户需要进入下载页面并从下载页面中查找优选 下载地址的操作, 缩短了用户获取优选下载地址的时间, 提高了用户的下载效率, 从而给 用户带来较好的浏览体验。 In this embodiment, the mobile phone browser obtains the preferred download address of the download object according to the obtained page source code of the downloaded page and the download address rule corresponding to the download page, and displays the preferred download address to the user, so that the user The user can directly obtain the preferred download address, which avoids the user's need to enter the download page and find the preferred download address from the download page, shortens the time for the user to obtain the preferred download address, improves the download efficiency of the user, and thus provides better users. Browsing experience.
本发明实施例还提供了一种可读存储介质, 用于存储计算机程序, 所述计算机程序在 运行时用于执行本发明上述实施例所公开的下载处理方法。 The embodiment of the present invention further provides a readable storage medium for storing a computer program, which is used to execute the download processing method disclosed in the above embodiment of the present invention.
应用上述技术方案, 针对对应于下载对象的下载页面, 根据获取的下载页面的页面源 码和所述下载页面对应的下载地址规则, 以获取所述下载对象的优选下载地址, 并向用户 展示所述优选下载地址, 使得用户能够直接获取优选下载地址, 避免了用户需要进入下载 页面并从下载页面中查找优选下载地址的操作, 缩短了用户获取优选下载地址的时间, 提 高了用户的下载效率, 从而给用户带来较好的浏览体验。 Applying the above technical solution, for the download page corresponding to the download object, obtaining the preferred download address of the download object according to the page source code of the downloaded download page and the download address rule corresponding to the download page, and displaying the Preferably, the download address is obtained, so that the user can directly obtain the preferred download address, which avoids the user's need to enter the download page and find the preferred download address from the download page, shortens the time for the user to obtain the preferred download address, and improves the download efficiency of the user. Give users a better browsing experience.
此说明书中所描述的许多功能部件都被称为模块, 以便更加特别地强调其实现方式的 独立性。 Many of the features described in this specification are referred to as modules to more particularly emphasize the independence of their implementation.
本发明实施例中, 模块可以用软件实现, 以便由各种类型的处理器执行。 举例来说, 一个标识的可执行代码模块可以包括计算机指令的一个或多个物理或者逻辑块,举例来说, 其可以被构建为对象、 过程或函数。 尽管如此, 所标识模块的可执行代码无需物理地位于 一起, 而是可以包括存储在不同物理上的不同的指令, 当这些指令逻辑上结合在一起时, 其构成模块并且实现该模块的规定目的。 In an embodiment of the invention, the modules may be implemented in software for execution by various types of processors. For example, an identified executable code module can comprise one or more physical or logical blocks of computer instructions, which can be constructed, for example, as an object, procedure, or function. Nonetheless, the executable code of the identified modules need not be physically located together, but may include different instructions stored in different physicalities. When these instructions are logically combined, they form a module and implement the specified purpose of the module. .
实际上, 可执行代码模块可以是单条指令或者是许多条指令, 并且甚至可以分布在多 个不同的代码段上, 分布在不同程序当中, 以及跨越多个存储器设备分布。 同样地, 操作 数据可以在模块内被识别, 并且可以依照任何适当的形式实现并且被组织在任何适当类型 的数据结构内。所述操作数据可以作为单个数据集被收集,或者可以分布在不同位置上(包 括在不同存储设备上), 并且至少部分地可以仅作为电子信号存在于系统或网络上。 In fact, the executable code module can be a single instruction or a number of instructions, and can even be distributed over multiple different code segments, distributed among different programs, and distributed across multiple memory devices. Likewise, operational data can be identified within the module and can be implemented in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations (including on different storage devices), and may at least partially exist as an electronic signal on a system or network.
在模块可以利用软件实现时, 考虑到现有硬件工艺的水平, 所以可以以软件实现的模 块, 在不考虑成本的情况下, 本领域技术人员都可以搭建对应的硬件电路来实现对应的功 能, 所述硬件电路包括常规的超大规模集成 (VLSI) 电路或者门阵列以及诸如逻辑芯片、 晶体管之类的现有半导体或者是其它分立的元件。 模块还可以用可编程硬件设备, 诸如现 场可编程门阵列、 可编程阵列逻辑、 可编程逻辑设备等实现。
在本发明各方法实施例中, 所述各步骤的序号并不能用于限定各步骤的先后顺序, 对 于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 对各步骤的先后变化也在本 发明的保护范围之内。 When the module can be implemented by software, considering the level of the existing hardware process, the module can be implemented in software. Without considering the cost, a person skilled in the art can construct a corresponding hardware circuit to implement the corresponding function. The hardware circuitry includes conventional Very Large Scale Integration (VLSI) circuits or gate arrays as well as existing semiconductors such as logic chips, transistors, or other discrete components. Modules can also be implemented with programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices, and the like. In the method embodiments of the present invention, the sequence numbers of the steps are not used to limit the sequence of the steps. For those skilled in the art, the steps of the steps are changed without any creative work. It is also within the scope of the invention.
以上所述是本发明的优选实施方式, 应当指出, 对于本技术领域的普通技术人员来说, 在不脱离本发明所述原理的前提下, 还可以作出若干改进和润饰, 这些改进和润饰也应视 为本发明的保护范围。
The above is a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention.
Claims
1. 一种下载处理方法, 其特征在于, 包括: 1. A download processing method, characterized in that it includes:
接收客户端设备发送的下载页面的第一操作指示, 所述下载页面对应一个下载对象; 根据所述第一操作指示, 获取所述下载页面的页面源码和所述下载页面对应的下载地 址规则; Receive a first operation instruction for downloading a page sent by a client device, where the download page corresponds to a download object; obtain the page source code of the download page and the download address rule corresponding to the download page according to the first operation instruction;
根据所述获取的页面源码和所述下载页面对应的下载地址规则, 获取所述下载对象的 优选下载地址; Obtain the preferred download address of the download object according to the obtained page source code and the download address rule corresponding to the download page;
向所述客户端设备返回所述获取的所述下载对象的优选下载地址, 以使所述客户端设 备向用户展示所述优选下载地址, 所述用户能够通过所述优选下载地址下载所述下载对象 而无需打开所述下载页面。 Return the obtained preferred download address of the download object to the client device, so that the client device displays the preferred download address to the user, and the user can download the download through the preferred download address object without opening said download page.
2. 根据权利要求 1所述的下载处理方法, 其特征在于, 2. The download processing method according to claim 1, characterized in that,
所述第一操作指示中携带有所述下载页面的地址信息; The first operation instruction carries address information of the download page;
所述根据所述第一操作指示, 获取所述下载页面对应的下载地址规则包括: 根据所述第一操作指示中携带的地址信息, 查询预先设置的下载地址规则, 以获取所 述地址信息对应的下载地址规则。 Obtaining the download address rule corresponding to the download page according to the first operation instruction includes: querying the preset download address rule according to the address information carried in the first operation instruction to obtain the download address rule corresponding to the address information Download address rules.
3. 根据权利要求 2所述的下载处理方法, 其特征在于, 3. The download processing method according to claim 2, characterized in that,
所述根据所述第一操作指示中携带的地址信息, 查询预先设置的下载地址规则, 以获 取所述地址信息对应的下载地址规则包括: Querying preset download address rules according to the address information carried in the first operation instruction to obtain the download address rules corresponding to the address information includes:
根据所述第一操作指示中携带的地址信息, 确定所述下载页面的域名; Determine the domain name of the download page according to the address information carried in the first operation instruction;
根据所述确定的下载页面的域名, 查询预先设置的下载地址规则, 以获取所述域名对 应的下载地址规则。 According to the determined domain name of the download page, the preset download address rules are queried to obtain the download address rules corresponding to the domain name.
4. 根据权利要求 2或 3所述的下载处理方法, 其特征在于, 4. The download processing method according to claim 2 or 3, characterized in that,
所述根据所述第一操作指示, 获取所述下载页面的页面源码包括: Obtaining the page source code of the download page according to the first operation instruction includes:
根据所述第一操作指示中携带的地址信息, 向所述下载页面对应的站点服务器发送源 码获取请求; According to the address information carried in the first operation instruction, send a source code acquisition request to the site server corresponding to the download page;
接收所述站点服务器发送的响应信息, 其中, 所述响应信息中包括所述下载页面的网 页源码。 Receive response information sent by the site server, wherein the response information includes the web page source code of the download page.
5. 根据权利要求 1-4中任一项所述的下载处理方法, 其特征在于, 所述下载页面对应 的下载地址规则通过正则表达式表示;
所述根据所述获取的页面源码和所述下载页面对应的下载地址规则, 获取所述下载对 象的优选下载地址包括: 5. The download processing method according to any one of claims 1 to 4, characterized in that, the download address rules corresponding to the download page are expressed by regular expressions; According to the obtained page source code and the download address rule corresponding to the download page, obtaining the preferred download address of the download object includes:
根据所述表示下载地址规则的正则表达式, 从所述获取的页面源码中查找到匹配所述 正则表达式的源码, 以获取到所述下载对象的优选下载地址。 According to the regular expression representing the download address rule, the source code matching the regular expression is found from the obtained page source code, so as to obtain the preferred download address of the download object.
6. 根据权利要求 5所述的下载处理方法, 其特征在于, 6. The download processing method according to claim 5, characterized in that,
所述下载页面对应的下载地址规则包括至少两个正则表达式; The download address rule corresponding to the download page includes at least two regular expressions;
所述根据所述获取的页面源码和所述下载页面对应的下载地址规则, 获取所述下载对 象的优选下载地址包括: According to the obtained page source code and the download address rule corresponding to the download page, obtaining the preferred download address of the download object includes:
根据预先设定的所述至少两个正则表达式的匹配顺序, 首先从所述获取的页面源码中 查找匹配所述顺序在先的正则表达式的源码; According to the preset matching order of the at least two regular expressions, first search the source code that matches the regular expression in the order from the obtained page source code;
如果没有查找到匹配所述顺序在先的正则表达式的源码, 根据预先设定的所述至少两 个正则表达式的匹配顺序, 从所述获取的页面源码中查找匹配所述顺序其次的正则表达式 的源码, 直到查找到匹配所述正则表达式的源码, 从而获取到所述下载对象的优选下载地 址。 If no source code is found that matches the regular expression that precedes the sequence, according to the preset matching order of the at least two regular expressions, search for the regular expression that matches the sequence that follows from the obtained page source code. The source code of the expression is found until the source code matching the regular expression is found, thereby obtaining the preferred download address of the download object.
7. 根据权利要求 6所述的下载处理方法, 其特征在于, 7. The download processing method according to claim 6, characterized in that,
所述下载页面对应的下载地址规则包括与官方下载地址、 主流下载工具地址、 网站推 荐下载地址分别相对应的正则表达式; The download address rules corresponding to the download page include regular expressions corresponding to the official download address, mainstream download tool address, and website recommended download address respectively;
所述正则表达式的匹配顺序为: 与官方下载地址相对应的正则表达式、 与主流下载工 具地址相对应的正则表达式、 与网站推荐下载地址相对应的正则表达式。 The matching order of the regular expressions is: the regular expression corresponding to the official download address, the regular expression corresponding to the mainstream download tool address, and the regular expression corresponding to the website recommended download address.
8. 根据权利要求 5所述的下载处理方法, 其特征在于, 8. The download processing method according to claim 5, characterized in that,
所述下载页面对应的下载地址规则包括至少两个正则表达式; The download address rules corresponding to the download page include at least two regular expressions;
所述根据所述获取的页面源码和所述下载页面对应的下载地址规则, 获取所述下载对 象的优选下载地址包括: According to the obtained page source code and the download address rule corresponding to the download page, obtaining the preferred download address of the download object includes:
根据所述获取的页面源码和所述至少两个正则表达式, 分别从所述获取的页面源码中 查找到匹配所述至少两个正则表达式中每个所述正则表达式的源码, 以获取到与所述至少 两个正则表达式中每个所述正则表达式分别对应的、 所述下载对象的优选下载地址。 According to the obtained page source code and the at least two regular expressions, source code matching each of the at least two regular expressions is found from the obtained page source code, to obtain to the preferred download address of the download object corresponding to each of the at least two regular expressions.
9. 根据权利要求 1-8中任一项所述的下载处理方法, 其特征在于, 在所述向所述客户 端设备返回所述获取的所述下载对象的优选下载地址前, 所述方法还包括: 9. The download processing method according to any one of claims 1 to 8, characterized in that, before returning the obtained preferred download address of the download object to the client device, the method Also includes:
接收所述客户端设备发送的下载地址获取请求; Receive a download address acquisition request sent by the client device;
所述向所述客户端设备返回所述获取的所述下载对象的优选下载地址包括:
根据所述下载地址获取请求, 向所述客户端设备返回响应消息, 所述响应消息中包括 所述下载对象对应的优选下载地址。 Returning the obtained preferred download address of the download object to the client device includes: According to the download address acquisition request, a response message is returned to the client device, where the response message includes the preferred download address corresponding to the download object.
10. 一种下载处理方法, 其特征在于, 包括: 10. A download processing method, characterized in that it includes:
接收用户对下载页面的第一操作指令, 所述下载页面对应一个下载对象; Receive the user's first operation instruction for the download page, where the download page corresponds to a download object;
根据所述第一操作指令, 向服务器发送所述下载页面的第一操作指示, 以使所述服务 器获取所述下载对象的优选下载地址; According to the first operation instruction, send the first operation instruction of the download page to the server, so that the server obtains the preferred download address of the download object;
接收服务器返回的所述下载对象对应的优选下载地址; Receive the preferred download address corresponding to the download object returned by the server;
向用户展示所述接收的优选下载地址, 以使所述用户能够通过所述优选下载地址下载 所述下载对象而无需打开所述下载页面。 The received preferred download address is displayed to the user, so that the user can download the download object through the preferred download address without opening the download page.
11. 根据权利要求 10所述的下载处理方法, 其特征在于, 11. The download processing method according to claim 10, characterized in that,
所述向用户展示所述接收的优选下载地址包括: The displaying the received preferred download address to the user includes:
弹出所述下载页面对应的缩略信息窗口, 所述缩略信息窗口中显示有所述接收的优选 下载地址。 A thumbnail information window corresponding to the download page pops up, and the received preferred download address is displayed in the thumbnail information window.
12. 根据权利要求 10或 11所述的下载处理方法, 其特征在于, 12. The download processing method according to claim 10 or 11, characterized in that,
在所述接收服务器返回的所述下载对象对应的优选下载地址前, 所述方法还包括: 提供第一界面, 所述第一界面包括页面地址区和预览区, 所述页面地址区中显示页面 列表, 所述页面列表中包括所述下载页面的标识信息, 所述标识信息包括所述下载页面的 标题和 /或所述下载页面的地址; Before receiving the preferred download address corresponding to the download object returned by the receiving server, the method further includes: providing a first interface, where the first interface includes a page address area and a preview area, and the page is displayed in the page address area. List, the page list includes identification information of the download page, and the identification information includes the title of the download page and/or the address of the download page;
接收用户对所述下载页面的标识信息的第二操作指令; Receive a second operation instruction from the user regarding the identification information of the download page;
根据所述第二操作指令, 向所述服务器发送下载地址获取请求; According to the second operation instruction, send a download address acquisition request to the server;
所述接收服务器返回的所述下载对象对应的优选下载地址包括: The preferred download address corresponding to the download object returned by the receiving server includes:
接收服务器根据所述下载地址获取请求返回的响应消息, 所述响应消息中包括所述下 载对象对应的优选下载地址; The receiving server obtains a response message returned by the request according to the download address, and the response message includes the preferred download address corresponding to the download object;
所述向用户展示所述接收的优选下载地址包括: The displaying the received preferred download address to the user includes:
在所述预览区中展示所述接收的优选下载地址。 The received preferred download address is displayed in the preview area.
13. 根据权利要求 12所述的下载处理方法, 其特征在于, 所述在所述预览区中展示所 述接收的优选下载地址后, 所述方法还包括: 13. The download processing method according to claim 12, wherein after displaying the received preferred download address in the preview area, the method further includes:
检测用户对所述展示的优选下载地址的点击操作; Detect the user's click operation on the displayed preferred download address;
当检测到所述点击操作时, 根据所述优选下载地址下载所述下载对象。 When the click operation is detected, the download object is downloaded according to the preferred download address.
14. 一种下载处理装置, 其特征在于, 包括:
第一操作指示接收模块, 用于接收客户端设备发送的下载页面的第一操作指示, 所述 下载页面对应一个下载对象; 14. A download processing device, characterized in that it includes: The first operation instruction receiving module is configured to receive the first operation instruction of the download page sent by the client device, where the download page corresponds to a download object;
页面源码和下载地址规则获取模块, 用于根据所述第一操作指示, 获取所述下载页面 的页面源码和所述下载页面对应的下载地址规则; The page source code and download address rule acquisition module is used to obtain the page source code of the download page and the download address rule corresponding to the download page according to the first operation instruction;
优选下载地址获取模块, 用于根据所述获取的页面源码和所述下载页面对应的下载地 址规则, 获取所述下载对象的优选下载地址; The preferred download address acquisition module is configured to obtain the preferred download address of the download object based on the obtained page source code and the download address rule corresponding to the download page;
第一优选下载地址返回模块, 用于向所述客户端设备返回所述获取的所述下载对象的 优选下载地址, 以使所述客户端设备向用户展示所述优选下载地址, 所述用户能够通过所 述优选下载地址下载所述下载对象而无需打开所述下载页面。 A first preferred download address return module, configured to return the obtained preferred download address of the download object to the client device, so that the client device displays the preferred download address to the user, and the user can Download the download object through the preferred download address without opening the download page.
15. 根据权利要求 14所述的下载处理装置, 其特征在于, 所述第一操作指示中携带有 所述下载页面的地址信息; 15. The download processing device according to claim 14, wherein the first operation instruction carries the address information of the download page;
所述页面源码和下载地址规则获取模块具体用于: 根据所述第一操作指示中携带的地 址信息, 查询预先设置的下载地址规则, 以获取所述地址信息对应的下载地址规则。 The page source code and download address rule acquisition module is specifically configured to: query the preset download address rules according to the address information carried in the first operation instruction to obtain the download address rules corresponding to the address information.
16. 根据权利要求 15所述的下载处理装置, 其特征在于, 所述页面源码和下载地址 规则获取模块具体用于: 根据所述第一操作指示中携带的地址信息, 确定所述下载页面的 域名, 以及根据所述确定的下载页面的域名, 查询预先设置的下载地址规则, 以获取所述 域名对应的下载地址规则。 16. The download processing device according to claim 15, wherein the page source code and download address rule acquisition module is specifically configured to: determine the download page based on the address information carried in the first operation instruction. The domain name, and based on the determined domain name of the download page, query the preset download address rules to obtain the download address rules corresponding to the domain name.
17. 根据权利要求 15或 16所述的下载处理装置, 其特征在于, 所述页面源码和下载 地址规则获取模块具体用于: 根据所述第一操作指示中携带的地址信息, 向所述下载页面 对应的站点服务器发送源码获取请求; 17. The download processing device according to claim 15 or 16, characterized in that the page source code and download address rule acquisition module is specifically configured to: according to the address information carried in the first operation instruction, to the download The site server corresponding to the page sends a source code acquisition request;
接收所述站点服务器发送的响应信息, 其中, 所述响应信息中包括所述下载页面的网 页源码。 Receive response information sent by the site server, wherein the response information includes the web page source code of the download page.
18. 根据权利要求 14-17中任一项所述的下载处理装置, 其特征在于, 所述下载页面 对应的下载地址规则通过正则表达式表示; 18. The download processing device according to any one of claims 14-17, characterized in that the download address rules corresponding to the download page are expressed by regular expressions;
所述优选下载地址获取模块具体用于: 根据所述表示下载地址规则的正则表达式, 从 所述获取的页面源码中查找到匹配所述正则表达式的源码, 以获取到所述下载对象的优选 下载地址。 The preferred download address acquisition module is specifically configured to: according to the regular expression representing the download address rule, find the source code matching the regular expression from the acquired page source code, so as to obtain the download object Preferred download address.
19. 根据权利要求 18所述的下载处理装置, 其特征在于, 所述下载页面对应的下载 地址规则设定为包括至少两个正则表达式;
所述优选下载地址获取模块具体用于: 根据预先设定的所述至少两个正则表达式的匹 配顺序, 首先从所述获取的页面源码中查找匹配所述顺序在先的正则表达式的源码; 如果没有查找到匹配所述顺序在先的正则表达式的源码, 根据预先设定的所述至少两 个正则表达式的匹配顺序, 从所述获取的页面源码中查找匹配所述顺序其次的正则表达式 的源码, 直到查找到匹配所述正则表达式的源码, 从而获取到所述下载对象的优选下载地 址。 19. The download processing device according to claim 18, characterized in that, the download address rule corresponding to the download page is set to include at least two regular expressions; The preferred download address acquisition module is specifically configured to: According to the preset matching order of the at least two regular expressions, first search the source code of the obtained page source code that matches the regular expression that precedes the order. ; If no source code is found that matches the regular expression that comes first in the order, according to the preset matching order of the at least two regular expressions, search for the source code that matches the second regular expression in the order that is obtained. The source code of the regular expression is found until the source code matching the regular expression is found, thereby obtaining the preferred download address of the download object.
20. 根据权利要求 18所述的下载处理装置, 其特征在于, 20. The download processing device according to claim 18, characterized in that,
所述下载页面对应的下载地址规则包括至少两个正则表达式; The download address rule corresponding to the download page includes at least two regular expressions;
所述优选下载地址获取模块具体用于: The preferred download address acquisition module is specifically used for:
根据所述获取的页面源码和所述至少两个正则表达式, 分别从所述获取的页面源码中 查找到匹配所述至少两个正则表达式中每个所述正则表达式的源码, 以获取到与所述至少 两个正则表达式中每个所述正则表达式分别对应的、 所述下载对象的优选下载地址。 According to the obtained page source code and the at least two regular expressions, source code matching each of the at least two regular expressions is found from the obtained page source code, to obtain to the preferred download address of the download object corresponding to each of the at least two regular expressions.
21. 根据权利要求 14-20 中任一项所述的下载处理装置, 其特征在于, 还包括下载地 址获取请求模块, 用于在所述第一优选下载地址返回模块向所述客户端设备返回所述获取 的所述下载对象的优选下载地址前, 接收所述客户端设备发送的下载地址获取请求; 所述第一优选下载地址返回模块具体用于: 根据所述下载地址获取请求, 向所述客户 端设备返回响应消息, 所述响应消息中包括所述下载对象对应的优选下载地址。 21. The download processing device according to any one of claims 14 to 20, further comprising a download address acquisition request module configured to return the first preferred download address to the client device in the first preferred download address return module. Before obtaining the preferred download address of the download object, receive a download address acquisition request sent by the client device; the first preferred download address return module is specifically configured to: according to the download address acquisition request, The client device returns a response message, and the response message includes the preferred download address corresponding to the download object.
22. 一种下载处理装置, 其特征在于, 包括: 22. A download processing device, characterized in that it includes:
第一操作指令接收模块, 用于接收用户对下载页面的第一操作指令, 所述下载页面对 应一个下载对象; The first operation instruction receiving module is used to receive the user's first operation instruction for the download page, where the download page corresponds to a download object;
第一操作指示发送模块, 用于根据所述第一操作指令, 向服务器发送所述下载页面的 第一操作指示, 以使所述服务器获取所述下载对象的优选下载地址; A first operation instruction sending module, configured to send the first operation instruction of the download page to the server according to the first operation instruction, so that the server obtains the preferred download address of the download object;
优选下载地址返回模块, 用于接收服务器返回的所述下载对象对应的优选下载地址; 第二优选下载地址展示模块, 用于向用户展示所述接收的优选下载地址, 以使所述用 户能够通过所述优选下载地址下载所述下载对象而无需打开所述下载页面。 The preferred download address return module is used to receive the preferred download address corresponding to the download object returned by the server; the second preferred download address display module is used to display the received preferred download address to the user so that the user can pass The preferred download address downloads the download object without opening the download page.
23. 根据权利要求 22所述的下载处理装置, 其特征在于, 所述第二优选下载地址展示 模块具体用于: 弹出所述下载页面对应的缩略信息窗口, 所述缩略信息窗口中显示有所述 接收的优选下载地址。 23. The download processing device according to claim 22, wherein the second preferred download address display module is specifically configured to: pop up a thumbnail information window corresponding to the download page, and display in the thumbnail information window There is a preferred download address for said reception.
24. 根据权利要求 22或 23所述的下载处理装置, 其特征在于, 还包括: 24. The download processing device according to claim 22 or 23, further comprising:
第一界面提供模块, 用于在所述优选下载地址返回模块接收服务器返回的所述下载对
象对应的优选下载地址之前, 提供第一界面, 所述第一界面包括页面地址区和预览区, 所 述页面地址区中显示页面列表, 所述页面列表中包括所述下载页面的标识信息, 所述标识 信息包括所述下载页面的标题和 /或所述下载页面的地址, The first interface provides a module for receiving the download pair returned by the server in the preferred download address return module. Before the corresponding preferred download address is displayed, a first interface is provided. The first interface includes a page address area and a preview area. A page list is displayed in the page address area. The page list includes identification information of the download page. The identification information includes the title of the download page and/or the address of the download page,
第二操作指令接收模块, 用于接收用户对所述下载页面的标识信息的第二操作指令; 下载地址获取请求模块, 用于根据所述第二操作指令, 向所述服务器发送下载地址获 取请求; The second operation instruction receiving module is used to receive the user's second operation instruction for the identification information of the download page; the download address acquisition request module is used to send a download address acquisition request to the server according to the second operation instruction. ;
优选下载地址返回模块具体用于: 接收服务器根据所述下载地址获取请求返回的响应 消息, 所述响应消息中包括所述下载对象对应的优选下载地址; The preferred download address return module is specifically configured to: receive a response message returned by the request from the server based on the download address, where the response message includes the preferred download address corresponding to the download object;
第二优选下载地址展示模块具体用于:在所述预览区中展示所述接收的优选下载地址。 The second preferred download address display module is specifically configured to: display the received preferred download address in the preview area.
25. 根据权利要求 24所述的下载处理装置, 其特征在于, 还包括: 25. The download processing device according to claim 24, further comprising:
点击操作检测模块, 用于在所述第二优选下载地址展示模块在所述预览区中展示所述 接收的优选下载地址后, 检测用户对所述展示的优选下载地址的点击操作; A click operation detection module, configured to detect the user's click operation on the displayed preferred download address after the second preferred download address display module displays the received preferred download address in the preview area;
下载模块, 用于当检测到所述点击操作时, 根据所述优选下载地址下载所述下载对象。 A download module, configured to download the download object according to the preferred download address when the click operation is detected.
26. 一种服务器, 其特征在于, 包括权利要求 14-21任一项所述的下载处理装置。 26. A server, characterized by comprising the download processing device according to any one of claims 14-21.
27.—种客户端设备, 其特征在于, 包括权利要求 22-25任一项所述的下载处理装置。27. A client device, characterized in that it includes the download processing device according to any one of claims 22-25.
28.—种下载处理方法, 其特征在于, 包括: 28. A download processing method, characterized by including:
根据下载页面的页面地址, 获取所述下载页面的页面源码和所述下载页面对应的下载 地址规则, 所述下载页面对应一个下载对象; According to the page address of the download page, obtain the page source code of the download page and the download address rule corresponding to the download page, and the download page corresponds to a download object;
根据所述获取的页面源码和所述下载页面对应的下载地址规则, 获取所述下载对象的 优选下载地址。 According to the obtained page source code and the download address rule corresponding to the download page, the preferred download address of the download object is obtained.
29.根据权利要求 28 所述的下载处理方法, 其特征在于, 所述下载页面对应的下载地 址规则通过正则表达式表示; 29. The download processing method according to claim 28, characterized in that the download address rules corresponding to the download page are expressed by regular expressions;
所述根据所述获取的页面源码和所述下载页面对应的下载地址规则, 获取所述下载对 象的优选下载地址包括: According to the obtained page source code and the download address rule corresponding to the download page, obtaining the preferred download address of the download object includes:
根据所述表示下载地址规则的正则表达式, 从所述获取的页面源码中查找到匹配所述 正则表达式的源码, 以获取到所述下载对象的优选下载地址。 According to the regular expression representing the download address rule, the source code matching the regular expression is found from the obtained page source code, so as to obtain the preferred download address of the download object.
30. 一种可读存储介质, 其特征在于, 用于存储计算机程序, 所述计算机程序在运行时 用于执行权利要求 1-9中任一项所述的下载处理方法,或权利要求 10-13中任一项所述的下 载处理方法, 或权利要求 28或 29所述的下载处理方法。
30. A readable storage medium, characterized in that it is used to store a computer program, and when the computer program is run, it is used to execute the download processing method according to any one of claims 1-9, or claim 10- The download processing method according to any one of claims 13, or the download processing method according to claim 28 or 29.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310294172.X | 2013-07-12 | ||
CN201310294172.XA CN104283865A (en) | 2013-07-12 | 2013-07-12 | Download processing method and device, server and client device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015003664A1 true WO2015003664A1 (en) | 2015-01-15 |
Family
ID=52258350
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/082178 WO2015003664A1 (en) | 2013-07-12 | 2014-07-14 | Method, device, server, and client device for download processing |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN104283865A (en) |
WO (1) | WO2015003664A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105260219A (en) * | 2015-11-17 | 2016-01-20 | 魅族科技(中国)有限公司 | Software downloading method and terminal |
CN109885744A (en) * | 2019-01-07 | 2019-06-14 | 平安科技(深圳)有限公司 | Web data crawling method, device, system, computer equipment and storage medium |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105989091B (en) * | 2015-02-12 | 2019-12-24 | 阿里巴巴集团控股有限公司 | JS file loading method, device and system for page display |
CN105022832B (en) * | 2015-08-07 | 2018-11-13 | 广东欧珀移动通信有限公司 | Method, mobile terminal and the download server that APP application securities are downloaded |
CN105893428A (en) * | 2015-12-07 | 2016-08-24 | 乐视移动智能信息技术(北京)有限公司 | Advertisement filtering method, device and mobile terminal |
CN105574106B (en) * | 2015-12-14 | 2018-10-12 | 元力云网络有限公司 | A kind of Analysis of Network Information processing method of big data platform |
CN105574149A (en) * | 2015-12-16 | 2016-05-11 | 惠州Tcl移动通信有限公司 | Mobile terminal and method and system for automatically displaying downloaded content of page of mobile terminal |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090013034A1 (en) * | 2007-01-19 | 2009-01-08 | International Business Machines Corporation | Method, server, client and system for controlling download and display of web pages |
CN101369280A (en) * | 2008-10-10 | 2009-02-18 | 深圳市茁壮网络技术有限公司 | Method and device for web page browsing in digital television terminal |
CN102760162A (en) * | 2012-06-11 | 2012-10-31 | 北京搜狗信息服务有限公司 | Method and device for revealing and acquiring download link |
-
2013
- 2013-07-12 CN CN201310294172.XA patent/CN104283865A/en active Pending
-
2014
- 2014-07-14 WO PCT/CN2014/082178 patent/WO2015003664A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090013034A1 (en) * | 2007-01-19 | 2009-01-08 | International Business Machines Corporation | Method, server, client and system for controlling download and display of web pages |
CN101369280A (en) * | 2008-10-10 | 2009-02-18 | 深圳市茁壮网络技术有限公司 | Method and device for web page browsing in digital television terminal |
CN102760162A (en) * | 2012-06-11 | 2012-10-31 | 北京搜狗信息服务有限公司 | Method and device for revealing and acquiring download link |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105260219A (en) * | 2015-11-17 | 2016-01-20 | 魅族科技(中国)有限公司 | Software downloading method and terminal |
CN105260219B (en) * | 2015-11-17 | 2019-03-19 | 魅族科技(中国)有限公司 | A kind of method for downloading software and terminal |
CN109885744A (en) * | 2019-01-07 | 2019-06-14 | 平安科技(深圳)有限公司 | Web data crawling method, device, system, computer equipment and storage medium |
CN109885744B (en) * | 2019-01-07 | 2024-05-10 | 平安科技(深圳)有限公司 | Webpage data crawling method, device, system, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN104283865A (en) | 2015-01-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2015003664A1 (en) | Method, device, server, and client device for download processing | |
JP6487201B2 (en) | Method and apparatus for generating recommended pages | |
KR102006396B1 (en) | Identifying matching applications based on browsing activity | |
US8468145B2 (en) | Indexing of URLs with fragments | |
US8291312B1 (en) | Displaying web pages without downloading static files | |
US10515142B2 (en) | Method and apparatus for extracting webpage information | |
WO2016201819A1 (en) | Method and apparatus for detecting malicious file | |
WO2015188431A1 (en) | Resource downloading method and device | |
CN102831148B (en) | A kind of recommending data loading method based on browser and device | |
US10110966B2 (en) | Method, device, server and client device for video processing | |
WO2013044744A1 (en) | Download resource providing method and device | |
CN106339398A (en) | Pre-reading method and device for webpage and intelligent terminal device | |
CN111104587A (en) | Webpage display method and device and server | |
CN102968451B (en) | The browser form page loads method and the client of website data | |
CN102880654B (en) | Method for dynamically updating favorites of information terminal browser | |
CN104063460A (en) | Method and device for loading webpage in browser | |
WO2014000537A1 (en) | System and method for finding phishing website | |
CN103699597A (en) | Method for downloading file through browser and browser | |
CN102541853A (en) | Method and device which are capable of obtaining application information by utilizing browser address bar | |
CN103034727A (en) | System for intercepting pop-up window in webpage | |
WO2018133772A1 (en) | Method, device, storage medium, and electronic device for obtaining webpage resources | |
CN101963992A (en) | Method and browser for increasing webpage display speed | |
CN103246699A (en) | Method and device for data access control based on browser | |
CN104090887A (en) | Music search method and device | |
CN107203470B (en) | Page adjustment method and device |
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: 14823692 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 22/03/2016) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 14823692 Country of ref document: EP Kind code of ref document: A1 |