Local area network AP ad hoc network recovery method and storage medium

By introducing AC campaign and merger mechanisms on the basis of AP ad hoc networking, the flexibility and compatibility problems of traditional AC+AP networking systems are solved, and unified management of AP devices of different manufacturers and efficient network expansion are achieved.

CN119697138APending Publication Date: 2025-03-25SHENZHEN NETIS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411818701.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The traditional AC+AP networking system has a fixed architecture that limits the flexibility and scalability of the network. Due to the limitations of private protocols, AP devices of different manufacturers are difficult to manage in the same local area network, resulting in increased network management complexity and cost.

Method used

By introducing AC campaign mechanism and AC merging mechanism based on AP ad hoc network, the number of ACs will be automatically optimized, the compatibility and flexibility of the LAN will be ensured, and the convenience of equipment management will be improved.

Benefits of technology

It realizes compatibility and management of AP devices of different manufacturers, improves network scalability and management efficiency, reduces the cost of users to deploy wireless networks, and solves the problems of confusion in wireless resource division and conflict in resource use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697138A_ABST
    Figure CN119697138A_ABST
Patent Text Reader

Abstract

The invention discloses a local area network AP ad-hoc network recovery method, which is used for a central switch-access layer switch-AP complex network architecture, and comprises the following steps: when a central switch is disconnected and the access layer switches are normal, for a plurality of APs under each access layer switch, through AC election, according to equipment parameter integral comparison of each AP, obtaining a plurality of APs under each access layer switch; determining the AP with the maximum equipment parameter integral as the AC in the local area network managed by the switch of the access layer; and after the central switch is recovered, the ACs in the local area network managed by the access layer switches are merged and recovered into one AC managing all the APs in the local area network managed by the central switch. Mainly for the change condition of a complex network architecture, in the process of connection-disconnection-re-recovery of the central switch, all APs under the whole network architecture can be ensured to be in a managed state through respective AC election mechanisms and AC merging mechanisms of different interlayer networks, so that the compatibility and flexibility of the network are ensured, and the reliability of the network is improved. And the convenience of network management by the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of local area network communication, and in particular to a local area network AP self-organizing network recovery method and a storage medium. Background Art

[0002] In the field of modern wireless network communications, wireless local area network (WLAN) has become an indispensable part of enterprises and home users. Among them, the AC (Access Controller) + AP (Access Point) networking system is one of the mainstream architectures for building WLAN. In this architecture, the AC, as the core management node of the network, is responsible for controlling and managing all APs in the local area network to achieve wireless signal coverage and network user access. The AP, as the transmitter of the wireless signal, is responsible for transmitting the wireless network signal to the end user device.

[0003] However, the traditional AC+AP networking system has some significant limitations. First, the roles of AC and AP are fixed at the factory, which means that the functions and roles of AC and AP cannot be dynamically adjusted according to the actual needs of the network. This fixed architecture limits the flexibility and scalability of the network, making it difficult for network managers to respond and adapt quickly when faced with changes in the network environment or adjustments in business needs.

[0004] Secondly, ACs and APs usually communicate using private control protocols defined by various manufacturers. Although these private protocols can meet the communication needs between devices of a specific manufacturer, they limit the interoperability between devices of different manufacturers. In actual applications, users may need to connect AP devices from different manufacturers to the existing network to meet specific business needs or cost considerations. However, due to the existence of private protocols, these AP devices from different manufacturers are often unable to be effectively managed and controlled by the existing AC, resulting in increased complexity and cost of network management.

[0005] In addition, when users purchase AP devices from different manufacturers than the AC, there is a problem of being unable to manage. This not only affects the user experience, but also limits the scalability and flexibility of the wireless network. Users have to face the problem of device compatibility, and cannot fully utilize the advantages of devices from different manufacturers, nor can they achieve the optimal configuration and performance of network devices. Therefore, users need a more flexible, open and intelligent networking solution to achieve compatibility and management of devices from different manufacturers and improve the scalability and management efficiency of the network. Summary of the invention

[0006] In view of the above problems in the above-mentioned prior art, the present invention provides a local area network AP self-organizing network recovery method. Based on the AP self-organizing network, in the face of network changes in a complex network architecture environment, the number of ACs is automatically optimized through further AC election mechanism and AC merging mechanism, thereby ensuring the compatibility and flexibility of the local area network and improving the convenience of equipment management.

[0007] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0008] A method for recovering a local area network AP ad hoc network, wherein the local area network includes a central switch, multiple access layer switches hanging under the central switch, and multiple APs respectively connected to each access layer switch, wherein the multiple APs come from different manufacturers; the method includes the following steps:

[0009] S100, when the central switch is disconnected and the access layer switch is normal, for multiple APs under each access layer switch, through AC election, according to the comparison of device parameter scores of each AP, the AP with the largest device parameter score is determined as the AC in the local area network managed by the access layer switch;

[0010] S200: When the central switch is restored, the ACs in the LAN managed by the access layer switches are combined and restored into one AC that manages all APs in the LAN managed by the central switch.

[0011] S210, any AC receives an AC declaration message broadcast by other ACs;

[0012] S220, the current AC determines whether to give up its AC identity based on its own device parameter information;

[0013] S230: If yes, the current AC switches to the AP identity, disconnects the AP connected to it, and makes the AC switched to the AP identity and the corresponding AP connect to other ACs; otherwise, the AC identity of the current AC is retained.

[0014] Specifically, the AC election process in step S100 includes:

[0015] S101, any AP under an access layer switch sends a campaign message containing its own device parameter information to the local area network managed by the access layer switch;

[0016] S102, after receiving the election message, other APs in the local area network managed by the access layer switch select to randomly sleep for a first waiting time, and then respond to the corresponding election message;

[0017] S103, after receiving the election message sent by other APs, any AP in the local area network managed by the access layer switch extracts the device parameter information of the corresponding AP, calculates the device parameter integral, and then compares it with its own device parameter integral. If its own device parameter integral is the largest, the AP is used as a candidate AC of the local area network and sends the election message twice in succession with the second waiting time as an interval; wherein the second waiting time is greater than the first waiting time;

[0018] S104: After sending election messages twice in succession, if the candidate AC of the local area network still does not receive an election message with a device parameter score greater than its own, the candidate AC is elected successfully and is determined to be the AC in the local area network.

[0019] Specifically, the device parameter information in the campaign message includes at least a command code, a device MAC address, a device IP address, a device gateway address, a protocol version number, and a total memory size of the device.

[0020] Specifically, the device parameter integral is calculated by taking N times the value of the protocol version number plus the value of the total memory size of the device, where N is a fixed parameter.

[0021] Specifically, when at least two APs are comparing device parameter points, if the device parameter points are the same, the device sub-item parameter points are compared;

[0022] The device sub-parameter integral is calculated as follows: the value of the last 2 bytes of the device MAC address plus the value of the lower 2 bytes of the device IP address.

[0023] Furthermore, the step S100 further includes:

[0024] S110, after the AC election in the local area network managed by the access layer switch is determined, other APs in the local area network are connected to the AC, and these APs are managed and controlled through the AC;

[0025] S120, after determining the AC in the local area network, the AC broadcasts an AC declaration message to the local area network once every third waiting time;

[0026] When the AP monitors the AC declaration message, it sends an AC request message according to the information in the AC declaration message; after receiving the AC request message, the AC responds with an AC response message to implement AC verification.

[0027] Specifically, the device parameter information in the AC declaration message in step S200 includes at least the AC networking configuration code and the connected client count, wherein:

[0028] The AC networking configuration code represents a random code of the local area network where the AC is located, which is allocated by the corresponding AC when it is in the AP identity, and is allocated to the AP to which it is connected when it is in the AC identity;

[0029] The connected client count is the number of all APs connected to the AC.

[0030] Specifically, in step S220, the process in which the current AC determines whether to give up its AC identity based on its own device parameter information includes:

[0031] S221. The current AC determines whether different ACs belong to the same network based on the AC networking configuration code comparison. If the AC networking configuration codes of different ACs are the same, they belong to the same network and the next step is executed. Otherwise, the process ends.

[0032] S222: Determine the size of the connected client count, retain the AC identity of the AC with the largest connected client count, and discard the AC identities of other ACs;

[0033] S223. If the connected client counts are the same, determine the device parameter integrals of the ACs, retain the AC identity of the AC with the largest device parameter integral, and discard the AC identities of other ACs.

[0034] Furthermore, the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned local area network AP self-organizing network recovery method are implemented.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] The present invention is based on a design scheme that negotiates a new AC between AP devices of different manufacturers to independently manage these AP devices. It mainly faces the changes in complex network architecture. In the process of connecting-disconnecting-restoring the central switch, through the respective AC election mechanism and AC merging mechanism of different inter-layer networks, it is ensured that all APs under the overall network architecture can be in a managed state, which not only ensures the compatibility and flexibility of the network, but also improves the convenience of network management for users, further realizes the self-management and self-configuration of AP devices, reduces the cost of users deploying wireless networks, and solves the problems of chaotic wireless resource division and resource use conflicts. The implementation of the present invention will bring revolutionary changes to the construction and management of wireless networks, provide users with more efficient, reliable and convenient wireless network services, and has important practical value and market prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a schematic diagram of the overall process of an embodiment of the present invention.

[0038] Figure 2 It is a schematic diagram of the process of AC election in an embodiment of the present invention.

[0039] Figure 3 It is a schematic diagram of the AC connection process in an embodiment of the present invention.

[0040] Figure 4 The figure is a flow chart of AC merging and recovery in an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The present invention is further described below in conjunction with the accompanying drawings and examples. The embodiments of the present invention include but are not limited to the following examples.

[0042] Example

[0043] like Figures 1 to 4 As shown, the LAN AP self-organizing network recovery method is applied to a complex LAN architecture environment, wherein the LAN includes a central switch, multiple access layer switches hanging under the central switch, and multiple APs respectively connected to each access layer switch, and the multiple APs are from different manufacturers. Under normal circumstances, due to the different private control protocols defined by different manufacturers, it is difficult to uniformly manage APs from different manufacturers in the same LAN environment. In the face of this situation, the basic scheme AP self-organizing network mechanism designed by the present invention can better realize the unified management of AP devices from different manufacturers in the same LAN. Due to the problem of private protocol limitations of different manufacturers in the prior art, the basic scheme AP self-organizing network mechanism of the present invention is usually integrated or installed in the AP device of the corresponding manufacturer in the form of a plug-in module.

[0044] The basic process of the LAN AP self-organizing method is as follows:

[0045] A. After all different APs are connected to the same LAN, all APs will compete for AC. Based on the comparison of the device parameter scores of each AP, the AP with the largest device parameter score will be determined as the AC in this LAN.

[0046] B. After the AC election in the LAN is determined, other APs are connected to the AC and these APs are managed and controlled through the AC.

[0047] The data message agreement is as follows: campaign data uses UDP, a fixed password, and AES encryption; AP connects to AC using TCP, with RSA negotiated passwords and AES encryption.

[0048] Specifically, when all APs are running for AC election, any AP sends a campaign message containing its own device parameter information to the local area network. The device parameter information in the campaign message includes at least the command code, device MAC address, device IP address, device gateway address, protocol version number, and device total memory size. After receiving the campaign message, other APAPs choose to randomly sleep for the first waiting time (such as 1-251ms), and then respond to the corresponding campaign message. After receiving the campaign message sent by other APs, any AP extracts the device parameter information of the corresponding AP, calculates the device parameter integral, and then compares it with its own device parameter integral. If its own device parameter integral is the largest, the AP is used as a candidate AC and sends the campaign message twice in a row with the second waiting time as the interval; wherein the second waiting time is greater than the first waiting time, generally about 1s. When the candidate AC has sent the campaign message twice in a row, if it still does not receive a campaign message with a larger device parameter integral than itself, the candidate AC is successful in the election and is determined to be the AC in this local area network, and it switches to AC mode. Other APs enter the AC connection process.

[0049] The device parameter integral is calculated as follows: N times the value of the protocol version number plus the value of the total device memory size, where N is a fixed parameter, usually much larger than the value of the total device memory size, such as 100000. The total device memory size is usually recorded in MB, and its value is 256, 512, 1024, etc., so as to ensure that the protocol version number is the first choice, and a higher version may be able to manage more configuration parameters. The second choice is the total device memory size, and more memory may represent higher device performance. When no less than two APs are compared for device parameter integral, if the device parameter integral is the same, the device sub-item parameter integral is compared; the device sub-item parameter integral is calculated as follows: the value of the last 2 bytes of the device MAC address < 16 plus the value of the lower 2 bytes of the device IP address. For example, (0x4455<<16)|0x0103.

[0050] In the aforementioned complex LAN architecture environment, under normal circumstances, once the central switch is disconnected (such as power failure or failure), the entire LAN will collapse. Based on the aforementioned AP self-organizing mechanism of the present invention, if the central switch is disconnected, but the access layer switch is normal, the APs connected to each access layer switch can re-election through the AC to elect a new AC to manage other APs under the corresponding access layer switch.

[0051] At this time, according to step S100 of the present invention, the following is achieved:

[0052] S100, when the central switch is disconnected and the access layer switch is normal, for multiple APs under each access layer switch, through AC election, according to the comparison of device parameter scores of each AP, the AP with the largest device parameter score is determined as the AC in the local area network managed by the access layer switch.

[0053] The AC election process refers to the above process, which specifically includes:

[0054] S101. Any AP under an access layer switch sends a campaign message containing its own device parameter information to a local area network managed by the access layer switch.

[0055] S102: After receiving the election message, other APs in the local area network managed by the access layer switch select to randomly sleep for a first waiting time and then respond to the corresponding election message.

[0056] S103. After receiving a campaign message sent by other APs, any AP in the local area network managed by the access layer switch extracts the device parameter information of the corresponding AP, calculates the device parameter integral, and then compares it with its own device parameter integral. If its own device parameter integral is the largest, the AP serves as a candidate AC of the local area network and sends the campaign message twice in a row with the second waiting time as an interval; wherein the second waiting time is greater than the first waiting time.

[0057] S104: After sending election messages twice in succession, if the candidate AC of the local area network still does not receive an election message with a device parameter score greater than its own, the candidate AC is elected successfully and is determined to be the AC in the local area network.

[0058] Further, S110, after the AC election in the local area network managed by the access layer switch is determined, other APs in the local area network are connected to the AC, and these APs are managed and controlled through the AC.

[0059] S120: After determining the AC in the local area network, the AC broadcasts an AC declaration message to the local area network once every third waiting time. The third waiting time may be 2 seconds.

[0060] When the AP monitors the AC declaration message, it sends an AC request message according to the information in the AC declaration message; after receiving the AC request message, the AC responds with an AC response message to implement AC verification.

[0061] At this time, there is an AC under each normal access layer switch, and there are multiple ACs for the entire LAN where the central switch is located.

[0062] When the central switch is restored, multiple ACs are not convenient for the management of the entire LAN. In this case, these ACs need to be restored to one AC, that is:

[0063] S200: When the central switch is restored, the ACs in the LAN managed by the access layer switches are combined and restored into one AC that manages all APs in the LAN managed by the central switch.

[0064] S210. Any AC receives an AC declaration message broadcast by another AC; wherein the device parameter information in the AC declaration message includes at least an AC networking configuration code and a connected client count. The AC networking configuration code represents a random code of the local area network where the AC is located, which is allocated by the corresponding AC when it is in the AP identity, and is allocated to the AP to which it is connected when it is in the AC identity; the connected client count is the number of all APs connected to the AC.

[0065] S220: The current AC determines whether to give up its AC identity based on the comparison of its own device parameter information. The specific process includes:

[0066] S221. The current AC determines whether different ACs belong to the same network based on the AC networking configuration code comparison. If the AC networking configuration codes of different ACs are the same, they belong to the same network and the next step is executed. Otherwise, the process ends.

[0067] S222: Determine the size of the connected client count, retain the AC identity of the AC with the largest connected client count, and discard the AC identities of other ACs;

[0068] S223. If the connected client counts are the same, determine the device parameter integrals of the ACs, retain the AC identity of the AC with the largest device parameter integral, and discard the AC identities of other ACs.

[0069] S230. If so, the current AC switches to the AP identity, disconnects the AP to which it is connected, and enables the AC switched to the AP identity and the corresponding AP to connect to other ACs, that is, enters the AC verification process and the AC connection process; otherwise, the AC identity of the current AC is retained, and other ACs and corresponding APs that abandon the AC identity enter the AC verification process and the AC connection process.

[0070] In another embodiment, the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned LAN AP self-organizing network recovery method are implemented.

[0071] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, - but not limited to - electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive lists) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory FLASH), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0072] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0073] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0074] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including 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 separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via 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., via the Internet using an Internet service provider).

[0075] The following is a detailed description with examples and message contents.

[0076] Assume that there is a central switch A in the LAN, with 5 access layer switches BCDEF connected to it, and 5 APs under each access layer switch. Under normal circumstances, all APs will elect an AC after an AC election, and all other APs will be controlled by the AC.

[0077] Contents of the campaign message:

[0078] {"cmd":"ac_bid","mac":"00:11:22:33:44:55","ip":"192.168.1.3","gw":"192.168.1.254","proto_version":1,"total_mem":256,"version":"1 .0.1","product":"NAP830","score":100256,"sub_score":100,"is_ac":0,"configed":0,"ac_magic":"12345678","client_cnt":0,"my_seq":100}

[0079] Among them, cmd is the command code. All messages contain this field, which is used to distinguish the commands of the received messages; mac indicates the device MAC address; ip indicates the device IP address; gw indicates the device gateway address; proto_version indicates the protocol version number; total_mem indicates the total memory size of the device; version indicates the device system version; product indicates the device model; configed indicates whether the current device has been configured; ac_magic indicates the random value information of the current device, which is randomly generated after startup and will be unified to be the same as AC after networking; client_cnt indicates the client count; my_seq indicates the system startup time uptime value, which is used to avoid replay attacks in the network and is monotonically increasing. When responding to a message, my_seq is the local seq and your_seq is the my_seq of the received message.

[0080] After an AP becomes an AC in election, it sends AC declaration messages every 2 seconds.

[0081] AC declaration message:

[0082] {"cmd":"ac_announce","mac":"00:11:22:33:44:55","ip":"192.168.1.3","gw":"192.168.1.254","proto_version":1,"total_mem":256,"version": "1.0.1","product":"NAP830","score":100256,"sub_score":100,"is_ac":1,"configed":0,"ac_magic":"12345678","client_cnt":0,"my_seq":100}

[0083] Except for the command code, for the sake of simplicity, other keywords that need to be sent are the same as those in the election message.

[0084] Verify AC server process:

[0085] The AP monitors for 5 seconds and sends an AC request message based on the monitored AC.

[0086] The AC responds with a corresponding message.

[0087] The AC request message can be as follows:

[0088] {"cmd":"ac_request","mac":"00:11:22:33:44:55","ip":"192.168.1.3","gw":"192.168.1.254","proto_version":1,"total_mem":256,"version": "1.0.1","product":"NAP830","score":100256,"sub_score":100,"is_ac":1,"configed":0,"ac_magic":"12345678","client_cnt":0,"my_seq":100}

[0089] The AC response message can be as follows:

[0090] {"cmd":"ac_response","mac":"00:11:22:33:44:55","ip":"192.168.1.3","gw":"192.168.1.254","proto_version":1,"total_mem":256,"version":"1.0.1" ,"product":"NAP830","score":100256,"sub_score":100,"is_ac":1,"configed":0,"ac_magic":"12345678","client_cnt":0,"my_seq":100,"you_seq":100}

[0091] The value of you_seq is equal to the value of my_seq in the AC request message, which enhances security.

[0092] The process of connecting other APs to the AC includes:

[0093] S21. The AP sends a connection request to the AC.

[0094] The AP connection request message can be as follows:

[0095] {"cmd":"ac_connect'","mac":"00:11:22:33:44:55","ip":"192.168.1.3","gw":"192.168.1.254","proto_version":1,"total_mem":256,"version": "1.0.1","product":"NAP830","score":100256,"sub_score":100,"is_ac":1,"configed":0,"ac_magic":"12345678","client_cnt":0,"my_seq":100}

[0096] S22. AC issues the RSA public key.

[0097] The AC RSA public key message can be as follows:

[0098] {"cmd":"ac_rsa","rsa":"xxxxxxxxxxx","your_seq":100}

[0099] Among them, AP needs to verify your_seq.

[0100] S23. The AP generates an AES password and encrypts the message using the RSA public key.

[0101] The AP AES cipher message can be as follows:

[0102] {"cmd":"ac_pwd","pwd":"0123456789123456","my_seq":101}

[0103] Among them, pwd is a random password generated by the AP and used for subsequent AES encryption. Its length is 16. The message is encrypted with the received RSA public key of the AC and sent.

[0104] S24. The AC decrypts the message to obtain the AP's AES password.

[0105] S25. AP sends a hello keepalive message.

[0106] The hello keepalive message from AP to AC can be as follows:

[0107] {"cmd":"ac_hello","my_seq":102,"md5":"1234567890123456"}

[0108] Among them, starting from this message, all subsequent messages are encrypted using AES128CBC encryption mode; md5 indicates the AP parameter file md5. The AC can use md5 to know whether the AP's parameters are the same as its own.

[0109] S26. The AC responds with a hello keepalive message and sends the AP configuration file.

[0110] The hello keepalive message from AC to AP can be as follows:

[0111] {"cmd":"ac_hello","my_seq":101,"your_seq":102}

[0112] Among them, AP needs to verify your_seq.

[0113] When the AC parameter md5 is different from the AP, ac_para is sent, for example:

[0114] {"cmd":"ac_para","data":"xxxxxxxxxxxx","my_seq":102,"md5":"1234567890123456"}

[0115] After receiving the parameters, the AP applies the parameters to achieve the purpose of synchronizing the AC parameter configuration with the AP.

[0116] S27. The AP applies the configuration file and reports the WIFI parameter information to the AC.

[0117] When some data of the AP changes, it can actively report the information to the AC, such as parameter information such as the current WIFI channel.

[0118] The information message that the AP actively reports to the AC can be as follows:

[0119] {"cmd":"ac_upload_data","data":"xxxxxxxxx","my_seq":105}

[0120] After the AP is started, a random magic number is generated. After networking, the ac_magic of all APs is set to the magic of the AC, and only devices with the same ac_magic can be networked. The magic of the AP will be reported to the AC in an active reporting manner.

[0121] When the user enables the function of prohibiting other devices from accessing, the MAC of all currently online AP lists and the private magic of the AP will be saved. For subsequent access to the AP, the user needs to manually allow new devices to access in order to synchronize parameters. In this way, for an already stable layout point, it can prevent unfamiliar devices from accessing and obtaining parameters.

[0122] Through the above process, a new AC can be selected under each access layer switch.

[0123] When the central switch A is restored, the contents of the declaration messages received by AC from other ACs in the entire LAN can be as follows:

[0124] {"cmd":"ac_announce","mac":"00:11:22:33:44:55","ip":"192.168.1.3","gw":"192.168.1.254","proto_version":1,"total_mem":256,"version": "1.0.1","product":"NAP830","score":100256,"sub_score":100,"is_ac":1,"configed":0,"ac_magic":"12345678","client_cnt":5,"my_seq":100}

[0125] When an AC receives a declaration message from another AC, it first checks whether it and the other party belong to the same network based on ac_magic. If the items are the same, they belong to the same network.

[0126] Then, the client_cnt value (indicating the number of APs currently connected to the AC) is compared. The one with the largest value succeeds in the election and maintains its AC identity. Other ACs give up their AC identities.

[0127] If the client_cnt values ​​are the same, the device parameter score and the device sub-item parameter sub_score values ​​are compared in turn. The one with the largest value wins the election and maintains its AC identity. Other ACs give up their AC identities.

[0128] When an AC gives up its AC identity, it disconnects all APs connected to it, and these APs automatically connect to other ACs.

[0129] Finally, the five ACs are merged into one AC to manage all APs in the LAN to which the central switch belongs.

[0130] The above embodiments are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any changes made by adopting the design principles of the present invention and performing non-creative work on this basis should fall within the protection scope of the present invention.

Claims

1. A local area network AP self-organizing network recovery method, characterized in that: The local area network includes a central switch, multiple access layer switches hanging under the central switch, and multiple APs respectively connected to each access layer switch, and the multiple APs are from different manufacturers; The method comprises the following steps: S100, when the central switch is disconnected and the access layer switch is normal, for multiple APs under each access layer switch, through AC election, according to the comparison of device parameter scores of each AP, the AP with the largest device parameter score is determined as the AC in the local area network managed by the access layer switch; S200: When the central switch is restored, the ACs in the LAN managed by the access layer switches are combined and restored into one AC that manages all APs in the LAN managed by the central switch. S210, any AC receives an AC declaration message broadcast by other ACs; S220, the current AC determines whether to give up its AC identity based on its own device parameter information; S230: If yes, the current AC switches to the AP identity, disconnects the AP connected to it, and makes the AC switched to the AP identity and the corresponding AP connect to other ACs; otherwise, the AC identity of the current AC is retained.

2. The local area network AP self-organizing network recovery method according to claim 1, characterized in that: The AC election process in step S100 includes: S101, any AP under an access layer switch sends a campaign message containing its own device parameter information to the local area network managed by the access layer switch; S102, after receiving the election message, other APs in the local area network managed by the access layer switch select to randomly sleep for a first waiting time, and then respond to the corresponding election message; S103, after receiving the election message sent by other APs, any AP in the local area network managed by the access layer switch extracts the device parameter information of the corresponding AP, calculates the device parameter integral, and then compares it with its own device parameter integral. If its own device parameter integral is the largest, the AP is used as a candidate AC of the local area network and sends the election message twice in succession with the second waiting time as an interval; wherein the second waiting time is greater than the first waiting time; S104: After sending election messages twice in succession, if the candidate AC of the local area network still does not receive an election message with a device parameter score greater than its own, the candidate AC is elected successfully and is determined to be the AC in the local area network.

3. The local area network AP self-organizing network recovery method according to claim 2, characterized in that: The device parameter information in the campaign message at least includes a command code, a device MAC address, a device IP address, a device gateway address, a protocol version number, and a total memory size of the device.

4. The local area network AP self-organizing network recovery method according to claim 3, characterized in that: The device parameter integral is calculated by taking N times the value of the protocol version number plus the value of the total memory size of the device, where N is a fixed parameter.

5. The local area network AP self-organizing network recovery method according to claim 4, characterized in that: When comparing device parameter scores of at least two APs, if the device parameter scores are the same, the scores of the device sub-item parameters are compared; The device sub-parameter integral is calculated as follows: the value of the last 2 bytes of the device MAC address plus the value of the lower 2 bytes of the device IP address.

6. The local area network AP self-organizing network recovery method according to claim 2, characterized in that: The step S100 further includes: S110, after the AC election in the local area network managed by the access layer switch is determined, other APs in the local area network are connected to the AC, and these APs are managed and controlled through the AC; S120, after determining the AC in the local area network, the AC broadcasts an AC declaration message to the local area network once every third waiting time; When the AP monitors the AC declaration message, it sends an AC request message according to the information in the AC declaration message; after receiving the AC request message, the AC responds with an AC response message to implement AC verification.

7. The local area network AP self-organizing network recovery method according to any one of claims 1 to 6, characterized in that: The device parameter information in the AC declaration message in step S200 at least includes the AC networking configuration code and the connected client count, wherein: The AC networking configuration code represents a random code of the local area network where the AC is located, which is allocated by the corresponding AC when it is in the AP identity, and is allocated to the AP to which it is connected when it is in the AC identity; The connected client count is the number of all APs connected to the AC.

8. The local area network AP self-organizing network recovery method according to claim 7, characterized in that: In step S220, the process in which the current AC determines whether to give up its AC identity based on its own device parameter information includes: S221. The current AC determines whether different ACs belong to the same network based on the AC networking configuration code comparison. If the AC networking configuration codes of different ACs are the same, they belong to the same network and the next step is executed. Otherwise, the process ends. S222: Determine the size of the connected client count, retain the AC identity of the AC with the largest connected client count, and discard the AC identities of other ACs; S223. If the connected client counts are the same, determine the device parameter integrals of the ACs, retain the AC identity of the AC with the largest device parameter integral, and discard the AC identities of other ACs.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the local area network AP self-organizing network recovery method according to any one of claims 1 to 8 are implemented.