CN116055143A - Encryption method and device for sharing links - Google Patents

Encryption method and device for sharing links Download PDF

Info

Publication number
CN116055143A
CN116055143A CN202211711512.XA CN202211711512A CN116055143A CN 116055143 A CN116055143 A CN 116055143A CN 202211711512 A CN202211711512 A CN 202211711512A CN 116055143 A CN116055143 A CN 116055143A
Authority
CN
China
Prior art keywords
network link
user equipment
link
network
user
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.)
Withdrawn
Application number
CN202211711512.XA
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.)
Qizhi Technology Co ltd
Original Assignee
Qizhi 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 Qizhi Technology Co ltd filed Critical Qizhi Technology Co ltd
Priority to CN202211711512.XA priority Critical patent/CN116055143A/en
Publication of CN116055143A publication Critical patent/CN116055143A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a method and a device for encrypting a sharing link, which are used for receiving an encryption request sent by first user equipment, wherein the encryption request comprises a first network link to be shared, and the first user equipment is the user equipment to be shared; judging whether a mapping relation between a first network link and a second network link is prestored in a preset database, wherein the second network link is a network link for encrypting the first network link; when the mapping relation between the first network link and the second network link is stored in a preset database, inquiring the second network link corresponding to the first network link in the preset database; and sending the second network link to the first user equipment so that the first user equipment shares the second network link to the second user equipment, wherein the second user equipment is the user equipment for receiving the sharing. By encrypting the URL link address, the security of the URL link address in the transmission process can be ensured.

Description

Encryption method and device for sharing links
Technical Field
The present disclosure relates to the field of network security technologies, and in particular, to a method and an apparatus for encrypting a shared link.
Background
With the advent of the internet era, the information resources of the internet are increasingly spread, and the problem that people are more willing to conveniently and rapidly access the resources which the people want to access, how to reduce the cost of acquiring the information resources, has become the internet service provider to solve is faced.
In order to reduce the cost of people obtaining information resources, information resource sharing can be adopted. When the resource is shared, the user firstly copies the URL link address of the resource to be shared, the URL link address is an entrance of the Web application, and then the generated URL link address is sent to the shared user, so that the cost of acquiring the information resource can be reduced by a sharing mode. However, in the URL link address, since the URL link address is not encrypted, the URL link address itself contains some sensitive information, and an attacker may attack the URL link address, so that the security problem of the URL link address cannot be guaranteed in the transmission process.
Therefore, there is a need for a method and apparatus for encrypting a shared link that can solve the above-mentioned problems.
Disclosure of Invention
Aiming at the defects in the related art, the application provides a sharing link encryption method and device.
The first aspect of the present application provides an encryption method for a sharing link, which is applied to a server, and receives an encryption request sent by a first user equipment, where the encryption request includes a first network link to be shared, and the first user equipment is the user equipment to be shared; judging whether a mapping relation between a first network link and a second network link is prestored in a preset database, wherein the second network link is a network link for encrypting the first network link; when the mapping relation between the first network link and the second network link is stored in a preset database, inquiring the second network link corresponding to the first network link in the preset database; and sending the second network link to the first user equipment so that the first user equipment shares the second network link to the second user equipment, wherein the second user equipment is the user equipment for receiving the sharing.
By adopting the technical scheme, the server encrypts the network link to be transmitted by the user equipment according to the encryption request transmitted by the user equipment, the obtained mapping relation is stored in the preset database, the encrypted network link is transmitted to the user equipment, and the user equipment can share the encrypted network link conveniently.
The second aspect of the present application provides an encryption device for sharing a link, where the device is a server, and the server includes a receiving unit, a processing unit, and a first sending unit; the receiving unit is used for receiving an encryption request sent by first user equipment, wherein the encryption request comprises a first network link to be shared; the first user equipment is user equipment to be shared; the processing unit judges whether a mapping relation between the first network link and the second network link is prestored in a preset database, and the second network link is a network link for encrypting the first network link; when the mapping relation between the first network link and the second network link is stored in a preset database, inquiring the second network link corresponding to the first network link in the preset database; and the first unit is used for sending the second network link to the first user equipment so that the first user equipment can share the second network link to the second user equipment, and the second user equipment is used for receiving the shared user equipment.
By adopting the technical scheme, the network link to be sent by the first user equipment is encrypted according to the encryption request sent by the first user equipment, the mapping relation obtained after encryption is stored in the preset database, the network link obtained after encryption is sent to the second user equipment, the second user equipment can share the encrypted network link conveniently, and the security of the network link in the transmission process can be ensured due to the fact that the network link is encrypted.
Optionally, when the mapping relation between the first network link and the second network link is not stored in the preset database, the processing unit acquires the first network link and establishes the mapping relation between the first network link and the second network link; and storing the mapping relation in a preset database.
By adopting the technical scheme, when the mapping relation between the first network link and the second network link is not stored in the preset database, the mapping relation between the first network link and the second network link is reestablished, so that other user equipment can access the website corresponding to the first network link through the mapping relation between the second network link and the first network link.
Optionally, the receiving unit acquires the first key and the first network link, and the processing unit splices the first network link and the first key to obtain a first result; the first key is any randomly generated key; carrying out hash operation on the first result to obtain a second result; splicing the second result with the first network link to obtain a third result; the receiving unit acquires the second secret key, and the processing unit carries out AES encryption on the third result and the second secret key to obtain a fourth result; the second key is any randomly generated key; and obtaining a second network link according to the fourth result, and establishing a mapping relation between the first network link and the second network link.
By adopting the technical scheme, the first network link is changed from the previous long link to the short link of the second network link, the second network link is restored to the first network link with great difficulty, the restoration process is very complex, the first network link can be obtained only through the mapping relation, the change process is irreversible with great probability, the transmission flow is saved by using the short link, and the method is suitable for mobile internet application.
Optionally, the processing unit performs index encoding on the fourth result to obtain the second network link.
By adopting the technical scheme, the special characters in the fourth result are converted into common characters, so that the user can find conveniently.
Optionally, the receiving unit receives an access request sent by the second user equipment, where the access request includes a second network link; the processing unit queries a first network link corresponding to the second network link in a preset database; the transmitting first unit transmits the first network link to the second user equipment so that the second user equipment accesses the first network link.
By adopting the technical scheme, the second user equipment sends the encrypted network link according to the first user equipment, the server receives the access request of the second user equipment, queries the unencrypted network link corresponding to the encrypted network link in the preset database, ensures the safety of the network link in the transmission process, and facilitates the second user equipment to access the website shared by the first user equipment.
A third aspect of the present application provides an electronic device comprising a processor, a memory for storing instructions, a user interface and a network interface for communicating to other devices, the processor being configured to execute the instructions stored in the memory, such that an electronic device performs a method according to any one of the first aspects of the present application.
A fourth aspect of the present application provides a computer readable storage medium having instructions stored thereon which, when executed, perform a method according to any one of the first aspects of the present application.
The fifth aspect of the present application provides an encryption method for a shared link, applied to a first user device, where the encryption operation is responded to a user, and the encryption operation includes a third network link to be shared; judging whether a mapping relation between a third network link and a fourth network link is prestored in a preset link library, wherein the fourth network link is a network link for encrypting the third network link; when the mapping relation between the third network link and the fourth network link is stored in the preset link library, inquiring the fourth network link corresponding to the third network link in the preset link library; and responding to the sharing operation of the user, and sending the fourth network link to the third user equipment so as to facilitate the third user equipment to access the fourth network link.
By adopting the technical scheme, the first user equipment encrypts the network link according to the encryption operation of the user, the obtained mapping relation is stored in the preset link library, and the encrypted network link is sent to the third user equipment according to the sharing operation of the user, so that the third user equipment can conveniently access the network link, and the security of the network link in the transmission process can be ensured due to the encryption of the network link.
Optionally, acquiring a third key and a third network link, and splicing the third network link and the third key to obtain a fifth result; the third key is any randomly generated key; carrying out hash operation on the fifth result to obtain a sixth result; splicing the sixth result with the third network link to obtain a seventh result; obtaining a fourth key, and performing AES encryption on the seventh result and the fourth key to obtain an eighth result; the fourth key is any randomly generated key; and obtaining a fourth network link according to the eighth result, and establishing a mapping relation between the third network link and the fourth network link.
By adopting the technical scheme, the third network link is changed from the previous long link to the short link of the fourth network link, the fourth network link is restored to the third network link with great difficulty, the restoring process is very complex, the third network link can be obtained only through the mapping relation, the changing process is irreversible with great probability, the transmission flow is saved by using the short link, and the method is suitable for mobile internet application.
Optionally, index encoding is performed on the eighth result to obtain a fourth network link.
By adopting the technical scheme, the special characters in the eighth result are converted into common characters, so that the user can find conveniently.
Optionally, in response to an access request sent by the third user equipment, the access request includes a fourth network link; inquiring a third network link corresponding to the fourth network link in a preset link library; the fourth network link is sent to the third user device for the third user device to access the third network link.
By adopting the technical scheme, the third user equipment sends the encrypted network link according to the first user equipment, and the unencrypted network link corresponding to the encrypted network link is inquired in the preset link library in response to the access request of the third user equipment, so that the safety of the network link in the transmission process is ensured, and the third user equipment can conveniently access the website shared by the first user equipment.
The sixth aspect of the present application provides an encryption device for sharing a link, where the device is a first user equipment, and the first user equipment includes an obtaining unit, a judging unit, and a second sending unit; the acquisition unit is used for responding to encryption operation of a user, wherein the encryption operation comprises a third network link to be shared; the judging unit is used for judging whether the mapping relation between the third network link and the fourth network link is prestored in the preset link library, and the fourth network link is a network link for encrypting the third network link; when the mapping relation between the third network link and the fourth network link is stored in the preset link library, inquiring the fourth network link corresponding to the third network link in the preset link library; and the second unit is used for responding to the sharing operation of the user and sending the fourth network link to the third user equipment so as to facilitate the third user equipment to access the fourth network link.
By adopting the technical scheme, the first user equipment encrypts the network link according to the encryption operation of the user, the obtained mapping relation is stored in the preset link library, and the encrypted network link is sent to other third user equipment according to the sharing operation of the user, so that the third user equipment can conveniently access the network link, and the security of the network link in the transmission process can be ensured due to the encryption of the network link.
Optionally, when the mapping relation between the third network link and the fourth network link is not stored in the preset link library, the judging unit responds to the third network link sent by the user to establish the mapping relation between the third network link and the fourth network link; and storing the mapping relation in a preset link library.
By adopting the technical scheme, when the mapping relation between the third network link and the fourth network link is not stored in the preset link library, the mapping relation between the third network link and the fourth network link is reestablished, so that other user equipment can access the website corresponding to the third network link through the mapping relation between the third network link and the fourth network link.
Optionally, the obtaining unit obtains the third key and the third network link, and the judging unit splices the third network link and the third key to obtain a fifth result; the third key is any randomly generated key; carrying out hash operation on the fifth result to obtain a sixth result; splicing the sixth result with the third network link to obtain a seventh result; the receiving unit acquires the fourth key, and the processing unit carries out AES encryption on the seventh result and the fourth key to obtain an eighth result; the fourth key is any randomly generated key; and obtaining a fourth network link according to the eighth result, and establishing a mapping relation between the third network link and the fourth network link.
By adopting the technical scheme, the third network link is changed from the previous long link to the short link of the fourth network link, the fourth network link is restored to the third network link with great difficulty, the restoring process is very complex, the third network link can be obtained only through the mapping relation, the changing process is irreversible with great probability, the transmission flow is saved by using the short link, and the method is suitable for mobile internet application.
Optionally, the judging unit performs index coding on the eighth result to obtain a fourth network link.
By adopting the technical scheme, the special characters in the eighth result are mainly converted into common characters, so that the user can find conveniently.
Optionally, the obtaining unit responds to an access request sent by the third user equipment, and the access request includes a fourth network link; in a preset link library, the judging unit inquires a third network link corresponding to a fourth network link; the transmitting second unit transmits the fourth network link to the third user device for the third user device to access the third network link.
By adopting the technical scheme, the third user equipment sends the encrypted network link according to the first user equipment, and the unencrypted network link corresponding to the encrypted network link is inquired in the preset link library in response to the access request of the third user equipment, so that the safety of the network link in the transmission process is ensured, and the third user equipment can conveniently access the website shared by the first user equipment.
A seventh aspect of the present application provides an electronic device comprising a processor, a memory, a user interface and a network interface, the memory being for storing instructions, the user interface and the network interface being for communicating to other devices, the processor being for executing the instructions stored in the memory, such that an electronic device performs the method according to any of the fifth aspects of the present application.
An eighth aspect of the present application provides a computer readable storage medium storing instructions that, when executed, perform a method according to any one of the fifth aspects of the present application.
Compared with the prior art, the beneficial effects of this application are: the server encrypts a network link to be sent by the user equipment according to an encryption request sent by the first user equipment, and the obtained mapping relation is stored in a preset database; the encrypted network link is sent to the first user equipment, so that the first user equipment can share the encrypted network link; because the network link is encrypted, the original network link is changed from a long link to an encrypted network link short link, the difficulty of restoring the encrypted network link to the original network link is high, the restoring process is very complex, the original network link can be obtained only through a mapping relation, the changing process is irreversible with high probability, the transmission flow is saved by using the short link, and the method is suitable for mobile Internet application and can ensure the safety of the network link in the transmission process. The first user equipment encrypts the network link according to the encryption operation of the user, the obtained mapping relation is stored in a preset link library, and the encrypted network link is sent to the third user equipment according to the sharing operation of the user, so that the third user equipment can conveniently access the network link; because the network link is encrypted, the original network link is changed from a long link to an encrypted network link short link, the difficulty of restoring the encrypted network link to the original network link is high, the restoring process is very complex, the original network link can be obtained only through a mapping relation, the changing process is irreversible with high probability, the transmission flow is saved by using the short link, and the method is suitable for mobile Internet application and can ensure the safety of the network link in the transmission process.
Drawings
FIG. 1 is a schematic flow chart of a method for encrypting a shared link according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a second flow of an encryption method for sharing links according to an embodiment of the present application;
FIG. 3 is a third flow chart of an encryption method for sharing links according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a first structure of an encryption device for sharing links according to an embodiment of the present application;
fig. 5 is a first schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 6 is a fourth flowchart of an encryption method for sharing links according to an embodiment of the present disclosure;
fig. 7 is a fifth flowchart of an encryption method for sharing links according to an embodiment of the present application;
fig. 8 is a second schematic structural diagram of an encryption device for sharing links according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Reference numerals: 401. a receiving unit; 402. a processing unit; 403. transmitting the first unit; 801. an acquisition unit; 802. a judging unit; 803. the second unit is sent.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In the description of embodiments of the present application, words such as "exemplary," "such as" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "illustrative," "such as" or "for example" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "illustratively," "such as" or "for example," etc., is intended to present related concepts in a concrete fashion.
Furthermore, the terms "first," "second," and the like in the description herein, are used for distinguishing between different objects and not for describing a particular sequence, and may be used for either explicitly or implicitly including one or more such features.
Before describing embodiments of the present application, some terms referred to in the embodiments of the present application will be first defined and described.
URL: the Chinese name Uniform resource locator is a concise representation of the location and access method of resources available on the Internet, and is the address of standard resources on the Internet. Each file on the internet has a unique URL that contains information indicating the location of the file and how the browser should handle it.
MD5: a widely used cryptographic hash function, called MD5 Message-Digest Algorithm, can generate a 128-bit (16-byte) hash value to ensure that the information transfer is complete and consistent. The digest algorithm is also called a hash algorithm or a hash algorithm. MD5 is a message digest encryption algorithm. It converts data of arbitrary length into a character string of fixed length by a fixed function.
Index encoding: base64 is an index code, one for each character.
AES encryption: the AES encryption algorithm is known as Advanced Encryption Standard (advanced encryption standard) and is one of the most common symmetric encryption algorithms. The basic requirement of AES is that with symmetric block cipher systems, the key length can be 128, 192 or 256 bits, the block length 128 bits, the algorithm should be easy to implement on various hardware and software.
Hash function: it is a mathematical equation that can use text (e.g., email messages) to generate a code called an abstract of information. Well known hash functions are: MD4, MD5, SHS. Hash operations accept an unlimited length input (input) and return a fixed length output (output).
In the present specification, the preset database and the preset link library refer to the memory mapping relationship, and only different writing methods are used for distinguishing.
With the advent of the internet era, the information resources of the internet are increasingly spread, and the problem that people are more willing to conveniently and rapidly access the resources which the people want to access, how to reduce the cost of acquiring the information resources, has become the internet service provider to solve is faced.
In order to reduce the cost of people obtaining information resources, information resource sharing can be adopted. When the resource is shared, the user firstly copies the URL link address of the resource to be shared, the URL link address is an entrance of the Web application, and then the generated URL link address is sent to the shared user, so that the cost of acquiring the information resource can be reduced by a sharing mode. However, in the URL link address, since the URL link address is not encrypted, the URL link address itself contains some sensitive information, and an attacker may attack the URL link address, so that the security problem of the URL link address cannot be guaranteed in the transmission process.
In order to ensure the security of the URL link address during transmission. The application provides an encryption method of a shared link, which is applied to a server. FIG. 1 is a schematic flow chart of a method for encrypting a shared link according to an embodiment of the present application; referring to fig. 1, the method includes the following steps S101-S104.
Step S101: and receiving an encryption request sent by first user equipment, wherein the encryption request comprises a first network link to be shared, and the first user equipment is the user equipment to be shared.
In the above steps, a user corresponding to the first user equipment needs to share a network link of a certain page in the website based on own requirements, and the user sends the network link to the server by using the first user equipment to request the server to encrypt the network link; the server receives an encryption request sent by first user equipment, wherein the first user equipment comprises mobile phones, computers, tablets and other electronic equipment.
For example, when browsing a website, the user a finds that an article is good in the website and wants to share the article with friends, in order to ensure the security of the network link in the transmission process, the user a sends an encryption request to a server through a first user device, the encryption request includes a first network link corresponding to the article in the website, and the server receives the encryption request sent by the first user device and processes the first network link. The content specifically shared by the user is not limited herein, but is merely exemplary and is not further illustrated.
Step S102: and judging whether a mapping relation between the first network link and the second network link is prestored in a preset database, wherein the second network link is a network link for encrypting the first network link.
In the above step, the preset database is used for storing the mapping relation between the original network link and the encrypted network link, the original network link represents the network link address initially set by a certain page in the website, and the original network link is the first network link; the encrypted network link represents a network link address obtained by encrypting the original network link, and the encrypted network link is the second network link.
For example, the server obtains the first network link, and determines whether a mapping relationship between the first network link and the second network link is stored in the preset database in advance.
Step S103: when the mapping relation between the first network link and the second network link is stored in the preset database, inquiring the second network link corresponding to the first network link in the preset database.
In the above step, the server confirms that the preset database stores the mapping relationship between the first network link and the second network link; and inquiring a second network link corresponding to the first network link according to the mapping relation in a preset database. The mapping relationship means that after the first network link and the second network link are bound, the server can obtain the second network link through the first network link, and the server can also obtain the first network link through the second network link.
For example, the user a sends an encryption request to the server through the user device, the server confirms that the mapping relationship between the first network link and the second network link is stored in the preset database, and the server queries the second network link bound to the first network link.
Further, when the server confirms that the mapping relationship between the first network link and the second network link is not stored in the preset database, the server needs to reestablish the mapping relationship, acquire the first network link, establish the mapping relationship between the first network link and the second network link, and store the mapping relationship in the preset database.
For example, the user G sends an encryption request to the server through the user device, the server confirms that the mapping relationship between the first network link and the second network link is not stored in the preset database, the server obtains the first network link, establishes the mapping relationship between the first network link and the second network link, and stores the mapping relationship in the preset database.
Step S104: and sending the second network link to the first user equipment so that the first user equipment shares the second network link to the second user equipment, wherein the second user equipment is the user equipment for receiving the sharing.
In the step, the server inquires that the mapping relation between the first network link and the second network link exists in a preset database, and the server completes a first network link encryption request sent by the first user equipment; the server sends a second network link corresponding to the first network link to the first user equipment according to the mapping relation, the first user equipment can share the second network link with the second user equipment according to the self demand, and the second user equipment is user equipment such as friends, colleagues or relatives of the first user equipment. By adopting the method, the security of the network link in the transmission process can be ensured due to the encryption of the network link.
For example, a user S needs to share a certain website content to a user D, in order to ensure the security of the website content in the transmission process, the user S sends an encryption request to a server through a first user device by using a first network link corresponding to the website content, and the server processes the first network link according to the encryption request; binding the encrypted second network link with the first network link, wherein a mapping relation exists between the first network link and the second network link, the server sends the second network link to the first user equipment, the user S sends the second network link to the second user equipment through the first user equipment, and the person corresponding to the second user equipment is user D.
In one possible embodiment, how to establish the mapping relationship between the first network link and the second network link is described in fig. 2, and fig. 2 is a second flow diagram of an encryption method for sharing links according to the embodiment of the present application, where the method includes the following steps 201 to 205.
Step 201: and acquiring the first key and the first network link, and splicing the first network link and the first key to obtain a first result.
In the above step, the first key is any one randomly generated key; the first result is that the first network link and the first key are spliced according to a specified sequence. The length of the first network link may be 16384 characters, so that the length of the first network link cannot exceed 2038 characters for the convenience of user browsing, so that the length of the characters corresponding to the first network link is longer, and the specific order is mainly based on the data condition, which is not limited herein.
For example, the first network link is xxxxxx, the first key is yyyyy, and the first network link is spliced with the first key to obtain a first result D1, so d1=s1+key1, S1 represents the first network link, key1 represents the first key, and +represents the string splicing operator. The length of the specific first network link is mainly the actual situation, and the length of the specific first key is mainly the actual situation, which is only illustrated here.
Step 202: and carrying out hash operation on the first result to obtain a second result.
In the above steps, the first result is obtained by splicing the first network link and the first key, so that the length of the first result is greater than the original character length of the first network link, hash operation is performed on the first result, and the input of a character string with unlimited length is returned to the output of a character string with fixed length. The hash operation here refers to performing MD5 calculation, MD5 being a well-known hash function, and calculating a checksum of MD5 of the first result.
For example, the first result is D1, and there are 1500 characters in D1, the MD5 checksum of the first result is calculated, 20 characters in D2 are obtained, and 1500 characters in the first result are output with a fixed length.
Step 203: and splicing the second result and the first network link to obtain a third result.
In the above step, the second result is obtained by performing hash operation on the first result, and the second result is spliced with the first network link to obtain a third result.
For example, the number of characters of the second result D2 is fixed, the number of characters of the first network link cannot exceed 2038, the second result is spliced with the first network link, and a third result D3 is obtained, where the third result D3 is more than the characters of the first network link.
Step 204: and obtaining the second key, and performing AES encryption on the third result and the second key to obtain a fourth result.
In the step, the second secret key is any randomly generated secret key, and the third result is obtained by splicing the second result and the first network link; and carrying out AES encryption on the second key and the third result to obtain a fourth result, wherein the AES encryption also returns an input with an unlimited length to a fixed length for output.
For example, the third result has more than 2000 characters, the second key is kkkkkkkk, and AES encrypting the third result with the second key results in a fourth result, which is a fixed character. The number of specific characters is mainly actual, and is not limited here.
Step 205: and obtaining a second network link according to the fourth result, and establishing a mapping relation between the first network link and the second network link.
In the above step, when the fourth result is the second network link, a mapping relationship between the first network link and the second network link is established; since the fourth result is obtained by AES encrypting the third result with the second key, the fourth result contains complex and special characters such as a wave number, an exclamation mark, a dash, a comma, a percentile, and the like. In order to facilitate the second network link to be more convenient to propagate in the network, the fourth result is subjected to index coding, and the second network link obtained after coding is common characters, such as case English letters and numbers. For example, when the predetermined length of the character string of the second network link is 6, 26 uppercase or lowercase english letters are used, and the number of the second network links to the power of 6 is about 568 billions. The second network link may be generated as a combination of 26 uppercase english letters and lowercase english letters, and 10 digits. When an attacker wants to acquire the second network link, it takes a long time and cost to try to acquire the second network link one by one. After the second network link is acquired, the second network link is checked in a server storing the first network link, otherwise, the first network link corresponding to the second network link cannot be checked. The preset length is mainly the actual situation, and is not limited here.
For example, the fourth result has a predetermined character length of 6, fourth result setting is/-is, and carrying out index coding on the fourth result to obtain an aFLt2w, namely, the aFLt2w is a second network link.
Further, in the above steps, the step S204 and the step S202 may be exchanged, and the preset length of the fourth result obtained after the exchange is 20, and since the fourth result is obtained by AES encrypting the third result and the second key, the fourth result includes some complex and special characters, such as a wave number, an exclamation mark, a dash, a comma, a percentile, and the like. In order to facilitate the second network link to be more convenient in network propagation, the fourth result is index coded, and the second network link is obtained after coding. The specific preset length is mainly the actual situation and is not limited here.
By adopting the method, the length of the original network link address content can be shortened by only a few characters, the length is very short, and the transmission and the sharing between the user equipment are convenient. And the advantage of short network link is that save the flow, suitable for mobile internet application.
In a possible embodiment, how the second user equipment receives the second network link sent by the first user equipment and accesses the second network link is shown in fig. 3, and fig. 3 is a third flow diagram of a method for encrypting a shared link according to an embodiment of the present application, where the method includes the following steps 301 to 303.
Step S301: and receiving an access request sent by the second user equipment, wherein the access request comprises a second network link.
In the above steps, the first user equipment sends the second network link to the second user equipment through the third party platform, the second user equipment receives the second network link sent by the first user equipment, the user sends an access request of the second network link to the server through the second user equipment, and the server receives the access request of the second user equipment for sending the second network link.
Step S302: and inquiring a first network link corresponding to the second network link in a preset database.
In the above step, after receiving the second network link, the server queries the first network link corresponding to the second network link in the preset database according to the mapping relationship.
For example, the user K receives the second network link sent by the user W, the user K sends an access request of the second network link to the server through the second user device, the server receives the access request of the second network link, and queries the first network link corresponding to the second network link in the preset database.
Step S303: the first network link is sent to the second user device for the second user device to access the first network link.
In the above steps, after the server queries the first network link corresponding to the second network link, the server sends the first network link to the second user equipment, and the second user equipment accesses the website or other shared by the first user equipment by using the first network link.
For example, the second user device receives the first network link sent by the server, and queries the website corresponding to the first network link on the corresponding server, so that the user can check the website conveniently.
In a possible embodiment, the server receives a second encryption request sent by the first user equipment, where the second encryption request includes a fifth network link and a fourth user equipment identifier, and the fourth user equipment identifier refers to a unique identifier of the user, where the identifiers correspond to different situations; such as a website, a registered user name or account number, i.e., a logo; for example, bluetooth sharing, a user equipment name to be shared is input, and the user equipment name is an identifier; for example, a WeChat, namely a logo; the fourth user equipment is the user equipment to receive the share. The server establishes a mapping relation between a fifth network link and a sixth network link, and then stores the mapping relation in a preset database, wherein the sixth network link encrypts the fifth network link; and the server shares the sixth network link to the corresponding user equipment according to the fourth user identification, so that the fourth user equipment can conveniently access the sixth network link.
In one possible embodiment, the preset database comprises a relational database and a non-relational database, wherein the relational database comprises MySQL; KV database Memcache, REDIS, etc. The databases such as MySQL and MongoDB can establish unique indexes, have persistence capability, completely meet the requirement of CACHE-SYSTEM caching, and have the unique defect of inferior performance as KV databases. Memcache belongs to a pure memory database, does not have persistence capability, is based on memory and has the fastest speed, but cannot meet the uniqueness requirement of CACHE-SYSTEM, and needs to be modified. The system uses REDI to cache one copy, and the database also stores one copy. The CACHE-SYSTEM CACHE supports three operations, namely, storing the mapping relation between the first network link and the second network link, acquiring the mapped second network link according to the first network link, and acquiring the mapped first network link according to the second network link.
By adopting the method, the server encrypts the network link to be transmitted by the user equipment according to the encryption request transmitted by the first user equipment, and the obtained mapping relation is stored in a preset database; the encrypted network link is sent to the first user equipment, so that the first user equipment can share the encrypted network link; because the network link is encrypted, the original network link is changed from a long link to an encrypted network link short link, the difficulty of restoring the encrypted network link to the original network link is high, the restoring process is very complex, the original network link can be obtained only through a mapping relation, the changing process is irreversible with high probability, the transmission flow is saved by using the short link, and the method is suitable for mobile internet application and can ensure the safety of the network link in the transmission process.
The embodiment of the present application further provides a shared link encryption device, and fig. 4 is a schematic first structural diagram of the shared link encryption device provided in the embodiment of the present application, and referring to fig. 4, a server includes a receiving unit 401, a processing unit 402, and a first sending unit 403.
A receiving unit 401, configured to receive an encryption request sent by a first user equipment, where the encryption request includes a first network link to be shared; the first user equipment is user equipment to be shared.
The processing unit 402 is configured to determine whether a mapping relationship between the first network link and the second network link is stored in advance in a preset database, where the second network link is a network link that is encrypted by the first network link; when the mapping relation between the first network link and the second network link is stored in the preset database, inquiring the second network link corresponding to the first network link in the preset database.
The sending first unit 403 sends the second network link to the first user equipment, so that the first user equipment shares the second network link to the second user equipment, where the second user equipment is the user equipment receiving the sharing.
In a possible embodiment, when the mapping relationship between the first network link and the second network link is not stored in the preset database, the processing unit 402 obtains the first network link and establishes the mapping relationship between the first network link and the second network link; and storing the mapping relation in a preset database.
In a possible embodiment, the receiving unit 401 obtains the first key and the first network link, and the processing unit 402 splices the first network link and the first key to obtain a first result; the first key is any randomly generated key; carrying out hash operation on the first result to obtain a second result; splicing the second result with the first network link to obtain a third result; the receiving unit acquires the second secret key, and the processing unit carries out AES encryption on the third result and the second secret key to obtain a fourth result; the second key is any randomly generated key; and obtaining a second network link according to the fourth result, and establishing a mapping relation between the first network link and the second network link.
In one possible embodiment, the processing unit 402 index codes the fourth result to obtain the second network link.
In a possible embodiment, the receiving unit 401 receives an access request sent by the second user equipment, where the access request includes the second network link; the processing unit 402 queries a first network link corresponding to the second network link in a preset database; the transmitting first unit 403 transmits the first network link to the second user equipment so that the second user equipment accesses the first network link.
It should be noted that: in the device provided in the above embodiment, when implementing the functions thereof, only the division of the above functional modules is used as an example, in practical application, the above functional allocation may be implemented by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the embodiments of the apparatus and the method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the embodiments of the method are detailed in the method embodiments, which are not repeated herein.
Referring to fig. 5, fig. 5 is a schematic diagram of a first structure of an electronic device according to an embodiment of the present application. As shown in fig. 5, the electronic device 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, at least one communication bus 502.
Wherein a communication bus 502 is used to enable connected communications between these components.
The user interface 503 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 503 may further include a standard wired interface and a standard wireless interface.
The network interface 504 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 501 may include one or more processing cores. The processor 501 connects various parts throughout the server using various interfaces and lines, performs various functions of the server and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 505, and invoking data stored in the memory 505. Alternatively, the processor 501 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 501 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application request and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 501 and may be implemented by a single chip.
The Memory 505 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 505 comprises a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 505 may be used to store instructions, programs, code sets, or instruction sets. The memory 505 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described various method embodiments, etc.; the storage data area may store data or the like involved in the above respective method embodiments. The memory 505 may also optionally be at least one storage device located remotely from the processor 501.
As shown in FIG. 5, an operating system, a network communication module, a user interface module, and an encrypted application sharing a link may be included in memory 505, which is a type of computer storage medium.
In the electronic device 500 shown in fig. 5, the user interface 503 is mainly used for providing an input interface for a user, and acquiring data input by the user; and the processor 501 may be configured to invoke the encrypted application in the memory 505 that stores the shared link, which when executed by the one or more processors 501, causes the electronic device 500 to perform the method as in one or more of the embodiments described above.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided herein, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, such as a division of units, merely a division of logic functions, and there may be additional divisions in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some service interface, device or unit indirect coupling or communication connection, electrical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned memory includes: various media capable of storing program codes, such as a U disk, a mobile hard disk, a magnetic disk or an optical disk.
The above are merely exemplary embodiments of the present disclosure and are not intended to limit the scope of the present disclosure. That is, equivalent changes and modifications are contemplated by the teachings of this disclosure, which fall within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains.
In the above method, the encryption process of the network link is completed by the server, and the encryption process of the network link is completed and discussed below by the user equipment.
The application also provides an encryption method of the sharing link, which is applied to the first user equipment, and takes a webpage of the sharing website as an example, and at the moment, the first user equipment is electronic equipment such as a mobile phone, a computer, a tablet and the like used for a user. FIG. 6 is a fourth flowchart of an encryption method for sharing links according to an embodiment of the present disclosure; referring to fig. 6, the method includes the following steps S601 to S604.
Step S601: in response to an encryption operation by the user, the encryption operation includes a third network link to be shared.
In the above step, when the user browses a certain website page, the user wants to share the content of one page of the website to other users, the user copies the network link corresponding to the website, and the first user device processes the third network link according to the encryption operation of the user.
For example, when the user L browses the website, it finds that the content of one page in the website is related to the experiment studied by the user H during the time period, and the user L copies the network link of the page of the website on the first user device, and the first user device uploads the network link to the server for encryption based on the operation of the user, and the first user device processes the network link.
Step S602: and judging whether a mapping relation between the third network link and a fourth network link is prestored in a preset link library, wherein the fourth network link is a network link for encrypting the third network link.
In the above step, the preset link library stores a mapping relationship between an original network link and an encrypted network link, where the original network link represents a network link address initially set by a page in the website, and the original network link is a third network link; the encrypted network link represents a network link address obtained by encrypting the original network link, and the encrypted network link is a fourth network link.
For example, the first user equipment determines whether to pre-store the mapping relationship between the third network link and the fourth network link in the preset link library according to the third network link sent by the user.
Step S603: when the mapping relation between the third network link and the fourth network link is stored in the preset link library, inquiring the fourth network link corresponding to the third network link in the preset link library.
In the above step, the first user equipment confirms that the preset link library stores the mapping relation between the third network link and the fourth network link; and inquiring a fourth network link corresponding to the third network link according to the mapping relation in a preset link library. The mapping relationship means that after the third network link and the fourth network link are bound, the first user equipment can obtain the fourth network link through the third network link, and the server can also obtain the third network link through the fourth network link.
For example, based on the encryption operation of the user T on the third network link, the first user device confirms that the mapping relationship between the third network link and the fourth network link is stored in the preset link library, and queries the fourth network link bound with the third network link.
Further, when the mapping relation between the third network link and the fourth network link is not stored in the preset link library, the mapping relation between the third network link and the fourth network link is established in response to the third network link sent by the user; and storing the mapping relation in a preset link library.
The first user equipment, for example, based on the encryption operation of the user W on the third network link, confirms that the mapping relationship between the third network link and the fourth network link is not stored in the preset link library, establishes the mapping relationship between the third network link and the fourth network link based on the third network link sent by the user, and stores the mapping relationship in the preset link library.
Step S604: and responding to the sharing operation of the user, and sending the fourth network link to the third user equipment so as to facilitate the third user equipment to access the fourth network link.
In the above steps, the first user equipment queries that the mapping relation between the third network link and the fourth network link exists in the preset link library, and the first user equipment completes the encryption operation of the user; the first user equipment sends the fourth network link to the third user equipment according to the sharing operation of the user, so that the user corresponding to the third user equipment can access the fourth network link. By adopting the method, the security of the network link in the transmission process can be ensured due to the encryption of the network link.
For example, a user K needs to share a certain website content to a user J, in order to ensure the security of the website content in the transmission process, the user K copies a third network link corresponding to the website content, and sends an encryption operation to the first user device according to the operation of the user K; the first user equipment processes the third network link according to encryption operation, binds the encrypted fourth network link with the third network link, wherein the third network link and the fourth network link are in a mapping relation, and the first user equipment sends the fourth network link to a person J corresponding to the third user equipment according to sharing operation of a user.
In one possible embodiment, how to establish the mapping relationship between the third network link and the fourth network link is shown in fig. 7, and fig. 7 is a fifth flowchart of an encryption method for sharing links according to the embodiment of the present application, where the method includes the following steps 701 to 705.
Step 701: and acquiring the third key and the third network link, and splicing the third network link and the third key to obtain a fifth result.
In the above step, the third key is any one randomly generated key; the fifth result is that the third network link and the third key are spliced according to the specified sequence. The length of the third network link may be 16384 characters, so that the length of the third network link cannot exceed 2038 characters for the convenience of user browsing, so that the length of the characters corresponding to the third network link is longer, and the specific order is mainly based on the data condition, which is not limited herein.
For example, the third network link is yyyyyx, the third key is xxxxx, and the third network link is spliced with the third key to obtain a fifth result D5, so d5=s3+key3, S3 represents the third network link, key3 represents the third key, and +represents the string splicing operator. The length of the specific third network link is mainly the actual situation, and the length of the specific third key is mainly the actual situation, which is only exemplified here.
Step 702: and carrying out hash operation on the fifth result to obtain a sixth result.
In the above step, the fifth result is obtained by splicing the third network link and the third key, so that the length of the fifth result is longer than the original character length of the third network link, and the hash operation is performed on the fifth result, namely, the input of a character string with unlimited length is returned to the output of a character string with fixed length. The hash operation here refers to performing an MD5 calculation, where MD5 is a well-known hash function, and calculating an MD5 checksum of the first result.
For example, the fifth result is that there are 1450 characters in total in D5 and D5, the MD5 checksum of the fifth result is calculated to obtain 20 characters in total in the sixth result D6 and D6, and 1450 characters in the first result are output with a fixed length.
Step 703: and splicing the sixth result with the third network link to obtain a seventh result.
In the step, the sixth result is obtained by performing hash operation on the fifth result, and the sixth result is spliced with the third network link to obtain a seventh result.
For example, the number of characters of the sixth result D6 is fixed, the number of characters of the third network link cannot exceed 2038, and the sixth result is spliced with the third network link to obtain a seventh result D7, where the seventh result D7 is more than the characters of the third network link.
Step 704: and obtaining a fourth key, and performing AES encryption on the seventh result and the fourth key to obtain an eighth result.
In the step, the fourth secret key is any randomly generated secret key, and the seventh result is obtained by splicing the sixth result with the third network link; and carrying out AES encryption on the fourth key and the seventh result to obtain an eighth result, wherein the AES encryption also returns an input with an unlimited length to a fixed length for output.
For example, the seventh result has 1850 characters, the second key is llll, and AES encrypting the seventh result with the fourth key results in an eighth result, the eighth result being a fixed character. The number of specific characters is mainly actual, and is not limited here.
Step 705: and obtaining a fourth network link according to the eighth result, and establishing a mapping relation between the third network link and the fourth network link.
In the above step, when the eighth result is the fourth network link, a mapping relationship between the third network link and the fourth network link is established; since the eighth result is obtained by AES encrypting the seventh result and the fourth key, the eighth result includes complex and special characters such as a wave number, an exclamation mark, a dash, a comma, a percentile, and the like. In order to facilitate the fourth network link to be more convenient to propagate in the network, the eighth result is subjected to index coding, and the fourth network link obtained after coding is common characters, such as English letters and numbers with the upper and lower cases. For example, when the predetermined length of the character string of the fourth network link is 6, 26 uppercase or lowercase english letters are used, and the number of the fourth network link is about 568 billions to the power of 26 of 6. The fourth network link may be generated as a combination of 26 uppercase english letters and lowercase english letters, and 10 digits. When an attacker wants to acquire the fourth network link, it takes a long time and cost to try to acquire the fourth network link one by one. After the fourth network link is acquired, the server storing the third network link is required to check, otherwise, the third network link corresponding to the fourth network link cannot be checked. The preset length is mainly the actual situation, and is not limited here.
For example, the preset character length of the eighth result is 6, the fourth result is set as | t/-, and the eighth result is index-coded to obtain LtwaF2, which is the second network link of LtwaF 2.
Further, in the above steps, the step S604 and the step S602 may be exchanged, and the preset length of the eighth result obtained after the exchange is 20, and since the eighth result is obtained by AES encrypting the seventh result and the fourth key, the eighth result includes some complex and special characters, such as a wave number, an exclamation mark, a dash, a comma, a percentile, and the like. In order to facilitate the fourth network link to be more convenient in network propagation, the eighth result is index-coded, and the fourth network link is obtained after coding. The specific preset length is mainly the actual situation and is not limited here one by one.
By adopting the method, the original network link address content length can be changed into only a few characters, the length is very short, and the transmission and the sharing among the user equipment are convenient. And the advantage of short network link is that save the flow, suitable for mobile internet application.
In one possible embodiment, in response to an access request sent by the third user device, the access request includes a fourth network link; the first user equipment sends an access request of the fourth network link based on the user, and the user corresponds to the third user equipment. Inquiring a third network link corresponding to the fourth network link in a preset link library; after the first user equipment inquires a third network link corresponding to the fourth network link in a preset link library according to the mapping relation after the fourth network link is sent by the user. Transmitting the fourth network link to the third user device for the third user device to access the third network link; after the first user equipment inquires the third network connection corresponding to the fourth network link, the third user equipment accesses the website sent by the first user equipment according to the access operation of the user.
For example, according to the access operation of the user Y, the first user device queries the third network link corresponding to the fourth network link in the preset link library, and after querying the third network link corresponding to the fourth network link, the user queries the website corresponding to the third network link at the third user device.
In one possible embodiment, the preset database comprises a relational database and a non-relational database, wherein the relational database comprises MySQL; KV database Memcache, REDIS, etc. The databases such as MySQL and MongoDB can establish unique indexes, have persistence capability, completely meet the requirement of CACHE-SYSTEM caching, and have the unique defect of inferior performance as KV databases. Memcache belongs to a pure memory database, does not have persistence capability, is based on memory and has the fastest speed, but cannot meet the uniqueness requirement of CACHE-SYSTEM, and needs to be modified. The system uses REDI to cache one copy, and the database also stores one copy. The CACHE-SYSTEM buffer supports three operations, namely, storing the mapping relation between the third network link and the fourth network link, acquiring the mapped fourth network link according to the third network link, and acquiring the mapped third network link according to the fourth network link.
By adopting the method, the first user equipment encrypts the network link according to the encryption operation of the user, the obtained mapping relation is stored in the preset link library, and the encrypted network link is sent to the third user equipment according to the sharing operation of the user, so that the third user equipment can conveniently access the network link; because the network link is encrypted, the original network link is changed from a long link to an encrypted network link short link, the difficulty of restoring the encrypted network link to the original network link is high, the restoring process is very complex, the original network link can be obtained only through a mapping relation, the changing process is irreversible with high probability, the transmission flow is saved by using the short link, and the method is suitable for mobile Internet application and can ensure the safety of the network link in the transmission process.
The embodiment of the present application further provides a sharing link encryption device, and fig. 8 is a second structural schematic diagram of the sharing link encryption device provided in the embodiment of the present application, and referring to fig. 8, the first user equipment includes an obtaining unit 801, a judging unit 802, and a sending second unit 803.
The obtaining unit 801, in response to an encryption operation by the user, the encryption operation includes a third network link to be shared.
A judging unit 802, configured to judge whether a mapping relationship between the third network link and a fourth network link is stored in advance in the preset link library, where the fourth network link is a network link that encrypts the third network link; when the mapping relation between the third network link and the fourth network link is stored in the preset link library, inquiring the fourth network link corresponding to the third network link in the preset link library.
The second sending unit 803 is configured to send the fourth network link to the third user device in response to the sharing operation of the user, so that the third user device accesses the fourth network link.
In one possible embodiment, when the mapping relationship between the third network link and the fourth network link is not stored in the preset link library, the judging unit 802 establishes the mapping relationship between the third network link and the fourth network link in response to the third network link sent by the user; and storing the mapping relation in a preset link library.
In a possible embodiment, the obtaining unit 801 obtains the third key and the third network link, and the processing unit splices the third network link and the third key to obtain a fifth result; the third key is any randomly generated key; carrying out hash operation on the fifth result to obtain a sixth result; splicing the sixth result with the third network link to obtain a seventh result; the receiving unit obtains the fourth key, and the processing unit 702 performs AES encryption on the seventh result and the fourth key to obtain an eighth result; the fourth key is any randomly generated key; and obtaining a fourth network link according to the eighth result, and establishing a mapping relation between the third network link and the fourth network link.
In a possible embodiment, the judging unit 802 performs index encoding on the eighth result to obtain a fourth network link.
In a possible embodiment, the obtaining unit 801 is responsive to an access request sent by the third user equipment, where the access request includes a fourth network link; in the preset link library, the judging unit 802 queries a third network link corresponding to the fourth network link; the sending second unit 803 sends the fourth network link to the third user device, so that the third user device accesses the third network link.
It should be noted that: in the device provided in the above embodiment, when implementing the functions thereof, only the division of the above functional modules is used as an example, in practical application, the above functional allocation may be implemented by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the embodiments of the apparatus and the method provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the embodiments of the method are detailed in the method embodiments, which are not repeated herein.
Referring to fig. 9, fig. 9 is a schematic diagram of a second structure of an electronic device according to an embodiment of the present application. As shown in fig. 9, the electronic device 900 may include: at least one processor 901, at least one network interface 904, a user interface 903, memory 905, at least one communication bus 902.
Wherein a communication bus 902 is employed to facilitate a coupled communication between the components.
The user interface 903 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 903 may further include a standard wired interface and a wireless interface.
The network interface 904 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 901 may include one or more processing cores, among other things. The processor 901 connects various parts within the overall server using various interfaces and lines, performs various functions of the server and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 905, and invoking data stored in the memory 905. Alternatively, the processor 901 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 801 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application request and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 901 and may be implemented by a single chip.
The Memory 905 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 905 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). The memory 905 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 905 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, etc.; the storage data area may store data or the like involved in the above respective method embodiments. The memory 905 may also optionally be at least one storage device located remotely from the processor 901.
As shown in fig. 9, an operating system, a network communication module, a user interface module, and an encrypted application sharing a link may be included in the memory 905, which is a computer storage medium.
In the electronic device 900 shown in fig. 9, the user interface 903 is mainly used for providing an input interface for a user, and acquiring data input by the user; and processor 901 may be operable to invoke the encrypted application in memory 905 that stores the shared link, when executed by one or more processors 901, causes electronic device 900 to perform the method as in one or more of the embodiments described above.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided herein, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, such as a division of units, merely a division of logic functions, and there may be additional divisions in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some service interface, device or unit indirect coupling or communication connection, electrical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned memory includes: various media capable of storing program codes, such as a U disk, a mobile hard disk, a magnetic disk or an optical disk.
The above are merely exemplary embodiments of the present disclosure and are not intended to limit the scope of the present disclosure. That is, equivalent changes and modifications are contemplated by the teachings of this disclosure, which fall within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains.

Claims (10)

1. A method for encrypting a shared link, applied to a server, the method comprising:
receiving an encryption request sent by first user equipment, wherein the encryption request comprises a first network link to be shared, and the first user equipment is the user equipment to be shared;
judging whether a mapping relation between the first network link and a second network link is prestored in a preset database, wherein the second network link is a network link for encrypting the first network link;
when the mapping relation between the first network link and the second network link is stored in the preset database, inquiring the second network link corresponding to the first network link in the preset database;
And sending the second network link to the first user equipment so that the first user equipment shares the second network link to second user equipment, wherein the second user equipment is user equipment for receiving the sharing.
2. The method according to claim 1, wherein the method further comprises:
when the mapping relation between the first network link and the second network link is not stored in the preset database, acquiring the first network link, and establishing the mapping relation between the first network link and the second network link;
and storing the mapping relation in a preset database.
3. The method of claim 2, wherein the obtaining the first network link establishes a mapping relationship between the first network link and the second network link; the method specifically comprises the following steps:
acquiring a first key and the first network link, and splicing the first network link and the first key to obtain a first result; the first key is any randomly generated key;
carrying out hash operation on the first result to obtain a second result;
splicing the second result and the first network link to obtain a third result;
Obtaining a second key, and performing AES encryption on the third result and the second key to obtain a fourth result; the second key is any randomly generated key;
and obtaining the second network link according to the fourth result, and establishing a mapping relation between the first network link and the second network link.
4. A method according to claim 3, wherein said obtaining said second network link according to said fourth result comprises:
and carrying out index coding on the fourth result to obtain the second network link.
5. The method according to claim 1, wherein the method further comprises:
receiving an access request sent by the second user equipment, wherein the access request comprises the second network link;
inquiring the first network link corresponding to the second network link in a preset database;
and sending the first network link to the second user equipment so as to facilitate the second user equipment to access the first network link.
6. The encryption method of the shared link is characterized by being applied to first user equipment, and comprises the following steps:
Responding to encryption operation of a user, wherein the encryption operation comprises a third network link to be shared;
judging whether a preset link library stores the mapping relation between the third network link and a fourth network link in advance, wherein the fourth network link is a network link for encrypting the third network link;
when the mapping relation between the third network link and the fourth network link is stored in the preset link library, inquiring the fourth network link corresponding to the third network link in the preset link library;
and responding to the sharing operation of the user, and sending the fourth network link to third user equipment so as to facilitate the third user equipment to access the fourth network link.
7. The method of claim 6, wherein the method further comprises:
when the mapping relation between the third network link and the fourth network link is not stored in the preset link library, establishing the mapping relation between the third network link and the fourth network link in response to the third network link sent by the user;
and storing the mapping relation in a preset link library.
8. An encryption device for sharing a link, wherein the device is a server, and the server comprises a receiving unit (401), a processing unit (403) and a transmitting unit (403);
The receiving unit (401) receives an encryption request sent by first user equipment, wherein the encryption request comprises a first network link to be shared; the first user equipment is user equipment to be shared;
the processing unit (402) judges whether a mapping relation between the first network link and a second network link is prestored in a preset database, wherein the second network link is a network link for encrypting the first network link; when the mapping relation between the first network link and the second network link is stored in the preset database, inquiring the second network link corresponding to the first network link in the preset database;
the first sending unit (403) sends the second network link to the first user equipment, so that the first user equipment shares the second network link to the second user equipment, and the second user equipment is the user equipment for receiving the sharing.
9. An encryption device for sharing a link, wherein the device is a first user equipment, and the first user equipment comprises an acquisition unit (801), a judgment unit (802) and a second transmission unit (803);
The acquisition unit (801) is used for responding to encryption operation of a user, wherein the encryption operation comprises a third network link to be shared;
the judging unit (802) judges whether a mapping relation between the third network link and a fourth network link is prestored in a preset link library, wherein the fourth network link is a network link for encrypting the third network link; when the mapping relation between the third network link and the fourth network link is stored in the preset link library, inquiring the fourth network link corresponding to the third network link in the preset link library;
the second sending unit (803) is configured to send the fourth network link to a third user device in response to a sharing operation of the user, so that the third user device accesses the fourth network link.
10. An electronic device comprising a processor, a memory, a user interface, and a network interface, the memory for storing instructions, the user interface and the network interface for communicating to other devices, the processor for executing the instructions stored in the memory to cause the electronic device to perform the method of any one of claims 1-5 or claims 6-7.
CN202211711512.XA 2022-12-29 2022-12-29 Encryption method and device for sharing links Withdrawn CN116055143A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211711512.XA CN116055143A (en) 2022-12-29 2022-12-29 Encryption method and device for sharing links

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211711512.XA CN116055143A (en) 2022-12-29 2022-12-29 Encryption method and device for sharing links

Publications (1)

Publication Number Publication Date
CN116055143A true CN116055143A (en) 2023-05-02

Family

ID=86112634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211711512.XA Withdrawn CN116055143A (en) 2022-12-29 2022-12-29 Encryption method and device for sharing links

Country Status (1)

Country Link
CN (1) CN116055143A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116504365A (en) * 2023-06-25 2023-07-28 安徽影联云享医疗科技有限公司 Medical image information sharing method and related device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116504365A (en) * 2023-06-25 2023-07-28 安徽影联云享医疗科技有限公司 Medical image information sharing method and related device

Similar Documents

Publication Publication Date Title
CN110266480B (en) Data transmission method, device and storage medium
CN109150499B (en) Method and device for dynamically encrypting data, computer equipment and storage medium
JP5591232B2 (en) Information transmission using virtual input layout
US20120254622A1 (en) Secure Access to Electronic Devices
CN109067739B (en) Communication data encryption method and device
CN107329963B (en) Method and device for accelerating webpage access
WO2020019477A1 (en) Communication data encryption method and apparatus
CN113094334B (en) Digital service method, device, equipment and storage medium based on distributed storage
CN112199622A (en) Page jump method, system and storage medium
CN116055143A (en) Encryption method and device for sharing links
CN113243093B (en) System and method for message transmission and retrieval using blockchain
CN116107520B (en) S3 object storage protocol encrypted data storage method and system
WO2024060630A1 (en) Data transmission management method, and data processing method and apparatus
CN112329044A (en) Information acquisition method and device, electronic equipment and computer readable medium
CN113489706B (en) Data processing method, device, system, equipment and storage medium
CN107707528B (en) Method and device for isolating user information
CN105471818B (en) Method and system for information transmission between application software
CN113852624A (en) Data cross-network transmission method, device and computer medium thereof
WO2021027145A1 (en) Non-application payment method and apparatus, and computing device and storage medium
CN106778353B (en) Method and apparatus for saving messages
CN113761566A (en) Data processing method and device
CN110941412A (en) Method, system and terminal for realizing multi-terminal animation co-browsing based on imaging
CN110880974A (en) Data communication method and device based on block chain network
CN112565156A (en) Information registration method, device and system
WO2016110206A1 (en) Method, device and system for page access

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20230502