Local area network AP ad hoc network method and storage medium
By negotiating a new AC between AP devices of different manufacturers, the problem of fixed functions and poor interoperability of traditional networking systems is solved, and the ad hoc networking and management of AP devices is realized, improving network compatibility and management efficiency of networks.
Patent Information
- Application Number
- CN202411818699.2
- 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
Traditional AC+AP networking systems have problems with fixed functions and are difficult to adjust dynamically. Private protocols limit interoperability between devices of different manufacturers, resulting in increased network management complexity and cost.
By negotiating a new AC between AP devices from different manufacturers, the ad hoc networking and management of AP devices is realized, ensuring that the selection of AC is based on device parameter points, and improving network compatibility and flexibility.
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 resource use conflicts.
Smart Images

Figure CN119697812A_ABST
Abstract
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 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 from specific manufacturers, they limit the interoperability between devices from 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 existing ACs, 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 LAN AP self-organizing network method, in which each AP negotiates an AC, so that users can use the AC to manage these APs without affecting the relationship between each AP and the original AC, thereby improving the compatibility and flexibility of the LAN.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0008] A local area network AP self-organizing method is used to configure AP devices of different manufacturers to access the same local area network, including the following steps:
[0009] S10. After all APs from different manufacturers are connected to the same LAN, all APs conduct AC election. Based on the comparison of device parameter scores of each AP, the AP with the largest device parameter score is determined as the AC in the LAN.
[0010] S20. 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.
[0011] Specifically, the process of all APs conducting AC election in step S10 includes:
[0012] S11, any AP sends a campaign message containing its own device parameter information to the local area network;
[0013] S12, after receiving the election message, other APs choose to randomly sleep for the first waiting time, and then respond to the corresponding election message;
[0014] S13. After receiving the election 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 selected as a candidate AC and sends the election message twice in succession with the second waiting time as the interval.
[0015] S14: After the candidate AC sends election messages twice in succession, if it still does not receive an election message with a device parameter score greater than its own, the candidate AC succeeds in the election and is determined to be the AC in the local area network.
[0016] The second waiting time is greater than the first waiting time, thereby ensuring the accuracy of the election results.
[0017] 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.
[0018] 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.
[0019] 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;
[0020] 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.
[0021] Specifically, in step S20, the process of connecting other APs to the AC includes:
[0022] S21. AP sends a connection request to AC.
[0023] S22, AC issues RSA public key;
[0024] S23, AP generates an AES password and encrypts the message with the RSA public key;
[0025] S24. The AC decrypts the message to obtain the AP's AES password.
[0026] S25, AP sends a hello keep-alive message;
[0027] S26: The AC responds with a hello keepalive message and sends the AP configuration file.
[0028] S27. The AP applies the configuration file and reports the WIFI parameter information to the AC.
[0029] Specifically, after the AC in the local area network is determined in step S10, the AC broadcasts an AC declaration message to the local area network once every third waiting time;
[0030] 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.
[0031] Furthermore, when a new AP accesses the local area network, the new AP monitors the network for a fourth waiting time, which is greater than the third waiting time, and determines whether there is an AC in the local area network. If so, it performs verification and connection according to the AC verification and AC connection process. If not, it participates in the AC election according to step S10.
[0032] Furthermore, when a new AP accesses a LAN with an AC, the new AP also compares the device parameter scores with the current AC to compete for AC. If the device parameter score of the current AC is larger, the AC identity is retained. Otherwise, the new AP serves as the AC in this LAN.
[0033] 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 LAN AP self-organizing network method are implemented.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] The present invention manages these AP devices independently by negotiating a new AC between AP devices of different manufacturers, while not affecting the relationship between these APs and the original AC, which not only improves the compatibility and flexibility of the network, but also provides users with a more convenient and efficient network management solution, realizes 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
[0036] Figure 1 It is a schematic diagram of the overall process of an embodiment of the present invention.
[0037] Figure 2 It is a schematic diagram of the process of AC election in an embodiment of the present invention.
[0038] Figure 3 It is a schematic diagram of the AC connection process in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] 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.
[0040] Example
[0041] like Figures 1 to 3 As shown, the LAN AP self-organizing method is used to configure AP devices of different manufacturers to access the same LAN, wherein the data message agreement is: the election data uses UDP, a fixed password, and AES encryption, and the AP connects to the AC using TCP, negotiated by RSA, and AES encryption; due to the problem of restrictions on private protocols of different manufacturers in the prior art, the present invention is usually integrated or installed in the form of a plug-in module into the AP device of the corresponding manufacturer. The method specifically includes the following steps:
[0042] S10. After all APs from different manufacturers are connected to the same LAN, all APs conduct AC election. Based on the comparison of device parameter scores of each AP, the AP with the largest device parameter score is determined as the AC in the LAN.
[0043] The AC election process for all APs includes:
[0044] S11. 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; it may also include information on whether it has been configured, device random value information, running time information, etc.
[0045] For example, the content of the campaign message:
[0046] {"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}
[0047] 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.
[0048] S12. After receiving the election message, other APs choose to randomly sleep for a first waiting time and then respond to the corresponding election message; the first waiting time is generally 1-251ms, which is used to stagger the response time between APs to avoid network congestion caused by a large number of data messages.
[0049] S13. After receiving the election 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 selected as a candidate AC and sends the election 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, generally about 1s, so that the dormant AP can respond in time, thereby ensuring the accuracy of the election result.
[0050] Specifically, the device parameter integral is calculated as follows: take 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, N is 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 first choice for the protocol version number is the protocol version number. A higher version may be able to manage more configuration parameters. The second choice is the total device memory size. More memory may represent higher device performance.
[0051] When comparing device parameter integrals of at least two APs, if the device parameter integrals are the same, the device sub-item parameter integrals are compared; the device sub-item parameter integrals are 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.
[0052] S14: After the candidate AC sends election messages twice in succession, if it still does not receive an election message with a device parameter score greater than its own, the candidate AC succeeds in the election and is determined to be the AC in the local area network.
[0053] Specifically, after the AC in the local area network is determined in step S10, the AC broadcasts an AC declaration message to the local area network once every third waiting time; the third waiting time may be 2s.
[0054] The AC declaration message can be as follows:
[0055] {"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}
[0056] 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.
[0057] 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.
[0058] The AC request message can be as follows:
[0059] {"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}
[0060] The AC response message can be as follows:
[0061] {"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}
[0062] The value of you_seq is equal to the value of my_seq in the AC request message, which enhances security.
[0063] When a new AP accesses the LAN, the new AP monitors the network for a fourth waiting time, which is greater than the third waiting time, for example, the fourth waiting time is 5 seconds, and determines whether there is an AC in the LAN. If so, the new AP performs verification and connection according to the AC verification and AC connection process. If not, the new AP participates in the AC election according to the process of step S10.
[0064] Furthermore, when a new AP accesses a LAN with an AC, the new AP also compares the device parameter scores with the current AC to compete for AC. If the device parameter score of the current AC is larger, the AC identity is retained; otherwise, the new AP serves as the AC in this LAN.
[0065] When a higher-version AP exists in the network, AC switching is necessary because the higher version may be able to manage more configuration parameters.
[0066] S20. 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.
[0067] Specifically, the process of connecting other APs to the AC includes:
[0068] S21. The AP sends a connection request to the AC.
[0069] The AP connection request message can be as follows:
[0070] {"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}
[0071] S22. AC issues the RSA public key.
[0072] The AC RSA public key message can be as follows:
[0073] {"cmd":"ac_rsa","rsa":"xxxxxxxxxxx","your_seq":100}
[0074] Among them, AP needs to verify your_seq.
[0075] S23. The AP generates an AES password and encrypts the message using the RSA public key.
[0076] The AP AES cipher message can be as follows:
[0077] {"cmd":"ac_pwd","pwd":"0123456789123456","my_seq":101}
[0078] 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.
[0079] S24. The AC decrypts the message to obtain the AP's AES password.
[0080] S25. AP sends a hello keepalive message.
[0081] The hello keepalive message from AP to AC can be as follows:
[0082] {"cmd":"ac_hello","my_seq":102,"md5":"1234567890123456"}
[0083] 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.
[0084] S26. The AC responds with a hello keepalive message and sends the AP configuration file.
[0085] The hello keepalive message from AC to AP can be as follows:
[0086] {"cmd":"ac_hello","my_seq":101,"your_seq":102}
[0087] Among them, AP needs to verify your_seq.
[0088] When the AC parameter md5 is different from the AP, ac_para is sent, for example:
[0089] {"cmd":"ac_para","data":"xxxxxxxxxxxx","my_seq":102,"md5":"1234567890123456"}
[0090] After receiving the parameters, the AP applies the parameters to achieve the purpose of synchronizing the AC parameter configuration with the AP.
[0091] S27. The AP applies the configuration file and reports the WIFI parameter information to the AC.
[0092] 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.
[0093] The information message that the AP actively reports to the AC can be as follows:
[0094] {"cmd":"ac_upload_data","data":"xxxxxxxxx","my_seq":105}
[0095] 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.
[0096] 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.
[0097] 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 method are implemented.
[0098] 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.
[0099] 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.
[0100] 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.
[0101] 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).
[0102] Through the above settings, users can achieve convenient and unified management of AP devices from different manufacturers.
[0103] 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 method, characterized in that: It is used to configure AP devices from different manufacturers to access the same LAN, including the following steps: S10. After all APs from different manufacturers are connected to the same LAN, all APs conduct AC election. Based on the comparison of device parameter scores of each AP, the AP with the largest device parameter score is determined as the AC in the LAN. S20. 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.
2. The local area network AP self-organizing method according to claim 1, characterized in that: The process of all APs conducting AC election in step S10 includes: S11, any AP sends a campaign message containing its own device parameter information to the local area network; S12, after receiving the election message, other APs choose to randomly sleep for the first waiting time, and then respond to the corresponding election message; S13. After receiving the election 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 selected as a candidate AC 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; S14. After the candidate AC sends election messages twice in succession, if it still does not receive an election message with a device parameter score greater than its own, the candidate AC succeeds in the election and is determined to be the AC in the local area network.
3. The local area network AP self-organizing 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 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 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 method according to any one of claims 1 to 5, characterized in that: In step S20, the process of connecting other APs to the AC includes: S21. AP sends a connection request to AC. S22, AC issues RSA public key; S23, AP generates an AES password and encrypts the message with the RSA public key; S24. The AC decrypts the message to obtain the AP's AES password. S25, AP sends a hello keep-alive message; S26: The AC responds with a hello keepalive message and sends the AP configuration file. S27. The AP applies the configuration file and reports the WIFI parameter information to the AC.
7. The local area network AP self-organizing method according to claim 6, characterized in that: After the AC in the local area network is determined in step S10, 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.
8. The local area network AP self-organizing method according to claim 7, characterized in that: When a new AP accesses the LAN, the new AP monitors the network for a fourth waiting time, which is greater than the third waiting time, and determines whether there is an AC in the LAN. If so, the new AP performs verification and connection according to the AC verification and AC connection process. If not, the new AP participates in the AC election according to step S10.
9. The local area network AP self-organizing method according to claim 8, characterized in that: When a new AP accesses a LAN with an AC, the new AP also compares the device parameter scores with the existing AC to elect an AC. If the device parameter score of the existing AC is greater, the AC identity is retained. Otherwise, the new AP serves as the AC in this LAN.
10. 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 LAN AP self-organizing method according to any one of claims 1 to 9 are implemented.