CN116226560A - Short-link generation method and device - Google Patents

Short-link generation method and device Download PDF

Info

Publication number
CN116226560A
CN116226560A CN202310333906.4A CN202310333906A CN116226560A CN 116226560 A CN116226560 A CN 116226560A CN 202310333906 A CN202310333906 A CN 202310333906A CN 116226560 A CN116226560 A CN 116226560A
Authority
CN
China
Prior art keywords
link
short
long
database
short link
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
Application number
CN202310333906.4A
Other languages
Chinese (zh)
Inventor
李伦
蒋永鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xingka Technology Co ltd
Original Assignee
Shenzhen Xingka Technology Co ltd
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 Shenzhen Xingka Technology Co ltd filed Critical Shenzhen Xingka Technology Co ltd
Priority to CN202310333906.4A priority Critical patent/CN116226560A/en
Publication of CN116226560A publication Critical patent/CN116226560A/en
Pending legal-status Critical Current

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]
    • G06F16/9558Details of hyperlinks; Management of linked annotations
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application relates to the technical field of Internet and discloses a short link generation method and a device, wherein the method comprises the steps of obtaining a long link address; performing encryption budget on the long-link address according to a first pre-encryption program to obtain a long-link identifier; acquiring a database, wherein a plurality of target short link addresses are arranged in the database; judging whether a target short link address corresponding to the long link identifier exists in the database or not, wherein the target short link address and the long link identifier have a unique corresponding relation; and if the target short link address corresponding to the long link identifier exists in the database, acquiring the target short link address, and taking the target short link address as a short link. The application replaces the original lengthy website with a short website, shortens the short message length and reduces the cost; the short message is charged according to the length of the content, so that the link is shortened, the appearance is attractive, the cost is saved, the user can conveniently check the short message, and the experience of the user can be improved.

Description

Short-link generation method and device
Technical Field
The application relates to the technical field of internet, in particular to a short link generation method and device.
Background
The Internet refers to the result of connecting two computers or more than two computer terminals, clients and servers through the means of computer information technology, people can send mails with friends or colleagues far away from the thousands of places to complete a work and entertain together, and connect through the Internet to complete a work or entertain together, information is transmitted through a website, and the website refers to the address of a web page on the Internet (Internet).
In particular, businesses, institutions or individuals store information on the internet in a page-by-page manner by technical processing, each page having a corresponding address for other users to access to information material.
In the internet, if one computer is to access another computer on the internet, the other party's web address must be known. As the categories related to the commodity are more and more, the length of the website of the commodity details is longer and longer, and the overlong website occupies the length position, and the attractiveness is affected and the user experience is not high.
Therefore, the Short URL (Short URL) is to shorten a long website link to a Short link, but the free conversion service provided by the website shortening service in the market is mainly personal, and the security and stability of the service cannot be ensured.
Disclosure of Invention
The main purpose of the present application is to provide a method and an apparatus for generating a short link, which aim to solve the technical problems in the prior art.
In a short link generation method, the improvement comprising:
acquiring a long-chain link address;
performing encryption budget on the long-link address according to a first pre-encryption program to obtain a long-link identifier;
acquiring a database, wherein a plurality of target short link addresses are arranged in the database;
judging whether a target short link address corresponding to the long link identifier exists in the database or not, wherein the target short link address and the long link identifier have a unique corresponding relation;
and if the target short link address corresponding to the long link identifier exists in the database, acquiring the target short link address, and taking the target short link address as a short link.
As an improvement of the above technical solution, the determining whether the target short link address corresponding to the long link identifier exists in the database further includes:
if the target short link address corresponding to the long link identifier does not exist in the database, storing the long link address and the long link identifier to obtain a short link ID value;
performing encryption budget on the short link ID value according to a second pre-encryption program to obtain a short code;
and acquiring a domain name, and splicing the short code to the domain name to obtain a short link.
As a further improvement of the above technical solution, the step of obtaining the short code includes:
obtaining an encryption comparison table, wherein the encryption comparison table is composed of a plurality of character strings, and the number of the character strings is N;
and dividing the short link ID value according to the N to confirm a remainder A1 and a quotient B1.
As a further improvement of the above technical solution, the step of obtaining the short code further includes:
executing the 1 st judgment according to the judgment program, and judging whether the quotient B1 is larger than the N;
if the quotient B1 is larger than the N, dividing the quotient B1 to obtain a remainder A2 and a quotient B2;
when the nth judgment quotient Bn is smaller than the N according to the judgment program execution, the remainder an+1 and the quotient Bn+1 are confirmed.
As a further improvement of the above technical solution, the step of obtaining the short code further includes:
obtaining remainder A1, A2, … and an+1;
and circularly inquiring the remainders A1, A2, … and an+1 according to a search program to confirm a plurality of corner index values M of the encryption comparison tables corresponding to the remainders A1, A2, … and an+1.
As a further improvement of the above technical solution, the step of obtaining the short code further includes:
sequentially splicing a plurality of corner mark values M according to the acquisition sequence to obtain a preset character string;
acquiring the quotient Bn+1, and splicing the quotient Bn+1 to the preset character string to obtain a target character string;
and reversely sequencing the target character strings to obtain short codes.
As a further improvement of the above technical solution, before the obtaining the database, the method further includes creating the database, and the step of creating the database includes:
selecting a relational database management system;
creating a data table within the relational database management system;
setting up a primary key self-increasing mode for the data table, and generating a first storage sub-table, wherein when the long-link address and the long-link identifier are stored in the data table, the data table is used for automatically generating a short-link ID value and storing the short-link ID value into the first storage sub-table;
creating a second storage sub-table and a third storage sub-table in the data table, wherein the second storage sub-table is used for storing the long-link address, and the third storage sub-table is used for storing the long-link identifier.
The application also provides a data encryption device, which comprises:
the first processing module is used for acquiring a long-chain link address;
the encryption module is used for carrying out encryption budget on the long-link address according to a first pre-encryption program to obtain a long-link identifier;
the second acquisition module is used for acquiring a database, and a plurality of target short link addresses are arranged in the database;
the judging module is used for judging whether a target short link address corresponding to the long link identifier exists in the database or not, wherein the target short link address and the long link identifier have a unique corresponding relation;
and the third processing module is used for acquiring the target short link address if the target short link address corresponding to the long link identifier exists in the database, and taking the target short link address as a short link.
The application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of a short link generation method as described above when executing the computer program.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of a short link generation method as described above.
The beneficial effects of this application are: the application replaces the original lengthy website with a short website, shortens the short message length and reduces the cost; the short message is charged according to the length of the content, so that the link is shortened, the appearance is attractive, the cost is saved, the user can conveniently check the short message, and the experience of the user can be improved; in addition, the long-chain connection is converted and encrypted, and the formed short-chain connection is an encrypted address, so that the safety of data can be ensured, and the safety of data transmission is improved.
Drawings
Fig. 1 is a flowchart of a short link generation method according to an embodiment of the present application.
Fig. 2 is a structural frame diagram of a short link generating device according to an embodiment of the present application.
Fig. 3 is a schematic diagram of an internal structure of a computer device according to an embodiment of the present application.
The realization, functional characteristics and advantages of the present application will be further described with reference to the embodiments, referring to the attached drawings.
100. The system comprises a first processing module, a second processing module, a judging module and a third processing module.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
It should be noted that although functional block division is performed in a device diagram and a logic sequence is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the block division in the device, or in the flowchart. The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the present application.
Example 1
Referring to fig. 1, the present application discloses a short link generation method, which includes:
s1: acquiring a long-chain link address;
s2: performing encryption budget on the long-link address according to a first pre-encryption program to obtain a long-link identifier;
s3: acquiring a database, wherein a plurality of target short link addresses are arranged in the database;
s4: judging whether a target short link address corresponding to the long link identifier exists in the database or not, wherein the target short link address and the long link identifier have a unique corresponding relation;
s5: and if the target short link address corresponding to the long link identifier exists in the database, acquiring the target short link address, and taking the target short link address as a short link.
Further, the determining whether the target short link address corresponding to the long link identifier exists in the database further includes:
s6: if the target short link address corresponding to the long link identifier does not exist in the database, storing the long link address and the long link identifier to obtain a short link ID value;
s7: performing encryption budget on the short link ID value according to a second pre-encryption program to obtain a short code;
s8: and acquiring a domain name, and splicing the short code to the domain name to obtain a short link.
In the above embodiment, for steps S1 to S8, a short link generation method of the present application mainly shortens the target object, i.e., the long link. Firstly, the long link address is obtained, and the first encryption program is directly executed on the long link address, in other words, the encryption program is executed on the long link address to obtain the long link identifier, and each time the first encryption program is executed on the long link address, the unique long link identifier is generated accordingly, so in step S2, if the first encryption program is executed on a plurality of long link addresses, a plurality of long link identifiers are generated, but each long link address only has the unique long link identifier corresponding to the first encryption program.
After the long link identifier is generated, a database is called, a target short link address is extracted from the database, a first judging program is executed, and whether the target short link address corresponding to the long link identifier exists in the database or not is judged, wherein the target short link address and the long link identifier have a unique corresponding relation. When a target short link address corresponding to the long link identifier exists in the database, acquiring the target short link address, and taking the target short link address as a short link; if the target short link address corresponding to the long link identifier does not exist in the database, storing the long link address and the long link identifier into the database so as to obtain a short link ID value; the short link ID value is then subject to an encryption budget according to a second pre-encryption procedure to further obtain a short code. Wherein, each time long link address and the long link identifier are stored in the database, the short link ID value is automatically updated in the database; when the short code is acquired, acquiring the domain name, and splicing the short code to the domain name to obtain the short link. The application replaces the original lengthy website with a short website, shortens the short message length and reduces the cost; the short message is charged according to the length of the content, so that the link is shortened, the appearance is attractive, the cost is saved, the user can conveniently check the short message, and the experience of the user can be improved.
Still further, the step of obtaining the short code includes:
s701: obtaining an encryption comparison table, wherein the encryption comparison table is composed of a plurality of character strings, and the number of the character strings is N;
s702: dividing the short link ID value according to the N to confirm a remainder A1 and a quotient B1;
s703: executing the 1 st judgment according to the judgment program, and judging whether the quotient B1 is larger than the N;
s704: if the quotient B1 is larger than the N, dividing the quotient B1 to obtain a remainder A2 and a quotient B2;
s705: when the nth judgment quotient Bn is smaller than the N according to the judgment program execution, confirming a remainder an+1 and a quotient Bn+1;
s706: obtaining remainder A1, A2, … and an+1;
s707: performing a cyclic query on the remainders A1, A2, … and an+1 according to a search program to confirm a plurality of corner index values M of An encryption comparison table corresponding to the remainders A1, A2, … and an+1;
s708: sequentially splicing a plurality of corner mark values M according to the acquisition sequence to obtain a preset character string;
s709: acquiring the quotient Bn+1, and splicing the quotient Bn+1 to the preset character string to obtain a target character string;
s710: and reversely sequencing the target character strings to obtain short codes.
In the above embodiment, for steps S701-S710, an encryption reference table is first obtained, where the encryption reference table is composed of a plurality of strings, where the number of strings is set to N; dividing the short link ID value according to the N to confirm a remainder A1 and a quotient B1; executing the 1 st judgment according to the judgment program, and judging whether the quotient B1 is larger than the N; if the quotient B1 is larger than the N, dividing the quotient B1 to obtain a remainder A2 and a quotient B2;
when the nth judgment quotient Bn is smaller than the N according to the judgment program execution, confirming a remainder an+1 and a quotient Bn+1; obtaining remainder A1, A2, … and an+1; performing a cyclic query on the remainders A1, A2, … and an+1 according to a search program to confirm a plurality of corner index values M of An encryption comparison table corresponding to the remainders A1, A2, … and an+1; sequentially splicing a plurality of corner mark values M according to the acquisition sequence to obtain a preset character string; acquiring the quotient Bn+1, and splicing the quotient Bn+1 to the preset character string to obtain a target character string; and reversely sequencing the target character strings to obtain short codes.
For example: defining an encryption contrast table as $char, wherein $char consists of N character strings, wherein the character strings comprise lowercase letters, uppercase letters and Arabic numerals, namely a-Z, A-Z and 0-9, wherein N=62, dividing a short link ID value by N, namely by 62, to obtain a remainder A1 and a quotient B1, and performing first judgment on the remainder A1 and the quotient B1 to judge whether the quotient B1 is larger than the N, namely larger than 62; if the quotient B1 is greater than the N, dividing the quotient B1 to obtain a remainder A2 and a quotient B2, executing a judging program once after each division operation to judge whether the obtained quotient Bn is greater than the N, and collecting the remainder A1, A2, …, an, an+1 and the quotient B1, B2 …, bn and Bn+1 if the last judging result is that the quotient Bn+1 is less than the N. Circularly inquiring the remainders A1, A2, … and an+1 according to a search program to confirm a plurality of corner mark values M of An encryption comparison table corresponding to the remainders A1, A2, … and an+1, wherein the corner mark values M are 0-61; sequentially splicing a plurality of corner mark values M according to the acquisition sequence to obtain a preset character string; acquiring the quotient Bn+1, and splicing the quotient Bn+1 to the preset character string to obtain a target character string; and reversely sequencing the target character strings to obtain short codes. For example, the target string is AB321cba, the reverse ordering is followed by abc123AB, and the short code is abc123AB.
After obtaining the short code, obtaining the domain name, for example, the domain name is: and (3) http:// www.abc.com, splicing the short codes to the domain name to obtain a short link, wherein the short link is expressed as http:// www.abc.com/abc123AB. The long-chain connection is converted and encrypted, and the formed short-chain connection is an encrypted address, so that the safety of data can be ensured, and the safety of data transmission is improved.
In addition, before the database is obtained, the method further comprises the step of creating a database, and the step of creating the database comprises the following steps:
s301: selecting a relational database management system;
s302: creating a data table within the relational database management system;
s303: setting up a primary key self-increasing mode for the data table, and generating a first storage sub-table, wherein when the long-link address and the long-link identifier are stored in the data table, the data table is used for automatically generating a short-link ID value and storing the short-link ID value into the first storage sub-table;
s304: creating a second storage sub-table and a third storage sub-table in the data table, wherein the second storage sub-table is used for storing the long-link address, and the third storage sub-table is used for storing the long-link identifier.
In the above embodiment, the relational database management system is also a system that manages a relational database and organizes data into related rows and columns, creates a data table in the management relational database, and creates a first memory sub-table, a second memory sub-table, a third memory sub-table, and a fourth memory sub-table in the data table. When the long-chain address and the long-chain identifier are stored in the data table, a short-link ID value is automatically generated and stored in the first storage sub-table, wherein the short-link ID value is larger than 1. The second memory sub-table is used for storing the long-link address. And the third storage sub-table is used for storing the long-link identifier. The fourth memory sub-table is used for storing the target short link address corresponding to the long link identifier in the future, so that when the same long link address is encountered next time, the target short link address can be directly called out from the database to serve as a short link, and new short links are not needed to be generated (in other words, the steps S6-S8 are not needed to be executed), so that the memory resources of the database can be saved, and the phenomenon of excessive blocking of data is prevented.
Example two
Referring to fig. 2, the present application further discloses a data encryption device, including:
the first processing module 100, the first processing module 100 is configured to obtain a long link address;
the encryption module is used for carrying out encryption budget on the long-link address according to a first pre-encryption program to obtain a long-link identifier;
the second processing module 200 is configured to acquire a database, where a plurality of target short link addresses are set in the database;
the judging module 300 is configured to judge whether a target short link address corresponding to the long link identifier exists in the database, where the target short link address has a unique correspondence with the long link identifier;
and the third processing module 400 is configured to obtain the target short link address if the target short link address corresponding to the long link identifier exists in the database, and take the target short link address as a short link.
In the short link generation device of the present application, reference may be made to the steps of the above-mentioned short link generation method, and the detailed description will not be repeated here.
Example III
As shown in fig. 3, the present application further provides a computer device, which may be a server, and the internal structure of which may be as shown in fig. 3. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store all data required for the process of a short link generation method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a short link generation method.
Those skilled in the art will appreciate that the architecture shown in fig. 3 is merely a block diagram of a portion of the architecture in connection with the present application and is not intended to limit the computer device to which the present application is applied.
An embodiment of the present application further provides a computer readable storage medium having a computer program stored thereon, where the computer program when executed by a processor implements any of the above short link generation methods.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by hardware associated with a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in embodiments may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article or method that comprises the element.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims of the present application.

Claims (10)

1. A short link generation method, the method comprising:
acquiring a long-chain link address;
performing encryption budget on the long-link address according to a first pre-encryption program to obtain a long-link identifier;
acquiring a database, wherein a plurality of target short link addresses are arranged in the database;
judging whether a target short link address corresponding to the long link identifier exists in the database or not, wherein the target short link address and the long link identifier have a unique corresponding relation;
and if the target short link address corresponding to the long link identifier exists in the database, acquiring the target short link address, and taking the target short link address as a short link.
2. The method for generating a short link according to claim 1, wherein said determining whether a target short link address corresponding to the long link identifier exists in the database further comprises:
if the target short link address corresponding to the long link identifier does not exist in the database, storing the long link address and the long link identifier to obtain a short link ID value;
performing encryption budget on the short link ID value according to a second pre-encryption program to obtain a short code;
and acquiring a domain name, and splicing the short code to the domain name to obtain a short link.
3. The short link generation method according to claim 2, wherein the step of acquiring the short code includes:
obtaining an encryption comparison table, wherein the encryption comparison table is composed of a plurality of character strings, and the number of the character strings is N;
and dividing the short link ID value according to the N to confirm a remainder A1 and a quotient B1.
4. A short link generation method according to claim 3, wherein the step of obtaining the short code further comprises:
executing the 1 st judgment according to the judgment program, and judging whether the quotient B1 is larger than the N;
if the quotient B1 is larger than the N, dividing the quotient B1 to obtain a remainder A2 and a quotient B2;
when the nth judgment quotient Bn is smaller than the N according to the judgment program execution, the remainder an+1 and the quotient Bn+1 are confirmed.
5. The short link generation method according to claim 4, wherein the step of acquiring the short code further comprises:
obtaining remainder A1, A2, … and an+1;
and circularly inquiring the remainders A1, A2, … and an+1 according to a search program to confirm a plurality of corner index values M of the encryption comparison tables corresponding to the remainders A1, A2, … and an+1.
6. The short link generation method according to claim 5, wherein the step of acquiring the short code further comprises:
sequentially splicing a plurality of corner mark values M according to the acquisition sequence to obtain a preset character string;
acquiring the quotient Bn+1, and splicing the quotient Bn+1 to the preset character string to obtain a target character string;
and reversely sequencing the target character strings to obtain short codes.
7. The short link generation method according to claim 1, further comprising creating a database before the acquiring the database, wherein the step of creating the database comprises:
selecting a relational database management system;
creating a data table within the relational database management system;
setting up a primary key self-increasing mode for the data table, and generating a first storage sub-table, wherein when the long-link address and the long-link identifier are stored in the data table, the data table is used for automatically generating a short-link ID value and storing the short-link ID value into the first storage sub-table;
creating a second storage sub-table and a third storage sub-table in the data table, wherein the second storage sub-table is used for storing the long-link address, and the third storage sub-table is used for storing the long-link identifier.
8. A data encryption apparatus, comprising:
the first processing module is used for acquiring a long-chain link address;
the encryption module is used for carrying out encryption budget on the long-link address according to a first pre-encryption program to obtain a long-link identifier;
the second acquisition module is used for acquiring a database, and a plurality of target short link addresses are arranged in the database;
the judging module is used for judging whether a target short link address corresponding to the long link identifier exists in the database or not, wherein the target short link address and the long link identifier have a unique corresponding relation;
and the third processing module is used for acquiring the target short link address if the target short link address corresponding to the long link identifier exists in the database, and taking the target short link address as a short link.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of a short link generation method according to claims 1-7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, carries out the steps of a short link generation method according to claims 1-7.
CN202310333906.4A 2023-03-31 2023-03-31 Short-link generation method and device Pending CN116226560A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310333906.4A CN116226560A (en) 2023-03-31 2023-03-31 Short-link generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310333906.4A CN116226560A (en) 2023-03-31 2023-03-31 Short-link generation method and device

Publications (1)

Publication Number Publication Date
CN116226560A true CN116226560A (en) 2023-06-06

Family

ID=86578832

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310333906.4A Pending CN116226560A (en) 2023-03-31 2023-03-31 Short-link generation method and device

Country Status (1)

Country Link
CN (1) CN116226560A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116501997A (en) * 2023-06-28 2023-07-28 太平金融科技服务(上海)有限公司深圳分公司 Short link generation method, device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116501997A (en) * 2023-06-28 2023-07-28 太平金融科技服务(上海)有限公司深圳分公司 Short link generation method, device, electronic equipment and storage medium
CN116501997B (en) * 2023-06-28 2023-09-26 太平金融科技服务(上海)有限公司深圳分公司 Short link generation method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US20210097112A1 (en) Webpage data processing method and device, computer device and computer storage medium
CN111666401B (en) Document recommendation method, device, computer equipment and medium based on graph structure
US20180262491A1 (en) Method, apparatus, and client terminal device for implementing website fingerprint login
CN107612692B (en) Information processing method, device and storage medium
CN116226560A (en) Short-link generation method and device
CN104899499A (en) Internet image search based Web verification code generation method
CN112632139A (en) Information pushing method and device based on PMIS system, computer equipment and medium
CN111369313A (en) Processing method and device for house-ordering failure order, computer equipment and storage medium
CN109040346B (en) Method, device and equipment for screening effective domain names in extensive domain name resolution
CN112307169B (en) Address data matching method and device, computer equipment and storage medium
CN110460685B (en) User unique identifier processing method and device, computer equipment and storage medium
CN112256696A (en) Form data processing method, device, equipment and storage medium
CN115640471A (en) Short link generation method and device, computer equipment and storage medium
US9098174B1 (en) Expanding the functionality of the browser URL box
CN106776657A (en) A kind of domain name search method and equipment
CN114021175B (en) User portrait configuration method and device, computer equipment and medium
CN108363707B (en) Method and device for generating webpage
CN113282849A (en) Similar URL character string recognition method and device, computer equipment and storage medium
CN109460500B (en) Hotspot event discovery method and device, computer equipment and storage medium
JP4885678B2 (en) Content creation apparatus and content creation method
CN116166900A (en) Method and device for accessing long links based on short links
CN107508878B (en) Key name deleting method and device based on cache proxy server
CN107341263B (en) Static page data processing method and device
CN105608122A (en) Method and apparatus for storing electronic form data
CN114257565A (en) Method, system and server for mining domain name with potential threat

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