Multi-token updating method and terminal

By storing multi -token information information and its constraints to the message notification queue, real -time monitoring and notifications for the constraints of multiple token are achieved, and the problem that cannot be automatically refreshed in the existing technology has been solved. User experience.

CN119382899APending Publication Date: 2025-01-28FUJIAN HUIZHENGTONG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411354494.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing technology cannot effectively maintain the constraint relationship between multiple tokens, resulting in the inability to automatically refresh the token. Users need to verify one by one through cumbersome business steps, increasing server pressure and affecting user experience.

Method used

By obtaining a number of token information information and its failure period, this information is stored to the message notification queue, and the message notification time of setting the queue according to the minimum failure period. When the queue sends notification message, determine whether the tokens are invalid according to the constraint relationship, and generate the user verification information notifying the user to manually update the failure token.

Benefits of technology

A real -time monitoring and notification of the multi -to -card constraint relationship is realized, the effectiveness of multiple token is detected simplifying the verification steps of the multi -token card, reducing the server pressure and optimizing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119382899A_ABST
    Figure CN119382899A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-token updating method and a terminal. The method comprises the following steps: acquiring multiple pieces of token information with a constraint relationship and the expiration date of each piece of token information; storing the plurality of pieces of token information and the constraint relationship in a message notification queue, and setting the message notification time of the message notification queue according to the minimum expiration date in the plurality of pieces of token information; if the notification message sent by the message notification queue is monitored, determining whether a failure token exists in a plurality of tokens corresponding to the plurality of pieces of token information according to a constraint relationship; if yes, generating user verification information to inform a user of manually updating the invalid token to obtain new token information and a new expiration date of the new token information, and updating the message notification queue and the message notification time based on the new token information and the new expiration date. According to the method, the constraint relation of multiple tokens can be effectively maintained, the verification steps of the multiple tokens are simplified, and the user experience feeling is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a multi-token updating method and a terminal. Background Art

[0002] At present, the communication architecture with front-end and back-end separation is widely used in Internet communication software. In this communication architecture, tokens have become a widely used user authentication method. Traditional solutions include the following forms: 1. Introduce methods such as Redis (a high-performance key-value storage system) to cache each token on the server side, and verify the validity of each token access, and generate a new token by re-triggering after it expires. 2. Calculate the token expiration time in real time through the sub-thread service, and automatically generate a new token before it expires.

[0003] In existing Internet communication software, there are generally multiple types of verification tokens, such as identity login tokens, face verification tokens, and SMS verification tokens), and there are certain restraining constraints between multiple tokens. Only when multiple types of verification tokens are successfully verified can the user login be completed. In the first token verification method, the token is stored in Redis as a Key value. Since Redis is a Key-Value key value pair data type, it is impossible to store the constraint relationship between multiple tokens, so only a single token can be judged and verified. In the second token verification method, each child thread can only calculate the expiration time of a token in real time, and it is impossible to associate the constraint relationship between multiple tokens. Therefore, the traditional token verification method can only judge a single token, and cannot maintain the constraint relationship between multiple tokens, resulting in the inability of the traditional verification method to automatically refresh the token. Therefore, users can only verify one by one through cumbersome business steps, which not only increases the pressure on the server, but also affects the user experience. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a multi-token update method and terminal, which can maintain the constraint relationship of multiple tokens, simplify the verification steps of multiple tokens, and optimize the user experience.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0006] A multi-token update method, comprising:

[0007] Obtain multiple token information having a constraint relationship and the expiration date of each of the token information;

[0008] Storing the multiple token information and the constraint relationship in a message notification queue, and setting a message notification time of the message notification queue according to a minimum expiration period among the multiple token information;

[0009] If a notification message sent by the message notification queue is monitored, determining whether there is an invalid token among the multiple tokens corresponding to the multiple token information according to the constraint relationship;

[0010] If so, user verification information is generated to notify the user to manually update the expired token to obtain new token information and a new expiration date for the new token information, and to update the message notification queue and the message notification time based on the new token information and the new expiration date.

[0011] In order to solve the above technical problems, another technical solution adopted by the present invention is:

[0012] A multi-token update terminal comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor implements the following steps when executing the computer program:

[0013] Acquire multiple pieces of token information that have a constraint relationship and the expiration date of each piece of the token information;

[0014] Storing the multiple token information and the constraint relationship in a message notification queue, and setting a message notification time of the message notification queue according to a minimum expiration period among the multiple token information;

[0015] If a notification message sent by the message notification queue is monitored, determining whether there is an invalid token among the multiple tokens corresponding to the multiple token information according to the constraint relationship;

[0016] If so, user verification information is generated to notify the user to manually update the expired token to obtain new token information and a new expiration date for the new token information, and to update the message notification queue and the message notification time based on the new token information and the new expiration date.

[0017] The beneficial effect of the present invention is that: multiple token information with constraint relationships are stored in a message notification queue, and the message notification time of the message notification queue is set according to the minimum expiration period in the token information, so that the message notification queue can realize real-time monitoring and notification of the validity period of the token. Since the constraint relationship of the token information is stored in the message notification queue, when the notification message sent by the message notification queue is monitored, it is synchronously determined whether there is an invalid token in the token corresponding to the token information according to the constraint relationship, and the user uniformly manually updates the invalid token to obtain a new token. By judging whether there is an invalid token through the constraint relationship between the token information, the validity of multiple tokens can be synchronously detected, that is, when one token is invalid, it can be synchronously determined whether other tokens are also invalid, which solves the problem that only a single token can be detected and maintained in the existing solution, avoids the problem of detecting each token one by one due to the different expiration periods of different tokens, avoids the maintenance of multiple detection resources, effectively reduces the pressure on the server, simplifies the verification steps of multiple tokens, and optimizes the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A flowchart of a multi-token update method provided by an embodiment of the present invention;

[0019] Figure 2 A schematic diagram of the structure of a multi-token update terminal provided by an embodiment of the present invention;

[0020] Description of labels:

[0021] 100. A multi-token update terminal; 101. Memory; 102. Processor. DETAILED DESCRIPTION

[0022] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.

[0023] An embodiment of the present invention provides a multi-token update method, comprising:

[0024] Obtain multiple token information having a constraint relationship and the expiration date of each of the token information;

[0025] Storing the multiple token information and the constraint relationship in a message notification queue, and setting a message notification time of the message notification queue according to a minimum expiration period among the multiple token information;

[0026] If a notification message sent by the message notification queue is monitored, determining whether there is an invalid token among the multiple tokens corresponding to the multiple token information according to the constraint relationship;

[0027] If so, user verification information is generated to notify the user to manually update the expired token to obtain new token information and a new expiration date for the new token information, and to update the message notification queue and the message notification time based on the new token information and the new expiration date.

[0028] As can be seen from the above description, the beneficial effect of the present invention is that: multiple token information with constraint relationships are stored in a message notification queue, and the message notification time of the message notification queue is set according to the minimum expiration period in the token information, so that the message notification queue can realize real-time monitoring and notification of the validity period of the token. Since the constraint relationship of the token information is stored in the message notification queue, when the notification message sent by the message notification queue is monitored, it is synchronously determined whether there is an invalid token in the token corresponding to the token information according to the constraint relationship, and the user uniformly manually updates the invalid token to obtain a new token. By judging whether there is an invalid token through the constraint relationship between the token information, the validity of multiple tokens can be synchronously detected, that is, when one token is invalid, it can be synchronously determined whether other tokens are also invalid, which solves the problem that only a single token can be detected and maintained in the existing solution, avoids the problem of detecting each token one by one due to the different expiration periods of different tokens, avoids the maintenance of multiple detection resources, effectively reduces the pressure on the server, simplifies the verification steps of multiple tokens, and optimizes the user experience.

[0029] Furthermore, the obtaining of the plurality of token information having a constraint relationship and the expiration date of each of the token information comprises:

[0030] A plurality of tokens having a constraint relationship and an expiration date of each of the tokens are obtained, and the plurality of tokens are respectively stored in a Redis cluster to obtain a plurality of token information.

[0031] From the above description, we can know that multiple tokens are still stored independently in the Redis cluster in the form of key-value to obtain multiple token information, and then the multiple token information and constraint relationships are stored in the message notification queue to maintain the constraint relationships between multiple tokens, so as to verify the validity of the tokens through the constraint relationships. Based on the storage of constraint relationships in the message notification queue, when any token in the token is invalid, the validity of other tokens can be verified synchronously, which solves the problem that the Redis cluster can only verify a single token.

[0032] Furthermore, the constraint relationship includes a priority relationship corresponding to the multiple token information;

[0033] The determining, according to the constraint relationship, whether there is an invalid token among the multiple tokens corresponding to the multiple token information includes:

[0034] Detecting whether a plurality of tokens corresponding to the plurality of token information are in an expired state in order of priority from high to low according to the expiration period;

[0035] If it is detected that any one of the multiple tokens is in an expired state, the token and other tokens whose priority relationship is lower than the priority of the token are marked as invalid tokens.

[0036] From the above description, it can be seen that in the constraint relationship of token information, if a token with a high priority is in an invalid state, other tokens with a lower priority than the token are also in an invalid state. In the process of detecting whether a token is in an expired state, tokens are detected in order according to their priority. When a token is detected to be expired, there is no need to detect the remaining tokens, thereby improving the detection efficiency of token expiration. In addition, this detection method does not require setting up independent detection service resources for each token, effectively alleviating the pressure on the server and ensuring system performance.

[0037] Furthermore, before marking the token and other tokens whose priorities are lower than the priority of the token as invalid tokens, the method further includes:

[0038] Detect whether the number of automatic updates of the token in the expired state is greater than the preset number of expiration times;

[0039] If so, the token and other tokens whose priority relationship is lower than the priority of the token are marked as invalid tokens;

[0040] Otherwise, the token is marked as an expired token.

[0041] From the above description, it can be seen that for some expired tokens, if the number of automatic updates is greater than the preset number of expiration times, it is judged as an expired token. This extends the validity period of the expired token, avoids the problem of users frequently manually updating the token due to the token expiration period being too short, and optimizes the user experience.

[0042] Furthermore, it also includes:

[0043] Automatically updating the expired token according to the token information corresponding to the expired token to obtain new token information and a new expiration date of the new token information, and updating the message notification queue and the message notification time based on the new token information and the new expiration date;

[0044] The automatic update times of the expired token are recorded, and the automatic update times are stored in the message notification queue.

[0045] As can be seen from the above description, for the expired but not invalid tokens among multiple tokens, a new token and a new expiration date are automatically updated directly according to the token credentials. Since multiple tokens are detected in order of priority, the mutual restraint relationship between multiple tokens when they expire can be effectively verified, that is, the detection of whether a token has expired and whether a token is invalidated due to the influence of other tokens can be realized simultaneously, which solves the problem that verification and automatic refresh cannot be performed due to mutual constraints of tokens in the current verification scheme.

[0046] Another embodiment of the present invention provides a multi-token update terminal, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the following steps when executing the computer program:

[0047] Obtain multiple token information having a constraint relationship and the expiration date of each of the token information;

[0048] Storing the multiple token information and the constraint relationship in a message notification queue, and setting a message notification time of the message notification queue according to a minimum expiration period among the multiple token information;

[0049] If a notification message sent by the message notification queue is monitored, determining whether there is an invalid token among the multiple tokens corresponding to the multiple token information according to the constraint relationship;

[0050] If so, user verification information is generated to notify the user to manually update the expired token to obtain new token information and a new expiration date for the new token information, and to update the message notification queue and the message notification time based on the new token information and the new expiration date.

[0051] As can be seen from the above description, the beneficial effect of the present invention is that: multiple token information with constraint relationships are stored in a message notification queue, and the message notification time of the message notification queue is set according to the minimum expiration period in the token information, so that the message notification queue can realize real-time monitoring and notification of the validity period of the token. Since the constraint relationship of the token information is stored in the message notification queue, when the notification message sent by the message notification queue is monitored, it is synchronously determined whether there is an invalid token in the token corresponding to the token information according to the constraint relationship, and the user uniformly manually updates the invalid token to obtain a new token. By judging whether there is an invalid token through the constraint relationship between the token information, the validity of multiple tokens can be synchronously detected, that is, when one token is invalid, it can be synchronously determined whether other tokens are also invalid, which solves the problem that only a single token can be detected and maintained in the existing solution, avoids the problem of detecting each token one by one due to the different expiration periods of different tokens, avoids the maintenance of multiple detection resources, effectively reduces the pressure on the server, simplifies the verification steps of multiple tokens, and optimizes the user experience.

[0052] Furthermore, the obtaining of the plurality of token information having a constraint relationship and the expiration date of each of the token information comprises:

[0053] A plurality of tokens having a constraint relationship and an expiration date of each of the tokens are obtained, and the plurality of tokens are respectively stored in a Redis cluster to obtain a plurality of token information.

[0054] From the above description, we can know that multiple tokens are still stored independently in the Redis cluster in the form of key-value to obtain multiple token information, and then the multiple token information and constraint relationships are stored in the message notification queue to maintain the constraint relationships between multiple tokens, so as to verify the validity of the tokens through the constraint relationships. Based on the storage of constraint relationships in the message notification queue, when any token in the token is invalid, the validity of other tokens can be verified synchronously, which solves the problem that the Redis cluster can only verify a single token.

[0055] Furthermore, the constraint relationship includes a priority relationship corresponding to the multiple token information;

[0056] The determining, according to the constraint relationship, whether there is an invalid token among the multiple tokens corresponding to the multiple token information includes:

[0057] Detecting whether a plurality of tokens corresponding to the plurality of token information are in an expired state in order of priority from high to low according to the expiration period;

[0058] If it is detected that any one of the multiple tokens is in an expired state, the token and other tokens whose priority relationship is lower than the priority of the token are marked as invalid tokens.

[0059] From the above description, it can be seen that in the constraint relationship of token information, if a token with a high priority is in an invalid state, other tokens with a lower priority than the token are also in an invalid state. In the process of detecting whether a token is in an expired state, tokens are detected in order according to their priority. When a token is detected to be expired, there is no need to detect the remaining tokens, thereby improving the detection efficiency of token expiration. In addition, through this detection method, there is no need to set up independent detection service resources for each token, which effectively relieves the pressure on the server and ensures system performance.

[0060] Furthermore, before marking the token and other tokens whose priorities are lower than the priority of the token as invalid tokens, the method further includes:

[0061] Detect whether the number of automatic updates of the token in the expired state is greater than the preset number of expiration times;

[0062] If so, the token and other tokens whose priority relationship is lower than the priority of the token are marked as invalid tokens;

[0063] Otherwise, the token is marked as an expired token.

[0064] From the above description, it can be seen that for some expired tokens, if the number of automatic updates is greater than the preset number of expiration times, it is judged as an expired token. This extends the validity period of the expired token, avoids the problem of users frequently manually updating the token due to the token expiration period being too short, and optimizes the user experience.

[0065] Furthermore, it also includes:

[0066] Automatically updating the expired token according to the token information corresponding to the expired token to obtain new token information and a new expiration date of the new token information, and updating the message notification queue and the message notification time based on the new token information and the new expiration date;

[0067] The automatic update times of the expired token are recorded, and the automatic update times are stored in the message notification queue.

[0068] As can be seen from the above description, for the expired but not invalid tokens among multiple tokens, a new token and a new expiration date are automatically updated directly according to the token credentials. Since multiple tokens are detected in order of priority, the mutual restraint relationship between multiple tokens when they expire can be effectively verified, that is, the detection of whether a token has expired and whether a token is invalidated due to the influence of other tokens can be realized simultaneously, which solves the problem that verification and automatic refresh cannot be performed due to mutual constraints of tokens in the current verification scheme.

[0069] The embodiments of the present invention provide a multi-token update method and terminal, which can be applied to a user login system with multiple authentication methods, can maintain the constraint relationship of multiple tokens, simplify the authentication steps of multiple tokens, and optimize the user experience. The following is an explanation through specific embodiments:

[0070] Please refer to Figure 1 , Embodiment 1 of the present invention is:

[0071] A multi-token update method, comprising:

[0072] S1. Acquire multiple pieces of token information having a constraint relationship and the expiration date of each piece of the token information.

[0073] Specifically, the step S1 includes:

[0074] S11. Acquire multiple tokens with a constraint relationship and the expiration date of each of the tokens, and store the multiple tokens in a Redis cluster respectively to obtain multiple token information.

[0075] In some embodiments, the multiple tokens obtained with a constraint relationship are respectively an identity login token, a face verification token, and a text message verification token, that is, the multiple tokens with a constraint relationship represent different verification information used when the same user accesses the server. Among them, the constraint relationship between the multiple tokens is such that when one of the multiple tokens is in an invalid state, the other tokens in the multiple tokens will be invalidated synchronously. That is, there is a specific situation in the constraint relationship of multiple tokens that although a token has not reached the expiration date, because other tokens with a constraint relationship with the token have expired, the token is also invalidated.

[0076] In some embodiments, if the identity login token, face verification token and SMS verification token are stored in the Redis cluster in the form of Key-value respectively, the Redis cluster will obtain three token information records corresponding to the token, and each token information record independently stores the relevant information of each token.

[0077] In some embodiments, while obtaining the token expiration date, the preset expiration threshold for each token is also obtained, that is, each token can be directly judged as invalid after being automatically updated a certain number of times, avoiding unlimited automatic update of the token.

[0078] S2. Store the multiple token information and the constraint relationship in a message notification queue, and set the message notification time of the message notification queue according to the minimum expiration period among the multiple token information.

[0079] In some embodiments, if the expiration period of the identity login token is 10 minutes, the expiration period of the face verification token is 12 minutes, and the expiration period of the SMS verification token is 15 minutes, the expiration period of the identity login token is the shortest, so the delayed notification time of the message notification queue is set to 10 minutes. In this case, when the identity login token is in an expired state, the validity of the face verification token and the SMS verification token will be verified synchronously.

[0080] In some embodiments, the message notification queue is a RabbitMQ queue. RabbitMQ is a message middleware that is mainly used to store and forward messages. The message producer sends real-time data to the RabbitMQ queue, and the message consumer can receive and process the data in a timely manner, thereby realizing asynchronous processing of messages.

[0081] In some embodiments, the keys of the three token information records in the Redis cluster, the corresponding constraint relationships, and the expiration threshold of each token are all stored in the message notification queue. Specifically, the keys, constraint relationships, and expiration threshold of the three tokens are encapsulated as a message content through the json object structure and stored in the message notification queue. In this way, the token information records of the Redis cluster can be associated through the keys in the message notification queue, and the multi-token constraint relationship verification can be realized while avoiding affecting the original business process of the Redis cluster.

[0082] S3. If a notification message sent by the message notification queue is monitored, determine whether there is an invalid token among the multiple tokens corresponding to the multiple token information according to the constraint relationship.

[0083] Specifically, the constraint relationship includes the priority relationship corresponding to the multiple token information, and the step S3 includes:

[0084] S31. Check in order from high to low priority according to the expiration date whether the multiple tokens corresponding to the multiple token information are in an expired state.

[0085] S32: If it is detected that any one of the multiple tokens is in an expired state, the token and other tokens whose priority is lower than the priority of the token are marked as invalid tokens.

[0086] In some embodiments, if the priority relationship between the current identity login token, face verification token and SMS verification token is specifically: the priority of the identity login token is higher than the priority of the face verification token, and the priority of the face verification token is higher than the priority of the SMS verification token, then when the identity login token is invalid, the face verification token and the SMS verification token are both invalid. For example, in a specific scenario, if a notification message sent by a message notification queue is monitored, since the message notification time of the message notification queue is 10 minutes, at this time it is detected that the identity login token is in an expired state, and the face verification token and the SMS verification token are both in a non-expired state, then the identity login token can be marked as an invalid token, and the face verification token and the SMS verification token are also marked as invalid tokens. In another specific scenario, if the message notification time of the message notification queue is set according to the expiration period of the face verification token, then it is detected that the identity login token is in a non-expired state, the face verification token is in an expired state, and the SMS verification token is in a non-expired state, then the face verification token and the SMS verification token can be marked as invalid tokens.

[0087] Specifically, in step S32, before marking the token and other tokens whose priorities are lower than the priority of the token as invalid tokens, the method further includes:

[0088] S321, detecting whether the number of automatic updates of the token in the expired state is greater than a preset number of expiration times.

[0089] S322: If yes, mark the token and other tokens whose priorities are lower than the priority of the token as invalid tokens.

[0090] S323: Otherwise, mark the token as an expired token.

[0091] In some embodiments, the face verification token is set with an expiration number threshold, while the identity login token and the face verification token are not set with an expiration number threshold. Then in a specific scenario, if it is detected that the identity login token and the SMS verification token are both in a non-expired state, and the face verification token is in an expired state, it is detected whether the number of automatic updates of the face verification token is greater than the expiration number threshold. If it is greater, the face verification token is marked as an invalid token. If not, the face verification token is marked as an expired token.

[0092] S4. If so, generate user verification information to notify the user to manually update the expired token to obtain new token information and a new expiration date for the new token information, and update the message notification queue and the message notification time based on the new token information and the new expiration date.

[0093] In some embodiments, if the identity login token, face verification token, and SMS verification token are all invalid tokens, the user is notified to manually update the identity login token, face verification token, and SMS verification token to obtain a new token. If the face verification token and SMS verification token are invalid tokens, the user is notified to manually update the face verification token and SMS verification token to obtain a new token. For the new token obtained by manual update, the process returns to step S2 to update the message notification queue and message notification time.

[0094] Specifically, the method further includes:

[0095] S5. Automatically update the expired token according to the token information corresponding to the expired token to obtain new token information and a new expiration date of the new token information, and update the message notification queue and the message notification time based on the new token information and the new expiration date; at the same time, record the number of automatic updates of the expired token, and store the number of automatic updates in the message notification queue.

[0096] In some embodiments, if the face verification token is an expired token, a new token is automatically generated based on the token information in the Redis cluster to extend the validity period of the face verification token, and the number of automatic updates is recorded to achieve imperceptible updates of the token. For the new token obtained by automatic update, it is directly updated to the corresponding message in the message notification queue to achieve automatic update of a single token among multiple tokens.

[0097] Please refer to Figure 2 , Embodiment 2 of the present invention is:

[0098] A multi-token update terminal 100 includes a memory 101, a processor 102, and a computer program stored in the memory 101 and running on the processor 102. When the processor 102 executes the computer program, each step of a multi-token update method in the above-mentioned embodiment 1 is implemented.

[0099] In summary, the present invention provides a multi-token update method and terminal, which first stores multiple tokens with constraint relationships in a Redis cluster, then stores the token information of the Redis cluster and the constraint relationship of the token in a message notification queue, and sets the message notification time of the message notification queue according to the minimum expiration period in the token, so that the message notification queue can monitor and notify the validity period of the token in real time without affecting the business process of the Redis cluster. Since the constraint relationship of the token is stored in the message notification queue, the message notification queue determines whether there is an invalid token in the token according to the constraint relationship. By judging whether there is an invalid token through the constraint relationship between tokens, the validity of multiple tokens can be detected synchronously, that is, when one token is invalid, it can be synchronously determined whether other tokens are also invalid, which solves the problem that only a single token can be detected and maintained in the existing solution, avoids maintaining multiple detection resources, and effectively reduces the pressure on the server. In addition, for overdue and invalid tokens, the user is notified to perform manual updates uniformly, avoiding the problem of manually verifying each token one by one due to the different expiration periods of different tokens, and effectively simplifies the verification steps of multiple tokens. For overdue but not invalid tokens, the system automatically updates, reduces the frequency of manual refresh by users, and optimizes the user experience.

[0100] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A multi-token update method, characterized in that: include: Acquire multiple pieces of token information that have a constraint relationship and the expiration date of each piece of the token information; Storing the multiple token information and the constraint relationship in a message notification queue, and setting a message notification time of the message notification queue according to a minimum expiration period among the multiple token information; If a notification message sent by the message notification queue is monitored, determining whether there is an invalid token among the multiple tokens corresponding to the multiple token information according to the constraint relationship; If so, user verification information is generated to notify the user to manually update the expired token to obtain new token information and a new expiration date for the new token information, and to update the message notification queue and the message notification time based on the new token information and the new expiration date.

2. A multi-token update method according to claim 1, characterized in that: The obtaining of multiple pieces of token information having a constraint relationship and the expiration date of each piece of token information comprises: A plurality of tokens having a constraint relationship and an expiration date of each of the tokens are obtained, and the plurality of tokens are respectively stored in a Redis cluster to obtain a plurality of token information.

3. A multi-token update method according to claim 1, characterized in that: The constraint relationship includes a priority relationship corresponding to the multiple token information; The determining, according to the constraint relationship, whether there is an invalid token among the multiple tokens corresponding to the multiple token information includes: Detecting whether a plurality of tokens corresponding to the plurality of token information are in an expired state in order of priority from high to low according to the expiration period; If it is detected that any one of the multiple tokens is in an expired state, the token and other tokens whose priority relationship is lower than the priority of the token are marked as invalid tokens.

4. A multi-token update method according to claim 3, characterized in that: Before marking the token and other tokens whose priority relationship is lower than that of the token as invalid tokens, the method further includes: Detect whether the number of automatic updates of the token in the expired state is greater than the preset number of expiration times; If so, the token and other tokens whose priority relationship is lower than the priority of the token are marked as invalid tokens; Otherwise, the token is marked as an expired token.

5. A multi-token update method according to claim 4, characterized in that: Also includes: Automatically updating the expired token according to the token information corresponding to the expired token to obtain new token information and a new expiration date of the new token information, and updating the message notification queue and the message notification time based on the new token information and the new expiration date; The automatic update times of the expired token are recorded, and the automatic update times are stored in the message notification queue.

6. A multi-token update terminal, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: Acquire multiple pieces of token information that have a constraint relationship and the expiration date of each piece of the token information; Storing the multiple token information and the constraint relationship in a message notification queue, and setting a message notification time of the message notification queue according to a minimum expiration period among the multiple token information; If a notification message sent by the message notification queue is monitored, determining whether there is an invalid token among the multiple tokens corresponding to the multiple token information according to the constraint relationship; If so, user verification information is generated to notify the user to manually update the expired token to obtain new token information and a new expiration date for the new token information, and to update the message notification queue and the message notification time based on the new token information and the new expiration date.

7. A multi-token update terminal according to claim 6, characterized in that: The obtaining of multiple pieces of token information having a constraint relationship and the expiration date of each piece of token information comprises: A plurality of tokens having a constraint relationship and an expiration date of each of the tokens are obtained, and the plurality of tokens are respectively stored in a Redis cluster to obtain a plurality of token information.

8. A multi-token update terminal according to claim 6, characterized in that: The constraint relationship includes a priority relationship corresponding to the multiple token information; The determining, according to the constraint relationship, whether there is an invalid token among the multiple tokens corresponding to the multiple token information includes: Detecting whether a plurality of tokens corresponding to the plurality of token information are in an expired state in order of priority from high to low according to the expiration period; If it is detected that any one of the multiple tokens is in an expired state, the token and other tokens whose priority relationship is lower than the priority of the token are marked as invalid tokens.

9. A multi-token update terminal according to claim 8, characterized in that: Before marking the token and other tokens whose priority relationship is lower than that of the token as invalid tokens, the method further includes: Detect whether the number of automatic updates of the token in the expired state is greater than the preset number of expiration times; If so, the token and other tokens whose priority relationship is lower than the priority of the token are marked as invalid tokens; Otherwise, the token is marked as an expired token.

10. A multi-token update terminal according to claim 9, characterized in that: Also includes: Automatically updating the expired token according to the token information corresponding to the expired token to obtain new token information and a new expiration date of the new token information, and updating the message notification queue and the message notification time based on the new token information and the new expiration date; The automatic update times of the expired token are recorded, and the automatic update times are stored in the message notification queue.