Server access authorization method and device, storage medium and electronic equipment

By using the encryption method of authorization credentials, random numbers and secret keys in server access authorization, the verification value is only generated when the first device communicates with the second device, solving the problem of easy leakage of authorization credentials in the existing technology, and significantly improving improve the security of the server.

CN118740402APending Publication Date: 2024-10-01GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310335394.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The security level of the server access permission sharing method in the existing technology is low and can easily lead to privacy leaks. Any terminal that can scan the QR code can obtain the authorization credentials, causing information leakage.

Method used

The authorization certificate and random number are generated by the first device and encrypted in combination with the first secret key. The verification value can only be identified and generated when the first device communicates with the second device and is used for server verification to ensure that only authorized terminals can Access the server.

Benefits of technology

It effectively improves the security of the server, avoids the problem of information leakage caused by random terminal scanning of authorization codes, and ensures the security and validity of authorization credentials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740402A_ABST
    Figure CN118740402A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of authority management, in particular to an access authorization method and device of a server, a computer readable storage medium and electronic equipment, first equipment logs in an authorization account and has access authority of the server, second equipment is in communication connection with the first equipment, and the method is applied to the second equipment. The method comprises the following steps: scanning a login authorization code generated by first equipment to obtain an authorization certificate and a random number; acquiring a first secret key sent by the first device; determining a first verification value based on the authorization certificate, the random number and the first key; and sending the first verification value, the authorization certificate and the random number to the server according to the identity of the authorization account, so that the server verifies the first verification code according to the authorization account and the authorization certificate. According to the technical scheme, the security level of the server is improved, and privacy leakage is prevented.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the development of smart terminal devices, people's awareness of data protection is becoming stronger and stronger. Usually, when different terminals want to obtain confidential data, they need to share access rights through authorized terminals.

[0003] However, the permission sharing method in the prior art is to obtain relevant permissions by only scanning a QR code, which has a low security level and is prone to privacy leakage.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the present disclosure is to provide a server access authorization method, a server access authorization device, a computer-readable medium and an electronic device, thereby at least to a certain extent improving the security level of the server and preventing privacy leakage.

[0006] According to a first aspect of the present disclosure, a method for authorizing access to a server is provided, wherein a first device logs in to an authorized account and has access rights to the server, and a second device is communicatively connected to the first device. The method is applied to the second device, and includes: scanning a login authorization code generated by the first device to obtain an authorization credential and a random number; obtaining a first secret key sent by the first device; determining a first verification value based on the authorization credential, the random number and the first secret key; and sending the first verification value, the authorization credential and the random number to the server as the authorized account, so that the server verifies the first verification code according to the authorized account and the authorization credential.

[0007] According to a second aspect of the present disclosure, a method for authorizing access to a server is provided, wherein a first device logs in to an authorized account and has access rights to the server, and a second device is communicatively connected to the first device. The method is applied to the first device, and includes: generating a random authorization credential and the first secret key; sending the first secret key to the server, and receiving a random number generated by the server according to the user account of the first device and the first secret key; generating a login authorization code based on the authorization credential and the random number, so that the second device scans the generated first verification value and sends an access request to the server.

[0008] According to a third aspect of the present disclosure, there is provided a method for authorizing access to a server, wherein a first device logs in to an authorized account and has access rights to the server, and a second device is communicatively connected to the first device. The method is applied to the server, and includes: receiving a first secret key sent by the first device, and generating a random number for the authorized account and the first secret key, so that the first device shares the first secret key with the second device, and the second device generates a first verification value related to the first secret key; receiving an authorization credential, a random number, and a first verification value submitted by the second device with the authorized account; determining a second verification value based on the security account and the random number; and in response to the second verification value being the same as the first verification value and the authorization credential being within a validity period, allowing the second device to access the server.

[0009] According to a fourth aspect of the present disclosure, there is provided a method for authorizing access to a server, wherein a first device logs in to an authorized account and has access rights to the server, and a second device is connected to the first device in communication, the method comprising: the first device generates a random authorization credential and the first secret key; the first device uses the above-mentioned authorized account to send the first secret key to the server; the server generates a random number based on the user account of the first device and the first secret key and returns it to the first device; the first device generates a login authorization code based on the authorization credential and the random number; the second device scans the login authorization code to obtain the authorization credential and the random number; the second device obtains the first secret key; the second device determines a first verification value based on the authorization credential, the random number and the first secret key; the second device sends the first verification value, the authorization credential and the random number to the server as the authorized account; the server receives the authorization credential, the random number and the first verification value submitted by the second device as the authorized account; the server determines a second verification value based on the security account and the random number, and in response to the second verification value being the same as the first verification value and the authorization credential being within the validity period, allows the second device to access the server.

[0010] According to a fifth aspect of the present disclosure, there is provided an access authorization device for a server, wherein a first device logs in to an authorized account and has access rights to the server, and a second device is communicatively connected to the first device, and the method is applied to the second device, comprising: a scanning module for scanning a login authorization code generated by the first device to obtain an authorization credential and a random number; a first acquisition module for obtaining a first secret key sent by the first device; a first determination module for determining a first verification value based on the authorization credential, the random number and the first secret key; and a first verification module for sending the first verification value, the authorization credential and the random number to the server as the authorized account, so that the server verifies the first verification code according to the authorized account and the authorization credential.

[0011] According to a sixth aspect of the present disclosure, there is provided an access authorization device for a server, wherein a first device logs in to an authorization account and has access rights to the server, and a second device is communicatively connected to the first device, and the method is applied to the first device, comprising: a first generation module for generating a random authorization credential and the first secret key; a data sending module for sending the first secret key to the server, and receiving a random number generated by the server according to the user account of the first device and the first secret key; and a second generation module for generating a login authorization code based on the authorization credential and the random number, so that the second device scans the generated first verification value and sends an access request to the server.

[0012] According to a seventh aspect of the present disclosure, there is provided an access authorization device for a server, wherein a first device logs in to an authorized account and has access rights to the server, and a second device is communicatively connected to the first device. The method is applied to the server, and comprises: a first receiving module, for receiving a first secret key sent by the first device, and generating a random number for the authorized account and the first secret key, so that the first device shares the first secret key with the second device, and the second device generates a first verification value related to the first secret key; a second receiving module, for receiving an authorization credential, a random number and a first verification value submitted by the second device with the authorized account; and a second determining module, for determining a second verification value according to the security account and the random number; a second verification module, in response to the second verification value being the same as the first verification value and the authorization credential being within a validity period, allowing the second device to access the server.

[0013] According to an eighth aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented.

[0014] According to a ninth aspect of the present disclosure, an electronic device is provided, characterized in that it includes: one or more processors; and a memory for storing one or more programs, which enables the one or more processors to implement the above method when the one or more programs are executed by the one or more processors.

[0015] An embodiment of the present disclosure provides a method for authorizing access to a server, in which a first device logs in to an authorized account and has access rights to the server, and a second device is connected in communication with the first device. The method is applied to the second device, which scans the login authorization code generated by the first device to obtain the authorization credential and the random number; obtains the first secret key sent by the first device; determines the first verification value based on the authorization credential, the random number and the first secret key; sends the first verification value and the authorization credential to the server as the authorized account, so that the server verifies the first verification code according to the authorized account and the authorization credential. Compared with the prior art, encryption is performed using a random number and the first secret key. Only when the first device and the second device are connected in communication can the first secret key generated by the first device be identified and obtained, and a first verification value is generated for verification by the server, thereby avoiding the problem of information leakage caused by any terminal scanning the login authorization code, and improving the security of the server.

[0016] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0018] Figure 1 Data flow diagram of the server-server access authorization method in the prior art;

[0019] Figure 2 A flowchart schematically illustrates a method for authorizing access to a server in an exemplary embodiment of the present disclosure;

[0020] Figure 3 A flowchart schematically illustrating another method for authorizing access to a server in an exemplary embodiment of the present disclosure;

[0021] Figure 4 A flowchart schematically illustrates another method for authorizing access to a server in an exemplary embodiment of the present disclosure;

[0022] Figure 5A data flow diagram schematically illustrating a method for authorizing access to a server in an exemplary embodiment of the present disclosure;

[0023] Figure 6 A schematic diagram schematically shows the composition of an access authorization device of a server in an exemplary embodiment of the present disclosure;

[0024] Figure 7 A schematic diagram schematically shows the composition of another access authorization device of a server in an exemplary embodiment of the present disclosure;

[0025] Figure 8 A schematic diagram schematically shows the composition of another access authorization device of a server in an exemplary embodiment of the present disclosure;

[0026] Fig. 9 A schematic diagram of an electronic device to which the embodiments of the present disclosure can be applied is shown. DETAILED DESCRIPTION

[0027] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0028] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0029] In the related art, in the interconnection business, it is usually involved that different terminal devices assist each other in identity authentication in the near field. Figure 1 As shown, in the related technology, the authorized account has logged into an application A (denoted as APP_A) on a first terminal (eg, a corporate office computer) and can access the resources of a remote server Service_A corresponding to the application A.

[0030] In the authorization stage, step S110 can be performed first, and the authorized account generates a QR code on the first terminal, which contains the authorization credential information. Then step S120 can be performed, and the second device scans the QR code generated on the first device to obtain the authorization credential information C. Then step S130 is performed, and application A on the second device (represented as M_App_A) submits C to its corresponding remote server (Service_A). Thereafter, step S140 is performed, and the remote server (Service_A) checks the legitimacy of C, confirms the validity period of C, and authorizes M_App_A to use C. Finally, step S150 can be performed, and the authorized account can use application A normally on M within the validity period of the authorization credential information C, and communicate securely with the remote server (Service_A) corresponding to application A to obtain the relevant business data of the authorized account.

[0031] However, application A on the first device is only responsible for generating the QR code and does not restrict the device for scanning the QR code. That is, any other device that can scan the QR code may obtain the authorization certificate and obtain the business data of user U, causing privacy leakage. If the first device itself is in poor security (for example, infected with a virus or a Trojan horse), hackers may also obtain the QR code information through remote screenshots or remote control, causing the hacker's malicious terminal to remotely obtain the authorization certificate and then obtain the business data of the authorized account, causing privacy leakage.

[0032] Combine the following Figure 2 The access authorization method of the server in this exemplary embodiment is described. Figure 2 An exemplary process of the access authorization method of the server is shown, which may include:

[0033] Step S210, scanning the login authorization code generated by the first device to obtain an authorization credential and a random number;

[0034] Step S220, obtaining a first secret key sent by the first device;

[0035] Step S230, determining a first verification value based on the authorization credential, the random number and the first secret key;

[0036] Step S240: sending the first verification value, the authorization certificate, and the random number to the server as the authorized account, so that the server verifies the first verification code according to the authorized account and the authorization certificate.

[0037] Based on the above method, encryption is performed through random numbers and the first secret key. Only when the first device is in communication with the second device can the first secret key generated by the first device be identified and obtained, and a first verification value is generated for verification by the server. This avoids the problem of information leakage caused by any terminal scanning the above login authorization code, thereby improving the security of the server.

[0038] Below Figure 2 Each step in the procedure is described in detail.

[0039] refer to Figure 2 In step S210, the login authorization code generated by the first device is scanned to obtain the authorization credential and the random number.

[0040] In an exemplary embodiment, the second device can scan the login authorization code generated by the first device, wherein the login authorization code can be a QR code, a barcode, etc., and can also be customized according to user needs, which is not specifically limited in this exemplary implementation.

[0041] In this example implementation, the above login authorization code is generated by the first device, and the first device is communicated with the second device. The connection method may include Bluetooth, wireless, NFC, etc. The specific linking method can also be customized according to user needs and is not specifically limited in this example implementation.

[0042] Among them, the first device has a logged-in authorized account, and the above-mentioned first device has access rights to the above-mentioned server. The first device can generate a random authorization certificate and a first secret key, and send the first secret key to the server with the authorized account. The server generates a random number based on the above-mentioned first secret key and the above-mentioned authorization account, and returns the random number to the first device. The first device generates the above-mentioned login authorization code based on the above-mentioned authorization certificate and the random number.

[0043] The second device may scan the login authorization code to obtain the authorization certificate and random number.

[0044] In step S220, a first secret key sent by the first device is obtained.

[0045] In this example implementation, the second device may directly obtain the first key generated by the first device from the first device via the communication link in the above communication connection.

[0046] In step S230, a first verification value is determined based on the authorization credential, the random number and the first secret key.

[0047] In this example implementation, after obtaining the authorization certificate, the random number and the first secret key, the second device can determine the first verification value according to the authorization certificate, the random number and the first secret key, specifically:

[0048] Auth=MAC(key=K,data={C,N})

[0049] Among them, Auth is the first verification value, K represents the first secret key, C represents the authorization certificate, and N represents a random number.

[0050] In step S240, the first verification value, the authorization certificate and the random number are sent to the server as the authorized account, so that the server verifies the first verification code according to the authorized account and the authorization certificate.

[0051] In this example implementation, after the second device determines the first verification value, it can send the first verification value and the authorization certificate to the service with the identity of the authorization account, so that the server verifies the first verification code according to the authorization account and the authorization certificate.

[0052] Specifically, the server may determine the second verification value according to the authorization certificate and the random number sent by the second device. Specifically, the second secret key may be first determined according to the random number and the authorized account, and then the second verification value may be determined according to the second secret key, the authorization certificate and the random number. The calculation method of the second verification value is as follows:

[0053] Auth2=MAC(key=K2,data={C,N})

[0054] Among them, Auth is the second verification value, K represents the second secret key, C represents the authorization certificate, and N represents a random number.

[0055] When the first verification value and the second verification value are the same, the server detects the legitimacy and validity period of the authorization certificate. If the authorization certificate is legal and within the validity period, the second device is allowed to access the server with the identity of an authorized account.

[0056] It should be noted that the above-mentioned server may be an application server or a data server, and may also be customized according to user needs, which is not specifically limited in this example implementation.

[0057] The present disclosure also provides a method for authorizing access to a server. A first device logs in to an authorized account and has access rights to the server. A second device is connected to the first device for communication. The method is applied to the first device. Figure 3 As shown, the above method may include:

[0058] Step S310, generating a random authorization credential and the first secret key;

[0059] Step S320, sending the first secret key to the server, and receiving a random number generated by the server according to the user account of the first device and the first secret key;

[0060] Step S330, generating a login authorization code based on the authorization credential and the random number, so that the second device scans the generated first verification value and sends an access request to the server.

[0061] The above steps are described in detail below.

[0062] In step S310, a random authorization credential and the first secret key are generated.

[0063] In step S320, the first secret key is sent to the server, and a random number generated by the server according to the user account of the first device and the first secret key is received.

[0064] In step S330, a login authorization code is generated based on the authorization credential and the random number, so that the second device scans the generated first verification value and sends an access request to the server.

[0065] In this example implementation, the first device has a logged-in authorization account, and the first device has access rights to the server. The first device can generate a random authorization credential and a first key, and send the first key to the server with the authorization account. The server generates a random number based on the first key and the authorization account, and returns the random number to the first device. The first device generates the login authorization code based on the authorization credential and the random number.

[0066] The second device can scan the above login authorization code to obtain the above authorization certificate and random number, and the second device can directly obtain the first secret key generated by the first device from the first device through the communication link in the above communication connection.

[0067] The present disclosure also provides a method for authorizing access to a server, wherein a first device logs in to an authorized account and has access rights to the server, and a second device is connected to the first device for communication. The method is applied to the server, and Figure 4 As shown, the above method may include:

[0068] Step S410, receiving a first key sent by a first device, and generating a random number for the authorized account and the first key, so that the first device shares the first key with a second device, and the second device generates a first verification value related to the first key;

[0069] Step S420, receiving the authorization certificate, random number and first verification value submitted by the second device using the authorized account;

[0070] Step S430, determining a second verification value according to the security account and the random number;

[0071] Step S440: In response to the second verification value being the same as the first verification value and the authorization credential being within a validity period, allowing the second device to access the server.

[0072] The above steps are described in detail below.

[0073] In this example implementation, the server can generate a random number based on the first secret key and the authorized account; and return the random number to the first device, and the first device generates a login authorization code based on the random number and the authorization credential. The second device can scan the login authorization code to obtain the authorization credential and the random number. The second device can directly obtain the first secret key generated by the first device from the first device through the communication link in the communication connection. Then, the second device can determine the first verification value based on the authorization credential, the random number and the first secret key. The generation method of the first verification value has been described in detail above and will not be repeated here.

[0074] The server may determine the second verification value according to the authorization certificate and the random number sent by the second device. Specifically, the server may first determine the second secret key according to the random number and the authorized account, and then determine the second verification value according to the second secret key, the authorization certificate and the random number. The calculation method of the second verification value is as follows:

[0075] Auth2=MAC(key=K2,data={C,N})

[0076] Among them, Auth2 is the second verification value, K2 represents the second secret key, C represents the authorization certificate, and N represents a random number.

[0077] When the first verification value and the second verification value are the same, the server detects the legitimacy and validity period of the authorization certificate. If the authorization certificate is legal and within the validity period, the second device is allowed to access the server with the identity of an authorized account.

[0078] It should be noted that the above-mentioned server may be an application server or a data server, and may also be customized according to user needs, which is not specifically limited in this example implementation.

[0079] Furthermore, the present disclosure also provides a method for authorizing access to a server, wherein a first device logs in to an authorized account and has access rights to the server, and a second device is connected to communicate with the first device, referring to Figure 5 As shown, the above method includes:

[0080] Step S510, the first device generates a random authorization credential and the first secret key;

[0081] Step S520: the first device uses the authorized account to send the first secret key to the server;

[0082] Step S530: the server generates a random number according to the user account of the first device and the first secret key and returns the random number to the first device;

[0083] Step S540: the first device generates a login authorization code based on the authorization credential and the random number;

[0084] Step S550: the second device scans the login authorization code to obtain the authorization credential and the random number;

[0085] Step S560: the second device obtains the first secret key;

[0086] Step S570: the second device determines a first verification value based on the authorization credential, the random number, and the first secret key;

[0087] Step S580, the second device sends the first verification value, the authorization credential and the random number to the server as the authorized account;

[0088] Step S590, the server receives the authorization credential, the random number, and the first verification value submitted by the second device using the authorization account;

[0089] In step S511, the server determines a second verification value based on the security account and the random number, and in response to the second verification value being the same as the first verification value and the authorization credential being within a validity period, allows the second device to access the server.

[0090] In the real-time mode of this example, in the implementation mode of this example, the first device has a logged-in authorized account, and the above-mentioned first device has access rights to the above-mentioned server. The first device can generate a random authorization credential and a first secret key, and send the first secret key to the server with the authorized account. The server generates a random number based on the above-mentioned first secret key and the above-mentioned authorized account, and returns the random number to the first device, and the first device generates the above-mentioned login authorization code based on the above-mentioned authorization credential and the random number.

[0091] The second device can scan the login authorization code to obtain the authorization certificate and random number. The second device can directly obtain the first key generated by the first device from the first device through the communication link in the communication connection. After obtaining the authorization certificate, random number and first key, the second device can determine the first verification value according to the authorization certificate, random number and first key. Specifically:

[0092] Auth=MAC(key=K,data={C,N})

[0093] Among them, Auth is the first verification value, K represents the first secret key, C represents the authorization certificate, and N represents a random number.

[0094] The server may determine the second verification value according to the authorization certificate and the random number sent by the second device. Specifically, the server may first determine the second secret key according to the random number and the authorized account, and then determine the second verification value according to the second secret key, the authorization certificate and the random number. The calculation method of the second verification value is as follows:

[0095] Auth2=MAC(key=K2,data={C,N})

[0096] Among them, Auth2 is the second verification value, K2 represents the second secret key, C represents the authorization certificate, and N represents a random number.

[0097] When the first verification value and the second verification value are the same, the server detects the legitimacy and validity period of the authorization certificate. If the authorization certificate is legal and within the validity period, the second device is allowed to access the server with the identity of an authorized account.

[0098] To sum up, in this exemplary embodiment, encryption is performed using a random number and a first secret key. Only when the first device is in communication with the second device can the first secret key generated by the first device be identified and obtained, and a first verification value is generated for verification by the server. This avoids the problem of information leakage caused by any terminal scanning the login authorization code, thereby improving the security of the server.

[0099] The present disclosure also provides a server access authorization device, wherein a first device logs in to an authorization account and has access rights to the server, a second device is connected to the first device for communication, and the device is arranged on the second device, referring to Figure 6 As shown, the access authorization device 600 of the server may include a scanning module 610 , a first acquisition module 620 , a first determination module 630 and a first verification module 640 .

[0100] The scanning module 610 may be used to scan the login authorization code generated by the first device to obtain the authorization credential and the random number.

[0101] The first acquisition module 620 may be configured to acquire a first secret key sent by the first device.

[0102] In an example implementation, the first acquisition module 620 may be configured to receive a random first key generated by the first terminal through the communication connection.

[0103] The first determination module 630 may be configured to determine a first verification value based on the authorization credential, the random number, and the first secret key.

[0104] The first verification module 640 may be configured to send the first verification value, the authorization credential, and the random number to the server as the authorized account, so that the server verifies the first verification code according to the authorized account and the authorization credential.

[0105] Further, see Figure 7 The present disclosure also provides an access authorization device 700 for a server, comprising a first generation module 710 , a data sending module 720 and a second generation module 730 .

[0106] The first generating module 710 may be used to generate a random authorization credential and the first secret key.

[0107] The data sending module 720 can be used to send the first secret key to the server, and receive a random number generated by the server according to the user account of the first device and the first secret key and return it to the first device.

[0108] The second generation module 730 can be used to generate a login authorization code based on the authorization credential and the random number, so that the second device scans the generated first verification value and sends an access request to the server.

[0109] Further, see Figure 8 The present disclosure further provides an access authorization device 800 for a server, comprising a first receiving module 810 , a second receiving module 820 , a second determining module 830 and a second verifying module 840 .

[0110] Among them, the first receiving module 810 can be used to receive a first secret key sent by a first device, and generate a random number for the authorized account and the first secret key, so that the first device shares the first secret key with the second device, and the second device generates a first verification value related to the first secret key.

[0111] The second receiving module 820 may be configured to receive the authorization credential, the random number, and the first verification value submitted by the second device using the authorization account.

[0112] The second determination module 830 may be configured to determine a second verification value according to the security account and the random number.

[0113] The second verification module 840 may be configured to allow the second device to access the server in response to the second verification value being the same as the first verification value and the authorization credential being within a validity period.

[0114] In an example implementation, the second verification module 840 may be configured to allow the second device to access the server in response to the second verification value being the same as the first verification value and the authorization credential being legitimate and within a validity period.

[0115] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0116] The exemplary embodiment of the present disclosure also provides an electronic device for executing the access authorization method of the above-mentioned server, and the electronic device may be the above-mentioned first terminal or the second terminal or the server. Generally, the electronic device may include a processor and a memory, the memory is used to store executable instructions of the processor, and the processor is configured to execute the access authorization method of the above-mentioned server by executing the executable instructions.

[0117] Below Fig. 9 The mobile terminal 900 in FIG. 1 is taken as an example to exemplify the structure of the electronic device. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Fig. 9 The construction in can also be applied to fixed type equipment.

[0118] like Fig. 9 As shown, the mobile terminal 900 may specifically include: a processor 901, a memory 902, a bus 903, a mobile communication module 904, an antenna 1, a wireless communication module 905, an antenna 2, a display screen 906, a camera module 907, an audio module 908, a power module 909 and a sensor module 910.

[0119] The processor 901 may include one or more processing units, for example, the processor 901 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc. The access authorization method of the server in this exemplary embodiment may be executed by an AP, a GPU or a DSP, and when the method involves processing related to a neural network, it may be executed by an NPU.

[0120] The processor 901 may be connected to the memory 902 or other components via a bus 903 .

[0121] The memory 902 may be used to store computer executable program codes, which include instructions. The processor 901 executes various functional applications and data processing of the mobile terminal 900 by running the instructions stored in the memory 902. The memory 902 may also store application data, such as images, videos, and other files.

[0122] The communication function of the mobile terminal 900 can be implemented by the mobile communication module 904, antenna 1, wireless communication module 905, antenna 2, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 904 can provide 2G, 3G, 4G, 5G and other mobile communication solutions applied to the mobile terminal 900. The wireless communication module 905 can provide wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. applied to the mobile terminal 900.

[0123] The display screen 906 is used to implement display functions, such as displaying user interfaces, images, videos, etc. The camera module 907 is used to implement shooting functions, such as shooting images, videos, etc. The audio module 208 is used to implement audio functions, such as playing audio, collecting voice, etc. The power module 209 is used to implement power management functions, such as charging the battery, powering the device, monitoring the battery status, etc. The sensor module 910 may include a depth sensor 9101, a pressure sensor 9102, a gyroscope sensor 9103, an air pressure sensor 9104, etc., to implement corresponding sensing detection functions.

[0124] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0125] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of the present specification.

[0126] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0127] In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0128] In addition, program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0129] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0130] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for authorizing access to a server, characterized in that: The first device logs in to the authorized account and has access rights to the server, the second device is connected to the first device for communication, and the method is applied to the second device, and the method includes: Scan the login authorization code generated by the first device to obtain the authorization credential and the random number; Obtaining a first secret key sent by the first device; Determine a first verification value based on the authorization credential, the random number, and the first secret key; The first verification value, the authorization certificate, and the random number are sent to a server as the authorized account, so that the server verifies the first verification code according to the authorized account and the authorization certificate.

2. The method according to claim 1, characterized in that The obtaining of the first secret key sent by the first device includes: A random first secret key generated by the first terminal is received through the communication connection.

3. A method for authorizing access to a server, wherein a first device logs in to an authorized account and has access rights to the server, and a second device is connected to communicate with the first device, and the method is applied to the first device, and the method includes: Generate a random authorization credential and the first secret key; Sending the first secret key to a server, and receiving a random number generated by the server according to the user account of the first device and the first secret key; A login authorization code is generated based on the authorization credential and the random number, so that the second device scans the generated first verification value and sends an access request to the server.

4. A method for authorizing access to a server, characterized in that: The first device logs in to the authorized account and has access rights to the server, the second device is connected to the first device for communication, and the method is applied to the server, the method comprising: receiving a first key sent by a first device, and generating a random number for the authorized account and the first key, so that the first device shares the first key with a second device, and the second device generates a first verification value related to the first key; Receiving the authorization credential, the random number, and the first verification value submitted by the second device using the authorized account; determining a second verification value according to the security account and the random number; In response to the second verification value being the same as the first verification value and the authorization credential being within a validity period, the second device is allowed to access the server.

5. The method according to claim 4, characterized in that In response to the second verification value being the same as the first verification value and the authorization credential being within a validity period, allowing the second device to access the server comprises: In response to the second verification value being the same as the first verification value and the authorization credential being legal and within the validity period, the second device is allowed to access the server.

6. A method for authorizing access to a server, characterized in that: The first device logs in to the authorized account and has access rights to the server, and the second device is connected to the first device for communication, and the method includes: The first device generates a random authorization credential and the first secret key; The first device sends the first secret key to the server using the authorized account; The server generates a random number based on the user account of the first device and the first secret key and returns the random number to the first device; The first device generates a login authorization code based on the authorization credential and the random number; The second device scans the login authorization code to obtain the authorization credential and the random number; The second device obtains the first secret key; The second device determines a first verification value based on the authorization credential, the random number, and the first secret key; The second device sends the first verification value, the authorization credential, and the random number to the server as the authorized account; The server receives the authorization credential, the random number, and the first verification value submitted by the second device using the authorization account; The server determines a second verification value based on the security account and the random number, and in response to the second verification value being the same as the first verification value and the authorization credential being within a validity period, allows the second device to access the server.

7. An access authorization device for a server, characterized in that: The first device logs in to the authorized account and has access rights to the server, and the second device is connected to the first device for communication. The method is applied to the second device and includes: A scanning module, used to scan the login authorization code generated by the first device to obtain an authorization credential and a random number; A first acquisition module, used to acquire a first secret key sent by the first device; A first determination module, configured to determine a first verification value based on the authorization credential, the random number, and the first secret key; The first verification module is used to send the first verification value, the authorization certificate and the random number to the server as the authorized account, so that the server verifies the first verification code according to the authorized account and the authorization certificate.

8. An access authorization device for a server, characterized in that: The first device logs in to the authorized account and has access rights to the server, the second device is connected to the first device for communication, and the method is applied to the first device, including: A first generating module, used to generate a random authorization credential and the first secret key; A data sending module, used to send the first secret key to a server, and receive a random number generated by the server according to the user account of the first device and the first secret key; The second generating module is used to generate a login authorization code based on the authorization credential and the random number, so that the second device scans the generated first verification value and sends an access request to the server.

9. An access authorization device for a server, characterized in that: The first device logs in to the authorized account and has access rights to the server, the second device is connected to the first device for communication, and the method is applied to the server, including: a first receiving module, configured to receive a first secret key sent by a first device, and generate a random number for the authorized account and the first secret key, so that the first device shares the first secret key with a second device, and the second device generates a first verification value related to the first secret key; A second receiving module, configured to receive the authorization credential, the random number, and the first verification value submitted by the second device using the authorized account; A second determination module, configured to determine a second verification value according to the security account and the random number; The second verification module allows the second device to access the server in response to the second verification value being the same as the first verification value and the authorization credential being within a validity period.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the server access authorization method according to any one of claims 1 to 6 is implemented.

11. An electronic device, characterized in that: include: one or more processors; as well as A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the server access authorization method as described in any one of claims 1 to 6.