Token generation method, device, non-volatile storage medium and processor
By using the physical characteristics of the two-axis crystal to generate access tokens and selecting appropriate encryption methods, the problem that existing tokens cannot protect user information security is solved, and the security of tokens is improved.
Patent Information
- Application Number
- CN202111633650.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2041-12-28
AI Technical Summary
Existing tokens cannot effectively protect user information security, resulting in security risks of information leakage.
By receiving the access request from the client, the first wavelength and the second wavelength are generated based on the physical characteristics of the target binary crystal, the corresponding optical axis angle is determined, and the access token is generated based on these angles, ensuring that the attacker cannot determine the command How to generate cards.
Improves the security of access tokens, making it difficult for attackers to predict the generation method, thereby enhancing the protection of user information.
Smart Images

Figure CN114301684B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security, and in particular to a token generation method, device, non-volatile storage medium and processor. Background Art
[0002] With the development of Internet technology and the maturity of application software, user information, as a resource, is of particular importance to human beings due to its universality, sharing, value-added, processability and multi-utility. Information security has become an increasingly important issue in the industry in recent years, protecting computer hardware, software and data from damage, modification and leakage due to accidental or malicious reasons. In the software industry, tokens are a very important link as the only security credentials for interaction between clients and servers. The market is flooded with a large number of low-priced tokens with no practical effect, and poor token rules will lead to information leakage and bring security risks.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] Embodiments of the present invention provide a token generation method, device, non-volatile storage medium and processor to at least solve the technical problem that simple tokens cannot protect user information security.
[0005] According to one aspect of an embodiment of the present invention, a token generation method is provided, including: receiving an access request sent by a client; generating a first wavelength and a second wavelength based on the access request; determining, based on the physical properties of a target biaxial crystal, a first optical axis angle and a second optical axis angle corresponding to the first wavelength and the second wavelength, respectively, in the target biaxial crystal; determining a target encryption method for generating an access token based on the first optical axis angle and the second optical axis angle, and generating a target access token based on the access request and the target encryption method.
[0006] Optionally, determining the target encryption method for generating an access token based on the first optical axis angle and the second optical axis angle includes: comparing the first optical axis angle with the second optical axis angle to obtain a comparison result; and determining the target encryption method from the multiple predetermined encryption methods based on a correspondence between the comparison result and a plurality of predetermined encryption methods.
[0007] Optionally, the method of determining, based on the physical characteristics of the target biaxial crystal, the first optical axis angle and the second optical axis angle corresponding to the first wavelength and the second wavelength respectively in the target biaxial crystal includes: determining the target biaxial crystal corresponding to the client based on the access request sent by the client; obtaining a wavelength-optical axis angle correspondence table of the target biaxial crystal, wherein the wavelength-optical axis angle correspondence table is used to describe the correspondence between the wavelength of incident light and the optical axis angle of the target biaxial crystal; determining the first optical axis angle and the second optical axis angle corresponding to the first wavelength and the second wavelength respectively based on the wavelength-optical axis angle correspondence table of the target biaxial crystal.
[0008] Optionally, generating a target access token according to the access request and the target encryption method includes: obtaining the IP address of the client corresponding to the access request and a timestamp of receiving the access request; and encrypting the IP address and the timestamp using the target encryption method to obtain the target access token.
[0009] Optionally, the receiving an access request sent by the client includes: receiving a first access request and a second access request sent by the client, and reporting to the client when an interval between receiving the first access request and receiving the second access request is less than a predetermined time.
[0010] Optionally, generating the first wavelength and the second wavelength based on the access request includes: determining whether the client has reported based on the access request; and generating the first wavelength and the second wavelength if the client has reported.
[0011] Optionally, the method further includes: generating a token seed according to the target access token; and sending the token seed to the client.
[0012] According to another aspect of an embodiment of the present invention, a token generating device is also provided, including: a receiving module for receiving an access request sent by a client; a first generating module for generating a first wavelength and a second wavelength based on the access request; a determining module for determining, based on the physical properties of a target biaxial crystal, a first optical axis angle and a second optical axis angle corresponding to the first wavelength and the second wavelength respectively in the target biaxial crystal; a second generating module for determining a first encryption method for generating an access token based on the first optical axis angle and the second optical axis angle, and generating a target access token based on the access request and the first encryption method.
[0013] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, wherein the non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any one of the above-mentioned token generation methods.
[0014] According to yet another aspect of the embodiments of the present invention, a processor is provided, wherein the processor is used to run a program, wherein the program executes any one of the above-mentioned token generation methods when running.
[0015] In an embodiment of the present invention, the physical characteristics of a biaxial crystal are used to assist in the generation of an access token, by receiving an access request sent by a client; based on the access request, a first wavelength and a second wavelength are generated; based on the physical characteristics of a target biaxial crystal, a first optical axis angle and a second optical axis angle corresponding to the first wavelength and the second wavelength, respectively, are determined in the target biaxial crystal; based on the first optical axis angle and the second optical axis angle, a target encryption method for generating an access token is determined, and based on the access request and the target encryption method, a target access token is generated, thereby achieving the purpose of preventing attackers from determining how the access token is generated, thereby realizing the technical effect of improving the security of the access token, and further solving the technical problem that a simple token cannot protect the security of user information. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0017] Figure 1 A hardware structure block diagram of a computer terminal for implementing a token generation method is shown;
[0018] Figure 2 is a flowchart of a token generation method provided according to an embodiment of the present invention;
[0019] Figure 3 is a flow chart of a token generation method provided according to an optional embodiment of the present invention;
[0020] Figure 4 It is a structural block diagram of a token generation device provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0023] According to an embodiment of the present invention, a method embodiment of token generation is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0024] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a token generation method. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1Different configurations are shown.
[0025] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0026] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the token generation method in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the token generation method of the above-mentioned application. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0027] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0028] Figure 2 is a flow chart of a token generation method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0029] Step S202, receiving an access request sent by the client. In this step, the client requests to access the server, so it sends an access request to the server. The request body of the access request may include request body information, which is used to describe the client information and the details of this access request.
[0030] Step S204: Generate a first wavelength and a second wavelength based on the access request. Optionally, the first wavelength and the second wavelength may be wavelengths within the visible light range.
[0031] Step S206 , determining a first optical axis angle and a second optical axis angle corresponding to the first wavelength and the second wavelength in the target biaxial crystal, respectively, based on the physical properties of the target biaxial crystal.
[0032] It should be noted that a biaxial crystal is a non-homogeneous body with two optical axes, including crystals of orthorhombic, monoclinic and triclinic systems. The target biaxial crystal is a specific biaxial crystal, and its physical property is that the wavelength of the incident light will affect the size of the optical axis angle of the biaxial crystal. In this step, the first wavelength corresponds to the first optical axis angle, and the second wavelength corresponds to the second optical axis angle.
[0033] Step S208: determining a target encryption method for generating an access token according to the first optical axis angle and the second optical axis angle, and generating a target access token according to the access request and the target encryption method.
[0034] Optionally, the server can save multiple encryption methods, such as RSA encryption method or SHA256 encryption method. The server can determine one of the multiple encryption methods as the target encryption method for this time according to the first optical axis angle and the second optical axis angle, and use the target encryption method for encryption to obtain a target access token. It should be noted that the target access token is the access token assigned to the client, and the access token can also be called Access Token, or token for short.
[0035] Through the above steps, in an embodiment of the present invention, the physical characteristics of a biaxial crystal are used to assist in the generation of an access token, by receiving an access request sent by a client; based on the access request, a first wavelength and a second wavelength are generated; based on the physical characteristics of a target biaxial crystal, a first optical axis angle and a second optical axis angle corresponding to the first wavelength and the second wavelength in the target biaxial crystal are determined; based on the first optical axis angle and the second optical axis angle, a target encryption method for generating an access token is determined, and based on the access request and the target encryption method, a target access token is generated, thereby achieving the purpose of preventing attackers from determining how the access token is generated, thereby realizing the technical effect of improving the security of the access token, and further solving the technical problem that a simple token cannot protect the security of user information.
[0036] As an optional embodiment, receiving an access request sent by a client includes the following steps: receiving a first access request and a second access request sent by the client, and reporting to the client when the interval between receiving the first access request and the second access request is less than a predetermined time.
[0037] In this embodiment, through the double-sending mechanism between the client and the server, the server will respond and allocate an access token to the client only when the client sends access requests twice within a short period of time, which increases data security. When obtaining a token, you need to request the server twice.
[0038] As an optional embodiment, based on the access request, the first wavelength and the second wavelength may be generated in the following manner: based on the access request, determining whether the client has reported; and generating the first wavelength and the second wavelength when the client has reported.
[0039] By reporting the client, the client's reporting list can be obtained. When the client is on the reporting list, the server will respond to its access request and allocate an access token to it. Optionally, the reporting list can be updated in real time. When the client sends the first access request, the client's IP is added to the reporting list. When the client sends the second access request, the first wavelength and the second wavelength are generated for the client, and an access token is allocated to it accordingly. When the client does not send the second access request within the predetermined time, it will be removed from the reporting list and no access token will be allocated to it.
[0040] As an optional embodiment, based on the physical properties of the target biaxial crystal, the first optical axis angle and the second optical axis angle corresponding to the first wavelength and the second wavelength respectively in the target biaxial crystal are determined in the following manner: based on the access request sent by the client, the target biaxial crystal corresponding to the client is determined; a wavelength and optical axis angle correspondence table of the target biaxial crystal is obtained, wherein the wavelength and optical axis angle correspondence table is used to describe the correspondence between the wavelength of incident light and the optical axis angle of the target biaxial crystal; based on the wavelength and optical axis angle correspondence table of the target biaxial crystal, the first optical axis angle and the second optical axis angle corresponding to the first wavelength and the second wavelength respectively are determined.
[0041] The target biaxial crystal is a biaxial crystal pre-selected by the server, and is used to select an encryption method for generating an access token for the client when the server receives an access request from the client. The selected encryption method utilizes the property that the biaxial crystal has different optical axis angle values for light of different wavelengths. The wavelength and optical axis angle correspondence table of the target biaxial crystal can be pre-downloaded and saved locally on the server, or it can be obtained by simulation calculation using numerical calculation software. The wavelength of the incident light of the biaxial crystal corresponds to the optical axis angle, and the change law of the two is not a simple relationship such as linearity, positive correlation or negative correlation. Therefore, for the same biaxial crystal, the optical axis angle corresponding to the incident light with a larger wavelength value is not necessarily larger than the optical axis angle corresponding to the incident light with a smaller wavelength value. Therefore, using the method of this embodiment, it is difficult for software attackers to predict which encryption method the server will use to encrypt data to generate an access token, which greatly improves the security of the access token.
[0042] As an optional embodiment, the target encryption method for generating an access token can be determined based on the first optical axis angle and the second optical axis angle in the following manner: compare the first optical axis angle with the second optical axis angle to obtain a comparison result; and determine the target encryption method from the multiple predetermined encryption methods based on the correspondence between the comparison result and the multiple predetermined encryption methods.
[0043] By taking advantage of the fact that the biaxial crystal has different optical axis angle values for light of different wavelengths, an encryption method for randomly assigning an access token to the client that initiates the access request can be used.
[0044] As an optional embodiment, generating a target access token based on an access request and a target encryption method may include: obtaining the IP address of the client corresponding to the access request and the timestamp of receiving the access request; encrypting the IP address and timestamp using the target encryption method to obtain the target access token.
[0045] In this optional embodiment, the client's IP address and the timestamp of the access request can be combined to obtain a string, and then the string can be encrypted using a target encryption method, for example, the string can be encrypted using an RSA encryption method or a SHA256 encryption method to obtain a target access token.
[0046] As an optional embodiment, the above process can also generate a token seed according to the target access token; and send the token seed to the client. By sending the token seed to the client, the client can subsequently access the server based on the token seed. For example, when the client communicates with the server, the communication content and the token seed can be sent to the server. The server verifies the identity of the client based on the token seed, and returns the access content to the server if the verification is successful.
[0047] Figure 3 is a flow chart of a token generation method according to an optional embodiment of the present invention. Figure 3 As shown, the token can be generated through the following steps:
[0048] Step 1: The client calls the server based on the double-send mechanism: The client needs to request the server twice when pre-acquiring the token, and report the interface call to the server;
[0049] Step 2: Condition verification: Analyze whether the request is lost and whether the IP that initiated the request has been reported to the server;
[0050] Step 3: Randomly assign wavelengths: If the client's IP has been reported to the server, two wavelengths are randomly assigned to the client according to the request body information carried in the access request sent by the client, namely the first wavelength and the second wavelength;
[0051] Step 4: Compare the optical axis angles: Based on the property that the biaxial crystal has different optical axis angle values for light of different wavelengths, determine the optical axis angles corresponding to the first wavelength and the second wavelength for the target biaxial crystal. For example, when the light corresponding to the first wavelength is red light, the light corresponding to the second wavelength is purple light, and the optical axis angle of red light is greater than that of purple light, it is recorded as r>v; otherwise, it is recorded as r <v;
[0052] Step 5: Elect and allocate encryption methods: Based on the comparison results of the optical axis angles, select the encryption method corresponding to the client this time from multiple encryption methods, that is, the target encryption method;
[0053] Step 6: Encrypt and return to the client: According to the target encryption method, the token information is obtained by encrypting the token seed and returned to the client.
[0054] According to an embodiment of the present invention, a token generation device for implementing the above token generation method is also provided. Figure 4 is a structural block diagram of a token generation device provided according to an embodiment of the present invention, such as Figure 4 As shown, the token generating device includes: a receiving module 42, a first generating module 44, a determining module 46 and a second generating module 48. The token generating device is described below.
[0055] The receiving module 42 is used to receive the access request sent by the client;
[0056] A first generating module 44, configured to generate a first wavelength and a second wavelength based on an access request;
[0057] A determination module 46, configured to determine, based on the physical properties of the target biaxial crystal, a first optical axis angle and a second optical axis angle corresponding to the first wavelength and the second wavelength, respectively, in the target biaxial crystal;
[0058] The second generating module 48 is used to determine a first encryption method for generating an access token according to the first optical axis angle and the second optical axis angle, and to generate a target access token according to the access request and the first encryption method.
[0059] It should be noted that the receiving module 42, the first generating module 44, the determining module 46 and the second generating module 48 correspond to steps S202 to S208 in the embodiment, and the examples and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules as part of the device can be run in the computer terminal 10 provided in the embodiment.
[0060] An embodiment of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one network device among multiple network devices of a computer network. The computer device includes a memory and a processor.
[0061] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the token generation method and device in the embodiments of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, the above-mentioned token generation method is realized. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0062] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: receive an access request sent by the client; generate a first wavelength and a second wavelength based on the access request; determine the first optical axis angle and the second optical axis angle corresponding to the first wavelength and the second wavelength in the target biaxial crystal based on the physical characteristics of the target biaxial crystal; determine the target encryption method for generating an access token based on the first optical axis angle and the second optical axis angle, and generate a target access token based on the access request and the target encryption method.
[0063] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0064] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the token generation method provided in the above embodiment 1.
[0065] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0066] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: receiving an access request sent by a client; generating a first wavelength and a second wavelength based on the access request; determining, based on the physical properties of the target biaxial crystal, a first optical axis angle and a second optical axis angle corresponding to the first wavelength and the second wavelength in the target biaxial crystal, respectively; determining a target encryption method for generating an access token based on the first optical axis angle and the second optical axis angle, and generating a target access token based on the access request and the target encryption method.
[0067] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0068] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0069] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0070] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0071] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0072] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0073] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A token generation method, characterized in that: include: Receive access requests sent by clients; Generating a first wavelength and a second wavelength based on the access request, including: randomly allocating two wavelengths to the client according to request body information carried in the access request sent by the client, namely the first wavelength and the second wavelength; Based on the physical properties of a target biaxial crystal, determining a first optical axis angle and a second optical axis angle corresponding to the first wavelength and the second wavelength, respectively, in the target biaxial crystal; Determining a target encryption method for generating an access token according to the first optical axis angle and the second optical axis angle, and generating a target access token according to the access request and the target encryption method; Determining a target encryption method for generating an access token based on the first optical axis angle and the second optical axis angle includes: comparing the first optical axis angle with the second optical axis angle to obtain a comparison result; and determining the target encryption method from the multiple predetermined encryption methods based on a correspondence between the comparison result and multiple predetermined encryption methods.
2. The method according to claim 1, characterized in that The determining, based on the physical properties of the target biaxial crystal, a first optical axis angle and a second optical axis angle corresponding to the first wavelength and the second wavelength, respectively, in the target biaxial crystal comprises: Based on the access request sent by the client, determining the target biaxial crystal corresponding to the client; Obtaining a wavelength-optical-axis-angle correspondence table of the target biaxial crystal, wherein the wavelength-optical-axis-angle correspondence table is used to describe the correspondence between the incident light wavelength and the optical-axis angle of the target biaxial crystal; Based on the wavelength-optical axis angle correspondence table of the target biaxial crystal, the first optical axis angle and the second optical axis angle corresponding to the first wavelength and the second wavelength respectively are determined.
3. The method according to claim 1, characterized in that The generating a target access token according to the access request and the target encryption method includes: Obtaining the IP address of the client corresponding to the access request and the timestamp of receiving the access request; The IP address and the timestamp are encrypted using the target encryption method to obtain the target access token.
4. The method according to claim 1, characterized in that: The receiving an access request sent by the client includes: A first access request and a second access request sent by the client are received, and when an interval between receiving the first access request and receiving the second access request is less than a predetermined time, a report is made to the client.
5. The method according to claim 4, characterized in that The generating the first wavelength and the second wavelength based on the access request includes: Based on the access request, determining whether the client should report; In a case where the client has reported, a first wavelength and a second wavelength are generated.
6. The method according to claim 1, characterized in that Also includes: Generate a token seed according to the target access token; Sending the token seed to the client.
7. A token generation device, characterized in that: include: A receiving module, used for receiving an access request sent by a client; A first generating module is configured to generate a first wavelength and a second wavelength based on the access request, comprising: randomly allocating two wavelengths, namely the first wavelength and the second wavelength, to the client according to request body information carried in the access request sent by the client; a determination module, configured to determine, based on physical properties of a target biaxial crystal, a first optical axis angle and a second optical axis angle corresponding to the first wavelength and the second wavelength, respectively, in the target biaxial crystal; A second generating module, configured to determine a first encryption method for generating an access token according to the first optical axis angle and the second optical axis angle, and to generate a target access token according to the access request and the first encryption method; Among them, determining the target encryption method for generating an access token based on the first optical axis angle and the second optical axis angle includes: comparing the first optical axis angle and the second optical axis angle to obtain a comparison result; and determining the target encryption method from the multiple predetermined encryption methods based on the correspondence between the comparison result and a plurality of predetermined encryption methods.
8. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the token generation method described in any one of claims 1 to 6.