Application push method, platform and device
By using a unified application interface and token management function, the problems of service anomalies caused by WeChat application token refresh and fragmented electronic invoice services have been solved, achieving efficient application access and simplified system maintenance.
Patent Information
- Application Number
- CN202311499259.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-10
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2043-11-10
AI Technical Summary
The token refresh mechanism in the existing WeChat application has caused some applications to malfunction, and the electronic invoice service is scattered across various systems, making maintenance and troubleshooting difficult.
It provides a unified application interface and token management function. By receiving user request signals, it generates a redirect address for authorization and authentication, and caches the call data in Redis, thus realizing a unified application interface call and token management.
It saves manpower costs, improves the efficiency of requesting access to the application, avoids application anomalies caused by token refresh, and simplifies system maintenance and troubleshooting.
Smart Images

Figure CN117459296B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an application push method, platform and device. Background Art
[0002] Currently, all applications involving WeChat are deployed independently, and each system interacts with the WeChat platform. However, the interface of the WeChat platform has a token mechanism, so some applications may not be able to provide normal services after the token is refreshed, which is not convenient for the construction of subsequent new systems. In addition, the existing electronic invoice services and invoice push are scattered within each system, making maintenance, upgrading and troubleshooting difficult. Summary of the invention
[0003] The present invention provides an application push method, platform and device, which can provide a unified application interface, save labor costs and improve the efficiency of requesting access to applications.
[0004] In order to solve the above technical problem, a first aspect of the present invention provides an application push method, comprising:
[0005] Receive a request signal from a user terminal for a first application; wherein the request signal includes the first application address, the first application ID, the user ID and a number of custom parameters;
[0006] Determine an authorized application ID and an application authorization mode of the authorized application according to the first application ID;
[0007] Generate a first redirection address according to the authorized application ID, the application authorization mode of the authorized application and the plurality of custom parameters;
[0008] Sending the first redirection address and the authorization request signal to the user terminal;
[0009] When the user terminal agrees to the authorization, the page of the user terminal is redirected to the authorized application according to the callback address in the first redirect address;
[0010] The relevant parameters carried in the process of redirecting the user's page to the authorized application are cached, and the preconfigured second redirection address is sent to the user, so that the user requests the first application according to the second redirection address.
[0011] Furthermore, the user terminal requests the first application according to the second redirection address, further comprising:
[0012] When the user terminal requests the first application, receiving an information request signal sent by the first application, and sending corresponding information to the first application;
[0013] When the user terminal requests the first application, receiving a first interface calling signal sent by the first application;
[0014] Querying whether the user terminal has the calling authority of the first interface;
[0015] If the user terminal has the calling authority of the first interface, the first interface is called, and the request of the user terminal is completed according to the first interface calling signal.
[0016] Furthermore, before calling the first interface and completing the request of the user terminal according to the first interface calling signal, it also includes:
[0017] When the first interface is in the authorized application, query the call token in redis, and call the authorized application according to the call token;
[0018] Receive the first data returned by the authorized application, send the first data to the first application, and cache the first data in redis.
[0019] Furthermore, when the first interface is in the authorized application, the calling token is queried in redis, specifically:
[0020] When the calling token does not exist in redis, the first parameter of the first application is obtained in redis;
[0021] Use the first parameter to call any interface of the authorization application to generate a call token, set an expiration time for the call token, and cache the call token in redis.
[0022] Furthermore, before generating the first redirection address according to the authorized application ID, the application authorization mode of the authorized application and the plurality of custom parameters, the method further includes:
[0023] Querying whether there is a login cache of the user terminal in redis according to the user id;
[0024] If the login cache of the user client does not exist in redis, a login authorization operation is performed on the user client.
[0025] Furthermore, the receiving a request signal from the user terminal for the first application further includes:
[0026] Determining whether the user terminal needs to log in to the authorized application when requesting the first application;
[0027] If the user terminal does not need to log in to the authorized application when requesting the first application, the second redirection address is directly sent to the user terminal, so that the user terminal requests the first application according to the second redirection address.
[0028] The first aspect of the present invention provides an application push method. When a request signal for a first application is received from a user terminal, an authorized application ID and an application authorization mode of the authorized application are determined according to the first application ID, a first redirection address is generated, and the first redirection address is sent to the user terminal to complete the authorization authentication. Then, a pre-configured second redirection address is sent to the user terminal so that the user terminal requests to access the first application. In the process of requesting the first application, if a first interface needs to be called, the application push platform is used to call it and store the corresponding call data. The present invention provides a unified application interface and token management function, and can obtain relevant information through the interface, saving labor costs and improving the efficiency of requesting access to applications.
[0029] A second aspect of the present invention provides an application push platform, including: a WeChat interface, an invoice interface, a payment interface, and other interfaces;
[0030] When the user terminal requests the WeChat interface, control the user terminal to log in to WeChat, and send the redirection address of WeChat to the user terminal, so that the user terminal completes the login authorization, calls the WeChat interface and stores the corresponding call data;
[0031] When the user terminal requests the invoice interface or the payment interface, control the user terminal to call the WeChat interface and obtain key data openid, call the invoice interface or the payment interface according to the key data openid and store corresponding call data;
[0032] When the user terminal requests the other interface, the user terminal is controlled to call the other interface and store corresponding calling data; wherein the other interface includes a text message push interface, an email push interface and a general internal interface.
[0033] Furthermore, when the user terminal requests the WeChat interface, the user terminal is controlled to log in to WeChat, and the redirection address of WeChat is sent to the user terminal, specifically:
[0034] Receive a WeChat interface request signal from a user terminal; wherein the WeChat interface request signal includes a WeChat ID, a user ID, and several custom parameters;
[0035] Determine the WeChat application authorization method according to the WeChat ID;
[0036] Generate a redirection address of WeChat according to the WeChat ID, the application authorization method of WeChat and the plurality of custom parameters;
[0037] The redirection address of WeChat and the authorization request signal are sent to the user terminal.
[0038] Furthermore, the application push platform further includes:
[0039] When a user terminal requests an interface on the application push platform, query whether the user terminal has the calling authority of the corresponding interface;
[0040] If the user terminal has the calling authority, the interface is called and the corresponding calling data is stored.
[0041] The second aspect of the present invention provides an application push platform, including a WeChat interface, an invoice interface, a payment interface and other interfaces; when a user terminal requests the WeChat interface, the user terminal is controlled to log in to WeChat, and the redirection address of WeChat is sent to the user terminal, so that the user terminal completes the login authorization, and calls the WeChat interface and stores the corresponding call data; when the user terminal requests the invoice interface or requests the payment interface, the user terminal is controlled to call the WeChat interface and obtain key data openid, and the invoice interface or the payment interface is called according to the key data openid and the corresponding call data is stored; when the user terminal requests the other interfaces, the user terminal is controlled to call the other interfaces and store the corresponding call data. The present invention provides a unified application interface and token management function, which can obtain relevant information through the interface, save labor costs, and improve the efficiency of requesting access to applications.
[0042] A third aspect of the present invention provides an application push device, comprising: a receiving module, a determining module, a generating module, a sending module, a jumping module and a requesting module;
[0043] The receiving module is used to receive a request signal from the user end for the first application; wherein the request signal includes the first application address, the first application ID, the user ID and a number of custom parameters;
[0044] The determination module is used to determine the authorized application ID and the application authorization mode of the authorized application according to the first application ID;
[0045] The generating module is used to generate a first redirection address according to the authorized application ID, the application authorization mode of the authorized application and a plurality of the custom parameters;
[0046] The sending module is used to send the first redirection address and the authorization request signal to the user terminal;
[0047] The jump module is used to jump the page of the user terminal to the authorized application according to the callback address in the first redirect address when the user terminal agrees to the authorization;
[0048] The request module is used to cache the relevant parameters carried in the process of redirecting the user's page to the authorized application, and send the preconfigured second redirection address to the user, so that the user requests the first application according to the second redirection address.
[0049] The third aspect of the present invention provides an application push device, which is based on the organic combination of modules. When receiving a request signal from a user terminal for a first application, the authorized application ID and the application authorization mode of the authorized application are determined according to the first user ID, a first redirection address is generated, and the first redirection address is sent to the user terminal to complete the authorization authentication, and then a pre-configured second redirection address is sent to the user terminal so that the user terminal requests to access the first application. In the process of requesting the first application, if the first interface needs to be called, the application push platform is used to call it and store the corresponding call data. The present invention provides a unified application interface and token management function, and can obtain relevant information through the interface, saving labor costs and improving the efficiency of requesting access to applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A flowchart of an embodiment of the application push method provided by the present invention;
[0051] Figure 2 A flowchart of an embodiment of the WeChat application authorization method provided by the present invention;
[0052] Figure 3 A schematic diagram of the structure of an embodiment of the application push platform provided by the present invention;
[0053] Figure 4 A schematic diagram of the structure of an embodiment of the application push device provided by the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] Example 1
[0056] See also Figure 1 , is a flow chart of an embodiment of the application push method provided by the present invention, the method includes steps 101 to 106, each step is specifically as follows:
[0057] Step 101: Receive a request signal from a user terminal for a first application; wherein the request signal includes a first application address, a first application ID, a user ID, and a number of custom parameters.
[0058] Step 102: Determine the authorized application ID and the application authorization mode of the authorized application according to the first application ID.
[0059] Step 103: Generate a first redirection address according to the authorized application ID, the application authorization mode of the authorized application and a plurality of the custom parameters.
[0060] Furthermore, in the first embodiment of the present invention, before generating the first redirection address according to the authorized application ID, the application authorization mode of the authorized application and the plurality of the custom parameters, the method further includes:
[0061] Querying whether there is a login cache of the user terminal in redis according to the user id;
[0062] If the login cache of the user client does not exist in redis, a login authorization operation is performed on the user client.
[0063] Step 104: Send the first redirection address and the authorization request signal to the user terminal.
[0064] Step 105: When the user terminal agrees to the authorization, the page of the user terminal is redirected to the authorized application according to the callback address in the first redirection address.
[0065] Step 106: Cache the relevant parameters carried in the process of redirecting the user's page to the authorized application, and send the pre-configured second redirection address to the user, so that the user requests the first application according to the second redirection address.
[0066] As an example of the first embodiment of the present invention, the unified authorization interface of WeChat webpage in the application push platform is different from other interfaces of WeChat. This interface is not called in the form of an interface, but directly called in the form of accessing a URL address in the GET mode. The WeChat client will access the platform address and finally request a certain address of the actual application. When requesting the application, it carries the user information obtained from the WeChat end, thereby achieving the purpose of unified authorization access. See Figure 2, is a flow chart of an embodiment of the WeChat application authorization method provided by the present invention. In the first step, the user requests the address of the application push platform by scanning a code or clicking a link; the application push platform determines which public account information needs to be used according to the information of the link and the redis cache, determines whether a login operation has been performed, etc. If redis has no cache, a login authorization operation needs to be performed first, and then a first redirection address for requesting WeChat is spliced out; in the second step, the first redirection address is returned to the user, and the user will directly jump to WeChat after receiving the first redirection address; in the third step, enter the WeChat login authorization, and when the user clicks to agree to the authorization, it will be based on the callback address parameter in the first redirection address It will jump and carry relevant parameters such as openid. In the fourth step, it will call back to the application push platform, which will save and cache the relevant parameters. In the fifth step, it will send the second redirection address (i.e. the front-end address of the actual application) that has been configured in the background to the user to complete the entire login authorization process. In the sixth step, the user begins to request specific application data, some of which, such as user information, order information, invoice card packages, etc., are stored on the application push platform. Therefore, in the seventh step, the actual application needs to obtain information from the application push platform. In addition, the actual application can also call functions such as sending text messages, launching WeChat reminder messages, obtaining WeChat tokens, and storing them in WeChat card packages. Among them, Figure 2 The parameter aisinoId is the ID provided by the application push platform, and state is a parameter customized by the application system. When the request is made to the actual application, the state will be returned to the actual application with its original value. The final method of making the request to the actual application is determined by the platform configuration.
[0067] Furthermore, in the first embodiment of the present invention, before calling the first interface and completing the request of the user terminal according to the first interface calling signal, it also includes:
[0068] When the first interface is in the authorized application, query the call token in redis, and call the authorized application according to the call token;
[0069] Receive the first data returned by the authorized application, send the first data to the first application, and cache the first data in redis.
[0070] Further, in the first embodiment of the present invention, when the first interface is in the authorized application, the calling token is queried in redis, specifically:
[0071] When the calling token does not exist in redis, the first parameter of the first application is obtained in redis;
[0072] Use the first parameter to call any interface of the authorization application to generate a call token, set an expiration time for the call token, and cache the call token in redis.
[0073] In the first embodiment of the present invention, the background management of the application push platform will cache all configurations to redis, and the data returned after calling the WeChat interface will also be cached to redis. For example, after obtaining user information, the user information will be cached to redis. When the user requests to push, if there is content in redis, it will be directly and quickly obtained from redis. Most of the data in the WeChat interface will have an expiration time. Calling token is a necessary parameter for requesting the WeChat interface. When the user wants to call certain WeChat interfaces through the application push platform, the application push platform will first check from redis whether the calling token has been cached. If the calling token cannot be found, it will obtain the configuration application id or secret key and other parameters from redis, call a WeChat interface to exchange for the token again, cache it in redis, and set the token expiration time. When the token expires, repeat the above steps to reset the token. Therefore, the application push platform will handle the expiration of the token, and the application does not need to record the token expiration again, thereby avoiding the situation where the application cannot be used normally due to the failure to update the token in time. At the same time, the application can also cache the token locally according to the returned expiration time.
[0074] Furthermore, in the first embodiment of the present invention, the user terminal requests the first application according to the second redirection address, further comprising:
[0075] When the user terminal requests the first application, receiving an information request signal sent by the first application, and sending corresponding information to the first application;
[0076] When the user terminal requests the first application, receiving a first interface calling signal sent by the first application;
[0077] Querying whether the user terminal has the calling authority of the first interface;
[0078] If the user terminal has the calling authority of the first interface, the first interface is called, and the request of the user terminal is completed according to the first interface calling signal.
[0079] As an example of the first embodiment of the present invention, when the user terminal requests an actual application, it is necessary to first query whether the user terminal has the authority of the actual application. Among them, the interface authority setting can first create a new top-level interface in the background management configuration, and add custom parameters at the same time. Multiple non-top-level interfaces can be configured under the top-level interface; for example, a new top-level payment interface is created, and the custom parameter is PAY, and the non-top-level interfaces are set up for pre-order PAY_WX_ORDER, order query PAY_WX_QUERY, and red envelope distribution PAY_WX_REDCASH, etc. After setting the authority, the authority is allocated, and the pre-configured user account is selected. When allocating, check the top-level interface such as PAY for authorization. Then, when the user uses this user account to call the application push platform interface, all non-top-level interfaces under PAY can be called.
[0080] Furthermore, in the first embodiment of the present invention, receiving a request signal from the user terminal for the first application further includes:
[0081] Determining whether the user terminal needs to log in to the authorized application when requesting the first application;
[0082] If the user terminal does not need to log in to the authorized application when requesting the first application, the second redirection address is directly sent to the user terminal, so that the user terminal requests the first application according to the second redirection address.
[0083] In the first embodiment of the present invention, if the first application that the user requests to access does not require authorization authentication of the authorized application, only the application push platform authentication is required. For example, if the first application saves the application ID or key and other parameters of the application push platform, the push platform can be directly called. When user A, user B and user C all need to request access to the first application, the application push platform of the present invention provides a unified interface, avoiding users from writing their own interface-related codes, saving labor costs, and improving the efficiency of requesting access to applications.
[0084] In summary, the first embodiment of the present invention provides an application push method. When a request signal for a first application is received from a user terminal, the authorized application ID and the application authorization method of the authorized application are determined according to the first user ID, a first redirection address is generated, and the first redirection address is sent to the user terminal to complete the authorization authentication, and then the pre-configured second redirection address is sent to the user terminal so that the user terminal requests to access the first application. In the process of requesting the first application, if the first interface needs to be called, the application push platform is used to call it and store the corresponding call data. The present invention provides a unified application interface and token management function, and can obtain relevant information through the interface, saving labor costs and improving the efficiency of requesting access to applications.
[0085] Example 2
[0086] See also Figure 2 , is a schematic diagram of the structure of an embodiment of the application push platform provided by the present invention, the platform includes a WeChat interface, an invoice interface, a payment interface and other interfaces;
[0087] When the user terminal requests the WeChat interface, control the user terminal to log in to WeChat, and send the redirection address of WeChat to the user terminal, so that the user terminal completes the login authorization, calls the WeChat interface and stores the corresponding call data;
[0088] When the user terminal requests the invoice interface or the payment interface, control the user terminal to call the WeChat interface and obtain key data openid, call the invoice interface or the payment interface according to the key data openid and store corresponding call data;
[0089] When the user terminal requests the other interface, the user terminal is controlled to call the other interface and store corresponding calling data; wherein the other interface includes a text message push interface, an email push interface and a general internal interface.
[0090] Further, in the second embodiment of the present invention, when the user terminal requests the WeChat interface, the user terminal is controlled to log in to WeChat, and the redirection address of WeChat is sent to the user terminal, specifically:
[0091] Receive a WeChat interface request signal from a user terminal; wherein the WeChat interface request signal includes a WeChat ID, a user ID, and several custom parameters;
[0092] Determine the WeChat application authorization method according to the WeChat ID;
[0093] Generate a WeChat redirection address according to the WeChat ID, the WeChat application authorization method and the plurality of custom parameters;
[0094] The redirection address of WeChat and the authorization request signal are sent to the user terminal.
[0095] Furthermore, in the second embodiment of the present invention, the application push platform further includes:
[0096] When a user terminal requests an interface on the application push platform, query whether the user terminal has the calling authority of the corresponding interface;
[0097] If the user terminal has the calling authority, the interface is called and the corresponding calling data is stored.
[0098] In the second embodiment of the present invention, when the application push platform receives the user's application request signal, it is necessary to determine whether the application requested by the user requires WeChat authorization and authentication. If necessary, the WeChat interface is requested first, and the redirection address of WeChat is determined according to the WeChat ID and the application authorization method of WeChat, so that the user can complete the login authorization according to the redirection address of WeChat and successfully call the WeChat interface; if the application requested by the user does not require WeChat authorization and authentication, only the authentication of the application push platform is required to call other interfaces. However, other interfaces other than the WeChat interface are also different. For example, the precondition for the payment interface and the invoice interface to be called is to obtain the key data openid after calling the WeChat interface. Only after obtaining the key data openid can the payment interface and the invoice interface be successfully called; other related interfaces that are separated from WeChat, such as the SMS push interface, the email push interface and the general internal interface, etc., can be called directly without calling the WeChat interface.
[0099] As an example of the second embodiment of the present invention, see Figure 3 , is a structural diagram of an embodiment of the application push platform provided by the present invention. The application push platform of the present invention includes a WeChat authorization management module, a general push module, an invoice push module and a WeChat payment module. The functions that can be realized by the platform include system management, push information management and system monitoring. The application push platform of the present invention can centrally manage the relevant interfaces of multiple systems to form a unified interface, and add permission control. Among them, the payment interface, the SMS push interface and the email push interface all call the third-party platform, and the general internal interface mainly maintains the relevant data during the background management, and returns the relevant data when calling the interface. Take the invoice interface as an example to illustrate the application process of the application push platform of the present invention: the application push platform generates a QR code that can enter the invoice interface. The user enters the interface after scanning the QR code. After filling in the company information, the interface of the WeChat invoice header can be obtained by calling the application push platform, so as to display the invoice header on the user interface. After the user selects the invoice header, the invoice can be issued. After the invoice is issued, the user can click the function of saving to the card bag, and click the function to call the application push platform again. The application push platform then calls the interface of saving to the card bag of WeChat, so as to save the invoice to the card bag. After saving, if the invoice is completed, WeChat will send a message to notify the user that the card bag has been saved.
[0100] In summary, the second embodiment of the present invention provides an application push platform, including a WeChat interface, an invoice interface, a payment interface and other interfaces; when the user terminal requests the WeChat interface, the user terminal is controlled to log in to WeChat, and the redirection address of WeChat is sent to the user terminal, so that the user terminal completes the login authorization, and calls the WeChat interface and stores the corresponding call data; when the user terminal requests the invoice interface or requests the payment interface, the user terminal is controlled to call the WeChat interface and obtain key data openid, and the invoice interface or the payment interface is called according to the key data openid and the corresponding call data is stored; when the user terminal requests the other interfaces, the user terminal is controlled to call the other interfaces and store the corresponding call data. The present invention provides a unified application interface and token management function, which can obtain relevant information through the interface, save labor costs, and improve the efficiency of requesting access to applications.
[0101] Example 3
[0102] See also Figure 4 , is a schematic diagram of the structure of an embodiment of an application push device provided by the present invention, the device includes a receiving module 201, a determining module 202, a generating module 203, a sending module 204, a jumping module 205 and a requesting module 206;
[0103] The receiving module 201 is used to receive a request signal from a user terminal for a first application; wherein the request signal includes a first application address, a first application ID, a user ID and a number of custom parameters;
[0104] The determination module 202 is used to determine the authorized application ID and the application authorization mode of the authorized application according to the first application ID;
[0105] The generating module 203 is used to generate a first redirection address according to the authorized application ID, the application authorization mode of the authorized application and a plurality of the custom parameters;
[0106] The sending module 204 is used to send the first redirection address and the authorization request signal to the user terminal;
[0107] The jump module 205 is used to jump the page of the user terminal to the authorized application according to the callback address in the first redirect address when the user terminal agrees to the authorization;
[0108] The request module 206 is used to cache the relevant parameters carried in the process of redirecting the user's page to the authorized application, and send the preconfigured second redirection address to the user, so that the user requests the first application according to the second redirection address.
[0109] Furthermore, in a third embodiment of the present invention, the user terminal requests the first application according to the second redirection address, further comprising:
[0110] When the user terminal requests the first application, receiving an information request signal sent by the first application, and sending corresponding information to the first application;
[0111] When the user terminal requests the first application, receiving a first interface calling signal sent by the first application;
[0112] Querying whether the user terminal has the calling authority of the first interface;
[0113] If the user terminal has the calling authority of the first interface, the first interface is called, and the request of the user terminal is completed according to the first interface calling signal.
[0114] Furthermore, in the third embodiment of the present invention, before calling the first interface and completing the request of the user terminal according to the first interface calling signal, it also includes:
[0115] When the first interface is in the authorized application, query the call token in redis, and call the authorized application according to the call token;
[0116] Receive the first data returned by the authorized application, send the first data to the first application, and cache the first data in redis.
[0117] Furthermore, when the first interface is in the authorized application, the calling token is queried in redis, specifically:
[0118] When the calling token does not exist in redis, the first parameter of the first application is obtained in redis;
[0119] Use the first parameter to call any interface of the authorization application to generate a call token, set an expiration time for the call token, and cache the call token in redis.
[0120] Furthermore, in the third embodiment of the present invention, before generating the first redirection address according to the authorized application ID, the application authorization mode of the authorized application and the plurality of the custom parameters, it also includes:
[0121] Querying whether there is a login cache of the user terminal in redis according to the user id;
[0122] If the login cache of the user client does not exist in redis, a login authorization operation is performed on the user client.
[0123] Furthermore, in a third embodiment of the present invention, receiving a request signal from a user terminal for a first application further includes:
[0124] Determining whether the user terminal needs to log in to the authorized application when requesting the first application;
[0125] If the user terminal does not need to log in to the authorized application when requesting the first application, the second redirection address is directly sent to the user terminal, so that the user terminal requests the first application according to the second redirection address.
[0126] In summary, the third embodiment of the present invention provides an application push device, which is based on the organic combination of modules. When a request signal for a first application is received from a user terminal, the authorized application ID and the application authorization method of the authorized application are determined according to the first user ID, a first redirection address is generated, and the first redirection address is sent to the user terminal to complete the authorization authentication, and then the pre-configured second redirection address is sent to the user terminal so that the user terminal requests to access the first application. In the process of requesting the first application, if the first interface needs to be called, the application push platform is used to call it and store the corresponding call data. The present invention provides a unified application interface and token management function, and can obtain relevant information through the interface, saving labor costs and improving the efficiency of requesting access to applications.
[0127] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. An application push method, characterized in that: include: Receive a request signal from a user terminal for a first application; wherein the request signal includes the first application address, the first application ID, the user ID and a number of custom parameters; Determine an authorized application ID and an application authorization mode of the authorized application according to the first application ID; Generate a first redirection address according to the authorized application ID, the application authorization mode of the authorized application and the plurality of custom parameters; Sending the first redirection address and the authorization request signal to the user terminal; When the user terminal agrees to the authorization, the page of the user terminal is redirected to the authorized application according to the callback address in the first redirect address; The relevant parameters carried in the process of redirecting the user's page to the authorized application are cached, and the preconfigured second redirection address is sent to the user, so that the user requests the first application according to the second redirection address.
2. The application push method according to claim 1, characterized in that: The user terminal requests the first application according to the second redirection address, further comprising: When the user terminal requests the first application, receiving an information request signal sent by the first application, and sending corresponding information to the first application; When the user terminal requests the first application, receiving a first interface calling signal sent by the first application; Querying whether the user terminal has the calling authority of the first interface; If the user terminal has the calling authority of the first interface, the first interface is called, and the request of the user terminal is completed according to the first interface calling signal.
3. The application push method according to claim 2, characterized in that: Before calling the first interface and completing the request of the user terminal according to the first interface calling signal, the method further includes: When the first interface is in the authorized application, query the call token in redis, and call the authorized application according to the call token; Receive the first data returned by the authorized application, send the first data to the first application, and cache the first data in redis.
4. The application push method according to claim 3, characterized in that: When the first interface is in the authorized application, query the calling token in redis, specifically: When the calling token does not exist in redis, the first parameter of the first application is obtained in redis; Use the first parameter to call any interface of the authorization application to generate a call token, set an expiration time for the call token, and cache the call token in redis.
5. The application push method according to claim 1, characterized in that: Before generating the first redirection address according to the authorized application ID, the application authorization mode of the authorized application and the plurality of custom parameters, the method further includes: Querying whether there is a login cache of the user terminal in redis according to the user id; If the login cache of the user client does not exist in redis, a login authorization operation is performed on the user client.
6. The application push method according to claim 1, characterized in that: The receiving a request signal from the user terminal for the first application also includes: Determining whether the user terminal needs to log in to the authorized application when requesting the first application; If the user terminal does not need to log in to the authorized application when requesting the first application, the second redirection address is directly sent to the user terminal, so that the user terminal requests the first application according to the second redirection address.
7. An application push platform, characterized in that: An application push method for executing any one of claims 1 to 6, comprising: a WeChat interface, an invoice interface, a payment interface, and other interfaces; When the user terminal requests the WeChat interface, control the user terminal to log in to WeChat, and send the redirection address of WeChat to the user terminal, so that the user terminal completes the login authorization, calls the WeChat interface and stores the corresponding call data; When the user terminal requests the invoice interface or the payment interface, control the user terminal to call the WeChat interface and obtain key data openid, call the invoice interface or the payment interface according to the key data openid and store corresponding call data; When the user terminal requests the other interface, the user terminal is controlled to call the other interface and store corresponding calling data; wherein the other interface includes a text message push interface, an email push interface and a general internal interface.
8. The application push platform according to claim 7, characterized in that: When the user terminal requests the WeChat interface, the user terminal is controlled to log in to WeChat, and the redirection address of WeChat is sent to the user terminal, specifically: Receive a WeChat interface request signal from a user terminal; wherein the WeChat interface request signal includes a WeChat ID, a user ID, and several custom parameters; Determine the WeChat application authorization method according to the WeChat ID; Generate a WeChat redirection address according to the WeChat ID, the WeChat application authorization method and the plurality of custom parameters; The redirection address of WeChat and the authorization request signal are sent to the user terminal.
9. The application push platform according to claim 7, characterized in that: Also includes: When a user terminal requests an interface on the application push platform, query whether the user terminal has the calling authority of the corresponding interface; If the user terminal has the calling authority, the interface is called and the corresponding calling data is stored.
10. An application push device, characterized in that: include: Receiving module, determining module, generating module, sending module, jumping module and requesting module; The receiving module is used to receive a request signal from the user end for the first application; wherein the request signal includes the first application address, the first application ID, the user ID and a number of custom parameters; The determination module is used to determine the authorized application ID and the application authorization mode of the authorized application according to the first application ID; The generating module is used to generate a first redirection address according to the authorized application ID, the application authorization mode of the authorized application and a plurality of the custom parameters; The sending module is used to send the first redirection address and the authorization request signal to the user terminal; The jump module is used to jump the page of the user terminal to the authorized application according to the callback address in the first redirect address when the user terminal agrees to the authorization; The request module is used to cache the relevant parameters carried in the process of redirecting the user's page to the authorized application, and send the preconfigured second redirection address to the user, so that the user requests the first application according to the second redirection address.
Citation Information
Patent Citations
Unified certification method for users
CN107786571A
Webpage application assess method and device and storage medium
CN108733991A
Business data processing method and device and server
CN111917773A
Unified platform authentication method, equipment and medium
CN116015824A
Unified identity authentication method based on client redirection
CN116527344A
