Unlock instant, AI-driven research and patent intelligence for your innovation.

Redis-based token acquisition method and device and electronic equipment

An acquisition method and technology of electronic equipment, which is applied in the field of network security, can solve problems such as application or interface failure, token failure, etc., and achieve the effect of solving the limitation of issuance times and extending the validity period

Inactive Publication Date: 2022-01-11
天聚地合(苏州)科技股份有限公司
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] The user needs to bring the issued token when requesting the third-party interface, because the token is invalid and unique, the token is unique for the same account or the account and the application are unique, if the application is deployed in a distributed manner, or when the same account is shared , if the token is obtained or refreshed every time the interface is called, the last token will become invalid, causing other applications or interfaces to be unable to use normally

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Redis-based token acquisition method and device and electronic equipment
  • Redis-based token acquisition method and device and electronic equipment
  • Redis-based token acquisition method and device and electronic equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0048] figure 1 It is a schematic flow chart of the Redis-based token acquisition method of the embodiment of the present invention, which will be referred to below figure 1 , the Redis-based token acquisition method of the embodiment of the present invention is described in detail.

[0049] First, in step 101, the client sends a request for obtaining a token to the token management center, and the request for obtaining a token carries the unique identifier of the user.

[0050] In some exemplary implementations, a token management center is set up, including but not limited to token issuance, refreshing, storage and valid period setting.

[0051] In some exemplary implementations, the client sends a token acquisition request to the token management center.

[0052] In some exemplary implementations, the token acquisition request sent by the client carries the unique identifier of the user.

[0053] In some exemplary implementations, the management center uniformly stores t...

Embodiment 2

[0082] figure 2 is a schematic structural diagram of a Redis-based token acquisition device according to an embodiment of the present invention, which will be combined below figure 2 , to describe in detail the Redis-based token acquisition device of the embodiment of the present invention.

[0083] The token acquisition device in the embodiment of the present invention adopts the Redis-based token acquisition method in the first embodiment above.

[0084] The Redis-based token acquisition device in the embodiment of the present invention includes: a token management center 201 and a Redis 202 .

[0085] In some exemplary implementations, the token management center 201 includes, but is not limited to, the issuance, refreshment, storage, and validity period setting of tokens.

[0086] In some exemplary implementations, the token management center 201 uniformly stores the generated or acquired valid tokens in Redis 202 .

[0087] In some exemplary implementations, Redis (R...

Embodiment 3

[0110] image 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, such as image 3 As shown, at the hardware level, the electronic device includes a processor, and optionally also includes a bus, a network interface, and a memory. Wherein, the memory may include a memory, such as a high-speed random-access memory (Random-Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. Of course, the electronic device may also include hardware required by other services.

[0111] The processor, network interface and memory can be connected to each other through a bus, which can be an ISA (Industry Standard Architecture, industry standard architecture) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnection standard) bus or an EISA (Extended Industry Standard Architecture, extended industry standard structure) bus, etc. The bus can b...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a Redis-based token acquisition method. The method comprises the following steps that: a client sends a token acquisition request to a token management center, wherein the token acquisition request carries a unique identifier of a user; the token management center generates a Key value according to the unique identifier; the token management center searches a corresponding token stored in the Redis according to the Key value; when a first token is not found in the Redis and a second token is found in the Redis, the token management center calls a token refreshing interface to perform refreshing and generate the first token, the validity period of the first token is shorter than that of the second token, and the first token is issued by a token issuing interface and refreshed by the token refreshing interface after expires; and the token management center returns the refreshed first token to the client. The embodiment of the invention further discloses a Redis-based token acquisition device. Through setting of the second token, it is ensured that the same client has only one token, the validity period of the token is prolonged, and the problem that the number of times of issuing the token is limited is solved.

Description

technical field [0001] The present invention relates to the technical field of network security, in particular to a Redis-based token acquisition method, device, electronic equipment and computer-readable storage medium. Background technique [0002] The user needs to bring the issued token when requesting the third-party interface, because the token is invalid and unique, the token is unique for the same account or the account and the application are unique, if the application is deployed in a distributed manner, or when the same account is shared , if the token is obtained or refreshed every time the interface is called, the last token will become invalid, causing other applications or interfaces to be unable to use normally. [0003] In addition, since the issuance times of the token issuance interface are limited, how to efficiently use the limited issuance times of the token issuance interface has become a technical problem to be solved urgently. Contents of the inven...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F21/33G06F16/2455
CPCG06F21/33G06F16/2455G06F2221/2137
Inventor 左磊张晓玮
Owner 天聚地合(苏州)科技股份有限公司