Website encryption method and device, computer equipment, medium and program product

The URL is encrypted through character segmentation, ASCII encoding, hexadecimal conversion and URL encoding protocols, which solves the problem of URL information leakage, realizes secure encryption of the URL, protects user privacy and improves security.

CN118740422AInactive Publication Date: 2024-10-01镁佳(北京)科技有限公司
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410688388.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-10-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technology is difficult to effectively protect user privacy and prevent information leakage during the forwarding process of the URL. Especially when querying information in the browser, the URL carries user information, leading to the risk of information leakage.

Method used

By responding to the URL encryption request, the character segmentation algorithm is used to divide the URL into characters to be encrypted, ASCII encoding and the preset base algorithm are used to convert characters, the characters are encrypted in combination with the URL encoding protocol, and the StringBuilder statement is used to splice the encrypted characters in sequence. , generate an encrypted URL.

Benefits of technology

It realizes the encryption of the website, protects user privacy, improves the security and confidentiality of the website, prevents data leakage, and does not need to rely on other devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740422A_ABST
    Figure CN118740422A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of internet, and discloses a website encryption method and device, computer equipment, a medium and a program product, and the method comprises the steps: responding to a website encryption request, and obtaining a to-be-encrypted website; performing character segmentation on the to-be-encrypted website by using a character segmentation algorithm to obtain to-be-encrypted characters corresponding to the to-be-encrypted website; performing character conversion processing on the to-be-encrypted character by using a character encryption algorithm to obtain an encrypted character; and sequentially splicing the encrypted characters according to the sequence of the to-be-encrypted characters in the to-be-encrypted website to obtain an encrypted website. According to the website encryption request, the to-be-encrypted website is encrypted, the character segmentation is carried out on the to-be-encrypted website, and the character conversion processing is carried out on the segmented to-be-encrypted characters; the character conversion does not need to depend on other equipment, and the encrypted characters are spliced in sequence to realize the encryption processing of the website to be encrypted, so that the security and confidentiality are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet technology, and in particular to a website encryption method, device, computer equipment, medium and program product. Background Art

[0002] With the rapid development of Internet technology, users usually enter URLs in browsers to jump to access, for example, entering www.baidu.com will jump to the Baidu homepage. However, when users query information in the browser, the URL will carry the information that the user queried. For example, the URL www.baidu.com? username=zhangsan&age=15 carries two pieces of information: zhangsan and age 15. In order to prevent other people from directly seeing this information when forwarding the URL, the URL needs to be encrypted to prevent information leakage or privacy leakage. Therefore, how to encrypt the URL has become a problem that needs to be solved urgently. Summary of the invention

[0003] In view of this, the present invention provides a URL encryption method, apparatus, computer equipment, medium and program product to solve the problem of encrypting a URL.

[0004] In a first aspect, the present invention provides a method for encrypting a website, the method comprising:

[0005] In response to the URL encryption request, obtaining the URL to be encrypted;

[0006] Use a character segmentation algorithm to segment the URL to be encrypted to obtain the characters to be encrypted corresponding to the URL to be encrypted;

[0007] Using a character encryption algorithm to perform character conversion processing on the characters to be encrypted, to obtain encrypted characters;

[0008] According to the order of the characters to be encrypted in the URL to be encrypted, the encrypted characters are concatenated in sequence to obtain the encrypted URL.

[0009] The present invention encrypts the URL to be encrypted in response to a URL encryption request, performs character segmentation on the URL to be encrypted, and uses a character encryption algorithm to perform character conversion processing on the segmented characters to be encrypted to achieve encryption of the characters to be encrypted. The character conversion does not need to rely on other devices, and the encrypted characters are sequentially spliced ​​to achieve encryption processing of the URL to be encrypted, thereby protecting user privacy and improving the security and confidentiality of the URL.

[0010] In an optional implementation, character segmentation is performed on the URL to be encrypted using a character segmentation algorithm, including:

[0011] Get the character length, and use the Split algorithm to split the URL to be encrypted into characters that meet the character length.

[0012] The present invention utilizes the Split segmentation algorithm to perform character segmentation on the URL to be encrypted, thereby reducing the length of the characters to be processed, so as to facilitate encryption processing of the characters.

[0013] In an optional implementation, using a character encryption algorithm to perform character conversion processing on characters to be encrypted to obtain encrypted characters includes:

[0014] Convert the characters to be encrypted according to the ASCII encoding rules to obtain the ASCII code corresponding to the characters to be encrypted;

[0015] Use a preset base algorithm to convert the ASCII code corresponding to the character to be encrypted to obtain a base value;

[0016] The URL encoding protocol is used to encrypt the binary value to obtain the encrypted characters.

[0017] The present invention converts characters to be encrypted by using the ASCII encoding rule, and only needs one encoding to convert the characters to be encrypted into ASCII codes, thereby improving the character conversion efficiency. The ASCII codes are converted into base numbers by using a preset base number algorithm to increase the readability of the characters, and the base number values ​​are encrypted by using the URL encoding protocol to further enhance the confidentiality of the characters and prevent data leakage.

[0018] In an optional implementation, the ASCII code corresponding to the character to be encrypted is converted into a base using a preset base algorithm, including:

[0019] Use the hexadecimal algorithm to convert the ASCII code corresponding to the encrypted character into hexadecimal.

[0020] The present invention utilizes a hexadecimal algorithm to perform hexadecimal conversion of characters to improve the confidentiality of character encryption.

[0021] In an optional implementation, the URL encoding protocol is used to encrypt the binary value, including:

[0022] Encrypts binary values ​​using the percent encoding protocol.

[0023] The present invention utilizes the percent encoding protocol to enhance the confidentiality and security of character encryption.

[0024] In an optional implementation, the encrypted characters are sequentially concatenated, including:

[0025] Use the StringBuilder statement to concatenate the encrypted characters one by one.

[0026] The present invention utilizes StringBuilder statements to splice encrypted characters to complete the splicing of characters.

[0027] In a second aspect, the present invention provides a URL encryption device, the device comprising:

[0028] An acquisition module, used for acquiring the URL to be encrypted in response to the URL encryption request;

[0029] A segmentation module, used to segment the URL to be encrypted using a character segmentation algorithm to obtain characters to be encrypted corresponding to the URL to be encrypted;

[0030] A conversion module, used for performing character conversion processing on characters to be encrypted using a character encryption algorithm to obtain encrypted characters;

[0031] The splicing module is used to sequentially splice the encrypted characters in the order of the characters to be encrypted in the URL to be encrypted to obtain the encrypted URL.

[0032] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the URL encryption method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0033] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the URL encryption method of the first aspect or any corresponding embodiment thereof.

[0034] In a fifth aspect, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the URL encryption method of the above-mentioned first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 is a flowchart of a URL encryption method according to an embodiment of the present invention;

[0037] Figure 2 is a flow chart of another URL encryption method according to an embodiment of the present invention;

[0038] Figure 3 is an application schematic diagram of a URL encryption method according to an embodiment of the present invention;

[0039] Figure 4 is a structural block diagram of a URL encryption device according to an embodiment of the present invention;

[0040] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0042] In the related art, a short URL generator is used to encrypt the URL to be encrypted, and the URL to be encrypted is converted by a server. For example, the URL to be encrypted is www.baidu.com, and a short URL generator is used to randomly generate a string of ws1cg, and the generated string of ws1cg is bound to the URL www.baidu.com in the server. When a user visits the URL http: / / 985.so / ws1cg, the server queries the URL corresponding to ws1cg as www.baidu.com, which means it is determined to be the Baidu website.

[0043] However, this encryption method needs to rely on the binding relationship of the server. When the server is shut down or the binding relationship is lost, the website cannot be effectively accessed through this encryption method.

[0044] According to an embodiment of the present invention, an embodiment of a URL encryption method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0045] In this embodiment, a method for encrypting a website address is provided, which can be used in a mobile terminal. Figure 1 is a flow chart of a URL encryption method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0046] Step S101, in response to a URL encryption request, obtaining a URL to be encrypted.

[0047] In the embodiment of the present invention, when the user forwards and shares the URL, the URL encryption button is usually triggered. When the user's URL encryption request is received, the URL to be encrypted is obtained in response to the user's URL encryption request. For example, if the URL that the user wants to share is www.baidu.com, the URL to be encrypted is www.baidu.com.

[0048] Step S102, using a character segmentation algorithm to perform character segmentation on the URL to be encrypted, to obtain characters to be encrypted corresponding to the URL to be encrypted.

[0049] In the embodiment of the present invention, the character segmentation algorithm is used as a text processing algorithm to segment the text according to a specific character length to achieve text processing and analysis. The character segmentation algorithm is used to segment the URL to be encrypted into several characters to be encrypted. Taking the URL to be encrypted as www.baidu.com as an example, the URL characters are segmented into w, w, w, ., b, a, i, d, u, ., c, o, m.

[0050] Step S103, using a character encryption algorithm to perform character conversion processing on the character to be encrypted to obtain an encrypted character.

[0051] In the embodiment of the present invention, the character encryption algorithm performs character conversion on the characters to be encrypted separated from the URL to be encrypted, so as to perform encryption processing on the characters to be encrypted respectively, and obtain the encrypted characters corresponding to each character to be encrypted respectively. The character encryption algorithm encrypts the characters to be encrypted to improve security and confidentiality.

[0052] Step S104, according to the order of the characters to be encrypted in the URL to be encrypted, the encrypted characters are sequentially concatenated to obtain the encrypted URL.

[0053] In an embodiment of the present invention, the encrypted characters are sequentially spliced ​​in the original order of the characters to be encrypted in the URL to be encrypted to obtain the encrypted URL. After the user shares the encrypted URL with other users, the other users can directly copy the encrypted URL to the browser for access.

[0054] The URL encryption method provided in this embodiment encrypts the URL to be encrypted in response to a URL encryption request, performs character segmentation on the URL to be encrypted, and uses a character encryption algorithm to perform character conversion processing on the segmented characters to be encrypted to achieve encryption of the characters to be encrypted. The character conversion does not need to rely on other devices, and the encrypted characters are sequentially spliced ​​to achieve encryption processing of the URL to be encrypted, thereby protecting user privacy and improving the security and confidentiality of the URL.

[0055] In this embodiment, a method for encrypting a website address is provided, which can be used in the above-mentioned mobile terminal. Figure 2is a flow chart of a URL encryption method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0056] Step S201, in response to a URL encryption request, obtaining a URL to be encrypted.

[0057] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0058] Step S202, using a character segmentation algorithm to perform character segmentation on the URL to be encrypted, to obtain characters to be encrypted corresponding to the URL to be encrypted.

[0059] Specifically, the above step S202 includes:

[0060] Step S2021, obtaining the character length, and using the Split algorithm to split the URL to be encrypted into characters that meet the character length.

[0061] In an embodiment of the present invention, the user can pre-set the character length in advance. Taking the character length of 1 as an example, the URL to be encrypted is divided into characters of a single character length. The Split segmentation algorithm is an algorithm that divides a string into strings according to a specified delimiter, and the string is divided in the form of str+string to be divided. Taking the URL to be encrypted as www.baidu.com and the character length of 1 as an example, the URL is divided into w, w, w, ., b, a, i, d, u, ., c, o, m, and the character segmentation is completed.

[0062] The Split algorithm is used to split the URL to be encrypted into characters, reducing the length of the characters to be processed to facilitate encryption of the characters.

[0063] Step S203, using a character encryption algorithm to perform character conversion processing on the character to be encrypted to obtain an encrypted character.

[0064] Specifically, the above step S203 includes:

[0065] Step S2031, converting the character to be encrypted according to the ASCII encoding rule to obtain the ASCII code corresponding to the character to be encrypted.

[0066] Step S2032, converting the ASCII code corresponding to the character to be encrypted into a base-based value using a preset base-based algorithm.

[0067] Step S2033, encrypt the binary value using the URL encoding protocol to obtain encrypted characters.

[0068] In an embodiment of the present invention, the character encryption algorithm is based on ASCII encoding and a hexadecimal algorithm for encryption. The ASCII encoding uses a specified 7-bit or 8-bit binary number combination to represent 128 or 256 possible characters. The hexadecimal system is based on 16, and the number 0-19 and the letters AF are used to represent it.

[0069] First, the characters to be encrypted are converted according to the ASCII encoding rules, and the characters to be encrypted are converted into ASCII codes. For example, the URL to be encrypted is www.baidu.com, and the character w is converted into ASCII code 119. Then, the ASCII code of the characters to be encrypted is converted into base-based using the preset base-based algorithm, and the ASCII code of the character w is converted into base-based. Finally, the base-based value is encrypted using the URL encoding protocol to complete the encryption of the characters to be encrypted.

[0070] The characters to be encrypted are converted into ASCII codes through ASCII encoding rules. Only one encoding is required to convert the characters to ASCII codes, which improves the efficiency of character conversion. The ASCII codes are converted into base codes through a preset base algorithm to increase the readability of the characters. The base values ​​are encrypted through the URL encoding protocol to further enhance the confidentiality of the characters and prevent data leakage.

[0071] Specifically, the above step S2032 includes:

[0072] Step S20321, using a hexadecimal algorithm to perform hexadecimal conversion on the ASCII code corresponding to the character to be encrypted.

[0073] In the embodiment of the present invention, a hexadecimal algorithm is used for hexadecimal conversion. Taking the first character w in the URL to be encrypted www.baidu.com as an example, the ASCII code of the first character w is 119, and the hexadecimal code of 119 is 77.

[0074] Use the hexadecimal algorithm to convert characters into hexadecimal to improve the confidentiality of character encryption.

[0075] Specifically, the above step S2033 includes:

[0076] Step S20331, encrypt the binary value using the percent encoding protocol.

[0077] In an embodiment of the present invention, the percent encoding protocol is used to encrypt the hexadecimal value after the hexadecimal conversion, that is, % is added before the hexadecimal value to complete the character to be encrypted. Take the first character w in the website to be encrypted www.baidu.com as an example. The ASCII code of the first character w is 119. 119 is converted into hexadecimal, which is 77. The percent encoding protocol is used to encrypt, and the encrypted character is %77. The second character is also w, and the encrypted character is %77. The third character is also w, and the encrypted character is %77. The fourth character is ., and the encrypted character is %2E. All the characters to be encrypted are encrypted in turn.

[0078] The percent encoding protocol is used to enhance the confidentiality and security of character encryption.

[0079] Step S204, according to the order of the characters to be encrypted in the URL to be encrypted, the encrypted characters are sequentially concatenated to obtain the encrypted URL.

[0080] Specifically, the above step S204 includes sequentially concatenating the encrypted characters:

[0081] Step S2041, using the StringBuilder statement to concatenate the encrypted characters in sequence.

[0082] In the embodiment of the present invention, the encrypted characters are spliced ​​using the StringBuilder statement. First, a StringBuilder object is created. The StringBuilder object calls append to splice the characters until all the characters are spliced. The encrypted characters are %77, %77, %77, %2E, %62, %61, %69, %64, %75, %2E, %63, %6F, %6D. The encrypted characters are spliced ​​using the StringBuilder statement to obtain the encrypted URL of %77%77%77%2E%62%61%69%64%75%2E%63%6F%6D.

[0083] The URL encryption method provided in this embodiment uses a StringBuilder statement to concatenate encrypted characters to complete character concatenation.

[0084] In some optional implementations, URL encryption can be implemented by the following Java code:

[0085]

[0086] Call the encryptUrl("www.baidu.com") method.

[0087] The return value is %77%77%77%2e%62%61%69%64%75%2e%63%6f%6d.

[0088] Call the encryptUrl("www.qq.com") method.

[0089] The return value is %77%77%77%2e%71%71%2e%63%6f%6d.

[0090] like Figure 3 As shown, Figure 3 For the URL encryption process, get the first character of the URL, convert the character into ASCII code, then convert the ASCII code into hexadecimal, add % to the converted hexadecimal number, and the encryption of the first character is completed. Get the second character of the URL, convert the character into ASCII code, then convert the ASCII code into hexadecimal, add % to the converted hexadecimal number, and the encryption of the second character is completed. Repeat this process until the last character of the URL is obtained, convert the character into ASCII code, then convert the ASCII code into hexadecimal, add % to the converted hexadecimal number, and the encryption of the last character is completed. Concatenate all characters to complete the URL encryption.

[0091] In this embodiment, a URL encryption device is also provided, which is used to implement the above embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0092] This embodiment provides a URL encryption device, such as Figure 4 As shown, including:

[0093] The acquisition module 401 is used to acquire the URL to be encrypted in response to the URL encryption request.

[0094] The segmentation module 402 is used to segment the URL to be encrypted using a character segmentation algorithm to obtain characters to be encrypted corresponding to the URL to be encrypted.

[0095] The conversion module 403 is used to perform character conversion processing on the characters to be encrypted using a character encryption algorithm to obtain encrypted characters.

[0096] The concatenation module 404 is used to concatenate the encrypted characters in sequence according to the order of the characters to be encrypted in the URL to be encrypted, so as to obtain the encrypted URL.

[0097] In some optional implementations, the segmentation module 402 includes:

[0098] The segmentation unit is used to obtain the character length and use the Split segmentation algorithm to segment the URL to be encrypted into characters that meet the character length.

[0099] In some optional implementations, the conversion module 403 includes:

[0100] The first conversion unit is used to convert the characters to be encrypted according to the ASCII encoding rule to obtain the ASCII code corresponding to the characters to be encrypted.

[0101] The second conversion unit is used to convert the ASCII code corresponding to the character to be encrypted into a base-based value by using a preset base-based algorithm.

[0102] The encryption unit is used to encrypt the hexadecimal value using the URL encoding protocol to obtain encrypted characters.

[0103] In some optional implementations, the second conversion unit includes:

[0104] The conversion subunit is used to convert the ASCII code corresponding to the character to be encrypted into hexadecimal using a hexadecimal algorithm.

[0105] In some optional implementations, the encryption unit includes:

[0106] The encryption subunit is used to encrypt binary values ​​using the percent encoding protocol.

[0107] In some optional implementations, the splicing module 404 includes:

[0108] The concatenation unit is used to concatenate the encrypted characters in sequence using the StringBuilder statement.

[0109] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0110] The URL encryption device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0111] The embodiment of the present invention also provides a computer device having the above Figure 4 The URL encryption device shown.

[0112] See also Figure 5 , Figure 5is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0113] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0114] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0115] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0116] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0117] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0118] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the computer device, such as a touch screen, etc. The output device 40 can include a display device, etc.

[0119] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0120] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0121] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for encrypting a website, characterized in that: The method comprises: In response to the URL encryption request, obtaining the URL to be encrypted; Using a character segmentation algorithm to segment the URL to be encrypted, and obtaining characters to be encrypted corresponding to the URL to be encrypted; Performing character conversion processing on the character to be encrypted using a character encryption algorithm to obtain an encrypted character; According to the order of the characters to be encrypted in the URL to be encrypted, the encrypted characters are sequentially concatenated to obtain the encrypted URL.

2. The method according to claim 1, characterized in that The step of using a character segmentation algorithm to segment the URL to be encrypted includes: The character length is obtained, and the URL to be encrypted is split into characters that meet the character length using the Split segmentation algorithm.

3. The method according to claim 1, characterized in that The step of performing character conversion processing on the character to be encrypted by using a character encryption algorithm to obtain an encrypted character includes: Convert the characters to be encrypted according to the ASCII encoding rules to obtain the ASCII code corresponding to the characters to be encrypted; Using a preset base algorithm to convert the ASCII code corresponding to the character to be encrypted into a base value; The binary value is encrypted using the URL encoding protocol to obtain encrypted characters.

4. The method according to claim 3, characterized in that The method of converting the ASCII code corresponding to the character to be encrypted into a base-based system by using a preset base-based algorithm includes: The ASCII code corresponding to the character to be encrypted is converted into hexadecimal using a hexadecimal algorithm.

5. The method according to claim 3, characterized in that: The method of encrypting the binary value by using the URL encoding protocol includes: The binary value is encrypted using the percent encoding protocol.

6. The method according to claim 1, characterized in that The step of sequentially concatenating the encrypted characters comprises: The encrypted characters are concatenated in sequence using the StringBuilder statement.

7. A URL encryption device, characterized in that: The device comprises: An acquisition module, used for acquiring the URL to be encrypted in response to the URL encryption request; A segmentation module, used to perform character segmentation on the URL to be encrypted using a character segmentation algorithm to obtain characters to be encrypted corresponding to the URL to be encrypted; A conversion module, used for performing character conversion processing on the character to be encrypted using a character encryption algorithm to obtain an encrypted character; The splicing module is used to sequentially splice the encrypted characters in the order of the characters to be encrypted in the URL to be encrypted to obtain the encrypted URL.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the URL encryption method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the URL encryption method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the URL encryption method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data encryption and decryption method and devices

    CN105099652A

  • Information encryption method and device, medium and electronic equipment

    CN113486379A

  • Data security transmission method and device based on industrial production and medium

    CN114553511A

  • URL encryption method and device, electronic equipment and storage medium

    CN115987648A

  • PINNING ENCRYPTION METADATA TO SEGMENT URIs

    US20180278990A1