Short link processing method and device, equipment and storage medium
By deploying the transit page on the user side, generating hosted links and establishing a mapping relationship between short links and hosted links, the problem of large short link overhead is solved, and multiple uses of short links and efficient access to applets is achieved.
Patent Information
- Application Number
- CN202311102420.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, short links are expensive because each independent URL Scheme can only be accessed by one user, and other users cannot open the applet through the same URL Scheme again.
By deploying the transit page on the user side, the hosting link of the target applet is generated in real time, and a mapping relationship between the short link of the target applet and the hosting link applied to the instant messaging server is established, so that users on any user side can open the target applet through the hosting link.
It realizes the multiple use of short links, reduces the overhead of short links, and improves the access efficiency of mini programs.
Smart Images

Figure CN119537718A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and specifically relates to a short link processing method, device, equipment and storage medium. Background Art
[0002] At present, it is becoming more and more common to promote business through mini programs in instant messaging software. In instant messaging software, the promoter can share the short link of the mini program with users, and the user can access the corresponding mini program page by triggering the short link (such as clicking).
[0003] In the prior art, users open a transfer page by triggering a short link generated according to a URL Scheme (a mechanism provided by an application to the outside that can directly call the application), and after entering the page, a jump operation is automatically triggered to the specified page of the mini program.
[0004] However, after each independent URL Scheme is accessed by a user, only this user can access and open the corresponding mini program again, and other users cannot open the mini program again through the same URL Scheme, which makes the cost of short links very high. Summary of the invention
[0005] The present application provides a short link processing method, device, equipment and storage medium to solve the above-mentioned problems in the prior art, that is, to solve the problem of high short link overhead.
[0006] In the first aspect, the present invention provides a short link processing method, comprising: in response to a trigger operation of a short link of a target mini-program by any user terminal, obtaining cache data of any user terminal; if there is no cached short link in the cache data, obtaining the request parameters in the short link; obtaining the configuration parameters when the short link is generated according to the request parameters; sending the configuration parameters to an instant messaging server so that the instant messaging server obtains an access token of the target mini-program; receiving the access token of the target mini-program sent by the instant messaging server, and generating a hosted link according to the access token and the configuration parameters; sending the hosted link to any user terminal so that any user terminal is redirected to the target mini-program page according to the hosted link.
[0007] In a possible implementation, after obtaining the cache data of any user terminal, it also includes: if there is a cached short link in the cache data, determining whether the hosted link corresponding to the short link and applied to the instant messaging server is an empty value; if it is not an empty value, sending the hosted link to any user terminal so that any user terminal is redirected to the target mini-program page according to the hosted link; if it is an empty value, obtaining the request parameters in the short link; obtaining the configuration parameters when the short link is generated according to the request parameters; sending the configuration parameters to the instant messaging server so that the instant messaging server obtains the access token of the target mini-program; receiving the access token of the target mini-program sent by the instant messaging server, and generating a hosted link according to the access token and the configuration parameters; sending the hosted link to any user terminal so that any user terminal is redirected to the target mini-program page according to the hosted link.
[0008] In one possible implementation, before responding to a triggering operation of a short link of a target mini-program by any user terminal, it also includes: receiving configuration parameters of the target mini-program sent by the configuration terminal; processing the configuration parameters using a message digest algorithm to obtain a message digest; encoding the message digest to obtain a short link corresponding to the target mini-program; and storing the mapping relationship between the short link corresponding to the target mini-program and the message digest.
[0009] In one possible implementation, the message summary is encoded to obtain a short link corresponding to the target mini program, including: determining the business category of the target mini program; obtaining a classification code corresponding to the business category based on the business category; encoding the message summary to obtain a short link combination; and concatenating the classification code and the short link combination to obtain a short link corresponding to the target mini program.
[0010] In a possible implementation, after the hosting link is generated according to the access token and the configuration parameters, the method further includes: storing a mapping relationship between the hosting link of the target applet and the short link of the target applet in cache data of any user terminal.
[0011] In the second aspect, the present application provides a short link processing device, including: a cache data acquisition module, used to respond to the trigger operation of the short link of the target mini-program by any user terminal, and obtain the cache data of any user terminal; a request parameter acquisition module, used to obtain the request parameters in the short link if there is no cached short link in the cache data; a configuration parameter acquisition module, used to obtain the configuration parameters when the short link is generated according to the request parameters; a configuration parameter sending module, used to send the configuration parameters to the instant messaging server, so that the instant messaging server obtains the access token of the target mini-program; a hosted link generation module, used to receive the access token of the target mini-program sent by the instant messaging server, and generate a hosted link according to the access token and the configuration parameters; a hosted link output module, used to send the hosted link to any user terminal, so that any user terminal is redirected to the target mini-program page according to the hosted link.
[0012] In a third aspect, the present application provides a computer device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, so that the processor executes the short link processing method described in the first aspect.
[0013] In a fourth aspect, the present application provides a computer-readable storage medium, comprising: the computer-readable storage medium stores computer execution instructions, and when a processor executes the computer execution instructions, the short link processing method described in the first aspect is implemented.
[0014] In a fifth aspect, the present application provides a computer program product, including: a computer program, which, when executed by a processor, implements the short link processing method described in the first aspect.
[0015] The short link processing method, device, equipment and storage medium provided in the present application generate a hosted link for opening a target mini-program based on user access, establish a mapping relationship between the short link of the target mini-program and the hosted link applied to the instant messaging server, so that users on any user end can map the short link to the hosted link and open the target mini-program through the hosted link, thereby achieving the effect of multiple uses of the short link and reducing the overhead of the short link. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0017] Figure 1 A schematic diagram of an application scenario of the short link processing method provided in an embodiment of the present application;
[0018] Figure 2 Schematic diagram of the short link processing method provided in the embodiment of the present application Figure 1 ;
[0019] Figure 3 Schematic diagram of the short link processing method provided in the embodiment of the present application Figure 2 ;
[0020] Figure 3-1 A schematic diagram of the service end receiving the configuration parameters of the target applet sent by the configuration end provided by the present application;
[0021] Figure 3-2 A schematic diagram of the coding method of the service category provided for this application;
[0022] Figure 4 A schematic diagram of the structure of a short link processing device provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0025] At present, it is becoming more and more common to promote business through mini-programs in instant messaging software. In instant messaging software, the promoter can share the short link of the mini-program with users, and users can access the corresponding mini-program page by triggering the short link, such as clicking. In the prior art, the user opens the transfer page by triggering the short link generated according to the URL Scheme, and after entering the page, the jump operation is automatically triggered to the mini-program specified page. However, after each independent URL Scheme is accessed by the user, only this user can access and open the corresponding mini-program again, and other users cannot open the mini-program again through the same URL Scheme, which makes the short link cost very high.
[0026] In order to solve the above technical problems, the embodiment of the present application proposes the following technical ideas: considering that after each independent URL Scheme is accessed by a user, other users cannot open it again in the browser through the same URL Scheme, so the transfer page of the business end is deployed locally, and the hosting link of the target applet is generated in real time according to the user's trigger operation on the short link, and the short link of the target applet and the hosting link applied to the instant communication server are established, thereby reducing the cost of the short link. The following is a detailed description using a detailed embodiment.
[0027] Figure 1 Schematic diagram of an application scenario of the short link processing method provided in the embodiment of the present application. Figure 1 As shown, the scenario includes: a user terminal 101, a service terminal 102 and an instant messaging server 103.
[0028] The user end 101 may be any form of terminal, such as a mobile phone, a tablet or a personal computer, etc. The service end 102 may be any form of computer equipment or electronic equipment, etc.
[0029] In response to the triggering operation of the short link of the target mini program by any user terminal, the service terminal 102 obtains the cache data of any user terminal 101 and the request parameters in the short link, processes the request parameters to obtain the configuration parameters for generating the short link, and then sends them to the instant messaging server 103. The instant messaging server 103 (with instant messaging software deployed) generates an access token of the target mini program according to the configuration parameters, generates a hosted link according to the access token and the configuration parameters, and then sends the hosted link to any user terminal 101.
[0030] It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the short link processing method. In other feasible implementations of the present application, the above architecture may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently, which can be determined according to the actual application scenario and is not limited here. Figure 1 The scenarios shown can be implemented by hardware, software, or a combination of software and hardware.
[0031] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0032] Figure 2 Schematic diagram of the short link processing method provided in the embodiment of the present application Figure 1 The execution subject of the embodiment of the present application may be Figure 1 The business end in Figure 2 As shown, the method includes:
[0033] S201: In response to a triggering operation of a short link of a target mini-program by any user terminal, cache data of any user terminal is obtained.
[0034] Specifically, when a user clicks on a short link for a target mini-program outside an instant messaging software, the business end obtains cached data from any user end, and opens a transition page deployed locally, wherein the transition page is embedded in the web-view (referring to the container that hosts the web page) of the target mini-program, and a method for jumping from the browser to the target mini-program is called in the transition page.
[0035] Exemplarily, the user may click on a short link of a target applet in a mobile phone text message on the user end, and in response to the click operation, the user end sends the cached data to the service end.
[0036] S202: Determine whether there is a cached short link in the cache data. If not, execute steps S204 to S208; if yes, execute step S203.
[0037] S203: Determine whether the hosting link corresponding to the short link and applied to the instant messaging server is a null value. If it is a null value, continue to execute S204 to S208; if it is not a null value, execute S208.
[0038] S204: Obtain request parameters in the short link.
[0039] The request parameter in the short link is the content of the short link excluding the protocol name and the short link domain name. For example, in the short link https: / / url.cn / 123x56, the request parameter is "123x56".
[0040] Specifically, it is determined whether there is a short link for the target applet outside the instant messaging software clicked by the user in the cache data of any user terminal. If not, the request parameters in the short link are obtained.
[0041] S205: Acquire configuration parameters for generating a short link according to the request parameters.
[0042] The configuration parameters when generating the short link include program identifier, page path, page parameters and valid days.
[0043] Specifically, the service end finds the configuration parameters matching the short link by querying the storage medium of the service end.
[0044] S206: Send the configuration parameters to the instant messaging server so that the instant messaging server obtains the access token of the target applet.
[0045] Specifically, the configuration parameters matching the short link are sent to the instant messaging server, so that the instant messaging server generates the hosting link parameters of the target applet according to the configuration parameters, and obtains the access token of the target applet according to the hosting link parameters of the target applet.
[0046] Among them, the access token is the calling credential of the third-party platform interface. The acquisition of access token is limited. Each access token is valid for 2 hours. When the access token is about to expire, you need to call the interface again to obtain it.
[0047] S207: Receive the access token of the target applet sent by the instant messaging server, and generate a hosting link according to the access token and configuration parameters.
[0048] Specifically, the interface for generating the target applet hosting link is called, and the hosting link of the target applet is generated according to the access token and the configuration parameters of the target applet.
[0049] S208: Send the hosting link to any user terminal, so that any user terminal is redirected to the target mini-program page according to the hosting link.
[0050] Specifically, the business end sends the hosting link to the transition page, so that the transition page jumps from the browser to the target mini-program page according to the hosting link.
[0051] From the description of the above embodiments, it can be seen that the embodiments of the present application generate a hosted link to open the target mini-program based on user access, establish a mapping relationship between the short link of the target mini-program and the hosted link applied to the instant messaging server, so that users on any user end can map the short link to the hosted link and open the target mini-program through the hosted link, thereby achieving the effect of multiple uses of the short link and reducing the overhead of the short link.
[0052] In a possible implementation, after the above step S207, the following further includes:
[0053] The mapping relationship between the hosting link of the target applet and the short link of the target applet is stored in the cache data of any user terminal.
[0054] Specifically, the mapping relationship between the hosting link of the target applet and the short link of the target applet can be stored in the cache data in the form of timestamps. Optionally, if the timestamp of any mapping relationship exceeds the set time limit, the mapping relationship between the hosting link of the target applet and the short link of the target applet in the cache data is deleted.
[0055] From the description of the above embodiments, it can be seen that the embodiments of the present application can reduce the processing operations of the short link on the business end during the validity period by storing the mapping relationship between the hosted link of the target mini program and the short link of the target mini program on the user end.
[0056] Figure 3 Schematic diagram of the short link processing method provided in the embodiment of the present application Figure 2 .like Figure 3 As shown, before the above step S201, a short link generation process is also included, which specifically includes:
[0057] S301: Receive configuration parameters of the target applet sent by the configuration end.
[0058] Specifically, the service end receives the configuration parameters of the target applet sent by the configuration end. Figure 3-1 A schematic diagram of a business end receiving configuration parameters of a target applet sent by a configuration end provided in this application, such as Figure 3-1 As shown, it includes: program identification, page path, page parameters and valid days. Among them, the program identification is the AppID of the target mini program, the page path is the page where the published mini program exists, and the page parameters are the parameters passed in to obtain certain detailed data in the target mini program.
[0059] S302: Using a message digest algorithm to process the configuration parameters to obtain a message digest.
[0060] Specifically, the configuration parameters of the target applet are processed using a message digest algorithm, for example, using an MD5 algorithm to process the configuration parameters and generate a 32-bit string.
[0061] S303: Encode the message digest to obtain a short link corresponding to the target applet.
[0062] Specifically, step S303 includes Sa~Sd:
[0063] Sa: Determine the business category of the target mini program.
[0064] Sb: According to the business category, obtain the classification code corresponding to the business category.
[0065] Specifically, Figure 3-2 A schematic diagram of the encoding method of the service category provided in this application. Figure 3-2 As shown, the service categories are distinguished by 0-9 or AZ or az, each category is identified by a character, and the mapping relationship between the character UI service category is stored in the database of the service end, and each category includes a 6-bit code.
[0066] Sc: Encode the message digest to obtain a short chain combination.
[0067] Specifically, the 32-bit message digest is encoded. For example, the encoding method can be: divide the 32-bit message digest into 4 8-bit strings, take out one of the 8-bit strings, convert it into hexadecimal first, and then use 0x3FFFFFFF to perform bitwise AND operation to format it into a 30-bit string, and then divide the 30-bit string into 6 5-bit strings, and perform bitwise AND operation on the 6 5-bit strings with 0x3D respectively, in order to format it into a 6-bit string to obtain 6 numbers that can be represented within 61, and use 0-9 and az and AZ to represent numbers from 0 to 61, which can correspond to a 6-bit short chain combination. Perform the same processing on the other 3 8-bit strings to obtain 4 different short chain combinations.
[0068] Sd: Concatenate the classification code and the short link to get the short link corresponding to the target mini program.
[0069] Specifically, one of the four different short link combinations generated is selected, and together with the classification code, it constitutes the request parameter of the short link, and the short link corresponding to the target applet is obtained according to the protocol name, short link domain name and request parameters.
[0070] S304: Store the mapping relationship between the short link corresponding to the target applet and the message digest.
[0071] Specifically, the mapping relationship between a string of 32-bit message digests generated by processing the configuration parameters using the message digest algorithm and the short link corresponding to the target mini program is stored. When you want to generate a short link with the same configuration parameters, first query whether there is a corresponding message digest in the data storage of the business end. If there is a corresponding message digest, no new short link will be generated. If there is no corresponding message digest, a new message digest and the mapping relationship between the short link corresponding to the target mini program are stored in the data storage of the business end.
[0072] From the description of the above embodiments, it can be seen that the embodiments of the present application use a message digest algorithm to process the configuration parameters of the target applet to obtain the request parameters of the short link, and map and store the message digest of the target applet and the short link corresponding to the target applet, which can reduce the use of new short links and further reduce the overhead of short links.
[0073] Figure 4 This is a schematic diagram of the structure of the short link processing device provided in the embodiment of the present application. Figure 4 As shown, the short link processing device includes: a cache data acquisition module 401, a request parameter acquisition module 402, a configuration parameter acquisition module 403, a configuration parameter sending module 404, a hosted link generation module 405 and a hosted link output module 406.
[0074] The cache data acquisition module 401 is used to acquire cache data of any user terminal in response to a trigger operation of any user terminal on a short link of a target mini program.
[0075] The request parameter acquisition module 402 is used to acquire the request parameters in the short link if there is no cached short link in the cache data.
[0076] The configuration parameter acquisition module 403 is used to acquire the configuration parameters when generating the short link according to the request parameters.
[0077] The configuration parameter sending module 404 is used to send the configuration parameters to the instant messaging server so that the instant messaging server obtains the access token of the target applet.
[0078] The hosting link generation module 405 is used to generate a hosting link according to the access token and configuration parameters.
[0079] The hosted link output module 406 is used to send the hosted link to any user terminal, so that any user terminal is redirected to the target mini-program page according to the hosted link.
[0080] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0081] In a possible implementation, the short link processing device further includes: a null value judgment module 407 , a managed link sending module 408 , and a managed link request module 409 .
[0082] The null value judgment module 407 is used to judge whether the hosting link applied to the instant communication server corresponding to the short link is a null value if there is a cached short link in the cache data.
[0083] The hosted link sending module 408 is used to send the hosted link to any user terminal if it is not a null value, so that any user terminal is redirected to the target mini-program page according to the hosted link.
[0084] The hosted link request module 409 is used to obtain the request parameters in the short link if it is an empty value; obtain the configuration parameters when the short link is generated according to the request parameters; send the configuration parameters to the instant messaging server so that the instant messaging server obtains the access token of the target mini-program; receive the access token of the target mini-program sent by the instant messaging server, and generate a hosted link according to the access token and the configuration parameters; send the hosted link to any user terminal so that any user terminal is redirected to the target mini-program page according to the hosted link.
[0085] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0086] In a possible implementation, the short link processing device further includes: a configuration parameter receiving module 410 , a message digest processing module 411 , an encoding processing module 412 and a mapping relationship storage module 413 .
[0087] The configuration parameter receiving module 410 is used to receive the configuration parameters of the target applet sent by the configuration end.
[0088] The message digest processing module 411 is used to process the configuration parameters using a message digest algorithm to obtain a message digest.
[0089] The encoding processing module 412 is used to encode the message digest to obtain a short link corresponding to the target applet.
[0090] The mapping relationship storage module 413 is used to store the mapping relationship between the short link corresponding to the target applet and the message digest.
[0091] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0092] In a possible implementation, the encoding processing module 412 is specifically used to determine the business category of the target mini program. According to the business category, a classification code corresponding to the business category is obtained. The message digest is encoded to obtain a short link combination. The classification code and the short link combination are concatenated to obtain a short link corresponding to the target mini program.
[0093] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0094] In a possible implementation, the short link processing device further includes: a short link cache module 414.
[0095] The short link cache module 414 is used to store the mapping relationship between the hosting link of the target applet and the short link of the target applet in the cache data of any user terminal.
[0096] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be repeated here.
[0097] Figure 5A schematic diagram of the structure of a computer device provided for an embodiment of the present application. It shows a schematic diagram of the structure of a computer device suitable for implementing an embodiment of the present application, and the computer device may be a terminal device or a server. Among them, the terminal device may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (Portable Media Players, PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0098] like Figure 5 As shown, the computer device may include a processor (such as a central processing unit, a graphics processing unit, etc.) 501, and a memory 502 connected to the processor in communication, and the memory 502 may be a read-only memory (ROM). The processor 501 may perform various appropriate actions and processes according to the program stored in the memory 502, the computer execution instruction, or the program loaded from the storage device 508 to the random access memory (RAM) 503, to implement the short link processing method in any of the above embodiments. In the RAM 503, various programs and data required for the operation of the computer device are also stored. The processing device 501, the memory 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0099] Typically, the following devices may be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 509. The communication devices 509 may allow the computer device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 A computer device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0100] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the memory 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present application are executed.
[0101] It should be noted that the computer-readable storage medium mentioned above in the present application may be a computer-readable signal medium or a computer storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable storage medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0102] The computer-readable storage medium may be included in the computer device; or may exist independently without being installed in the computer device.
[0103] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the computer device, the computer device executes the method shown in the above embodiment.
[0104] The computer program code for performing the operation of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0105] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0106] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the unit does not constitute a limitation on the module itself in some cases.
[0107] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0108] The present application also provides a computer-readable storage medium, which stores computer execution instructions. When the processor executes the computer execution instructions, the technical solution of the short link processing method in any of the above embodiments is implemented. Its implementation principle and beneficial effects are similar to the implementation principle and beneficial effects of the short link processing method. Please refer to the implementation principle and beneficial effects of the short link processing method, which will not be repeated here.
[0109] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0110] The present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the technical solution of the short link processing method in any of the above embodiments. Its implementation principle and beneficial effects are similar to the implementation principle and beneficial effects of the short link processing method. Please refer to the implementation principle and beneficial effects of the short link method, which will not be repeated here.
[0111] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
[0112] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0113] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A short link processing method, characterized in that: Applied to the business side, including: In response to a triggering operation of any user terminal on a short link of a target mini-program, acquiring cache data of any user terminal; If the short link is not cached in the cache data, obtaining the request parameters in the short link; Acquire the configuration parameters when generating the short link according to the request parameters; Sending the configuration parameters to an instant messaging server so that the instant messaging server obtains an access token of the target applet; Receiving the access token of the target applet sent by the instant messaging server, and generating a hosting link according to the access token and the configuration parameters; The hosting link is sent to any one of the user terminals, so that any one of the user terminals is redirected to the target mini-program page according to the hosting link.
2. The method according to claim 1, characterized in that: After obtaining the cache data of any user terminal, the method further includes: If the short link is cached in the cache data, determining whether the hosting link corresponding to the short link and applied to the instant communication server is a null value; If it is not a null value, the hosting link is sent to any one of the user terminals, so that any one of the user terminals is redirected to the target mini-program page according to the hosting link; If it is an empty value, obtain the request parameters in the short link; obtain the configuration parameters when the short link is generated according to the request parameters; send the configuration parameters to the instant messaging server so that the instant messaging server obtains the access token of the target mini-program; receive the access token of the target mini-program sent by the instant messaging server, and generate a hosted link according to the access token and the configuration parameters; send the hosted link to any user terminal so that any user terminal is redirected to the target mini-program page according to the hosted link.
3. The method according to claim 1, characterized in that: Before responding to the triggering operation of the short link of the target applet by any user terminal, the method further includes: Receive configuration parameters of the target applet sent by the configuration terminal; Processing the configuration parameters using a message digest algorithm to obtain a message digest; Encoding the message digest to obtain a short link corresponding to the target applet; The mapping relationship between the short link corresponding to the target applet and the message digest is stored.
4. The method according to claim 3, characterized in that The encoding process of the message digest to obtain a short link corresponding to the target applet includes: Determine the business category of the target applet; According to the business category, obtaining a classification code corresponding to the business category; Encoding the message digest to obtain a short chain combination; The classification code and the short link combination are concatenated to obtain a short link corresponding to the target applet.
5. The method according to any one of claims 1 to 4, characterized in that: After generating the hosting link according to the access token and the configuration parameters, the method further includes: The mapping relationship between the hosting link of the target applet and the short link of the target applet is stored in the cache data of any one of the user terminals.
6. A short link processing device, characterized in that: include: A cache data acquisition module, configured to acquire cache data of any user terminal in response to a trigger operation of a short link of a target mini program by any user terminal; A request parameter acquisition module, used for acquiring the request parameters in the short link if the short link is not cached in the cache data; A configuration parameter acquisition module, used to acquire the configuration parameters when generating the short link according to the request parameters; A configuration parameter sending module, used for sending the configuration parameters to an instant messaging server, so that the instant messaging server obtains an access token of the target applet; A hosting link generation module, used to receive the access token of the target applet sent by the instant messaging server, and generate a hosting link according to the access token and the configuration parameters; The hosted link output module is used to send the hosted link to any one of the user terminals so that any one of the user terminals is redirected to the target mini-program page according to the hosted link.
7. The device according to claim 6, characterized in that Also includes: A null value judgment module, used for judging whether the hosting link applied to the instant communication server corresponding to the short link is a null value if the short link is cached in the cache data; A hosting link sending module, for sending the hosting link to any of the user terminals if the value is not null, so that any of the user terminals is redirected to the target mini-program page according to the hosting link; A managed link request module, used to obtain the request parameters in the short link if it is a null value; obtain the configuration parameters when the short link is generated according to the request parameters; send the configuration parameters to the instant communication server so that the instant communication server obtains the access token of the target applet; Receiving the access token of the target applet sent by the instant messaging server, and generating a hosting link according to the access token and the configuration parameters; The hosting link is sent to any one of the user terminals, so that any one of the user terminals is redirected to the target mini-program page according to the hosting link.
8. A computer device, characterized in that: It comprises a processor and a memory connected to the processor in communication; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes the method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 5 is implemented.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 5 when being executed by a processor.