Device identification method, device, storage medium and client

Through the method of key exchange and dynamic token comparison, the problem of the participation of third-party virtual devices in Internet marketing activities is solved, the security of the activities is improved, and the participation of fake devices is prevented.

CN115174228BActive Publication Date: 2025-01-21HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210793873.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-07
Publication Date
2025-01-21
Estimated Expiration
2042-07-07

AI Technical Summary

Technical Problem

In Internet marketing activities, third parties participate in the activities through virtual software simulation equipment, resulting in user interests infringement and reduced activity effect. How to ensure the security of the activities has become an urgent problem.

Method used

Through key exchange with the server, the first public key and the second public key are obtained, and under the same circumstances, according to the preset time interval, a token application request is sent to the server, and the dynamic token is received and compared. , determine the legality check of the client, and identify the device as a regular or fake device.

Benefits of technology

It effectively improves the security of Internet marketing activities, increases the difficulty for third parties to forge legitimate equipment, prevents fake equipment from participating in activities, and protects user interests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115174228B_ABST
    Figure CN115174228B_ABST
Patent Text Reader

Abstract

The present application discloses a device identification method, apparatus, storage medium and client, the method comprising: performing key exchange with a server to obtain a first common key and a second common key; when the first common key and the second common key are the same, sending a token application request to the server, and receiving a first dynamic token fed back by the server; sending the first dynamic token to a background service, so that the background service obtains a second dynamic token, and compares the first dynamic token with the second dynamic token; when the first dynamic token and the second dynamic token are the same, determining that the client has passed the legitimacy check, and identifying the device to which the client currently belongs as a regular device. The method implements legitimacy verification of the client by comparing the first common key and the second common key, and comparing the first dynamic token and the second dynamic token, which can increase the difficulty for a third party to forge a regular device, making it impossible for a third party to forge a regular device to participate in Internet marketing activities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cryptographic technology, and in particular to a device identification method, apparatus, storage medium and client. Background Art

[0002] Applications (APPs) provided by the e-commerce industry often hold Internet marketing activities. However, many Internet marketing activities are used by third parties in the process of attracting new users and voting. Third parties use virtual software simulation devices (such as mobile phones and tablets) to send access requests to the server (the access requests are used to forge users' participation in Internet marketing activities) in exchange for high rewards at low or even no cost, so that gifts, coupons, red envelopes, etc. that should belong to users are taken away. This not only infringes on the interests of users, but also fails to achieve the effect of the activities, reducing the benefits of marketing activities.

[0003] Therefore, how to ensure the security of Internet marketing activities has become an urgent problem to be solved in this field. Summary of the invention

[0004] The present application provides a device identification method, apparatus, storage medium and client, the purpose of which is to improve the security of Internet marketing activities.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] A device identification method, applied to a client, comprising:

[0007] Exchange keys with the server to obtain the first and second common keys;

[0008] When the first common key and the second common key are the same, sending a token claiming request to the server at a preset time interval, and receiving a first dynamic token fed back by the server based on the token claiming request;

[0009] Sending the first dynamic token to a background service of an application so that the background service obtains a second dynamic token from the server, and compares the first dynamic token with the second dynamic token to obtain a token comparison result;

[0010] When the token comparison result indicates that the first dynamic token and the second dynamic token are the same, it is determined that the client has passed the legitimacy check, and the device to which the client currently belongs is identified as a regular device.

[0011] Optionally, after performing key exchange with the server to obtain the first common key and the second common key, the method further includes:

[0012] In the case that the first common key and the second common key are different, it is determined that the client fails the legitimacy check, and the device to which the client currently belongs is identified as a false device.

[0013] Optionally, also include:

[0014] When the token comparison result indicates that the first dynamic token and the second dynamic token are not identical, it is determined that the client fails the legitimacy check, and the device to which the client currently belongs is identified as a false device.

[0015] Optionally, performing key exchange with the server to obtain the first common key and the second common key includes:

[0016] Enabling the application to initialize the client so that the client uses a preset communication protocol to establish a communication connection with the server;

[0017] After the client successfully establishes the communication connection with the server, the client sends the device information parameters of the client to the server, so that the server generates a first key pair based on the device information parameters; the first key pair includes a first public key and a first private key;

[0018] The client generates a second key pair based on the device information parameter; the second key pair includes a second public key and a second private key;

[0019] The client receives the first public key sent by the server, and generates a first common key based on the first public key and the second public key;

[0020] The client sends the second public key to the server, so that the server generates a second common key based on the first public key and the second public key;

[0021] The client receives the second shared key sent by the server.

[0022] Optionally, after the enabling application program initializes the client so that the client uses a preset communication protocol and establishes a communication connection with the server, the method further includes:

[0023] In the case that the client fails to successfully establish the communication connection with the server, the communication connection with the server is repeatedly established at an interval of a first automatic retry time until the client successfully establishes the communication connection with the server; the value of the first automatic retry time is equal to the sum of a preset random number and a first numerical value; the first numerical value represents a preset delay time.

[0024] Optionally, also include:

[0025] When an abnormality is detected in the communication connection, the communication connection is established with the server repeatedly at an interval of a second automatic retry time until the communication connection returns to normal; the value of the second automatic retry time is equal to the product of a target value and a second value; the target value is equal to the sum of the value of the first automatic retry time and a preset random number; the second value represents the time interval for sending and receiving data in the communication channel; the communication channel is a data transmission channel obtained after the communication connection between the client and the server is established.

[0026] A device identification apparatus, comprising:

[0027] A common key obtaining unit, used to perform key exchange with the server to obtain a first common key and a second common key;

[0028] A token request unit, configured to send a token application request to the server at a preset time interval when the first common key and the second common key are the same, and receive a first dynamic token fed back by the server based on the token application request;

[0029] A token comparison unit, configured to send the first dynamic token to a background service of an application program, so that the background service obtains a second dynamic token from the server, and compares the first dynamic token with the second dynamic token to obtain a token comparison result;

[0030] A device verification unit is used to determine that the client has passed the legality verification when the token comparison result indicates that the first dynamic token and the second dynamic token are the same, and identify the device to which the client currently belongs as a regular device.

[0031] Optionally, the device verification unit is further used for:

[0032] In the case that the first common key and the second common key are different, it is determined that the client fails the legitimacy check, and the device to which the client currently belongs is identified as a false device.

[0033] A computer-readable storage medium includes a stored program, wherein the program executes the device identification method.

[0034] A client comprises: a processor, a memory and a bus; the processor and the memory are connected via the bus;

[0035] The memory is used to store a program, and the processor is used to run the program, wherein the device identification method is executed when the program is run.

[0036] The technical solution provided by the present application performs a key exchange with the server to obtain a first common key and a second common key. When the first common key and the second common key are the same, a token application request is sent to the server at a preset time interval, and a first dynamic token is received based on the token application request feedback from the server. The first dynamic token is sent to the background service of the application so that the background service obtains the second dynamic token from the server, and compares the first dynamic token with the second dynamic token to obtain a token comparison result. When the token comparison result indicates that the first dynamic token and the second dynamic token are the same, it is determined that the client has passed the legitimacy check, and the device to which the client currently belongs is identified as a regular device. The present application implements a legitimacy check on the client by comparing the first common key and the second common key, as well as comparing the first dynamic token and the second dynamic token, which can increase the difficulty for a third party to forge a regular device, making it impossible for a third party to forge a regular device to participate in the Internet marketing activities provided by the APP, thereby effectively improving the security of Internet marketing activities. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1a A schematic diagram of a device identification method provided in an embodiment of the present application;

[0039] Figure 1b A schematic diagram of a device identification method provided in an embodiment of the present application;

[0040] Figure 2 A flowchart of another device identification method provided in an embodiment of the present application;

[0041] Figure 3 A schematic diagram of the architecture of a device identification apparatus provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0043] like Figure 1a and Figure 1bFIG. 1 is a flow chart of a device identification method provided in an embodiment of the present application, which can be applied to a client and includes the following steps:

[0044] S101: Activate the APP to initialize the client, so that the client uses a preset communication protocol to establish a communication connection with the server.

[0045] Among them, the preset communication protocol includes but is not limited to the socket protocol. The preset server is a server that provides socket service. The socket service is pre-encapsulated with the Transmission Control Protocol (TCP). After the client uses the socket protocol to establish a long connection with the server, TCP communication can be carried out between the client and the server.

[0046] In the embodiment of the present application, the client and the server establish a communication connection, which can increase the difficulty for a third party to disguise as a user, thereby improving the security of Internet marketing activities.

[0047] In addition, the client shown in the embodiment of the present application can be encapsulated as a software development kit (Software Development Kit, SDK) and pre-deployed on the device to which the APP belongs.

[0048] S102: When the client fails to successfully establish a communication connection with the server, repeatedly establish a communication connection with the server at an interval of a first automatic retry time until the client successfully establishes a communication connection with the server.

[0049] The value of the first automatic retry time is equal to the sum of the preset random number and the first value, and the first value represents the preset delay time (i.e., the time for the server to feedback the signal to the client). In the embodiment of the present application, the range of the preset random number includes but is not limited to [0, 1].

[0050] S103: After the client successfully establishes a communication connection with the server, the device information parameters of the client are sent to the server, so that the server generates a first key pair based on the device information parameters.

[0051] The device information parameters include a preset device ID, an application ID, and a service ID. The first key pair includes a first public key and a first private key.

[0052] It should be noted that the algorithm used by the server to generate the first key pair includes, but is not limited to, a Diffie-Hellman (DH) key exchange algorithm.

[0053] S104: The client generates a second key pair based on the device information parameters.

[0054] The second key pair includes a second public key and a second private key. The algorithm used by the client to generate the second key pair is the same as the algorithm used by the server to generate the first key pair.

[0055] It should be noted that S103 and S104 may be executed concurrently.

[0056] S105: The client receives the first public key sent by the server, and generates a first common key based on the first public key and the second public key.

[0057] The algorithm used by the client to generate the first common key is the DH algorithm.

[0058] S106: The client sends the second public key to the server, so that the server generates a second common key based on the first public key and the second public key.

[0059] Among them, the algorithm used by the server to generate the second common key is the DH algorithm.

[0060] It should be noted that S105 and S106 may be executed concurrently.

[0061] S107: The client receives the second common key sent by the server, and compares the first common key with the second common key.

[0062] S108: When the first common key and the second common key are not the same, it is determined that the client fails the legitimacy check, and the device to which the client currently belongs is identified as a false device.

[0063] Among them, if the client fails the legitimacy check, it means that the device to which the client currently belongs may be a fake device simulated by a third party using virtual software. For this reason, the device to which the client currently belongs is identified as a fake device, and the background service of the APP will prohibit the fake device from participating in Internet marketing activities to prevent third parties from using fake devices to participate in Internet marketing activities held by the APP, ensuring that the interests of normal users and merchants are not infringed by speculators, thereby effectively improving the security of Internet marketing activities.

[0064] S109: When the first common key and the second common key are the same, a token claiming request is sent to the server at a preset time interval, and a first dynamic token is received from the server based on the token claiming request.

[0065] The token application request is generated by the client based on a preset dynamic password algorithm, and correspondingly, the first dynamic token is generated by the server based on a preset dynamic password algorithm.

[0066] In the embodiment of the present application, the preset dynamic password algorithm includes but is not limited to: TOTP algorithm, HOTP algorithm, etc.

[0067] S110: Send the first dynamic token to the background service of the APP, so that the background service obtains the second dynamic token from the server, and compares the first dynamic token with the second dynamic token to obtain a token comparison result.

[0068] S111: Receive the token comparison result sent by the background service, and if the token comparison result indicates that the first dynamic token and the second dynamic token are the same, determine that the client has passed the legitimacy check, and identify the device to which the client currently belongs as a regular device.

[0069] Optionally, when the token comparison result indicates that the first dynamic token and the second dynamic token are not identical, it is determined that the client fails the legitimacy check, and the device to which the client currently belongs is identified as a false device.

[0070] Among them, using the token comparison results to implement further legitimacy verification of the client can increase the difficulty for a third party to forge regular equipment to participate in Internet marketing activities, thereby effectively improving the security of Internet marketing activities.

[0071] S112: When an abnormality is detected in the communication connection, repeatedly establish the communication connection with the server after a second automatic retry time interval until the communication connection returns to normal.

[0072] The value of the second automatic retry time is equal to the product of the target value and the second value, the target value is equal to the sum of the value of the first automatic retry time and the preset random number, and the second value represents the time interval for sending and receiving data in the communication channel. Generally speaking, the communication channel is a data transmission channel obtained after the communication connection between the client and the server is established.

[0073] Optionally, if the value of the first automatic retry time is greater than the second value, the second value may be identified as the second automatic retry time.

[0074] It should be noted that after the client establishes a communication connection with the server, the client sends a heartbeat packet to the server at a preset interval. If it is detected that the client does not send the heartbeat packet on time, it is determined that the communication connection between the client and the server is abnormal, and it is necessary to wait for a second automatic retry time and repeat the establishment of a communication connection with the server until the communication connection returns to normal.

[0075] Based on the above process shown in S101-S112, this embodiment can achieve the following beneficial effects:

[0076] 1. Process network transmission based on the underlying TCP. Compared with HTTP protocol, native TCP communication can increase the difficulty of packet capture;

[0077] 2. Use DH algorithm to encrypt data transmission, which can increase the difficulty of deciphering the transmission content compared with the original message transmission;

[0078] 3. Use dynamic tokens (the first dynamic token and the second dynamic token mentioned above are specific forms of dynamic tokens) for auxiliary authentication to ensure that the third-party business behavior occurs on regular devices and that regular devices are running in a real environment;

[0079] 4. Use the core algorithm to encapsulate the underlying architecture (encapsulate the client as SDK) and maintain the SDK independently from the APP to improve the security of the APP.

[0080] To sum up, this embodiment realizes the legitimacy verification of the client by comparing the first shared key and the second shared key, and comparing the first dynamic token and the second dynamic token, which can increase the difficulty for a third party to forge a regular device, making it impossible for a third party to forge a regular device to participate in Internet marketing activities provided by the APP, thereby effectively improving the security of Internet marketing activities.

[0081] It should be noted that S101 mentioned in the above embodiment is an optional implementation of the device identification method shown in the embodiment of the present application. In addition, S112 mentioned in the above embodiment is also an optional implementation of the device identification method shown in the embodiment of the present application. To this end, the process mentioned in the above embodiment can be summarized as follows: Figure 2 The method described.

[0082] like Figure 2 FIG. 1 is a flow chart of another device identification method provided in an embodiment of the present application, comprising the following steps:

[0083] S201: Exchange keys with the server to obtain a first common key and a second common key.

[0084] S202: When the first common key and the second common key are the same, a token claiming request is sent to the server at a preset time interval, and a first dynamic token is received from the server based on the token claiming request.

[0085] S203: Send the first dynamic token to the background service of the application program, so that the background service obtains the second dynamic token from the server, and compares the first dynamic token with the second dynamic token to obtain a token comparison result.

[0086] S204: When the token comparison result indicates that the first dynamic token and the second dynamic token are the same, it is determined that the client has passed the legality check, and the device to which the client currently belongs is identified as a regular device.

[0087] To sum up, this embodiment realizes the legitimacy verification of the client by comparing the first shared key and the second shared key, and comparing the first dynamic token and the second dynamic token, which can increase the difficulty for a third party to forge a regular device, making it impossible for a third party to forge a regular device to participate in Internet marketing activities provided by the APP, thereby effectively improving the security of Internet marketing activities.

[0088] Corresponding to the device identification method provided in the above-mentioned embodiment of the present application, the embodiment of the present application also provides a device identification apparatus.

[0089] like Figure 3 FIG. 1 is a schematic diagram of the architecture of a device identification apparatus provided in an embodiment of the present application, including:

[0090] The common key obtaining unit 100 is used to perform key exchange with the server to obtain a first common key and a second common key.

[0091] Optionally, the common key acquisition unit 100 is specifically used to: enable the application to initialize the client, so that the client adopts a preset communication protocol to establish a communication connection with the server; after the client and the server successfully establish a communication connection, the client sends the client's device information parameters to the server, so that the server generates a first key pair based on the device information parameters; the first key pair includes a first public key and a first private key; the client generates a second key pair based on the device information parameters; the second key pair includes a second public key and a second private key; the client receives the first public key sent by the server, and generates a first common key based on the first public key and the second public key; the client sends the second public key to the server, so that the server generates a second common key based on the first public key and the second public key; the client receives the second common key sent by the server.

[0092] The common key acquisition unit 100 is also used for: when the client and the server fail to successfully establish a communication connection, repeatedly establishing a communication connection with the server at an interval of a first automatic retry time until the client and the server successfully establish a communication connection; the value of the first automatic retry time is equal to the sum of a preset random number and a first numerical value; the first numerical value represents a preset delay time.

[0093] The common key obtaining unit 100 is also used for: when an abnormality in the communication connection is detected, repeatedly establishing the communication connection with the server after a second automatic retry time interval until the communication connection returns to normal; the value of the second automatic retry time is equal to the product of the target value and the second value; the target value is equal to the sum of the value of the first automatic retry time and a preset random number; the second value represents the time interval for sending and receiving data in the communication channel; the communication channel is a data transmission channel obtained after the communication connection between the client and the server is established.

[0094] The token request unit 200 is used to send a token application request to the server at a preset time interval when the first common key and the second common key are the same, and receive a first dynamic token fed back by the server based on the token application request.

[0095] The token comparison unit 300 is used to send the first dynamic token to the background service of the application so that the background service obtains the second dynamic token from the server and compares the first dynamic token with the second dynamic token to obtain a token comparison result.

[0096] The device verification unit 400 is used to determine that the client has passed the legality verification when the token comparison result indicates that the first dynamic token and the second dynamic token are the same, and identify the device to which the client currently belongs as a regular device.

[0097] Optionally, the device verification unit 400 is further used to: when the first common key and the second common key are different, determine that the client has not passed the legitimacy verification, and identify the device to which the client currently belongs as a false device.

[0098] The device verification unit 400 is further configured to: when the token comparison result indicates that the first dynamic token and the second dynamic token are different, determine that the client fails the legitimacy verification, and identify the device to which the client currently belongs as a false device.

[0099] To sum up, this embodiment realizes the legitimacy verification of the client by comparing the first shared key and the second shared key, and comparing the first dynamic token and the second dynamic token, which can increase the difficulty for a third party to forge a regular device, making it impossible for a third party to forge a regular device to participate in Internet marketing activities provided by the APP, thereby effectively improving the security of Internet marketing activities.

[0100] The present application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the device identification method provided by the present application.

[0101] The present application also provides a client, including: a processor, a memory and a bus. The processor and the memory are connected via a bus, the memory is used to store programs, and the processor is used to run programs, wherein when the program is running, the device identification method provided by the present application is executed, including the following steps:

[0102] Exchange keys with the server to obtain the first and second common keys;

[0103] When the first common key and the second common key are the same, sending a token claiming request to the server at a preset time interval, and receiving a first dynamic token fed back by the server based on the token claiming request;

[0104] Sending the first dynamic token to a background service of an application so that the background service obtains a second dynamic token from the server, and compares the first dynamic token with the second dynamic token to obtain a token comparison result;

[0105] When the token comparison result indicates that the first dynamic token and the second dynamic token are the same, it is determined that the client has passed the legitimacy check, and the device to which the client currently belongs is identified as a regular device.

[0106] Specifically, based on the above embodiment, after performing key exchange with the server to obtain the first common key and the second common key, the method further includes:

[0107] In the case that the first common key and the second common key are different, it is determined that the client fails the legitimacy check, and the device to which the client currently belongs is identified as a false device.

[0108] Specifically, based on the above embodiment, it also includes:

[0109] When the token comparison result indicates that the first dynamic token and the second dynamic token are not identical, it is determined that the client fails the legitimacy check, and the device to which the client currently belongs is identified as a false device.

[0110] Specifically, based on the above embodiment, the step of exchanging keys with the server to obtain the first common key and the second common key includes:

[0111] Enabling the application to initialize the client so that the client uses a preset communication protocol to establish a communication connection with the server;

[0112] After the client successfully establishes the communication connection with the server, the client sends the device information parameters of the client to the server, so that the server generates a first key pair based on the device information parameters; the first key pair includes a first public key and a first private key;

[0113] The client generates a second key pair based on the device information parameter; the second key pair includes a second public key and a second private key;

[0114] The client receives the first public key sent by the server, and generates a first common key based on the first public key and the second public key;

[0115] The client sends the second public key to the server, so that the server generates a second common key based on the first public key and the second public key;

[0116] The client receives the second shared key sent by the server.

[0117] Specifically, based on the above embodiment, after the enabling application initializes the client so that the client uses a preset communication protocol to establish a communication connection with the server, the method further includes:

[0118] In the case that the client fails to successfully establish the communication connection with the server, the communication connection with the server is repeatedly established at an interval of a first automatic retry time until the client successfully establishes the communication connection with the server; the value of the first automatic retry time is equal to the sum of a preset random number and a first numerical value; the first numerical value represents a preset delay time.

[0119] Specifically, based on the above embodiment, it also includes:

[0120] When an abnormality is detected in the communication connection, the communication connection is established with the server repeatedly at an interval of a second automatic retry time until the communication connection returns to normal; the value of the second automatic retry time is equal to the product of a target value and a second value; the target value is equal to the sum of the value of the first automatic retry time and a preset random number; the second value represents the time interval for sending and receiving data in the communication channel; the communication channel is a data transmission channel obtained after the communication connection between the client and the server is established.

[0121] If the functions described in the method of the embodiment of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a storage medium readable by a computing device. Based on this understanding, the part of the embodiment of the present application that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computing device (which can be a personal computer, server, mobile computing device or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories, random access memories, magnetic disks or optical disks.

[0122] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0123] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A device identification method, characterized in that: Applied to the client, including: Exchange keys with the server to obtain the first common key and the second common key; When the first common key and the second common key are the same, sending a token claiming request to the server at a preset time interval, and receiving a first dynamic token fed back by the server based on the token claiming request; Sending the first dynamic token to a background service of an application so that the background service obtains a second dynamic token from the server, and compares the first dynamic token with the second dynamic token to obtain a token comparison result; If the token comparison result indicates that the first dynamic token and the second dynamic token are the same, determining that the client has passed the legitimacy check, and identifying the device to which the client currently belongs as a regular device; The key exchange with the server to obtain the first common key and the second common key includes: Enabling the application to initialize the client so that the client uses a preset communication protocol to establish a communication connection with the server; After the client successfully establishes the communication connection with the server, the client sends the device information parameters of the client to the server, so that the server generates a first key pair based on the device information parameters; the first key pair includes a first public key and a first private key; The client generates a second key pair based on the device information parameter; the second key pair includes a second public key and a second private key; The client receives the first public key sent by the server, and generates a first common key based on the first public key and the second public key; The client sends the second public key to the server, so that the server generates a second common key based on the first public key and the second public key; The client receives the second shared key sent by the server.

2. The method according to claim 1, characterized in that After the key exchange with the server is performed to obtain the first common key and the second common key, the method further includes: In the case that the first common key and the second common key are different, it is determined that the client fails the legitimacy check, and the device to which the client currently belongs is identified as a false device.

3. The method according to claim 1, characterized in that Also includes: When the token comparison result indicates that the first dynamic token and the second dynamic token are not identical, it is determined that the client fails the legitimacy check, and the device to which the client currently belongs is identified as a false device.

4. The method according to claim 1, characterized in that After the activation application initializes the client so that the client uses a preset communication protocol and establishes a communication connection with the server, the process further includes: In the case that the client fails to successfully establish the communication connection with the server, the communication connection with the server is repeatedly established at an interval of a first automatic retry time until the client successfully establishes the communication connection with the server; the value of the first automatic retry time is equal to the sum of a preset random number and a first numerical value; the first numerical value represents a preset delay time.

5. The method according to claim 4, characterized in that Also includes: When an abnormality is detected in the communication connection, the communication connection is repeatedly established with the server at intervals of a second automatic retry time until the communication connection returns to normal; the value of the second automatic retry time is equal to the product of the target value and the second value; The target value is equal to the sum of the value of the first automatic retry time and a preset random number; The second value represents the time interval for sending and receiving data in the communication channel; the communication channel is a data transmission channel obtained after the communication connection between the client and the server is established.

6. A device identification apparatus, characterized in that: include: A common key obtaining unit, used to perform key exchange with the server to obtain a first common key and a second common key; A token request unit, configured to send a token application request to the server at a preset time interval when the first common key and the second common key are the same, and receive a first dynamic token fed back by the server based on the token application request; A token comparison unit, configured to send the first dynamic token to a background service of an application program, so that the background service obtains a second dynamic token from the server, and compares the first dynamic token with the second dynamic token to obtain a token comparison result; a device verification unit, configured to determine that the client has passed the legitimacy verification if the token comparison result indicates that the first dynamic token and the second dynamic token are the same, and identify the device to which the client currently belongs as a regular device; The common key obtaining unit is specifically used for: enabling the application to initialize the client, so that the client adopts a preset communication protocol to establish a communication connection with the server; after the client and the server successfully establish the communication connection, the client sends the device information parameters of the client to the server, so that the server generates a first key pair based on the device information parameters; the first key pair includes a first public key and a first private key; the client generates a second key pair based on the device information parameters; the second key pair includes a second public key and a second private key; the client receives the first public key sent by the server, and generates a first common key based on the first public key and the second public key; the client sends the second public key to the server, so that the server generates a second common key based on the first public key and the second public key; the client receives the second common key sent by the server.

7. The device according to claim 6, characterized in that The device verification unit is also used for: In the case that the first common key and the second common key are different, it is determined that the client fails the legitimacy check, and the device to which the client currently belongs is identified as a false device.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the device identification method according to any one of claims 1 to 5.

9. A client, characterized in that: include: processor, memory, and bus; The processor is connected to the memory via the bus; The memory is used to store programs, and the processor is used to run programs, wherein the program executes the device identification method described in any one of claims 1 to 5 when running.

Citation Information

Patent Citations

  • Single-point log-in method, system and system and log-in service platform

    CN101764806A