CN112533304A - Ad hoc network management method, device, system, electronic device and storage medium - Google Patents

Ad hoc network management method, device, system, electronic device and storage medium Download PDF

Info

Publication number
CN112533304A
CN112533304A CN202011331264.7A CN202011331264A CN112533304A CN 112533304 A CN112533304 A CN 112533304A CN 202011331264 A CN202011331264 A CN 202011331264A CN 112533304 A CN112533304 A CN 112533304A
Authority
CN
China
Prior art keywords
devices
hoc network
setting
master
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011331264.7A
Other languages
Chinese (zh)
Other versions
CN112533304B (en
Inventor
顾帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202011331264.7A priority Critical patent/CN112533304B/en
Publication of CN112533304A publication Critical patent/CN112533304A/en
Application granted granted Critical
Publication of CN112533304B publication Critical patent/CN112533304B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition

Abstract

The embodiment of the invention provides an ad hoc network management method, device, system, electronic equipment and storage medium. The method is applied to a first AP device in an ad hoc network containing a plurality of AP devices, judges whether a second AP device used for setting the first AP device as a main control device exists in the ad hoc network or not by enabling the first AP device to broadcast a first request for setting the first AP device as the main control device, and sets the first AP device as the main control device if a first response which is sent by the second AP device in the plurality of AP devices and used for refusing to set the first AP device as the main control device is not received. The role definition of the AP equipment in the ad hoc network is realized, and other AP equipment is conveniently controlled through the main control equipment.

Description

Ad hoc network management method, device, system, electronic device and storage medium
Technical Field
The present invention relates to the field of ad hoc networks, and in particular, to a method, an apparatus, a system, an electronic device, and a storage medium for managing an ad hoc network.
Background
With the continuous expansion of network specifications, a large number of wireless Access Points (APs) need to be deployed to form a networking so as to ensure that the network can cover a wider area.
Under the condition that a plurality of network devices are networked together, most products need to separately configure each device in the network, and along with the network requirements becoming more and more flexible, a network environment needs to be temporarily established in many scenes, so that the requirements of simple and easy-to-use network configuration deployment, such as a wireless distributed system, multi-routing cooperative work and the like, are greatly increased.
However, with the continuous expansion of networking scale, the number of deployed APs is more and more, and it is necessary to sequentially perform single network configuration on devices in the network, and the login process is cumbersome to operate and has low efficiency.
Disclosure of Invention
The invention provides a method, a device, a system, electronic equipment and a storage medium for managing an ad hoc network, which aim to solve the problem of low efficiency of a mode of manually configuring a single network of equipment in the network.
In a first aspect, an embodiment of the present invention provides an ad hoc network management method, which is applied to a first AP device in an ad hoc network including multiple AP devices, where the method includes:
broadcasting a first request for setting the first AP device as a master device;
if a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as the master device is not received, setting the first AP device as the master device to manage the multiple AP devices in the ad hoc network.
Optionally, the method further comprises:
if a first response sent by a second AP device of the AP devices to reject setting the first AP device as the master device is received and a second response sent by a third AP device of the AP devices to reject setting the first AP device as the master device is not received, establishing a connection with the second AP device to set the first AP device as a slave device managed by the second AP device.
Optionally, the first response includes a device identifier of the second AP device, and the method further includes:
if the first response is received and the second response is received, determining the equipment identifier of the third AP equipment according to the second response;
according to a preset device priority relationship, if the priority of the third AP device is higher than the priority of the second AP device, disconnecting the third AP device from the second AP device, where the device priority relationship includes device identifiers of a plurality of AP devices and priorities for setting the AP devices as master control devices, which correspond to the device identifiers;
and establishing connection with the third AP equipment so as to set the first AP equipment as slave equipment managed by the third AP equipment.
Optionally, the method further comprises:
detecting a second request broadcasted by at least two AP devices in the plurality of AP devices and used for setting the AP devices as master control devices;
determining the device identifier of each AP device according to the second request broadcast by the at least two AP devices;
determining a fourth AP device with the highest device priority in the at least two AP devices according to a preset device priority relationship, wherein the device priority relationship comprises device identifications of the AP devices and priorities for setting the AP devices as master control devices corresponding to the device identifications;
and establishing connection with the fourth AP equipment so as to set the first AP equipment as slave equipment managed by the fourth AP equipment.
Optionally, the method further comprises:
broadcasting a third request for discovering a fifth AP device newly joining the ad hoc network;
and if a connection request sent by a fifth AP device newly added into the ad hoc network is received, establishing connection with the fifth AP device so as to manage the fifth AP device.
In a second aspect, an embodiment of the present invention provides an ad hoc network management apparatus, applied to a first AP device in an ad hoc network including multiple AP devices, including:
a generating module, configured to generate a first request for setting the first AP device as a master device;
a setting module, configured to set the first AP device as a master device if a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as the master device is not received, so as to manage the multiple AP devices in the ad hoc network.
In a third aspect, an embodiment of the present invention provides an ad hoc network management system, where the system includes: a plurality of AP devices constituting an ad hoc network;
a first AP device of the plurality of AP devices, configured to broadcast a first request for setting the first AP device as a master device, where the first AP device is any one of the plurality of AP devices;
if the first AP device does not receive a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as a master device, setting the first AP device as the master device to manage the multiple AP devices in the ad hoc network.
Optionally, the first request further includes a device identifier of the first AP device;
the device identifier enables the second AP device to set the AP device with the higher device priority between the second AP device and the second AP device as a master control device according to a preset device priority relationship when the second AP device receives the first request;
the device priority relationship includes device identifiers of a plurality of AP devices and respective corresponding priorities for setting the AP devices as master control devices.
Optionally, the first request further includes a network identifier of the ad hoc network;
the network identification causes the second AP device to parse the intercepted first request when determining that the second AP device has the same network identification as the first AP device.
Optionally, if the first AP device is a master device, the first AP device is further configured to view device information of other AP devices in the ad hoc network; and managing other AP devices in the ad hoc network.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory stores a computer program executable on the processor, and the processor implements the method according to any one of the above first aspects when executing the computer program.
In a fifth aspect, an embodiment of the present invention provides a computer-readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method of any one of the first aspect.
Compared with the traditional scheme, the technical scheme provided by the embodiment of the invention has the following advantages: the method is applied to a first AP device in an ad hoc network containing a plurality of AP devices, judges whether a second AP device used for setting the first AP device as a main control device exists in the ad hoc network or not by enabling the first AP device to broadcast a first request for setting the first AP device as the main control device, sets the first AP device as the main control device if a first response which is sent by the second AP device in the plurality of AP devices and used for refusing to set the first AP device as the main control device is not received, realizes role definition of the AP devices in the ad hoc network, and is convenient for controlling other AP devices through the main control device.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a flow chart of an embodiment of a method for ad hoc network management provided by the present invention;
fig. 2 is a flowchart of another embodiment of a method for ad hoc network management provided by the present invention;
fig. 3 is a schematic structural diagram of an embodiment of an ad hoc network management device provided in the present invention;
fig. 4 is a schematic structural diagram of an embodiment of an ad hoc network management system provided in the present invention;
fig. 5 is a schematic structural diagram of an embodiment of an electronic device provided in the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
In some of the flows described in the present specification and the above-described drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be performed out of the order presented herein or in parallel, and the order of the operations, such as 101, 102, etc., is merely used to distinguish various operations, and the order of the operations does not represent any order of execution per se. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
Currently, under the condition that a plurality of network devices are networked together, most products need to individually configure each device in the network, and along with the network requirements becoming more and more flexible, a network environment needs to be temporarily established in many scenes, so that the requirements of simple and easy-to-use network configuration deployment, such as a wireless distributed system, multi-routing cooperative work and the like, are greatly increased.
Most network deployments still adopt manual configuration for each network device, the deployed APs are more and more in number along with continuous expansion of networking scale, single network configuration needs to be performed on devices in the network in sequence, the operation of a login process is complex, and the efficiency is low. Therefore, in order to solve the problem that the method for configuring a single AP device in a network by manpower is inefficient, the inventor proposes a technical solution of the present invention, which is applied to a first AP device in an ad hoc network including a plurality of AP devices, and includes: broadcasting a first request for setting the first AP device as a master device; if a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as the master device is not received, setting the first AP device as the master device to manage the multiple AP devices in the ad hoc network.
The method comprises the steps that whether a second AP device used for setting the first AP device as the master control device exists in the ad hoc network is judged in a mode that the first AP device broadcasts a first request used for setting the first AP device as the master control device, if a first response which is sent by the second AP device in the AP devices and used for refusing to set the first AP device as the master control device is not received, the first AP device is set as the master control device, the role definition of the AP device in the ad hoc network is achieved, and the other AP devices are conveniently controlled and controlled through the master control device.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, a flowchart of an embodiment of a method for managing an ad hoc network provided by the present invention is applied to a first AP device, and the method may include the following steps:
step 101, broadcasting a first request for setting the first AP device as a master device.
The first AP device may refer to any one of a plurality of AP devices in an ad hoc network.
In the embodiment of the present invention, the first AP device sends, in a broadcast form, a first request for setting the first AP device as the master device, so as to determine whether an AP device that has been set as the master device exists in the ad hoc network.
Step 102, if a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as the master device is not received, setting the first AP device as the master device to manage the multiple AP devices in the ad hoc network.
In this step, if a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as the master device is not received, the first AP device is set as the master device, so that role definition of the AP devices in the ad hoc network is achieved, and it is convenient for the master device to manage and control other AP devices.
In practical applications, the first AP device may periodically broadcast the first request to ensure that all AP devices within the signal coverage area can listen to the first request. If the first AP device does not receive the first response sent by the second AP device in the multiple AP devices to reject setting the first AP device as the master device after the preset period, the first AP device may be set as the master device. For example: the condition for determining that the first response sent by the second AP device in the multiple AP devices is not received may be that, after the first AP device broadcasts the first request for three times, the first response sent by the second AP device is not received, and at this time, the first AP device may be set as a master device, so as to implement management and control on other AP devices in the ad hoc network.
The AP device may use a User Datagram Protocol (udp) broadcast packet of a specific port, where the broadcast packet may include a declaration packet, a rejection packet, and an add packet. Specifically, the first AP device broadcasting the first request may be that the first AP device broadcasts a declaration message, that is, declares that the first AP device sets itself as the master device. The AP equipment located in the signal coverage range can monitor the statement message and judge whether to refuse to set the first AP equipment as the main control equipment or not based on the statement message. If the first AP device does not receive a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as the master device, the first AP device may be set as the master device. Specifically, the first response sent by the second AP device may be a reject message, that is, the first AP device is rejected to be set as the master control device.
After the first AP device is set as a master Control device, the first AP device may establish a long connection of a Transmission Control Protocol (TCP) with other AP devices in the ad hoc network, so as to form a networking state. Specifically, the declaration message broadcast by the first AP device may carry address information of the first AP device, so that other AP devices may obtain the address information of the first AP device when receiving the declaration message, and establish a connection with the first AP device based on the address information.
In this embodiment, whether a second AP device configured to be the master control device exists in the ad hoc network is determined by making the first AP device broadcast a first request for setting the first AP device as the master control device, and if a first response for rejecting setting the first AP device as the master control device, which is sent by the second AP device in the multiple AP devices, is not received, the first AP device is set as the master control device, so that role definition of the AP devices in the ad hoc network is implemented, and it is convenient for other AP devices to be managed and controlled by the master control device.
In some embodiments, after broadcasting the first request for setting the first AP device as the master device, the first AP device receives a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as the master device. Therefore, for the case of receiving a first response transmitted by a second AP device of the plurality of AP devices, the method may further include:
if a first response sent by a second AP device of the AP devices to reject setting the first AP device as the master device is received and a second response sent by a third AP device of the AP devices to reject setting the first AP device as the master device is not received, establishing a connection with the second AP device to set the first AP device as a slave device managed by the second AP device.
In this embodiment, the second AP device may refer to any one of the plurality of AP devices except the first AP device. If a first response sent by one of the AP devices other than the first AP device is received and a response sent by the other AP device is not received after a first request for setting the first AP device as the master control device is broadcasted, the connection with the second AP device may be directly established, and the second AP device is set as the master control device. The process of establishing a connection with the second AP device is described in detail in the above, and is not described herein again. Through establishing connection with the second AP equipment, the purpose that the first AP equipment is set as slave equipment managed by the second AP equipment is achieved, and managers can acquire running state information and equipment information of the first AP equipment and issue control instructions to the first AP equipment through the second AP equipment, so that management and control of the first AP equipment are achieved.
In practical applications, in addition to receiving the first response sent by the second AP device, the first AP device may also receive a second response sent by a third AP device in the multiple AP devices to reject setting the first AP device as the master device. Therefore, in order to enable each AP device in the ad hoc network to determine its role in the ad hoc network by itself, as shown in fig. 2, the present invention further provides another embodiment of an ad hoc network management method, which may include the following steps:
step 201, broadcasting a first request for setting the first AP device as a master device.
The implementation manner of step 201 may refer to the implementation manner of step 101 in the embodiment shown in fig. 1, and is not described here again.
Step 202, if a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as the master device is received and a second response sent by a third AP device of the multiple AP devices to reject setting the first AP device as the master device is received, determining a device identifier of the third AP device according to the second response, where the first response includes the device identifier of the second AP device.
In this step, if the first AP device receives the first response sent by the second AP device first, the first AP device preferentially establishes a connection with the second AP device. The process of establishing a connection with the second AP device is described in the above embodiments, and is not described herein again. At this time, if a second response sent by a third AP device of the multiple AP devices to reject the first AP device as the master device is received again, the priorities of the second AP device and the third AP device may be compared in order to make the master device clear. The third AP device may refer to any one of the AP devices except the first AP device and the second AP device.
In practical applications, the first response sent by the second AP device may be a first reject message, where the first reject message may include a device identifier of the second AP device. Likewise, the second response sent by the third AP device may be a second reject message, where the second reject message may include the device identifier of the third AP device. The priorities of the second AP device and the third AP device may thus be compared based on the device identification.
Step 203, according to a preset device priority relationship, if the priority of the third AP device is higher than the priority of the second AP device, disconnecting from the second AP device.
In this step, each AP device in the ad hoc network stores a preset device priority relationship. The device priority relationship may include device identifiers of multiple AP devices and respective corresponding priorities for setting the AP devices as master control devices. Alternatively, the device identifier may be represented as a network unique code, which may refer to a component of a network Identity Document (ID). At this time, the device priority relationship may include correspondence between sizes of the network unique codes of the AP devices and priorities of the AP devices, where the larger the network unique code is, the higher the priority of the corresponding device is. Optionally, the device priority relationship may further include a correspondence relationship between the device types or device performances of the multiple AP devices and the priority levels, for example, the higher the performance is, the higher the corresponding device priority level is, for example, the priority level of the high-performance AP device is higher than the priority level of the low-performance AP device. The priority relationship of the devices may be set according to actual situations, which is not specifically limited.
Step 204, establishing a connection with the third AP device, so as to set the first AP device as a slave device managed by the third AP device.
And establishing connection with a third AP device, and setting the third AP device as a master control device. The process of establishing a connection with the third AP device is described in the above embodiments, and is not described herein again. Through establishing connection with the third AP equipment, the purpose that the first AP equipment is set as slave equipment managed by the third AP equipment is achieved, and managers can acquire running state information and equipment information of the first AP equipment through the third AP equipment and issue a control instruction to the first AP equipment to realize management and control of the first AP equipment.
In some embodiments, the method may further comprise:
detecting a second request broadcasted by at least two AP devices in the plurality of AP devices and used for setting the AP devices as master control devices;
determining the device identifier of each AP device according to the second request broadcast by the at least two AP devices;
determining a fourth AP device with the highest device priority in the at least two AP devices according to a preset device priority relationship, wherein the device priority relationship comprises device identifications of the AP devices and priorities for setting the AP devices as master control devices corresponding to the device identifications;
and establishing connection with the fourth AP equipment so as to set the first AP equipment as slave equipment managed by the fourth AP equipment.
In practical applications, for an ad hoc network not yet provided with a master device, after broadcasting a first request for setting a first AP device as the master device, a second request for setting itself as the master device, broadcasted by at least two AP devices of a plurality of AP devices, may be sensed. The second request broadcasted by the at least two AP devices may be a declaration message broadcasted by the at least two AP devices, that is, the declaration sets itself as the master device. Because the set number of the master control devices in the ad hoc network is unique, for at least two AP devices which declare to set themselves as the master control devices, the priorities of the at least two AP devices may be compared, so that the AP device with the highest priority is selected to be set as the master control device in the ad hoc network.
Specifically, the second request, i.e., the declaration message, broadcast by each AP device may include a device identifier of each AP device. The device identification of each AP device may be determined from the second request. And then according to the preset device priority relationship, a fourth AP device with the highest device priority may be determined among the at least two AP devices. The device priority relationship may include device identifiers of a plurality of AP devices and respective corresponding priorities for setting the AP devices as the master device.
Based on the determined fourth AP device, a connection may be established with the fourth AP device to set the first AP device as a slave device managed by the fourth AP device. The process of establishing a connection with the fourth AP device is described in the above embodiments, and is not described herein again. Through establishing connection with the fourth AP equipment, the purpose that the first AP equipment is set as slave equipment managed by the fourth AP equipment is achieved, and managers can acquire running state information and equipment information of the first AP equipment and issue control instructions to the first AP equipment through the fourth AP equipment, so that management and control of the first AP equipment are achieved.
In practical application, if the ad hoc network is provided with the master control device, for example, after the first AP device is set as the master control device, the first AP device may be used to manage a plurality of AP devices in the ad hoc network, discover an AP device newly added to the ad hoc network, and manage the newly added AP device. Thus, in some embodiments, the method may further comprise:
broadcasting a third request for discovering a fifth AP device newly joining the ad hoc network;
and if a connection request sent by a fifth AP device newly added into the ad hoc network is received, establishing connection with the fifth AP device so as to manage the fifth AP device.
In practical applications, the master device in the ad hoc network may periodically broadcast the third request, so that the AP device that is located in the signal coverage area but has not joined the ad hoc network can listen to the third request and join the ad hoc network. Specifically, the third request may be a join message, and may be used for the newly joined AP device to quickly discover the master device.
Therefore, when the master control device in the ad hoc network receives the connection request sent by the fifth AP device newly joining the ad hoc network, a connection may be established with the fifth AP device to manage the fifth AP device. The process of establishing a connection with the fifth AP device has been described in the foregoing embodiments, and is not described herein again.
As shown in fig. 3, a schematic structural diagram of an ad hoc network management apparatus according to an embodiment of the present invention is applied to a first AP device in an ad hoc network including a plurality of AP devices, and the apparatus may include the following modules:
a generating module 301, configured to generate a first request for setting the first AP device as a master device;
a setting module 302, configured to set the first AP device as a master device if a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as the master device is not received, so as to manage the multiple AP devices in the ad hoc network.
In this embodiment, whether a second AP device configured to be the master control device exists in the ad hoc network is determined by making the first AP device broadcast a first request for setting the first AP device as the master control device, and if a first response for rejecting setting the first AP device as the master control device is not received, which is sent by the second AP device in the multiple AP devices, the first AP device is set as the master control device, so that role definition of the AP devices in the ad hoc network is realized, and it is convenient for other AP devices to be managed and controlled by the master control device.
In some embodiments, the apparatus may further comprise:
and the first connection module is configured to establish a connection with a second AP device if receiving a first response sent by the second AP device of the multiple AP devices to reject setting the first AP device as a master device and not receiving a second response sent by a third AP device of the multiple AP devices to reject setting the first AP device as the master device, so as to set the first AP device as a slave device managed by the second AP device.
In some embodiments, the apparatus may further comprise:
a first determining module, configured to determine, if the first response is received and the second response is received, a device identifier of the third AP device according to the second response;
the disconnection module is used for disconnecting the second AP equipment if the priority of the third AP equipment is higher than that of the second AP equipment according to a preset equipment priority relationship, wherein the equipment priority relationship comprises equipment identifications of the plurality of AP equipment and the priorities which correspond to the equipment identifications and set the AP equipment as the main control equipment;
a second connection module, configured to establish a connection with the third AP device, so as to set the first AP device as a slave device managed by the third AP device.
In some embodiments, the apparatus may further comprise:
the monitoring module is used for monitoring a second request which is broadcasted by at least two AP devices in the plurality of AP devices and is used for setting the AP devices as main control devices;
a second determining module, configured to determine, according to the second request broadcast by the at least two AP devices, a device identifier of each AP device;
a third determining module, configured to determine, according to a preset device priority relationship, a fourth AP device with a highest device priority among the at least two AP devices, where the device priority relationship includes device identifiers of the multiple AP devices and priorities for setting the AP devices as master devices, where the priorities correspond to the device identifiers of the multiple AP devices;
a third connection module, configured to establish a connection with the fourth AP device, so as to set the first AP device as a slave device managed by the fourth AP device.
In some embodiments, the apparatus may further comprise:
a broadcasting module, configured to broadcast a third request for discovering a fifth AP device newly joining the ad hoc network;
and the fourth connection module is used for establishing connection with a fifth AP device to manage the fifth AP device if receiving a connection request sent by the fifth AP device newly added into the ad hoc network.
As shown in fig. 4, a schematic structural diagram of an ad hoc network management system according to an embodiment of the present invention includes a plurality of AP devices forming an ad hoc network;
wherein, the second NAP device may refer to any AP device in the ad hoc network.
A first AP device of the plurality of AP devices, configured to broadcast a first request for setting the first AP device as a master device, where the first AP device is any one of the plurality of AP devices;
if the first AP device does not receive a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as a master device, setting the first AP device as the master device to manage the multiple AP devices in the ad hoc network.
In this embodiment, whether a second AP device configured to be the master control device exists in the ad hoc network is determined by making the first AP device broadcast a first request for setting the first AP device as the master control device, and if a first response for rejecting setting the first AP device as the master control device is not received, which is sent by the second AP device in the multiple AP devices, the first AP device is set as the master control device, so that role definition of the AP devices in the ad hoc network is realized, and it is convenient for other AP devices to be managed and controlled by the master control device.
In some embodiments, the first request further includes a device identification of the first AP device;
the device identifier enables the second AP device to set the AP device with the higher device priority between the second AP device and the second AP device as a master control device according to a preset device priority relationship when the second AP device receives the first request;
the device priority relationship includes device identifiers of a plurality of AP devices and respective corresponding priorities for setting the AP devices as master control devices.
In practical applications, the first request may further include a device identifier of the first AP device in addition to the address information of the first AP device. The second AP device of the multiple AP devices may obtain the device identifier of the first AP device when receiving the first request. Therefore, based on the device identifier of the first AP device and the device identifier of the first AP device, the device priority between the first AP device and the first AP device is determined according to the preset device priority relationship, and the AP device with the higher priority is set as the master control device. If the priority of the first AP device is higher than the priority of the first AP device, the second AP device may reply to confirm to join the ad hoc network, and establish a connection with the first AP device, thereby becoming a slave device managed by the first AP device; if the priority of the first AP device is lower than the priority of the first AP device, the second AP device may reply to deny that the first AP device is set as the master control device, and the first AP device may perform role switching after receiving the request.
In some embodiments, the first request further includes a network identification of the ad hoc network;
the network identification causes the second AP device to parse the intercepted first request when determining that the second AP device has the same network identification as the first AP device.
In practical applications, the network may include one or more ad hoc networks, each having a unique network identifier. The network identification is determined by the master device and synchronized to all AP devices in the ad hoc network. Optionally, the first request broadcast by the first AP device may further include a network identifier of the ad hoc network, and when receiving the first request, the second AP device may determine whether the network identifier included in the first request is the same as the network identifier of the second AP device, and if the network identifier included in the first request is the same as the network identifier of the second AP device, it indicates that the first request is sent by the AP device in the ad hoc network where the second AP device is located, and the intercepted first request may be analyzed, so that interference caused by requests sent by AP devices in other ad hoc networks is avoided, and an advertisement process is not affected.
For other ad hoc networks included in the network, the current ad hoc network may be merged with other ad hoc networks, thereby implementing information integration of a plurality of ad hoc networks. Specifically, the master control device of the current ad hoc network may negotiate with master control devices of other ad hoc networks, determine the master control device and the network identifier of the merged ad hoc network according to device priorities of a plurality of master control devices, and integrate information of slave devices of the plurality of ad hoc networks. The negotiation performed by the main control device may be that the main control device sends a merged message, where the merged message may include a device identifier and a network identifier of the main control device.
In some embodiments, if the first AP device is a master device, the first AP device is further configured to view device information of other AP devices in the ad hoc network; and managing other AP devices in the ad hoc network.
In practical application, the main control device may be responsible for managing configuration delivery, configuration viewing, configuration synchronization, and the like of other AP devices in the ad hoc network, so as to manage and control the other AP devices in the ad hoc network.
As shown in fig. 5, a schematic structural diagram of an embodiment of an electronic device provided in the present invention includes a memory 501 and a processor 502; the memory 501 stores therein a computer program operable on the processor, and the processor 502 implements the ad hoc network management method shown in the above embodiments when executing the computer program.
In this embodiment, whether a second AP device configured to be the master control device exists in the ad hoc network is determined by making the first AP device broadcast a first request for setting the first AP device as the master control device, and if a first response for rejecting setting the first AP device as the master control device is not received, which is sent by the second AP device in the multiple AP devices, the first AP device is set as the master control device, so that role definition of the AP devices in the ad hoc network is realized, and it is convenient for other AP devices to be managed and controlled by the master control device.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (12)

1. An ad hoc network management method applied to a first Access Point (AP) device in an ad hoc network including a plurality of AP devices, the method comprising:
broadcasting a first request for setting the first AP device as a master device;
if a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as the master device is not received, setting the first AP device as the master device to manage the multiple AP devices in the ad hoc network.
2. The method of ad hoc network management according to claim 1, wherein said method further comprises:
if a first response sent by a second AP device of the AP devices to reject setting the first AP device as the master device is received and a second response sent by a third AP device of the AP devices to reject setting the first AP device as the master device is not received, establishing a connection with the second AP device to set the first AP device as a slave device managed by the second AP device.
3. The ad-hoc network management method according to claim 2, wherein the first response includes a device identification of the second AP device;
the method further comprises the following steps:
if the first response is received and the second response is received, determining the equipment identifier of the third AP equipment according to the second response;
according to a preset device priority relationship, if the priority of the third AP device is higher than the priority of the second AP device, disconnecting the third AP device from the second AP device, where the device priority relationship includes device identifiers of a plurality of AP devices and priorities for setting the AP devices as master control devices, which correspond to the device identifiers;
and establishing connection with the third AP equipment so as to set the first AP equipment as slave equipment managed by the third AP equipment.
4. The method of ad hoc network management according to claim 1, wherein said method further comprises:
detecting a second request broadcasted by at least two AP devices in the plurality of AP devices and used for setting the AP devices as master control devices;
determining the device identifier of each AP device according to the second request broadcast by the at least two AP devices;
determining a fourth AP device with the highest device priority in the at least two AP devices according to a preset device priority relationship, wherein the device priority relationship comprises device identifications of the AP devices and priorities for setting the AP devices as master control devices corresponding to the device identifications;
and establishing connection with the fourth AP equipment so as to set the first AP equipment as slave equipment managed by the fourth AP equipment.
5. The method of ad hoc network management according to claim 1, wherein said method further comprises:
broadcasting a third request for discovering a fifth AP device newly joining the ad hoc network;
and if a connection request sent by a fifth AP device newly added into the ad hoc network is received, establishing connection with the fifth AP device so as to manage the fifth AP device.
6. An ad hoc network management apparatus applied to a first AP device in an ad hoc network including a plurality of AP devices, comprising:
a generating module, configured to generate a first request for setting the first AP device as a master device;
a setting module, configured to set the first AP device as a master device if a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as the master device is not received, so as to manage the multiple AP devices in the ad hoc network.
7. An ad-hoc network management system, the system comprising: a plurality of AP devices constituting an ad hoc network;
a first AP device of the plurality of AP devices, configured to broadcast a first request for setting the first AP device as a master device, where the first AP device is any one of the plurality of AP devices;
if the first AP device does not receive a first response sent by a second AP device of the multiple AP devices to reject setting the first AP device as a master device, setting the first AP device as the master device to manage the multiple AP devices in the ad hoc network.
8. The ad hoc network management system according to claim 7, wherein the first request further includes a device identification of the first AP device;
the device identifier enables the second AP device to set the AP device with the higher device priority between the second AP device and the second AP device as a master control device according to a preset device priority relationship when the second AP device receives the first request;
the device priority relationship includes device identifiers of a plurality of AP devices and respective corresponding priorities for setting the AP devices as master control devices.
9. The ad hoc network management system according to claim 7, wherein the first request further includes a network identification of the ad hoc network;
the network identification causes the second AP device to parse the intercepted first request when determining that the second AP device has the same network identification as the first AP device.
10. The ad hoc network management system according to claim 7, wherein if the first AP device is a master device, the first AP device is further configured to view device information of other AP devices in the ad hoc network; and managing other AP devices in the ad hoc network.
11. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program operable on the processor, and the processor executes the computer program to implement the method of any one of claims 1 to 5.
12. A computer-readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the method of any of claims 1 to 5.
CN202011331264.7A 2020-11-24 2020-11-24 Ad hoc network management method, device, system, electronic equipment and storage medium Active CN112533304B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011331264.7A CN112533304B (en) 2020-11-24 2020-11-24 Ad hoc network management method, device, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011331264.7A CN112533304B (en) 2020-11-24 2020-11-24 Ad hoc network management method, device, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112533304A true CN112533304A (en) 2021-03-19
CN112533304B CN112533304B (en) 2023-10-20

Family

ID=74993033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011331264.7A Active CN112533304B (en) 2020-11-24 2020-11-24 Ad hoc network management method, device, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112533304B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114048017A (en) * 2022-01-13 2022-02-15 之江实验室 Internet of things equipment cooperative linkage method and device

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020161836A1 (en) * 2001-04-25 2002-10-31 Nec Corporation System and method for providing services
US20090196200A1 (en) * 2008-02-05 2009-08-06 Canon Kabushiki Kaisha Communication apparatus, communication system, and network establishing method
CN101754271A (en) * 2008-12-09 2010-06-23 华为终端有限公司 Method and device for negotiation of master node
CN102572015A (en) * 2012-03-08 2012-07-11 常熟理工学院 Implementation method for dynamic IPv6 address configuration of mobile ad hoc network
US20130034031A1 (en) * 2011-08-03 2013-02-07 Harris Corporation, Corporation Of The State Of Delaware Ad hoc wireless communications network with node role information routing and associated methods
US20130050513A1 (en) * 2011-08-23 2013-02-28 Canon Kabushiki Kaisha Network management apparatus and method of controlling the same, and communication apparatus and method of controlling the same
WO2014006011A2 (en) * 2012-07-05 2014-01-09 Gemalto Sa A method for communicating data between a first device and a second device, corresponding second device and system
US20150109897A1 (en) * 2013-10-17 2015-04-23 Samsung Electronics Co., Ltd. Method for connection between electronic devices and electronic device thereof
CN104780499A (en) * 2015-04-01 2015-07-15 惠州Tcl移动通信有限公司 Multi-device intelligent interconnection method and system based on Bluetooth
WO2016150066A1 (en) * 2015-03-25 2016-09-29 中兴通讯股份有限公司 Master node election method and apparatus, and storage system
CN109067846A (en) * 2018-07-10 2018-12-21 北京拜克洛克科技有限公司 Management method, management system, vehicle and the server of vehicle
US20190124198A1 (en) * 2017-10-24 2019-04-25 Comptel Oy Method and arrangement for policy regulation of electronic communication devices
CN109787795A (en) * 2017-11-13 2019-05-21 比亚迪股份有限公司 Processing method, node and the electronic equipment of train network host node failure
CN111106893A (en) * 2019-12-11 2020-05-05 江苏方天电力技术有限公司 Self-calibration clock synchronization method for ad hoc network, master node, slave node and system

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020161836A1 (en) * 2001-04-25 2002-10-31 Nec Corporation System and method for providing services
US20090196200A1 (en) * 2008-02-05 2009-08-06 Canon Kabushiki Kaisha Communication apparatus, communication system, and network establishing method
CN101754271A (en) * 2008-12-09 2010-06-23 华为终端有限公司 Method and device for negotiation of master node
US20130034031A1 (en) * 2011-08-03 2013-02-07 Harris Corporation, Corporation Of The State Of Delaware Ad hoc wireless communications network with node role information routing and associated methods
US20130050513A1 (en) * 2011-08-23 2013-02-28 Canon Kabushiki Kaisha Network management apparatus and method of controlling the same, and communication apparatus and method of controlling the same
CN102572015A (en) * 2012-03-08 2012-07-11 常熟理工学院 Implementation method for dynamic IPv6 address configuration of mobile ad hoc network
WO2014006011A2 (en) * 2012-07-05 2014-01-09 Gemalto Sa A method for communicating data between a first device and a second device, corresponding second device and system
US20150109897A1 (en) * 2013-10-17 2015-04-23 Samsung Electronics Co., Ltd. Method for connection between electronic devices and electronic device thereof
WO2016150066A1 (en) * 2015-03-25 2016-09-29 中兴通讯股份有限公司 Master node election method and apparatus, and storage system
CN104780499A (en) * 2015-04-01 2015-07-15 惠州Tcl移动通信有限公司 Multi-device intelligent interconnection method and system based on Bluetooth
US20190124198A1 (en) * 2017-10-24 2019-04-25 Comptel Oy Method and arrangement for policy regulation of electronic communication devices
CN109787795A (en) * 2017-11-13 2019-05-21 比亚迪股份有限公司 Processing method, node and the electronic equipment of train network host node failure
CN109067846A (en) * 2018-07-10 2018-12-21 北京拜克洛克科技有限公司 Management method, management system, vehicle and the server of vehicle
CN111106893A (en) * 2019-12-11 2020-05-05 江苏方天电力技术有限公司 Self-calibration clock synchronization method for ad hoc network, master node, slave node and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114048017A (en) * 2022-01-13 2022-02-15 之江实验室 Internet of things equipment cooperative linkage method and device

Also Published As

Publication number Publication date
CN112533304B (en) 2023-10-20

Similar Documents

Publication Publication Date Title
CN111867001B (en) Intelligent equipment batch network distribution method, system and storage medium
US10805984B2 (en) Mesh node role discovery and automatic recovery
CN111867007A (en) Automatic network distribution method and system for intelligent equipment and storage medium
CN105338595B (en) Intelligent terminal Adding Way, apparatus and system based on intelligent terminal system
CN112671904B (en) Method and device for transmitting equipment state information, storage medium and electronic device
CN105050033A (en) Piconet networking interconnection method and system based on low-power-dissipation Bluetooth and traditional Bluetooth
CN106060816B (en) A kind of wireless self-networking method and system
CN112261604B (en) Network distribution method of intelligent terminal, configuration terminal, intelligent terminal and medium
CN104333914A (en) Method and equipment of establishing Mesh link
CN104539324B (en) Bluetooth low-power-consumption networking interconnecting method and system
EP2871870A1 (en) Device and service discovery method, and device middleware
CN106487583B (en) Method for establishing network connection and local area network system
CN111741509A (en) Network distribution method and device, storage medium and processor
CN111405492A (en) Method, device, storage medium, and electronic device for connecting to target network
CN103634657A (en) Television and mobile terminal synchronous WIFI connection setup method and device
WO2022082724A1 (en) Method and apparatus for multicast service support in time sensitive network
CN113543277A (en) Distribution network processing method and device and electronic equipment
CN111884875A (en) Offline device determination method and device
CN113596089B (en) Distribution network binding method and device of equipment, storage medium and electronic device
CN112533304A (en) Ad hoc network management method, device, system, electronic device and storage medium
CN108370503A (en) Communication equipment and its control method and program
CN111757275B (en) Device connection method and device, storage medium and electronic device
CN115720192A (en) Network distribution method and system of equipment, storage medium and electronic device
CN111867146B (en) Identification information sending and receiving method, equipment and device
CN108718401B (en) Video conference implementation method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant