Network authentication method and apparatus, storage medium, and electronic device

Through the collaborative work of the authentication server and the backend server, network permissions are dynamically allocated, which solves the problem that existing technology cannot meet the problem of dynamic permission adjustment in complex network environments, and realizes flexible communication connections between terminal devices and network devices.

WO2024183775A1PCT designated stage expired Publication Date: 2024-09-12BEIJING VOLCANO ENGINE TECH CO LTD

Patent Information

Application Number
PCT/CN2024/080412
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-07
Filing Date
2024-03-06
Publication Date
2024-09-12

AI Technical Summary

Technical Problem

Existing network authentication services cannot meet the needs of dynamic network permission allocation in complex network environments, and cannot dynamically adjust network permissions according to the scenario of the terminal device.

Method used

Send query requests to the backend server through the authentication server, receive and verify user credentials and network permission information, and dynamically allocate network permissions to establish communication connections between terminal devices and network devices.

Benefits of technology

It realizes dynamic network permission allocation according to the scenario where the terminal device is located, meets the needs of complex network authorization scenarios, and improves network security and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024080412_12092024_PF_FP_ABST
    Figure CN2024080412_12092024_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of computers, and relates to a network authentication method and apparatus, a storage medium, and an electronic device. According to the method, an authentication server sends a first query request to a background server, receives a second user credential of a target user and network permission information that are sent to the authentication server by the background server in response to the first query request, and when an authentication result obtained according to a first user credential and the second user credential indicates that the authentication is successful, sends the authentication result and the network permission information to a network device, so that the network device establishes a communication connection between the network device and a terminal device according to the network permission information, and therefore, the network permission of the terminal device can be dynamically allocated according to a scene where the terminal device is located, thereby meeting the use requirements of a complex network authorization scene.
Need to check novelty before this filing date? Find Prior Art

Description

Network authentication method, device, storage medium and electronic device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese invention patent application number 202310214966.4, entitled “Network Authentication Method, Device, Storage Medium and Electronic Device”, filed on March 7, 2023, and the entirety of that application is incorporated herein by reference. Technical Field

[0003] The present disclosure relates to the field of computer technology, and in particular to a network authentication method, device, storage medium, and electronic device. Background Art

[0004] Network access control can prevent security issues caused by terminal device risks that impact the overall network, making it an increasingly important research topic. Related technologies typically utilize authentication and authorization services for network access control. However, these services only provide authentication results indicating success or failure, and the network permissions they provide are based on the default network permissions configured by the authentication and authorization service. As network environments become increasingly complex, such single authentication and authorization services are no longer sufficient to meet enterprise needs.

[0005] Summary of the Invention

[0006] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0007] In a first aspect, the present disclosure provides a network authentication method, applied to an authentication server, the method comprising:

[0008] Obtaining an authentication request sent by a network device, wherein the authentication request is sent by the network device in response to a communication request sent by a terminal device, the communication request is used to request to establish a communication connection with the network device, and the authentication request includes a first user credential of a target user corresponding to the terminal device;

[0009] In response to the authentication request, sending a first query request to a backend server, wherein the first query request is used to enable the backend server to determine a second user credential and network permission information of the target user;

[0010] Upon receiving the second user credential and network permission information of the target user sent by the backend server, obtaining an authentication result according to the first user credential and the second user credential;

[0011] When the authentication result indicates that the authentication is passed, the authentication result and the network permission information are sent to the network device, wherein the authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device according to the network permission information.

[0012] In a second aspect, the present disclosure provides a network authentication method, applied to a backend server, the method comprising:

[0013] receiving a first query request sent by an authentication server, wherein the first query request is sent by the authentication server in response to an authentication request sent by a network device, the authentication request is sent by the network device to the authentication server in response to a communication request sent by a terminal device to the network device, the communication request is used to request establishment of a communication connection with the network device, and the authentication request includes a first user credential of a target user corresponding to the terminal device;

[0014] In response to the first query request, determining a second user credential and network permission information of the target user;

[0015] Send the second user credential and the network permission information to the authentication server, wherein the second user credential is used to enable the authentication server to obtain an authentication result based on the first user credential and the second user credential, and when the authentication result indicates that the authentication is passed, send the authentication result and the network permission information to the network device, and the authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device based on the network permission information.

[0016] In a third aspect, the present disclosure provides a network authentication device, applied to an authentication server, the device comprising:

[0017] an acquisition module configured to acquire an authentication request sent by a network device, wherein the authentication request is sent by the network device in response to a communication request sent by a terminal device, the communication request is used to request to establish a communication connection with the network device, and the authentication request includes a first user credential of a target user corresponding to the terminal device;

[0018] a first sending module configured to send a first query request to a backend server in response to the authentication request, wherein the first query request is used to enable the backend server to determine a second user credential and network permission information of the target user;

[0019] a first receiving module configured to, upon receiving the second user credential and network permission information of the target user sent by the backend server, obtain an authentication result according to the first user credential and the second user credential;

[0020] The second sending module is configured to send the authentication result and the network permission information to the network device when the authentication result indicates that the authentication is passed, wherein the authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device according to the network permission information.

[0021] In a fourth aspect, the present disclosure provides a network authentication device, applied to a backend server, the device comprising:

[0022] a second receiving module configured to receive a first query request sent by an authentication server, wherein the first query request is sent by the authentication server in response to an authentication request sent by a network device, the authentication request is sent by the network device to the authentication server in response to a communication request sent by a terminal device to the network device, the communication request is used to request establishment of a communication connection with the network device, and the authentication request includes a first user credential of a target user corresponding to the terminal device;

[0023] a determination module, configured to determine a second user credential and network permission information of the target user in response to the first query request;

[0024] The third sending module is configured to send the second user credential and the network permission information to the authentication server, wherein the second user credential is used to enable the authentication server to obtain an authentication result based on the first user credential and the second user credential, and when the authentication result indicates that the authentication is passed, the authentication result and the network permission information are sent to the network device, and the authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device based on the network permission information.

[0025] In a fifth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect, or implements the steps of the method described in the second aspect.

[0026] In a sixth aspect, the present disclosure provides an electronic device, including:

[0027] a storage device having a computer program stored thereon;

[0028] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect, or to implement the steps of the method described in the second aspect.

[0029] Through the above technical solution, the authentication server sends a first query request to the background server, and receives the second user credentials and network permission information of the target user sent by the background server to the authentication server in response to the first query request. When the authentication result obtained according to the first user credentials and the second user credentials indicates that the authentication is successful, the authentication result and the network permission information are sent to the network device, so that the network device establishes a communication connection between the network device and the terminal device according to the network permission information, so that the network permission of the terminal device can be dynamically allocated according to the scenario in which the terminal device is located, which can meet the usage requirements of complex network authorization scenarios.

[0030] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings:

[0032] FIG1 is a schematic diagram of an application scenario of a network authentication method provided according to an exemplary embodiment.

[0033] FIG2 is a flow chart of a network authentication method according to an exemplary embodiment.

[0034] FIG3 is a schematic flow chart of a network authentication method according to another exemplary embodiment.

[0035] FIG4 is a schematic flow chart of a network authentication method according to another exemplary embodiment.

[0036] FIG5 is a schematic diagram of a process of determining network permission information according to an exemplary embodiment.

[0037] FIG6 is a schematic flow chart of a network authentication method according to yet another exemplary embodiment.

[0038] FIG7 is a schematic flow chart of a network authentication method according to another exemplary embodiment.

[0039] FIG8 is a schematic diagram of module connections of a network authentication device according to an exemplary embodiment.

[0040] FIG9 is a schematic diagram showing module connections of a network authentication device according to another exemplary embodiment.

[0041] FIG10 is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0042] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0043] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0044] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0045] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0046] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0047] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0048] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0049] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0050] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0051] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0052] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.

[0053] Figure 1 is a schematic diagram of an application scenario of a network authentication method provided according to an exemplary embodiment. As shown in Figure 1, the network authentication method provided in the embodiment of the present disclosure is applicable to the application scenario shown in Figure 1, which includes a terminal device 10, a network device 20, an authentication server 30, and a backend server 40, wherein the terminal device 10 is in communication connection with the network device 20, the network device 20 is in communication connection with the authentication server 30, and the authentication server 30 is in communication connection with the backend server 40. It should be understood that the communication connection can refer to data exchange via a wired connection or a wireless connection.

[0054] The terminal device 10 can send a communication request for requesting to establish a communication connection to the network device 20, wherein the communication request includes the first user credentials of the target user. After receiving the communication request, the network device 20 sends the communication request to the authentication server 30, and the authentication server 30 responds to the communication request and sends a first query request to the background server 40. In response to the first query request, the background server 40 sends the second user credentials and network permission information of the target user to the authentication server 30. The authentication server 30 determines the authentication result based on the first user credentials and the second user credentials, and if the authentication result indicates that the authentication is passed, sends the authentication result and network permission information to the network device 20. After receiving the authentication result and the network permission information, the network device 20 establishes a communication connection between the network device 20 and the terminal device 10 based on the network permission information.

[0055] It is worth noting that the terminal device 10 can be a mobile terminal such as a mobile phone, a laptop computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), an in-vehicle terminal (such as an in-vehicle navigation terminal), etc., as well as a fixed terminal such as a digital TV, a desktop computer, etc.; the network device 20 can be a wireless controller or a switch, etc., and the network device 20 and the terminal device 10 can communicate using the EAPol protocol. The authentication server 30 can refer to a server for deploying a network authentication service, which can be a RADIUS service. The authentication server 30 and the network device 20 can communicate via the RADIUS protocol. The backend server 40 serves as a server for granting network permissions to the terminal device 10, and is used to store the second user credentials and network permission information of different users. The backend server 40 and the authentication server 30 can communicate via the HTTP protocol.

[0056] The network authentication method provided by the embodiment of the present disclosure is described in detail below with reference to the accompanying drawings.

[0057] Figure 2 is a flow chart of a network authentication method according to an exemplary embodiment. As shown in Figure 2, the network authentication method provided by the embodiment of the present disclosure can be applied to the authentication server 30 shown in Figure 1. As shown in Figure 2, the network authentication method can include the following steps.

[0058] In step 210, an authentication request sent by a network device is obtained, wherein the authentication request is sent by the network device in response to a communication request sent by a terminal device, the communication request is used to request to establish a communication connection with the network device, and the authentication request includes the first user credentials of the target user corresponding to the terminal device.

[0059] Here, the authentication server receives an authentication request sent by a network device, which may include the first user credentials of the target user. The terminal device may send a communication request to the network device to request the establishment of a communication connection, which includes the first user credentials of the target user. In response to the communication request, the network device sends an authentication request to the authentication server. Of course, the authentication request can also be understood as a communication request sent by a terminal device. The network device receives the communication request sent by the terminal device, obtains the first user credentials of the target user, and relays the first user credentials to the authentication server via the authentication request.

[0060] For example, the terminal device can connect to the network interface of the network device and input the first user credentials of the target user through the client deployed on the terminal device. The first user credentials of the target user are then sent to the network device via the EAPol protocol in the form of a communication request. The network device receives the communication request sent by the terminal device via the network interface and sends the first user credentials of the target user to the authentication server in the form of an authentication request.

[0061] It should be understood that the first user credential may include a user name and password of the target user. For different users, the user name may be different.

[0062] In step 220, in response to the authentication request, a first query request is sent to the backend server.

[0063] Here, after receiving the authentication request sent by the network device, the authentication server sends a first query request to the background server in response to the authentication request, wherein the first query request is used to enable the background server to determine the second user credentials and network permission information of the target user.

[0064] In step 230, upon receiving the second user credential and network permission information of the target user sent by the backend server, an authentication result is obtained according to the first user credential and the second user credential.

[0065] Here, the authentication server receives the second user credential and network permission information of the target user sent by the backend server, wherein the second user credential and network permission information of the target user are sent to the authentication server by the backend server in response to the first query request.

[0066] It should be understood that the second user credentials include the target user's username and password, and the network permission information is used to instruct the network device to communicate with the terminal device based on the network resources indicated by the network permission information. Network resources include VLANs (Virtual Local Area Networks), ACLs (Access Control Lists), and Roles (a basic element in the Role-Based Access Control model).

[0067] If the network permission information includes a VLAN code, the network device assigns the target user's connection to the VLAN corresponding to the VLAN code. For example, if the network permission information includes the authorization content "Tunnel-Type: VLAN, Tunnel-Medium-Type: IEEE-802, Tunnel-Private-Group::100," the network device will assign the target user to VLAN 100 after obtaining this network permission information.

[0068] When network permission information includes an ACL code, the network device applies the ACL rule corresponding to the ACL code to the target user's session. For example, if network permission information includes authorization content such as "Filter-id: 3000," the network device, upon obtaining this network permission information, applies ACL rule 3000 to the target user's session.

[0069] When network permission information includes a role, the network device configures a user role or user group for the target user's session. For example, network permission information might include authorization content such as "Filter-id: dev." After obtaining this network permission information, the network device applies the target user's session to the predefined dev role.

[0070] It is worth noting that when the terminal device is in different network access scenarios, its corresponding network permission information may be different.

[0071] The authentication server can obtain the authentication result by comparing the username and password in the first user credential and the second user credential to see if they are consistent. If the username and password are consistent, the authentication is successful. If the username and password are inconsistent, the authentication is unsuccessful.

[0072] In step 240, when the authentication result indicates that the authentication is passed, the authentication result and the network permission information are sent to the network device, wherein the authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device according to the network permission information.

[0073] Here, when the authentication result obtained by the authentication server indicates that the authentication is successful, the authentication server sends the authentication result indicating that the authentication is successful and the network authority information to the network device, so that the network device establishes a communication connection between the network device and the terminal device according to the network authority information.

[0074] Of course, in other embodiments, when the authentication result indicates that the authentication failed, the authentication server may send the authentication result indicating that the authentication failed to the network device, so that the network device denies the terminal device access to the network device in response to the authentication result.

[0075] Therefore, by sending a first query request to the background server, and receiving the second user credentials and network permission information of the target user sent by the background server to the authentication server in response to the first query request, and when the authentication result obtained according to the first user credentials and the second user credentials indicates that the authentication is successful, the authentication result and the network permission information are sent to the network device, so that the network device establishes a communication connection between the network device and the terminal device according to the network permission information, so that the network permission of the terminal device can be dynamically allocated according to the scenario in which the terminal device is located, which can meet the usage requirements of complex network authorization scenarios.

[0076] In some feasible implementations, the first query request may include a user name of the target user, a serial number of the authentication server, and an Internet Protocol address of the network device.

[0077] Here, the first query request may include the target user's username, the authentication server's serial number, and the Internet Protocol (IP) address of the network device. The target user's username may be obtained from the first user's credentials. Different authentication servers may have network-unique serial numbers to distinguish between different authentication servers in the network.

[0078] It is worth noting that the serial number of the authentication server and the Internet Protocol address of the network device are used by the backend server to determine the network access scenario of the terminal device based on the serial number and Internet Protocol address. The target user's username and network access scenario are used to determine the network permission information determined by the backend server based on the target user's username and network access scenario, and the target user's username is used by the backend server to determine the target user's second user credential. For example, if the network access scenario represents the use of virtual local area network resources for network access, the backend server determines the target virtual local area network assigned to the target user based on the target user's username.

[0079] Of course, the first query request may also include other information, such as the MAC (Media Access Control) address of the terminal device, the IP address of the terminal device, etc. It is worth noting that the information carried in the first query request is mainly used by the backend server to locate the second user credentials and network permission information of the target user based on the information carried in the first query request.

[0080] Therefore, by carrying the target user's username, the serial number of the authentication server, and the Internet Protocol address of the network device in the first query request, the background server can accurately determine the network permission information suitable for the terminal device's network access scenario based on the target user's username, the serial number of the authentication server, and the Internet Protocol address of the network device.

[0081] Figure 3 is a flow chart of a network authentication method according to another exemplary embodiment. As shown in Figure 3, the network authentication method provided by the embodiment of the present disclosure may further include the following steps.

[0082] In step 310, a second query request is sent to the backend server.

[0083] Here, the authentication server can periodically send a second query request to the backend server. For example, a scheduled task can be established in the authentication server, and the scheduled task triggers the sending of a second query request to the backend server at every preset time interval. Of course, the second query request can also be generated by other means. For example, a network device can periodically send a permission request to the authentication server, and the permission request is used to instruct the authentication server to query whether the target user's network permissions have changed. The authentication server can then generate a second query request in response to the permission request.

[0084] It should be understood that the authentication device may start to periodically send the second query request to the backend server after executing steps 210 to 240. That is, after the terminal device establishes a communication connection with the network device, the authentication server may periodically send the second query request to the backend server.

[0085] The second query request is used to enable the background server to send disconnection task information to the authentication server in response to the second query request. The disconnection task information is generated by the background server when it detects that the network authority of the target user has changed.

[0086] It is worth noting that the background server can detect whether the network permission information of the user corresponding to the terminal device connected to the network device has changed. When it is detected that the network permission information of a certain user has changed, the background server generates disconnection task information. The disconnection task information is used to instruct the target network device to disconnect the communication between the target network device and the target terminal device. The disconnection task information may include the NAS (Network Access Server) identifier of the network device and the network connection identifier. The network connection identifier may include Called-Station-Id (called number), UserName (user name), Calling-Station-Id (calling number) and Acct-Session-Id (security identifier indicating this billing), etc. Calling-Station-Id and Acct-Session-Id can be used to identify the attributes of a unique terminal device.

[0087] It should be understood that the disconnection task information can be represented in the form of a string array in Json format. The authentication server receives a message sent by the background server in the form of a string array in Json format through an interface to obtain the disconnection task information.

[0088] In step 320, upon receiving the disconnection task information sent by the background server, a disconnection message is sent to the network device indicated by the disconnection task information according to the disconnection task information, wherein the disconnection message is used to notify the network device to disconnect the communication connection with the terminal device indicated by the disconnection message, so that the terminal device re-initiates a communication connection to the network device.

[0089] Here, after receiving the disconnection task information sent by the backend server, the authentication server constructs a disconnection message based on the disconnection task information and sends the disconnection message to the network device indicated by the disconnection task information. For example, if the disconnection task information includes the NAS identifier of the network device, the NAS identifier of the network device is the network device indicated by the disconnection task information.

[0090] The disconnect message sent by the authentication server to the network device is used to notify the network device to disconnect the communication connection with the terminal device indicated by the disconnect message, so that the terminal device can re-initiate a communication connection with the network device. It is worth noting that re-initiating a communication connection with the network device by the terminal device means that the terminal device re-sends a communication request to the network device.

[0091] It's worth noting that in the disclosed embodiments, the DMs (Disconnect Messages) service is actually used to implement changes in network permissions. DMs can notify the network device that the target terminal device's network permissions are outdated, disconnect the target terminal device's current connection, and allow the target terminal device to reconnect, making the new network permissions effective. Using DMs not only refreshes the terminal device's network permissions but also refreshes the network. Furthermore, since the terminal device has already recorded the first user's credentials, it can automatically reconnect after disconnecting from the network, eliminating the need to worry about DMs preventing reconnection.

[0092] Thus, by receiving the disconnection task information sent by the background server in response to the second query request, and sending a disconnection message to the network device indicated by the disconnection task information according to the disconnection task information, the network device disconnects the communication connection with the terminal device indicated by the disconnection message, so that the terminal device re-initiates a communication connection with the network device, thereby actively refreshing the network permissions of the terminal device, and the network permission switching is imperceptible to the user. When the network permissions of the target user change, the network no longer passively waits for the target user to reconnect to take effect the latest network permissions, but the network actively updates the network permissions of the target user.

[0093] In some feasible implementations, after step 330, the authentication server may further send the disconnection result to the background server when receiving the disconnection result sent by the network device in response to the disconnection message.

[0094] Among them, the disconnection result is used to indicate whether the network device and the terminal device have successfully disconnected the communication connection. When the disconnection result indicates that the network device and the terminal device have successfully disconnected the communication connection, the background server stops sending the disconnection task information to the authentication server; when the disconnection result indicates that the network device and the terminal device have not successfully disconnected the communication connection, the background server continues to send the disconnection task information to the authentication server until the preset number of transmissions is reached or the network device and the terminal device successfully disconnect the communication connection.

[0095] Here, the authentication server may also receive a disconnection result sent by the network device in response to the disconnection message. In response to the disconnection message, the network device disconnects the terminal device from the network device, obtaining a disconnection result. This disconnection result indicates whether the network device and the terminal device have successfully disconnected. The network device then transmits this disconnection result back to the authentication server via an interface.

[0096] For example, the disconnection result may be represented by an ACK (Acknowledge character) or a NAK (Negative Acknowledgment) + an error code.

[0097] After receiving the disconnection result sent by the network device, the authentication server forwards the disconnection result to the backend server. After receiving the disconnection result, if the disconnection result indicates that the network device and the terminal device have successfully disconnected the communication connection, the backend server stops sending the disconnection task information to the authentication server. If the disconnection result indicates that the network device and the terminal device have not successfully disconnected the communication connection, the backend server continues to send the disconnection task information to the authentication server until the preset number of transmissions is reached or the network device and the terminal device successfully disconnect the communication connection.

[0098] Exemplarily, the preset number of sending times can be 3 times. When the number of times the disconnection task information is sent to the authentication server reaches 3 times, regardless of whether the disconnection result indicating that the network device and the terminal device have successfully disconnected the communication connection is received, the background server stops sending the disconnection task information to the authentication server.

[0099] Therefore, by feeding back the disconnection result to the background server, the background server can sense whether the terminal device has been disconnected, thereby ensuring that the network permissions of the terminal device can be refreshed in time when the network permissions of the terminal device change.

[0100] Figure 4 is a flow chart of a network authentication method according to another exemplary embodiment. As shown in Figure 4, the network authentication method provided by the embodiment of the present disclosure can be applied to the backend server 40 shown in Figure 1. As shown in Figure 4, the network authentication method can include the following steps.

[0101] In step 410, a first query request sent by an authentication server is received, wherein the first query request is sent by the authentication server in response to an authentication request sent by a network device, and the authentication request is sent by the network device to the authentication server in response to a communication request sent by a terminal device to the network device, and the communication request is used to request to establish a communication connection with the network device, and the authentication request includes the first user credentials of the target user corresponding to the terminal device.

[0102] Here, the backend server receives a first query request sent by the authentication server, requesting the second user credentials and network permission information of the target user. The terminal device may send a communication request to the network device to request establishment of a communication connection, the communication request including the first user credentials of the target user. In response to the communication request, the network device sends an authentication request to the authentication server, the authentication request including the first user credentials of the target user. Furthermore, the authentication server sends the first query request to the backend server in response to the authentication request.

[0103] In step 420 , in response to the first query request, a second user credential and network permission information of the target user are determined.

[0104] Here, the backend server responds to the first query request and determines the second user credential and network permission information of the target user according to the information carried in the first query request.

[0105] In step 430, the second user credential and the network permission information are sent to the authentication server, wherein the second user credential is used to enable the authentication server to obtain an authentication result based on the first user credential and the second user credential, and when the authentication result indicates that the authentication is passed, the authentication result and the network permission information are sent to the network device, and the authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device based on the network permission information.

[0106] Here, after the backend server determines the second user credential and network permission information of the target user, it sends the second user credential and network permission information to the authentication server. The second user credential is used to enable the authentication server to obtain an authentication result based on the first user credential and the second user credential, and if the authentication result indicates that the authentication is successful, the authentication server sends the authentication result and network permission information to the network device, and the authentication result is used to enable the network device to establish a communication connection with the terminal device based on the network permission information.

[0107] Among them, the authentication server can obtain the authentication result by comparing the user name and password in the first user credential and the second user credential to see if they are consistent. In the case that the user name and password are consistent, it indicates that the authentication is successful. In the case that the user name and password are inconsistent, it indicates that the authentication is unsuccessful. In the case that the authentication result obtained by the authentication server indicates that the authentication is successful, the authentication server sends the authentication result indicating that the authentication is successful and the network permission information to the network device, so that the network device establishes a communication connection between the network device and the terminal device based on the network permission information. In the case that the authentication result indicates that the authentication is unsuccessful, the authentication server can send the authentication result indicating that the authentication is unsuccessful to the network device, so that the network device responds to the authentication result and denies the terminal device access to the network device.

[0108] It is worth noting that the backend server may store second user credentials of different users and corresponding network permission information. The network administrator may adjust the network permission information of the users in the backend server.

[0109] Therefore, by receiving the first query request sent by the authentication server, in response to the first query request, the second user credentials and network permission information of the target user are determined, and the second user credentials and network permission information are sent to the authentication server, so that the network device establishes a communication connection between the network device and the terminal device according to the network permission information, so that the network permission of the terminal device can be dynamically allocated according to the scenario in which the terminal device is located, and can meet the usage requirements of complex network authorization scenarios.

[0110] In some possible implementations, the first query request may include the username of the target user, the serial number of the authentication server, and the Internet Protocol address of the network device. It should be understood that the information carried in the first query request has been described in detail in the above embodiment regarding the authentication server, and will not be repeated here.

[0111] Figure 5 is a schematic diagram of a process for determining network permission information according to an exemplary embodiment. As shown in Figure 5, network permission information can be obtained through the following steps.

[0112] In step 510, the network access scenario of the terminal device is determined according to the serial number of the authentication server and the Internet Protocol address of the network device.

[0113] Here, the first query request carries the target user's username, the authentication server's serial number, and the Internet Protocol address of the network device. In response to the first query request, the backend server determines the terminal device's network access scenario based on the authentication server's serial number and the network device's Internet Protocol address. The network access scenario represents the network environment in which the terminal device resides. When the terminal device is located in different work areas, the corresponding network access scenarios will also vary due to the different network environments in those work areas.

[0114] In some embodiments, the network access scenario of the terminal device can be determined based on the mapping relationship between the serial number of the authentication server and the Internet Protocol address of the network device and different types of network access scenarios.

[0115] It is worth noting that the serial number of the authentication server can be used to distinguish different authentication servers, and different authentication servers can be deployed with different RADIUS services. The Internet Protocol address of the network device can be used to determine the type of network device.

[0116] In step 520, the network permission information is obtained according to the network access scenario and the user name of the target user.

[0117] Here, for different network access scenarios, the network resources that the network device can provide may vary. For example, network resources include VLANs, ACLs, and Roles. Based on the network access scenario, the network resources that the corresponding network device can provide can be determined, and then specific network resources can be allocated to the terminal device based on the username. For example, if the network access scenario represents a terminal device accessing the network using the virtual local area network resources provided by the network device, the backend server determines the target virtual local area network to be allocated to the target user based on the target user's username.

[0118] Therefore, through the serial number of the authentication server and the Internet Protocol address of the network device, the network access scenario of the terminal device can be accurately determined in a complex network environment, and based on the network access scenario and user name, different users in different network access scenarios can be assigned matching network permissions, thereby realizing dynamic network permission allocation based on the role attributes of the target user.

[0119] In some feasible implementations, step 520 may include: when the network access scenario represents the use of virtual LAN resources to access the network, determining the target virtual LAN assigned to the target user according to the user name of the target user, and obtaining the network permission information based on the target virtual LAN.

[0120] Here, in the case where the network access scenario represents that the terminal device uses the virtual local area network resources provided by the network device to access the network, the background server determines the target virtual local area network allocated to the target user according to the user name of the target user.

[0121] The target virtual local area network refers to a designated VLAN in a VLAN Pool (virtual local area network pool) allocated by the backend server to the terminal device.

[0122] In some embodiments, a hash value corresponding to the target user's username may be determined, and based on the hash value, a virtual local area network matching the hash value may be determined in a virtual local area network pool to obtain a target virtual local area network.

[0123] The hash value corresponding to the username can be obtained by performing a hash calculation on the username. For example, the hash value can be obtained by using the FNV hash algorithm to calculate the username. It is worth noting that a modulo operation can be performed on the hash value to convert the hash value of the username into an integer value in the range of 1-100.

[0124] The virtual local area network pool includes multiple virtual local area networks and a hash value interval range corresponding to each virtual local area network. The size of the hash value interval range corresponding to each virtual local area network is determined according to the weight of the virtual local area network in the virtual local area network pool.

[0125] For example, the VLAN pool includes VLAN1, VLAN2, and VLAN3. The weights of VLAN1, VLAN2, and VLAN3 in the VLAN pool are 1:2:2, and the range is 1-100. The hash value ranges for VLAN1, VLAN2, and VLAN3 are VLAN1 = [1, 20], VLAN2 = [21, 60], and VLAN3 = [61, 100], respectively. If the hash value corresponding to the username is 70, the target VLAN is VLAN3.

[0126] The weight of a virtual LAN in the virtual LAN pool may be determined based on the communication capability that the virtual LAN can provide. A virtual LAN with stronger communication capability has a greater weight, and the virtual LAN is allocated to terminal devices more frequently.

[0127] It's worth noting that the distribution range of the hash value corresponding to the username determines the target VLAN used by the terminal device. Because the hash algorithm is random, the mapping between the hash value corresponding to the username and the hash value range is also random, conforming to a normal distribution. As a result, each VLAN in the VLAN pool is evenly allocated, preventing overcrowding in any particular VLAN. Furthermore, because the hash value corresponding to the username is fixed, the VLAN assigned to the target user remains stable, thus preventing frequent network switching during roaming.

[0128] The backend server can construct network permission information based on the target VLAN. For example, the network permission information can be "Tunnel-Type: VLAN, Tunnel-Medium-Type: IEEE-802, Tunnel-Private-Group::100", indicating that the target user is assigned to the VLAN 100 VLAN.

[0129] Therefore, by using the serial number of the authentication server and the Internet Protocol address of the network device, the terminal device's network access scenario can be accurately determined in complex network environments. Based on the network access scenario and username, network permissions can be assigned to different users in different network access scenarios, realizing dynamic network permission allocation based on the role attributes of the target user. Furthermore, by using the aforementioned virtual LAN pool, multiple VLANs can be allocated and authorized, avoiding impacts on the existing network.

[0130] In some feasible implementations, the background server may also send disconnection task information to the authentication server in response to a second query request sent by the authentication server, wherein the disconnection task information is generated by the background server when it detects that the network permissions of the target user have changed, and the disconnection task information is used to enable the authentication server to send a disconnection message to the network device indicated by the disconnection task information according to the disconnection task information, and the disconnection message is used to notify the network device to disconnect the communication connection with the terminal device indicated by the disconnection message, so that the terminal device re-initiates a communication connection to the network device.

[0131] Here, regarding how the background server responds to the second query request sent by the authentication server and sends the disconnection task information to the authentication server and related instructions on the disconnection task information, reference can be made to the relevant description of the above embodiment and will not be repeated here.

[0132] Therefore, by sending disconnection task information, the backend server can proactively refresh the terminal device's network permissions, and the network permission switch is imperceptible to the user. When the target user's network permissions change, the network no longer passively waits for the target user to reconnect to take effect. Instead, the network actively updates the target user's network permissions.

[0133] In some feasible implementations, the background server may also receive a disconnection result sent by the authentication server, wherein the disconnection message is sent by the network device to the authentication server in response to the disconnection message, and the disconnection result is used to indicate whether the network device and the terminal device have successfully disconnected the communication connection; and in response to the disconnection result, if the disconnection result indicates that the network device and the terminal device have successfully disconnected the communication connection, the background server stops sending the disconnection task information to the authentication server, and if the disconnection result indicates that the network device and the terminal device have not successfully disconnected the communication connection, the background server continues to send the disconnection task information to the authentication server until a preset number of transmissions is reached or the network device and the terminal device successfully disconnect the communication connection.

[0134] Here, for the relevant description of the principle of sending the disconnection result and the operation performed by the background server in response to the disconnection result, reference may be made to the relevant description of the above embodiment, which will not be repeated here.

[0135] Thus, by receiving the disconnection result, the background server can sense whether the terminal device has been disconnected, thereby ensuring that the network permissions of the terminal device can be refreshed in time when the network permissions of the terminal device change.

[0136] Fig. 6 is a flow chart of a network authentication method according to another exemplary embodiment. As shown in Fig. 6 , the network authentication method includes the following steps.

[0137] S601, the terminal device sends a communication request including a first user credential to the network device;

[0138] S602, the network device receives a communication request;

[0139] S603, the network device sends an authentication request including the first user credential to the authentication server;

[0140] S604, the authentication server receives the authentication request;

[0141] S605, the authentication server sends a first query request to the backend server;

[0142] S606, the backend server receives the first query request;

[0143] S607, the backend server determines the second user credentials and network permission information;

[0144] S608, the backend server sends the second user credentials and network permission information to the authentication server;

[0145] S609, the authentication server receives the second user credential and network permission information;

[0146] S610, the authentication server obtains an authentication result according to the second user credential and the first user credential;

[0147] S611, the authentication server sends the authentication result and network permission information to the network device;

[0148] S612, the network device receives the authentication result and network permission information;

[0149] S613: The network device establishes a communication connection based on the authentication result and the network authority information.

[0150] Here, regarding the detailed execution process of the above S601 to S613, reference can be made to the relevant description of the above embodiment, which will not be repeated here.

[0151] Fig. 7 is a flow chart of a network authentication method according to another exemplary embodiment. As shown in Fig. 7 , the network authentication method includes the following steps.

[0152] S701, the backend server detects whether the target user's network permissions have changed, and generates disconnection task information if a change occurs;

[0153] S702, the authentication server sends a second query request to the backend server;

[0154] S703, the backend server receives the second query request;

[0155] S704, the backend server sends disconnection task information to the authentication server;

[0156] S705, the authentication server receives disconnection task information;

[0157] S706, the authentication server sends a disconnection message to the network device;

[0158] S707, the network device receives the disconnection message and disconnects the communication connection with the terminal device;

[0159] S708, if the terminal device detects that the communication connection is disconnected, it re-initiates the communication request;

[0160] S709, the network device sends a disconnection result to the authentication server;

[0161] S710, the authentication server receives the disconnection result;

[0162] S711, the authentication server sends a disconnection result to the backend server;

[0163] S712: The backend server receives the disconnection result.

[0164] Here, regarding the detailed execution process of the above S701 to S712, reference can be made to the relevant description of the above embodiment, which will not be repeated here. It is worth noting that if the terminal device detects that the communication connection is disconnected, re-initiating the communication request means that the terminal device re-executes the process shown in Figure 6.

[0165] FIG8 is a schematic diagram of module connections of a network authentication device according to an exemplary embodiment. As shown in FIG8 , an embodiment of the present disclosure provides a network authentication device, which is applied to an authentication server. The device 800 includes:

[0166] an acquisition module 801 configured to acquire an authentication request sent by a network device, wherein the authentication request is sent by the network device in response to a communication request sent by a terminal device, the communication request is used to request establishment of a communication connection with the network device, and the authentication request includes a first user credential of a target user corresponding to the terminal device;

[0167] A first sending module 802 is configured to send a first query request to a backend server in response to the authentication request, wherein the first query request is used to enable the backend server to determine the second user credential and network permission information of the target user;

[0168] The first receiving module 803 is configured to obtain an authentication result according to the first user credential and the second user credential upon receiving the second user credential and the network permission information of the target user sent by the backend server;

[0169] The second sending module 804 is configured to send the authentication result and the network permission information to the network device when the authentication result indicates that the authentication is passed, wherein the authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device according to the network permission information.

[0170] Optionally, the first query request includes the user name of the target user, the serial number of the authentication server, and the Internet Protocol address of the network device.

[0171] Optionally, the apparatus 800 further includes:

[0172] a fourth sending module, configured to send a second query request to the backend server, wherein the second query request is used to cause the backend server to send disconnection task information to the authentication server in response to the second query request, the disconnection task information being generated by the backend server when detecting a change in the network permissions of the target user;

[0173] The third receiving module is configured to send a disconnection message to the network device indicated by the disconnection task information according to the disconnection task information when receiving the disconnection task information sent by the background server, wherein the disconnection message is used to notify the network device to disconnect the communication connection with the terminal device indicated by the disconnection message, so that the terminal device re-initiates a communication connection to the network device.

[0174] Optionally, the apparatus 800 further includes:

[0175] a fourth receiving module, configured to receive a disconnection result sent by the network device in response to the disconnection message, wherein the disconnection result is used to indicate whether the network device and the terminal device have successfully disconnected the communication connection;

[0176] a sixth sending module, configured to, upon receiving a disconnection result sent by the network device in response to the disconnection message, send the disconnection result to the backend server;

[0177] Among them, the disconnection result is used to indicate whether the network device and the terminal device have successfully disconnected the communication connection. When the disconnection result indicates that the network device and the terminal device have successfully disconnected the communication connection, the background server stops sending the disconnection task information to the authentication server; when the disconnection result indicates that the network device and the terminal device have not successfully disconnected the communication connection, the background server continues to send the disconnection task information to the authentication server until the preset number of transmissions is reached or the network device and the terminal device successfully disconnect the communication connection.

[0178] Regarding the device 800 in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0179] FIG9 is a schematic diagram of module connections of a network authentication device according to another exemplary embodiment. As shown in FIG9 , an embodiment of the present disclosure provides a network authentication device applied to a backend server. The device 900 includes:

[0180] a second receiving module 901 configured to receive a first query request sent by an authentication server, wherein the first query request is sent by the authentication server in response to an authentication request sent by a network device, the authentication request is sent by the network device to the authentication server in response to a communication request sent by a terminal device to the network device, the communication request is used to request establishment of a communication connection with the network device, and the authentication request includes a first user credential of a target user corresponding to the terminal device;

[0181] A determination module 902 is configured to determine a second user credential and network permission information of the target user in response to the first query request;

[0182] The third sending module 903 is configured to send the second user credential and the network permission information to the authentication server, wherein the second user credential is used to enable the authentication server to obtain an authentication result based on the first user credential and the second user credential, and when the authentication result indicates that the authentication is passed, the authentication result and the network permission information are sent to the network device, and the authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device based on the network permission information.

[0183] Optionally, the first query request includes a user name of a target user, a serial number of the authentication server, and an Internet Protocol address of the network device; and the determining module 902 includes:

[0184] a scenario determination unit, configured to determine a network access scenario of the terminal device according to the serial number of the authentication server and the Internet Protocol address of the network device;

[0185] The permission determination unit is configured to obtain the network permission information according to the network access scenario and the user name of the target user.

[0186] Optionally, the authority determination unit includes:

[0187] An allocating unit is configured to determine a target virtual local area network allocated to the target user according to the user name of the target user when the network access scenario represents the use of virtual local area network resources for network access;

[0188] The permission obtaining unit is configured to obtain the network permission information based on the target virtual local area network.

[0189] Optionally, the allocation unit is specifically configured as follows:

[0190] Determine a hash value corresponding to the target user's username based on the username of the target user;

[0191] According to the hash value, a virtual local area network (VLAN) matching the hash value is determined in a virtual local area network (VLAN) pool to obtain the target VLAN, wherein the VLAN pool includes multiple VLANs and a hash value interval corresponding to each VLAN, and the size of the hash value interval corresponding to each VLAN is determined according to the weight of the VLAN in the VLAN pool.

[0192] Optionally, the apparatus 900 further includes:

[0193] The first response module is configured to send disconnection task information to the authentication server in response to the second query request sent by the authentication server, wherein the disconnection task information is generated by the background server when it detects that the network permissions of the target user have changed. The disconnection task information is used to enable the authentication server to send a disconnection message to the network device indicated by the disconnection task information according to the disconnection task information, and the disconnection message is used to notify the network device to disconnect the communication connection with the terminal device indicated by the disconnection message, so that the terminal device re-initiates a communication connection to the network device.

[0194] Optionally, the apparatus 900 further includes:

[0195] a fifth receiving module, configured to receive a disconnection result sent by the authentication server, wherein the disconnection message is sent by the network device to the authentication server in response to the disconnection message, and the disconnection result is used to indicate whether the network device and the terminal device have successfully disconnected the communication connection;

[0196] The second response module is configured to respond to the disconnection result and, if the disconnection result indicates that the network device and the terminal device have successfully disconnected the communication connection, stop sending the disconnection task information to the authentication server; and, if the disconnection result indicates that the network device and the terminal device have not successfully disconnected the communication connection, continue sending the disconnection task information to the authentication server until a preset number of transmissions is reached or the network device and the terminal device have successfully disconnected the communication connection.

[0197] Regarding the device 900 in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0198] The embodiments of the present disclosure may also provide a network authentication system, including the authentication server described in the above embodiments, the background server described in the above embodiments, and a network device, wherein the network device is communicatively connected to the authentication server, and the authentication server is communicatively connected to the background server.

[0199] Reference is now made to FIG10 , which illustrates a schematic diagram of the structure of an electronic device (e.g., the authentication server or backend server in FIG1 ) 1000 suitable for implementing an embodiment of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device illustrated in FIG10 is merely an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.

[0200] As shown in FIG10 , the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. Various programs and data required for the operation of the electronic device 1000 are also stored in the RAM 1003. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0201] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 10 illustrates the electronic device 1000 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.

[0202] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0203] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, 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. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal 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 that can transmit, propagate, or transport a program for use by or in conjunction 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 wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0204] In some embodiments, the authentication server and the backend server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0205] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0206] The computer-readable storage medium carries one or more programs, which, when executed by the electronic device, causes the electronic device to: obtain an authentication request sent by a network device, wherein the authentication request is sent by the network device in response to a communication request sent by a terminal device for requesting to establish a communication connection, and the authentication request includes a first user credential of a target user;

[0207] In response to the authentication request, sending a first query request to the backend server;

[0208] receiving a second user credential and network permission information of the target user sent by the backend server to the authentication server in response to the first query request;

[0209] Obtaining an authentication result according to the first user credential and the second user credential;

[0210] When the authentication result indicates that the authentication is passed, the authentication result and the network permission information are sent to the network device, wherein the authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device according to the network permission information.

[0211] Alternatively, the computer-readable storage medium carries one or more programs, which, when executed by the electronic device, causes the electronic device to: receive a first query request sent by an authentication server, wherein the first query request is sent by the authentication server in response to an authentication request sent by a network device, wherein the authentication request is sent by the network device in response to a communication request sent by a terminal device to the network device for requesting to establish a communication connection, and wherein the authentication request includes a first user credential of a target user;

[0212] In response to the first query request, determining a second user credential and network permission information of the target user;

[0213] Send the second user credential and the network permission information to the authentication server, wherein the second user credential is used to enable the authentication server to obtain an authentication result based on the first user credential and the second user credential, and when the authentication result indicates that the authentication is passed, send the authentication result and the network permission information to the network device, and the authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device based on the network permission information.

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

[0215] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0216] The modules described in the embodiments of the present disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the module itself.

[0217] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0218] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, 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 foregoing.

[0219] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in the present disclosure.

[0220] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0221] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.

Claims

1. A network authentication method, It is characterized in that Applied to an authentication server, the method comprises: Acquire an authentication request sent by a network device, wherein the authentication request is sent by the network device in response to a communication request sent by a terminal device, the communication request is used to request to establish a communication connection with the network device, and the authentication request includes a first user credential of a target user corresponding to the terminal device; In response to the authentication request, sending a first query request to a backend server, wherein the first query request is used to enable the backend server to determine a second user credential and network permission information of the target user; Upon receiving the second user credential and network permission information of the target user sent by the backend server, obtaining an authentication result according to the first user credential and the second user credential; In a case where the authentication result indicates that the authentication is passed, the authentication result and the network permission information are sent to the network device, wherein the authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device according to the network permission information.

2. The method according to claim 1, It is characterized in that The first query request includes the user name of the target user, the serial number of the authentication server, and the Internet Protocol address of the network device.

3. The method according to claim 1, It is characterized in that The method further comprises: Sending a second query request to the backend server, wherein the second query request is used to cause the backend server to send disconnection task information to the authentication server in response to the second query request, and the disconnection task information is generated by the backend server when detecting that the network authority of the target user has changed; Upon receiving the disconnection task information sent by the background server, a disconnection message is sent to the network device indicated by the disconnection task information according to the disconnection task information, wherein the disconnection message is used to notify the network device to disconnect the communication connection with the terminal device indicated by the disconnection message, so that the terminal device re-initiates a communication connection to the network device.

4. The method according to claim 3, It is characterized in that After sending a disconnection message to the network device indicated by the disconnection task information according to the disconnection task information, the method further includes: When receiving a disconnection result sent by the network device in response to the disconnection message, sending the disconnection result to the background server; Among them, the disconnection result is used to indicate whether the network device and the terminal device have successfully disconnected the communication connection. When the disconnection result indicates that the network device and the terminal device have successfully disconnected the communication connection, the background server stops sending the disconnection task information to the authentication server; when the disconnection result indicates that the network device and the terminal device have not successfully disconnected the communication connection, the background server continues to send the disconnection task information to the authentication server until a preset number of transmissions is reached or the network device and the terminal device successfully disconnect the communication connection.

5. A network authentication method, It is characterized in that Applied to a backend server, the method comprises: receiving a first query request sent by an authentication server, wherein the first query request is sent by the authentication server in response to an authentication request sent by a network device, the authentication request is sent by the network device to the authentication server in response to a communication request sent by a terminal device to the network device, the communication request is used to request to establish a communication connection with the network device, and the authentication request includes a first user credential of a target user corresponding to the terminal device; In response to the first query request, determining a second user credential and network permission information of the target user; sending the second user credential and the network permission information to the authentication server, wherein the second user credential is used to enable the authentication server to obtain the authentication information according to the first user credential and the second user credential. The authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device according to the network permission information.

6. The method according to claim 5, It is characterized in that The first query request includes a user name of a target user, a serial number of the authentication server, and an Internet Protocol address of the network device; In response to the first query request, determining the network permission information of the target user includes: Determining a network access scenario of the terminal device according to the serial number of the authentication server and the Internet Protocol address of the network device; The network permission information is obtained according to the network access scenario and the user name of the target user.

7. The method according to claim 6, It is characterized in that The obtaining of the network permission information according to the network access scenario and the user name of the target user includes: In the case where the network access scenario represents the use of virtual local area network resources for network access, determining a target virtual local area network allocated to the target user according to the user name of the target user; Based on the target virtual local area network, the network permission information is obtained.

8. The method according to claim 7, It is characterized in that The step of determining a target virtual local area network assigned to the target user according to the user name of the target user comprises: According to the user name of the target user, determining a hash value corresponding to the user name; According to the hash value, a virtual LAN matching the hash value is determined in a virtual LAN pool to obtain the target virtual LAN, wherein the virtual LAN pool includes multiple virtual LANs and a hash value interval corresponding to each virtual LAN, and the size of the hash value interval corresponding to each virtual LAN is determined according to the weight of the virtual LAN in the virtual LAN pool.

9. The method according to claim 5, It is characterized in that The method further comprises: In response to a second query request sent by the authentication server, disconnection task information is sent to the authentication server, wherein the disconnection task information is generated by the background server when it is detected that the network permissions of the target user have changed, and the disconnection task information is used to enable the authentication server to send a disconnection message to the network device indicated by the disconnection task information according to the disconnection task information, and the disconnection message is used to notify the network device to disconnect the communication connection with the terminal device indicated by the disconnection message, so that the terminal device re-initiates a communication connection with the network device.

10. The method according to claim 9, It is characterized in that The method further comprises: Receiving a disconnection result sent by the authentication server, wherein the disconnection message is sent by the network device to the authentication server in response to the disconnection message, and the disconnection result is used to indicate whether the network device and the terminal device have successfully disconnected the communication connection; In response to the disconnection result, when the disconnection result indicates that the network device and the terminal device have successfully disconnected the communication connection, stop sending the disconnection task information to the authentication server; and when the disconnection result indicates that the network device and the terminal device have not successfully disconnected the communication connection, continue to send the disconnection task information to the authentication server until a preset number of transmissions is reached or the network device and the terminal device successfully disconnect the communication connection.

11. A network authentication device, It is characterized in that Applied to an authentication server, the device comprises: an acquisition module, configured to acquire an authentication request sent by a network device, wherein the authentication request is sent by the network device in response to a communication request sent by a terminal device, and the communication request is used to request communication with the network device; Establishing a communication connection, the authentication request including a first user credential of a target user corresponding to the terminal device; A first sending module is configured to send a first query request to a backend server in response to the authentication request, wherein the first query request is used to enable the backend server to determine a second user credential and network permission information of the target user; A first receiving module is configured to obtain an authentication result according to the first user credential and the second user credential when receiving the second user credential and the network permission information of the target user sent by the backend server; The second sending module is configured to send the authentication result and the network permission information to the network device when the authentication result indicates that the authentication is passed, wherein the authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device according to the network permission information.

12. A network authentication device, It is characterized in that Applied to a backend server, the device comprises: a second receiving module, configured to receive a first query request sent by an authentication server, wherein the first query request is sent by the authentication server in response to an authentication request sent by a network device, the authentication request is sent by the network device to the authentication server in response to a communication request sent by a terminal device to the network device, the communication request is used to request to establish a communication connection with the network device, and the authentication request includes a first user credential of a target user corresponding to the terminal device; a determination module, configured to determine a second user credential and network permission information of the target user in response to the first query request; The third sending module is configured to send the second user credential and the network permission information to the authentication server, wherein the second user credential is used to enable the authentication server to obtain an authentication result based on the first user credential and the second user credential, and when the authentication result indicates that the authentication is passed, send the authentication result and the network permission information to the network device, and the authentication result is used to enable the network device to establish a communication connection between the network device and the terminal device based on the network permission information.

13. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processing device, the program implements the steps of the method described in any one of claims 1 to 4, or implements the steps of the method described in any one of claims 5 to 10.

14. An electronic device, It is characterized in that include: a storage device having a computer program stored thereon; A processing device, used to execute the computer program in the storage device to implement the steps of the method described in any one of claims 1 to 4, or to implement the steps of the method described in any one of claims 5 to 10.

Citation Information

Patent Citations

  • Method, apparatus and device for granting terminal network permission

    CN109391601A

  • Authentication method and device

    CN110198540A

  • Network access terminal access verification method and device, storage medium and electronic equipment

    CN110912938A

  • Network authentication method and device, storage medium and electronic equipment

    CN116827586A

  • Multi-factor user authentication for network access

    US20200382485A1

Cited By

  • Conference security for user groups

    US20260012458A1