| CPC H04W 72/56 (2023.01) [H04W 48/16 (2013.01)] | 19 Claims |

|
1. A network device role self-adaptive method, comprising:
receiving, by a first network device, a second start frame sent by a neighbor network device, where the second start frame comprises a priority of the neighbor network device, and the priority of the neighbor network device is determined by the neighbor network device according to information comprising a result of connection between the neighbor network device and a server;
determining, by the first network device, whether a priority of the first network device and the priority of the neighbor network devices satisfy a preset condition, wherein the priority of the first network device is determined by the first network device according to information comprising a result of connection between the first network device and the server, and the preset condition comprises the priority of the first network device being a non-initial level and the priority of the neighbor network device being a non-initial level; and
determining, by the first network device, a role of the first network device as an authentication access controller in response to the preset condition being satisfied and the priority of the first network device being higher than the priority of the neighbor network device;
determining, by the first network device, a role of the first network device as a request device in response to the preset condition being satisfied and the priority of the first network device being lower than the priority of the neighbor network device;
wherein the determining the priority of the first network device comprises:
sending a first discovery message to the server by the first network device;
repeatedly sending the first discovery message to the server in response to the first network device not receiving, within a preset time, a first response message sent by the server;
setting the priority of the first network device to highest priority by the first network device in response to the first network device receiving, within the preset time, the first response message sent by the server.
|