A short link generation method, device, equipment and computer-readable storage medium
By generating short link addresses, the recognition error problem caused by the complexity of web page links or QR code images is solved, and the effect of reducing complexity and reducing the probability of misidentification is achieved.
Patent Information
- Application Number
- CN202310164944.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2043-02-24
AI Technical Summary
Pushing the original string corresponding to the web page link or QR code picture to the user will increase the complexity of the web page link or QR code picture, which will lead to the identification error.
By obtaining the service identification and long link address of the push information, obtaining the summary information of the long link address, intercepting the first array in the summary information, and mapping the first array into a mapped character array based on the displayable character mapping set, and finally splicing the service identification and mapped character array to generate a short link address.
It reduces the complexity of push information, reduces the probability of misidentification of push information, and improves the accuracy and reliability of information transmission.
Smart Images

Figure CN116028734B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of data processing technology, and specifically to a short link generation method, device, equipment, and computer-readable storage medium. Background Art
[0002] When a web link or QR code image is pushed to a user in the form of a message, or when a web link or QR code image is shared between users through a social platform, if the original string corresponding to the web link or QR code image is directly pushed to the user, the original string will cause the image complexity of the web link or QR code, thereby increasing the image complexity of the web link or QR code and causing recognition errors. Summary of the invention
[0003] In view of the above problems, the embodiments of the present invention provide a short link generation method, device, equipment and computer-readable storage medium, which are used to solve the problem in the prior art that directly pushing the original character string corresponding to the web link or QR code image to the user will cause the web link or QR code image to be complicated.
[0004] According to one aspect of an embodiment of the present invention, a short link generation method is provided, the short link generation method comprising:
[0005] Get the business ID and long link address of the push information;
[0006] Obtain summary information of the long link address;
[0007] Extracting a first array from the summary information;
[0008] Based on the displayable character mapping set, mapping the first array into a mapping character array;
[0009] The service identifier and the mapping character array are concatenated to obtain the short link address of the push information.
[0010] In an optional manner, the step of extracting the first array from the summary information based on the interception algorithm is specifically:
[0011] Starting from the M+ith bit of the summary information, a first array of a preset length is intercepted, wherein i is an integer and 0≤i≤61; and M is a padding bit of the summary algorithm in the summary information.
[0012] In an optional manner, the data bit length of the first array is L, and L≤SM-i+1; wherein S is the length of the summary information.
[0013] In an optional manner, the step of mapping the first array into a mapping character array based on the displayable character mapping set is specifically:
[0014] The first array is cut into K second arrays, where K is an integer and K is smaller than the data bit length of the first array.
[0015] Based on the displayable character mapping set, the K second arrays are mapped into K third arrays; and the K third arrays are concatenated to obtain the mapped character array.
[0016] In an optional manner, the data bits of the K second arrays have the same length.
[0017] In an optional manner, the displayable character mapping set is a character matrix, and the size of the character matrix is 2 L / K , where L is the data bit length of the first array, K is an integer, and K is less than the data bit length of the first array.
[0018] In an optional manner, the service identifier is used to indicate the service category of the push information.
[0019] According to another aspect of an embodiment of the present invention, a short link generation device is provided, including: an acquisition module, a summary information extraction module, a capture module, a mapping module and a short link generation module.
[0020] The acquisition module is used to acquire the service identifier and long link address of the push information.
[0021] The summary information extraction module is used to obtain the summary information of the long link address.
[0022] The interception module is used to intercept a first array from the summary information.
[0023] The mapping module is used to map the first array into a mapping character array based on a displayable character mapping set.
[0024] The short link generation module is used to concatenate the service identifier and the mapping character array to obtain the short link address of the push information.
[0025] In an optional manner, the summary information extraction module is used to intercept a first array of a preset length starting from the M+ith bit of the summary information, where i is an integer and 0≤i≤61; and M is a padding bit of a summary algorithm in the summary information.
[0026] In an optional manner, the data bit length of the first array is L, and L≤SM-i+1; wherein S is the length of the summary information.
[0027] In an optional manner, the mapping module is used to cut the first array into K second arrays, where K is an integer and K is smaller than the data bit length of the first array.
[0028] Based on the displayable character mapping set, the K second arrays are mapped into K third arrays; and the K third arrays are concatenated to obtain the mapped character array.
[0029] In an optional manner, the data bits of the K second arrays have the same length.
[0030] In an optional manner, the displayable character mapping set is a character matrix, and the size of the character matrix is 2 L / K , where L is the data bit length of the first array, K is an integer, and K is less than the data bit length of the first array.
[0031] In an optional manner, the service identifier is used to indicate the service category of the push information.
[0032] According to another aspect of an embodiment of the present invention, a short link generation device is provided, including: a processor, a communication interface, a memory, and a communication bus.
[0033] Wherein: the processor, the communication interface, and the memory communicate with each other through the communication bus. The communication interface is used to communicate with other devices such as the network elements of the client or other servers. The processor is used to execute the program, and specifically can execute the relevant steps in the above-mentioned short link generation method embodiment.
[0034] The memory is used to store programs. The memory may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0035] The program can be specifically called by the processor to enable the short link generation device to perform the following operations:
[0036] Get the business ID and long link address of the push information;
[0037] Obtain summary information of the long link address;
[0038] Extracting a first array from the summary information;
[0039] Based on the displayable character mapping set, mapping the first array into a mapping character array;
[0040] The service identifier and the mapping character array are concatenated to obtain the short link address of the push information.
[0041] In an optional manner, the step of extracting the first array from the summary information based on the interception algorithm is specifically:
[0042] Starting from the M+ith bit of the summary information, a first array of a preset length is intercepted, wherein i is an integer and 0≤i≤61; and M is a padding bit of the summary algorithm in the summary information.
[0043] In an optional manner, the data bit length of the first array is L, and L≤SM-i+1; wherein S is the length of the summary information.
[0044] In an optional manner, the step of mapping the first array into a mapping character array based on the displayable character mapping set is specifically:
[0045] The first array is cut into K second arrays, where K is an integer and K is smaller than the data bit length of the first array.
[0046] Based on the displayable character mapping set, the K second arrays are mapped into K third arrays; and the K third arrays are concatenated to obtain the mapped character array.
[0047] In an optional manner, the data bits of the K second arrays have the same length.
[0048] In an optional manner, the displayable character mapping set is a character matrix, and the size of the character matrix is 2 L / K , where L is the data bit length of the first array, K is an integer, and K is less than the data bit length of the first array.
[0049] In an optional manner, the service identifier is used to indicate the service category of the push information.
[0050] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a short link generation device / apparatus to perform the following operations:
[0051] Get the business ID and long link address of the push information;
[0052] Obtain summary information of the long link address;
[0053] Extracting a first array from the summary information;
[0054] Based on the displayable character mapping set, mapping the first array into a mapping character array;
[0055] The service identifier and the mapping character array are concatenated to obtain the short link address of the push information.
[0056] In an optional manner, the step of extracting the first array from the summary information based on the interception algorithm is specifically:
[0057] Starting from the M+ith bit of the summary information, a first array of a preset length is intercepted, wherein i is an integer and 0≤i≤61; and M is a padding bit of the summary algorithm in the summary information.
[0058] In an optional manner, the data bit length of the first array is L, and L≤SM-i+1; wherein S is the length of the summary information.
[0059] In an optional manner, the step of mapping the first array into a mapping character array based on the displayable character mapping set is specifically:
[0060] The first array is cut into K second arrays, where K is an integer and K is smaller than the data bit length of the first array.
[0061] Based on the displayable character mapping set, the K second arrays are mapped into K third arrays; and the K third arrays are concatenated to obtain the mapped character array.
[0062] In an optional manner, the data bits of the K second arrays have the same length.
[0063] In an optional manner, the displayable character mapping set is a character matrix, and the size of the character matrix is 2 L / K , where L is the data bit length of the first array, K is an integer, and K is less than the data bit length of the first array.
[0064] In an optional manner, the service identifier is used to indicate the service category of the push information.
[0065] The embodiment of the present invention obtains the service identifier and long link address of the push information. First, the service identifier and long link address of the push information are obtained, and then a first array is intercepted from the summary information; and based on a displayable character mapping set, the first array is mapped to a mapping character array; finally, the service identifier and the mapping character array are concatenated to obtain the short link address of the push information. By applying the technical solution provided by the present invention, when the push information of the service is triggered, the original character string corresponding to the service identifier and the long link address of the service can be obtained, and based on the summary algorithm, the interception algorithm and the displayable character mapping set, the mapping character group corresponding to the original character string can be obtained, so as to obtain the short link address of the push information of the service in combination with the service identifier, thereby reducing the complexity of the push information and the probability of misrecognition of the push information.
[0066] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0068] Figure 1 A schematic diagram showing a flow chart of an embodiment of a short link generation method provided by an embodiment of the present invention;
[0069] Figure 2 A schematic diagram showing a specific implementation process of a short link generation method provided by an embodiment of the present invention;
[0070] Figure 3 A schematic diagram showing the structure of an embodiment of a short link generation device provided by an embodiment of the present invention is shown;
[0071] Figure 4 A schematic structural diagram of an embodiment of a short link generating device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0072] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0073] Figure 1 The flowchart of an embodiment of a short link generation method provided by an embodiment of the present invention is shown, and the short link generation method is executed by a short link generation device. Figure 1 As shown, the short link generation method includes the following steps:
[0074] Step 110: Obtain the service identifier and long link address of the push information.
[0075] When the push information of the service is triggered, a long link address of the push information will be generated, and the long link address is the original string linking the service.
[0076] Step 120: Obtain summary information of the long link address.
[0077] The summary information is obtained based on the summary algorithm, which is also called a hash algorithm. The summary algorithm is a function that converts data of any length into a data string of fixed length. Common summary algorithms include MD5, SHA-1, SHA-128, SHA-256, SHA-512, and HMAC.
[0078] like Figure 2 As shown, in the embodiment of the present invention, the MD5 algorithm is adopted to calculate the summary information (MD5 summary) of the long link address through the MD5 algorithm to obtain summary information with a length of 128 bits.
[0079] The padding bit length of the MD5 algorithm is: original information length% 512-64 bits (where 64 is the input information length information), and the padding bit length will affect the last 32 bits of the final MD5 algorithm calculation result.
[0080] Step 130: extract a first array from the summary information.
[0081] Specifically, the first array is obtained through a truncation algorithm, and the truncation algorithm is: C=(B>>(32+rolling))&0xFFFFFFFFF, that is, the truncation algorithm truncates the first array of a preset length starting from the M+ith bit of the summary information, where i is an integer and 0≤i≤61; M is the padding bit of the summary algorithm in the summary information. In an embodiment of the invention, M is 32, and the padding bit of the MD5 algorithm is 32 bits.
[0082] For example, Figure 2 As shown, by cutting off the 32-bit padding bits corresponding to the MD5 algorithm, that is, 36 bits starting from the 32+ith bit in the MD5 summary, a first array with better hashing performance can be obtained, wherein i is a rolling value (offset), that is, an offset of the truncation length of the first array, and the value range is [0,61]. In actual application, different roling values are used to obtain different first arrays. The randomness of the first array is improved through random rolling values, so as to reduce the conflict of the first array in different triggering events in different triggering events of the business.
[0083] Step 130: Map the first array into a mapping character array based on a displayable character mapping set.
[0084] In the embodiment of the present invention, the first array is mapped to the mapped character array through a preset displayable character mapping set, wherein the displayable character mapping set is a character matrix.
[0085] Specifically, in order to reduce the amount of calculation of the short link generation device, in some embodiments of the present invention, when the first array is mapped to the mapping character array, the first array is first divided into K second arrays, and then, based on the displayable character mapping set, the K second arrays are mapped to K third arrays, and finally the K third arrays are sequentially spliced to obtain the mapping character array, wherein K is an integer, and K is less than the data bit length of the first array. For example, the 36 bits are evenly divided into 6 second arrays.
[0086] It should be noted that, in the embodiment of the present invention, the data bit length of the first array is L, and L≤SM-i+1; wherein S is the length of the summary information. For example, the data bit length L of the first array is set to 36 bits. Specifically, the number K of the second arrays can be set to 6, and the data bit lengths of the K second arrays are guaranteed to be the same. In this case, the size of the character matrix is 2 L / K , where L is the data bit length of the first array, as shown in Table 1, which is a size of 2 provided by an embodiment of the present invention. 6 Character matrix.
[0087] For example, the first array is a 36-bit binary string, which is cut into six 6-bit binary character strings, and six displayable characters are obtained after being mapped by the visible character mapping set.
[0088] For a 6-bit binary string, map the 6 second arrays to the 31-bit displayable character array in turn until all 6 second arrays are mapped. Specifically:
[0089]
[0090] Wherein, λ is the character matrix, a[i] is the truncated bit (6 bits), 0x3F is a fixed value, which is converted to decimal 63, and binary 00111111. It should be noted that the fixed value 0x3F is selected in this application because the number of truncated bits is 6 bits, which makes it easier to implement the "&" operation. In actual applications, other fixed values can also be selected.
[0091] For example, if the intercepted bit is: a[i]=(101001)2, then calculate: a[i]&0x3F=101001B (binary)=41D (decimal), where λ 41 Indicates the 41st displayable character in the character matrix, which corresponds to the size 2 in Table 1. 6 The displayable characters in the character matrix are: E.
[0092] Table 1 is a table of size 2 6 Character Matrix
[0093] 0 1 2 3 4 5 6 7 0 0 1 2 3 4 5 6 7 1 8 9 a <![CDATA[b1]]> <![CDATA[c1]]> d e f 2 g h <![CDATA[i1]]> j <![CDATA[k1]]> <![CDATA[l1]]> m n 3 o p q r <![CDATA[s1]]> t u v 4 w x y z A <![CDATA[B1]]> <![CDATA[C1]]> D 5 E F G H I J <![CDATA[K1]]> <![CDATA[L1]]> 6 M N O P Q R <![CDATA[S1]]> T 7 U V W X Y Z - _
[0094] Step 150: Concatenate the service identifier and the mapping character array to obtain a short link address of the push information.
[0095] like Figure 2 As shown, when generating the short link address of the push information, it is also necessary to obtain the business identifier corresponding to the push information, and concatenate the business identifier and the mapping character array. It should be noted that the complete short link address also includes the domain name corresponding to the business, that is, the short link address of the push information is: domain name / business identifier / mapping character array, wherein the business identifier is used to indicate the business category of the push information. In this way, when the short link address of the push information is obtained, the business category of the push information can be pre-judged without entering the interface corresponding to the short link address.
[0096] The embodiment of the present invention provides a short link generation method, first, obtaining a service identifier and a long link address of push information, then obtaining summary information of the long link address; and, intercepting a first array from the summary information; and mapping the first array to a mapping character array based on a displayable character mapping set; finally, concatenating the service identifier and the mapping character array to obtain the short link address of the push information. By applying the technical solution provided by the present invention, when the push information of a service is triggered, the service identifier and the original character string corresponding to the long link address of the service can be obtained, and based on the summary algorithm, the interception algorithm and the displayable character mapping set, the mapping character group corresponding to the original character string can be obtained, thereby combining the service identifier to obtain the short link address of the push information of the service, reducing the complexity of the push information, and reducing the probability of misrecognition of the push information.
[0097] Figure 3 FIG. 1 is a schematic diagram showing a structure of an embodiment of a short link generation device provided by an embodiment of the present invention. Figure 3 As shown, the short link generation device 300 includes: an acquisition module 310 , a summary information extraction module 320 , a capture module 330 , a mapping module 340 and a short link generation module 350 .
[0098] The acquisition module 310 is used to acquire the service identifier and long link address of the push information.
[0099] The summary information extraction module 320 is used to obtain the summary information of the long link address.
[0100] The interception module 330 is used to intercept a first array from the summary information.
[0101] The mapping module 340 is used to map the first array into a mapping character array based on a displayable character mapping set.
[0102] The short link generation module 350 is used to concatenate the service identifier and the mapping character array to obtain the short link address of the push information.
[0103] In an optional manner, the summary information extraction module 320 is used to intercept a first array of a preset length starting from the M+ith bit of the summary information, where i is an integer and 0≤i≤61; and M is a padding bit of a summary algorithm in the summary information.
[0104] In an optional manner, the data bit length of the first array is L, and L≤SM-i+1; wherein S is the length of the summary information.
[0105] In an optional manner, the mapping module 340 is used to cut the first array into K second arrays, where K is an integer and K is smaller than the data bit length of the first array.
[0106] Based on the displayable character mapping set, the K second arrays are mapped into K third arrays; and the K third arrays are concatenated to obtain the mapped character array.
[0107] In an optional manner, the data bits of the K second arrays have the same length.
[0108] In an optional manner, the displayable character mapping set is a character matrix, and the size of the character matrix is 2 L / K , where L is the data bit length of the first array, K is an integer, and K is less than the data bit length of the first array.
[0109] In an optional manner, the service identifier is used to indicate the service category of the push information.
[0110] An embodiment of the present invention provides a short link generation device, which first obtains a service identifier and a long link address of push information, and then obtains summary information of the long link address; then, and, extracts a first array from the summary information; and based on a displayable character mapping set, maps the first array to a mapping character array; finally, concatenates the service identifier and the mapping character array to obtain the short link address of the push information. By applying the technical solution provided by the present invention, when the push information of a service is triggered, the service identifier and the original character string corresponding to the long link address of the service can be obtained, and based on the summary algorithm, the interception algorithm and the displayable character mapping set, the mapping character group corresponding to the original character string can be obtained, thereby combining the service identifier to obtain the short link address of the push information of the service, thereby reducing the complexity of the push information and reducing the probability of misrecognition of the push information.
[0111] Figure 4 A schematic structural diagram of an embodiment of a short link generation device provided by an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the short link generation device.
[0112] like Figure 4 As shown, the short link generation device may include: a processor (processor) 402 , a communication interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .
[0113] The processor 402, the communication interface 404, and the memory 406 communicate with each other via the communication bus 408. The communication interface 404 is used to communicate with other devices such as a client or other server network elements. The processor 402 is used to execute the program 410, which can specifically execute the relevant steps in the above-mentioned embodiment of the method for generating a short link.
[0114] Specifically, the program 410 may include program code including computer executable instructions.
[0115] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the short link generation device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0116] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0117] The program 40 can be specifically called by the processor 402 to enable the short link generation device to perform the following operations:
[0118] Get the business ID and long link address of the push information.
[0119] Get summary information of the long link address.
[0120] A first array is extracted from the summary information.
[0121] Based on a displayable character mapping set, the first array is mapped into a mapping character array.
[0122] The service identifier and the mapping character array are concatenated to obtain the short link address of the push information.
[0123] In an optional manner, the step of extracting the first array from the summary information based on the interception algorithm is specifically:
[0124] Starting from the M+ith bit of the summary information, a first array of a preset length is intercepted, wherein i is an integer and 0≤i≤61; and M is a padding bit of the summary algorithm in the summary information.
[0125] In an optional manner, the data bit length of the first array is L, and L≤SM-i+1; wherein S is the length of the summary information.
[0126] In an optional manner, the step of mapping the first array into a mapping character array based on the displayable character mapping set is specifically:
[0127] The first array is cut into K second arrays, where K is an integer and K is smaller than the data bit length of the first array.
[0128] Based on the displayable character mapping set, the K second arrays are mapped into K third arrays; and the K third arrays are concatenated to obtain the mapped character array.
[0129] In an optional manner, the data bits of the K second arrays have the same length.
[0130] In an optional manner, the displayable character mapping set is a character matrix, and the size of the character matrix is 2 L / K, where L is the data bit length of the first array, where K is an integer, and K is less than the data bit length of the first array.
[0131] In an optional manner, the service identifier is used to indicate the service category of the push information.
[0132] A short link generation device provided by an embodiment of the present invention, wherein a memory 406 of the short link generation device is used to store a program 410, and the program 410 can be specifically called by a processor 402 to implement: obtaining a service identifier and a long link address of push information, and then obtaining summary information of the long link address; and, intercepting a first array from the summary information; and mapping the first array to a mapping character array based on a displayable character mapping set; finally, concatenating the service identifier and the mapping character array to obtain the short link address of the push information. By applying the technical solution provided by the present invention, when the push information of a service is triggered, the service identifier and the original character string corresponding to the long link address of the service can be obtained, and based on the summary algorithm, the interception algorithm and the displayable character mapping set, the mapping character group corresponding to the original character string can be obtained, thereby combining the service identifier to obtain the short link address of the push information of the service, reducing the complexity of the push information, and reducing the probability of misrecognition of the push information.
[0133] An embodiment of the present invention provides a computer-readable storage medium, which stores at least one executable instruction. When the executable instruction is executed on a short link generation device / apparatus, the short link generation device / apparatus executes the short link generation method in any of the above method embodiments.
[0134] The executable instructions may be specifically used to enable the short link generation device / apparatus to perform the following operations:
[0135] Get the business ID and long link address of the push information.
[0136] Get summary information of the long link address.
[0137] A first array is extracted from the summary information.
[0138] Based on a displayable character mapping set, the first array is mapped into a mapping character array.
[0139] The service identifier and the mapping character array are concatenated to obtain the short link address of the push information.
[0140] In an optional manner, the step of extracting the first array from the summary information based on the interception algorithm is specifically:
[0141] Starting from the M+ith bit of the summary information, a first array of a preset length is intercepted, wherein i is an integer and 0≤i≤61; and M is a padding bit of the summary algorithm in the summary information.
[0142] In an optional manner, the data bit length of the first array is L, and L≤SM-i+1; wherein S is the length of the summary information.
[0143] In an optional manner, the step of mapping the first array into a mapping character array based on the displayable character mapping set is specifically:
[0144] The first array is cut into K second arrays, where K is an integer and K is smaller than the data bit length of the first array.
[0145] Based on the displayable character mapping set, the K second arrays are mapped into K third arrays; and the K third arrays are concatenated to obtain the mapped character array.
[0146] In an optional manner, the data bits of the K second arrays have the same length.
[0147] In an optional manner, the displayable character mapping set is a character matrix, and the size of the character matrix is 2 L / K , where L is the data bit length of the first array, where K is an integer, and K is less than the data bit length of the first array.
[0148] In an optional manner, the service identifier is used to indicate the service category of the push information.
[0149] A computer-readable storage medium is provided in an embodiment of the present invention. When the executable instructions stored in the computer-readable storage medium are executed, the service identifier and long link address of the push information are obtained, and then the summary information of the long link address is obtained; and a first array is intercepted from the summary information; and based on a displayable character mapping set, the first array is mapped to a mapping character array; finally, the service identifier and the mapping character array are concatenated to obtain the short link address of the push information. By applying the technical solution provided by the present invention, when the push information of the service is triggered, the service identifier and the original character string corresponding to the long link address of the service can be obtained, and based on the summary algorithm, the interception algorithm and the displayable character mapping set, the mapping character group corresponding to the original character string can be obtained, so as to obtain the short link address of the push information of the service in combination with the service identifier, reduce the complexity of the push information, and reduce the probability of misrecognition of the push information.
[0150] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system or other device. In addition, the embodiments of the present invention are not directed to any particular programming language.
[0151] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. Similarly, in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself is a separate embodiment of the present invention.
[0152] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.
[0153] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A short link generation method, characterized in that: The short link generation method comprises: Get the business ID and long link address of the push information; Obtain summary information of the long link address; Extracting a first array from the summary information; Based on the displayable character mapping set, mapping the first array into a mapping character array; The service identifier and the mapping character array are concatenated to obtain the short link address of the push information.
2. The short link generation method according to claim 1, characterized in that: The step of extracting the first array from the summary information based on the interception algorithm is specifically as follows: Starting from the M+ith bit of the summary information, a first array of a preset length is intercepted, wherein i is an integer and 0≤i≤61; and M is a padding bit of the summary algorithm in the summary information.
3. The short link generation method according to claim 2, characterized in that: The data bit length of the first array is L, and L≤SM-i+1; wherein S is the length of the summary information.
4. The short link generation method according to any one of claims 1 to 3, characterized in that: The step of mapping the first array into a mapping character array based on the displayable character mapping set is specifically: Cut the first array into K second arrays, where K is an integer and K is less than the data bit length of the first array; Based on the displayable character mapping set, the K second arrays are mapped into K third arrays; and the K third arrays are concatenated to obtain the mapped character array.
5. The short link generation method according to claim 4, characterized in that: The K data bits of the second arrays have the same length.
6. The short link generation method according to claim 1, characterized in that: The displayable character mapping set is a character matrix, and the size of the character matrix is 2 L / K , where L is the data bit length of the first array, K is an integer, and K is less than the data bit length of the first array.
7. The short link generation method according to any one of claims 1-3 or 5-6, characterized in that: The service identifier is used to indicate the service category of the push information.
8. A short link generation device, characterized in that: The short link generating device comprises: The acquisition module is used to obtain the business identifier and long link address of the push information; A summary information extraction module, used to obtain summary information of the long link address; An interception module, used for intercepting a first array from the summary information; A mapping module, used for mapping the first array into a mapping character array based on a displayable character mapping set; The short link generation module is used to concatenate the service identifier and the mapping character array to obtain the short link address of the push information.
9. A short link generation device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the short link generation method as described in any one of claims 1-6.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction. When the executable instruction is executed on the short link generation device / apparatus, the short link generation device / apparatus performs the operation of the short link generation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Short link generation method, server, storage medium and computer equipment
CN110851748A
Information pushing method and device, computer equipment and storage medium
CN114491324A