Client authentication method, device, equipment, medium and program product
By storing seed files in the terminal device and hashing calculation and chain authentication of some file contents, the authentication performance bottleneck of low-bandwidth and low-computing capabilities devices is solved, and efficient device legality verification and data transmission are achieved.
Patent Information
- Application Number
- CN202510770614.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-08-08
AI Technical Summary
In the scenario of terminal equipment with low bandwidth and low computing capabilities, the encryption and decryption and hash computing of digital signatures are too heavy, resulting in increased network load and computing overhead, making it difficult to effectively ensure the legitimacy of equipment and the credibility of data transmission.
By initializing the terminal device, storing the seed file, and generating authentication requests, the server generates random request content, reads the seed file target content, and performs authentication information construction and authentication, it is simplified into hash calculation and chain authentication of some file contents.
It reduces the computing burden and network overhead of terminal devices, improves verification efficiency, enables low-performance terminal devices to run smoothly, and enhances the verification efficiency of device legality.
Smart Images

Figure CN120455016A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet of Things technology, and in particular to a client authentication method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Art
[0002] With the prevalence of the Internet of Things (IoT) and terminal devices, more and more devices need to access networks and transmit data. However, in practical applications, terminal devices often have limited bandwidth, computing resources, and storage resources. Widely used digital signature technology can ensure the legitimacy of terminal devices and the credibility of transmitted data. However, the core digital signature process involves encryption, decryption, and hash calculation, which is too computationally intensive for resource-limited terminal devices. This significantly increases network load and computational overhead, especially in high-frequency, small-volume transmission scenarios. Summary of the Invention
[0003] Based on this, it is necessary to provide a client authentication method, device, computer device, computer-readable storage medium and computer program product to address the above technical problems, which can reduce the computing load of terminal devices and the size of network data packets while ensuring the legitimacy of the devices and their transmitted data.
[0004] In a first aspect, the present application provides a client authentication method, comprising:
[0005] Initialize the terminal device to obtain the target terminal device containing the seed file;
[0006] Generate an authentication request according to the target terminal device, and send the authentication request to the server, so that the server generates random request content;
[0007] Read the target content of the seed file according to the random request content;
[0008] Performing authentication information construction on the target content to obtain target authentication information;
[0009] The target authentication information is authenticated according to the server and the random request content to obtain an authentication result.
[0010] In one embodiment, the authentication request includes: a seed hash value, device feature information, and a first transaction authentication string; and generating the authentication request based on the target terminal device includes:
[0011] Performing a hash calculation on the seed file of the target terminal device to obtain the seed hash value of the seed file;
[0012] Acquire the device characteristic information of the target terminal device;
[0013] Perform a hash calculation on the randomly generated first salt value to obtain the first transaction authentication string.
[0014] In one embodiment, the random request content includes: a file identifier, a starting position, and an offset size; and reading the target content of the seed file according to the random request content includes:
[0015] In the case that the number of the file identifiers is greater than one, the seed file is read according to the file identifiers, the starting position and the offset size to obtain a plurality of target contents.
[0016] In one embodiment, the target authentication information includes: a hash value to be verified, a first salt value, and a second transaction authentication string; and constructing the authentication information for the target content to obtain the target authentication information includes:
[0017] Performing hash calculation on the target content to obtain the hash value to be verified;
[0018] Obtaining the first salt value from the authentication request;
[0019] Perform a hash calculation on the randomly generated second salt value to obtain the second transaction authentication string.
[0020] In one embodiment, authenticating the target authentication information according to the server and the random request content to obtain an authentication result includes:
[0021] Read the seed file according to the server and the random request content to obtain verification content;
[0022] Performing hash calculation on the verification content to obtain a verification hash value;
[0023] The target authentication information is authenticated according to the verification hash value and the first transaction authentication string received by the server to obtain the authentication result.
[0024] In one embodiment, after generating an authentication request according to the target terminal device, the method further includes:
[0025] If the request sequence number of the authentication request is greater than one, sending the authentication request and the original random number corresponding to the authentication string of the previous transaction of the authentication request to the server, so that the server generates random request content;
[0026] Performing a hash check on the original random number according to the previous transaction authentication string to obtain a check result;
[0027] When the verification result indicates that the verification is passed, the target authentication information is authenticated according to the server and the random request content to obtain an authentication result.
[0028] In a second aspect, the present application further provides a client authentication device, comprising:
[0029] An initialization module is used to initialize the terminal device and obtain a target terminal device containing a seed file;
[0030] an authentication request generating module, configured to generate an authentication request according to the target terminal device, and send the authentication request to a server, so that the server generates random request content;
[0031] A random reading module, configured to read target content of the seed file according to the random request content;
[0032] An authentication information construction module, configured to construct authentication information for the target content to obtain target authentication information;
[0033] The authentication module is used to authenticate the target authentication information according to the server and the random request content to obtain an authentication result.
[0034] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0035] Initialize the terminal device to obtain the target terminal device containing the seed file;
[0036] Generate an authentication request according to the target terminal device, and send the authentication request to the server, so that the server generates random request content;
[0037] Read the target content of the seed file according to the random request content;
[0038] Performing authentication information construction on the target content to obtain target authentication information;
[0039] The target authentication information is authenticated according to the server and the random request content to obtain an authentication result.
[0040] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0041] Initialize the terminal device to obtain the target terminal device containing the seed file;
[0042] Generate an authentication request according to the target terminal device, and send the authentication request to the server, so that the server generates random request content;
[0043] Read the target content of the seed file according to the random request content;
[0044] Performing authentication information construction on the target content to obtain target authentication information;
[0045] The target authentication information is authenticated according to the server and the random request content to obtain an authentication result.
[0046] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the following steps:
[0047] Initialize the terminal device to obtain the target terminal device containing the seed file;
[0048] Generate an authentication request according to the target terminal device, and send the authentication request to the server, so that the server generates random request content;
[0049] Read the target content of the seed file according to the random request content;
[0050] Performing authentication information construction on the target content to obtain target authentication information;
[0051] The target authentication information is authenticated according to the server and the random request content to obtain an authentication result.
[0052] The client authentication method, apparatus, computer device, computer-readable storage medium, and computer program product described above initialize a terminal device to obtain a target terminal device containing a seed file; generate an authentication request based on the target terminal device and send the authentication request to a server, so that the server generates a random request content; reads the target content of the seed file based on the random request content; constructs authentication information for the target content to obtain target authentication information; and authenticates the target authentication information based on the server and the random request content to obtain an authentication result. Therefore, by initializing the terminal device, in addition to storing legitimate files running on the device, a seed file is stored in the terminal device for verifying the legitimacy of the device. The target content of the seed file is read based on the random request content, authentication information is constructed for the target content, and target authentication information is obtained. This avoids the full transmission of large files, achieves integrity authentication through partial verification, and further reduces network overhead. The target authentication information is authenticated based on the server and the random request content to obtain an authentication result. This simplifies the authentication logic and limits the verification operation to the target content of the seed file, reducing the computational burden and improving the verification efficiency, allowing even low-performance terminal devices to operate smoothly. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0054] Figure 1 A diagram of an application environment of a client authentication method in one embodiment;
[0055] Figure 2 Schematic diagram of a client authentication method in one embodiment;
[0056] Figure 3 Schematic diagram of a client authentication method in one embodiment;
[0057] Figure 4 is a structural block diagram of a client authentication device in one embodiment;
[0058] Figure 5 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0060] The client authentication method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, terminal device 102 communicates with server 104 via a network. A data storage system can store data that server 104 needs to process. The data storage system can be integrated on server 104, or placed on a cloud or other network server. Terminal device 102 is initialized to obtain a target terminal device containing a seed file; an authentication request is generated based on the target terminal device and sent to the server 104 server, causing the server 104 server to generate random request content; the target content of the seed file is read based on the random request content; authentication information is constructed for the target content to obtain target authentication information; the target authentication information is authenticated based on the server 104 and the random request content to obtain an authentication result. Terminal device 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart car devices, projectors, etc. Portable wearable devices can include smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0061] In an exemplary embodiment, Figure 2 As shown, a client authentication method is provided, which is applied to Figure 1 The client in FIG. 1 is taken as an example to illustrate the method, including the following steps 202 to 210. Among them:
[0062] Step 202: Initialize the terminal device to obtain a target terminal device containing a seed file.
[0063] Among them, the seed file is used to verify the legitimacy of the terminal device (that is, illegal clients usually cannot obtain the seed file). The content of the seed file is bound to the feature code of the terminal device, and the file size of the seed file must be large enough to occupy a large amount of storage space, thereby achieving storage exclusivity.
[0064] In some embodiments, during the process of initializing the terminal device, in addition to the legitimate files running by the storage device, a seed file is also stored in the terminal device, thereby obtaining a target terminal device containing the seed file. It should be noted that by storing the seed file in the target terminal device, the target terminal device can have storage exclusivity. Since the seed file can occupy a large amount of storage space, illegal file storage can be prevented.
[0065] Among them, the seed file can be a seed file, the device feature information of the target terminal device can be a network card address and a CPU serial number, and the feature code of the target terminal device can be calculated based on the device feature information of the target terminal device. Specifically, the calculation formula of the feature code is as follows: (device_id = f(mac_address, cpu_id))), wherein the feature code is device_id, the CPU serial number is cpu_id, and the network card address is mac_address.
[0066] Step 204: Generate an authentication request according to the target terminal device, and send the authentication request to the server, so that the server generates random request content.
[0067] The content of the authentication request at least includes the device characteristic information device_id, and may also include the hash value of the seed file and the transaction authentication string auth1.
[0068] In some embodiments, the authentication request includes: a seed hash value, device feature information and a first transaction authentication string; generating the authentication request based on the target terminal device includes: performing a hash calculation on the seed file of the target terminal device to obtain the seed hash value of the seed file; obtaining the device feature information of the target terminal device; performing a hash calculation on the randomly generated first salt value to obtain the first transaction authentication string.
[0069] In some embodiments, a seed file of the target terminal device is hashed to obtain a seed hash value of the seed file, and the device feature information device_id of the target terminal device is obtained. Finally, a hash calculation is performed on the randomly generated first salt value sand1 to obtain the first transaction authentication string auth1. The specific formula for calculating the first transaction authentication string auth1 is as follows: (auth1 = hash(sand1)).
[0070] Step 206: Read the target content of the seed file according to the random request content.
[0071] The random request content is one or more file IDs to be verified and the contents to be verified of these files randomly specified by the server, and the contents to be verified are sent to the client in the form of data packets to read the target content of the seed file.
[0072] In some embodiments, the random request content includes: a file identifier, a starting position, and an offset size; reading the target content of the seed file according to the random request content includes: when the number of file identifiers is greater than one, reading the seed file according to the file identifier, the starting position, and the offset size to obtain multiple target contents.
[0073] In some embodiments, when the number of file identifiers is greater than one, that is, when faced with multiple files to be verified in the seed file, and the target contents of these files to be verified, it is necessary to read the seed file based on the randomly selected file identifier (file_id), the starting position (start) of the verification content, and the offset size (offset) to obtain multiple target contents.
[0074] Specifically, based on the random request content of the server, the files in the seed file and the corresponding content are read as follows: read the target content (content1 = read(file_id1, start1, offset1)).
[0075] In this embodiment, a random verification mechanism based on seed files is introduced. During the authentication process, the server randomly specifies certain contents of the seed files stored in the terminal device, and verifies the legitimacy of the terminal device through these randomly selected contents. This mechanism is different from traditional digital certificates or signature technologies. It avoids the cumbersome operation of global verification and only performs rapid verification on part of the file content, greatly reducing computing overhead and verification time, while also increasing the difficulty for attackers to forge legitimate terminals.
[0076] Step 208: construct authentication information for the target content to obtain target authentication information.
[0077] Among them, authentication information construction is the process of integrating and packaging the authentication information obtained after calculation and sending it to the server.
[0078] In some embodiments, the target authentication information includes: a hash value to be verified, a first salt value, and a second transaction authentication string; constructing the authentication information on the target content to obtain the target authentication information includes: performing a hash calculation on the target content to obtain the hash value to be verified; obtaining the first salt value from the authentication request; performing a hash calculation on the randomly generated second salt value to obtain the second transaction authentication string.
[0079] In some embodiments, multiple hash value authentication information to be verified (h1, h2, ..., hn) obtained after hashing the target content, the first salt value sand1 obtained from the authentication request, and the second transaction authentication string auth2 obtained by hashing the randomly generated second salt value are integrated and packaged and sent to the server.
[0080] The randomly generated second salt value sand2 is hashed to obtain the second transaction authentication string auth2, and the calculation process is as follows: (auth2 = hash(sand2)).
[0081] In some embodiments, the process of calculating a target content for a single file in a seed file is as follows: read the target content in the seed file (content1 = read(file_id1, start1, offset1)), perform hash calculation on the target content content1, and obtain the hash value to be verified (h1 = hash(content1)), and other hash values to be verified h2 to hn are calculated in the same way.
[0082] Step 210: Authenticate the target authentication information according to the server and the random request content to obtain an authentication result.
[0083] Among them, the authentication process needs to compare whether the hash to be verified (h1, h2, ..., hn) sent by the client is consistent with the verification hash value calculated by the server based on the random request content, and whether the first salt value sand1 is consistent with the auth1 of the previous request after hash operation. If all are consistent, the authentication is passed.
[0084] In some embodiments, the target authentication information is authenticated according to the server and the random request content to obtain an authentication result, including: reading a seed file according to the server and the random request content to obtain verification content; performing a hash calculation on the verification content to obtain a verification hash value; and authenticating the target authentication information according to the verification hash value and the first transaction authentication string received by the server to obtain an authentication result.
[0085] In some embodiments, the server reads the verification content in the seed file based on the random request content, and performs a hash calculation on the verification content to obtain a verification hash value (h1^, h2^, ..., hn^). The authentication result is obtained by comparing the hash value to be verified (h1, h2, ..., hn) sent by the client with the verification hash value (h1^, h2^, ..., hn^). It also determines whether the first salt value sand1 is consistent with the first transaction authentication string auth1 of the previous request after the hash operation.
[0086] In some embodiments, the process of calculating a verification content for a single file in a seed file is as follows: read the verification content in the seed file (content1^ = read(file_id1, start1, offset1)), perform hash calculation on the verification content content1^, and obtain the hash value to be verified (h1^ = hash(content1^)), and the other hash values to be verified h2^ to hn^ are calculated in the same way.
[0087] In some embodiments, the verification process is as follows: a hash calculation is performed on the first salt value sand1 received by the server, and the obtained verification transaction authentication string is compared with the first transaction authentication string auth1, and it is determined whether (h1 = h1^) and (h2 = h2^) and (hn = hn^) and (hash(sand1) = auth1) are the same. Only when all are consistent, the obtained authentication result is characterized as authentication passed.
[0088] In this embodiment, by simplifying the authentication logic, the verification operation is limited to the hash calculation of the seed file content and the hash check of the chain authentication, which not only reduces the computational burden but also improves the verification efficiency, allowing low-performance terminal devices to run smoothly.
[0089] In the above-mentioned client authentication method, a target terminal device containing a seed file is obtained by initializing the terminal device; an authentication request is generated according to the target terminal device, and the authentication request is sent to the server, so that the server generates a random request content; the target content of the seed file is read according to the random request content; authentication information is constructed for the target content to obtain target authentication information; the target authentication information is authenticated according to the server and the random request content to obtain an authentication result. Therefore, by initializing the terminal device, in addition to the legitimate files running on the storage device, a seed file is stored in the terminal device to verify the legitimacy of the device, and the target content of the seed file is read according to the random request content, and authentication information is constructed for the target content to obtain target authentication information. This avoids the full transmission of large files, achieves integrity authentication through partial verification, further reduces network overhead, and authenticates the target authentication information according to the server and the random request content to obtain an authentication result. This simplifies the authentication logic and limits the verification operation to the target content of the seed file, which not only reduces the computational burden but also improves the verification efficiency, allowing low-performance terminal devices to run smoothly.
[0090] In an exemplary embodiment, Figure 3 As shown, after generating an authentication request according to the target terminal device, the method includes steps 302 to 306. In which:
[0091] Step 302: When the request sequence number of the authentication request is greater than one, the authentication request and the original random number corresponding to the authentication string of the previous transaction of the authentication request are sent to the server, so that the server generates random request content.
[0092] The request sequence number of the authentication request can be used to determine the number and order of authentication requests currently received by the server. If the request sequence number is greater than one, it means that the currently received authentication request is not the first authentication request.
[0093] In some embodiments, when the request sequence number of the authentication request is greater than one, the authentication request and the original random number corresponding to the previous transaction authentication string of the authentication request are sent to the server, so that the server can generate the random request content while also establishing a chain transaction authentication process through the original random number corresponding to the previous transaction authentication string of the authentication request.
[0094] It should be noted that in order to establish a chain transaction authentication mechanism, when the request sequence number of the authentication request is greater than one, in addition to the authentication request to be sent, each transaction request must contain the original random number of the previous transaction authentication string, so as to bind the legitimacy verification of the terminal device with the legitimacy of subsequent transaction requests through the chain association of transaction authentication information.
[0095] Step 304: Perform a hash check on the original random number based on the previous transaction authentication string to obtain a check result.
[0096] Among them, hash verification is performed by calculating hash values and comparing them.
[0097] In some embodiments, the verification method of the server can be to obtain the authentication string auth{n-1} contained in the previous request of the target terminal device and the salt value sand{n-1} received in this authentication request for hash verification, and judge (auth{n+1} = hash(sand{n+1})) to obtain the verification result. If the equation in the hash verification holds, that is, the two are equal, then the verification result indicates that the verification passed, confirming that the authentication request of the target terminal device is legal.
[0098] Step 306: When the verification result indicates that the verification is passed, the target authentication information is authenticated according to the server and the random request content to obtain an authentication result.
[0099] If the verification result indicates that the verification is passed, it is confirmed that the authentication request of the target terminal device is legal.
[0100] In some embodiments, when the verification result indicates that the verification is passed, that is, when the authentication request is legal, the target authentication information is authenticated based on the server and the random request content to obtain the authentication result, thereby further confirming the legality of the target authentication information.
[0101] In this embodiment, the legitimacy verification of the terminal device is tied to the legitimacy of subsequent transaction requests through a chained association of transaction authentication information. Specifically, each transaction request includes a hash value of the previous transaction authentication information and simultaneously generates a new transaction authentication hash value. This design not only reduces the computational complexity of each transaction request but also effectively prevents security threats such as man-in-the-middle attacks and replay attacks through chained dependencies, ensuring the integrity and credibility of the entire transaction process.
[0102] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0103] Based on the same inventive concept, embodiments of the present application also provide a client authentication device for implementing the client authentication method described above. The solution provided by this device is similar to the solution described in the method described above. Therefore, the specific limitations of one or more client authentication device embodiments provided below can be found in the limitations of the client authentication method described above and will not be repeated here.
[0104] In an exemplary embodiment, Figure 4 As shown, a client authentication device is provided, comprising: an initialization module 401, an authentication request generation module 402, a random reading module 403, an authentication information construction module 404 and an authentication module 405, wherein:
[0105] Initialization module 401, used to initialize the terminal device and obtain the target terminal device containing the seed file;
[0106] An authentication request generation module 402 is configured to generate an authentication request according to a target terminal device and send the authentication request to a server, so that the server generates random request content.
[0107] Random reading module 403, used to read the target content of the seed file according to the random request content;
[0108] The authentication information construction module 404 is used to construct authentication information for the target content to obtain target authentication information;
[0109] The authentication module 405 is used to authenticate the target authentication information according to the server and the random request content to obtain an authentication result.
[0110] In some embodiments, the authentication request includes: a seed hash value, device feature information, and a first transaction authentication string; the authentication request generation module 402 is further used to perform a hash calculation on the seed file of the target terminal device to obtain the seed hash value of the seed file; obtain the device feature information of the target terminal device; and perform a hash calculation on the randomly generated first salt value to obtain the first transaction authentication string.
[0111] In some embodiments, the random request content includes: file identifier, starting position and offset size; the random reading module 403 is also used to read the seed file according to the file identifier, starting position and offset size when the number of file identifiers is greater than one, to obtain multiple target contents.
[0112] In some embodiments, the target authentication information includes: a hash value to be verified, a first salt value, and a second transaction authentication string; the authentication information construction module 404 is further used to perform hash calculation on the target content to obtain the hash value to be verified; obtain the first salt value from the authentication request; and perform hash calculation on the randomly generated second salt value to obtain the second transaction authentication string.
[0113] In some embodiments, the authentication module 405 is also used to read the seed file according to the server and the random request content to obtain the verification content; perform hash calculation on the verification content to obtain the verification hash value; authenticate the target authentication information according to the verification hash value and the first transaction authentication string received by the server to obtain the authentication result.
[0114] In some embodiments, after generating an authentication request based on the target terminal device, the method also includes: a chain authentication module, which is used to send the authentication request and the original random number corresponding to the previous transaction authentication string of the authentication request to the server when the request sequence number of the authentication request is greater than one, so that the server generates random request content; performs a hash check on the original random number according to the previous transaction authentication string to obtain a verification result; when the verification result indicates that the verification is passed, authenticates the target authentication information according to the server and the random request content to obtain an authentication result.
[0115] In the above-mentioned client authentication device, a target terminal device containing a seed file is obtained by initializing the terminal device; an authentication request is generated according to the target terminal device, and the authentication request is sent to the server, so that the server generates a random request content; the target content of the seed file is read according to the random request content; authentication information is constructed for the target content to obtain target authentication information; the target authentication information is authenticated according to the server and the random request content to obtain an authentication result. Therefore, by initializing the terminal device, in addition to the legitimate files running on the storage device, a seed file is stored in the terminal device to verify the legitimacy of the device, and the target content of the seed file is read according to the random request content, and authentication information is constructed for the target content to obtain target authentication information. This avoids the full transmission of large files, achieves integrity authentication through partial verification, further reduces network overhead, and authenticates the target authentication information according to the server and the random request content to obtain an authentication result. This simplifies the authentication logic and limits the verification operation to the target content of the seed file, which not only reduces the computational burden but also improves the verification efficiency, allowing low-performance terminal devices to run smoothly.
[0116] Each module in the client authentication device described above may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in hardware form, or may be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.
[0117] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store authentication request data received by the service client. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a client authentication method is implemented.
[0118] Those skilled in the art will understand that Figure 5The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0119] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the above-mentioned client authentication method when executing the computer program.
[0120] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the client authentication method described above are implemented.
[0121] In one embodiment, a computer program product is provided, comprising a computer program, which implements the steps of the above-mentioned client authentication method when executed by a processor.
[0122] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0123] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0124] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0125] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A client authentication method, characterized in that: The method comprises: Initialize the terminal device to obtain the target terminal device containing the seed file; Generate an authentication request according to the target terminal device, and send the authentication request to the server, so that the server generates random request content; Read the target content of the seed file according to the random request content; Performing authentication information construction on the target content to obtain target authentication information; The target authentication information is authenticated according to the server and the random request content to obtain an authentication result.
2. The method according to claim 1, characterized in that The authentication request includes: a seed hash value, device feature information, and a first transaction authentication string; and generating the authentication request according to the target terminal device includes: Performing a hash calculation on the seed file of the target terminal device to obtain the seed hash value of the seed file; Acquire the device characteristic information of the target terminal device; Perform a hash calculation on the randomly generated first salt value to obtain the first transaction authentication string.
3. The method according to claim 1, characterized in that The random request content includes: a file identifier, a starting position, and an offset size; and reading the target content of the seed file according to the random request content includes: In the case that the number of the file identifiers is greater than one, the seed file is read according to the file identifiers, the starting position and the offset size to obtain a plurality of target contents.
4. The method according to claim 1, wherein The target authentication information includes: a hash value to be verified, a first salt value, and a second transaction authentication string; the target authentication information is constructed on the target content to obtain the target authentication information, including: Performing hash calculation on the target content to obtain the hash value to be verified; Obtaining the first salt value from the authentication request; Perform a hash calculation on the randomly generated second salt value to obtain the second transaction authentication string.
5. The method according to claim 1, wherein The step of authenticating the target authentication information according to the server and the random request content to obtain an authentication result includes: Read the seed file according to the server and the random request content to obtain verification content; Performing hash calculation on the verification content to obtain a verification hash value; The target authentication information is authenticated according to the verification hash value and the first transaction authentication string received by the server to obtain the authentication result.
6. The method according to claim 1, characterized in that After generating an authentication request according to the target terminal device, the method further includes: If the request sequence number of the authentication request is greater than one, sending the authentication request and the original random number corresponding to the authentication string of the previous transaction of the authentication request to the server, so that the server generates random request content; Performing a hash check on the original random number according to the previous transaction authentication string to obtain a check result; When the verification result indicates that the verification is passed, the target authentication information is authenticated according to the server and the random request content to obtain an authentication result.
7. A client authentication device, characterized in that: The device comprises: An initialization module is used to initialize the terminal device and obtain a target terminal device containing a seed file; an authentication request generating module, configured to generate an authentication request according to the target terminal device, and send the authentication request to a server, so that the server generates random request content; A random reading module, configured to read target content of the seed file according to the random request content; An authentication information construction module, configured to construct authentication information for the target content to obtain target authentication information; The authentication module is used to authenticate the target authentication information according to the server and the random request content to obtain an authentication result.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.