Information processing method, device, electronic device, and computer-readable storage medium
By receiving and performing signature verification on second verification information of different lengths according to a preset corresponding relationship, the problem of inconsistent verification information lengths in different user devices and scenarios is solved, and flexible authentication processing is achieved.
Patent Information
- Application Number
- CN202111421940.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-26
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2041-11-26
AI Technical Summary
During the authentication process, in the prior art, the length of verification information in different user devices or in different scenarios is inconsistent, which increases the complexity of the verification process.
By receiving the first verification request, obtaining the first verification information and the first signature information to be verified, and determining the second verification information corresponding thereto according to the preset corresponding relationship, the second verification information having a length different from the first verification information, and performing signature verification processing.
It can handle the inconsistency of verification information length in different terminal devices or different scenarios, meet the verification requirements of different character lengths, and improve the flexibility and efficiency of authentication.
Smart Images

Figure CN114091119B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology. Specifically, the present application relates to an information processing method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the development of internet technology, information security issues in internet applications have become particularly important. Application service providers also implement security measures to ensure transaction and service security and protect user information from attacks and intrusion. For example, when accessing and interacting with information, authentication and other processes are usually required to verify the user's identity. Only after successful authentication can the user proceed with subsequent interactions.
[0003] In related technologies, when a server authenticates a user, it usually generates verification information and sends the verification information to the user, so that the user can authenticate the server through the verification information.
[0004] However, for different user equipment or user equipment used in different scenarios, the verification information required for verification during authentication is also different. Summary of the Invention
[0005] The purpose of this application is to solve at least one of the above technical deficiencies, especially the technical defect that the verification information required for authentication is also different.
[0006] According to one aspect of the present application, there is provided an information processing method, the method comprising:
[0007] Receive a first verification request, and obtain first verification information and first signature information to be verified in the first verification request;
[0008] Determining, according to a preset correspondence, second verification information corresponding to the first verification information; wherein the length of the second verification information is different from the length of the first verification information;
[0009] Perform signature verification on the first signature information to be verified based on the second verification information.
[0010] Optionally, before receiving the first verification request, the method further includes:
[0011] Receiving a request for obtaining verification information;
[0012] If the verification information acquisition request meets the first preset condition, generating the first verification information and the second verification information;
[0013] Generate the preset corresponding relationship between the first verification information and the second verification information.
[0014] Optionally, after generating the first verification information and the second verification information, the method further includes:
[0015] The first verification information is sent to the client.
[0016] Optionally, the first preset condition includes at least one of the following:
[0017] The client identifier corresponding to the verification information acquisition request includes a first preset identifier;
[0018] The verification information acquisition request includes a second preset identifier, and the second preset identifier indicates a request for the first verification information.
[0019] Optionally, the performing signature verification on the first signature information to be verified according to the second verification information includes:
[0020] Extracting key information from the second verification information, and generating second signature information to be verified based on the key information;
[0021] Verify the first signature information to be verified and the second signature information to be verified.
[0022] Optionally, determining, according to a preset correspondence, second verification information corresponding to the first verification information includes:
[0023] Determining a first version number of the first verification information;
[0024] Determining a second version number corresponding to the first version number according to the preset corresponding relationship;
[0025] The second verification information is determined according to the second version number.
[0026] According to one aspect of the present application, there is provided an information processing method, the method comprising:
[0027] Carry the first verification information and the first signature information to be verified in a first verification request, and send the first verification request to a server, instructing the server to: determine the second verification information corresponding to the first verification information according to a preset correspondence, and verify the first signature information to be verified according to the second verification information; wherein the length of the second verification information is different from the length of the first verification information.
[0028] According to another aspect of the present application, there is provided an information processing device, the device comprising:
[0029] A receiving module, configured to receive a first verification request and obtain first verification information and first signature information to be verified in the first verification request;
[0030] a determination module, configured to determine, based on a preset correspondence, second verification information corresponding to the first verification information; wherein the length of the second verification information is different from the length of the first verification information;
[0031] The verification module is used to verify the first signature information to be verified based on the second verification information.
[0032] According to another aspect of the present application, there is provided an information processing device, the device comprising:
[0033] A sending module is used to carry the first verification information and the first signature information to be verified in a first verification request, send the first verification request to a server, and instruct the server to: determine the second verification information corresponding to the first verification information according to a preset correspondence, and verify the first signature information to be verified according to the second verification information; wherein the length of the second verification information is different from the length of the first verification information.
[0034] According to another aspect of the present application, an electronic device is provided, the electronic device comprising:
[0035] one or more processors;
[0036] Memory;
[0037] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to: execute the information processing method as shown in the first aspect and the second aspect of the present application.
[0038] For example, a third aspect of the present application provides a computing device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;
[0039] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the information processing methods shown in the first aspect and the second aspect of the present application.
[0040] According to another aspect of the present application, a computer-readable storage medium is provided, and when the computer program is executed by a processor, the information processing method shown in the first and second aspects of the present application is implemented.
[0041] For example, the fourth aspect of the embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the information processing method shown in the first and second aspects of the present application.
[0042] According to one aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in various optional implementations of the first or second aspects described above.
[0043] The beneficial effects of the technical solution provided by this application are:
[0044] The embodiment of the present application receives a first verification request, obtains the first verification information and the first signature information to be verified in the first verification request, determines the second verification information corresponding to the first verification information according to a preset correspondence, and performs signature verification on the first signature information to be verified according to the second verification information. In this way, by obtaining the second verification information corresponding to the first verification information and performing signature verification according to the second verification information, verification processing of the first verification information whose character length is different from the standard length is achieved, and verification requirements for verification information of different character lengths are met for different terminal devices or when the terminal devices are used in different scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments of the present application.
[0046] Figure 1 A system architecture of an information processing method provided in an embodiment of the present application;
[0047] Figure 2 One of the flowcharts of an information processing method provided in an embodiment of the present application;
[0048] Figure 3 The second flowchart of an information processing method provided in an embodiment of the present application;
[0049] Figure 4 An interactive diagram of an information processing method provided in an embodiment of the present application;
[0050] Figure 5 This is one of the structural diagrams of an information processing device provided in an embodiment of the present application;
[0051] Figure 6This is a second structural diagram of an information processing device provided in an embodiment of the present application;
[0052] Figure 7 A schematic diagram of the structure of an electronic device for information processing provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limiting the present application.
[0054] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" used herein includes all or any units and all combinations of one or more associated listed items.
[0055] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0056] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0057] Any number of elements in the drawings is for illustration and not limitation, and any naming is for distinction only and does not have any limiting meaning.
[0058] For different terminal devices or terminal devices used in different scenarios, the verification information required for authentication is also different. For example, in some scenarios, the character length of the verification information for signature verification by the terminal device is shorter.
[0059] The embodiment of the present application receives a first verification request, obtains the first verification information and the first signature information to be verified in the first verification request; determines the second verification information corresponding to the first verification information according to a preset correspondence; and performs signature verification on the first signature information to be verified according to the second verification information. In this way, by obtaining the second verification information corresponding to the first verification information and performing signature verification according to the second verification information, verification processing of the first verification information whose character length is different from the standard length is achieved, thereby meeting the information verification requirements for different terminal devices or when the terminal devices are applied to different scenarios.
[0060] The following briefly introduces the application scenarios to which the technical solutions of the embodiments of the present application can be applied. It should be noted that the application scenarios described below are only used to illustrate the embodiments of the present application and are not limiting. In specific implementation, the technical solutions provided by the embodiments of the present application can be flexibly applied according to actual needs.
[0061] First combine Figure 1 , which is a system architecture diagram of the information processing method provided in an embodiment of the present application. The system may include a server 101 and a user terminal cluster, wherein the server 101 can be considered as a background server providing information processing services.
[0062] The user terminal cluster may include: user terminal 102, user terminal 103, user terminal 104, ..., wherein a client for information processing may be installed in the user terminal, and a communication connection may exist between the user terminals, for example, there is a communication connection between user terminal 102 and user terminal 103, and there is a communication connection between user terminal 103 and user terminal 104.
[0063] At the same time, the server 101 can provide services to the user terminal cluster through the communication connection function. Any user terminal in the user terminal cluster can have a communication connection with the server 101. For example, there is a communication connection between the user terminal 102 and the server 101, and there is a communication connection between the user terminal 103 and the server 101. The above-mentioned communication connection is not limited to the connection method, and can be directly or indirectly connected through wired communication, directly or indirectly connected through wireless communication, or through other methods.
[0064] The network for the communication connection can be a wide area network or a local area network, or a combination of the two. This application does not limit this.
[0065] The information processing method of the embodiment of the present application can be executed on the server side or on the user terminal side. The embodiment of the present application does not limit the execution subject. During the information processing process, the user sends a first verification request through the user client installed on the terminal device, wherein the first verification information carries the first verification information and the first signature information to be verified. When the server receives the first verification request, it can determine the second verification information corresponding to the first verification information based on the preset correspondence relationship. Thereafter, the server can perform signature verification processing on the first signature information to be verified based on the second verification information.
[0066] Therefore, the method provided in the embodiment of the present application can be executed by a computer device, including but not limited to a terminal (including the above-mentioned user terminal) or a server (including the above-mentioned server 101). The above-mentioned server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The above-mentioned terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application is not limited thereto.
[0067] Of course, the method provided in the embodiment of the present application is not limited to Figure 1 The application scenarios shown can also be used in other possible application scenarios, and the embodiments of the present application are not limited thereto. Figure 1 The functions that can be implemented by each device in the application scenario shown will be described in subsequent method embodiments and will not be described in detail here.
[0068] To further illustrate the technical solutions provided by the embodiments of the present application, the following is a detailed description of the technical solutions in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of the present application provide the method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative work. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiments of the present application.
[0069] The embodiment of the present application provides an information processing method, the execution subject of the method can be a server device with information processing capabilities, or a device or chip integrated on these devices. Figure 2 As shown, it is one of the flow charts of an information processing method provided in an embodiment of the present application, and the method includes the following steps:
[0070] S201: Receive a first verification request, and obtain first verification information and first signature information to be verified in the first verification request.
[0071] Specifically, the embodiments of the present application can be applied to the authentication process of the terminal device; optionally, the authentication process may include the identity verification process when the terminal device logs into the application system, for example, verifying whether the login behavior is that of the user himself; in addition, the verification process may also include the permission verification process when performing related business processing after logging into the system, for example, when the user needs to perform business such as uploading data information or downloading data information, the permission verification process can be used to verify whether the user has the permission to upload data information and download data information.
[0072] In an embodiment of the present application, the server may receive a first verification request from a user, wherein the first verification request may be used to describe a request from the user for verification.
[0073] Optionally, the first verification request may include a requester identifier. For example, the requester identifier may be the identifier of the user requesting verification; in this embodiment of the application, the identifier of the user requesting verification may include the user's primary account identifier, sub-account identifier, etc.
[0074] For example, in a real-world scenario, the user is Company A, which may include multiple subsidiaries, each of which may include multiple departments. Each subsidiary, and each department within each subsidiary, may have a different requester identifier for authentication.
[0075] In addition, the first verification request may also include first verification information and first signature information to be verified.
[0076] S202: Determine second verification information corresponding to the first verification information according to a preset corresponding relationship.
[0077] The length of the second verification information is different from the length of the first verification information.
[0078] Specifically, the first verification information may include information used for verification, such as an access key identity (AK), a secret access key (SK), a token, etc. The first verification information may also not include the access key identity, the secret access key, the token, etc., and may only be used to determine the second verification information based on a preset correspondence.
[0079] The second verification information may include information used for verification. The length of the second verification information is different from the length of the first verification information. Generally, the length of the second verification information is greater than the length of the first verification information. For example, the character length of the second verification information may be 69 bits, the character length of the first verification information may be 40 bits, and so on. Optionally, the second verification information may include an access key identity (Access Key ID, AK), a secret access key (Secret AccessKey, SK), a token, etc. It can be understood that in an embodiment of the present application, the first verification information and the second verification information can be used to distinguish verification information of different character lengths.
[0080] The first signature information to be verified may include signature information for verification. The signature information for verification may be generated based on key information extracted from the second verification information and a preset computational relationship. The preset computational relationship may be a computational relationship customized by the verification information provider. It is understood that in this embodiment of the present application, the first signature information to be verified may be generated based on key information in the second verification information and a preset computational relationship.
[0081] There is a preset correspondence between the first verification information and the second verification information. Optionally, there can be a one-to-one correspondence between the first verification information and the second verification information, i.e., each piece of first verification information has a unique piece of second verification information corresponding to it; in addition, there can be a many-to-one correspondence between the first verification information and the second verification information, i.e., multiple pieces of first verification information can correspond to one piece of second verification information.
[0082] The preset correspondence can be established when the first verification information and the second verification information are generated. Alternatively, the correspondence between the first verification information and the second verification information can be directly established; or identification information can be added to each of the first verification information and the second verification information to establish a correspondence between the identification information. For example, version number V1 can be added to the first verification information and version number V2 can be added to the second verification information, and a correspondence between version numbers V1 and V2 can be established.
[0083] S203: Verify the first signature information to be verified according to the second verification information.
[0084] After determining the second verification information corresponding to the first verification information, the first signature information to be verified can be verified according to the second verification information.
[0085] Specifically, the second verification information can be directly used to verify the first signature information to be verified. Furthermore, key information can be extracted from the second verification information, and second signature information to be verified can be generated based on the key information in the second verification information and a preset computational relationship. The second signature information to be verified can then be used to verify the first signature information to be verified. For example, if the first signature information to be verified is consistent with the second signature information to be verified, it can be determined that the first signature information to be verified was generated using the second verification information based on the preset computational relationship, thereby confirming that the verification has passed.
[0086] As a first example, the information processing method of the embodiment of the present application is described in conjunction with the cloud service scenario:
[0087] In a cloud service scenario, the terminal device needs to interact with the cloud server for information. For example, the terminal device can store data information by uploading it to the cloud server; in addition, the terminal device can also download the required data information from the cloud server. In order to ensure the security of information interaction between the terminal device and the cloud server, the cloud server needs to authenticate the interacting terminal before the information interaction. Specifically, during the authentication and verification process, the cloud server first receives the verification request sent by the terminal, that is, the first verification request in the embodiment of the present application, and obtains the first verification information and the first signature information to be verified from the first verification request. The first verification information can be a verification information with a shorter character length. Then, the cloud server determines the second verification information corresponding to the first verification information based on the preset corresponding relationship; for example, the second verification information can be determined by the corresponding relationship between the version numbers corresponding to the first verification information and the second verification information respectively; finally, the server verifies the first signature information to be verified based on the second verification information.
[0088] In an embodiment of the present application, by receiving a first verification request, the first verification information and the first signature information to be verified in the first verification request are obtained; according to a preset correspondence, the second verification information corresponding to the first verification information is determined; and the first signature information to be verified is verified according to the second verification information, thereby realizing the verification processing of the first verification information whose character length is different from the standard length, and meeting the verification requirements of verification information of different character lengths for different terminal devices or when the terminal devices are used in different scenarios.
[0089] In one embodiment of the present application, before receiving the first verification request, the method further includes:
[0090] Receiving a request for obtaining verification information;
[0091] If the verification information acquisition request meets the first preset condition, generating the first verification information and the second verification information;
[0092] Generate the preset corresponding relationship between the first verification information and the second verification information.
[0093] Specifically, before receiving the first verification request in the above step S201, the embodiment of the present application may further include a process of generating verification information.
[0094] First, a verification information acquisition request is received, wherein the verification information acquisition request can be used to describe a request for acquiring verification information.
[0095] The verification information acquisition request may include a requester identifier. For example, the requester identifier may be the identifier of the user requesting the verification information. In an embodiment of the present application, the requester identifier may include the user's main account identifier, sub-account identifier, etc.; in addition, in an embodiment of the present application, in order to facilitate the distinction between whether the requested verification information is verification information with a shorter character length or verification information with a standard character length, the verification information acquisition request may also include the type of character length of the requested verification information.
[0096] When the verification information acquisition request meets a first preset condition, the first verification information and the second verification information may be generated.
[0097] Among them, the first preset condition can be a condition for generating first verification information with a shorter character length. Specifically, the first preset condition can include that the client identifier corresponding to the verification information acquisition request includes a first preset identifier, for example, the client identifier corresponding to the verification information acquisition request includes a preset whitelist identifier; in addition, the first preset condition can also include that the verification information acquisition request includes a second preset identifier, and the second preset identifier indicates requesting the first verification information, that is, the second preset identifier can be used to indicate requesting verification information with a shorter character length.
[0098] Furthermore, the preset correspondence between the first verification information and the second verification information is generated. The correspondence between the first verification information and the second verification information can be directly established, or identification information can be added to each of the first verification information and the second verification information, and a correspondence can be established between them using the identification information corresponding to each of the first verification information and the second verification information. For example, a version number V1 can be added to the first verification information and a version number V2 can be added to the second verification information, and a correspondence can be established between the version numbers V1 and V2.
[0099] Furthermore, after the second verification information is generated, the first signature information to be verified may be generated based on the key information in the second verification information and a preset computational relationship. The preset computational relationship may be a computational relationship customized by the verification information provider. It is understood that in this embodiment of the present application, the first signature information to be verified may be generated based on the key information in the second verification information and a preset computational relationship.
[0100] In one embodiment of the present application, after generating the first verification information and the second verification information, the method further includes:
[0101] The first verification information and the first signature information to be verified are sent to the client.
[0102] In conjunction with the above example 1, in an embodiment of the present application, when some terminal devices are performing authentication processing, due to insufficient storage space or other reasons, the character length of the verification information required to be requested is shorter. For example, the character length of the verification information requested is shorter than the verification information of the standard character length under normal circumstances. In this case, when a verification request is received from a client corresponding to the terminal, when the client identifier in the verification request includes a preset whitelist identifier, and / or the verification information acquisition request includes an identifier indicating that the requested character length of the first verification information is shorter, the cloud server can generate two types of verification information of character length, namely the first verification information and the second verification information; it can also establish a corresponding relationship between the first verification information and the second verification information; and, based on the key information extracted from the second verification information and the preset operation relationship, generate the first signature information to be verified; then, send the first verification information and the first signature information to be verified to the client.
[0103] The embodiment of the present application receives a request for obtaining verification information; if the request for obtaining verification information meets a first preset condition, the first verification information and the second verification information are generated; the preset correspondence between the first verification information and the second verification information is generated, thereby achieving the goal that for whitelist users who need verification information with shorter character length, two types of verification information can be generated, and the first verification information with shorter character length can be sent to the user's client, thereby meeting the user's special needs for verification information.
[0104] In one embodiment of the present application, the performing signature verification on the first signature information to be verified according to the second verification information includes:
[0105] Extracting key information from the second verification information, and generating second signature information to be verified based on the key information;
[0106] Verify the first signature information to be verified and the second signature information to be verified.
[0107] Specifically, the second signature information to be verified may be generated according to the key information in the second verification information and a preset operation relationship, and the first signature information to be verified may be verified using the second signature information to be verified.
[0108] Furthermore, when verifying the first signature information to be verified and the second signature information to be verified, the verification process may be performed by comparing whether the first signature information to be verified and the second signature information to be verified are consistent.
[0109] In one embodiment of the present application, determining, according to a preset correspondence, second verification information corresponding to the first verification information includes:
[0110] Determining a first version number of the first verification information;
[0111] Determining a second version number corresponding to the first version number according to the preset corresponding relationship;
[0112] The second verification information is determined according to the second version number.
[0113] Specifically, in an embodiment of the present application, identification information can be added to the first verification information and the second verification information respectively, and a corresponding relationship can be established between them through the identification information corresponding to the first verification information and the second verification information respectively. For example, version number V1 can be added to the first verification information, version number V2 can be added to the second verification information, and a corresponding relationship can be established between version number V1 and version number V2.
[0114] Therefore, after receiving the first verification request and obtaining the first verification information in the first verification request, you can first determine the first version number of the first verification information, for example, the version number of the first verification information is V1, and then according to the preset correspondence, you can determine the version number V2 corresponding to the version number V1, and then determine the second verification information corresponding to the version number V2 based on the version number V2.
[0115] The embodiment of the present application receives a first verification request, obtains the first verification information and the first signature information to be verified in the first verification request, determines the second verification information corresponding to the first verification information according to a preset correspondence, and performs signature verification on the first signature information to be verified according to the second verification information, thereby realizing verification processing of the first verification information whose character length is different from the standard length through the second verification information corresponding to the first verification information, and meeting the verification requirements of verification information of different character lengths for different terminal devices or when the terminal devices are used in different scenarios.
[0116] The embodiment of the present application provides an information processing method, the execution subject of the method can be a terminal device with information processing capabilities, or a device or chip integrated in these devices. Figure 3 , which is a second flow chart of an information processing method provided in an embodiment of the present application, the method includes the following steps:
[0117] S301: Carry the first verification information and the first signature information to be verified in a first verification request, send the first verification request to the server, and instruct the server to: determine the second verification information corresponding to the first verification information according to a preset correspondence, and verify the first signature information to be verified according to the second verification information; wherein the length of the second verification information is different from the length of the first verification information.
[0118] Specifically, the first verification request can be used to describe the request for verification. Optionally, the first verification request can specifically include the requester identifier. For example, the requester identifier can be the identifier of the user requesting verification. In an embodiment of the present application, the identifier of the user requesting verification can include the user's main account identifier, sub-account identifier, etc.
[0119] In addition, the first verification request may further include first verification information and first signature information to be verified.
[0120] The first verification information may include information used for verification, such as an access key identity (AK), a secret access key (SK), a token, etc. The first verification information may also not include the access key identity, the secret access key, the token, etc., and may only be used to determine the second verification information based on a preset correspondence.
[0121] The first signature information to be verified may include signature information for verification. The signature information for verification may be generated based on key information extracted from the second verification information and a preset computational relationship. The preset computational relationship may be a computational relationship customized by the verification information provider. It is understood that in this embodiment of the present application, the first signature information to be verified may be generated based on key information in the second verification information and a preset computational relationship.
[0122] Specifically, the second verification information may describe information used for verification, and the length of the second verification information is different from the length of the first verification information. For example, the character length of the second verification information may be 69 bits, the character length of the first verification information may be 40 bits, and so on.
[0123] The second verification information may include an access key ID (AK), a secret access key (SK), a token, etc. It is understood that in the embodiment of the present application, the first verification information and the second verification information can be used to distinguish verification information of different character lengths, and it does not distinguish verification information of different natures.
[0124] In addition, there is a preset correspondence between the first verification information and the second verification information. Optionally, there can be a one-to-one correspondence between the first verification information and the second verification information, that is, each first verification information has a unique second verification information corresponding to it; in addition, there can also be a many-to-one correspondence between the first verification information and the second verification information, that is, multiple first verification information can correspond to one second verification information.
[0125] The preset correspondence between the first verification information and the second verification information can be established when the first verification information and the second verification information are generated. Optionally, the correspondence between the first verification information and the second verification information can be directly established; or identification information can be added to the first verification information and the second verification information respectively, and a correspondence can be established between them through the identification information corresponding to the first verification information and the second verification information respectively. For example, version number V1 can be added to the first verification information, version number V2 can be added to the second verification information, and a correspondence can be established between version number V1 and version number V2.
[0126] After determining the second verification information corresponding to the first verification information, the first signature information to be verified can be verified according to the second verification information.
[0127] Specifically, the second verification information can be directly used to verify the first signature information to be verified; in addition, the key information in the second verification information can be extracted, and the second signature information to be verified can be generated according to the key information in the second verification information and the preset operation relationship. The second signature information to be verified can be used to verify the first signature information to be verified.
[0128] The embodiment of the present application generates first signature information to be verified based on first verification information; carries the first verification information and the first signature information to be verified in a first verification request, sends the first verification request to a server, and instructs the server to: determine the second verification information corresponding to the first verification information according to a preset correspondence, and perform signature verification processing on the first signature information to be verified based on the second verification information, thereby realizing verification processing of the first verification information whose character length is different from the standard length through the second verification information corresponding to the first verification information, and meeting the verification requirements of verification information of different character lengths for different terminal devices or when the terminal devices are used in different scenarios.
[0129] The following combination Figure 4 , the interaction sequence between the terminal device and the server in the embodiment of the present application is described:
[0130] When a terminal device accesses a cloud server, it needs to be authenticated. Only after the authentication is passed can data interaction with the cloud server be carried out. During the authentication process, first, the terminal device requests the cloud server to obtain verification information, which is step A; after the cloud server receives the verification information acquisition request from the terminal device, it determines whether the requester is a whitelist user, wherein a whitelist user is a user who obtains verification information with a shorter character length. If the requester is a whitelist user, a short token, which is the first verification information in the embodiment of the present application, and a standard token, which is the second verification information in the embodiment of the present application, are generated; and a mapping relationship is established between the short token and the standard token, and a first signature string is generated based on the key information extracted from the standard token and the preset operation relationship, which is The first signature information to be verified is step B; then the short token and the first signature string are sent to the terminal (specifically, it can be the client corresponding to the terminal), which is step C; further, the terminal sends a verification request (i.e., the first verification request in the embodiment of the present application) to the cloud server, wherein the verification request carries the short token and the first signature string, which is step D; after receiving the verification request, the cloud server obtains the standard token corresponding to the short token according to the mapping relationship, and extracts key information from the standard token, generates a second signature string according to a preset encryption algorithm for the extracted key information, and then verifies the first signature string and the second signature string, which is step E.
[0131] The embodiment of the present application receives a first verification request, obtains the first verification information and the first signature information to be verified in the first verification request, determines the second verification information corresponding to the first verification information according to a preset correspondence, and performs signature verification on the first signature information to be verified according to the second verification information. In this way, by obtaining the second verification information corresponding to the first verification information and performing signature verification according to the second verification information, verification processing of the first verification information whose character length is different from the standard length is achieved, and verification requirements for verification information of different character lengths are met for different terminal devices or when the terminal devices are used in different scenarios.
[0132] The embodiment of the present application provides an information processing device, such as Figure 5 As shown, the information processing device 50 may include: a receiving module 501, a determining module 502 and a verifying module 503, wherein:
[0133] The receiving module 501 is configured to receive a first verification request and obtain first verification information and first signature information to be verified in the first verification request;
[0134] Determining module 502, configured to determine, based on a preset correspondence, second verification information corresponding to the first verification information; wherein the length of the second verification information is different from the length of the first verification information;
[0135] The verification module 503 is configured to perform signature verification on the first signature information to be verified according to the second verification information.
[0136] In one embodiment of the present application, the device further comprises:
[0137] A verification information generating module, configured to receive a verification information obtaining request before receiving the first verification request;
[0138] If the verification information acquisition request meets the first preset condition, generating the first verification information and the second verification information;
[0139] Generate the preset corresponding relationship between the first verification information and the second verification information.
[0140] In one embodiment of the present application, the device further comprises:
[0141] The verification information sending module is configured to send the first verification information to the client after generating the first verification information and the second verification information.
[0142] In one embodiment of the present application, the first preset condition includes at least one of the following:
[0143] The client identifier corresponding to the verification information acquisition request includes a first preset identifier;
[0144] The verification information acquisition request includes a second preset identifier, and the second preset identifier indicates a request for the first verification information.
[0145] In one embodiment of the present application, the verification module 503 is specifically configured to extract key information from the second verification information and generate second signature information to be verified based on the key information;
[0146] Verify the first signature information to be verified and the second signature information to be verified.
[0147] In one embodiment of the present application, the determining module 502 is specifically configured to determine a first version number of the first verification information;
[0148] Determining a second version number corresponding to the first version number according to the preset corresponding relationship;
[0149] The second verification information is determined according to the second version number.
[0150] The embodiment of the present application provides an information processing device, such as Figure 6 As shown, the information processing device 60 may include: a sending module 601, wherein:
[0151] A sending module 601 is configured to carry the first verification information and the first signature information to be verified in a first verification request, and send the first verification request to a server, instructing the server to determine, based on a preset correspondence, the second verification information corresponding to the first verification information, and perform signature verification on the first signature information to be verified based on the second verification information; wherein the length of the second verification information is different from the length of the first verification information.
[0152] The information processing device of this embodiment can execute the information processing method shown in the above embodiments of this application. The implementation principles are similar and will not be repeated here.
[0153] The embodiment of the present application receives a first verification request, obtains the first verification information and the first signature information to be verified in the first verification request, determines the second verification information corresponding to the first verification information according to a preset correspondence, and performs signature verification on the first signature information to be verified according to the second verification information. In this way, by obtaining the second verification information corresponding to the first verification information and performing signature verification according to the second verification information, verification processing of the first verification information whose character length is different from the standard length is achieved, and verification requirements for verification information of different character lengths are met for different terminal devices or when the terminal devices are used in different scenarios.
[0154] An electronic device is provided in an embodiment of the present application, which includes: a memory and a processor; at least one program stored in the memory, which, when executed by the processor, can achieve the following compared to the prior art: the embodiment of the present application receives a first verification request, obtains first verification information and first signature information to be verified in the first verification request, determines second verification information corresponding to the first verification information according to a preset correspondence, and performs signature verification processing on the first signature information to be verified according to the second verification information, thereby achieving verification processing of first verification information whose character length is different from the standard length by obtaining the second verification information corresponding to the first verification information and performing signature verification processing according to the second verification information, thereby meeting the verification requirements of verification information of different character lengths for different terminal devices or when the terminal devices are applied to different scenarios.
[0155] In an alternative embodiment, an electronic device is provided, such as Figure 7 As shown, Figure 7 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which may be used for data exchange between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the number of transceivers 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
[0156] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0157] Bus 4002 may include a path for transmitting information between the above components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. Bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0158] The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0159] The memory 4003 is used to store the application code (computer program) for executing the solution of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the application code stored in the memory 4003 to implement the content shown in the above method embodiment.
[0160] Electronic devices include but are not limited to mobile phones, laptops, multimedia players, desktop computers, etc.
[0161] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding contents of the aforementioned method embodiment.
[0162] The embodiment of the present application receives a first verification request, obtains the first verification information and the first signature information to be verified in the first verification request, determines the second verification information corresponding to the first verification information according to a preset correspondence, and performs signature verification on the first signature information to be verified according to the second verification information. In this way, by obtaining the second verification information corresponding to the first verification information and performing signature verification according to the second verification information, verification processing of the first verification information whose character length is different from the standard length is achieved, and verification requirements for verification information of different character lengths are met for different terminal devices or when the terminal devices are used in different scenarios.
[0163] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0164] The above descriptions are only partial embodiments of the present invention. It should be pointed out that ordinary technicians in this technical field can make several improvements and modifications without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. An information processing method, applied to a server, characterized in that: include: Receive the verification information acquisition request sent by the client; If the verification information acquisition request meets the first preset condition, generating second verification information and first verification information whose length is smaller than that of the second verification information, and establishing a mapping relationship between the first verification information and the second verification information; Generate first signature information to be verified based on the key information in the second verification information; Sending the first verification information and the first signature information to be verified to the client; Receive a first verification request sent by the client, and obtain first verification information and first signature information to be verified in the first verification request; Determining, according to the mapping relationship, second verification information corresponding to the first verification information; Generate second signature information to be verified based on the second verification information, and use the second signature information to be verified to verify the first signature information to be verified.
2. The information processing method according to claim 1, wherein: The first preset condition includes at least one of the following: The client identifier corresponding to the verification information acquisition request includes a first preset identifier; The verification information acquisition request includes a second preset identifier, and the second preset identifier indicates a request for the first verification information.
3. The information processing method according to claim 1, wherein: The performing signature verification on the first signature information to be verified according to the second verification information includes: Extracting key information from the second verification information, and generating second signature information to be verified based on the key information; Verify the first signature information to be verified and the second signature information to be verified.
4. The information processing method according to claim 1, wherein: The determining, according to the mapping relationship, second verification information corresponding to the first verification information includes: Determining a first version number of the first verification information; Determine, according to the mapping relationship, a second version number corresponding to the first version number; The second verification information is determined according to the second version number.
5. An information processing method, applied to a client, characterized in that: include: Sending a verification information acquisition request to a server, so that the server, if determining that the verification information acquisition request meets a first preset condition, generates second verification information and first verification information whose length is shorter than that of the second verification information, establishes a mapping relationship between the first verification information and the second verification information; and generates first signature information to be verified based on key information in the second verification information; Receiving the first verification information and the first signature information to be verified sent by the server; The first verification information and the first signature information to be verified are carried in a first verification request, and the first verification request is sent to a server, instructing the server to determine, based on the mapping relationship, second verification information corresponding to the first verification information, generate second signature information to be verified based on the second verification information, and use the second signature information to be verified to verify the first signature information to be verified.
6. An information processing device, characterized in that include: A verification information generation module is used to receive a verification information acquisition request sent by a client; If the verification information acquisition request meets the first preset condition, generating second verification information and first verification information whose length is smaller than that of the second verification information, and establishing a mapping relationship between the first verification information and the second verification information; Generate first signature information to be verified based on the key information in the second verification information; Sending the first verification information and the first signature information to be verified to the client; a receiving module, configured to receive a first verification request sent by the client, and obtain first verification information and first signature information to be verified in the first verification request; a determination module, configured to determine, according to the mapping relationship, second verification information corresponding to the first verification information; The verification module is configured to generate second signature information to be verified based on the second verification information, and use the second signature information to be verified to verify the first signature information to be verified.
7. An information processing device, characterized in that include: a sending module, configured to send a verification information acquisition request to a server, so that the server, upon determining that the verification information acquisition request meets a first preset condition, generates second verification information and first verification information whose length is shorter than that of the second verification information, establishes a mapping relationship between the first verification information and the second verification information, and generates first signature information to be verified based on key information in the second verification information; Receiving the first verification information and the first signature information to be verified sent by the server; The first verification information and the first signature information to be verified are carried in a first verification request, and the first verification request is sent to a server, instructing the server to determine, based on the mapping relationship, second verification information corresponding to the first verification information, generate second signature information to be verified based on the second verification information, and use the second signature information to be verified to verify the first signature information to be verified.
8. An electronic device, characterized in that: The electronic device comprises: one or more processors; Memory; One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to: execute the information processing method according to any one of claims 1 to 5.
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 information processing method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Authentication method and device, computer equipment and storage medium
CN111949974A