CN112307369A - Short link processing method, device, terminal and storage medium - Google Patents
Short link processing method, device, terminal and storage medium Download PDFInfo
- Publication number
- CN112307369A CN112307369A CN201910703918.5A CN201910703918A CN112307369A CN 112307369 A CN112307369 A CN 112307369A CN 201910703918 A CN201910703918 A CN 201910703918A CN 112307369 A CN112307369 A CN 112307369A
- Authority
- CN
- China
- Prior art keywords
- link
- target
- type
- processed
- terminal
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 238000003860 storage Methods 0.000 title claims abstract description 51
- 238000003672 processing method Methods 0.000 title claims abstract description 21
- 238000000034 method Methods 0.000 claims abstract description 51
- 238000004458 analytical method Methods 0.000 claims description 28
- 238000007906 compression Methods 0.000 claims description 17
- 230000006835 compression Effects 0.000 claims description 16
- 238000002474 experimental method Methods 0.000 claims description 12
- 238000006243 chemical reaction Methods 0.000 claims description 8
- 230000001960 triggered effect Effects 0.000 claims description 7
- 238000013507 mapping Methods 0.000 claims description 4
- 230000009191 jumping Effects 0.000 claims description 3
- 238000012423 maintenance Methods 0.000 abstract description 12
- 230000006870 function Effects 0.000 description 13
- 238000012545 processing Methods 0.000 description 10
- 238000004590 computer program Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 229910002056 binary alloy Inorganic materials 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000004904 shortening Methods 0.000 description 2
- 101000695861 Arabidopsis thaliana Brefeldin A-inhibited guanine nucleotide-exchange protein 5 Proteins 0.000 description 1
- 108091026890 Coding region Proteins 0.000 description 1
- 101100217298 Mus musculus Aspm gene Proteins 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- 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]
- G06F16/9566—URL specific, e.g. using aliases, detecting broken or misspelled links
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application discloses a short link processing method, a terminal and a medium. The method comprises the following steps: the method comprises the steps that a first terminal obtains a generated long link to be processed and judges whether the long link to be processed belongs to a first type link or not; if the long chain link to be processed belongs to the first type link, the long chain link to be processed is coded according to a link coding format by using an application program to obtain binary coding information; converting the coded information into a character string link of a target system in the application program; and adding a first identifier corresponding to the first type link into the character string link to obtain a target short link, and effectively generating the short link under the scene of poor network state by depending on the computing power of a terminal browser, thereby realizing information sharing and reducing the storage and maintenance cost of a server terminal.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a short link processing method, an apparatus, a terminal, and a storage medium.
Background
With the development of the internet, it is becoming more and more common for users to share information in web pages by forwarding generated page links, and the traditional page links are too long in character length and inconvenient to share and spread. In the application scenario, a short link is usually adopted to solve the problem that the reference link is too long and takes up the number of effective words, so that page link sharing is performed conveniently.
In a conventional link compression method, a short link server converts a Uniform Resource Locator (URL) string of a long link into a URL string of a shorter length, and a user jumps to a corresponding long link when clicking the short link. However, the user request concurrency under the scheme is high, the requirement on the data processing capacity of the server is high, the response speed is low under the condition of poor network conditions, and the efficiency of short link generation and information sharing is influenced.
Disclosure of Invention
The application provides a short link processing method, a short link processing device, a short link processing terminal and a short link processing storage medium, which can generate a short link by relying on the computing power of a terminal browser, reduce the storage and maintenance expenses of a server side and improve the short link generation problem under the condition of poor network conditions.
In a first aspect, a short link processing method is provided, including:
the method comprises the steps that a first terminal obtains a generated long link to be processed and judges whether the long link to be processed belongs to a first type link or not;
if the long chain link to be processed belongs to the first type link, the long chain link to be processed is coded according to a link coding format by using an application program to obtain binary coding information;
converting the coded information into a character string link of a target system in the application program;
and adding a first identifier corresponding to the first type link into the character string link to obtain the target short link.
In a second aspect, another short link processing method is provided, including:
the second terminal determines the type of the target short link according to the received identifier in the target short link;
if the target short link is a first type link, calling an analysis module of an application program to analyze the target short link to obtain an original link;
and if the target short link is not the first type link, sending a link acquisition request to a server, wherein the link acquisition request is used for requesting the server to provide the original link corresponding to the target short link.
In a third aspect, a terminal is provided, which includes a classification module, an encoding module, a conversion module, and a generation module, where:
the classification module is used for acquiring the generated long link to be processed and judging whether the long link to be processed belongs to a first type link or not;
the coding module is used for coding the long chain link to be processed according to a link coding format by using an application program to obtain binary coding information if the long chain link to be processed belongs to the first type link;
the conversion module is used for converting the coded information into a character string link of a target system in the application program;
the generating module is configured to add a first identifier corresponding to the first type link to the string link to obtain a target short link.
In a fourth aspect, an embodiment of the present application provides another terminal, including a determining module, an analyzing module, and a requesting module, where:
the determining module is used for determining the target short link type according to the identifier in the received target short link;
the analysis module is used for calling the analysis module of the application program to analyze the target short link to obtain an original link if the target short link is a first type link;
the request module is configured to send a link acquisition request to a server if the target short link is not the first type link, where the link acquisition request is used to request the server to provide the original link corresponding to the target short link.
In a fifth aspect, embodiments of the present application provide a computer storage medium storing one or more instructions adapted to be loaded by a processor and to perform the steps of the first aspect and any possible implementation manner thereof.
A sixth aspect provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of the first aspect and any of its possible implementations.
The method comprises the steps of obtaining a generated long link to be processed through a first terminal, judging whether the long link to be processed belongs to a first type link or not, if the long link to be processed belongs to the first type link, the long chain link to be processed is coded according to the link coding format by using an application program to obtain binary coding information, converting the coded information into a character string link of a target system in the application program, adding a first identifier corresponding to a first type link into the character string link to obtain a target short link, the short link can be effectively generated to realize information sharing by depending on the computing power of the terminal browser, compared with the traditional mode of generating the short link by depending on the server side completely, the short link can be generated quickly by most users even under the condition of poor network conditions, and meanwhile, the storage and maintenance expenses of the server side can be reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present application, the drawings required to be used in the embodiments or the background art of the present application will be described below.
Fig. 1 is a schematic flow chart of a short link processing method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another short link processing method according to an embodiment of the present application;
fig. 3 is a schematic view of an interface for link sharing according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a concatenated coding format according to an embodiment of the present application;
FIG. 5 is a schematic flow chart illustrating another short link processing method according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another terminal provided in the embodiment of the present application;
fig. 8 is a schematic structural diagram of another terminal provided in the embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The Character set (Character set) in the embodiment of the application is a set of a plurality of characters, the Character set is more in variety, the number of characters contained in each Character set is different, and the names of common Character sets are as follows: ASCII character set, GB2312 character set, BIG5 character set, GB18030 character set, Unicode character set, etc. All strings (text) in the computer world belong to a certain character set, which essentially declares the way the underlying binary data is interpreted.
The embodiments of the present application will be described below with reference to the drawings.
Referring to fig. 1, fig. 1 is a schematic flow chart of a short link processing method according to an embodiment of the present disclosure.
101. And the first terminal acquires the generated long link to be processed and judges whether the long link to be processed belongs to the first type link.
The execution subject in the embodiments of the present application is a first terminal, which in particular implementations may also be referred to as a terminal device, including but not limited to other portable devices such as a mobile phone, a laptop computer, or a tablet computer having a touch sensitive surface (e.g., a touch screen display and/or a touch pad). It should also be understood that in some embodiments, the device is not a portable communication device, but is a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
The long link to be processed in the embodiment of the application may be a website link of any page, or may be understood as a link corresponding to website content. The link in the embodiment of the present application is specifically a Uniform Resource Locator (URL), or a Uniform Resource Locator/location address, a URL address, etc., which is commonly referred to as a web address (website address), that is, a character string used in an address bar when a user browses a web page using a browser, for example:
https://kandiandata.oa.com/layer。
which may begin with HTTP. In the embodiments of the present application, the HyperText Transfer Protocol (HTTP) is the most widely used network Protocol on the internet, and the original purpose of HTTP is designed to provide a method for publishing and receiving HTML pages.
When a user needs to share a webpage, the user can share the webpage information to other users usually in a webpage link sharing mode. In the embodiment of the application, a sharing request triggered by a user in an application program can be detected, for example, a sharing button is clicked, and at this time, a project option selected by the user in the target page can be obtained to generate an original link corresponding to the target page, that is, the long link to be processed.
Specifically, the link classification rule may be set to classify the links into at least two types, such as inputting the original links into a link classification module, classifying the original links into links of a first type (for example, links of a type) or links other than the links of the first type (for example, links of B type), that is, one original link belongs to either a link of a type or a link of B type. In the embodiment of the application, whether the long link to be processed belongs to the first type link or not can be judged, and the link can be classified and identified through the identification field in the link. If the link belongs to the first type of link, step 102 may be executed, and then the link compression process may be performed on the first type of link without depending on a server.
102. If the long chain link to be processed belongs to the first type link, the long chain link to be processed is coded according to a link coding format by using an application program to obtain binary coding information.
The long chain link to be processed in the embodiment of the present application may be obtained based on a Hash (Hash) operation. The original content on the website to be shared can be subjected to Hash operation to generate Hash data; wherein the original content may include: the data content of the pictures, files, audio, video, etc., i.e., may correspond to the above-mentioned project options. The short link generation method in the embodiment of the present application may be understood as compressing the Hash data by encoding with multilevel numbers to form a short link corresponding to the item option.
Hash, generally, transforms an input of arbitrary length (also called a pre-map) into a fixed-length output, which is a Hash value, through a hashing algorithm. This transformation is a kind of compression mapping, i.e. the space of hash values is usually much smaller than the space of inputs, different inputs may hash to the same output, so it is not possible to determine a unique input value from a hash value. In short, it is a function of compressing a message of an arbitrary length to a message digest of a certain fixed length.
After the long link to be processed is obtained, if the long link belongs to the first type link, the long link to be processed may be encoded according to the link encoding format to obtain corresponding binary encoding information. Binary is a widely used number system in computing technology, and data is stored in computers mainly in a complementary form.
The first terminal may store the link coding format, and specifically, the link coding format may be stored in an application program. An Application program (App) mentioned in the embodiments of the present Application is one of the main categories of computer software, and refers to software written for a specific Application purpose of a user. The application may be an application installed locally in the first terminal, and may include a Web application or software accessed by means of a browser.
The coding is to encode characters, numbers or other objects into digital codes by a predetermined method, or to convert information and data into a predetermined electric pulse signal, and to encode instructions and numbers in an electronic computer, so that the computer is suitable for operation and operation.
The obtained coding information is composed of a plurality of binary codes and comprises the item option information in the corresponding target page.
After obtaining the binary coded information, step 102 may be performed.
103. And converting the coded information into a character string link of a target system in the application program.
In order for the obtained link to be correctly recognized by the application, the aforementioned binary code needs to be converted into a string link. Specifically, the above target bin may be preset, typically higher than the binary to achieve the purpose of link compression (shortening), such as sixty-four bin. After the binary code information is obtained, the code information may be converted into a string link of the target binary.
In an optional implementation manner, the step 102 may specifically include:
and converting the coded information into a sixty-four system character string link in the application program.
Specifically, in the embodiment of the present application, compression of the long link does not need to send a request to the server to compress the server or query the link, and can be quickly implemented on the terminal side, for example, a compression module is called at the front end to complete generation of the short link by specifically depending on the computing power of the browser to which the shared page belongs or the computing power of the browser of the application program.
Wherein, every 6-bit 2-system number can be coded into 1-bit 64-system characters, thereby shortening the link length and facilitating the storage, forwarding and display processing during the link sharing.
104. And adding a first identifier corresponding to the first type link into the character string link to obtain a target short link.
Identifiers of different types of links can be preset, specifically, the identifiers can be letter identifiers or character strings containing letters and/or numbers, meanwhile, corresponding relations between the different types of links and the identifiers are also set, and the different types of links can be identified and distinguished through the corresponding relations. For example, when other users accept the sharing link, the sharing link type can be quickly identified, and the original link can be obtained through analysis.
Specifically, a first identifier corresponding to the first type link may be obtained, and the first identifier is added to the fixed position of the string link to identify the type of the link. The compressed target short link can be obtained through the steps.
It should be noted that prefixes of links corresponding to shared applications or software are different, and the prefixes may be determined according to the website domain name of the shared applications or software, and may be generated according to the rule of HTTP, which specifically refers to the relevant description in fig. 3.
After the target short link is obtained, the generated sharing link can be returned to the user, the user can perform operations such as copying, storing and sharing, the sharing link can be in various forms, and the method and the device are not limited in the embodiment of the application.
In the embodiment of the application, the first terminal acquires the generated long link to be processed, determines whether the long link to be processed belongs to a first type link, and if the long link to be processed belongs to the first type link, the long chain link to be processed is coded according to the link coding format by using an application program to obtain binary coding information, converting the coded information into a character string link of a target system in the application program, adding a first identifier corresponding to a first type link into the character string link to obtain a target short link, the short link can be effectively generated to realize information sharing by depending on the computing power of the terminal browser, compared with the traditional mode of generating the short link by depending on the server side completely, the short link can be generated quickly by most users even under the condition of poor network conditions, and meanwhile, the storage and maintenance expenses of the server side can be reduced.
Generally, a user sends a request to the server once each time a short link is generated, and the response speed is slow and the user experience is poor under the condition of poor network conditions.
There is also a prior art method that: carrying out hash operation on the original content to generate hash data; compressing the hash data by the coding of multilevel digits to form a short link corresponding to the original content; storing the short link of the original content and the address link of the original content in a key-value database mode; the key-value database is in the following mode: and establishing two sets, wherein the first set takes the hash result as key, takes the short link as value, the second set takes the short link as key, and takes the list of the original link as value.
When a user stores a short link, performing hash operation, then searching for a key in a first set, if the key is not found, simultaneously inserting the hash operation and the original link into the first set and a second set, if the key of a hash result is found in the first set, directly taking out a value in the first set, namely the short link, as the key to the second set to take out the value, namely finding out a list of the original link, and then adding a new url to the back of the list of the original link;
when a user holds the short link for analysis, the user only needs to take out the list of the original link from the second set according to the key of the short link, then analyzes a plurality of addresses according to the separators, and randomly gives one of the addresses as the obtained address.
The above method also has problems that: all short links and related data sets generated by all users need to be stored, the storage cost is high, and the maintenance cost is high, so that companies using the scheme can only provide short-term service; meanwhile, the concurrency number of the user request is actually increased to two times, the original link is obtained for the first time, the webpage content corresponding to the original link is obtained for the second time, and the concurrency amount is increased, so that the cost of the server is doubled.
According to the short link processing method in the embodiment of the application, through a front-end compression link mode, most users can still use own terminals to quickly generate short links even under the condition of poor network conditions. And the generation and storage of the short link do not need the participation and storage of a server side, so that a large amount of storage and maintenance expenses are saved, and the long-term even permanent effective short link can be provided.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating another short link processing method according to an embodiment of the present disclosure. The embodiment shown in fig. 2 is further optimized based on the embodiment shown in fig. 1, and the method may include:
201. and the first terminal responds to a sharing request triggered by a user on a target page of the application program, and generates a corresponding long link to be processed according to the project options of the target page.
The execution subject in the embodiments of the present application is a first terminal, which in particular implementations may also be referred to as a terminal device, including but not limited to other portable devices such as a mobile phone, a laptop computer, or a tablet computer having a touch sensitive surface (e.g., a touch screen display and/or a touch pad). It should also be understood that in some embodiments, the device is not a portable communication device, but is a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
The long link to be processed in the embodiment of the application may be a website link of any page, or may be understood as a link corresponding to website content. The link in the embodiment of the present application is specifically a URL, or a uniform resource locator/location address, a URL address, or the like, which is commonly referred to as a web address (website address), that is, a character string used in an address bar when a user browses a web page using a browser.
In the embodiment of the application, an original link is generated according to a user query condition. The sharing request triggered by the user in the application program, for example, clicking a sharing button, may be detected, at this time, the item option selected by the user in the target page may be obtained to generate the original link corresponding to the target page, that is, the long link to be processed.
Wherein, because the analysis result sharing that can be applied to the data platform, the above project options may include: at least one or more of data start date, experiment start date, data end date and service type.
In order to describe the scheme of the embodiment of the present application more specifically, a data platform is taken as a main application scenario for illustration.
Referring to fig. 3, fig. 3 is a schematic view of an interface for link sharing according to an embodiment of the present disclosure.
As shown in fig. 3, before generating the sharing link, the user may first operate input controls on the page, including a time selection control, an experiment bucket, a comparison bucket selection control, and a viewed service type and index, that is, setting conditions for querying data. And then clicking a sharing button to generate a sharing link and sending the sharing link to other users. Therefore, when the sharing link is opened by other users, the same query conditions can be obtained, so that the same chart can be seen, and the experimental result can be conveniently discussed by multiple users.
Specifically, fig. 3 shows a part of a data report viewing page of a data platform website (the detailed data diagram of the lower half is hidden for data security). The user can select a plurality of project options such as different experiment buckets, comparison buckets (numbers), data starting/ending time, experiment release time, concerned business types and specific indexes on a website, and after the selection is finished, the user can click and inquire to check the experiment data, the corresponding ABTest experiment effect analysis, the confidence level and other results. The ABTest experiment comprises dividing the user flow into A/B parts, respectively performing the experiment, and finally checking the data expression to determine the scheme to be used finally.
Further, when a plurality of users need to exchange an analysis of experimental effects, the users can generate a short link corresponding to the currently selected query configuration by clicking the "one-click sharing" button F shown in fig. 3, and specifically, the short link can be displayed in the frame N, and can also distinguish different shared application programs to form corresponding recognizable links, such as two types of office networks, mobile phone WeChat and QQ in the figure, which mainly distinguish website prefixes; and then may be shared with other users. The generation process of the short link is specifically described in steps 201 to 207 in the embodiment of the present application.
202. And judging whether the long link to be processed belongs to the first type link or not.
Specifically, the link classification rule may be set to classify the links into at least two types, for example, inputting the original links into the link classification module, and classifying the original links into links of the first type (a-type links) or links other than the first-type links (B-type links), that is, one original link belongs to either a-type links or B-type links. The first type of link is subsequently compressed without depending on the server in the embodiment of the application.
Since the A-type links are generated by means of computing power of a user browser, server participation is not needed, and storage and maintenance costs are low, the aim is that most of the generated short links are A-type links and only a small number of the generated short links are B-type links. Specifically, on the data platform, the date range of the query data of most users is between 1 month and 1 day in 2000 and 6 months and 6 days in 2179, and the number of the experimental buckets and the comparison buckets for comparison is less than or equal to 5, so that the constraint is used as a classification condition of the class-A link, and most data processing can be guaranteed in application. On the contrary, if the user generates the sharing link, the selected date range is earlier than 1 month and 1 day in 2000, or later than 6 months and 6 days in 2179, or the number of the experimental buckets and the comparison buckets to be compared is more than 5, the two buckets are used as the B-type link and the server assists in generating the sharing link. That is, the date range supported by the A-type link is only the last 179 years, which is less than 9/10 compared with the general date storage scheme, so the storage space is only 1/10 of the general scheme, and the storage space is saved.
If the chain link to be processed belongs to the first type link, step 203 may be executed; if the pending long link does not belong to the first type of link, step 203 may not be executed, and step 206 may be executed.
203. And coding the long chain link to be processed according to a link coding format by using the application program to obtain binary coding information.
The link encoding format in the embodiment of the present application may include a mapping relationship between a project option of the target page and a binary code, where the project option includes: at least one or more of data start date, experiment start date, data end date and service type.
Different link coding formats can be set in different application scenes, and the link coding formats can summarize and share content information of the page. For example, at present, a main application scenario of the technical solution may be a sharing query link scenario of a certain data platform, specifically refer to fig. 3 and related description thereof, which are not described herein again.
Fig. 4 is a schematic diagram of a concatenated coding format according to an embodiment of the present application. By way of further example, for a data platform scenario, the above-described link encoding format may be as shown in fig. 4. Specifically, the link coding format in fig. 4 is displayed with 16 characters as a row for convenience of description, and the coding sequence is sequentially from left to right and from top to bottom, so that it can be seen that the coding length corresponding to each item option, such as the length of the data start date, the experiment start date, and the data end date, is 16 bits, the service type is 12 bits (including whether to follow and whether to singles), and the like. Wherein, the specific barrel number only draws a part of the schematic, and a longer digit can be provided later according to the actual requirement.
Inputting the above-mentioned a-type link into the link compression module of the browser, according to the coding method shown in fig. 4, the condition in the link can be coded into 2-system, and the coding format defines the item options and their corresponding coding bits in the target page. The number of buckets is at most 10 (5 experimental buckets and 5 control buckets), and the number of buckets is at most 4096(12 bits), so that the length of the specific bucket coding variable field is at most 10 × 12 — 120 bits.
The method is described in conjunction with practical applications, and the embodiments shown in fig. 1 or fig. 2 can be applied to link sharing. Take the following original link as an example of a long link to be processed:
https://kandiandata.oa.com/layer_datafrom=zhufeeds&a= 6OIr6TUI02021A04,01;
wherein the coding part is 6OIr6TUI02021A04, 01;
1. date part: 6OIr6TUI
let dt _ str ═ a.substring (0, 8); the corresponding 48-bit binary is:
000110110010101100011011000110110111111000101100
further, each 16 bits resolve to a decimal:
6955,6956,7038;
based on 1 month 1 day of 2000, three dates are therefore:
20190116,20190117,20190409。
2. service tab selection part + whether to follow + whether to singles: 02
Corresponding 12-bit 2-ary: 000000000010, respectively;
the first 10 digits select a part of corresponding decimal numbers 0 for the service tab, namely 0 th tab (for example, the decimal number can correspond to a 'viewpoint large disk' in a data analysis scene);
the 11 th bit is whether to follow 1, namely, the following is selected;
the 12 th bit is 0 or not, i.e. single selection.
3. Index selection part 02
Corresponding 12-bit 2-ary: 000000000010, respectively;
the corresponding 10 is 2, that is, the 3 rd index (feeds click-deduplication) is selected, and the count is started from 0.
4. Number of partial barrels 1A
Corresponding 12-bit 2-ary: 000001100100, respectively;
the corresponding decimal is 100, i.e. the total number of sub-buckets is 100.
5. The particular selected sub-bucket number (remainder): 04,01
Barrel comparison: 04(64 scale), experimental bucket: 01 (64-ary), two 12-bit 2-ary respectively:
000000000100, corresponding to the 10 system is 4, namely 4 barrels;
the experimental barrel is 00000001, which corresponds to the barrel number 1 which is 1 in the 10 system.
The application program can be used for realizing compression and analysis of the sharing link in the data platform scene through the corresponding relation. Besides, it can also be applied to some other scenarios, such as: sharing links after the inquiry of the shopping website; link sharing after the E-commerce website of the mobile terminal is inquired; link sharing after video website query, and the like, which are not limited herein.
204. And converting the coded information into a sixty-four system character string link in the application program.
The step 204 may refer to the detailed description in the step 103 in fig. 1, and is not described herein again.
In an optional implementation manner, the step 204 specifically includes:
and acquiring a character set in the application program, and determining a target character corresponding to the code of the code information in the character set according to the corresponding relation between the code and the character set so as to generate the character string link which is in a sexagesimal system.
Meanwhile, in order to enable the links to be normally stored in various document files after being shared, and to be directly opened without being transferred when messages are sent through various communication software such as a mobile phone QQ and a WeChat, the links cannot contain special characters. Therefore, a character set can be preset, and the corresponding relation between the codes and the character set can be preset, so that the binary codes are converted into legal and corresponding characters.
For example, for a 64-ary character, 64 characters in the following [ can be selected as legal characters that can appear in the link:
【0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-】
since each 6-bit 2-system number can be encoded into 1-bit 64-system character, the longest 204-bit binary system in the third step is 34 bits after being converted into 64-system binary system, and in the above data platform scenario, there are generally only 18 bits: 84+24 (one experimental bucket per control bucket)/6 ═ 18
After the above string links are obtained, step 205 may be performed to obtain the complete target short links.
205. And adding a first identifier corresponding to the first type link into the character string link to obtain a target short link.
Step 205 may refer to the related detailed description in embodiment 104 shown in fig. 1, and is not described herein again.
206. And sending the long link to be processed to a server.
If the long link to be processed does not belong to the first type of link, the long link to be processed may be sent to a server, and link compression may be performed by the server to obtain a corresponding short link.
For a further example, the class B link may be sent to a background, and the server is requested to obtain the sharing link. Specifically, the server can calculate the MD5 code (32 bits) of the link by using an MD5 digest algorithm for the received long link to be processed, then take out the link of the same MD5 code in the long link storage module to be processed, sequentially compare whether the link is the same as the requested link, if the link is the same as the requested link, generate a shared link of the same link before, and directly code the correspondingly recorded all _ id into a 64-ary character string and return the 64-ary character string; if the all the three are different, the current largest all _ id in the link storage module is taken out, the id of the new sharing link is all _ id +1, the corresponding (MD5, all _ id +1, link) triple is stored in the link storage module, and then the 10-system number obtained by the all _ id +1 of the new sharing link is encoded into a 64-system character string and returned.
The record structure stored in the link storage module may be shown in table 1 below, and sequentially includes MD5 code (32 bits), the currently largest all _ id, and link text.
MD5varchar(32) |
all_id bigint |
link text |
TABLE 1
Optionally, the MD5 digest algorithm in the embodiment of the present application may be equivalently replaced by other digest algorithms such as SHA1 and SHA 3.
207. And receiving the link after the long link compression to be processed from the server.
After the server generates the compressed link of the long link to be processed, the compressed link may be sent to the first terminal, and the first terminal may receive the compressed link of the server, and then step 208 is executed.
208. And adding a second identifier corresponding to the second type link into the compressed link to obtain the target short link.
Similar to step 205, the link generated by the server may be added with a corresponding identifier, so that the shared link is quickly identified from the second type during parsing.
For example, the aforementioned B-type link may be added with a header of "B ═ to" to facilitate the link parsing module to quickly recognize that the shared link is from the B-type link. And finally returning the obtained target short link to the user.
209. And displaying the target short link in a display interface of the first terminal.
Whether the target short link returned by the server or the short link generated at the terminal side is generated, the target short link or the short link can be displayed in a display interface of the first terminal after the generation is completed, for example, a small window is popped out from a page of a browser for displaying, and a user can copy or automatically copy the target short link so as to perform functions of saving and sending the target short link to other users for sharing.
In an alternative embodiment, the method further comprises:
responding to a sharing instruction of the target short link, and jumping to a target sharing page indicated by the sharing instruction;
and responding to an object selection instruction, determining a target user in the target sharing page, and sending the target short link to the target user.
Specifically, the sharing instruction of the target short link is triggered by a user operation, for example, the user selects to share a friend, and may jump to a target sharing page indicated by the sharing instruction, that is, the user may select a friend list of an application program. The object selection instruction is used for determining an object selected by the user to receive the sharing link, that is, the user may select one or more target users in the target sharing page, and after the object selection instruction is confirmed, the target short link may be sent to the target users, and the target users may access the web pages containing the same content through the sharing link.
For example, the original query link of the user after the social platform query may be:
https://kandiandata.oa.com/layer_datafrom=zhufeeds&start_dt=20190116&line_dt=20190117&end_dt=20190409&index=feeds%E7%82%B9%E5%87%BB%E9%87%8F-%E5%8E%BB%E9%87%8D&ctrl_list=["4"]&test_list=["1"]&withtoday=1&data_type=feeds&snap=1&m=0;
the short link optimized by the scheme in the embodiment of the application can be as follows:
https:// kandia. oa. com/layer _ datafrom ═ zhufeeds & a ═ 6OIr6TUI02021a04, 01; the label "a ═ of the a-class link is then the compressed valid data portion. By the method, the length of the sharing link is reduced, and the sharing can be conveniently carried out on application programs such as communication software and social software or stored in various documents.
In the embodiment of the application, the first terminal responds to the sharing request triggered by the user on the target page of the application program, generating a corresponding long link to be processed according to the project options of the target page, judging whether the long link to be processed belongs to a first type link, if so, coding the long link to be processed according to a link coding format by using the application program to obtain binary coding information, converting the coding information into a sixty-four system character string link in the application program, the first identifier corresponding to the first type link is added into the character string link to obtain the target short link, compared with the traditional mode of generating the short link completely depending on the server, the short link can be rapidly generated by most users even under the condition of poor network conditions, and the storage and maintenance expenses of a server side can be reduced; if the link does not belong to the first type link, the long link to be processed is sent to the server, auxiliary compression, analysis and storage of a small part of links are carried out by the server, the compressed link of the long link to be processed from the server can be received, a second identifier corresponding to the second type link is added into the compressed link, the target short link is obtained, and finally the target short link can be displayed in a display interface of the first terminal.
On the basis of the original short link scheme, link classification is provided, so that the generation of short links of low-frequency original links can be solved, and high-frequency original links can be better supported; compared with the traditional mode of generating the short link completely depending on the server, the front-end link compression scheme provided by the scheme has more practical value, can effectively generate the short link from the original link, and can reduce the storage and maintenance expenses of the server; compared with the existing method for generating the short link by the complete server side, the front-end link compression method used in the scheme can compress the link by using the browser of the user, so that most of the users can still use the computers of the users to generate the short link rapidly even under the condition of poor network conditions, and the concurrent access load of the server is reduced.
Fig. 5 is a schematic flowchart of another short link processing method according to an embodiment of the present application. As shown in fig. 5, the method is a flow for accessing the sharing link after obtaining the sharing link, and it is understood that the embodiment shown in fig. 5 may be executed after the embodiments shown in fig. 1 or fig. 2. It may specifically include:
501. and the second terminal determines the target short link type according to the received identifier in the target short link.
The execution subject in the embodiment of the present application is the second terminal, and different from the first terminal, the second terminal may be a terminal that receives the sharing link of the first terminal. In particular implementations, the above-described terminals may also be referred to as terminal devices, including but not limited to other portable devices such as mobile phones, laptop computers, or tablet computers having touch-sensitive surfaces (e.g., touch screen displays and/or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but is a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
When a user receives a sharing link and accesses the sharing link, the user enters the analysis process of the sharing link. The process of resolving the sharing link is essentially the reverse operation of generating the sharing link in the embodiment shown in fig. 1.
The second terminal may also identify the link type, which may refer to the detailed description in step 103 in the embodiment shown in fig. 1. Identifiers of different types of links can be preset, specifically, the identifiers can be letter identifiers or character strings containing letters and/or numbers, meanwhile, corresponding relations between the different types of links and the identifiers are also set, and the different types of links can be identified and distinguished through the corresponding relations. Namely, when other users accept the sharing link, the sharing link type can be quickly identified, and then analysis is carried out.
Specifically, if the target short link is a first type link, step 502 may be executed, and if the target short link is not a first type link, step 503 may be executed.
502. And if the target short link is the first type link, calling an analysis module of an application program to analyze the target short link to obtain an original link.
Optionally, similar to the generation of the sharing link, the analysis may be divided into the analysis of the a-type link and the analysis of the B-type link. In an alternative embodiment, the resolution of the class a link is mainly divided into the following steps:
the first step is as follows: the links are classified, identifying whether the accessed links belong to a class A link or a class B link (non-class A link). When the shared link is generated, the head of the type A link is added with the head of the type a, and the head of the type B link is added with the head of the type B, so that the shared link generated by the two types of links can be directly distinguished according to the link heads;
the second step is that: and inputting the sharing link of the A-type link into an analysis module of the application program, and analyzing the original link. The sharing link is firstly converted into a binary string from 64 bits, and then each field is respectively analyzed according to the same link coding format, so that the original query link is restored.
Optionally, the application program may be an application program that generates an original long link to be processed, that is, the second terminal may start a corresponding application program, such as a browser shared by the first terminal, by selecting "open in xx (application program)" by the user, or may be another application program having a corresponding link parsing function in the second terminal, which is not limited in this embodiment of the application.
503. And if the target short link is not the first type link, sending a link acquisition request to a server, wherein the link acquisition request is used for requesting the server to provide the original link corresponding to the target short link.
In particular, for short links that are not of the first type, a server may be requested to assist in parsing. Thereafter, the parsing result from the server may be obtained.
Specifically, the server may store the resolution condition at each time, including the correspondence between the short link and the original link. When an analysis request of the terminal is received, the historical analysis record can be inquired, and if an original link corresponding to the target short link exists, the original link is used as an analysis result and returned to the user. Repeated analysis is not needed, so that the data processing overhead is reduced, the original link can be quickly obtained to display the corresponding webpage content, and the shared information is obtained. Optionally, if there is no original link corresponding to the target short link, it indicates that the server has not generated a sharing link corresponding to the original link before, and an error page may be returned.
Taking the aforementioned class B link as an example, the analysis can be mainly divided into the following steps:
the first step is as follows: and classifying the links, and identifying whether the accessed links belong to the links of the A type or the B type. When the shared link is generated, the head of the type A link is added with the head of the type a, and the head of the type B link is added with the head of the type B, so that the shared link generated by the two types of links can be directly distinguished according to the link heads;
the second step is that: sending the sharing link of the B-type link to a server, and requesting the server to assist in analysis;
the third step: and the server converts the sharing link in the received analysis request from a 64-system number into a 10-system number as the value of the all _ id, and inquires the original link corresponding to the all _ id from the stored links. If the corresponding original link exists, returning the link to the user; if the shared link does not exist, the server does not generate the shared link corresponding to the original link before the sharing link does not exist, and an error page is returned to the user.
Step 502 may refer to steps 202 to 204 in the embodiment shown in fig. 2 and the related detailed description in fig. 4, which are not repeated herein.
The target short link type is determined by the second terminal according to the received identifier in the target short link; if the target short link is a first type link, calling an analysis module of an application program to analyze the target short link to obtain an original link; if the target short link is not the first type link, a link acquisition request is sent to a server, the link acquisition request is used for requesting the server to provide the original link corresponding to the target short link, the short link can be analyzed to obtain the original link, the original link can be quickly obtained to access a corresponding page even under the condition of poor network conditions, and meanwhile, the storage and maintenance expenses of the server side can be reduced.
Based on the description of the short link processing method embodiment, the embodiment of the present application further discloses a terminal, which may correspond to the first terminal. The terminal may perform the methods shown in fig. 1 and/or fig. 2.
Referring to fig. 6, the terminal 600 includes: a classification module 610, an encoding module 620, a conversion module 630, and a generation module 640, wherein:
the classifying module 610 is configured to obtain the generated long link to be processed, and determine whether the long link to be processed belongs to a first type link;
the encoding module 620 is configured to encode the long chain link to be processed according to a link encoding format by using an application program if the long chain link to be processed belongs to the first type link, so as to obtain binary encoding information;
the conversion module 630 is configured to convert the encoded information into a string link of a target system in the application program;
the generating module 640 is configured to add a first identifier corresponding to the first type link to the character string link to obtain a target short link.
In a possible implementation manner, the generating module 640 is further configured to, in response to a sharing request triggered by a user on a target page of an application program, generate a corresponding long link to be processed according to a project option of the target page.
In a possible implementation manner, the conversion module 630 is specifically configured to convert the encoded information into a sixty-four system string link in the application program.
In a possible implementation manner, the conversion module 630 is further specifically configured to:
and acquiring a character set in the application program, and determining a target character corresponding to the code of the code information in the character set according to the corresponding relation between the code and the character set so as to generate the character string link of the target system.
In a possible implementation manner, the system further includes a transmission module 650, configured to receive the link after long link compression to be processed from the server;
the generating module 640 is further configured to add a second identifier corresponding to a second type of link to the compressed link to obtain the target short link.
Optionally, a display module 660 is further included, configured to:
after a target short link is obtained or the target short link compressed by the long link to be processed from the server is received, displaying the target short link in a display interface of the first terminal;
or the short link processing unit is used for responding to the sharing instruction of the target short link and jumping to a target sharing page indicated by the sharing instruction;
the transmission module 650 is further configured to determine a target user in the target sharing page in response to an object selection instruction, and send the target short link to the target user.
Optionally, the link encoding format includes a mapping relationship between a project option of the target page and a binary code, where the project option includes: at least one or more of data start date, experiment start date, data end date and service type.
According to an embodiment of the present application, the steps involved in the methods shown in fig. 1 and fig. 2 may be performed by various modules in the terminal 600 shown in fig. 5.
According to another embodiment of the present application, the modules in the terminal 600 shown in fig. 6 may be respectively or entirely combined into one or several other modules to form the terminal, or some module(s) may be further split into multiple functionally smaller modules to form the terminal, which may implement the same operation without affecting implementation of technical effects of embodiments of the present application. The modules are divided based on logic functions, and in practical application, the functions of one module can be realized by a plurality of modules, or the functions of a plurality of modules can be realized by one module. In other embodiments of the present application, the terminal-based terminal may also include other modules, and in practical applications, these functions may also be implemented by the assistance of other modules, and may be implemented by cooperation of a plurality of modules.
Based on the description of the short link processing method embodiment, the embodiment of the present application further discloses another terminal, which can correspond to the second terminal. The terminal may perform the method shown in fig. 5.
Referring to fig. 7, a terminal 700 includes: a determination module 710, a parsing module 720, and a request module 730, wherein:
the determining module 710 is configured to determine the target short link type according to the identifier in the received target short link;
the parsing module 720 is configured to, if the target short link is a first type link, invoke a parsing module of an application program to parse the target short link to obtain an original link;
the request module 730 is configured to send a link obtaining request to a server if the target short link is not the first type link, where the link obtaining request is used to request the server to provide the original link corresponding to the target short link.
According to an embodiment of the present application, each step involved in the method shown in fig. 5 may be performed by each module in the terminal 700 shown in fig. 7, and is not described herein again.
According to another embodiment of the present application, the modules in the terminal 700 shown in fig. 7 may be respectively or entirely combined into one or several other modules to form the terminal, or some module(s) may be further split into multiple functionally smaller modules to form the terminal, which may implement the same operation without affecting implementation of technical effects of embodiments of the present application. The modules are divided based on logic functions, and in practical application, the functions of one module can be realized by a plurality of modules, or the functions of a plurality of modules can be realized by one module. In other embodiments of the present application, the terminal-based terminal may also include other modules, and in practical applications, these functions may also be implemented by the assistance of other modules, and may be implemented by cooperation of a plurality of modules.
According to another embodiment of the present application, the terminal 600 as shown in fig. 6 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the respective methods as shown in fig. 1 and/or fig. 2 on a general-purpose computing device such as a computer including a processing element such as a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and a storage element, and implementing the short link processing method of the embodiment of the present application. The computer program may be recorded on a computer-readable recording medium, for example, and loaded into and executed by the computing apparatus via the computer-readable recording medium.
The terminal 600 in this embodiment of the application may obtain the generated long link to be processed, determine whether the long link to be processed belongs to the first type link, and if the long link to be processed belongs to the first type link, the long chain link to be processed is coded according to the link coding format by using an application program to obtain binary coding information, converting the coded information into a character string link of a target system in the application program, adding a first identifier corresponding to a first type link into the character string link to obtain a target short link, the short link can be effectively generated to realize information sharing by depending on the computing power of the terminal browser, compared with the traditional mode of generating the short link by depending on the server side completely, the short link can be generated quickly by most users even under the condition of poor network conditions, and meanwhile, the storage and maintenance expenses of the server side can be reduced.
Based on the description of the method embodiment and the device embodiment, the embodiment of the application also provides a terminal. Referring to fig. 8, the terminal 800 includes at least a processor 801, an input device 802, an output device 803, and a computer storage medium 804. The processor 801, the input device 802, the output device 803, and the computer storage medium 804 within the terminal may be connected by a bus or other means.
A computer storage medium 804 may be stored in the memory of the terminal, the computer storage medium 604 being configured to store a computer program comprising program instructions, and the processor 801 being configured to execute the program instructions stored by the computer storage medium 804. The processor 801 (or CPU) is a computing core and a control core of the terminal, and is adapted to implement one or more instructions, and in particular, is adapted to load and execute the one or more instructions so as to implement a corresponding method flow or a corresponding function; in one embodiment, the processor 801 described above in the embodiments of the present application may be configured to perform a series of processes, including: the method comprises the steps that a first terminal obtains a generated long link to be processed, whether the long link to be processed belongs to a first type link or not is judged, if the long link to be processed belongs to the first type link, the long link to be processed is coded according to a link coding format by using an application program, binary coding information is obtained, the coding information is converted into a character string link of a target system in the application program, a first identifier corresponding to the first type link is added into the character string link, and the target short link is obtained.
An embodiment of the present application further provides a computer storage medium (Memory), where the computer storage medium is a Memory device in a terminal and is used to store programs and data. It is understood that the computer storage medium herein may include a built-in storage medium in the terminal, and may also include an extended storage medium supported by the terminal. The computer storage medium provides a storage space that stores an operating system of the terminal. Also stored in this memory space are one or more instructions, which may be one or more computer programs (including program code), suitable for loading and execution by processor 801. The computer storage medium may be a high-speed RAM memory, or may be a non-volatile memory (non-volatile memory), such as at least one disk memory; and optionally at least one computer storage medium located remotely from the processor.
In one embodiment, one or more instructions stored in a computer storage medium may be loaded and executed by the processor 801 to implement the respective steps of the method in the above-described embodiments; in particular implementations, one or more instructions in a computer storage medium may be loaded and executed by processor 801 to perform any of the steps of fig. 1 and 2.
The terminal 800 of the embodiment of the present application may obtain the generated long link to be processed, determine whether the long link to be processed belongs to the first type link, and if the long link to be processed belongs to the first type link, the long chain link to be processed is coded according to the link coding format by using an application program to obtain binary coding information, converting the coded information into a character string link of a target system in the application program, adding a first identifier corresponding to a first type link into the character string link to obtain a target short link, the short link can be effectively generated to realize information sharing by depending on the computing power of the terminal browser, compared with the traditional mode of generating the short link by depending on the server side completely, the short link can be generated quickly by most users even under the condition of poor network conditions, and meanwhile, the storage and maintenance expenses of the server side can be reduced.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the division of the module is only one logical division, and other divisions may be possible in actual implementation, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not performed. The shown or discussed mutual coupling, direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some interfaces, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are wholly or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on or transmitted over a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)), or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a read-only memory (ROM), or a Random Access Memory (RAM), or a magnetic medium, such as a floppy disk, a hard disk, a magnetic tape, a magnetic disk, or an optical medium, such as a Digital Versatile Disk (DVD), or a semiconductor medium, such as a Solid State Disk (SSD).
Claims (12)
1. A short link processing method is characterized by comprising the following steps:
the method comprises the steps that a first terminal obtains a generated long link to be processed and judges whether the long link to be processed belongs to a first type link or not;
if the long chain link to be processed belongs to the first type link, the long chain link to be processed is coded according to a link coding format by using an application program to obtain binary coding information;
converting the coded information into a character string link of a target system in the application program;
and adding a first identifier corresponding to the first type link into the character string link to obtain the target short link.
2. The method of claim 1, wherein before the first terminal acquires the generated long link to be processed, the method further comprises:
and the first terminal responds to a sharing request triggered by a user on a target page of the application program, and generates a corresponding long link to be processed according to a project option of the target page.
3. The method of claim 2, wherein converting the encoded information into a string link of a target system in the application comprises:
and converting the coded information into a sixty-four system character string link in the application program.
4. The method of claim 3, wherein converting the encoded information into a sixty-four character string link in the application comprises:
acquiring a character set in the application program, and determining a target character corresponding to the code of the code information in the character set according to the corresponding relation between the code and the character set so as to generate the sexagesimal character string link.
5. The method according to any one of claims 1-4, further comprising:
if the long link to be processed does not belong to the first type link, sending the long link to be processed to a server;
receiving the link after the long link compression to be processed from the server;
and adding a second identifier corresponding to the second type link into the compressed link to obtain the target short link.
6. The method according to claim 5, wherein after the target short link is obtained or after the target short link after the pending long link compression is received from the server, the method comprises:
displaying the target short link in a display interface of the first terminal;
or, responding to a sharing instruction of the target short link, and jumping to a target sharing page indicated by the sharing instruction;
and responding to an object selection instruction, determining a target user in the target sharing page, and sending the target short link to the target user.
7. The method of any of claims 2-4, wherein the link-code format comprises a mapping of project options of the target page to binary codes, the project options comprising: at least one or more of data start date, experiment start date, data end date and service type.
8. A short link processing method is characterized by comprising the following steps:
the second terminal determines the type of the target short link according to the received identifier in the target short link;
if the target short link is a first type link, calling an analysis module of an application program to analyze the target short link to obtain an original link;
and if the target short link is not the first type link, sending a link acquisition request to a server, wherein the link acquisition request is used for requesting the server to provide the original link corresponding to the target short link.
9. A terminal, comprising: classification module, coding module, conversion module and generation module, wherein:
the classification module is used for acquiring the generated long link to be processed and judging whether the long link to be processed belongs to a first type link or not;
the coding module is used for coding the long chain link to be processed according to a link coding format by using an application program to obtain binary coding information if the long chain link to be processed belongs to the first type link;
the conversion module is used for converting the coded information into a character string link of a target system in the application program;
the generating module is configured to add a first identifier corresponding to the first type link to the string link to obtain a target short link.
10. A terminal, comprising a determining module, a parsing module, and a requesting module, wherein:
the determining module is used for determining the target short link type according to the identifier in the received target short link;
the analysis module is used for calling the analysis module of the application program to analyze the target short link to obtain an original link if the target short link is a first type link;
the request module is configured to send a link acquisition request to a server if the target short link is not the first type link, where the link acquisition request is used to request the server to provide the original link corresponding to the target short link.
11. A terminal comprising an input device and an output device, further comprising:
a processor adapted to implement one or more instructions; and the number of the first and second groups,
a computer storage medium having stored thereon one or more instructions adapted to be loaded by the processor and to execute the short link processing method according to any of claims 1-7.
12. A computer-readable storage medium having stored thereon one or more instructions adapted to be loaded by a processor and to perform the short link processing method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910703918.5A CN112307369A (en) | 2019-07-31 | 2019-07-31 | Short link processing method, device, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910703918.5A CN112307369A (en) | 2019-07-31 | 2019-07-31 | Short link processing method, device, terminal and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112307369A true CN112307369A (en) | 2021-02-02 |
Family
ID=74486707
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910703918.5A Pending CN112307369A (en) | 2019-07-31 | 2019-07-31 | Short link processing method, device, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112307369A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113723484A (en) * | 2021-08-20 | 2021-11-30 | 深圳万顺叫车云信息技术有限公司 | Short link generation method and system and electronic equipment |
CN114169917A (en) * | 2021-11-17 | 2022-03-11 | 广州市玄武无线科技股份有限公司 | Information sending method, platform, system, electronic equipment and storage medium |
CN114626338A (en) * | 2022-03-01 | 2022-06-14 | 杭州趣链科技有限公司 | Character encoding method, character decoding method, character encoding system, character decoding system, character encoding device, character decoding device, and storage medium |
CN116431941A (en) * | 2023-06-13 | 2023-07-14 | 北京安锐卓越信息技术股份有限公司 | Method, device and medium for realizing link authorization jump |
CN113761406B (en) * | 2021-09-03 | 2024-06-04 | 丰巢网络技术有限公司 | Intelligent cabinet two-dimension code short-chain generation method and device, medium and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101132420A (en) * | 2007-10-16 | 2008-02-27 | 杭州华三通信技术有限公司 | Link overwriting method and device based on SSL VPN |
KR20080087191A (en) * | 2007-02-21 | 2008-10-01 | 숭실대학교산학협력단 | Method for compressing and decompressing url |
CN102810089A (en) * | 2011-05-30 | 2012-12-05 | 盛乐信息技术(上海)有限公司 | Short link system based on content and implementation method thereof |
CN106202187A (en) * | 2016-06-28 | 2016-12-07 | 北京京东尚科信息技术有限公司 | The method and apparatus that a kind of short chain of process in a browser connects |
CN110046331A (en) * | 2019-03-20 | 2019-07-23 | 北京品友互动信息技术股份公司 | Data-encoding scheme and device, storage medium, electronic device |
-
2019
- 2019-07-31 CN CN201910703918.5A patent/CN112307369A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20080087191A (en) * | 2007-02-21 | 2008-10-01 | 숭실대학교산학협력단 | Method for compressing and decompressing url |
CN101132420A (en) * | 2007-10-16 | 2008-02-27 | 杭州华三通信技术有限公司 | Link overwriting method and device based on SSL VPN |
CN102810089A (en) * | 2011-05-30 | 2012-12-05 | 盛乐信息技术(上海)有限公司 | Short link system based on content and implementation method thereof |
CN106202187A (en) * | 2016-06-28 | 2016-12-07 | 北京京东尚科信息技术有限公司 | The method and apparatus that a kind of short chain of process in a browser connects |
CN110046331A (en) * | 2019-03-20 | 2019-07-23 | 北京品友互动信息技术股份公司 | Data-encoding scheme and device, storage medium, electronic device |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113723484A (en) * | 2021-08-20 | 2021-11-30 | 深圳万顺叫车云信息技术有限公司 | Short link generation method and system and electronic equipment |
CN113723484B (en) * | 2021-08-20 | 2022-08-02 | 深圳万顺叫车云信息技术有限公司 | Short link generation method and system and electronic equipment |
CN113761406B (en) * | 2021-09-03 | 2024-06-04 | 丰巢网络技术有限公司 | Intelligent cabinet two-dimension code short-chain generation method and device, medium and electronic equipment |
CN114169917A (en) * | 2021-11-17 | 2022-03-11 | 广州市玄武无线科技股份有限公司 | Information sending method, platform, system, electronic equipment and storage medium |
CN114626338A (en) * | 2022-03-01 | 2022-06-14 | 杭州趣链科技有限公司 | Character encoding method, character decoding method, character encoding system, character decoding system, character encoding device, character decoding device, and storage medium |
CN116431941A (en) * | 2023-06-13 | 2023-07-14 | 北京安锐卓越信息技术股份有限公司 | Method, device and medium for realizing link authorization jump |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112307369A (en) | Short link processing method, device, terminal and storage medium | |
US8620995B2 (en) | Method, computer program, transcoding server and computer system for modifying a digital document | |
CN106407201B (en) | Data processing method and device and computer readable storage medium | |
US8078640B1 (en) | High efficiency binary encoding | |
US10649905B2 (en) | Method and apparatus for storing data | |
CN108733317B (en) | Data storage method and device | |
CN108921552B (en) | Evidence verification method and device | |
CN108197324B (en) | Method and apparatus for storing data | |
US20200204688A1 (en) | Picture book sharing method and apparatus and system using the same | |
CN111475785B (en) | Information acquisition method, information acquisition device, computer equipment and storage medium | |
CN113626223A (en) | Interface calling method and device | |
CN110213397A (en) | Data creation method, device, electronic equipment and storage medium | |
CN110162412B (en) | Method and device for performing data operation on client | |
CN114546280B (en) | File storage method, device, electronic equipment and computer readable storage medium | |
CN111563199A (en) | Data processing method and device | |
WO2023092580A1 (en) | Page display method and apparatus, storage medium, and electronic device | |
CN110704432A (en) | Data index establishing method and device, readable storage medium and electronic equipment | |
CN111310088B (en) | Page rendering method and device | |
US20220207095A1 (en) | Dynamic website creation system and method | |
US20240028608A1 (en) | Schema validation with support for ordering | |
CN110851346B (en) | Query statement boundary problem detection method, device, equipment and storage medium | |
CN111143450A (en) | Method and device for importing data | |
WO2022262448A1 (en) | Article screening method and apparatus, electronic device, and storage medium | |
CN107977381B (en) | Data configuration method, index management method, related device and computing equipment | |
CN116069725A (en) | File migration method, device, apparatus, medium and program product |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |