Communication method and device, medium, electronic equipment and program product

By dynamically detecting and comparing the number of neighbors of nodes in the wireless ad hoc network, the selection of logical center nodes is solved, and the network performance and stability are improved.

CN120075944APending Publication Date: 2025-05-30BEIJING HEFENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510078958.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The selection of logical center nodes in existing wireless ad hoc networks mainly depends on the ID number of the node, and the actual performance factors of the node are not taken into account, resulting in random selection of the center nodes, affecting network performance.

Method used

By storing the identity of the candidate center node and the number of neighbors within the preset detection time, each node stores the identity of the candidate center node and broadcasts this information wirelessly. The neighbor node updates its candidate center node identification according to the received message, preferentially selects nodes with a large number of neighbors, and finally determines the node with the largest number of neighbors as the logical center node.

Benefits of technology

By considering the actual performance of nodes (i.e. the number of connected neighbors), the choice of logical center nodes is more reasonable, and the performance and stability of the entire network are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075944A_ABST
    Figure CN120075944A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and provides a communication method and device, a medium, electronic equipment and a program product, and the method comprises the steps: storing a first identifier of a candidate center node in response to a first node within a preset detection time, and carrying out the wireless broadcasting of a first notification message, the first notification message comprising the number of first neighbors and the first identifier; receiving a second notification message broadcasted by a second node, wherein the second notification message comprises a second identifier and a second neighbor number; if the number of the first neighbors is smaller than the number of the second neighbors, updating and storing the identifier of the candidate center node corresponding to the number of the second neighbors to the first node, and returning to execute the operation of storing the first identifier of the candidate center node in response to the first node, and wirelessly broadcasting a first notification message; and when the preset detection duration ends, determining the candidate center node corresponding to the latest stored identifier of the first node as a logic center node, the logic center node being used for constructing the first wireless ad hoc network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technologies, and in particular, to a communication method, apparatus, medium, electronic device, and program product. Background Art

[0002] A wireless ad hoc network is a multi-hop, centerless, and self-organizing wireless network. The characteristics of this network are that all nodes in the network have equal status, no central control node needs to be set, each node is both a host and a router, nodes can communicate with each other through multi-hop relay to solve the problem of short single-hop coverage distance, nodes can leave or join the network at any time, as nodes move, the topology of the network changes dynamically, and the routing of nodes is also updated dynamically. When some nodes in the network are damaged and cannot be used due to interference or other factors, these invalid nodes can be avoided through the update of the routing table. Therefore, it has strong robustness and survivability.

[0003] In the related art, the method for determining the logical center node usually depends on simply comparing the ID numbers of nodes, and then selecting a node as the logical center for centralized resource scheduling. However, this method has a significant defect: it only selects based on the ID number and does not consider the actual performance factors of the nodes, which results in the selection of the center node being largely random, thus affecting the performance of the entire network. Summary of the Invention

[0004] The purpose of the present disclosure is to provide a communication method, apparatus, medium, electronic device, and program product to solve the problems in the related art.

[0005] A communication method is applied to a first node. The communication method includes: Within a preset detection duration, in response to the first node storing the first identifier of a candidate center node, wirelessly broadcast a first notification message, where the first notification message includes the first neighbor quantity of the candidate center node currently stored by the first node and the first identifier, and the first notification message is used for a second node to determine whether to update the identifier of the candidate center node stored by itself. The second node is a neighbor node of the first node, and the neighbor node is a node within the wireless communication range of the first node; Receive a second notification message broadcast by the second node, where the second notification message includes the second identifier of the candidate center node currently stored by the second node and the second neighbor quantity of this candidate center node; If the number of the first neighbors of the candidate central node currently stored by the first node is less than the number of the second neighbors, update and store the identifier of the candidate central node corresponding to the number of the second neighbors in the first node, and return to execute the step of wirelessly broadcasting a first notification message in response to the first node storing the first identifier of the candidate central node; At the end of a preset detection duration, determine the candidate central node corresponding to the identifier most recently stored by the first node as the logical central node, where the logical central node is used to construct a first wireless ad hoc network.

[0006] Optionally, the communication method further includes: When the first node is the logical central node, obtain an access application sent by a node to be joined; judge whether to allow the node to be joined according to the current node access situation of the first wireless ad hoc network; When allowing the node to be joined, generate access confirmation information and send the access confirmation information to the node to be joined.

[0007] Optionally, the communication method further includes: When the first node is not the logical central node, if the first node has service data to send, generate a resource application message according to the service data and the destination node for receiving the service data; send the resource application message to the logical central node; When the first node is the logical central node, perform resource allocation according to the resource application message to generate resource scheduling information, and send the resource scheduling information to the nodes on the routing path, where the resource scheduling information includes slot resource allocation for a service flow, and the routing path includes a sequence of nodes passed between the originating node for sending the service data and the destination node for receiving the service data.

[0008] Optionally, the generating a resource application message according to the service data and the destination node for receiving the service data includes: determine a routing path between the originating node and the destination node according to the topological relationship between the nodes in the first wireless ad hoc network; generate a resource application message according to the service data and the routing path.

[0009] Optionally, the communication method further includes: When the first node is not the logical central node, If a second wireless ad hoc network is detected by scanning, obtain the number of nodes in the second wireless ad hoc network; Send the number of nodes in the second wireless ad hoc network to the logical central node; When the first node is the logical central node, Generate a grid connection instruction according to the number of nodes in the second wireless ad hoc network and the number of nodes in the first wireless ad hoc network, and send the grid connection instruction to each node in the first wireless ad hoc network.

[0010] The present disclosure also provides a communication device applied to a first node. The communication device includes: A first processing module, configured to wirelessly broadcast a first notification message within a preset detection duration in response to the first node storing a first identifier of a candidate central node. The first notification message includes the number of first neighbors of the candidate central node currently stored by the first node and the first identifier. The first notification message is used for a second node to determine whether to update the identifier of the candidate central node stored by itself. The second node is a neighbor node of the first node, and the neighbor node is a node within the wireless communication range of the first node; A second processing module, configured to receive a second notification message broadcast by the second node. The second notification message includes a second identifier of the candidate central node currently stored by the second node and the number of second neighbors of the candidate central node; A third processing module, configured to, if the number of first neighbors of the candidate central node currently stored by the first node is less than the number of second neighbors, update and store the identifier of the candidate central node corresponding to the number of second neighbors in the first node, and return to execute the step of wirelessly broadcasting the first notification message in response to the first node storing the first identifier of the candidate central node; A fourth processing module, configured to determine the candidate central node corresponding to the latest stored identifier of the first node as the logical central node at the end of the preset detection duration. The logical central node is used to construct a first wireless ad hoc network.

[0011] Optionally, the communication device further includes: A fifth processing module, configured to obtain an access application sent by a node to be joined when the first node is the logical central node; A sixth processing module, configured to determine whether to allow the node to be joined according to the current node access situation of the first wireless ad hoc network; A seventh processing module, configured to generate access confirmation information and send the access confirmation information to the node to be joined when allowing the node to be joined.

[0012] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the communication method described in any one of the above are implemented.

[0013] The present disclosure also provides an electronic device, including: a memory, on which a computer program is stored; a processor, configured to execute the computer program in the memory to implement the steps of the communication method described in any one of the above.

[0014] The present disclosure also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the wireless ad-hoc network communication method described in any one of the above are implemented.

[0015] By adopting the above technical solution, the selection of the logical central node in the wireless ad-hoc network is optimized by dynamically detecting and comparing the number of neighbors of nodes. During a preset detection duration, each first node stores the identifier and the number of neighbors of a candidate central node, and broadcasts this information wirelessly. Neighbor nodes update their candidate central node identifiers according to the received messages, and preferentially select the node with a larger number of neighbors. This process is iteratively performed until the detection ends, and finally the node with the largest number of neighbors is determined as the logical central node. The logical central node in the network is no longer randomly selected, but a node with better performance is evaluated and selected as the logical central node based on the actual number of neighbors. By considering the actual performance of the nodes (i.e., the number of connected neighbors), the selection of the logical central node is made more reasonable, thereby improving the performance and stability of the entire network.

[0016] Other features and advantages of the present disclosure will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings are used to provide a further understanding of the present disclosure, and constitute a part of the specification. They are used together with the following specific implementation to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the drawings: Figure 1 is a flowchart of a communication method shown according to an exemplary embodiment.

[0018] Figure 2 is a flowchart of an access application shown according to an exemplary embodiment.

[0019] Figure 3 is a flowchart of a routing shown according to an exemplary embodiment.

[0020] Figure 4 is a flowchart of a resource scheduling shown according to an exemplary embodiment.

[0021] Figure 5 It is a block diagram of a communication device shown according to an exemplary embodiment.

[0022] Figure 6 It is a block diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners

[0023] The following will describe the detailed implementation manners of the present disclosure with reference to the accompanying drawings. It should be understood that the detailed implementation manners described herein are only for explaining and illustrating the present disclosure, and are not used to limit the present disclosure.

[0024] The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0025] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or mutual dependence relationship of the functions executed by these devices, modules or units.

[0026] A wireless ad hoc network is a multi-hop, centerless, self-organizing wireless network. The characteristics of this network are that all nodes in the network have equal status, no central control node needs to be set, each node is both a host and a router, nodes can communicate with each other through multi-hop relay to solve the problem of short single-hop coverage distance, nodes can leave or join the network at any time, as the nodes move, the topology of the network changes dynamically, and the routing of the nodes is also updated dynamically. When some nodes in the network are damaged and cannot be used due to interference or other factors, the routing table can be updated to avoid these invalid nodes, so it has strong robustness and survivability.

[0027] In the related art, the method for determining the logical central node usually depends on simply comparing the ID numbers of the nodes, and then selecting a node as the logical center for centralized resource scheduling. However, this method has a significant defect: it only selects based on the ID number and does not consider the actual performance factors of the nodes, which results in the selection of the central node being largely random, thus affecting the performance of the entire network.

[0028] To solve the above problems, the selection of the logical central node in the wireless ad hoc network is optimized by dynamically detecting and comparing the number of neighbors of nodes. During a preset detection duration, each first node stores the identifier and the number of neighbors of the candidate central node, and broadcasts this information wirelessly. The neighbor nodes update their candidate central node identifiers according to the received messages, and preferentially select the node with a larger number of neighbors. This process is iterated until the detection ends, and finally the node with the most neighbors is determined as the logical central node. The logical central node in the network is no longer randomly selected, but rather a node with better performance is evaluated and selected as the logical central node based on the actual number of neighbors. This method takes into account the actual performance of the nodes (i.e., the number of connected neighbors), making the selection of the logical central node more reasonable, thereby improving the performance and stability of the entire network.

[0029] An embodiment of the present disclosure provides a communication method, which is applied to a first node. Figure 1 It is a flowchart of a communication method shown according to an exemplary embodiment. Please refer to Figure 1 This communication method may include steps S1 to S4.

[0030] Step S1, within a preset detection duration, in response to the first node storing the first identifier of the candidate central node, wirelessly broadcast a first notification message.

[0031] The first notification message includes the first number of neighbors and the first identifier of the candidate central node stored by the first node this time. The first notification message is used for the second node to determine whether to update the identifier of the candidate central node stored by itself. The second node is a neighbor node of the first node, and the neighbor node is a node within the wireless communication range of the first node.

[0032] The neighbor node may refer to a node within the wireless communication range of the first node, and they can receive the wireless broadcast message of the first node.

[0033] The first identifier may be the unique identifier of the candidate central node stored by the first node this time.

[0034] The first number of neighbors may be the number of neighbor nodes of the candidate central node stored by the first node this time.

[0035] It should be understood that the candidate central node initially stored by the first node may be the first node itself. The unique identifier of the first node is used as the initial first identifier, and the number of neighbor nodes of the first node is used as the initial first number of neighbors.

[0036] Step S2, receive a second notification message broadcast by the second node.

[0037] The second notification message includes the second identifier of the candidate central node currently stored by the second node and the second neighbor count of the candidate central node.

[0038] The second identifier may be the unique identifier of the candidate central node currently stored by the second node.

[0039] The second neighbor count may be the number of neighbor nodes of the candidate central node currently stored by the second node.

[0040] Step S3, if the first neighbor count of the candidate central node currently stored by the first node is less than the second neighbor count, then update and store the identifier of the candidate central node corresponding to the second neighbor count in the first node, and return to execute the step of wirelessly broadcasting the first notification message in response to the first identifier of the candidate central node stored by the first node.

[0041] Updating and storing the identifier of the candidate central node corresponding to the second neighbor count in the first node can be understood as updating the information of the candidate central node stored in the first node (including the first identifier and the first neighbor count) to the information of the candidate central node stored in the second node (including the second identifier and the second neighbor count), that is, replacing the original first identifier with the second identifier and replacing the original first neighbor count with the second neighbor count.

[0042] Step S4, at the end of the preset detection duration, determine the candidate central node corresponding to the latest stored identifier of the first node as the logical central node.

[0043] The logical central node is used to construct the first wireless ad hoc network.

[0044] After step S3, the first node and the second node both store the information of the same candidate central node (including the identifier and the neighbor count). Then, iterate and spread according to this rule until the preset detection duration ends, so that the nodes within a certain range all store the information of the same candidate central node. This candidate central node also corresponds to the latest stored identifier of the first node. Determine this candidate central node as the logical central node.

[0045] After detecting for the preset detection duration, if the first node discovers that the logical central node of the final candidate network is its own identifier, then enter the networking state and set itself as the logical central node. At this time, there is only one node, the logical central node, in the first wireless ad hoc network. Then, the logical central node starts to send control information on the control channel. The control information includes the system broadcast information of the first wireless ad hoc network. Other non-connected nodes will think that there is an ad hoc network when they receive the system broadcast information on the control information, and thus enter the network connection process.

[0046] The logical central node plays a core role in the first wireless ad hoc network, responsible for network construction, identity management, dynamic maintenance, splitting and merging operations, and ensuring wide network coverage and efficient communication. Resource allocation for the first wireless ad hoc network through the logical central node can also ensure the reliability and fairness of resource allocation and reduce resource collision problems caused by hidden terminals in distributed scheduling.

[0047] The present disclosure can use time division multiple access for networking. According to the functional type, it is divided into several logical channels, namely access channel, resource application channel, control channel, service channel, and scanning channel. The access channel is used to send access requests from newly joined nodes. All joined nodes compete to use the access channel. After receiving an access request on the access channel, the relay node needs to forward it in the subsequent access channel time slot and send the access request to the logical central node in a multi-hop manner. The logical central node makes a decision on the access request.

[0048] The resource application channel is used for nodes to apply for wireless resources when they have service requirements. The resource application channel is also a contention channel. When the intermediate node receives a resource application message, it needs to help forward it in the subsequent resource application channel time slot and send the resource application request to the logical central node in a multi-hop manner. The logical central node makes unified resource allocation according to the resource application situation of the whole network.

[0049] The control channel is used to send control information. The control information mainly includes network system broadcast information and topology information. Each node sends control information on its corresponding control channel and also receives control information from other nodes on the control channels of other nodes.

[0050] The logical central node also uses the control channel to send access confirmation information and resource scheduling information. After the resources are allocated, the logical central node sends resource scheduling information on its own control channel. After receiving the scheduling information, each relay node needs to forward the message on its own control channel, so that the whole network can obtain the resource scheduling information through multi-hop.

[0051] The service channel is used to send service data, which is allocated by the logical central node to each node with service requirements, and it is ensured that the allocated service channels do not conflict between nodes.

[0052] The scanning channel is used to discover other networks and perform network fusion according to requirements.

[0053] Optimize the selection of the logical central node in a wireless ad hoc network by dynamically detecting and comparing the number of neighbors of nodes. During a preset detection duration, each first node stores the identifier and the number of neighbors of the candidate central node and broadcasts this information wirelessly. Neighbor nodes update their candidate central node identifiers according to the received messages and preferentially select the node with a larger number of neighbors. This process is iterated until the detection ends, and finally, the node with the most neighbors is determined as the logical central node. The logical central node in the network is no longer randomly selected, but rather, a node with better performance is evaluated and selected as the logical central node based on the actual number of neighbors. This method takes into account the actual performance of the nodes (i.e., the number of connected neighbors), making the selection of the logical central node more reasonable, thereby improving the performance and stability of the entire network.

[0054] In a possible implementation manner, based on the above logical central node, a network access application process is provided. The communication method may further include: When the first node is the logical central node, obtain the access application sent by the node to be joined; determine whether to allow the node to be joined according to the current node access situation of the first wireless ad hoc network; when allowing the node to be joined, generate network access confirmation information and send the network access confirmation information to the node to be joined.

[0055] The logical central node receives the access application from the node to be joined. The access application may be, but is not limited to, a signal, message, or data packet, indicating that the node to be joined hopes to become part of the first wireless ad hoc network.

[0056] The logical central node determines whether to allow the node to be joined to the network according to the node access situation of the first wireless ad hoc network. This determination may be based on factors such as network capacity, security, network policies, and network topology to ensure that the addition of a new node will not have a negative impact on the network performance of the existing first wireless ad hoc network.

[0057] Exemplarily, if the network is already very congested, new nodes may not be allowed to join to avoid further congestion. Consider the resource situation of the network, including bandwidth, power, storage, etc. If the network resources are sufficient and the addition of a new node is unlikely to affect the existing quality of service, then new nodes may be allowed to join.

[0058] The network access confirmation information may include an instruction to confirm joining, network configuration information (e.g., IP address, network mask, routing information), and security credentials (e.g., encryption key or authentication token).

[0059] It should be understood that the logical center node receives the access application from the node to be joined, or sends the network access confirmation information to the node to be joined, all of which are completed through wireless network transmission. If the logical center node is far away from the node to be joined, exceeding the range of a single wireless transmission, multi-hop transmission can be performed through intermediate nodes (other nodes in the first wireless self-organizing network), that is, the data is first sent to the nearest node, and then forwarded to the next node by the node until it reaches the destination node.

[0060] For example, see Figure 2 , after startup, nodes that have not joined the network discover whether there is an existing self-organizing network by scanning the network. When receiving the system broadcast information sent by the node in the network on the control channel, it can switch to the network access process. The node to be joined initiates an access application on the access channel of the next cycle according to the system broadcast information. After receiving the access application, the neighboring node forwards the access application on the subsequent access channel time slot. After multi-hop forwarding, the access application is received by the logical central node. The logical central node allows new nodes to join the network based on the current network scale of the first wireless self-organizing network, provided that the maximum scale of the network is not exceeded, and generates network access confirmation information for multi-hop forwarding on the control channel. Otherwise, when the first wireless self-organizing network has reached its maximum scale, new nodes are denied network access. When the node to be joined receives the network access confirmation information from the logical central node on the control channel, the network access is successful. Otherwise, continue to return to the startup process.

[0061] In a possible implementation, the communication method may further include: In the case where the first node is a non-logical central node, if the first node has service data to be sent, a resource application message is generated according to the service data and a destination node for receiving the service data; and the resource application message is sent to the logical central node.

[0062] The resource request message may include the identifier of the initiating node, the characteristics of the service data and the identifier of the destination node, wherein the characteristics of the service data may include information such as data size, priority, and quality of service requirements.

[0063] The first node sends a resource request message to the logical central node via wireless transmission. It should be understood that if the distance between the logical central node and the first node is far and exceeds the range of a single wireless transmission, multi-hop transmission can be performed through intermediate nodes.

[0064] When the first node is a logical central node, resource allocation is performed according to the resource application message to generate resource scheduling information, and the resource scheduling information is sent to the nodes on the routing path, wherein the resource scheduling information includes time slot resource allocation for the service flow, and the routing path includes a sequence of nodes passed between an initiating node for sending service data and a destination node for receiving service data.

[0065] After receiving the resource application message sent by the first node (initiating node), the logical central node can first determine the routing path based on the initiating node, the target node, and in combination with the topological information of the first wireless ad-hoc network, and then make a decision on resource allocation according to the service data characteristics and the routing path contained in the message. This allocation decision is evaluated based on the current resource status of the first wireless ad-hoc network (such as available bandwidth, power, time slots, etc.).

[0066] Each node on the routing path needs to adjust its sending and receiving behaviors according to the received resource scheduling information to ensure that data can be transmitted at the correct time and using the correct resources, so as to avoid conflicts and improve network efficiency.

[0067] Sending the resource scheduling information to the nodes on the routing path can be understood as first encapsulating the resource scheduling information into a control message. The control message carries necessary resource allocation details so that each node on the routing path can understand and execute the resource scheduling decision, and then sending the resource scheduling information to all relevant nodes on the routing path through broadcast or multicast. If a node is not within the direct communication range, multi-hop transmission can be performed through intermediate nodes.

[0068] In a possible implementation manner, the determination of the routing path can also be performed by the initiating node, that is, according to the service data and the destination node receiving the service data, a resource application message can be generated, including: Determine the routing path between the initiating node and the destination node according to the topological relationship between each node in the first wireless ad-hoc network; Generate a resource application message according to the service data and the routing path.

[0069] Exemplarily, please refer to Figure 3 , using a table-driven routing protocol, each node periodically sends control information on the control channel. The control information contains the topological information composed of all neighbor nodes that can be received so far. All nodes wait to receive the control information of neighbor nodes on non-its own control channels, so as to obtain the topological information of its one-hop neighbor nodes. Since the control information not only contains the topological information of the neighbors of the originating node itself, but also forwards the topological information of other nodes received from neighbor nodes, the topological information of each node is broadcast to the whole network through multi-hop forwarding of in-network nodes, and each node can obtain the topological information of the whole network. Through the whole-network topological relationship graph, based on common routing algorithms, such as the dijkstra algorithm, the shortest path between any two nodes can be obtained.

[0070] Please refer to Figure 4, each node counts the service data and destination nodes sent by the upper-layer protocol, generates a resource application message, and requests resource allocation from the logical central node through the resource application channel. In addition to the required resources, each destination node in the resource application message also includes the complete route from the originating node to the destination node. Neighbor nodes receive the resource application message on the resource application channel and forward the resource application message on the next resource application channel. After being forwarded by each neighbor node, the resource application message is finally received by the logical central node.

[0071] After the logical central node counts all the received resource application messages, it uniformly performs resource allocation. The resource allocation strategy can be first-come, first-served, or other strategies such as proportional allocation, and finally a resource allocation table is obtained. Each item in the resource allocation table includes the originating node, the destination node, the allocated resources, and the intermediate forwarding node information from the originating node to the destination node.

[0072] The logical central node maps the resource allocation table to resource scheduling information and forwards it through the control channel. After each node receives the resource scheduling information, it forwards it on its own control channel. After multi-hop forwarding, all nodes in the network can receive the resource scheduling information.

[0073] Each node can calculate the time slot resources corresponding to each service flow according to the resource scheduling information. For the nodes that need to participate in the service, wait to send and receive services on the corresponding service channel. For the nodes that do not need to participate in the service, continue to maintain the power-saving state and turn off the sending and receiving switches on the service channel.

[0074] In a possible implementation manner, the communication method may further include: When the first node is a non-logical central node, if a second wireless ad hoc network is scanned and the number of nodes in the second wireless ad hoc network is obtained, the number of nodes in the second wireless ad hoc network is sent to the logical central node; When the first node is a logical central node, a network connection instruction is generated according to the number of nodes in the second wireless ad hoc network and the number of nodes in the first wireless ad hoc network, and the network connection instruction is sent to each node in the first wireless ad hoc network.

[0075] Generating a network connection instruction according to the number of nodes in the second wireless ad hoc network and the number of nodes in the first wireless ad hoc network can be understood as follows: when the number of nodes in the second wireless ad hoc network is greater than the number of nodes in the first wireless ad hoc network, a network connection instruction for instructing the first wireless ad hoc network to be incorporated into the second wireless ad hoc network is generated; when the number of nodes in the second wireless ad hoc network is less than or equal to the number of nodes in the first wireless ad hoc network, a network connection instruction for instructing the second wireless ad hoc network to be incorporated into the first wireless ad hoc network is generated.

[0076] Exemplarily, when there are multiple logical network centers, nodes belonging to different logical networks respectively generate multiple different wireless ad hoc networks. The boundary nodes of the wireless ad hoc networks scan and discover neighbor networks during idle time slots. After receiving the control information of the neighbor networks, the ID of the logical central node of the neighbor network and the number of nodes in the neighbor network can be obtained from the control information. According to the principle of small network merging into large network, if the number of nodes in the local network is smaller than the scanned network, the discovery of the new network is reported to the logical central node of the local network. The logical central node notifies the nodes in the network to switch networks according to the reported new network information.

[0077] Based on the same inventive concept, to implement the above method embodiments, this embodiment provides a communication device, as Figure 5 shown. The communication device is applied to the first node. The communication device 600 may include: A first processing module 601, configured to wirelessly broadcast a first notification message in response to the first node storing a first identifier of a candidate central node within a preset detection duration. The first notification message includes the first neighbor quantity and the first identifier of the candidate central node currently stored by the first node. The first notification message is used for the second node to determine whether to update the identifier of the candidate central node stored by itself. The second node is a neighbor node of the first node, and the neighbor node is a node within the wireless communication range of the first node; A second processing module 602, configured to receive a second notification message broadcast by the second node. The second notification message includes a second identifier of the candidate central node currently stored by the second node and the second neighbor quantity of the candidate central node; A third processing module 603, configured to, if the first neighbor quantity of the candidate central node currently stored by the first node is less than the second neighbor quantity, update and store the identifier of the candidate central node corresponding to the second neighbor quantity in the first node, and return to execute the step of wirelessly broadcasting the first notification message in response to the first node storing the first identifier of the candidate central node; A fourth processing module 604, configured to determine the candidate central node corresponding to the latest stored identifier of the first node as the logical central node at the end of the preset detection duration. The logical central node is used to construct the first wireless ad hoc network.

[0078] Optionally, the communication device 600 may further include: A fifth processing module, configured to obtain an access application sent by a node to be joined when the first node is the logical central node; A sixth processing module, configured to determine whether to allow the node to be joined according to the current node access situation of the first wireless ad hoc network; The seventh processing module is configured to generate an access confirmation message and send the access confirmation message to the node to be joined when allowing the node to be joined.

[0079] Optionally, the communication device 600 may further include: The eighth processing module is configured to generate a resource application message according to the service data and the destination node receiving the service data and send the resource application message to the logical central node when the first node is a non-logical central node and there is service data to be sent by the first node; The ninth processing module is configured to perform resource allocation according to the resource application message to generate resource scheduling information and send the resource scheduling information to the nodes on the routing path when the first node is a logical central node, where the resource scheduling information includes time slot resource allocation of the service flow, and the routing path includes a sequence of nodes passed between the originating node sending the service data and the destination node receiving the service data.

[0080] Optionally, the eighth processing module is specifically configured to: Determine the routing path between the originating node and the destination node according to the topological relationship between the nodes in the first wireless ad hoc network; Generate a resource application message according to the service data and the routing path.

[0081] Optionally, the communication device 600 may further include: The tenth processing module is configured to obtain the number of nodes in the second wireless ad hoc network and send the number of nodes in the second wireless ad hoc network to the logical central node when the first node is a non-logical central node and the second wireless ad hoc network is scanned; The eleventh processing module is configured to generate a network connection instruction according to the number of nodes in the second wireless ad hoc network and the number of nodes in the first wireless ad hoc network and send the network connection instruction to each node in the first wireless ad hoc network when the first node is a logical central node.

[0082] Regarding the communication device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the communication method, and will not be elaborated herein.

[0083] Figure 6 is a block diagram of an electronic device 700 shown according to an exemplary embodiment. The electronic device may be the first node, as Figure 6 shown, the electronic device 700 may include: a processor 701, a memory 702. The electronic device 700 may further include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.

[0084] Among them, the processor 701 is used to control the overall operation of the electronic device 700 to complete all or part of the steps in the above communication method. The memory 702 is used to store various types of data to support the operation of the electronic device 700. These data may include, for example, instructions for any application or method operating on the electronic device 700, as well as application-related data, such as contact data, received and sent messages, pictures, audio, video, and so on. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disc. The multimedia component 703 may include a screen and an audio component. Among them, the screen may be a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 702 or sent through the communication component 705. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 704 provides an interface between the processor 701 and other interface modules. The above other interface modules may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, near field communication (NFC), 2G, 3G or 4G, or a combination of one or more of them. Accordingly, the communication component 705 may include: a Wi-Fi module, a Bluetooth module, an NFC module.

[0085] In an exemplary embodiment, the electronic device 700 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, and is used to execute the above-mentioned communication method.

[0086] In another exemplary embodiment, a computer-readable storage medium including program instructions is further provided. When the program instructions are executed by a processor, the steps of the above-mentioned communication method are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 702 including program instructions, and the above-mentioned program instructions can be executed by the processor 701 of the electronic device 700 to complete the above-mentioned communication method.

[0087] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a processor. When the computer program is executed by the processor, the steps of the above-mentioned communication method are implemented.

[0088] The preferred embodiments of the present disclosure have been described in detail above in conjunction with the accompanying drawings. However, the present disclosure is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present disclosure, various simple modifications can be made to the technical solutions of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0089] In addition, it should be noted that, in the various specific technical features described in the above specific embodiments, they can be combined in any suitable manner without conflict. To avoid unnecessary repetition, the present disclosure will not separately describe various possible combination methods.

[0090] Furthermore, any combination can be made between various different embodiments of the present disclosure as long as it does not violate the idea of the present disclosure, and it should also be regarded as the content disclosed by the present disclosure.

Claims

1. A communication method, characterized in that: Applied to the first node, the communication method includes: Within a preset detection time length, in response to the first node storing the first identifier of the candidate central node, wirelessly broadcasting a first notification message, the first notification message including the first number of neighbors of the candidate central node stored by the first node this time and the first identifier, the first notification message is used by the second node to determine whether to update the identifier of the candidate central node stored by itself, the second node is a neighbor node of the first node, and the neighbor node is a node within the wireless communication range of the first node; receiving a second notification message broadcast by the second node, where the second notification message includes a second identifier of the candidate central node currently stored by the second node and a second number of neighbors of the candidate central node; If the number of the first neighbors of the candidate central node currently stored by the first node is less than the number of the second neighbors, updating and storing the identifier of the candidate central node corresponding to the second number of neighbors in the first node, and returning to execute the step of wirelessly broadcasting the first notification message in response to the first node storing the first identifier of the candidate central node; When the preset detection time period ends, the candidate central node corresponding to the identifier most recently stored by the first node is determined as the logical central node, and the logical central node is used to construct the first wireless ad hoc network.

2. The communication method according to claim 1, characterized in that: The communication method further comprises: In the case where the first node is the logical central node, Obtain access request from the node to be joined; Determining whether to allow the node to be joined to join according to the current node access status of the first wireless ad hoc network; In the case where the node to be joined is allowed to join, network access confirmation information is generated and sent to the node to be joined.

3. The communication method according to claim 1, characterized in that: The communication method further comprises: In the case where the first node is not the logical central node, If the first node has service data to be sent, generating a resource request message according to the service data and a destination node for receiving the service data; Sending the resource request message to the logical central node; In the case where the first node is the logical central node, Resource allocation is performed according to the resource application message to generate resource scheduling information, and the resource scheduling information is sent to the nodes on the routing path, wherein the resource scheduling information includes time slot resource allocation for the service flow, and the routing path includes a sequence of nodes passed between an initiating node for sending the service data and a destination node for receiving the service data.

4. The communication method according to claim 3, characterized in that: The generating a resource request message according to the service data and a destination node receiving the service data comprises: Determine a routing path from an initiating node to a destination node according to a topological relationship between nodes in the first wireless ad hoc network; A resource request message is generated according to the service data and the routing path.

5. The communication method according to claim 1, characterized in that: The communication method further comprises: In the case where the first node is not the logical central node, If a second wireless ad hoc network is found by scanning, obtaining the number of nodes in the second wireless ad hoc network; Sending the number of nodes of the second wireless ad hoc network to the logical central node; In the case where the first node is the logical central node, A network connection instruction is generated according to the number of nodes in the second wireless ad hoc network and the number of nodes in the first wireless ad hoc network, and the network connection instruction is sent to each node in the first wireless ad hoc network.

6. A communication device, characterized in that: Applied to a first node, the communication device comprises: A first processing module is configured to wirelessly broadcast a first notification message within a preset detection time length in response to the first node storing a first identifier of a candidate central node, wherein the first notification message includes the number of first neighbors of the candidate central node stored by the first node this time and the first identifier, and the first notification message is used by the second node to determine whether to update the identifier of the candidate central node stored by itself, and the second node is a neighbor node of the first node, and the neighbor node is a node within the wireless communication range of the first node; A second processing module is configured to receive a second notification message broadcast by the second node, where the second notification message includes a second identifier of the candidate central node currently stored by the second node and a second number of neighbors of the candidate central node; a third processing module, configured to update and store the identifier of the candidate central node corresponding to the second number of neighbors to the first node if the number of the first neighbors of the candidate central node currently stored by the first node is less than the second number of neighbors, and return to execute the step of wirelessly broadcasting the first notification message in response to the first node storing the first identifier of the candidate central node; The fourth processing module is configured to determine, when the preset detection time period ends, the candidate central node corresponding to the identifier most recently stored by the first node as a logical central node, and the logical central node is used to construct the first wireless ad hoc network.

7. The communication device according to claim 6, characterized in that: The communication device further comprises: a fifth processing module, configured to, when the first node is the logical central node, obtain an access application issued by a node to be joined; A sixth processing module is configured to determine whether to allow the node to be joined to join according to the current node access status of the first wireless ad hoc network; The seventh processing module is configured to generate network access confirmation information and send the network access confirmation information to the node to be added if the node to be added is allowed to join.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the communication method described in any one of claims 1 to 5 are implemented.

9. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the communication method according to any one of claims 1 to 5.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the wireless ad hoc network communication method described in any one of claims 1 to 5 are implemented.