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

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

Info

Publication number
CN112533304B
CN112533304B CN202011331264.7A CN202011331264A CN112533304B CN 112533304 B CN112533304 B CN 112533304B CN 202011331264 A CN202011331264 A CN 202011331264A CN 112533304 B CN112533304 B CN 112533304B
Authority
CN
China
Prior art keywords
equipment
devices
hoc network
master
response
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.)
Active
Application number
CN202011331264.7A
Other languages
Chinese (zh)
Other versions
CN112533304A (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

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, an ad hoc network management device, an ad hoc network management system, electronic equipment and a storage medium. The invention is applied to a first AP device in an ad hoc network comprising a plurality of AP devices, judges whether a second AP device used for setting the first AP device as a master device exists in the ad hoc network or not by broadcasting a first request for setting the first AP device as the master device by the first AP device, and sets the first AP device as the master 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 master device is not received. Role definition of the AP equipment in the self-organizing network is realized, and other AP equipment is conveniently controlled through the main control equipment.

Description

Ad hoc network management method, device, system, electronic equipment and storage medium
Technical Field
The present invention belongs 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 the network size, a large number of Access Points (APs) are required to be deployed to form a network, 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 be configured for each device in the network respectively, and as the network needs become more flexible, many scenes need to be temporarily built with a network environment, so that the requirements of simple and easy network configuration deployment, such as wireless distributed systems, multipath cooperation work and the like, are greatly increased.
However, with the continuous expansion of networking scale, the number of deployed APs is increasing, a single network configuration needs to be sequentially performed on devices in a network, and the login process is complex in operation and low in efficiency.
Disclosure of Invention
The invention provides an ad hoc network management method, an ad hoc network management device, an ad hoc network management system, electronic equipment and a storage medium, which are used for solving the problem that the efficiency of a single network configuration mode is low by means of manual operation on equipment in a network.
In a first aspect, an embodiment of the present invention provides an ad hoc network management method, applied to a first AP device in an ad hoc network including a plurality of AP devices, the method including:
broadcasting a first request for setting the first AP device as a master device;
and if a first response which is sent by a second AP device in the plurality of AP devices and used for refusing to set the first AP device as the master control device is not received, setting the first AP device as the master control device so as to manage the plurality of AP devices in the ad hoc network.
Optionally, the method further comprises:
if a first response for rejecting setting the first AP device as a master device sent by a second AP device in the plurality of AP devices is received, and a second response for rejecting setting the first AP device as the master device sent by a third AP device in the plurality of AP devices is not received, connection is established with the second AP device, so that the first AP device is set 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;
disconnecting the third AP device from the second AP device if the priority of the third AP device is higher than the priority of the second AP device according to a preset device priority relationship, where the device priority relationship includes device identifiers of a plurality of AP devices and priorities corresponding to the device identifiers and the AP devices set as master control devices;
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:
hearing a second request broadcast by at least two AP devices of the plurality of AP devices for setting itself as a master device;
determining the equipment identification of each AP equipment according to the second request broadcast by the at least two AP equipment;
determining a fourth AP device with highest device priority from the at least two AP devices according to a preset device priority relation, wherein the device priority relation comprises device identifiers of a plurality of AP devices and priorities of the AP devices, which are respectively corresponding to the device identifiers, for setting the AP devices as main control devices;
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 added to 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 a plurality of AP devices, including:
a generating module, configured to generate a first request for setting the first AP device as a master device;
and the setting module is used for setting the first AP equipment as the master control equipment if a first response which is sent by the second AP equipment in the plurality of AP equipment and used for refusing to set the first AP equipment as the master control equipment is not received, so as to manage the plurality of AP equipment in the self-organizing network.
In a third aspect, an embodiment of the present invention provides an ad hoc network management system, including: a plurality of AP devices constituting an ad hoc network;
a first AP device of the plurality of AP devices for broadcasting a first request for setting the first AP device as a master device, wherein the first AP device is any one of the plurality of AP devices;
and if the first AP equipment does not receive a first response which is sent by a second AP equipment in the plurality of AP equipment and is used for refusing to set the first AP equipment as the master control equipment, setting the first AP equipment as the master control equipment so as to manage the plurality of AP equipment in the self-organizing network.
Optionally, the first request further includes a device identifier of the first AP device;
when the equipment identifier enables the second AP equipment to receive the first request, the AP equipment with high equipment priority between the second AP equipment and the first AP equipment is set as main control equipment according to a preset equipment priority relation;
the device priority relation comprises device identifiers of a plurality of AP devices and priorities of the AP devices as main control devices, wherein the device priority relation comprises the device identifiers of the plurality of AP devices and the priorities of the AP devices as main control devices.
Optionally, the first request further includes a network identifier of the ad hoc network;
the network identifier enables the second AP equipment to analyze the first request which is detected when the second AP equipment is determined to have the same network identifier as the first AP equipment.
Optionally, if the first AP device is a master control 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 that can be run on the processor, and when the processor executes the computer program, the method in any one of the first aspects is implemented.
In a fifth aspect, embodiments of the present invention provide 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 the first aspects.
Compared with the traditional scheme, the technical scheme provided by the embodiment of the invention has the following advantages: the invention is applied to a first AP device in an ad hoc network comprising a plurality of AP devices, judges whether a second AP device used for setting the first AP device as a master device exists in the ad hoc network by broadcasting a first request for setting the first AP device as the master device by the first AP device, and sets the first AP device as the master 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 master device is not received, so that role definition of the AP device in the ad hoc network is realized, and other AP devices are conveniently controlled by the master 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 do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flow chart of one embodiment of a method for ad hoc network management provided by the present invention;
FIG. 2 is a flow chart of another embodiment of an ad hoc network management method provided by the present invention;
fig. 3 is a schematic structural diagram of an embodiment of an ad hoc network management device according to the present invention;
FIG. 4 is a schematic diagram illustrating the architecture of an embodiment of an ad hoc network management system provided by the present invention;
fig. 5 is a schematic structural diagram of an embodiment of an electronic device provided by the present invention.
Detailed Description
In order to enable those skilled in the art to better understand the present invention, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present invention with reference to the accompanying drawings.
In some of the flows described in the specification of the present invention and the above figures, a plurality of operations occurring in a particular order are included, but it should be understood that the operations may be performed out of order or performed in parallel, the sequence numbers of the operations being 101, 102, etc., merely for distinguishing between the various operations, the sequence numbers themselves not representing any order of execution. In addition, 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" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
Currently, under the condition that a plurality of network devices are networked together, most products need to be configured for each device in a network respectively, and as network requirements become more flexible, many scenes need to temporarily build a network environment, so that requirements of simple and easy use of network configuration deployment, such as wireless distributed systems, multi-path cooperative work and the like, are greatly increased.
Most network deployments still adopt manual configuration to each network device, and as the networking scale is continuously enlarged, the number of deployed APs is increased, single network configuration needs to be sequentially carried out on the devices in the network, the login process is complex in operation and low in efficiency. Therefore, in order to solve the problem that the efficiency of a single network configuration mode for devices in a network by means of manual work is low, 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; and if a first response which is sent by a second AP device in the plurality of AP devices and used for refusing to set the first AP device as the master control device is not received, setting the first AP device as the master control device so as to manage the plurality of AP devices in the ad hoc network.
And judging whether second AP equipment used for setting the first AP equipment as the master equipment exists in the self-organizing network or not by broadcasting a first request for setting the first AP equipment as the master equipment by the first AP equipment, and setting the first AP equipment as the master equipment if a first response which is sent by the second AP equipment in the plurality of AP equipment and used for refusing to set the first AP equipment as the master equipment is not received, so that role definition of the AP equipment in the self-organizing network is realized, and other AP equipment can be conveniently controlled by the master equipment.
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
As shown in fig. 1, a flowchart of an embodiment of an ad hoc network management method provided by the present invention, where the method is applied to a first AP device, 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 AP device of a plurality of AP devices in the ad hoc network.
The embodiment of the invention enables the first AP device to send the first request for setting the first AP device as the master device in a broadcast mode so as to judge whether the AP device which is set as the master device exists in the self-organizing network.
Step 102, if a first response sent by a second AP device in the plurality of AP devices and used for rejecting to set the first AP device as a master device is not received, setting the first AP device as the master device, so as to manage the plurality of AP devices in the ad hoc network.
In this step, if a first response sent by a second AP device in the multiple AP devices and used for rejecting setting the first AP device as a master device is not received, setting the first AP device as the master device, so as to define roles of the AP devices in the ad hoc network, and facilitate management and control of other AP devices through the master device.
In practical applications, the first AP device may broadcast the first request periodically, so as to ensure that AP devices located in the signal coverage area can monitor the first request. If the first AP device does not receive the first response sent by the second AP device in the plurality of AP devices and used for rejecting to set the first AP device as the master device after the preset period passes, 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 plurality of AP devices is not received may be that the first AP device does not receive the first response sent by the second AP device after broadcasting the first request three times, and at this time, the first AP device may be set as a master device to implement management and control of other AP devices in the ad hoc network.
The AP device may use a user datagram protocol (User Datagram Protocol, abbreviated as udp) of a specific port to broadcast a message, where the broadcast message may include a statement message, a reject message, a join message, and so on. Specifically, the first AP device broadcasting the first request may be the first AP device broadcasting a sound message, i.e. declaring to set itself as the master device. The AP devices located in the signal coverage area can monitor the declaration message, and determine whether to reject to set the first AP device as the master device based on the declaration message. If the first AP device does not receive the first response sent by the second AP device in the plurality of AP devices and used for rejecting the first AP device to be set 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, reject to set the first AP device as the master device.
After the first AP device is set as the master device, the first AP device may establish a long connection of a transmission control protocol (Transmission Control Protocol, abbreviated as TCP) with other AP devices in the ad hoc network, to form a networking state. Specifically, the address information of the first AP device may be carried in the declaration packet broadcast by the first AP device, so that when receiving the declaration packet, other AP devices may acquire the address information of the first AP device, and establish connection with the first AP device based on the address information.
In this embodiment, by broadcasting, by the first AP device, a first request for setting the first AP device as a master device, it is determined whether there is a second AP device for setting the first AP device as a master device in the ad hoc network, and if a first response sent by the second AP device in the plurality of AP devices for refusing to set the first AP device as a master device is not received, the first AP device is set as a master device, so as to implement role definition for the AP devices in the ad hoc network, and facilitate management and control of other AP devices by the master device.
In some embodiments, the first AP device receives a first response sent by a second AP device of the plurality of AP devices to refuse to set the first AP device as the master device after broadcasting the first request to set the first AP device as the master device. Thus, for the case of receiving a first response sent by a second AP device of the plurality of AP devices, the method may further include:
if a first response for rejecting setting the first AP device as a master device sent by a second AP device in the plurality of AP devices is received, and a second response for rejecting setting the first AP device as the master device sent by a third AP device in the plurality of AP devices is not received, connection is established with the second AP device, so that the first AP device is set 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 other than the first AP device. If a first request for setting the first AP device as the master device is broadcasted, a first response sent by one AP device except the first AP device among the plurality of AP devices is received, but a response sent by another AP device is not received, then connection may be directly established with the second AP device, and the second AP device is set as the master device. The process of establishing a connection with the second AP device is described in detail in the foregoing, and will not be described herein. By establishing connection with the second AP equipment, the purpose of setting the first AP equipment as slave equipment managed by the second AP equipment is achieved, and management staff 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 to realize management and control of the first AP equipment.
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, where the second response is used to reject setting the first AP device as the master device. Thus, in order for each AP device in an ad hoc network to determine its role in the ad hoc network by itself, as shown in fig. 2, the present invention also provides another embodiment of an ad hoc network management method, which may include the steps of:
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 will not be described herein.
Step 202, if a first response sent by a second AP device in the multiple AP devices for rejecting setting the first AP device as a master device is received, and a second response sent by a third AP device in the multiple AP devices for rejecting setting the first AP device as a 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, the first AP device preferentially establishes a connection with the second AP device. The process of establishing connection with the second AP device is correspondingly described in the above embodiment, and will not be described herein. At this time, if a second response for rejecting setting the first AP device as the master device is received from the third AP device in the plurality of AP devices, the priority of the second AP device and the priority of the third AP device may be compared in order to make the master device clear. Wherein the third AP device may refer to any one of the plurality of 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 a device identifier of the third AP device. So that the priority of the second AP device and the third AP device can be compared based on the device identification.
And 203, disconnecting the third AP device from the second AP device if the priority of the third AP device is higher than the priority of the second AP device according to the preset device priority relationship.
In this step, a preset device priority relationship is stored in each AP device in the ad hoc network. The device priority relationship may include device identifiers of a plurality of AP devices and priorities of the AP devices set as the master device respectively. Alternatively, the device identification may be represented as a network unique code, which may refer to an integral part of a network identification number (Identity document, abbreviated ID). At this time, the device priority relationship may include a correspondence between the network unique code sizes of the plurality of AP devices and the priority levels of the plurality of AP devices, for example, the greater the network unique code, the higher the priority of the corresponding device. Optionally, the device priority relationship may further include a correspondence between device types or device performances of the plurality of AP devices and the priority levels, for example, the higher the performance is, the higher the corresponding device priority is, for example, the higher the priority of the high-performance AP device is than the priority of the low-performance AP device. The device priority relationship may be set according to actual situations, which is not particularly limited.
And 204, establishing connection with the third AP equipment so as to set the first AP equipment as slave equipment managed by the third AP equipment.
And establishing connection with a third AP device, and setting the third AP device as a master control device. The process of establishing connection with the third AP device is correspondingly described in the above embodiment, and will not be described herein. By establishing connection with the third AP device, the purpose of setting the first AP device as the slave device managed by the third AP device is achieved, and a manager can acquire the running state information and the device information of the first AP device and issue a control instruction to the first AP device through the third AP device, so that the management and control of the first AP device are achieved.
In some embodiments, the method may further comprise:
hearing a second request broadcast by at least two AP devices of the plurality of AP devices for setting itself as a master device;
determining the equipment identification of each AP equipment according to the second request broadcast by the at least two AP equipment;
determining a fourth AP device with highest device priority from the at least two AP devices according to a preset device priority relation, wherein the device priority relation comprises device identifiers of a plurality of AP devices and priorities of the AP devices, which are respectively corresponding to the device identifiers, for setting the AP devices as main control devices;
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 application, after broadcasting a first request for setting a first AP device as a master device for an ad hoc network where the master device has not been set, a second request for setting itself as the master device, which is broadcast by at least two AP devices among the plurality of AP devices, may be intercepted. The second request broadcast by the at least two AP devices may be a declaration message broadcast by the at least two AP devices, that is, the declaration sets itself as the master device. Because the set number of the master devices in the ad hoc network is unique, for at least two AP devices whose states set themselves as the master 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 device in the ad hoc network.
Specifically, the second request, i.e., the declaration message, broadcast by each AP device may include the device identifier of each AP device. The device identity of each AP device may be determined from the second request. And further, according to the preset device priority relation, a fourth AP device with the highest device priority can be determined from the at least two AP devices. The device priority relationship may include device identifiers of a plurality of AP devices and priorities of the AP devices set as the master device respectively.
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 connection with the fourth AP device is correspondingly described in the foregoing embodiments, and will not be described herein. By establishing connection with the fourth AP device, the purpose of setting the first AP device as the slave device managed by the fourth AP device is achieved, and a manager can acquire the running state information and the device information of the first AP device and issue a control instruction to the first AP device through the fourth AP device to realize management and control of the first AP device.
In practical application, if the ad hoc network is provided with a master device, for example, after the first AP device is set as the master device, the first AP device may be further configured to discover AP devices newly added to the ad hoc network and manage the newly added AP devices, in addition to managing a plurality of AP devices in the ad hoc network. Thus, in certain embodiments, the method may further comprise:
broadcasting a third request for discovering a fifth AP device newly added to 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 a third request, so that an AP device that is within the signal coverage area but has not joined the ad hoc network can monitor the third request and join the ad hoc network. Specifically, the third request may be a join message, which may be used for the newly joined AP device to quickly discover the master device.
Thus, when the master device in the ad hoc network receives a connection request transmitted by a fifth AP device newly joining in 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 is described in the above embodiment, which is not described herein.
As shown in fig. 3, a schematic structural diagram of an embodiment of an ad hoc network management apparatus according to 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;
and the setting module 302 is configured to set the first AP device as a master device if a first response sent by a second AP device in the plurality of AP devices for refusing to set the first AP device as the master device is not received, so as to manage the plurality of AP devices in the ad hoc network.
In this embodiment, by broadcasting, by a first AP device, a first request for setting the first AP device as a master device, whether a second AP device for setting the first AP device as the master device exists in the ad hoc network is determined, and if a first response sent by the second AP device in the plurality of AP devices for refusing to set the first AP device as the master device is not received, the first AP device is set as the master device, so as to implement role definition for the AP devices in the ad hoc network, thereby facilitating management and control of other AP devices through the master device.
In some embodiments, the apparatus may further comprise:
and the first connection module is used for establishing connection with the second AP equipment if a first response which is sent by the second AP equipment in the plurality of AP equipment and used for refusing to set the first AP equipment as the master control equipment is received, and a second response which is sent by the third AP equipment in the plurality of AP equipment and used for refusing to set the first AP equipment as the master control equipment is not received, so that the first AP equipment is set as the slave equipment managed by the second AP equipment.
In some embodiments, the apparatus may further comprise:
the first determining module is used for determining the equipment identifier of the third AP equipment according to the second response if the first response is received and the second response is received;
the disconnection module is used for disconnecting with the second AP equipment if the priority of the third AP equipment is higher than the priority of the second AP equipment according to a preset equipment priority relation, wherein the equipment priority relation comprises equipment identifiers of a plurality of AP equipment and priorities which respectively correspond to the equipment identifiers and set the AP equipment as main control equipment;
and the second connection module is used for establishing connection with the third AP equipment so as to set the first AP equipment as slave equipment managed by the third AP equipment.
In some embodiments, the apparatus may further comprise:
the interception module is used for intercepting a second request which is broadcasted by at least two AP devices in the plurality of AP devices and used for setting the second request as a master control device;
a second determining module, configured to determine a device identifier of each AP device according to the second request broadcast by the at least two AP devices;
a third determining module, configured to determine a fourth AP device with a highest device priority among the at least two AP devices according to a preset device priority relationship, where the device priority relationship includes device identifiers of a plurality of AP devices and priorities corresponding to the AP devices that set the AP devices as a master device;
and the third connection module is used for 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 some embodiments, the apparatus may further comprise:
a broadcasting module for broadcasting a third request for discovering a fifth AP device newly added to the ad hoc network;
and the fourth connection module is used for establishing connection with the fifth AP equipment if receiving a connection request sent by the fifth AP equipment newly added into the ad hoc network so as to manage the fifth AP equipment.
As shown in fig. 4, a schematic structural diagram of an embodiment of an ad hoc network management system according to the present invention includes a plurality of AP devices forming an ad hoc network;
wherein the NAP device may refer to any AP device in the ad hoc network.
A first AP device of the plurality of AP devices for broadcasting a first request for setting the first AP device as a master device, wherein the first AP device is any one of the plurality of AP devices;
and if the first AP equipment does not receive a first response which is sent by a second AP equipment in the plurality of AP equipment and is used for refusing to set the first AP equipment as the master control equipment, setting the first AP equipment as the master control equipment so as to manage the plurality of AP equipment in the self-organizing network.
In this embodiment, by broadcasting, by a first AP device, a first request for setting the first AP device as a master device, whether a second AP device for setting the first AP device as the master device exists in the ad hoc network is determined, and if a first response sent by the second AP device in the plurality of AP devices for refusing to set the first AP device as the master device is not received, the first AP device is set as the master device, so as to implement role definition for the AP devices in the ad hoc network, thereby facilitating management and control of other AP devices through the master device.
In some embodiments, the first request further includes a device identifier of the first AP device;
when the equipment identifier enables the second AP equipment to receive the first request, the AP equipment with high equipment priority between the second AP equipment and the first AP equipment is set as main control equipment according to a preset equipment priority relation;
the device priority relation comprises device identifiers of a plurality of AP devices and priorities of the AP devices as main control devices, wherein the device priority relation comprises the device identifiers of the plurality of AP devices and the priorities of the AP devices as main control devices.
In practical applications, the first request may include, in addition to address information of the first AP device, a device identifier of the first AP device. The device identifier of the first AP device may be obtained when the second AP device of the plurality of AP devices receives the first request. And judging the equipment priority between the equipment identifier of the first AP equipment and the equipment identifier of the first AP equipment according to a preset equipment priority relation, and setting the AP equipment with high priority as the main control equipment. If the priority of the first AP equipment is higher than the priority of the self equipment, the second AP equipment can reply to confirm to join the self-organizing network, and establish connection with the first AP equipment so as to become slave equipment managed by the first AP equipment; if the priority of the first AP device is lower than the priority of the self device, the second AP device can reply to refuse to set the first AP device as the master control device, and the first AP device can perform role switching after receiving the first AP device.
In some embodiments, the first request further includes a network identifier of the ad hoc network;
the network identifier enables the second AP equipment to analyze the first request which is detected when the second AP equipment is determined to have the same network identifier as the first AP equipment.
In practice, the network may include one or more ad hoc networks, each having a unique network identification. The network identity 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 the second AP device receives the first request, it may determine whether the network identifier included in the first request is the same as the network identifier of the second AP device, if so, 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 then the first request that is detected may be parsed, so that interference caused by requests sent by AP devices in other ad hoc networks is avoided, and the notification process is 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 the master control devices of other ad hoc networks, determine the master control devices and network identifications of the converged ad hoc network according to the device priorities of the plurality of master control devices, and integrate the plurality of ad hoc network slave device information. The master control device may negotiate to send a merge message, where the merge message may include a device identifier and a network identifier of the master 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 applications, the master device may be responsible for managing configuration issues, configuration views, configuration synchronization, etc. of other AP devices in the ad hoc network, so as to manage other AP devices in the ad hoc network.
As shown in fig. 5, a schematic structural diagram of an embodiment of an electronic device according to the present invention includes a memory 501 and a processor 502; the memory 501 stores a computer program executable on the processor, and the processor 502 implements the ad hoc network management method shown in the above embodiment when executing the computer program.
In this embodiment, by broadcasting, by a first AP device, a first request for setting the first AP device as a master device, whether a second AP device for setting the first AP device as the master device exists in the ad hoc network is determined, and if a first response sent by the second AP device in the plurality of AP devices for refusing to set the first AP device as the master device is not received, the first AP device is set as the master device, so as to implement role definition for the AP devices in the ad hoc network, thereby facilitating management and control of other AP devices through the master device.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course by means of hardware. Based on such understanding, the foregoing technical solution may be embodied essentially or in part as a software product, which may be stored in a computer-readable storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the method described in the various embodiments or portions of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the 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 scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. An ad hoc network management method applied to a first AP device in an ad hoc network including a plurality of access point 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 in the plurality of AP devices and used for refusing to set the first AP device as a master control device is not received, setting the first AP device as the master control device so as to manage the plurality of AP devices in the ad hoc network;
the method further comprises the steps of:
if a first response for rejecting setting the first AP device as a master device sent by a second AP device in the plurality of AP devices is received, and a second response for rejecting setting the first AP device as the master device sent by a third AP device in the plurality of AP devices is not received, establishing connection with the second AP device, so as to set the first AP device as a slave device managed by the second AP device;
wherein, the first response includes the device identifier of the second AP device;
the method further comprises the steps of:
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;
disconnecting the third AP device from the second AP device if the priority of the third AP device is higher than the priority of the second AP device according to a preset device priority relationship, where the device priority relationship includes device identifiers of a plurality of AP devices and priorities corresponding to the device identifiers and the AP devices set as master control devices;
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.
2. The ad hoc network management method of claim 1, further comprising:
hearing a second request broadcast by at least two AP devices of the plurality of AP devices for setting itself as a master device;
determining the equipment identification of each AP equipment according to the second request broadcast by the at least two AP equipment;
determining a fourth AP device with highest device priority from the at least two AP devices according to a preset device priority relation, wherein the device priority relation comprises device identifiers of a plurality of AP devices and priorities of the AP devices, which are respectively corresponding to the device identifiers, for setting the AP devices as main control devices;
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.
3. The ad hoc network management method of claim 1, further comprising:
broadcasting a third request for discovering a fifth AP device newly added to 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.
4. 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 in the plurality of AP devices for rejecting the first AP device as the master device is not received, so as to manage the plurality of AP devices in the ad hoc network;
the apparatus further includes a first connection module, configured to, if a first response sent by a second AP device in the plurality of AP devices to refuse to set the first AP device as a master device is received, and a second response sent by a third AP device in the plurality of AP devices to refuse to set the first AP device as a master device is not received, establish a connection with the second AP device, so as to set the first AP device as a slave device managed by the second AP device;
wherein, the first response includes the device identifier of the second AP device;
the device further comprises a first determining module, if the first response is received and the second response is received, determining a device identifier of the third AP device according to the second response;
the disconnection module is used for disconnecting with the second AP equipment if the priority of the third AP equipment is higher than the priority of the second AP equipment according to a preset equipment priority relation, wherein the equipment priority relation comprises equipment identifiers of a plurality of AP equipment and priorities which respectively correspond to the equipment identifiers and set the AP equipment as main control equipment;
and the second connection module is used for establishing connection with the third AP equipment so as to set the first AP equipment as slave equipment managed by the third AP equipment.
5. 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 for broadcasting a first request for setting the first AP device as a master device, wherein 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 in the plurality of AP devices and used for refusing to set the first AP device as a master control device, the first AP device is set as the master control device so as to manage the plurality of AP devices in the ad hoc network;
if the first AP equipment receives a first response sent by a second AP equipment in the plurality of AP equipment and used for refusing to set the first AP equipment as a master control equipment, and does not receive a second response sent by a third AP equipment in the plurality of AP equipment and used for refusing to set the first AP equipment as the master control equipment, connection is established with the second AP equipment, so that the first AP equipment is set as a slave equipment managed by the second AP equipment;
wherein, the first response includes the device identifier of the second AP device;
if the first AP equipment receives the first response and receives the second response, determining the equipment identification of the third AP equipment according to the second response;
the first AP equipment disconnects with the second AP equipment according to a preset equipment priority relation, if the priority of the third AP equipment is higher than that of the second AP equipment, wherein the equipment priority relation comprises equipment identifiers of a plurality of AP equipment and priorities which respectively and correspondingly set the AP equipment as main control equipment; 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.
6. The ad hoc network management system of claim 5, wherein said first request further comprises a device identification of said first AP device;
when the equipment identifier enables the second AP equipment to receive the first request, the AP equipment with high equipment priority between the second AP equipment and the first AP equipment is set as main control equipment according to a preset equipment priority relation;
the device priority relation comprises device identifiers of a plurality of AP devices and priorities of the AP devices as main control devices, wherein the device priority relation comprises the device identifiers of the plurality of AP devices and the priorities of the AP devices as main control devices.
7. The ad hoc network management system of claim 5, wherein said first request further comprises a network identification of said ad hoc network;
the network identifier enables the second AP equipment to analyze the first request which is detected when the second AP equipment is determined to have the same network identifier as the first AP equipment.
8. The ad hoc network management system of claim 5, wherein if said first AP device is a master device, said first AP device is further configured to view device information of other AP devices in said ad hoc network; and managing other AP devices in the ad hoc network.
9. An electronic device comprising a memory, a processor, the memory having stored thereon a computer program executable on the processor, the processor implementing the method of any of the preceding claims 1 to 3 when the computer program is executed.
10. 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 preceding claims 1 to 3.
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 CN112533304A (en) 2021-03-19
CN112533304B true 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)

Families Citing this family (1)

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

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
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
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

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3772690B2 (en) * 2001-04-25 2006-05-10 日本電気株式会社 Service system and service method used therefor
JP5197042B2 (en) * 2008-02-05 2013-05-15 キヤノン株式会社 Communication apparatus, communication system, and network construction method
US9247482B2 (en) * 2011-08-03 2016-01-26 Harris Corporation Ad hoc wireless communications network with node role information routing and associated methods
JP5787667B2 (en) * 2011-08-23 2015-09-30 キヤノン株式会社 Network management apparatus and control method thereof, and communication apparatus and control method thereof
KR102144046B1 (en) * 2013-10-17 2020-08-13 삼성전자주식회사 Method and apparatus for connection between electronic devices
US10298744B2 (en) * 2017-10-24 2019-05-21 Comptel Oyj Method and arrangement for policy regulation of electronic communication devices

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
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
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

Also Published As

Publication number Publication date
CN112533304A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
US10805984B2 (en) Mesh node role discovery and automatic recovery
RU2670279C1 (en) Wireless device method, wireless device and computer device (options)
CN112671904B (en) Method and device for transmitting equipment state information, storage medium and electronic device
CN110933137A (en) Data synchronization method, system, equipment and readable storage medium
CN111565474B (en) Method and system for establishing communication connection between AP (access point) equipment and target terminal based on Mesh network
WO2022082724A1 (en) Method and apparatus for multicast service support in time sensitive network
GB2505230B (en) Leader node appointment
CN112533304B (en) Ad hoc network management method, device, system, electronic equipment and storage medium
EP3791635B1 (en) Switching pans while maintaining parent/child relationships
AU2019266058B2 (en) Managing connectivity for critical path nodes
US11044771B2 (en) Method and device for sharing an established connection between a primary device and one of a plurality of secondary devices in a network
WO2018033050A1 (en) Deployment method, apparatus and system based on software-defined networking
CN106034344B (en) Data transmission method and device
Talipov et al. A context-rich and extensible framework for spontaneous smartphone networking
KR20190108255A (en) Method and apparatus for controlling mobile ad-hoc network based on software-defined network
CN112188593B (en) Wireless configuration method and device, storage medium and electronic device
US20200236180A1 (en) Apparatus and method for communication, and storage medium
US20240098621A1 (en) Radio discovery for a mesh access point (ap)
Mao Towards Connectionless Communication for Local Message Dissemination
US20190349277A1 (en) Information element to indicate loss of backhaul connection
CN115842769A (en) Information updating method and device, storage medium and electronic device
KR100714807B1 (en) Method and apparatus for managing a neighbor table of a subscriber card in ipv6 software forwarding router system
CN117882422A (en) Optimization of GNB fault detection and fast activation of fallback mechanism
CN115866620A (en) Mesh network distribution method, device, storage medium and Mesh network
Yin et al. SSN: a seamless spontaneous network design around opportunistic contacts

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