WO2021051941A1 - 一种信息处理方法及装置 - Google Patents

一种信息处理方法及装置 Download PDF

Info

Publication number
WO2021051941A1
WO2021051941A1 PCT/CN2020/099316 CN2020099316W WO2021051941A1 WO 2021051941 A1 WO2021051941 A1 WO 2021051941A1 CN 2020099316 W CN2020099316 W CN 2020099316W WO 2021051941 A1 WO2021051941 A1 WO 2021051941A1
Authority
WO
WIPO (PCT)
Prior art keywords
operation instruction
verification information
determined
identity identifier
client
Prior art date
Application number
PCT/CN2020/099316
Other languages
English (en)
French (fr)
Inventor
黄泽浩
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021051941A1 publication Critical patent/WO2021051941A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users

Definitions

  • This application relates to the computer field, and in particular to an information processing method and device.
  • the inventor realizes that currently, when the client is offline, that is, when the client is unable to interact with the server due to a network failure or poor external signals, it needs to wait for the client to return to the online state before continuing to verify. Whether it is authorized to provide services to users.
  • This authorization method has high requirements on the client's offline status, is easily affected by the external environment, and reduces the immediacy of verification.
  • the present application proposes an information processing method and device, which can realize the authorization of the client in an offline state to provide services to the user, improve the immediacy of verification, and make the authorization not affected by the external environment.
  • the present application provides an information processing method, including: receiving an operation instruction input by a user through a client, the operation instruction carrying an identity of the user.
  • the pre-stored first verification information corresponding to the operation instruction is acquired, and the first verification information includes authority information and a digital signature.
  • the identity identifier is a legal identity identifier
  • the authority information is used to determine whether the user has an operation authority corresponding to the operation instruction.
  • the operation instruction is executed.
  • an embodiment of the present application provides an information processing device, including a receiving unit, configured to receive an operation instruction input by a user through a client, and the operation instruction carries an identity of the user.
  • the first judging unit is used to judge whether the client is in an offline state.
  • the first obtaining unit is configured to obtain pre-stored first verification information corresponding to the operation instruction when it is determined that the client is in an offline state, and the first verification information includes authority information and a digital signature.
  • the second determining unit is configured to determine whether the identity identifier is a legal identity identifier according to the digital signature, and use the authority information to determine whether the user has an operation authority corresponding to the operation instruction.
  • the execution unit is configured to execute the operation instruction when it is determined that the identity identifier is a legal identity identifier and the user has the authority to operate the operation corresponding to the operation instruction.
  • an embodiment of the present application provides an electronic device, the electronic device includes a memory and a processor, the processor and the memory are connected to each other, wherein the memory is used to store a computer program, the The computer program includes program instructions, and the processor is configured to execute the program instructions of the memory, wherein: an operation instruction input by a user through a client is received, and the operation instruction carries an identity of the user.
  • the pre-stored first verification information corresponding to the operation instruction is acquired, and the first verification information includes authority information and a digital signature.
  • the operation instruction is executed.
  • an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, they are used for The following steps are implemented: receiving an operation instruction input by the user through the client, the operation instruction carrying the user's identity.
  • the pre-stored first verification information corresponding to the operation instruction is acquired, and the first verification information includes authority information and a digital signature.
  • the operation instruction is executed.
  • the operation instruction corresponding to the operation instruction is obtained from the pre-stored verification information.
  • the first verification information verifies the authority information in the first verification information and the digital signature to verify the identity and the operation authority of the operation instruction.
  • the operation instruction is executed. In this way, the authorization of the client in the offline state is realized to provide services for the user, and the effect of improving the immediacy of verification and making the authorization not affected by the external environment is achieved.
  • Fig. 1 is a schematic flowchart of an information processing method proposed by this application.
  • Fig. 2 is a schematic flowchart of another information processing method proposed by this application.
  • Fig. 3 is a schematic structural diagram of an information processing device proposed by this application.
  • Fig. 4 is a schematic diagram of the structure of an electronic device proposed in the present application.
  • the term “if” can be construed as “when” or “once” or “in response to determination” or “in response to detection” depending on the context .
  • the phrase “if determined” or “if detected [described condition or event]” can be interpreted as meaning “once determined” or “in response to determination” or “once detected [described condition or event]” depending on the context ]” or “in response to detection of [condition or event described]”.
  • FIG. 1 is a schematic flowchart of an information processing method provided by an embodiment of the present application. As shown in Figure 1, the information processing method includes:
  • the information processing device may include a server, a mobile phone, a tablet computer, a personal digital assistant (personal digital assistant, PDA), a mobile internet device (mobile internet device, MID), a smart wearable device (such as a smart watch, a smart Bracelets) and other electronic devices, devices that can obtain services on the Internet.
  • a server a mobile phone, a tablet computer, a personal digital assistant (personal digital assistant, PDA), a mobile internet device (mobile internet device, MID), a smart wearable device (such as a smart watch, a smart Bracelets) and other electronic devices, devices that can obtain services on the Internet.
  • PDA personal digital assistant
  • MID mobile internet device
  • smart wearable device such as a smart watch, a smart Bracelets
  • receiving the operation instruction input by the user may be the operation instruction generated by the operation input by the user through the client, or may be the operation instruction generated when the user logs in, which is not limited here. It is understandable that a user has one or more accounts, and each account corresponds to an identity identifier, and the above operation instruction carries the identity identifier of the account.
  • the first threshold may be a threshold set manually, and the first threshold may be a network
  • the signal strength threshold can also be the threshold of the upload or download internet speed, which is not limited here.
  • the first verification information is obtained, and the first verification information is verification information corresponding to the operation instruction stored in a local file in advance, and the first verification Information can include rights information and digital signatures.
  • the authority information is used to verify whether the operation corresponding to the operation instruction has authority, and the digital signature is used to verify whether the identity is a legal identity.
  • the verification information of the ID card can be used as the authority information, and the account information can be used as the digital signature and stored locally.
  • the first verification information is obtained from the local file, that is, the verification information of the ID card stored in advance, and the ID card is verified according to the verification information.
  • the digital signature and authority information pass at the same time, Perform operations such as allowing users to enter venues or obtain resources.
  • the digital signature in the first verification information is a hash value corresponding to the information that can verify the legality of the identity when the identity returned by the server is received in an online state, wherein the hash encryption
  • the algorithm can be the DSA algorithm (digital signature algorithm, DSA), which is not limited here. If the verification is successful, it is determined that the identity is a legal identity; if the verification is unsuccessful, it is determined that the identity is currently an illegal identity.
  • the above authority information means that you have purchased a member in the account corresponding to the identity, or purchased a service that requires authority, you can judge whether the current operation is in the content of the authority information according to the content in the authority information, if there is a current operation instruction in the authority information According to the corresponding authority, it is determined that the account corresponding to the current user has the operation authority corresponding to the operation instruction; otherwise, it does not have the authority corresponding to the operation instruction.
  • the verification information stored in the local file is the encrypted security information
  • the encryption method may be an advanced encryption standard (advanced encryption standard, AES) encryption algorithm
  • AES advanced encryption standard
  • this article takes the AES encryption algorithm as an example to explain. That is, before the first verification information is obtained, the stored verification information needs to be decrypted, and then the judgment operation is performed after decryption.
  • the operation instruction is executed. If it is determined that the above-mentioned identity identifier is an illegal identity identifier, or the user If you do not have the operation authority corresponding to the above operation instruction, refuse to execute the above operation instruction, and output a prompt message indicating that the operation has failed.
  • a prompt message of "illegal identity” may be output. If it is determined that the user does not have the authority to operate the operation corresponding to the above-mentioned operation instruction, the prompt message of "unauthorized operation” can be output.
  • the authentication information of the examinee in the current examination room can be obtained from the stored files, the identity of the current examinee is verified, and it is determined whether the current examinee has access to the current examinee’s identity.
  • the authority of the examination room if it is determined that the current examinee is legal and the account corresponding to the identity identifier has the operation authority corresponding to the above operation, the examination information corresponding to the examination room where the current examinee is located is output.
  • the operation instruction corresponding to the operation instruction is obtained from the pre-stored verification information.
  • the first verification information verifies the authority information in the first verification information and the digital signature to verify the identity and the operation authority of the operation instruction.
  • the operation instruction is executed. In this way, the authorization of the client in the offline state is realized to provide services for the user, and the effect of improving the immediacy of verification and making the authorization not affected by the external environment is achieved.
  • FIG. 2 is a schematic flowchart of another information processing method provided by an embodiment of the present application. As shown in Figure 2, the information processing method includes.
  • the network signal strength of the current client can be obtained, and the current network signal strength can be compared with a first threshold. When it is greater than or equal to the first threshold, it is determined that the current client is online. When a threshold is reached, it is determined that the current client is offline.
  • the verification information corresponding to the above operation instruction is sent to the server, where the verification information includes a digital signature and authority information, and the digital signature is used to verify whether the current identity is Legal identity, and the authority information is all authority information corresponding to the current account.
  • the identity identifier needs to be encrypted.
  • the key is generated by the client. It can be an AES encryption key or other encryption keys, which is not limited in this article. For the convenience of description, take the AES encryption key as an example to explain.
  • the (256-bit) AES encryption key can also be a 128-bit encryption key.
  • the method for generating is: generating a first character string set, the first character string set includes N sets of different character strings, and the above N is an integer greater than or equal to 2; and M characters are extracted from the first character string set.
  • the second key which is the key used for transmission.
  • the RSA encryption algorithm (RSA algorithm, RSA) encryption algorithm is taken as an example.
  • the client stores the RSA encryption public key.
  • the public key encrypts the aforementioned identity identifier and the first key. That is, when the client sends the verification information acquisition request corresponding to the operation instruction to the server, the verification information acquisition request carries the operation identifier corresponding to the operation instruction, the encrypted identity identifier, and the encrypted first key.
  • the second verification information returned by the server is received, where the second verification information is the verification information encrypted with the RSA private key of the server, and the client can decrypt the verification information with the RSA public key.
  • the digital signature and the encrypted authority information are decrypted with the first key generated above to decrypt the authority information, and then the digital signature can be used to determine whether the identity identifier is a legal identity identifier, and the authority information can be used to determine whether the user has Operate the operation of the operation authority corresponding to the above operation instruction.
  • the client determines whether the verification information corresponding to the above operation instruction is received within a preset time period, if it determines that the second verification information corresponding to the above operation instruction is received within the preset time period Information, the communication is normal; if it is determined that the second verification information corresponding to the above-mentioned operation instruction has not been received within the preset time period, the acquisition request is re-sent to the server. And the count is increased by one, and the count is the number of times that the verification information acquisition request corresponding to the above-mentioned operation instruction is recorded. Until it is determined that the number of times the verification information acquisition request is sent is equal to the second threshold, it is determined that the client is in an offline state. Then perform the operation of obtaining verification information from the local.
  • the hash value of the first verification information is obtained, the first hash value is obtained, and the second verification information is decrypted at the same time.
  • the verification information obtains the digital signature and the authority information, the hash value of the decrypted second verification information is calculated, and the second hash value is obtained.
  • a third key may be generated, and the third key is used to encrypt the second verification information, and the third encryption key is not limited here.
  • the generation method is the same as the generation method in step 202.
  • step 205 to step 206 please refer to the description of step 104 to step 105 in the embodiment corresponding to FIG. 1, which will not be repeated here.
  • the operation instruction corresponding to the operation instruction is obtained from the pre-stored verification information.
  • the first verification information verifies the authority information in the first verification information and the digital signature to verify the identity and the operation authority of the operation instruction.
  • the operation instruction is executed. In this way, the authorization of the client in the offline state is realized to provide services for the user, and the effect of improving the immediacy of verification and making the authorization not affected by the external environment is achieved.
  • FIG. 3 is a schematic structural diagram of an information processing device proposed in this application.
  • the information processing device 3000 includes a receiving unit 301, configured to receive an operation instruction input by a user through a client, and the operation instruction carries the identity of the user.
  • the first determining unit 302 is configured to determine whether the aforementioned client is in an offline state.
  • the first obtaining unit 303 is configured to obtain pre-stored first verification information corresponding to the operation instruction when it is determined that the client is offline, and the first verification information includes authority information and a digital signature.
  • the second determining unit 304 is configured to determine whether the identity identifier is a legal identity identifier according to the digital signature, and use the authority information to determine whether the user has an operation authority corresponding to the operation instruction.
  • the execution unit 305 is configured to execute the above-mentioned operation instruction when it is determined that the above-mentioned identity identifier is a legal identity identifier and that the above-mentioned user has the operation authority corresponding to the above-mentioned operation instruction.
  • the above-mentioned first determining unit 302 is specifically configured to: obtain the network signal strength of the client.
  • the foregoing apparatus 3000 further includes: a first determining unit 306, configured to determine that the foregoing client is online when it is determined that the foregoing network signal strength is greater than or equal to the foregoing first threshold.
  • the sending unit 307 is configured to send a verification information acquisition request corresponding to the above operation instruction to the server.
  • the receiving unit 308 is configured to receive second verification information corresponding to the operation instruction returned by the server, and the second verification information includes authority information and a digital signature.
  • the third determining unit 309 is configured to determine whether the identity identifier is a legal identity identifier according to the digital signature, and use the authority information to determine whether the user has an operation authority corresponding to the operation instruction.
  • the second execution unit 310 is configured to execute the operation instruction when it is determined that the identity identifier is a legal identity identifier and the user has the authority to operate the operation corresponding to the operation instruction.
  • the sending unit 307 is specifically configured to: generate a first character string set, the first character string set includes N groups of different character strings, and the above N is an integer greater than or equal to 2.
  • the first key is obtained by extracting M-bit characters from the first string set, where M is an integer greater than 2.
  • a verification information acquisition request corresponding to the above operation instruction is sent to the server, and the verification information acquisition request carries an operation identifier corresponding to the above operation instruction, an encrypted identity identifier, and an encrypted first key.
  • the foregoing device 3000 further includes: a fourth determining unit 311, configured to determine whether the second verification information corresponding to the foregoing operation instruction is received within a preset time period.
  • the fifth judging unit 312 is configured to, when judging that the second verification information corresponding to the operation instruction is not received within the preset time, continue to perform the step of sending the verification information acquisition request corresponding to the operation instruction to the server, Until it is determined that the number of times the verification information acquisition request is sent is equal to the second threshold.
  • the second determining unit 313 is configured to determine that the above-mentioned client is in an offline state.
  • the foregoing device 3000 further includes: a second obtaining unit 314, configured to obtain the hash value of the first verification information to obtain the first hash value.
  • the calculation unit 315 is configured to calculate the hash value of the second verification information to obtain the second hash value.
  • the sixth determining unit 316 is configured to determine whether the first hash value is the same as the second hash value.
  • the replacement unit 317 is configured to replace the first verification information with the second verification information when it is determined that the first hash value is different from the second hash value.
  • the above-mentioned device 3000 further includes: an output unit 318, configured to output the operation when it is determined that the above-mentioned identity is an illegal identity, or the above-mentioned user does not have the operation authority corresponding to the above-mentioned operation instruction Failed prompt message.
  • the authorization of the client in the offline state is realized to provide services for the user, and the effect of improving the immediacy of verification and making the authorization not affected by the external environment is achieved.
  • FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device may include: one or more processors 401, a transceiver 402, an output device 403, an input device 404, and a memory 405.
  • the aforementioned processor 401, transceiver 402, output device 403, input device 404, and memory 405 are connected by a bus.
  • the transceiver 402 is used to receive and transmit data.
  • the output device 403 and the input device 404 are used to input and output data.
  • the memory 403 is used to store a computer program.
  • the computer program includes program instructions.
  • the processor 401 is used to execute the program instructions stored in the memory 403.
  • the processor 401 is configured to call the program instructions to perform the following steps:
  • the input device 404 receives an operation instruction input by the user through the client, and the operation instruction carries the identity of the user.
  • the pre-stored first verification information corresponding to the operation instruction is acquired, and the first verification information includes authority information and a digital signature.
  • the identity identifier is a legal identity identifier
  • the authority information is used to determine whether the user has operation authority corresponding to the operation instruction.
  • the above-mentioned identity identifier is a legal identity identifier
  • the above-mentioned user has the operation authority corresponding to the above-mentioned operation instruction
  • the above-mentioned operation instruction is executed.
  • the foregoing processor 401 judging whether the client is in an offline state includes: acquiring the network signal strength of the client.
  • the above-mentioned processor 401 is further configured to invoke program instructions to execute the following steps: when it is determined that the above-mentioned network signal strength is greater than or equal to the above-mentioned first threshold, it is determined that the above-mentioned client is online.
  • the processor 401 controls the transceiver 402 to receive the second verification information corresponding to the operation instruction returned by the server, and the second verification information includes authority information and a digital signature.
  • the identity identifier is a legal identity identifier
  • the authority information is used to determine whether the user has operation authority corresponding to the operation instruction.
  • the above-mentioned identity identifier is a legal identity identifier
  • the above-mentioned user has the operation authority corresponding to the above-mentioned operation instruction
  • the above-mentioned operation instruction is executed.
  • the processor 401 controls the transceiver 402 to send a verification information acquisition request corresponding to the operation instruction to the server, including: generating a first character string set, and the first character string set includes N groups For different character strings, the above N is an integer greater than or equal to 2.
  • the first key is obtained by extracting M-bit characters from the first string set, where M is an integer greater than 2.
  • Obtain the second key. Use the second key to encrypt the identity and the first key.
  • a verification information acquisition request corresponding to the above operation instruction is sent to the server, and the verification information acquisition request carries an operation identifier corresponding to the above operation instruction, an encrypted identity identifier, and an encrypted first key.
  • the processor 401 controls the transceiver 402 to send a verification information acquisition request corresponding to the operation instruction to the server
  • the processor 401 is further configured to call program instructions to perform the following steps: determine Whether the second verification information corresponding to the above-mentioned operation instruction is received within a preset time period. When it is determined that the second verification information corresponding to the above operation instruction is not received within the preset time, continue to perform the above step of sending the verification information acquisition request corresponding to the above operation instruction to the server until the verification information acquisition request is determined When the number of sending times is equal to the second threshold, it is determined that the client is offline.
  • the processor 401 controls the transceiver 402 to receive the second verification information corresponding to the operation instruction returned by the server
  • the processor 401 is further configured to invoke program instructions to perform the following steps : Obtain the hash value of the first verification information to obtain the first hash value.
  • the hash value of the second verification information is calculated to obtain the second hash value. It is determined whether the first hash value is the same as the second hash value. When it is determined that the first hash value is different from the second hash value, the first verification information is replaced with the second verification information and stored.
  • the processor 401 is further configured to call program instructions to perform the following steps: the processor 401 controls the output device 403 when it determines that the identity is an illegal identity, or the user does not have When the operation authority corresponding to the above operation instruction is authorized, a prompt message indicating that the operation has failed is output.
  • the aforementioned processor 401 may be a central processing unit (CPU), and the processor may also be other general-purpose processors or digital signal processors (DSP). , Application specific integrated circuit (ASIC), off-the-shelf programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 403 may include a read-only memory and a random access memory, and provides instructions and data to the processor 401.
  • a part of the memory 403 may also include a non-volatile random access memory.
  • the memory 403 may also store device type information.
  • the above-mentioned information processing device can execute the implementation manners provided in each step in FIG. 1 and FIG. 2 through its built-in functional modules.
  • the implementation manners provided in the above-mentioned steps which will not be repeated here. .
  • the operation instruction corresponding to the operation instruction is obtained from the pre-stored verification information.
  • the first verification information verifies the authority information in the first verification information and the digital signature to verify the identity and the operation authority of the operation instruction.
  • the operation instruction is executed. In this way, the authorization of the client in the offline state is realized to provide services for the user, and the effect of improving the immediacy of verification and making the authorization not affected by the external environment is achieved.
  • the foregoing computer-readable storage medium may be the task processing device provided in any of the foregoing embodiments or the internal storage unit of the foregoing information processing device, such as the hard disk or memory of the information processing device.
  • the computer-readable storage medium may also be an external storage device of the information processing device, such as a plug-in hard disk, a smart media card (SMC), or a secure digital (secure digital, SD) card, flash card, etc.
  • SMC smart media card
  • SD secure digital
  • the aforementioned computer-readable storage medium may also include a magnetic disk, an optical disc, a read-only memory (read-only memory, ROM), or a random access memory (random access memory, RAM), etc.
  • the computer-readable storage medium may also include both an internal storage unit of the information processing apparatus and an external storage device.
  • the computer-readable storage medium is used to store the computer program and other programs and data required by the information processing device.
  • the computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
  • the computer-readable storage medium may be non-volatile or volatile.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Storage Device Security (AREA)

Abstract

本申请提出一种信息处理方法及装置,可在大数据中实现。该方法包括:接收用户通过客户端输入的操作指令,该操作指令携带该用户的身份标识;判断所述客户端是否处于离线状态;当判断出该客户端处于离线状态时,获取预先存储的与所述操作指令对应的第一验证信息,该第一验证信息包括权限信息以及数字签名;根据该数字签名判断该身份标识是否为合法身份标识,以及使用该权限信息判断该用户是否具有与该操作指令对应的操作的权限;当判断出该身份标识为合法身份标识,以及该用户具有与该操作指令对应的操作的权限时,执行该操作指令。实施本申请,客户端可以在离线状态下授权,提高了验证的即时性。

Description

一种信息处理方法及装置
本申请要求于2019年09月18日提交中国专利局、申请号为2019108811873,发明名称为“一种信息处理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机领域,尤其涉及一种信息处理方法及装置。
背景技术
随着互联网技术的不断发展,用户可以通过网络实现很多业务,如下载资源、获取福利等。当用户想要享受某一项服务时,该用户使用的客户端需向该网站的服务器发送获取该用户账号的权限信息的请求,根据服务器返回的权限信息才可判断该项服务是否被授权执行。
发明人意识到,目前当客户端处于离线状态时,即客户端在出现网络故障或因外界信号不好导致无法与服务器进行信息交互的情况下,需等待客户端恢复为在线的状态才能继续验证是否授权为用户提供服务。
这种授权方式对客户端的在离线状态要求高,容易受到外界环境的影响,降低了验证的即时性。
技术问题
本申请提出一种信息处理方法及装置,可以实现客户端在离线状态下的授权为用户提供服务,提高了验证的即时性,使授权不受外界环境的影响。
技术解决方案
第一方面,本申请提供了一种信息处理方法,包括:接收用户通过客户端输入的操作指令,所述操作指令携带所述用户的身份标识。
判断所述客户端是否处于离线状态。
当判断出所述客户端处于离线状态时,获取预先存储的与所述操作指令对应的第一验证信息,所述第一验证信息包括权限信息以及数字签名。
根据所述数字签名判断所述身份标识是否为合法身份标识,以及使用所述权限信息判断所述用户是否具有与所述操作指令对应的操作的权限。
当判断出所述身份标识为合法身份标识,以及所述用户具有与所述操作指令对应的操作的权限时,执行所述操作指令。
第二方面,本申请实施例提供一种信息处理装置,包括:接收单元,用于接收用户通过客户端输入的操作指令,所述操作指令携带所述用户的身份标识。
第一判断单元,用于判断所述客户端是否处于离线状态。
第一获取单元,用于当判断出所述客户端处于离线状态时,获取预先存储的与所述操作指令对应的第一验证信息,所述第一验证信息包括权限信息以及数字签名。
第二判断单元,用于根据所述数字签名判断所述身份标识是否为合法身份标识,以及使用所述权限信息判断所述用户是否具有与所述操作指令对应的操作的权限。
执行单元,用于当判断出所述身份标识为合法身份标识,以及所述用户具有操作所述操作指令对应的操作的权限时,执行所述操作指令。
第三方面,本申请实施例提供了一种电子设备,所述电子设备包括存储器和处理器,所述处理器、和所述存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述存储器的所述程序指令,其中:接收用户通过客户端输入的操作指令,所述操作指令携带所述用户的身份标识。
判断所述客户端是否处于离线状态。
当判断出所述客户端处于离线状态时,获取预先存储的与所述操作指令对应的第一验证信息,所述第一验证信息包括权限信息以及数字签名。
根据所述数字签名判断所述身份标识是否为合法身份标识,以及使用所述权限信息判断所述用户是否具有与所述操作指令对应的操作权限。
当判断出所述身份标识为合法身份标识,以及所述用户具有与所述操作指令对应的操作权限时,执行所述操作指令。
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤:接收用户通过客户端输入的操作指令,所述操作指令携带所述用户的身份标识。
判断所述客户端是否处于离线状态。
当判断出所述客户端处于离线状态时,获取预先存储的与所述操作指令对应的第一验证信息,所述第一验证信息包括权限信息以及数字签名。
根据所述数字签名判断所述身份标识是否为合法身份标识,以及使用所述权限信息判断所述用户是否具有与所述操作指令对应的操作权限。
当判断出所述身份标识为合法身份标识,以及所述用户具有与所述操作指令对应的操作权限时,执行所述操作指令。
有益效果
本申请实施例中,通过在接收到用户通过客户端输入的操作指令后,判断客户端是否处于离线状态,当判断出客户端处于离线状态时,在预先存储的验证信息中获取操作指令对应的第一验证信息,对第一验证信息中的权限信息和数字签名对身份标识以及操作指令的操作权限进行验证,当判断出身份标识为合法身份标识以及用户有操作权限时,执行操作指令。从而实现了客户端在离线状态下的授权为用户提供服务,达到了提高了验证的即时性,使授权不受外界环境的影响的效果。
附图说明
图1是本申请提出的一种信息处理方法的流程示意图。
图2是本申请提出的另一种信息处理方法的流程示意图。
图3是本申请提出的一种信息处理装置的结构示意图。
图4是本申请提出的一种电子设备的结构示意图。
本发明的实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和 “包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/ 或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为 “当... 时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。
请参阅图1,图1是本申请实施例提供的信息处理方法的流程示意图。如图1所示,该信息处理方法包括。
101、接收用户通过客户端输入的操作指令,上述操作指令携带上述用户的身份标识。
本申请实施例中,信息处理装置可以包括服务器、移动手机、平板电脑、个人数字助理(personal digital assistant,PDA)、移动互联网设备(mobile internet device,MID)、智能穿戴设备(如智能手表、智能手环)等各种电子设备,能够在网络上获取服务的设备。
其中,接收用户输入的操作指令可以是接收用户通过客户端输入的操作生成的操作指令的,也可以是用户登录时生成的操作指令,这里不做限定。可以理解的是,一个用户拥有一个或多个账户,每一个账户对应一个身份标识,上述操作指令携带账户的身份标识。
102、判断上述客户端是否处于离线状态。
在一种可能的实现方式中,在接收到用户通过客户端输入的操作指令之后,判断当前客户端是处于在线状态还是离线状态。可以是判断当前客户端的网络信号强度,首先获取当前的网络信号强度,判断上述网络信号强度是否小于第一阈值,当判断出上述网络信号强度小于上述第一阈值时,确定上述客户端处于离线状态。可以是获取当前的网速,判断当前网络的下载速度和上传速度是否小于第一阈值,当判断出当前网络的下载速度或者上传速递小于第一阈值的时,确定当前客户端无法进行网络通信,则处于离线状态,当前的网络的下载速度和上传速度大于或等于第一阈值时,确定当前客户端处于在线状态,其中,第一阈值可以是人为设定的阈值,该第一阈值可以是网络信号强度阈值,也可以是上传或者下载的网速的阈值,这里不做限定。
103、当判断出上述客户端处于离线状态时,获取预先存储的与上述操作指令对应的第一验证信息,上述第一验证信息包括权限信息以及数字签名。
在一种可能的实现方式中,当判断出客户端当前处于离线状态时,获取第一验证信息,第一验证信息是预先存储在本地文件中的与操作指令对应的验证信息,该第一验证信息可以包括权限信息以及数字签名。其中,权限信息用于验证操作指令对应的操作是否有权限,数字签名用于验证身份标识是否为合法的身份标识。
在实例中,若在需要在离线状态下对身份证进行授权进入场馆或者从网络上获取资源的时候,则可将身份证的验证信息作为权限信息,以账号信息作为数字签名,存储在本地,当检测到无法网络通信的时候,从本地的文件中获取第一验证信息,即预先存储的身份证的验证信息,根据验证信息对身份证进行验证,当数字签名和权限信息同时通过的时候,执行操作,如允许用户进入场馆或者获取资源。
104、根据上述数字签名判断上述身份标识是否为合法身份标识,以及使用上述权限信息判断上述用户是否具有与上述操作指令对应的操作的权限。
在一种可能的实现方式中,上述第一验证信息中的数字签名是在在线状态下接收到服务器返回的身份标识的对应可以验证身份标识是否合法的信息的哈希值,其中,哈希加密的算法可以是DSA算法(digital signature algorithm,DSA),这里不做限定。若是验签成功,则判断身份标识是合法身份标识,若是验证不成功,则确定当前为非法身份标识。
上述权限信息为在身份标识对应的账户购买过会员,或者购买了需要权限的服务,则可根据权限信息中的内容判断当前操作是否在权限信息的内容中,若是在权限信息中存在当前操作指令对应的权限,则确定当前用户对应的账户具有操作指令对应的操作权限,否则,不具有操作指令对应的权限。
在一种可能的实现方式中,为了保证验证的安全性,存储在本地文件中的验证信息是经过加密后的安全信息,其中加密的方法可以是高级加密标准(advanced encryption standard,AES)加密算法,也可以是其他加密算法,在这里不做限定。本文为了描述方便,以AES加密算法为例进行讲解。即在获取到上述第一验证信息之前,需先对存储的验证信息进行解密,在解密后再执行判断的操作。
105、当判断出上述身份标识为合法身份标识,以及上述用户具有与上述操作指令对应的操作的权限时,执行上述操作指令。
在一种可能的实现方式中,当判断出上述身份标识合法,并且用户对应的账户具有与上述操作指令对应的操作权限时,执行操作指令,若判断出上述身份标识为非法身份标识,或者用户不具有与上述操作指令对应的操作的权限的时,拒绝执行上述操作指令,并输出操作失败的提示信息。
可选地,若是判断出上述身份标识为非法身份标识时,可以输出“非法身份”的提示信息。若是判断用户不具有操作上述操作指令对应的操作的权限的时,可以输出“无权限操作”的提示信息。
在实例中,例如用户在考场中处于离线状态下验证考生的身份,可从存储的文件中获取当前考场的考生的验证信息,对当前考生的身份标识进行验证,并且判断当前考生是否具有进入当前考场的权限,若当判断出当前考生的合法,并且身份标识对应的账户具有与上述操作对应的操作权限时,输出当前考生所在考场对应的考试信息。
本申请实施例中,通过在接收到用户通过客户端输入的操作指令后,判断客户端是否处于离线状态,当判断出客户端处于离线状态时,在预先存储的验证信息中获取操作指令对应的第一验证信息,对第一验证信息中的权限信息和数字签名对身份标识以及操作指令的操作权限进行验证,当判断出身份标识为合法身份标识以及用户有操作权限时,执行操作指令。从而实现了客户端在离线状态下的授权为用户提供服务,达到了提高了验证的即时性,使授权不受外界环境的影响的效果。
请参阅图2,图2是本申请实施例提供的另一种信息处理方法的流程示意图。如图2所示,该信息处理方法包括。
201、判断上述客户端的网络信号强度是否大于或等于第一阈值。
在一种可能的实现方式中,可以获取当前客户端的网络信号强度,将当前网络信号强度与第一阈值比较,在大于或等于第一阈值的时候,确定当前客户端处于在线状态,在小于第一阈值的时候,确定当前客户端处于离线状态。
202、当判断出网络信号强度大于或等于第一阈值时,确定客户端处于在线状态。
在一种可能的实现方式中,可以根据判断当前网络信号强度与第一阈值的大小,确定当前客户端处于在线状态还是离线状态。当判断出当前的网络信号强度大于或等于第一阈值时,则表示当前客户端能够正常的网络通信,则确定当前客户端处于在线状态。
203、发送与上述操作指令对应的验证信息获取请求至服务器。
在一种可能的实现方式中,在在线状态下,向服务器发送用于获取上述操作指令对应的验证信息,其中,该验证信息包括数字签名以及权限信息,数字签名用于验证当前身份标识是否为合法的身份标识,而权限信息则是当前账户对应的所有的权限信息。
其中,为了保证发送的安全与隐私,在向服务器发送上述用于获取上述身份标识和上述操作指令对应的验证信息的请求时,需对身份标识进行加密。
具体地,为了使服务器能够返回加密的权限信息,该密钥由客户端生成。可以是AES加密密钥,也可以是其他加密密钥,本文不做限定。为了描述方便,以AES加密密钥为例进行讲解。
在向服务器发送请求之前,首先生成第一密钥,该第一密钥为服务器用于对权限信息加密的密钥,其中,第一密钥是动态生成的,可以生成长度为32位字符串(256比特)的AES加密密钥,也可以是128位的加密密钥。其中,产生的方法是:生成第一字符串集合,上述第一字符串集合包括N组不同的字符串,上述N为大于或等于2的整数;从上述第一字符串集合中提取M位字符得到第一密钥,上述M为大于2的整数。例如,随机生成3组不同的字符串组成第一字符串集合,每组长度为20。如下3组字符串只是示例:A=“a133424sd……” B=“b13345677……” C=“mlo334poiuyj……”;取A组字符串奇数位字符串,共计10位,作为密钥的前10位;取C组字符串偶数位字符串,共计10位,作为密钥的第11-20位;取B组字符串第2位、第5-9位、第13-17位、第19位,共计12位,作为密钥的第21-32位,从而得到32为的AES加密密钥。在一种可能的实现方式中,可以定义一个获取AES密钥的接口,可以直接运行上述获取AES密钥的程序,从而得到AES动态密钥,以便于后续终端可以从接口获取AES密钥。
在得到AES密钥之后,获取第二密钥,该密钥为用于传输的密钥,这里以RSA加密算法(rsa algorithm,RSA)加密算法为例,客户端存储有RSA加密公钥,用公钥对上述身份标识以及第一密钥加密。即客户端在向服务器发送上述操作指令对应的验证信息获取请求时,上述验证信息获取请求携带上述操作指令对应的操作标识、加密后的身份标识以及加密后的第一密钥。
204、接收上述服务器返回的与上述操作指令对应的第二验证信息,上述第二验证信息包括权限信息以及数字签名。
在一种可能的实现方式中,接收服务器返回的第二验证信息,其中第二验证信息是用服务器的RSA私钥加密后的验证信息,客户端可用RSA公钥进行解密,得到验证信息中的数字签名以及加密后的权限信息,用上述生成的第一密钥对权限信息进行解密,便可以执行使用上述数字签名判断上述身份标识是否为合法身份标识,以及使用上述权限信息判断上述用户是否具有操作上述操作指令对应的操作的权限的操作。
在一种可能的实现方式中,若客户端判断是否在预设时间段内接收到上述操作指令对应的验证信息,若判断出在预设时间段内接收到与上述操作指令对应的第二验证信息,则说明通信正常;若判断出未在预设时间段内接收到与上述操作指令对应的第二验证信息,则重新向服务器发送获取请求。并且计数加一,该计数为记录发送上述操作指令对应的验证信息获取请求的次数。直到判断出上述验证信息获取请求的发送次数等于第二阈值时,确定上述客户端处于离线状态。则执行从本地获取验证信息的操作。
在一种可能的实现方式中,在接收到上述服务器返回的与上述操作指令对应的第二验证信息后,获取上述第一验证信息的哈希值,得到第一哈希值,同时解密第二验证信息得到数字签名以及权限信息,计算解密后的第二验证信息的哈希值,得到第二哈希值,通过比较上述第一哈希值和上述第二哈希值是否相同,当判断出不相同时,更新存储的验证信息,即用上述第二验证信息替换上述存储的第一验证信息存储起来。
可选地,在将上述第二验证信息存储到本地的时候,可生成第三密钥,该第三密钥用于对上述第二验证信息加密,在这里不限定上述第三加密密钥的类型。以AES加密密钥为例,生成方法与步骤202中生成方法一致。将加密后的验证信息存储起来,并存储上述第三密钥,以便于在离线状态下进行验证。
205、根据上述数字签名判断上述身份标识是否为合法身份标识,以及使用上述权限信息判断上述用户是否具有与上述操作指令对应的操作的权限。
206、当判断出上述身份标识为合法身份标识,以及上述用户具有与上述操作指令对应的操作的权限时,执行上述操作指令。
其中,步骤205-步骤206的具体实现过程可参见上述图1所对应实施例中对步骤104-步骤105的描述,这里将不再继续进行赘述。
本申请实施例中,通过在接收到用户通过客户端输入的操作指令后,判断客户端是否处于离线状态,当判断出客户端处于离线状态时,在预先存储的验证信息中获取操作指令对应的第一验证信息,对第一验证信息中的权限信息和数字签名对身份标识以及操作指令的操作权限进行验证,当判断出身份标识为合法身份标识以及用户有操作权限时,执行操作指令。从而实现了客户端在离线状态下的授权为用户提供服务,达到了提高了验证的即时性,使授权不受外界环境的影响的效果。
请参阅图3,图3是本申请提出的一种信息处理装置的结构示意图。如图3所示,该信息处理装置3000包括:接收单元301,用于接收用户通过客户端输入的操作指令,上述操作指令携带上述用户的身份标识。
第一判断单元302,用于判断上述客户端是否处于离线状态。
第一获取单元303,用于当判断出上述客户端处于离线状态时,获取预先存储的与上述操作指令对应的第一验证信息,上述第一验证信息包括权限信息以及数字签名。
第二判断单元304,用于根据上述数字签名判断上述身份标识是否为合法身份标识,以及使用上述权限信息判断上述用户是否具有与上述操作指令对应的操作的权限。
执行单元305,用于当判断出上述身份标识为合法身份标识,以及上述用户具有与上述操作指令对应的操作的权限时,执行上述操作指令。
在一种可能的实现方式中,上述第一判断单元302,具体用于:获取客户端的网络信号强度。
判断上述网络信号强度是否小于第一阈值。
当判断出上述网络信号强度小于上述第一阈值时,确定上述客户端处于离线状态。
在一种可能的实现方式中,上述装置3000还包括:第一确定单元306,用于当判断出上述网络信号强度大于或等于上述第一阈值时,确定上述客户端处于在线状态。
发送单元307,用于发送与上述操作指令对应的验证信息获取请求至服务器。
接收单元308,用于接收上述服务器返回的与上述操作指令对应的第二验证信息,上述第二验证信息包括权限信息以及数字签名。
第三判断单元309,用于根据上述数字签名判断上述身份标识是否为合法身份标识,以及使用上述权限信息判断上述用户是否具有与上述操作指令对应的操作的权限。
第二执行单元310,用于当判断出上述身份标识为合法身份标识,以及上述用户具有操作上述操作指令对应的操作的权限时,执行上述操作指令。
在一种可能的实现方式中,上述发送单元307,具体用于:生成第一字符串集合,上述第一字符串集合包括N组不同的字符串,上述N为大于或等于2的整数。
从上述第一字符串集合中提取M位字符得到第一密钥,上述M为大于2的整数。
获取第二密钥。
使用上述第二密钥对上述身份标识以及上述第一密钥加密。
发送与上述操作指令对应的验证信息获取请求至服务器,上述验证信息获取请求携带与上述操作指令对应的操作标识、加密后的身份标识以及加密后的第一密钥。
在一种可能的实现方式中,上述装置3000还包括:第四判断单元311,用于判断是否在预设时间段内接收到与上述操作指令对应的第二验证信息。
第五判断单元312,用于当判断出未在预设时间内接收到与上述操作指令对应的第二验证信息时,继续执行上述发送与上述操作指令对应的验证信息获取请求至服务器的步骤,直至判断出上述验证信息获取请求的发送次数等于第二阈值时。
第二确定单元313,用于确定上述客户端处于离线状态。
在一种可能的实现方式中,上述装置3000还包括:第二获取单元314,用于获取上述第一验证信息的哈希值,得到第一哈希值。
计算单元315,用于计算上述第二验证信息的哈希值,得到第二哈希值。
第六判断单元316,用于判断上述第一哈希值与上述第二哈希值是否相同。
替换单元317,用于当判断出上述第一哈希值与上述第二哈希值不同时,将上述第一验证信息替换为上述第二验证信息。
在一种可能的实现方式中,上述装置3000还包括:输出单元318,用于当判断出上述身份标识为非法身份标识,或者上述用户不具有与上述操作指令对应的操作的权限时,输出操作失败的提示信息。
可以理解的是,图3所示的信息处理装置的具体实现方式还可参考图1和图2所示的方法,这里不再一一详述。
本申请实施例中,通过在接收到用户通过客户端输入的操作指令后,判断客户端是否处于离线状态,当判断出客户端处于离线状态时,在预先存储的验证信息中获取身份标识和操作指令对应的第一验证信息,对第一验证信息中的权限信息和数字签名对身份标识以及操作指令的操作权限进行验证,当判断出身份标识为合法身份标识以及用户有操作权限时,执行操作指令。从而实现了客户端在离线状态下的授权为用户提供服务,达到了提高了验证的即时性,使授权不受外界环境的影响的效果。
请参阅图4,图4是本申请实施例提供的一电子设备的结构示意图。如图4所示,该电子设备可以包括:一个或多个处理器401、收发器402、输出设备403、输入设备404以及存储器405。上述处理器401、收发器402、输出设备403、输入设备404以及存储器405通过总线连接。收发器402用于接收和发送数据。输出设备403和输入设备404用于输入输出数据。存储器403用于存储计算机程序,该计算机程序包括程序指令,处理器401用于执行存储器403存储的程序指令,其中,处理器401被配置用于调用程序指令执行以下步骤:上述处理器401控制上述输入设备404接收用户通过客户端输入的操作指令,上述操作指令携带上述用户的身份标识。
判断上述客户端是否处于离线状态。
当判断出上述客户端处于离线状态时,获取预先存储的与上述操作指令对应的第一验证信息,上述第一验证信息包括权限信息以及数字签名。
根据上述数字签名判断上述身份标识是否为合法身份标识,以及使用上述权限信息判断上述用户是否具有与上述操作指令对应的操作的权限。
当判断出上述身份标识为合法身份标识,以及上述用户具有与上述操作指令对应的操作的权限时,执行上述操作指令。
在一种可能的实现方式中,上述处理器401判断客户端是否处于离线状态包括:获取客户端的网络信号强度。
判断上述网络信号强度是否小于第一阈值。
当判断出上述网络信号强度小于上述第一阈值时,确定上述客户端处于离线状态。
在一种可能的实现方式中,上述处理器401还被配置用于调用程序指令执行以下步骤:当判断出上述网络信号强度大于或等于上述第一阈值时,确定上述客户端处于在线状态。
发送与上述操作指令对应的验证信息获取请求至服务器。
上述处理器401控制上述收发器402接收上述服务器返回的与上述操作指令对应的第二验证信息,上述第二验证信息包括权限信息以及数字签名。
根据上述数字签名判断上述身份标识是否为合法身份标识,以及使用上述权限信息判断上述用户是否具有与上述操作指令对应的操作的权限。
当判断出上述身份标识为合法身份标识,以及上述用户具有与上述操作指令对应的操作的权限时,执行上述操作指令。
在一种可能的实现方式中,上述处理器401控制上述收发器402发送与上述操作指令对应的验证信息获取请求至服务器,包括:生成第一字符串集合,上述第一字符串集合包括N组不同的字符串,上述N为大于或等于2的整数。从上述第一字符串集合中提取M位字符得到第一密钥,上述M为大于2的整数。获取第二密钥。使用上述第二密钥对上述身份标识以及上述第一密钥加密。
发送与上述操作指令对应的验证信息获取请求至服务器,上述验证信息获取请求携带与上述操作指令对应的操作标识、加密后的身份标识以及加密后的第一密钥。
在一种可能的实现方式中,上述处理器401控制上述收发器402发送与上述操作指令对应的验证信息获取请求至服务器之后,上述处理器401还被配置用于调用程序指令执行以下步骤:判断是否在预设时间段内接收到与上述操作指令对应的第二验证信息。当判断出未在预设时间内接收到与上述操作指令对应的第二验证信息时,继续执行上述发送与上述操作指令对应的验证信息获取请求至服务器的步骤,直至判断出上述验证信息获取请求的发送次数等于第二阈值时,确定上述客户端处于离线状态。
在一种可能的实现方式中,上述处理器401控制上述收发器402接收上述服务器返回的与上述操作指令对应的第二验证信息之后,上述处理器401还被配置用于调用程序指令执行以下步骤:获取上述第一验证信息的哈希值,得到第一哈希值。计算上述第二验证信息的哈希值,得到第二哈希值。判断上述第一哈希值与上述第二哈希值是否相同。当判断出上述第一哈希值与上述第二哈希值不同时,将上述第一验证信息替换为上述第二验证信息并存储。
在一种可能的实现方式中,上述处理器401还被配置用于调用程序指令执行以下步骤:上述处理器401控制上述输出设备403当判断出上述身份标识为非法身份标识,或者上述用户不具有与上述操作指令对应的操作的权限时,输出操作失败的提示信息。
应当理解,在一些可行的实施方式中,上述处理器401可以是中央处理单元 (central processing unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器 (digital signal processor,DSP)、专用集成电路 (application specific integrated circuit,ASIC)、现成可编程门阵列 (field-programmable gate array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
该存储器403可以包括只读存储器和随机存取存储器,并向处理器401提供指令和数据。存储器403的一部分还可以包括非易失性随机存取存储器。例如,存储器403还可以存储设备类型的信息。
具体实现中,上述信息处理装置可通过其内置的各个功能模块执行如上述图1以及图2中各个步骤所提供的实现方式,具体可参见上述各个步骤所提供的实现方式,在此不再赘述。
本申请实施例中,通过在接收到用户通过客户端输入的操作指令后,判断客户端是否处于离线状态,当判断出客户端处于离线状态时,在预先存储的验证信息中获取操作指令对应的第一验证信息,对第一验证信息中的权限信息和数字签名对身份标识以及操作指令的操作权限进行验证,当判断出身份标识为合法身份标识以及用户有操作权限时,执行操作指令。从而实现了客户端在离线状态下的授权为用户提供服务,达到了提高了验证的即时性,使授权不受外界环境的影响的效果。
上述计算机可读存储介质可以是前述任一实施例提供的任务处理装置或者上述信息处理装置的内部存储单元,例如信息处理装置的硬盘或内存。该计算机可读存储介质也可以是该信息处理装置的外部存储设备,例如该信息处理装置上配备的插接式硬盘,智能存储卡(smart media card, SMC),安全数字(secure digital, SD)卡,闪存卡(flash card)等。上述计算机可读存储介质还可以包括磁碟、光盘、只读存储记忆体(read-only memory,ROM)或随机存储记忆体(randomaccessmemory,RAM)等。进一步地,该计算机可读存储介质还可以既包括该信息处理装置的内部存储单元也包括外部存储设备。该计算机可读存储介质用于存储该计算机程序以及该信息处理装置所需的其他程序和数据。该计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。其中,所述计算机可读存储介质可以是非易失性,也可以是易失性。
本申请的权利要求书和说明书及附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置展示该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。在本申请说明书和所附权利要求书中使用的术语“和/ 或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (20)

  1. 一种信息处理方法,其中,包括:
    接收用户通过客户端输入的操作指令,所述操作指令携带所述用户的身份标识;
    判断所述客户端是否处于离线状态;
    当判断出所述客户端处于离线状态时,获取预先存储的与所述操作指令对应的第一验证信息,所述第一验证信息包括权限信息以及数字签名;
    根据所述数字签名判断所述身份标识是否为合法身份标识,以及使用所述权限信息判断所述用户是否具有与所述操作指令对应的操作权限;
    当判断出所述身份标识为合法身份标识,以及所述用户具有与所述操作指令对应的操作权限时,执行所述操作指令。
  2. 根据权利要求1所述的方法,其中,所述判断客户端是否处于离线状态包括:
    获取客户端的网络信号强度;
    判断所述网络信号强度是否小于第一阈值;
    当判断出所述网络信号强度小于所述第一阈值时,确定所述客户端处于离线状态。
  3. 根据权利要求2所述的方法,其中,所述方法还包括:
    当判断出所述网络信号强度大于或等于所述第一阈值时,确定所述客户端处于在线状态;
    发送与所述操作指令对应的验证信息获取请求至服务器;
    接收所述服务器返回的与所述操作指令对应的第二验证信息,所述第二验证信息包括权限信息以及数字签名;
    根据所述数字签名判断所述身份标识是否为合法身份标识,以及使用所述权限信息判断所述用户是否具有与所述操作指令对应的操作权限;
    当判断出所述身份标识为合法身份标识,以及所述用户具有与所述操作指令对应的操作权限时,执行所述操作指令。
  4. 根据权利要求3所述的方法,其中,所述发送与所述操作指令对应的验证信息获取请求至服务器,包括:
    生成第一字符串集合,所述第一字符串集合包括N组不同的字符串,所述N为大于或等于2的整数;
    从所述第一字符串集合中提取M位字符得到第一密钥,所述M为大于2的整数;
    获取第二密钥;
    使用所述第二密钥对所述身份标识以及所述第一密钥加密;
    发送与所述操作指令对应的验证信息获取请求至服务器,所述验证信息获取请求携带与所述操作指令对应的操作标识、加密后的身份标识以及加密后的第一密钥。
  5. 根据权利要求3所述的方法,其中,所述发送与所述操作指令对应的验证信息获取请求至服务器之后,所述方法还包括:
    判断是否在预设时间段内接收到与所述操作指令对应的第二验证信息;
    当判断出未在预设时间内接收到与所述操作指令对应的第二验证信息时,继续执行所述发送与所述操作指令对应的验证信息获取请求至服务器的步骤,直至判断出所述验证信息获取请求的发送次数等于第二阈值时,确定所述客户端处于离线状态。
  6. 根据权利要求5所述的方法,其中,所述接收所述服务器返回的与所述操作指令对应的第二验证信息之后,所述方法还包括:
    获取所述第一验证信息的哈希值,得到第一哈希值;
    计算所述第二验证信息的哈希值,得到第二哈希值;
    判断所述第一哈希值与所述第二哈希值是否相同;
    当判断出所述第一哈希值与所述第二哈希值不同时,将所述第一验证信息替换为所述第二验证信息并存储。
  7. 根据权利要求1-6任一项所述的方法,其中,所述方法还包括:
    当判断出所述身份标识为非法身份标识,或者所述用户不具有与所述操作指令对应的操作权限时,输出操作失败提示信息。
  8. 一种信息处理装置,其中,包括:
    接收单元,用于接收用户通过客户端输入的操作指令,所述操作指令携带所述用户的身份标识;
    第一判断单元,用于判断所述客户端是否处于离线状态;
    获取单元,用于当判断出所述客户端处于离线状态时,获取预先存储的与所述操作指令对应的第一验证信息,所述第一验证信息包括权限信息以及数字签名;
    第二判断单元,用于根据所述数字签名判断所述身份标识是否为合法身份标识,以及使用所述权限信息判断所述用户是否具有与所述操作指令对应的操作的权限;
    执行单元,用于当判断出所述身份标识为合法身份标识,以及所述用户具有与所述操作指令对应的操作的权限时,执行所述操作指令。
  9. 一种电子设备,其中,所述电子设备包括存储器和处理器,所述处理器、和所述存储器相互连接,其中,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述存储器的所述程序指令,其中:
    接收用户通过客户端输入的操作指令,所述操作指令携带所述用户的身份标识;
    判断所述客户端是否处于离线状态;
    当判断出所述客户端处于离线状态时,获取预先存储的与所述操作指令对应的第一验证信息,所述第一验证信息包括权限信息以及数字签名;
    根据所述数字签名判断所述身份标识是否为合法身份标识,以及使用所述权限信息判断所述用户是否具有与所述操作指令对应的操作权限;
    当判断出所述身份标识为合法身份标识,以及所述用户具有与所述操作指令对应的操作权限时,执行所述操作指令。
  10. 根据权利要求9所述的电子设备,其中,所述处理器用于:
    获取客户端的网络信号强度;
    判断所述网络信号强度是否小于第一阈值;
    当判断出所述网络信号强度小于所述第一阈值时,确定所述客户端处于离线状态。
  11. 根据权利要求10所述的电子设备,其中,所述处理器用于:
    当判断出所述网络信号强度大于或等于所述第一阈值时,确定所述客户端处于在线状态;
    发送与所述操作指令对应的验证信息获取请求至服务器;
    接收所述服务器返回的与所述操作指令对应的第二验证信息,所述第二验证信息包括权限信息以及数字签名;
    根据所述数字签名判断所述身份标识是否为合法身份标识,以及使用所述权限信息判断所述用户是否具有与所述操作指令对应的操作权限;
    当判断出所述身份标识为合法身份标识,以及所述用户具有与所述操作指令对应的操作权限时,执行所述操作指令。
  12. 根据权利要求11所述的电子设备,其中,所述处理器用于:
    生成第一字符串集合,所述第一字符串集合包括N组不同的字符串,所述N为大于或等于2的整数;
    从所述第一字符串集合中提取M位字符得到第一密钥,所述M为大于2的整数;
    获取第二密钥;
    使用所述第二密钥对所述身份标识以及所述第一密钥加密;
    发送与所述操作指令对应的验证信息获取请求至服务器,所述验证信息获取请求携带与所述操作指令对应的操作标识、加密后的身份标识以及加密后的第一密钥。
  13. 根据权利要求11所述的电子设备,其中,所述处理器用于:
    判断是否在预设时间段内接收到与所述操作指令对应的第二验证信息;
    当判断出未在预设时间内接收到与所述操作指令对应的第二验证信息时,继续执行所述发送与所述操作指令对应的验证信息获取请求至服务器的步骤,直至判断出所述验证信息获取请求的发送次数等于第二阈值时,确定所述客户端处于离线状态。
  14. 根据权利要求13所述的电子设备,其中,所述处理器用于:
    获取所述第一验证信息的哈希值,得到第一哈希值;
    计算所述第二验证信息的哈希值,得到第二哈希值;
    判断所述第一哈希值与所述第二哈希值是否相同;
    当判断出所述第一哈希值与所述第二哈希值不同时,将所述第一验证信息替换为所述第二验证信息并存储。
  15. 根据权利要求9-14任一项所述的电子设备,其中,所述处理器用于:
    当判断出所述身份标识为非法身份标识,或者所述用户不具有与所述操作指令对应的操作权限时,输出操作失败提示信息。
  16. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序包括程序指令,所述程序指令被处理器执行时,用于实现以下步骤:
    接收用户通过客户端输入的操作指令,所述操作指令携带所述用户的身份标识;
    判断所述客户端是否处于离线状态;
    当判断出所述客户端处于离线状态时,获取预先存储的与所述操作指令对应的第一验证信息,所述第一验证信息包括权限信息以及数字签名;
    根据所述数字签名判断所述身份标识是否为合法身份标识,以及使用所述权限信息判断所述用户是否具有与所述操作指令对应的操作权限;
    当判断出所述身份标识为合法身份标识,以及所述用户具有与所述操作指令对应的操作权限时,执行所述操作指令。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:
    获取客户端的网络信号强度;
    判断所述网络信号强度是否小于第一阈值;
    当判断出所述网络信号强度小于所述第一阈值时,确定所述客户端处于离线状态。
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:
    当判断出所述网络信号强度大于或等于所述第一阈值时,确定所述客户端处于在线状态;
    发送与所述操作指令对应的验证信息获取请求至服务器;
    接收所述服务器返回的与所述操作指令对应的第二验证信息,所述第二验证信息包括权限信息以及数字签名;
    根据所述数字签名判断所述身份标识是否为合法身份标识,以及使用所述权限信息判断所述用户是否具有与所述操作指令对应的操作权限;
    当判断出所述身份标识为合法身份标识,以及所述用户具有与所述操作指令对应的操作权限时,执行所述操作指令。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:
    生成第一字符串集合,所述第一字符串集合包括N组不同的字符串,所述N为大于或等于2的整数;
    从所述第一字符串集合中提取M位字符得到第一密钥,所述M为大于2的整数;
    获取第二密钥;
    使用所述第二密钥对所述身份标识以及所述第一密钥加密;
    发送与所述操作指令对应的验证信息获取请求至服务器,所述验证信息获取请求携带与所述操作指令对应的操作标识、加密后的身份标识以及加密后的第一密钥。
  20. 根据权利要求18所述的计算机可读存储介质,其中,所述程序指令被处理器执行时,还用于实现以下步骤:
    判断是否在预设时间段内接收到与所述操作指令对应的第二验证信息;
    当判断出未在预设时间内接收到与所述操作指令对应的第二验证信息时,继续执行所述发送与所述操作指令对应的验证信息获取请求至服务器的步骤,直至判断出所述验证信息获取请求的发送次数等于第二阈值时,确定所述客户端处于离线状态。
PCT/CN2020/099316 2019-09-18 2020-06-30 一种信息处理方法及装置 WO2021051941A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910881187.3 2019-09-18
CN201910881187.3A CN110719173B (zh) 2019-09-18 2019-09-18 一种信息处理方法及装置

Publications (1)

Publication Number Publication Date
WO2021051941A1 true WO2021051941A1 (zh) 2021-03-25

Family

ID=69209937

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/099316 WO2021051941A1 (zh) 2019-09-18 2020-06-30 一种信息处理方法及装置

Country Status (2)

Country Link
CN (1) CN110719173B (zh)
WO (1) WO2021051941A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113452710A (zh) * 2021-06-28 2021-09-28 深圳前海微众银行股份有限公司 越权漏洞检测方法、装置、设备及计算机程序产品
CN114500044A (zh) * 2022-01-25 2022-05-13 特斯联科技集团有限公司 一种数据验证方法、装置、存储介质及电子设备
CN114499964A (zh) * 2021-12-24 2022-05-13 青岛海尔科技有限公司 设备控制方法和装置、存储介质及电子装置
CN115037515A (zh) * 2022-04-29 2022-09-09 北京龙腾佳讯科技股份公司 开放数据网中无状态验证码验证方法、装置及电子设备
CN117041305A (zh) * 2023-10-10 2023-11-10 成都秦川物联网科技股份有限公司 基于物联网的气体流量计离线数据管理方法、设备及介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110719173B (zh) * 2019-09-18 2022-04-12 平安科技(深圳)有限公司 一种信息处理方法及装置
CN111711529B (zh) * 2020-06-12 2022-03-15 腾讯科技(深圳)有限公司 群操作处理方法、装置、系统、设备及存储介质
CN112491786A (zh) * 2020-10-16 2021-03-12 中国铁路信息科技集团有限公司 基于单向传输的安全运维方法和系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070234063A1 (en) * 2006-03-30 2007-10-04 Yukiya Ueda System, method and program for off-line user authentication
US8689294B1 (en) * 2011-11-11 2014-04-01 Symantec Corporation Systems and methods for managing offline authentication
CN105049407A (zh) * 2015-05-28 2015-11-11 深圳市永兴元科技有限公司 登录方法及装置
CN108537030A (zh) * 2018-04-18 2018-09-14 北京旷视科技有限公司 基于身份识别的管理方法、装置及电子设备
CN110719173A (zh) * 2019-09-18 2020-01-21 平安科技(深圳)有限公司 一种信息处理方法及装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8046587B2 (en) * 2005-12-12 2011-10-25 Qualcomm Incorporated Method off-line authentication on a limited-resource device
CN103856640B (zh) * 2014-01-07 2015-07-01 腾讯科技(深圳)有限公司 一种对用户资源信息进行处理的方法及系统
CN111899026A (zh) * 2016-06-20 2020-11-06 创新先进技术有限公司 一种支付方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070234063A1 (en) * 2006-03-30 2007-10-04 Yukiya Ueda System, method and program for off-line user authentication
US8689294B1 (en) * 2011-11-11 2014-04-01 Symantec Corporation Systems and methods for managing offline authentication
CN105049407A (zh) * 2015-05-28 2015-11-11 深圳市永兴元科技有限公司 登录方法及装置
CN108537030A (zh) * 2018-04-18 2018-09-14 北京旷视科技有限公司 基于身份识别的管理方法、装置及电子设备
CN110719173A (zh) * 2019-09-18 2020-01-21 平安科技(深圳)有限公司 一种信息处理方法及装置

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113452710A (zh) * 2021-06-28 2021-09-28 深圳前海微众银行股份有限公司 越权漏洞检测方法、装置、设备及计算机程序产品
CN113452710B (zh) * 2021-06-28 2022-12-27 深圳前海微众银行股份有限公司 越权漏洞检测方法、装置、设备及计算机程序产品
CN114499964A (zh) * 2021-12-24 2022-05-13 青岛海尔科技有限公司 设备控制方法和装置、存储介质及电子装置
CN114499964B (zh) * 2021-12-24 2023-12-19 青岛海尔科技有限公司 设备控制方法和装置、存储介质及电子装置
CN114500044A (zh) * 2022-01-25 2022-05-13 特斯联科技集团有限公司 一种数据验证方法、装置、存储介质及电子设备
CN115037515A (zh) * 2022-04-29 2022-09-09 北京龙腾佳讯科技股份公司 开放数据网中无状态验证码验证方法、装置及电子设备
CN117041305A (zh) * 2023-10-10 2023-11-10 成都秦川物联网科技股份有限公司 基于物联网的气体流量计离线数据管理方法、设备及介质
CN117041305B (zh) * 2023-10-10 2024-01-23 成都秦川物联网科技股份有限公司 基于物联网的气体流量计离线数据管理方法、设备及介质

Also Published As

Publication number Publication date
CN110719173A (zh) 2020-01-21
CN110719173B (zh) 2022-04-12

Similar Documents

Publication Publication Date Title
WO2021051941A1 (zh) 一种信息处理方法及装置
WO2021012552A1 (zh) 一种登录处理方法及相关设备
CN109347835B (zh) 信息传输方法、客户端、服务器以及计算机可读存储介质
WO2020237868A1 (zh) 数据传输方法、电子设备、服务器及存储介质
CN108809646B (zh) 安全共享密钥共享系统
US11533297B2 (en) Secure communication channel with token renewal mechanism
US10142107B2 (en) Token binding using trust module protected keys
US8196186B2 (en) Security architecture for peer-to-peer storage system
US8925109B2 (en) Client-side player file and content license verification
CN110401615B (zh) 一种身份认证方法、装置、设备、系统及可读存储介质
WO2015180691A1 (zh) 验证信息的密钥协商方法及装置
KR20180066048A (ko) 컴퓨터 네트워크를 개선하기 위한 컴퓨터로-구현되는 암호화 방법, 및 단말, 시스템 및 이를 위한 컴퓨터-판독 가능한 매체
CN113268715A (zh) 软件加密方法、装置、设备及存储介质
JP2005102163A (ja) 機器認証システム、機器認証サーバ、端末機器、機器認証方法、機器認証プログラム、及び記憶媒体
US9942042B1 (en) Key containers for securely asserting user authentication
KR20080004165A (ko) 브로드캐스트 암호화를 이용한 디바이스 인증 방법
WO2015180689A1 (zh) 验证信息的获取方法及装置
CN107517194B (zh) 一种内容分发网络的回源认证方法和装置
CN108431819B (zh) 保护客户端访问视频播放器的drm代理的服务的方法和系统
WO2020102974A1 (zh) 一种数据访问方法、数据访问装置及移动终端
CN109951276B (zh) 基于tpm的嵌入式设备远程身份认证方法
TW201626776A (zh) 用於建立安全通訊通道的改良式系統
US10122755B2 (en) Method and apparatus for detecting that an attacker has sent one or more messages to a receiver node
TW201633206A (zh) 透過驗證符記的改善安全性
CN117436043A (zh) 待执行文件的来源验证方法、设备以及可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20865194

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20865194

Country of ref document: EP

Kind code of ref document: A1