WO2017114206A1 - 短链接处理方法、装置及短链接服务器 - Google Patents

短链接处理方法、装置及短链接服务器 Download PDF

Info

Publication number
WO2017114206A1
WO2017114206A1 PCT/CN2016/110703 CN2016110703W WO2017114206A1 WO 2017114206 A1 WO2017114206 A1 WO 2017114206A1 CN 2016110703 W CN2016110703 W CN 2016110703W WO 2017114206 A1 WO2017114206 A1 WO 2017114206A1
Authority
WO
WIPO (PCT)
Prior art keywords
short
code
short link
url
specified
Prior art date
Application number
PCT/CN2016/110703
Other languages
English (en)
French (fr)
Inventor
周军
Original Assignee
阿里巴巴集团控股有限公司
周军
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司, 周军 filed Critical 阿里巴巴集团控股有限公司
Priority to AU2016382909A priority Critical patent/AU2016382909B2/en
Priority to EP16880995.2A priority patent/EP3399435A1/en
Priority to MYPI2018001215A priority patent/MY177701A/en
Priority to SG11201805632VA priority patent/SG11201805632VA/en
Priority to JP2018534848A priority patent/JP6626211B2/ja
Priority to KR1020187022021A priority patent/KR102097881B1/ko
Publication of WO2017114206A1 publication Critical patent/WO2017114206A1/zh
Priority to US16/019,897 priority patent/US10798056B2/en
Priority to PH12018501402A priority patent/PH12018501402B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2425Iterative querying; Query formulation based on the results of a preceding query
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9562Bookmark management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/672Short addresses

Definitions

  • the present application relates to the field of Internet technologies, and in particular, to a short link processing method, apparatus, and short link server.
  • Short link refers to the conversion of a long Uniform Resource Locator (URL) URL into a short URL string by means of program calculation, thereby saving the character space.
  • URL Uniform Resource Locator
  • the short link server may jump to the corresponding real long URL address according to the accessed short link URL, and may jump to the corresponding universal website if the accessed short link URL does not exist or has expired.
  • the universal address needs to occupy multiple domain names to achieve, and the management complexity is high and the real-time performance is poor.
  • the application provides a short link processing method, a device, and a short link server, so as to solve the problem that the common address needs to occupy multiple domain names in the prior art, and the management complexity is high and the real-time performance is poor.
  • a short link processing method comprising:
  • the access request including the first short link URL
  • the first short link short code is not queried in the database, or the valid time of the first short link short code that has been queried has expired, obtain the corresponding specified website according to the first specified URL code, and jump To the specified URL.
  • a short link processing apparatus includes:
  • a first receiving unit configured to receive, by the requesting party, an access request for the short link, where the access request includes the first short link URL;
  • An extracting unit configured to extract a first short link short code and a first specified web address code from the first short link website
  • a first processing unit configured to: if the first short link short code is not queried in the database, or the valid time of the first short link short code that has been queried has expired, obtain the corresponding according to the first specified web address code Specify a URL and jump to the specified URL.
  • a short link server comprising:
  • processor a memory for storing the processor executable instructions
  • processor is configured to:
  • the access request including the first short link URL
  • the first short link short code is not queried in the database, or the valid time of the first short link short code that has been queried has expired, obtain the corresponding specified website according to the first specified URL code, and jump To the specified URL.
  • the first short link short code and the first specified web address code are extracted from the first short link website by receiving the request for the short link, and the first short link is not found in the database.
  • the code, or the valid time of the first short link shortcode that has been queried has expired, the corresponding specified URL is obtained according to the first specified URL code, and jumps to the specified URL, so that the short link server can code according to different specified URLs Jump to different custom specified URLs, so that under the premise of the same domain name, different specified URL codes can map different specified URLs, which improves the flexibility of short link processing and saves storage space.
  • FIG. 1 is a schematic diagram of a short link processing scenario according to an embodiment of the present application
  • FIG. 2 is a flow chart of an embodiment of a short link processing method of the present application.
  • FIG. 3 is a flow chart of another embodiment of a short link processing method of the present application.
  • FIG. 5 is a flowchart of another embodiment of a short link processing method according to the present application.
  • FIG. 6 is a flowchart of another embodiment of a short link processing method of the present application.
  • FIG. 7 is a hardware structural diagram of a device in which the short link processing device of the present application is located;
  • FIG. 8 is a block diagram of an embodiment of a short link processing apparatus of the present application.
  • FIG. 9 is a block diagram of another embodiment of the short link processing apparatus of the present application.
  • first, second, third, etc. may be used to describe various information in this application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information without departing from the scope of the present application.
  • second information may also be referred to as the first information.
  • word "if” as used herein may be interpreted as "when” or “when” or “in response to a determination.”
  • FIG. 1 it is a schematic diagram of a short link processing scenario according to an embodiment of the present application:
  • the scenario in Figure 1 includes: a requester and a short link server.
  • the requester in the scenario of Figure 1 can request an application for a short link or a short link.
  • the requesting party may be a system-side device, a terminal device of an ordinary user, or a partner device.
  • the terminal device of the ordinary user may include various smart phones, tablets, personal computers (PCs), and the like.
  • the short link server in the scenario of FIG. 1 may refer to a single server with a large capacity, and the server with a large capacity may include multiple databases; and may also refer to a distributed cluster server, which may include multiple servers. And each server can handle the requester's request for a short link or an access request.
  • Each of the distributed cluster servers may include one database or multiple databases.
  • the requesting party may send an application request for the short link to the short link server, where the request request carries a long URL address, and the long URL address may be the actual URL address to be converted, and the purpose is to require the short link server to return the corresponding short Link URL.
  • the requesting party may also send an access request for the short link to the short link server, where the access request carries a short link URL, and the purpose is to require the short link server to obtain the corresponding long URL address according to the short link URL, and jump to the Long URL URL.
  • the short link URL is: https://m.alipay.com/t9Yv3MZ;
  • the short link server obtains the corresponding long URL address according to the short link URL, it can be:
  • long URL URL is defined as “long link URL” in the embodiment of the present application, and is applicable to all the following embodiments of the present application.
  • FIG. 2 it is a flowchart of an embodiment of a short link processing method of the present application, which may be applied to a short link server, and includes the following steps:
  • Step 210 Receive an access request of the requesting party for the short link, where the access request includes the first short link URL.
  • the short link server may receive an access request of the requesting party for the short link, and the purpose of the access request is that the requesting party needs to obtain the corresponding long link URL.
  • the first short link URL included in the access request may include not only the first short link short code but also the first specified web address code.
  • different specified URL codes can map different specified URLs, and different specified URLs can represent different business scenarios.
  • the first short link URL is https://m.alipay.com/x7Yv3MZ.L.
  • m.alipay.com is the domain name
  • x7Yv3MZ is the first short link shortcode
  • L is the first specified URL code.
  • Step 220 Extract the first short link short code and the first specified web address code from the first short link website.
  • the first specified URL code is used to represent a mapping code of the customized specified URL, and the customized specified URL is to jump to the customized when the accessed short link URL does not exist or has expired. Specify a URL.
  • the first short link URL is https://m.alipay.com/x7Yv3MZ.L.
  • x7Yv3MZ is the first short link short code
  • L is the first specified web address code
  • the first specified URL code is not included in the first short link URL, it indicates that the first specified URL code corresponding to the first short link URL is empty.
  • Step 230 If the first short link short code is not queried in the database, or the valid time of the first short link short code that has been queried has expired, obtain the corresponding specified website according to the first specified URL code, and jump to The specified URL.
  • the database records the record information of each different short link, and the record information includes a corresponding short link short code and a corresponding valid time.
  • the short link server receives the short link access request, the corresponding short link short code may be queried in the database.
  • the first short link URL is https://m.alipay.com/x7Yv3MZ.L.
  • the x7Yv3MZ is not queried in the database, or the valid time of the queried x7Yv3MZ has expired.
  • the specified URL corresponding to L can be used as the long link URL to be converted, and Jump to the specified URL.
  • the first short link short code is queried in the database, and the valid time of the first short link short code is not expired, the first long link URL corresponding to the first short link short code is obtained in the database, and jumped Go to the first long link URL.
  • the first short link URL is https://m.alipay.com/x7Yv3MZ.L.
  • the x7Yv3MZ is queried in the database, and the valid time of the queried x7Yv3MZ has not expired. At this time, the long link URL corresponding to x7Yv3MZ can be obtained in the database and jump to the long link URL.
  • the first short link short code and the first specified web address code are extracted from the first short link website by receiving the request for the short link, and the first short link is not found in the database.
  • the code, or the valid time of the first short link shortcode that has been queried has expired, the corresponding specified URL is obtained according to the first specified URL code, and jumps to the specified URL, so that the short link server can code according to different specified URLs Jump to different custom specified URLs, so that under the premise of the same domain name, different specified URL codes can map different specified URLs, which improves the flexibility of short link processing and saves storage space.
  • FIG. 3 is a flowchart of another embodiment of a short link processing method according to the present application.
  • the method may be applied to a short link server and is established on the basis of the method shown in FIG. 2, and the method may further include the following steps:
  • Step 310 Configure at least one specified URL code, and a specified URL corresponding to each different specified URL code.
  • Step 320 Establish a specified mapping relationship between the specified URL code and the corresponding specified URL.
  • Step 330 Save the established specified mapping relationship in the mapping database.
  • mapping database the specified mapping relationship between each specified URL code and the corresponding specified URL is saved in the form of a table, as shown in Table 1.
  • the above specified URL configuration can be managed in the form of a Distributed Resource Management (DRM) system or a database.
  • DRM Distributed Resource Management
  • the short link server also supports online dynamic configuration of the specified URL corresponding to each different specified URL code.
  • At least one specified URL code and a specified URL corresponding to each different specified URL code can be configured in the mapping database, and is prepared according to the accessed short link when the accessed short link URL does not exist or has expired.
  • the specified URL code in the URL is quickly mapped to the corresponding specified URL, which improves the speed of short link processing, and can also change the mapping data in the mapping database in real time, thereby ensuring the accuracy of short link processing.
  • FIG. 4 is a flowchart of another embodiment of a short link processing method according to the present application.
  • the method may be applied to a short link server, and is established on the basis of the method shown in FIG.
  • the specified URL code gets the corresponding specified URL and jumps to the specified URL, the following steps can be included:
  • Step 410 Determine whether the first specified URL code is empty; if the first specified URL code is not empty, step 420 is performed; if the first specified URL code is empty, step 430 is performed.
  • the first short link URL is https://m.alipay.com/x7Yv3MZ.L.
  • x7Yv3MZ is the first short link short code
  • L is the first specified web address code
  • the first designated web address code is not empty.
  • x7Yv3MZ is the first short link short code, and the first designated URL code is empty.
  • Step 420 Obtain a specified web address corresponding to the first specified web address code in the mapping database, and jump to the specified web address.
  • the specified URL is a custom specified default URL.
  • mapping database shown in Table 1 obtain the specified URL corresponding to L, and jump to the specified URL.
  • the specified URL is http://d.antfortune.com.
  • Step 430 Obtain a preset URL and jump to the preset URL.
  • the default URL is a generic default URL.
  • the default URL obtained is https://mobile.alipay.com/index.htm, and Jump to the default URL.
  • the specified URL corresponding to the first specified URL code may be obtained in the mapping database, and the specified URL may be redirected; if the first specified URL code is empty, Get the default URL and jump to the default URL to meet different short link processing needs and improve the speed of short link processing.
  • FIG. 5 it is a flowchart of another embodiment of a short link processing method according to the present application.
  • the method can be applied to a short link server and is established on the basis of any of the methods shown in FIG. 2 to FIG.
  • the steps can be included:
  • Step 510 Receive an application request of the requesting party for the short link, where the application request includes a second long link URL and a second specified URL code.
  • the second specified URL code is used to represent a mapping code of the customized specified URL, and the customized specified URL is a jump to the customized specified URL when the accessed short link URL does not exist or has expired.
  • the request request received by the short link server may include multiple request parameters.
  • the application request includes the actual URL address to be converted, that is, the second long link URL, the effective time of the short link, that is, the specified effective time of the short link, and the default URL code, that is, the second specified URL code, as shown in Table 1.
  • the second specified URL code may be any visible character, and may be one character or multiple characters.
  • the second specified URL code is L.
  • Step 520 Generate a corresponding second short link short code according to the second long link URL.
  • a method for generating a corresponding second short link short code according to the second long link URL is included, including but not limited to the following manner:
  • the second long link URL is:
  • the random short link shortcode according to the first long link URL is 7-bit x7Yv3MZ.
  • the generated random short link short code may be determined as the second long link URL corresponding to Second short link shortcode
  • the received request request further includes the specified valid time of the short link
  • the newly generated second short link short code needs to be saved in the database, and the effective time of the second short link short code is set as the application.
  • the specified effective time in the request is set as the application.
  • Step 530 Form a second short link URL according to the second short link short code and the second specified web address code, and send the second short link website address to the requesting party.
  • the second short link URL includes not only the second short link short code but also the second specified web address code.
  • different specified URL codes can map different specified URLs, and different specified URLs can represent different business scenarios.
  • the second long link URL is:
  • the second short link URL is composed of:
  • m.alipay.com is the domain name
  • x7Yv3MZ is the second short link shortcode
  • L is the second specified URL code.
  • the application request includes a second long link URL and a second specified URL code, and the second short link short code and the second specified web address code are second short.
  • the server can provide a short link URL including the specified URL code, and when the accessed short link URL does not exist or has expired, the URL is quickly mapped to the corresponding designated URL according to the specified URL code in the accessed short link URL, thereby improving the short Link processing speed.
  • FIG. 6 is a flowchart of another embodiment of a short link processing method according to the present application.
  • the method may be applied to a short link server, and based on the method shown in FIG. 5, in step 530 according to the second short
  • step 530 the following steps can be included:
  • Step 610 Form a third short link web address according to the second short link short code.
  • the short code of the second short link is: x7Yv3MZ;
  • the third short link URL is:
  • m.alipay.com is the domain name
  • x7Yv3MZ is the second short link shortcode
  • Step 620 Determine whether the second specified URL code is empty; if the second specified URL code is empty, step 630 is performed; if the second specified URL code is not empty, step 640 is performed.
  • Step 630 Determine the third short link URL as the second short link URL.
  • Step 640 Add the second specified URL code to the specified location of the third short link URL, and determine the short link URL after adding the second specified URL code as the second short link URL.
  • the specified location may be in front of the second short link shortcode, or After the second short link short code, the Nth bit of the second short link short code terminal may also be used. Therefore, there are many ways to add the second specified URL code to the specified location of the third short link URL, including but not limited to the following:
  • the delimiter may be a dot number, or any other character, and the delimiter may be omitted directly, and the specified address code is parsed according to the agreed number of short codes.
  • the second specified URL code can be added to the specified location of the third short link URL to form a short link URL including the specified URL code and returned to the requester, so that the requester can shorten the code according to the specified URL.
  • the link URL initiates an access request, satisfies the need for short link processing, and expands the scope of short link processing.
  • the present application also provides an embodiment of the short link processing apparatus.
  • Embodiments of the short link processing apparatus of the present application can be applied to short link servers, respectively.
  • the device embodiment may be implemented by software, or may be implemented by hardware or a combination of hardware and software. Taking the software implementation as an example, as a logical means, the processor of the device in which it is located reads the corresponding computer program instructions in the non-volatile memory into the memory. From the hardware level, as shown in FIG. 7, a hardware structure diagram of the device where the short link processing device is located, except for the processor, the memory, the network interface, and the non-volatile memory shown in FIG.
  • the device in which the device is located in the embodiment may also include other hardware according to the actual function of the device.
  • the terminal may include a camera, a touch screen, a communication component, etc.
  • the server may include processing the packet. Forwarding chips and so on.
  • FIG. 8 is a block diagram of an embodiment of a short link processing apparatus of the present application.
  • the short link processing apparatus may be applied to a short link server, and may be used to execute the short link processing method shown in the foregoing method embodiment, where the apparatus includes The first receiving unit 81, the extracting unit 82, and the first processing unit 83.
  • the first receiving unit 81 is configured to receive an access request of the requesting party for the short link, where the access request includes the first short link URL;
  • the extracting unit 82 is configured to extract the first short link short code and the first specified web address code from the first short link website address;
  • the first processing unit 83 is configured to obtain, according to the first specified URL code, if the first short link short code is not queried in the database, or the valid time of the first short link short code that has been queried has expired Corresponding specified URL and jump to the specified URL.
  • the short link processing apparatus may further include: a configuration unit, an establishing unit, and a mapping holding unit (not shown in FIG. 8).
  • the configuration unit is configured to configure at least one specified URL code, and a specified URL corresponding to each different specified URL code
  • a establishing unit configured to establish a specified mapping relationship between the specified webpage code and the specified webpage
  • mapping save unit configured to save the specified mapping relationship in a mapping database.
  • the first processing unit 83 may include: a first determining subunit and a first processing subunit (not shown in FIG. 8).
  • the first determining subunit is configured to determine whether the first designated web address code is empty
  • a first processing sub-unit configured to: if the first specified URL code is not empty, obtain a specified web address corresponding to the first specified web address code in the mapping data, and jump to the specified web address.
  • the first processing unit 83 may further include: a second processing subunit (not shown in FIG. 8).
  • the second processing sub-unit is configured to: if the first specified web address code is empty, obtain a preset web address, and jump to the preset web address.
  • the short link processing device may further include: a second processing unit (not shown in FIG. 8).
  • the second processing unit is configured to: when the first short link short code is queried in the database, and the valid time of the first short link short code is not expired, obtain the first short link in the database.
  • FIG. 9 is a block diagram of an embodiment of a short link processing apparatus of the present application.
  • the short link processing apparatus can be applied to a short link server and the apparatus shown in FIG. 8 is established.
  • the apparatus includes: a second receiving unit 91.
  • the second receiving unit 91 is configured to receive, by the requesting party, an application request for a short link, where the application request includes a second long link website address and a second specified website address code;
  • a short link short code generating unit 92 configured to generate a corresponding second short link short code according to the second long link website address
  • the short link URL processing unit 93 is configured to form a second short link web address according to the second short link short code and the second specified web address code, and send the second short link web address to the requesting party.
  • the short link short code generating unit 92 may include: a generating subunit, a first short link short code processing subunit, and a second short link short code processing subunit (not shown in FIG. 9). .
  • the generating subunit is configured to generate, according to the second long link URL, a random short link short code that specifies a short code number of bits;
  • a first short link short code processing subunit configured to determine the random short link short code as the second short link short code if the random short link short code is not queried in the database
  • a second short link short code processing subunit configured to generate another random short link short code if the random short link short code is queried in the database until the other one is not queried in the database
  • the random short link short code is used, and the other random short link short code that is not queried is determined as the second short link short code.
  • the request request received by the second receiving unit 91 further includes a specified valid time of the short link
  • the short link processing device may further include: a short link short code saving unit (not shown in FIG. 9) ).
  • the short link short code saving unit is configured to save the second short link short code to the database, and set a valid time of the second short link short code to the specified effective time.
  • the short link URL processing unit 93 may include: a constituent subunit, a second judging subunit, a first determining subunit, and a second determining subunit (not shown in FIG. 9).
  • the component subunit is configured to form a third short link web address according to the second short link short code
  • a second determining subunit configured to determine whether the second specified URL code is empty
  • a first determining subunit configured to determine that the third short link web address is the second short link web address if the second specified web address code is empty;
  • a second determining subunit configured to add the second specified URL code to a specified location of the third short link URL if the second specified URL code is not empty, the added short link URL For the second short link URL.
  • the second determining subunit may further be configured to add the second specified URL code to the third short link URL if the second specified URL code is not empty.
  • a second short link shortcode is followed by a delimiter between the second short link short code and the second specified web address code, and the added short link web address is the second short link web address.
  • the device embodiment since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located A place, or it can be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present solution. Those of ordinary skill in the art can understand and implement without any creative effort.
  • the embodiment of the present application further provides a short link server, where the server includes:
  • processor a memory for storing the processor executable instructions
  • processor is configured to:
  • the access request including the first short link URL
  • the first short link short code is not queried in the database, or the valid time of the first short link short code that has been queried has expired, obtain the corresponding specified website according to the first specified URL code, and jump To the specified URL.
  • the first short link short code and the first specified web address code are extracted from the first short link website by receiving the request for the short link, and the first short link is not found in the database.
  • the code, or the valid time of the first short link shortcode that has been queried has expired, the corresponding specified URL is obtained according to the first specified URL code, and jumps to the specified URL, so that the short link server can code according to different specified URLs Jump to different custom specified URLs, so that under the premise of the same domain name, different specified URL codes can map different specified URLs, which improves the flexibility of short link processing and saves storage space.

Abstract

一种短链接处理方法、装置及短链接服务器,该方法包括:接收请求方针对短链接的访问请求,所述访问请求包括第一短链接网址(210);从所述第一短链接网址中提取第一短链接简码和第一指定网址代码(220);若在数据库中没有查询到第一短链接简码,或查询到的所述第一短链接简码的有效时间已过期时,根据所述第一指定网址代码获取对应的指定网址,并跳转至所述指定网址(230)。该方法可以根据不同的指定网址代码跳转到不同的自定义的指定网址,从而实现了在同一域名的前提下,不同的指定网址代码可以映射不同的指定网址,进而提高了短链接处理的灵活性,还节省了存储空间。

Description

短链接处理方法、装置及短链接服务器 技术领域
本申请涉及互联网技术领域,尤其涉及短链接处理方法、装置及短链接服务器。
背景技术
短链接是指将长的统一资源定位符(Uniform Resource Locator,URL)网址,通过程序计算等方式,转换为简短的网址字符串,从而达到节省字符数空间的目的。
现有技术中,短链接服务器可以根据访问的短链接网址跳转至对应的真实的长的URL网址,若访问的短链接网址不存在或已失效时,可以跳转至对应的通用网址。但是,通用地址需要占用多个域名来实现,其管理复杂度高,实时性差。
发明内容
本申请提供短链接处理方法、装置及短链接服务器,以解决现有技术中通用地址需要占用多个域名来实现,其管理复杂度高,实时性差的问题。
根据本申请实施例的第一方面,提供一种短链接处理方法,该方法包括:
接收请求方针对短链接的访问请求,所述访问请求包括第一短链接网址;
从所述第一短链接网址中提取第一短链接简码和第一指定网址代码;
若在数据库中没有查询到第一短链接简码,或查询到的所述第一短链接简码的有效时间已过期时,根据所述第一指定网址代码获取对应的指定网址,并跳转至所述指定网址。
根据本申请实施例的第二方面,提供一种短链接处理装置,该装置 包括:
第一接收单元,用于接收请求方针对短链接的访问请求,所述访问请求包括第一短链接网址;
提取单元,用于从所述第一短链接网址中提取第一短链接简码和第一指定网址代码;
第一处理单元,用于若在数据库中没有查询到第一短链接简码,或查询到的所述第一短链接简码的有效时间已过期时,根据所述第一指定网址代码获取对应的指定网址,并跳转至所述指定网址。
根据本申请实施例的第三方面,提供一种短链接服务器,该服务器包括:
处理器;用于存储所述处理器可执行指令的存储器;
其中,所述处理器被配置为:
接收请求方针对短链接的访问请求,所述访问请求包括第一短链接网址;
从所述第一短链接网址中提取第一短链接简码和第一指定网址代码;
若在数据库中没有查询到第一短链接简码,或查询到的所述第一短链接简码的有效时间已过期时,根据所述第一指定网址代码获取对应的指定网址,并跳转至所述指定网址。
应用本申请实施例,通过接收请求方针对短链接的访问请求,从第一短链接网址中提取第一短链接简码和第一指定网址代码,若在数据库中没有查询到第一短链接简码,或查询到的第一短链接简码的有效时间已过期时,根据第一指定网址代码获取对应的指定网址,并跳转至该指定网址,使得短链接服务器可以根据不同的指定网址代码跳转到不同的自定义的指定网址,从而实现了在同一域名的前提下,不同的指定网址代码可以映射不同的指定网址,进而提高了短链接处理的灵活性,还节省了存储空间。
附图说明
图1为本申请实施例的短链接处理场景示意图;
图2为本申请短链接处理方法的一个实施例流程图;
图3为本申请短链接处理方法的另一个实施例的流程图;
图4为本申请短链接处理方法的另一个实施例的流程图;
图5为本申请短链接处理方法的另一个实施例的流程图;
图6为本申请短链接处理方法的另一个实施例的流程图;
图7为本申请短链接处理装置所在设备的一种硬件结构图;
图8为本申请短链接处理装置的一个实施例框图;
图9为本申请短链接处理装置的另一个实施例框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。
在本申请使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。
应当理解,尽管在本申请可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
参见图1,为本申请实施例的短链接处理场景示意图:
图1场景中包括:请求方和短链接服务器。
图1场景中的请求方可以请求短链接的申请,也可以请求短链接的访问。并且,请求方可以是系统端设备、也可以是普通用户的终端设备,还可以是合作伙伴设备等。其中,普通用户的终端设备可以包括各种智能手机、平板电脑、个人计算机(Personal Computer,PC)等。
图1场景中的短链接服务器可以指的是容量大的单个服务器,该容量大的服务器可以包括多个数据库;还可以指的是分布式集群服务器,该分布式集群服务器可以包括多个服务器,并且每个服务器皆能处理请求方针对短链接的申请请求或访问请求。其中,分布式集群服务器中的每个服务器可以包括一个数据库,也可以包括多个数据库。
请求方可以向短链接服务器发送针对短链接的申请请求,该申请请求中携带有长的URL网址,该长的URL网址可以是待转换的实际URL地址,目的是需要短链接服务器返回对应的短链接网址。
请求方还可以向短链接服务器发送针对短链接的访问请求,该访问请求携带有短链接网址,其目的是需要短链接服务器根据该短链接网址获取对应的长的URL网址,并跳转至该长的URL网址。
比如:短链接网址为:https://m.alipay.com/t9Yv3MZ;
当短链接服务器根据该短链接网址获取对应的长的URL网址可以为:
https://cmspromo.alipay.com/finance/fullyear.htm。
为了描述方便,本申请实施例中将上述“长的URL网址”定义为“长链接网址”,并适用于本申请以下所有实施例。
下面对本申请实施例进行详细说明。
参见图2,为本申请短链接处理方法的一个实施例的流程图,该方法可以应用于短链接服务器上,包括以下步骤:
步骤210:接收请求方针对短链接的访问请求,该访问请求包括第一短链接网址。
本申请实施例中,短链接服务器可以接收请求方针对短链接的访问请求,该访问请求的目的是请求方需要获取对应的长链接网址。其中,访问请求中包括的第一短链接网址不仅可以包括第一短链接简码,还可以包括第一指定网址代码。并且,在同一域名的前提下,不同的指定网址代码可以映射不同的指定网址,不同的指定网址可以代表不同的业务场景。
比如:第一短链接网址为https://m.alipay.com/x7Yv3MZ.L。其中,m.alipay.com为域名,x7Yv3MZ为第一短链接简码,L是第一指定网址代码。
步骤220:从第一短链接网址中提取第一短链接简码和第一指定网址代码。
本申请实施例中,第一指定网址代码用于表征自定义的指定网址的映射代码,该自定义的指定网址是当访问的短链接网址不存在或已失效时,跳转至该自定义的指定网址。
比如:第一短链接网址为https://m.alipay.com/x7Yv3MZ.L。
根据事先约定的短链接网址的生成规则,获知x7Yv3MZ是第一短链接简码,L是第一指定网址代码。
另外,若第一短链接网址中不包括第一指定网址代码,则表明该第一短链接网址对应的第一指定网址代码为空。
步骤230:若在数据库中没有查询到第一短链接简码,或查询到的第一短链接简码的有效时间已过期时,根据第一指定网址代码获取对应的指定网址,并跳转至该指定网址。
本申请实施例中,数据库中保存有各个不同短链接的记录信息,该记录信息包括对应的短链接简码和对应的有效时间。短链接服务器接收到的短链接的访问请求后,可以在数据库中查询对应的短链接简码。
比如:第一短链接网址为https://m.alipay.com/x7Yv3MZ.L。
在数据库中没有查询到x7Yv3MZ,或查询到的x7Yv3MZ的有效时间已过期,此时可以将L对应的指定网址作为待转换的长链接网址,并 跳转至该指定网址。
另外,若在数据库中查询到第一短链接简码,且第一短链接简码的有效时间未到期,则在数据库中获取第一短链接简码对应的第一长链接网址,并跳转至该第一长链接网址。
比如:第一短链接网址为https://m.alipay.com/x7Yv3MZ.L。
在数据库中查询到x7Yv3MZ,并且查询到的x7Yv3MZ的有效时间未到期,此时可以在数据库中获取x7Yv3MZ对应的长链接网址,并跳转至该长链接网址。
由上述实施例可见,通过接收请求方针对短链接的访问请求,从第一短链接网址中提取第一短链接简码和第一指定网址代码,若在数据库中没有查询到第一短链接简码,或查询到的第一短链接简码的有效时间已过期时,根据第一指定网址代码获取对应的指定网址,并跳转至该指定网址,使得短链接服务器可以根据不同的指定网址代码跳转到不同的自定义的指定网址,从而实现了在同一域名的前提下,不同的指定网址代码可以映射不同的指定网址,进而提高了短链接处理的灵活性,还节省了存储空间。
参见图3,为本申请短链接处理方法的另一个实施例的流程图,该方法可以应用于短链接服务器上,并建立在图2所示方法的基础上,该方法还可以包括以下步骤:
步骤310:配置至少一个指定网址代码、以及各个不同的指定网址代码对应的指定网址。
步骤320:建立指定网址代码和对应的指定网址之间的指定映射关系。
步骤330:将建立的指定映射关系保存在映射数据库中。
比如:在映射数据库中以表格的形式保存每个指定网址代码和对应的指定网址之间的指定映射关系,如表1所示。
Figure PCTCN2016110703-appb-000001
上述指定网址配置可以通过分布式资源管理(Distributed Resource Management,DRM)系统或采用数据库的形式进行管理。
另外,短链接服务器还支持在线动态配置各个不同的指定网址代码对应的指定网址。
由上述实施例可见,可以在映射数据库中配置至少一个指定网址代码、以及各个不同的指定网址代码对应的指定网址,备于当访问的短链接网址不存在或已失效时,根据访问的短链接网址中的指定网址代码快速映射到对应的指定网址,从而提高了短链接处理的速度,还可以实时改变映射数据库中映射数据,从而保证了短链接处理的准确率。
参见图4,为本申请短链接处理方法的另一个实施例的流程图,该方法可以应用于短链接服务器上,并建立在图3所示方法的基础上,在执行步骤230中根据第一指定网址代码获取对应的指定网址,并跳转至该指定网址时,可以包括以下步骤:
步骤410:判断第一指定网址代码是否为空;若第一指定网址代码不为空,则执行步骤420;若第一指定网址代码为空,则执行步骤430。
比如:第一短链接网址为https://m.alipay.com/x7Yv3MZ.L。
根据事先约定的短链接网址的生成规则,获知x7Yv3MZ是第一短链接简码,L是第一指定网址代码,此时第一指定网址代码不为空。
又比如:第一短链接网址为https://m.alipay.com/x7Yv3MZ。
根据事先约定的短链接网址的生成规则,获知x7Yv3MZ是第一短链接简码,第一指定网址代码为空。
步骤420:在映射数据库中获取第一指定网址代码对应的指定网址,并跳转至该指定网址。其中,指定网址是自定义的指定默认网址。
比如:从表1所示的映射数据库中,获取L对应的指定网址,并跳转至该指定网址。其中,指定网址为http://d.antfortune.com。
步骤430:获取预设网址,并跳转至该预设网址。其中,预设网址为通用的默认网址。
比如:获取到的预设网址为https://mobile.alipay.com/index.htm,并 跳转至该预设网址。
由上述实施例可见,若第一指定网址代码不为空,可以在映射数据库中获取第一指定网址代码对应的指定网址,并跳转至该指定网址;若第一指定网址代码为空,可以获取预设网址,并跳转至该预设网址,从而满足了不同短链接处理需求,提高了短链接处理速度。
参见图5,为本申请短链接处理方法的另一个实施例的流程图,该方法可以应用于短链接服务器上,并建立在图2至图4任一所示方法的基础上,该方法还可以包括以下步骤:
步骤510:接收请求方针对短链接的申请请求,该申请请求包括第二长链接网址和第二指定网址代码。其中,第二指定网址代码用于表征自定义的指定网址的映射代码,该自定义的指定网址是当访问的短链接网址不存在或已失效时,跳转至该自定义的指定网址。
本申请实施例中,短链接服务器接收到的申请请求中可以包括多个请求参数。
比如:申请请求中包括待转换的实际URL地址即第二长链接网址、短链接的有效时间即短链接的指定有效时间、以及默认网址代码即第二指定网址代码,如表1所示。
表1
Figure PCTCN2016110703-appb-000002
其中,第二指定网址代码可以是任意可见字符,可以是一个字符,也可以是多个字符。比如,该第二指定网址代码为L。
步骤520:根据第二长链接网址生成对应的第二短链接简码。
本申请实施例中,根据第二长链接网址生成对应的第二短链接简码的方式很多,包括但不限于以下这种方式:
(1)根据第二长链接网址生成指定简码位数的随机短链接简码。其中,指定简码位数是短链接服务器根据实际情况设定的。
比如:第二长链接网址为:
https://cmspromo.alipay.com/finance/fullyear.htm;
根据该第一长链接网址的随机短链接简码为7位的x7Yv3MZ。
(2)在数据库中查询该随机短链接简码,其目的是为了确保新生成的随机短链接简码是未被使用过的。
(3)若在数据库中未查询到随机短链接简码,表明该随机短链接简码是未被使用过的,则可以将该生成的随机短链接简码确定为第二长链接网址对应的第二短链接简码;
(4)若在数据库中查询到所述随机短链接简码,表明该随机短链接简码是被使用过的,则需要生成另一随机短链接简码,直至在数据库中未查询到该另一随机短链接简码为止,并将该另一随机短链接简码确定为第二长链接网址对应的第二短链接简码。
另外,若接收到的申请请求中还包括短链接的指定有效时间时,还需要将新生成的第二短链接简码保存至数据库中,并将第二短链接简码的有效时间设置为申请请求中的指定有效时间。
步骤530:根据第二短链接简码和第二指定网址代码组成第二短链接网址,并将第二短链接网址发送至请求方。
本申请实施例中,第二短链接网址不仅包括第二短链接简码,还包括第二指定网址代码。并且,在同一域名的前提下,不同的指定网址代码可以映射不同的指定网址,不同的指定网址可以代表不同的业务场景。
比如:第二长链接网址为:
https://cmspromo.alipay.com/finance/fullyear.htm;
组成的第二短链接网址为:
https://m.alipay.com/x7Yv3MZ.L。
其中,m.alipay.com为域名,x7Yv3MZ是第二短链接简码,L是第二指定网址代码。
由上述实施例可见,通过接收请求方针对短链接的申请请求,该申请请求包括第二长链接网址和第二指定网址代码,根据第二短链接简码和第二指定网址代码组成第二短链接网址,并将第二短链接网址发送至请求方,根据第二短链接简码和第二指定网址代码组成第二短链接网址,并将第二短链接网址发送至请求方,使得短链接服务器能够提供包括指定网址代码的短链接网址,备于当访问的短链接网址不存在或已失效时,根据访问的短链接网址中的指定网址代码快速映射到对应的指定网址,进而提高了短链接处理速度。
参见图6,为本申请短链接处理方法的另一个实施例的流程图,该方法可以应用于短链接服务器上,并建立图5所示方法的基础上,在执行步骤530中根据第二短链接简码和第二指定网址代码组成第二短链接网址时,可以包括以下步骤:
步骤610:根据第二短链接简码组成第三短链接网址。
比如:第二短链接简码为:x7Yv3MZ;
组成的第三短链接网址为:
https://m.alipay.com/x7Yv3MZ。
其中,m.alipay.com为域名,x7Yv3MZ是第二短链接简码。
步骤620:判断第二指定网址代码是否为空;若第二指定网址代码为空,则执行步骤630;若第二指定网址代码不为空,则执行步骤640。
步骤630:将第三短链接网址确定为第二短链接网址。
步骤640:将第二指定网址代码添加到第三短链接网址的指定位置,并将添加第二指定网址代码后的短链接网址确定为第二短链接网址。
本申请实施例中,指定位置可以在第二短链接简码的前面,也可以 在第二短链接简码的后面,还可以在第二短链接简码终端的第N位。故此,将第二指定网址代码添加到第三短链接网址的指定位置的方式很多,包括但不限于以下这种方式:
将第二指定网址代码添加到第三短链接网址中第二短链接简码的后面,并在第二短链接简码和第二指定网址代码之间添加分隔符。其中,分隔符可以是点号,也可以是任意其它的字符,还可以直接省去该分隔符,根据约定的简码位数来解析出指定地址代码。
由上述实施例可见,可以将第二指定网址代码添加到第三短链接网址的指定位置,从而组成包括指定网址代码的短链接网址并返回请求方,便于请求方根据该包括指定网址代码的短链接网址发起访问请求,满足了短链接处理的需求,扩大了短链接处理范围。
与本申请短链接处理方法的实施例相对应,本申请还提供了短链接处理装置的实施例。
本申请短链接处理装置的实施例可以分别应用在短链接服务器上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图7所示,为本申请短链接处理装置所在设备的一种硬件结构图,除了图7所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的设备通常根据该设备的实际功能,还可以包括其他硬件,如对于终端来说,可能包括摄像头、触摸屏子、通信组件等,对于服务器来说,可能包括负责处理报文的转发芯片等等。
参见图8,为本申请短链接处理装置的一个实施例框图,该短链接处理装置可以应用在短链接服务器上,并可以用于执行上述方法实施例所示的短链接处理方法,该装置包括:第一接收单元81、提取单元82和第一处理单元83。
其中,第一接收单元81,用于接收请求方针对短链接的访问请求,所述访问请求包括第一短链接网址;
提取单元82,用于从所述第一短链接网址中提取第一短链接简码和第一指定网址代码;
第一处理单元83,用于若在数据库中没有查询到第一短链接简码,或查询到的所述第一短链接简码的有效时间已过期时,根据所述第一指定网址代码获取对应的指定网址,并跳转至所述指定网址。
在一个可选的实现方式中:该短链接处理装置还可以包括:配置单元、建立单元和映射保存单元(图8中未标出)。
其中,配置单元,用于配置至少一个指定网址代码、以及各个不同的指定网址代码对应的指定网址;
建立单元,用于建立所述指定网址代码和所述指定网址之间的指定映射关系;
映射保存单元,用于将所述指定映射关系保存在映射数据库中。
另一个可选的实现方式中:第一处理单元83可以包括:第一判断子单元和第一处理子单元(图8中未标出)。
其中,第一判断子单元,用于判断所述第一指定网址代码是否为空;
第一处理子单元,用于若所述第一指定网址代码不为空,则在所述映射数据中获取所述第一指定网址代码对应的指定网址,并跳转至所述指定网址。
另一个可选的实现方式中:第一处理单元83还可以包括:第二处理子单元(图8中未标出)。
其中,第二处理子单元,用于若所述第一指定网址代码为空,则获取预设网址,并跳转至所述预设网址。
另一个可选的实现方式中:该短链接处理装置还可以包括:第二处理单元(图8中未标出)。
其中,第二处理单元,用于若在数据库中查询到所述第一短链接简码,且所述第一短链接简码的有效时间未到期,在数据库中获取所述第一短链接简码对应的第一长链接网址,并跳转至所述第一长链接网址。
参见图9,为本申请短链接处理装置的一个实施例框图,该短链接处理装置可以应用在短链接服务器上,并建立图8所示装置的基础上,该装置包括:第二接收单元91、短链接简码生成单元92和短链接网址处理单元93。
其中,第二接收单元91,用于接收所述请求方针对短链接的申请请求,所述申请请求包括第二长链接网址和第二指定网址代码;
短链接简码生成单元92,用于根据所述第二长链接网址生成对应的第二短链接简码;
短链接网址处理单元93,用于根据所述第二短链接简码和所述第二指定网址代码组成第二短链接网址,并将所述第二短链接网址发送至所述请求方。
在一个可选的实现方式中:短链接简码生成单元92可以包括:生成子单元、第一短链接简码处理子单元和第二短链接简码处理子单元(图9中未标出)。
其中,生成子单元,用于根据所述第二长链接网址生成指定简码位数的随机短链接简码;
第一短链接简码处理子单元,用于若在数据库中未查询到所述随机短链接简码,则将所述随机短链接简码确定为所述第二短链接简码;
第二短链接简码处理子单元,用于若在所述数据库中查询到所述随机短链接简码,则需要生成另一随机短链接简码,直至在数据库中未查询到所述另一随机短链接简码为止,并将所述未查询到的另一随机短链接简码确定为所述第二短链接简码。
另一个可选的实现方式中:第二接收单元91接收到的申请请求还包括短链接的指定有效时间,该短链接处理装置还可以包括:短链接简码保存单元(图9中未标出)。
其中,短链接简码保存单元,用于将所述第二短链接简码保存至所述数据库中,并将所述第二短链接简码的有效时间设置为所述指定有效时间。
另一个可选的实现方式中:短链接网址处理单元93可以包括:组成子单元、第二判断子单元、第一确定子单元和第二确定子单元(图9中未标出)。
其中,组成子单元,用于根据所述第二短链接简码组成第三短链接网址;
第二判断子单元,用于判断所述第二指定网址代码是否为空;
第一确定子单元,用于若所述第二指定网址代码为空,则确定所述第三短链接网址为所述第二短链接网址;
第二确定子单元,用于若所述第二指定网址代码不为空,则将所述第二指定网址代码添加到所述第三短链接网址的指定位置,所述添加后的短链接网址为所述第二短链接网址。
另外,第二确定子单元还可以所述第二确定子单元还用于若所述第二指定网址代码不为空,则将所述第二指定网址代码添加到所述第三短链接网址中第二短链接简码的后面,并在所述第二短链接简码和所述第二指定网址代码之间添加分隔符,所述添加后的短链接网址为所述第二短链接网址。
上述装置中各个单元的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本请求方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
本申请实施例还提供了一种短链接服务器,所述服务器包括:
处理器;用于存储所述处理器可执行指令的存储器;
其中,所述处理器被配置为:
接收请求方针对短链接的访问请求,所述访问请求包括第一短链接网址;
从所述第一短链接网址中提取第一短链接简码和第一指定网址代码;
若在数据库中没有查询到第一短链接简码,或查询到的所述第一短链接简码的有效时间已过期时,根据所述第一指定网址代码获取对应的指定网址,并跳转至所述指定网址。
由上述实施例可见,通过接收请求方针对短链接的访问请求,从第一短链接网址中提取第一短链接简码和第一指定网址代码,若在数据库中没有查询到第一短链接简码,或查询到的第一短链接简码的有效时间已过期时,根据第一指定网址代码获取对应的指定网址,并跳转至该指定网址,使得短链接服务器可以根据不同的指定网址代码跳转到不同的自定义的指定网址,从而实现了在同一域名的前提下,不同的指定网址代码可以映射不同的指定网址,进而提高了短链接处理的灵活性,还节省了存储空间。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。

Claims (21)

  1. 一种短链接处理方法,其特征在于,所述方法还包括:
    接收请求方针对短链接的访问请求,所述访问请求包括第一短链接网址;
    从所述第一短链接网址中提取第一短链接简码和第一指定网址代码;
    若在数据库中没有查询到第一短链接简码,或查询到的所述第一短链接简码的有效时间已过期时,根据所述第一指定网址代码获取对应的指定网址,并跳转至所述指定网址。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    配置至少一个指定网址代码、以及各个不同的指定网址代码对应的指定网址;
    建立所述指定网址代码和所述指定网址之间的指定映射关系;
    将所述指定映射关系保存在映射数据库中。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述第一指定网址代码获取对应的指定网址,并跳转至所述指定网址,包括:
    判断所述第一指定网址代码是否为空;
    若所述第一指定网址代码不为空,则在所述映射数据中获取所述第一指定网址代码对应的指定网址,并跳转至所述指定网址。
  4. 根据权利要求3所述的方法,其特征在于,所述判断所述第一指定网址代码是否为空之后,还包括:
    若所述第一指定网址代码为空,则获取预设网址,并跳转至所述预设网址。
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    若在数据库中查询到所述第一短链接简码,且所述第一短链接简码的有效时间未到期,在数据库中获取所述第一短链接简码对应的第一长链接网址,并跳转至所述第一长链接网址。
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述方法还包括:
    接收所述请求方针对短链接的申请请求,所述申请请求包括第二长链接网址和第二指定网址代码;
    根据所述第二长链接网址生成对应的第二短链接简码;
    根据所述第二短链接简码和所述第二指定网址代码组成第二短链接网址,并将所述第二短链接网址发送至所述请求方。
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述第二长链接网址生成对应的第二短链接简码,包括:
    根据所述第二长链接网址生成指定简码位数的随机短链接简码;
    若在数据库中未查询到所述随机短链接简码,则将所述随机短链接简码确定为所述第二短链接简码;
    若在所述数据库中查询到所述随机短链接简码,则需要生成另一随机短链接简码,直至在数据库中未查询到所述另一随机短链接简码为止,并将所述未查询到的另一随机短链接简码确定为所述第二短链接简码。
  8. 根据权利要求7所述的方法,其特征在于,所述申请请求还包括短链接的指定有效时间;所述方法还包括:
    将所述第二短链接简码保存至所述数据库中,并将所述第二短链接简码的有效时间设置为所述指定有效时间。
  9. 根据权利要求6所述的方法,其特征在于,所述根据所述第二短链接简码和所述第二指定网址代码组成第二短链接网址,包括:
    根据所述第二短链接简码组成第三短链接网址;
    判断所述第二指定网址代码是否为空;
    若所述第二指定网址代码为空,则将所述第三短链接网址确定为所述第二短链接网址;
    若所述第二指定网址代码不为空,则将所述第二指定网址代码添加到所述第三短链接网址的指定位置,并将所述添加后的短链接网址确定 为所述第二短链接网址。
  10. 根据权利要求9所述的方法,其特征在于,所述将所述第二指定网址代码添加到所述第三短链接网址的指定位置,包括:
    将所述第二指定网址代码添加到所述第三短链接网址中第二短链接简码的后面,并在所述第二短链接简码和所述第二指定网址代码之间添加分隔符。
  11. 一种短链接处理装置,其特征在于,所述装置包括:
    第一接收单元,用于接收请求方针对短链接的访问请求,所述访问请求包括第一短链接网址;
    提取单元,用于从所述第一短链接网址中提取第一短链接简码和第一指定网址代码;
    第一处理单元,用于若在数据库中没有查询到第一短链接简码,或查询到的所述第一短链接简码的有效时间已过期时,根据所述第一指定网址代码获取对应的指定网址,并跳转至所述指定网址。
  12. 根据权利要求11所述的装置,其特征在于,所述装置还包括:
    配置单元,用于配置至少一个指定网址代码、以及各个不同的指定网址代码对应的指定网址;
    建立单元,用于建立所述指定网址代码和所述指定网址之间的指定映射关系;
    映射保存单元,用于将所述指定映射关系保存在映射数据库中。
  13. 根据权利要求12所述的装置,其特征在于,所述第一处理单元包括:
    第一判断子单元,用于判断所述第一指定网址代码是否为空;
    第一处理子单元,用于若所述第一指定网址代码不为空,则在所述映射数据中获取所述第一指定网址代码对应的指定网址,并跳转至所述指定网址。
  14. 根据权利要求13所述的装置,其特征在于,所述第一处理单 元还包括:
    第二处理子单元,用于若所述第一指定网址代码为空,则获取预设网址,并跳转至所述预设网址。
  15. 根据权利要求11所述的装置,其特征在于,所述装置还包括:
    第二处理单元,用于若在数据库中查询到所述第一短链接简码,且所述第一短链接简码的有效时间未到期,在数据库中获取所述第一短链接简码对应的第一长链接网址,并跳转至所述第一长链接网址。
  16. 根据权利要求11至15任一项所述的装置,其特征在于,所述装置还包括:
    第二接收单元,用于接收所述请求方针对短链接的申请请求,所述申请请求包括第二长链接网址和第二指定网址代码;
    短链接简码生成单元,用于根据所述第二长链接网址生成对应的第二短链接简码;
    短链接网址处理单元,用于根据所述第二短链接简码和所述第二指定网址代码组成第二短链接网址,并将所述第二短链接网址发送至所述请求方。
  17. 根据权利要求16所述的装置,其特征在于,所述短链接简码生成单元包括:
    生成子单元,用于根据所述第二长链接网址生成指定简码位数的随机短链接简码;
    第一短链接简码处理子单元,用于若在数据库中未查询到所述随机短链接简码,则将所述随机短链接简码确定为所述第二短链接简码;
    第二短链接简码处理子单元,用于若在所述数据库中查询到所述随机短链接简码,则需要生成另一随机短链接简码,直至在数据库中未查询到所述另一随机短链接简码为止,并将所述未查询到的另一随机短链接简码确定为所述第二短链接简码。
  18. 根据权利要求17所述的装置,其特征在于,所述申请请求还包括短链接的指定有效时间;所述装置还包括:
    短链接简码保存单元,用于将所述第二短链接简码保存至所述数据库中,并将所述第二短链接简码的有效时间设置为所述指定有效时间。
  19. 根据权利要求16所述的装置,其特征在于,所述短链接网址处理单元包括:
    组成子单元,用于根据所述第二短链接简码组成第三短链接网址;
    第二判断子单元,用于判断所述第二指定网址代码是否为空;
    第一确定子单元,用于若所述第二指定网址代码为空,则确定所述第三短链接网址为所述第二短链接网址;
    第二确定子单元,用于若所述第二指定网址代码不为空,则将所述第二指定网址代码添加到所述第三短链接网址的指定位置,所述添加后的短链接网址为所述第二短链接网址。
  20. 根据权利要求19所述的装置,其特征在于,所述第二确定子单元还用于若所述第二指定网址代码不为空,则将所述第二指定网址代码添加到所述第三短链接网址中第二短链接简码的后面,并在所述第二短链接简码和所述第二指定网址代码之间添加分隔符,所述添加后的短链接网址为所述第二短链接网址。
  21. 一种短链接服务器,其特征在于,所述服务器包括:
    处理器;用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为:
    接收请求方针对短链接的访问请求,所述访问请求包括第一短链接网址;
    从所述第一短链接网址中提取第一短链接简码和第一指定网址代码;
    若在数据库中没有查询到第一短链接简码,或查询到的所述第一短链接简码的有效时间已过期时,根据所述第一指定网址代码获取对应的指定网址,并跳转至所述指定网址。
PCT/CN2016/110703 2015-12-30 2016-12-19 短链接处理方法、装置及短链接服务器 WO2017114206A1 (zh)

Priority Applications (8)

Application Number Priority Date Filing Date Title
AU2016382909A AU2016382909B2 (en) 2015-12-30 2016-12-19 Method and device for processing short link, and short link server
EP16880995.2A EP3399435A1 (en) 2015-12-30 2016-12-19 Method and device for processing short link, and short link server
MYPI2018001215A MY177701A (en) 2015-12-30 2016-12-19 Method and device for processing short link, and short link server
SG11201805632VA SG11201805632VA (en) 2015-12-30 2016-12-19 Method and device for processing short link, and short link server
JP2018534848A JP6626211B2 (ja) 2015-12-30 2016-12-19 ショートリンクを処理する方法及び装置並びにショートリンクサーバ
KR1020187022021A KR102097881B1 (ko) 2015-12-30 2016-12-19 단축 링크를 처리하는 방법 및 장치, 및 단축 링크 서버
US16/019,897 US10798056B2 (en) 2015-12-30 2018-06-27 Method and device for processing short link, and short link server
PH12018501402A PH12018501402B1 (en) 2015-12-30 2018-06-29 Method and device for processing short link, and short link server

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201511025079.4 2015-12-30
CN201511025079.4A CN106933871B (zh) 2015-12-30 2015-12-30 短链接处理方法、装置及短链接服务器

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/019,897 Continuation US10798056B2 (en) 2015-12-30 2018-06-27 Method and device for processing short link, and short link server

Publications (1)

Publication Number Publication Date
WO2017114206A1 true WO2017114206A1 (zh) 2017-07-06

Family

ID=59225922

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/110703 WO2017114206A1 (zh) 2015-12-30 2016-12-19 短链接处理方法、装置及短链接服务器

Country Status (10)

Country Link
US (1) US10798056B2 (zh)
EP (1) EP3399435A1 (zh)
JP (1) JP6626211B2 (zh)
KR (1) KR102097881B1 (zh)
CN (1) CN106933871B (zh)
AU (1) AU2016382909B2 (zh)
MY (1) MY177701A (zh)
PH (1) PH12018501402B1 (zh)
SG (1) SG11201805632VA (zh)
WO (1) WO2017114206A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116938871A (zh) * 2023-09-18 2023-10-24 北京木屋时代科技有限公司 一种域名短码确定方法、装置、存储介质及电子装置

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2018288044A1 (en) 2017-06-20 2020-01-23 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for data processing related to online to offline service
CN113407323A (zh) * 2017-07-17 2021-09-17 北京嘀嘀无限科技发展有限公司 页面跳转方法及页面跳转装置、设备和存储介质
CN107733972B (zh) 2017-08-28 2020-09-08 阿里巴巴集团控股有限公司 一种短链接解析方法、装置及设备
CN107566362A (zh) * 2017-08-29 2018-01-09 深圳乐信软件技术有限公司 一种图片的访问方法及装置
CN108334569B (zh) * 2018-01-16 2021-03-23 中国平安人寿保险股份有限公司 基于短链接的保险投保方法、系统、设备及存储介质
US10664547B1 (en) * 2018-02-20 2020-05-26 United Services Automobile Association (Usaa) Configurable short locators
US11115228B2 (en) 2018-07-30 2021-09-07 Slack Technologies, Inc. Method, apparatus, and computer program product for individual profile telemetry discovery within a group based communication system
CN110134889B (zh) * 2019-04-30 2021-08-10 中国联合网络通信集团有限公司 短链接生成方法、装置及服务器
CN111767481B (zh) * 2019-11-01 2024-02-06 北京京东尚科信息技术有限公司 访问处理方法、装置、设备和存储介质
CN111027656B (zh) * 2019-11-15 2023-04-28 浙江口碑网络技术有限公司 二维码生成及识别方法、装置、电子设备、存储介质
CN113254813B (zh) * 2020-02-13 2023-07-18 多点(深圳)数字科技有限公司 一种短链接生成方法、装置、服务器和计算机可读介质
CN113316153B (zh) * 2020-04-02 2024-03-26 阿里巴巴集团控股有限公司 一种短信息检验方法、装置和系统
CN112307058B (zh) * 2020-10-27 2024-03-15 北京水滴科技集团有限公司 短链接的处理方法、装置、存储介质及计算机设备
CN112861032A (zh) * 2021-01-20 2021-05-28 银盛通信有限公司 一种短链接生成的方法和系统
CN114422472B (zh) * 2022-01-19 2024-03-12 中国农业银行股份有限公司 网络地址转换方法、装置及电子设备
CN116701792B (zh) * 2023-08-03 2023-11-24 阿里健康科技(中国)有限公司 目标界面的访问方法、装置、设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102333082A (zh) * 2010-08-23 2012-01-25 微软公司 安全的url缩短
US8499099B1 (en) * 2011-03-29 2013-07-30 Google Inc. Converting data into addresses
CN103631926A (zh) * 2012-03-31 2014-03-12 北京奇虎科技有限公司 一种搜索结果页面中链接的连接方法及装置
CN103905424A (zh) * 2013-12-25 2014-07-02 国家计算机网络与信息安全管理中心 一种短域名安全性评定方法
WO2015062491A1 (en) * 2013-10-30 2015-05-07 Tencent Technology (Shenzhen) Company Limited Methods and apparatus for realizing short url service
CN104994183A (zh) * 2015-06-19 2015-10-21 小米科技有限责任公司 短网址确定方法和装置

Family Cites Families (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6061738A (en) * 1997-06-27 2000-05-09 D&I Systems, Inc. Method and system for accessing information on a network using message aliasing functions having shadow callback functions
US6957224B1 (en) * 2000-09-11 2005-10-18 International Business Machines Corporation Efficient retrieval of uniform resource locators
JP2004185286A (ja) * 2002-12-03 2004-07-02 Fujitsu Ltd Webアクセス制御装置
JP2004206406A (ja) * 2002-12-25 2004-07-22 Hitachi Software Eng Co Ltd Url情報の変換方法およびプログラム並びにコンテンツ配信方法
US20060015573A1 (en) * 2004-06-30 2006-01-19 Microsoft Corporation System and method for automatic redirection to stored web resources upon access failure
US7610267B2 (en) * 2005-06-28 2009-10-27 Yahoo! Inc. Unsupervised, automated web host dynamicity detection, dead link detection and prerequisite page discovery for search indexed web pages
US7698269B2 (en) * 2005-11-29 2010-04-13 Yahoo! Inc. URL shortening and authentication with reverse hash lookup
US20080263193A1 (en) * 2007-04-17 2008-10-23 Chalemin Glen E System and Method for Automatically Providing a Web Resource for a Broken Web Link
US8281232B2 (en) * 2010-04-22 2012-10-02 Rockmelt, Inc. Integrated adaptive URL-shortening functionality
US8630200B2 (en) * 2010-06-01 2014-01-14 Meltwater News International Holdings, GmbH Method and apparatus for embedding information in a short URL
US8510368B2 (en) * 2010-10-20 2013-08-13 Mskynet Inc. Short URI payload-status systems and methods
US8819168B2 (en) * 2010-12-14 2014-08-26 Microsoft Corporation Link expansion service
JP5220141B2 (ja) * 2011-02-08 2013-06-26 ヤフー株式会社 Url短縮装置、短縮url処理装置、方法及びプログラム
US9058490B1 (en) * 2011-02-11 2015-06-16 Symantec Corporation Systems and methods for providing a secure uniform resource locator (URL) shortening service
CN102810089B (zh) * 2011-05-30 2017-07-04 盛乐信息技术(上海)有限公司 基于内容的短链接系统及实现方法
US9582592B2 (en) * 2011-12-20 2017-02-28 Bitly, Inc. Systems and methods for generating a recommended list of URLs by aggregating a plurality of enumerated lists of URLs, the recommended list of URLs identifying URLs accessed by users that also accessed a submitted URL
US9619811B2 (en) * 2011-12-20 2017-04-11 Bitly, Inc. Systems and methods for influence of a user on content shared via 7 encoded uniform resource locator (URL) link
CN103246659B (zh) * 2012-02-06 2016-05-25 阿里巴巴集团控股有限公司 键值数据查询的方法和装置
US9298839B2 (en) * 2012-05-30 2016-03-29 International Business Machines Corporation Resolving a dead shortened uniform resource locator
US11625741B2 (en) * 2012-07-05 2023-04-11 Share Edge, Llc Systems and methods of sharing promotional information
US9210229B2 (en) * 2012-10-15 2015-12-08 Exacttarget, Inc. System and method for generating personalized short links and monitoring activity
KR20140093491A (ko) * 2013-01-18 2014-07-28 정양원 단축 url의 관리 방법, 관리 장치 및 그 관리를 수행하는 컴퓨터 프로그램을 저장한 저장 매체
US10177967B2 (en) * 2013-03-15 2019-01-08 Jesse Lakes Redirection service resource locator mechanism
US20150025981A1 (en) * 2013-03-15 2015-01-22 David Zaretsky Url shortening computer-processed platform for processing internet traffic
US10057207B2 (en) * 2013-04-07 2018-08-21 Verisign, Inc. Smart navigation for shortened URLs
US10387903B2 (en) * 2013-11-08 2019-08-20 Retailmenot, Inc. Providing single-use offers
US20150161282A1 (en) * 2013-12-11 2015-06-11 Yahoo! Inc. Method and System for Smart URL Shortening Service
CN104717185B (zh) * 2013-12-16 2019-03-26 腾讯科技(北京)有限公司 短统一资源定位符的展示响应方法、装置、服务器和系统
US10298654B2 (en) * 2014-03-12 2019-05-21 Adobe Inc. Automatic uniform resource locator construction
US11023917B2 (en) * 2014-04-16 2021-06-01 Retailmenot, Inc. Time period distribution of offer codes
US10425492B2 (en) * 2015-07-07 2019-09-24 Bitly, Inc. Systems and methods for web to mobile app correlation
CN106933854B (zh) * 2015-12-30 2020-06-30 阿里巴巴集团控股有限公司 短链接处理方法、装置及服务器

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102333082A (zh) * 2010-08-23 2012-01-25 微软公司 安全的url缩短
US8499099B1 (en) * 2011-03-29 2013-07-30 Google Inc. Converting data into addresses
CN103631926A (zh) * 2012-03-31 2014-03-12 北京奇虎科技有限公司 一种搜索结果页面中链接的连接方法及装置
WO2015062491A1 (en) * 2013-10-30 2015-05-07 Tencent Technology (Shenzhen) Company Limited Methods and apparatus for realizing short url service
CN103905424A (zh) * 2013-12-25 2014-07-02 国家计算机网络与信息安全管理中心 一种短域名安全性评定方法
CN104994183A (zh) * 2015-06-19 2015-10-21 小米科技有限责任公司 短网址确定方法和装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116938871A (zh) * 2023-09-18 2023-10-24 北京木屋时代科技有限公司 一种域名短码确定方法、装置、存储介质及电子装置
CN116938871B (zh) * 2023-09-18 2023-11-28 北京木屋时代科技有限公司 一种域名短码确定方法、装置、存储介质及电子装置

Also Published As

Publication number Publication date
AU2016382909B2 (en) 2020-01-30
JP6626211B2 (ja) 2019-12-25
CN106933871A (zh) 2017-07-07
EP3399435A4 (en) 2018-11-07
KR102097881B1 (ko) 2020-04-06
KR20180099841A (ko) 2018-09-05
PH12018501402A1 (en) 2019-03-25
AU2016382909A1 (en) 2018-07-19
PH12018501402B1 (en) 2019-03-25
SG11201805632VA (en) 2018-07-30
MY177701A (en) 2020-09-23
EP3399435A1 (en) 2018-11-07
US20180307774A1 (en) 2018-10-25
JP2019503537A (ja) 2019-02-07
CN106933871B (zh) 2021-08-17
US10798056B2 (en) 2020-10-06

Similar Documents

Publication Publication Date Title
WO2017114206A1 (zh) 短链接处理方法、装置及短链接服务器
WO2017114205A1 (zh) 短链接处理方法、装置及服务器
WO2019165665A1 (zh) 一种域名解析方法、服务器及系统
WO2017113060A1 (zh) web网站的访问方法、装置及Web网站系统
CN106302842B (zh) 一种域名解析方法、装置及系统
US20160248837A1 (en) Methods and apparatus for realizing short url service
WO2016101635A1 (zh) 一种同步登录状态的方法、装置、设备和计算机存储介质
WO2014206118A1 (zh) 基于tcp协议的移动互联网域名解析方法及dns服务器
TW201510761A (zh) 下載以及安裝客戶端的方法和設備
WO2016000507A1 (zh) 省流量模式搜索服务的方法、服务器、客户端和系统
WO2015074459A1 (zh) 打开网页、调用客户端及创建轻应用的方法及装置
US20140337536A1 (en) Method and apparatus for data communication
WO2020088170A1 (zh) 域名系统配置方法及相关装置
CN113630479A (zh) 域名的解析方法及相关产品
WO2014190700A1 (zh) 一种内存访问的方法、缓冲调度器和内存模块
WO2016155199A1 (zh) 应用功能数据的处理方法、装置及非易失性计算机存储介质
US10469575B2 (en) Techniques for contact exporting
TW201344607A (zh) 業務對象的確定方法及確定裝置
WO2018081963A1 (zh) 一种dns解析方法、装置及网络系统
CN109871354B (zh) 一种文件处理的方法及装置
US10069938B1 (en) Returning identifiers in default query responses
TWI546688B (zh) 對網路位址進行處理的方法及相關的伺服器與非暫態電腦可讀取儲存媒體
WO2015192497A1 (zh) 通信链路的发送方法、装置及终端
CN109088913B (zh) 请求数据的方法和负载均衡服务器
WO2016115817A1 (zh) 搜索方法、装置、设备及非易失性计算机存储介质

Legal Events

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

Ref document number: 16880995

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 12018501402

Country of ref document: PH

ENP Entry into the national phase

Ref document number: 2018534848

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 11201805632V

Country of ref document: SG

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2016382909

Country of ref document: AU

Date of ref document: 20161219

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20187022021

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2016880995

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2016880995

Country of ref document: EP

Effective date: 20180730