Communication method and apparatus, electronic device, and computer-readable storage medium

By introducing control nodes into the self-organizing network, assigning network addresses to terminal devices, and establishing a wireless local area network, the difficulty of communication between vehicle-mounted systems and mobile terminals in areas without public network service is solved, realizing internal and external communication between devices and improving communication flexibility and security.

CN115515207BActive Publication Date: 2025-12-19HUBEI XINGJI MEIZU TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211144154.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-20
Publication Date
2025-12-19
Estimated Expiration
2042-09-20

AI Technical Summary

Technical Problem

In areas without public network services, communication between the vehicle system and mobile terminals, especially in special scenarios such as when traveling in remote areas, cannot be achieved, leading to security risks.

Method used

By introducing a control node into the ad hoc network, the wireless access request of the terminal device is received, and a network address is assigned to it, enabling it to access the ad hoc network. The wireless local area network is established using unlicensed spectrum, realizing internal communication between devices, and enabling external communication when basic communication capabilities are available.

Benefits of technology

In the absence of communication infrastructure, internal communication between devices is achieved, and communication between devices with communication capabilities and external networks is established, solving the communication difficulties in areas without public network services and improving the security and flexibility between devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115515207B_ABST
    Figure CN115515207B_ABST
Patent Text Reader

Abstract

A communication method, a communication device, an electronic device and a computer readable storage medium. The communication method is applied to a control node in an ad hoc network. The communication method comprises: receiving a wireless access request provided by a first terminal device, the wireless access request being used to request access to the ad hoc network; and in response to allowing the first terminal device to access the ad hoc network, allocating a first network address for the first terminal device to communicate in the ad hoc network, so that the first terminal device accesses the ad hoc network and communicates in the ad hoc network using the first network address. The method can establish an ad hoc network by using a control node, so that internal intercommunication can be realized through the self-organized network even in a communication infrastructure-free scenario, and once a device in the ad hoc network has basic communication capability, other devices in the ad hoc network can also realize intercommunication with the outside through the device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to a communication method, apparatus, electronic device and computer readable storage medium. BACKGROUND

[0002] With the rapid development of handheld terminals and the intelligent improvement of cars, the communication capabilities of mobile terminals, car machine systems and other devices are becoming stronger and stronger. At present, the handheld terminal of a car user and the car machine system of the car itself mainly communicate through a public communication network. SUMMARY

[0003] At least one embodiment of the present disclosure provides a communication method applied to a control node in an ad hoc network, the method comprising: receiving a wireless access request provided by a first terminal device, wherein the wireless access request is used to request access to the ad hoc network; and in response to allowing the first terminal device to access the ad hoc network, allocating a first network address for the first terminal device to communicate in the ad hoc network, so that the first terminal device accesses the ad hoc network and communicates in the ad hoc network using the first network address.

[0004] For example, in the communication method provided by an embodiment of the present disclosure, the ad hoc network includes a wireless local area network established using unlicensed spectrum.

[0005] For example, in the communication method provided by an embodiment of the present disclosure, in response to allowing the first terminal device to access the ad hoc network, allocating a first network address for the first terminal device to communicate in the ad hoc network comprises: in response to allowing the first terminal device to access the ad hoc network, determining the device type of the first terminal device; in response to the first terminal device being a slave node of the control node, allocating a first type of network address for the first terminal device; and in response to the first terminal device being another control node, allocating a second type of network address for the first terminal device.

[0006] For example, in the communication method provided by an embodiment of the present disclosure, the first type of network address includes a C-class network address, and the second type of network address includes a B-class network address.

[0007] For example, in the communication method provided by an embodiment of the present disclosure, further comprising, in response to the first terminal device being another control node, judging whether the first terminal device has an external network service capability; and in response to the first terminal device having an external network service capability, marking the first terminal device as a gateway.

[0008] For example, in the communication method provided by an embodiment of the present disclosure, further comprising broadcasting the first network address of the first terminal device after the first terminal device accesses the ad hoc network.

[0009] For example, in the communication method provided by an embodiment of the present disclosure, the method further comprises setting a keep-alive timer for the first terminal device; in response to receiving a probe message from the first terminal device, resetting the keep-alive timer to a maximum value; and in response to the keep-alive timer counting to 0 due to not receiving a probe message from the first terminal device for a long time, starting offline processing of the first terminal device.

[0010] For example, in the communication method provided by an embodiment of the present disclosure, the method further comprises: in response to receiving a second network address broadcast by a second terminal device in the ad hoc network, recording and displaying the second network address in a serviceable object list; and in response to a selection operation on the second network address, providing a first access request to the second terminal device.

[0011] For example, in the communication method provided by an embodiment of the present disclosure, a terminal device recorded in the serviceable object list periodically sends a broadcast message to the control node; and in response to not receiving a broadcast message provided by a third terminal device recorded in the serviceable object list within a preset time, deleting the third terminal device from the serviceable object list.

[0012] For example, in the communication method provided by an embodiment of the present disclosure, the method further comprises broadcasting identity information of the control node, wherein the identity information comprises a network address of the control node.

[0013] For example, in the communication method provided by an embodiment of the present disclosure, the identity information further comprises gateway indication information, and the gateway indication information is used to indicate that the control node has external network service capability, so that a node in the ad hoc network sets the control node as a gateway.

[0014] For example, in the communication method provided by an embodiment of the present disclosure, the method further comprises: in response to the control node establishing a communication connection with an external network server, broadcasting an external network network address of the external network server, so that a node in the ad hoc network adds the external network network address to a serviceable object list of the node.

[0015] For example, in the communication method provided by an embodiment of the present disclosure, the control node establishes a communication connection with an external network server, and the method further comprises: receiving a second access request; obtaining an access network address in the second access request; in response to the access network address being the external network network address, forwarding the second access request to the external network server; and in response to the access network address being a target network address of a target node in the ad hoc network, forwarding the second access request to the target node.

[0016] For example, in the communication method provided by an embodiment of the present disclosure, the second access request comes from a first node in the ad hoc network, and the external network server establishes a communication connection with the mobile terminal. The method further comprises: in response to the access network address being the network address of the mobile terminal, sending the second access request to the external network server, so as to forward the second access request to the mobile terminal through the external network server; and forwarding a response message from the external network server to the first node, wherein the response message is provided by the mobile terminal to the external network server.

[0017] For example, in the communication method provided by an embodiment of the present disclosure, the external network server establishes a communication connection with the mobile terminal as a proxy server.

[0018] For example, in the communication method provided by an embodiment of the present disclosure, the proxy server further comprises a short message service of a proxy operator channel, and sends a short message to the mobile terminal through the proxy server.

[0019] For example, in the communication method provided by an embodiment of the present disclosure, in addition to that the control node establishes a communication connection with the external network server, at least one second node in the ad hoc network also establishes a communication connection with the external network server. The ad hoc network selects a communication node for communication with the external network server from the at least one second node and the control node in a polling manner, and receives the second access request, which comprises: in response to the communication node being the control node, receiving the second access request.

[0020] For example, in the communication method provided by an embodiment of the present disclosure, the arrangement order of the control node and the at least one second node in the polling is changed periodically.

[0021] For example, in the communication method provided by an embodiment of the present disclosure, the communication with the external network server comprises communication with the external network server by using a mobile cellular network and / or a satellite network.

[0022] For example, in the communication method provided by an embodiment of the present disclosure, in the case of being able to communicate with the external network server, the arrangement order of a node for communication with the external network server by using a mobile cellular network in the polling is in front of that of a node for communication with the external network server by using a satellite network.

[0023] The at least one embodiment of the present disclosure provides a communication device applied to a control node in an ad hoc network, the device comprising: a receiving unit configured to receive a wireless access request provided by a first terminal device, wherein the wireless access request is used to request access to the ad hoc network; and an address allocation unit configured to allocate a first network address used for communication in the ad hoc network to the first terminal device in response to allowing the first terminal device to access the ad hoc network, so that the first terminal device accesses the ad hoc network and communicates in the ad hoc network using the first network address.

[0024] The at least one embodiment of the present disclosure provides an electronic device, comprising a processor; a memory comprising one or more computer program modules; wherein the one or more computer program modules are stored in the memory and configured to be executed by the processor, and the one or more computer program modules comprise instructions for implementing the communication method provided by any embodiment of the present disclosure.

[0025] The at least one embodiment of the present disclosure provides a computer readable storage medium for storing non-transitory computer readable instructions, which can implement the communication method provided by any embodiment of the present disclosure when executed by a computer. BRIEF DESCRIPTION OF DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings described below only relate to some embodiments of the present disclosure, but not limit the present disclosure.

[0027] Figure 1A A flowchart of a communication method provided by at least one embodiment of the present disclosure is shown;

[0028] Figure 1B A schematic diagram of an ad hoc network established by applying the communication method provided by the present disclosure is shown;

[0029] Figure 2 A flowchart of a method for a terminal device to access a target control node is shown;

[0030] Figure 3 A flowchart of a method for a terminal device to access a target control node is shown;

[0031] Figure 4A A flowchart of another communication method provided by some embodiments of the present disclosure is shown;

[0032] Figure 4B A flowchart of another communication method provided by some embodiments of the present disclosure is shown;

[0033] Figure 5 A flowchart of a method of communicating between devices in an ad hoc network is shown according to at least one embodiment of the present disclosure;

[0034] Figure 6A A flowchart of another method of communicating is shown according to at least one embodiment of the present disclosure;

[0035] Figure 6B A flowchart of another method of communicating is shown according to at least one embodiment of the present disclosure;

[0036] Figure 7 A schematic block diagram of a communication device is shown according to at least one embodiment of the present disclosure;

[0037] Figure 8A A schematic block diagram of an electronic device is shown according to at least one embodiment of the present disclosure;

[0038] Figure 8B A schematic block diagram of another electronic device is shown according to at least one embodiment of the present disclosure; and

[0039] Figure 9 A schematic diagram of a computer-readable storage medium is shown according to at least one embodiment of the present disclosure. DETAILED DESCRIPTION

[0040] In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions of the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings of the embodiments of the present disclosure. Obviously, the described embodiments are a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure. Based on the described embodiments of the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative effort belong to the scope of protection of the present disclosure.

[0041] Unless otherwise defined, technical terms or scientific terms used in the present disclosure shall have the ordinary meaning as understood by a person having ordinary skill in the art to which the present disclosure pertains. The terms "first", "second", and similar terms in the present disclosure do not denote any order, quantity, or importance, but are used to distinguish different components. Similarly, the terms "one", "a", or "the" do not denote a quantity of any number, but mean the existence of at least one. The terms "include", "contain", and similar terms mean that the elements or objects before the terms encompass the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connect" or "connected" and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The terms "upper", "lower", "left", "right", and the like are used only to represent relative positional relationships, and when the absolute positions of the described objects are changed, the relative positional relationships can also be changed accordingly.

[0042] At present, the communication connection between the car machine system and the mobile terminal is generally created in a point-to-point (P2P) manner, mainly to complete the wireless sharing of data (such as Bluetooth music, screen projection, etc.) between the two, which belongs to the PAN (personal area network) category. There is no direct wireless transmission link between multiple PANs, and if data sharing is required, it can only be achieved indirectly through a public network. In some special scenarios, for example, when a group of people drive to a remote area for tourism and enter an area without public network services, intercommunication between PANs will not be possible, which means disconnection for devices without external network service capabilities, which will pose a hidden danger to the safety of the entire team.

[0043] At least one embodiment of the present disclosure provides a communication method, device, electronic equipment and computer readable storage medium. The communication method is applied to a control node in a self-organizing network. The method comprises: receiving a wireless access request provided by a first terminal device, the wireless access request being used to request access to the self-organizing network; and in response to allowing the first terminal device to access the self-organizing network, allocating a first network address for the first terminal device to communicate in the self-organizing network, so that the first terminal device accesses the self-organizing network and communicates in the self-organizing network using the first network address. The communication method establishes a self-organizing network based on the control node, so that internal intercommunication can be performed through the self-organizing network even in a communication infrastructure-free scenario, and further, for example, in at least one example, once a device in the self-organizing network has basic communication capability, other devices in the self-organizing network can also realize intercommunication with the outside through the device.

[0044] Figure 1A A flowchart of a communication method provided by at least one embodiment of the present disclosure is shown.

[0045] As Figure 1AAs shown, the method can include steps S10-S20. The method is applied to a control node in a self-organizing network.

[0046] Step S10: receiving a wireless access request provided by a first terminal device, the wireless access request being used to request access to the self-organizing network.

[0047] Step S20: in response to allowing the first terminal device to access the self-organizing network, allocating a first network address for the first terminal device to communicate in the self-organizing network, so that the first terminal device accesses the self-organizing network and communicates in the self-organizing network using the first network address.

[0048] In some embodiments of the present disclosure, one or more terminal devices in the self-organizing network can have both router and host functions. As a host, the terminal device needs to run various user-oriented applications, such as editors, browsers, etc. As a router, the terminal device needs to run a corresponding routing protocol to complete data packet forwarding and routing maintenance according to a routing strategy and a routing table, and thus the terminal device in the self-organizing network needs to implement a suitable routing protocol. The self-organizing network can use the routing forwarding function of the terminal device to communicate without infrastructure, thereby making up for the defect that no network communication infrastructure is available. In embodiments of the present disclosure, the self-organizing network can be a wireless self-organizing network, which is a system composed of a group of mobile nodes with wireless transceiver modules, and does not rely on pre-set infrastructure, has the characteristics of temporary networking, rapid deployment, no control center, strong invulnerability, etc.

[0049] In some embodiments of the present disclosure, the control node can be, for example, a device with strong network capability, the control node establishes a wireless link with its slave nodes as a parent node, and the control node can also establish a wireless link with other control nodes in the periphery. In some embodiments of the present disclosure, the control node completes the routing forwarding function of data.

[0050] For example, the control node can be a car machine system device with strong network capability, and the slave nodes of the control node can be mobile phones, tablets, earphones, etc. that establish a communication connection with the car machine system device.

[0051] For example, the control node can be a mobile phone with strong network capability, and the slave nodes of the control node can be a car machine, a tablet, an earphone, etc. that establish a communication connection with the mobile phone.

[0052] In some embodiments of the present disclosure, the network capability can be set to evaluate whether a network connection can be established, for example, in the absence of a cellular mobile network, the network capability of a device capable of establishing a satellite communication network connection is stronger than that of other devices; in the presence of a certain cellular mobile network, the network speed, delay, etc. can be set to evaluate the network capability of different devices; in the presence of a cellular mobile network and a satellite communication network, the network speed, delay, etc. can be set to evaluate the network capability of different devices.

[0053] Although not explicitly described, the endurance limit can also be considered when evaluating which is suitable as a control node. For example, when having similar network capabilities, the car machine is more suitable as a control node than the mobile phone, tablet and other wearable devices.

[0054] In some embodiments of the present disclosure, the control node can be determined according to its own capability when the device accesses the network. For example, if a device allows other devices to establish a connection with itself, and the communication capability of the device is stronger than at least part of the other devices, the device can be a control node.

[0055] In embodiments of the present disclosure, the control node can act as an access point (AP), can act as a creator of a wireless network, and can act as a central node of the wireless network.

[0056] Figure 1B A schematic diagram of an ad hoc network established by applying the communication method provided by the present disclosure is shown.

[0057] As shown in Figure 1B The ad hoc network includes a plurality of nodes. The plurality of nodes includes at least one control node and at least one slave node, which can be referred to as a "STA" node, which is a terminal in a wireless network. For example, control node AP1, control node AP2, control node AP3 and control node AP4. Node STA11 and node STA12 access control node AP1, serving as slave nodes of control node AP1. Node STA21, node STA22 and node STA23 access control node AP2, serving as slave nodes of control node AP2. Node STA31 accesses control node AP3, serving as a slave node of control node AP3. Currently, there is no slave node connected to control node AP4. Any two nodes of control nodes AP1-AP4 establish a communication connection.

[0058] In embodiments of the present disclosure, the slave node refers to a mobile terminal with weak network capability or does not have the capability to allow other devices to access, and only has a wireless link with the parent AP, and the communication with other terminals in the network is completed by the parent AP. The networking capability of the slave node is weaker than that of the control node.

[0059] Each AP broadcasts a beacon frame to surrounding STAs and APs every certain time (ranging from tens of milliseconds to several seconds) to tell the surrounding STAs and other APs that the AP can be accessed.

[0060] Each STA (for example, a terminal such as a mobile phone, a notebook computer, and the like) can actively send a probe frame to find an AP that can be accessed in addition to listening to the beacon frame sent by the surrounding AP.

[0061] It should be understood that, Figure 1B The ad hoc network shown is only an example for facilitating understanding of the present disclosure and does not limit the present disclosure. For example, the number of control nodes can be any number and is not limited to four, and the number of STAs that access any control node can also be any number.

[0062] For example, Figure 1B Any control node in the ad hoc network shown can apply the communication method provided by the embodiments of the present disclosure. Hereinafter, the embodiments of the present disclosure are described by taking the control node AP1 as an example.

[0063] The slave node STA11, the slave node STA12, and the control nodes AP2-AP4 can all apply the communication method provided by the embodiments of the present disclosure. Figure 1A The communication method shown accesses the control node AP1, thereby accessing the ad hoc network based on the control node AP1.

[0064] For step S10, the first terminal device can be any device with wireless communication capability. For example, the first terminal device can be a device including but not limited to a device with a wireless communication module such as a Wi-Fi module, a Bluetooth (BT) module, a uwb module, a zigbee module, and the like. For example, the first terminal device can be a device with a wireless communication module such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), and the like, and the embodiments of the present disclosure do not limit the specific type of the terminal device.

[0065] For example, the first terminal device can be a station (STATION, STA) in a WLAN, can be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device having a wireless communication module, a computing device or other processing device connected to a wireless communication module, a computer, a laptop, a handheld communication device, a handheld computing device, and / or other equipment for communication over a wireless system and next generation communication system, for example, a mobile terminal in a 5G network, a mobile terminal in a future evolved public land mobile network (PLMN) or a mobile terminal in a future evolved non-terrestrial network (NTN), etc.

[0066] By way of example and not limitation, when the first terminal device is a wearable device, the wearable device can also be a general term for smart design of daily wear by applying wearable technology and developing wearable devices, such as gloves, watches, etc. configured with a near field communication module. The wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories. The wearable device is not only a hardware device, but also achieves powerful functions through software support and data interaction, cloud interaction. The broad sense of wearable smart devices includes full-featured, large-sized devices that can realize complete or partial functions without relying on a smart phone, such as smart watches or smart glasses, etc., and devices that focus on a certain type of application function and need to be used in cooperation with other devices, such as smart phones, such as various types of smart watches, smart bands, etc. with display screens.

[0067] For example, the first terminal device can be a terminal device as a slave node, or the first terminal device can be a terminal device as another control node. For example, the first terminal device can be Figure 1B one of the slave nodes STA11, STA12 and the control nodes AP2-AP4 in FIG. 1.

[0068] The Wi-Fi module, BT module, uwb module, zigbee module and other wireless communication modules support communication in unlicensed frequency bands, and therefore, in some embodiments of the present disclosure, the ad hoc network includes a wireless local area network established using unlicensed frequency spectrum. Establishing a wireless local area network using unlicensed frequency spectrum can reduce communication costs and improve communication flexibility without being limited by external conditions. The unlicensed frequency spectrum may, for example, be 2.4 GHz, 5 GHz, 6 GHz and 60 GHz frequency bands. Unlicensed frequency bands have a shared characteristic of not requiring a license, provide best-effort services in a manner of competing for frequency spectrum, and are used in accordance with channel access fairness and principles of coexistence of multiple wireless communication technologies.

[0069] In some embodiments of the present disclosure, the wireless access request may, for example, include a probe request and an authentication request.

[0070] For example, the first terminal device broadcasts a probe request to the control node AP1, and the control node AP1 sends a probe response to the first terminal device in response to receiving the probe request. The first terminal device sends an authentication request to the control node AP1 in response to receiving the probe response, so that the control node AP1 determines whether to allow the first terminal device to access according to the authentication request.

[0071] For example, the first terminal device has a Wi-Fi module, and the first terminal device sends the probe request and the authentication request to the control node AP1 through the Wi-Fi module. For another example, the first terminal device has a zigbee module, and the first terminal device sends the probe request and the authentication request to the control node AP1 through the zigbee module.

[0072] For example, the probe request includes a probe frame to find an AP that can be accessed. The initiator of the probe request is the first terminal device.

[0073] In some embodiments of the present disclosure, the wireless access request may, for example, be generated in response to receiving a beacon frame sent by the control node.

[0074] For example, the control node broadcasts a beacon frame to surrounding STAs and APs at certain time intervals, telling the surrounding STAs and other APs that they can be accessed, so that the first terminal device requests to access the AP.

[0075] In some embodiments of the present disclosure, the control node AP1 responds to the receiving of the authentication request, and the terminal device of the control node AP1 displays an interactive interface, in which a list including the control node AP1 is displayed, for example, and the list can also include a text prompt information such as "whether to access", so that the user can operate on the interactive interface whether to allow the control node AP1 to access. In this embodiment, the operating system of the terminal device of the control node AP1 can be android, linux, windows, etc., and the driver of the corresponding communication module can trigger the display of the interactive interface, and the terminal device has a touch screen (or screen + key) and other peripherals.

[0076] For another example, the authentication request can carry the identity information of the first terminal device, and the control node AP1 judges whether to allow the first terminal device to access according to the identity information in the authentication request. For example, the control node AP1 includes a list of access devices, and if the identity of the first terminal device appears in the device list, the first terminal device is allowed to access.

[0077] For example, the user can set the device list in the control node to add the home device to the device list to prevent too many users from accessing and occupying network resources.

[0078] In some embodiments of the present disclosure, if the first terminal device is the first time to provide a wireless access request to the control node AP1, and the control node AP1 confirms to allow the first terminal device to access the ad hoc network according to the method described in the above embodiments, the control node AP1 generates a random key and provides the key to the first terminal device through the response message.

[0079] If the first terminal device has accessed the ad hoc network, the authentication request provided by the first terminal device carries the key, and the control node AP1 responds to the receiving of the authentication request to judge whether the key carried by the authentication request is correct. If the key is correct, it is confirmed that the first terminal device is allowed to access the ad hoc network. If the key is incorrect, it is confirmed that the first terminal device is not allowed to access the ad hoc network.

[0080] For step S20, for example, in response to allowing the first terminal device to access the ad hoc network, a response message is sent to the first terminal device.

[0081] The first terminal device sends an association request to the control node AP1 in response to receiving the response message. In a case where the first terminal device does not access the ad hoc network, the control node AP1 applies to a Dynamic Host Configuration Protocol (DHCP) service module for allocating a network address (e.g., a first network address) for the first terminal device in response to the association request. For example, the control node AP1 allocates an IP address: 192.168.*.0 as the network address for the first terminal device. The DHCP service module is integrated in the control node, for example, or the DHCP service module can be a device independent of the control node.

[0082] In some embodiments of the present disclosure, after the control node AP1 allocates the network address for the first terminal device, the control node sends an association response to the first terminal device, the association response including the network address of the first terminal device, and the control node updates its own routing table. After the first terminal device receives the association response, it updates its own routing table, so that the first terminal device accesses the ad hoc network and communicates in the ad hoc network using the first network address.

[0083] In some embodiments of the present disclosure, step S20 includes: determining the device type of the first terminal device in response to allowing the first terminal device to access the ad hoc network; allocating a first type of network address for the first terminal device in response to the first terminal device being a slave node of the control node; and allocating a second type of network address for the first terminal device in response to the first terminal device being another control node.

[0084] In some embodiments of the present disclosure, for example, the association request is divided into an AP access request and a non-AP access request according to whether the first terminal device can serve as a control node. If the association request is the AP access request, the device type of the first terminal device is another control node, and the second type of network address is allocated for the first terminal device. If the association request is the non-AP access request, the device type of the first terminal device is a slave node, and the first type of network address is allocated for the first terminal device.

[0085] In some embodiments of the present disclosure, the first type of network address includes a C-class network address, and the second type of network address includes a B-class network address.

[0086] The B-class network address ranges from 128.1.0.1 to 191.255.255.254, and the C-class network address ranges from 192.0.1.1 to 223.255.255.254. A B-class IP address is composed of a 2-byte network address and a 2-byte host address, and the highest bit of the network address must be "10", i.e., the first segment of the number ranges from 128 to 191. The Internet has 16256 B-class addresses. A C-class address is composed of a 3-byte network address and a 1-byte host address, and the highest bit of the network address must be "110", i.e., the first segment of the number ranges from 192 to 223. The Internet has 2054512 C-class addresses. That is, the number of C-class network addresses is greater than the number of B-class network addresses. Since the number of control nodes in the ad hoc network is less than the number of slave nodes in the ad hoc network, the B-class network address is allocated to the control node, and the C-class network node is allocated to the slave node.

[0087] The network address is allocated to the device according to whether the device is a slave node or a control node, so as to facilitate identification of the identity of the device.

[0088] In some embodiments of the present disclosure, as shown in Figure 1A The communication method can further include steps S30 and S40.

[0089] Step S30: In response to the first terminal device being another control node, determining whether the first terminal device has an external network service capability.

[0090] Step S40: In response to the first terminal device having an external network service capability, marking the first terminal device as a gateway.

[0091] In this embodiment, if the first terminal device itself has an external network service capability, the first terminal device is marked as a gateway, so that any terminal device in the ad hoc network can communicate with the outside through the gateway.

[0092] In embodiments of the present disclosure, an AP with an external network service capability is referred to as a wireless gateway (Mobile Access Portal, mAP). The mAP allows other nodes in the ad hoc network to communicate with the external network through the mAP. For example, the AP can be set to allow or not allow to serve as an external network agent according to autonomous will or administrator will when the AP enters the network or during the networking process. If it is allowed, it means that the AP can be used as an mAP, and can serve as a default gateway for other terminals in the network.

[0093] In some embodiments of the present disclosure, the external network service capability can refer to the capability of communicating with an external server outside the ad hoc network.

[0094] For example, the first terminal device includes information indicating whether the first terminal device has the external network service capability in the association request sent to the control node, i.e., the first terminal device includes identity information indicating whether the first terminal device can serve as an mAP in the association request.

[0095] If the first terminal device can serve as an mAP, the control node can mark the first terminal device as a gateway.

[0096] In some embodiments of the present disclosure, the first network address of the first terminal device is broadcast after the first terminal device accesses the ad hoc network. For example, the control node broadcasts the first network address spontaneously, or the first terminal device broadcasts its own first network address, and the control node forwards the first network address unconditionally in response to the first terminal device broadcasting the first network address.

[0097] Figure 2 A flow chart of a method for a control node to access a target control node is shown.

[0098] As shown in Figure 2 , the method includes steps S201-S209. For example, the control node (hereinafter referred to as “AP”) to be accessed is the control node AP4, and the target control node (hereinafter referred to as “target AP”) is the control node AP1. Figure 1B

[0099] Step S201: The control node to be accessed sends a probe request to the target control node. The probe request is used to scan which network exists in the communication area for connection. The probe request includes a probe frame to find an AP that can be accessed.

[0100] Step S202: The target control node sends a probe response to the control node to be accessed. For example, the target control node sends the probe response to the control node to be accessed in response to the probe request.

[0101] Step S203: The control node to be accessed sends an authentication request to the target control node.

[0102] If the control node to be accessed has accessed the target control node before, the authentication request carries a key allocated to the control node to be accessed when accessing for the first time. In this case, step S204 includes the target control node checking whether the key in the authentication request is correct. If the key is correct, step S205 is performed, i.e., an authentication response is fed back to the control node to be accessed.

[0103] ​If the AP to be accessed is the first time to request access to the ad hoc network, and the target AP receives the indication of the user input to allow access, step S204 includes the target AP generating a random key, and step S205 includes feeding back an authentication response to the AP to be accessed, the authentication response including the random key, so that the AP to be accessed accesses next time by means of the key, avoiding wasting time and resources for re-allocating the key for the AP to be accessed.

[0104] Step S206: The AP to be accessed sends an association request to the target AP. The association request includes indication information of the device type as AP. For example, the association request includes an indicator AP=T, which indicates that the device requesting access is an AP.

[0105] If the AP to be accessed has accessed the ad hoc network before, the association request also includes the network address, i.e. the IP address, of the AP to be accessed.

[0106] Step S207: If the association request includes the IP address (i.e. this access is the first access), the target AP updates its own routing table. For example, the IP address of the AP to be accessed is added to the routing table of the target AP.

[0107] If the association request does not include the IP address (i.e. the AP to be accessed is the first time to access the ad hoc network), the target AP applies to the DHCP service module for allocating a B-class IP address to the AP to be accessed, and updates its own routing table.

[0108] Step S208: The target AP sends an association response to the AP to be accessed. For example, the association response includes the IP address of the target AP. If the AP to be accessed is the first time to access the ad hoc network, the association response also includes the network address allocated to the AP to be accessed by the target AP.

[0109] Step S209: The AP to be accessed updates its own routing table. For example, the IP address of the AP to be accessed is registered, and the network address of the target AP is added.

[0110] After that, the AP to be accessed can communicate with other nodes in the ad hoc network by using its own IP address.

[0111] Figure 3 A flowchart of a method for a node to access a control node is shown.

[0112] As shown in Figure 3 , the method includes steps S301-S309. For example, the AP to be accessed (hereinafter referred to as "AP to be accessed") is the slave node STA11 in Figure 1B , and the target control node (hereinafter referred to as "target AP") is the control node AP1.

[0113] Step S301: The to-be-accessed STA sends a probe request to the target AP. The probe request is used to scan which network exists in the communication area for connection.

[0114] Step S302: The target AP sends a probe response to the to-be-accessed STA. For example, the target AP sends the probe response to the to-be-accessed STA in response to the probe request.

[0115] Step S303: The to-be-accessed STA sends an authentication request to the target AP.

[0116] If the to-be-accessed STA has accessed the ad hoc network before, the authentication request carries the key allocated to the to-be-accessed STA when accessing the ad hoc network for the first time. In this case, step S304 includes that the target AP checks whether the key in the authentication request is correct. If the key is correct, step S205 is executed, i.e., the authentication response is fed back to the to-be-accessed STA.

[0117] If the to-be-accessed STA requests to access the ad hoc network for the first time, and the target AP receives the indication of the user input for allowing access, step S204 includes that the target AP generates a random key, and step S205 includes that the authentication response including the random key is fed back to the to-be-accessed STA, so that the to-be-accessed STA accesses next time by means of the key, avoiding wasting time and resources for re-allocating the key to the to-be-accessed STA again.

[0118] Step S306: The to-be-accessed STA sends an association request to the target AP. The association request includes the indication information of the device type being non-AP, to indicate that the device type is STA. For example, the association request includes the indicator AP=F, which indicates that the device requesting access is STA.

[0119] If the to-be-accessed STA has accessed the ad hoc network before (i.e., the current access is not the first access), the association request further includes the network address of the to-be-accessed STA, i.e., the IP address.

[0120] Step S307: If the association request includes the IP address, the target AP updates its routing table. For example, the IP address of the to-be-accessed STA is added in the routing table of the target AP.

[0121] If the association request does not include the IP address (i.e., the to-be-accessed STA accesses the ad hoc network for the first time), the target AP applies to the DHCP service module for allocating a class C IP address to the to-be-accessed AP, and updates its routing table.

[0122] Step S308: The target AP sends an association response to the to-be-accessed STA. For example, the association response includes the IP address of the target AP. If the to-be-accessed STA accesses the ad hoc network for the first time, the association response further includes the network address allocated to the to-be-accessed STA by the target AP.

[0123] Step S309: The to-be-accessed STA updates its routing table. For example, it registers its IP address and adds the network address of the target AP.

[0124] Afterwards, the to-be-accessed STA can communicate with other nodes in the ad hoc network using its IP address.

[0125] Figure 4A A flow chart of another communication method provided by some embodiments of the present disclosure is shown.

[0126] As shown in FIG. 4, the method can further include steps S401-S403 on the basis of the foregoing steps. Steps S401-S403 can be performed after the first terminal device accesses the ad hoc network. For example, steps S401-S403 can be performed after step S20. Figure 4A Step S401: Set a keep-alive timer for the first terminal device.

[0127] Step S402: In response to receiving a probe message of the first terminal device, reset the keep-alive timer to the maximum value.

[0128] Step S403: In response to the keep-alive timer counting to 0 due to not receiving a probe message of the first terminal device all the time, start offline processing of the first terminal device.

[0129] It should be understood that the first terminal device is only an example of a terminal device connected to the control node, and the first terminal device can be any device connected to the control node.

[0130] For example, the control node sets a keep-alive timer for each terminal device (including slave nodes and other control nodes) connected to the control node.

[0131] For step S401, the keep-alive timer is, for example, a countdown timer, which counts down from an initial value (i.e., the maximum value) as long as no probe message of the terminal device is received.

[0132] The initial value can be set by a person skilled in the art, and the initial value can represent a preset time length.

[0133] For step S402, if a probe message of the terminal device is received, the keep-alive timer is reset to the initial value.

[0134] For step S403, if the count of the keep-alive timer has been updated from the maximum value to 0, it is determined that the terminal device is disconnected from the control node, and offline processing of the first terminal device is started.

[0135]

[0136] ​In this embodiment, if no probe message is received from the terminal device within a preset time period, it indicates that the terminal device has lost connection with the control node, and offline processing of the terminal device is initiated.

[0137] Offline processing may include, for example, clearing resources occupied by the terminal device or clearing the terminal device's keep-alive mechanism.

[0138] This method can promptly clean up offline (i.e., disconnected) terminal devices, thereby reducing the resources occupied by terminal devices and avoiding the network resources occupied by sending messages to offline terminal devices.

[0139] Figure 4B A flowchart of another communication method provided by some embodiments of this disclosure is shown.

[0140] like Figure 4B As shown, the method may further include steps S404 to S406 in addition to the aforementioned steps. Steps S404 to S406 can be executed after the terminal device accesses the ad hoc network. For example, they can be executed after step S20.

[0141] Step S404: Device A periodically broadcasts a probe request.

[0142] Step S405: If device B finds that device A has been successfully registered, it considers device A to be in keep-alive state and resets device A's keep-alive timer.

[0143] Successful registration of device A could mean that device A has established a direct communication connection with device B. For example, device A could be a slave node of device B, or device A could be another control node directly connected to device B.

[0144] Step S406: After a preset time length, the keep-alive timer of device A in device B counts to 0, indicating that device A has been disconnected from device B.

[0145] For example, in Figure 2 In the example, after the AP to be connected connects to the target AP, the AP to be connected can be... Figure 4B Device A in the diagram, the target AP can be... Figure 4B Device B in the middle.

[0146] For example, in Figure 3 In the example, after the STA to be connected accesses the target AP, the STA to be connected can be... Figure 4B Device A in the diagram, the target AP can be... Figure 4B Device B in the middle.

[0147] In some embodiments of the present disclosure, the communication method further comprises, in response to receiving the second network address broadcasted by the second terminal device in the ad hoc network, recording and displaying the second network address in the list of serviceable objects; and in response to a selection operation on the second network address, providing a first access request to the second terminal device.

[0148] For example, the control node performing the communication method is Figure 1B For example, the control node performing the communication method is Figure 1B For example, the control node performing the communication method is

[0149] The network address (i.e., the second network address) of each of the slave node STA21, the slave node STA22, the slave node STA23, and the slave node STA31 is forwarded by the control node AP2 and the control node AP3, respectively.

[0150] For example, the slave node STA21 broadcasts its own network address to the control node AP2, and the control node AP2 unconditionally forwards the network address of the slave node STA21 to the control node AP1.

[0151] The control node AP1 records and displays the network address of the slave node STA21 in the list of serviceable objects of the application program in response to receiving the network address of the slave node STA21, so that the user can select the network address of the slave node STA21 in the application program to communicate with the slave node STA21.

[0152] For example, in response to the user selecting a selection operation on the network address of the slave node STA21, an access request (e.g., the first access request) is provided from the second terminal device.

[0153] In some embodiments of the present disclosure, the network address of each node can be represented by the name or other identifier of the node, so as to facilitate the user to distinguish different terminal devices, thereby facilitating the user to accurately select the node to be accessed. For example, the control node records the device name of the slave node STA21 in the list of serviceable objects of the application program to identify the network address of the slave node STA21.

[0154] This embodiment registers the network address of the terminal device communicable in the ad hoc network in the list of serviceable objects of the application program, facilitates the user to select the terminal device to communicate, and realizes the communication of each terminal device in the ad hoc network.

[0155] In some embodiments of the present disclosure, the terminal device recorded in the serviceable object list periodically sends a broadcast message to the control node; in response to not receiving a broadcast message provided by a third terminal device recorded in the serviceable object list within a preset time, the third terminal device is deleted from the serviceable object list.

[0156] For example, after a terminal device successfully accesses the ad hoc network, the terminal device periodically broadcasts network access information (for example, an IP address in the ad hoc network) in a broadcast packet manner. After other terminal devices receive the network access information, the terminal devices register the first terminal device as a serviceable object in respective application programs, and display the first terminal device in a serviceable object list. When a certain terminal device needs to communicate with a target terminal device in the ad hoc network, the target terminal device is selected in the serviceable object list of the certain terminal device for service (for example, short message communication, short voice communication, etc.).

[0157] For example, for each terminal device (which can be a slave node or a control node), if network access information periodically broadcast by a registered terminal device (that is, a third terminal device) is not received for more than a preset time, it is considered that the registered terminal device has left the network, and the registered terminal device is deleted from the serviceable object list of the application program.

[0158] Figure 5 A flowchart of a communication method between devices in an ad hoc network is shown.

[0159] As shown in Figure 5 the communication method includes steps S510-S540.

[0160] Step S510: After a first device successfully accesses an ad hoc network, the first device periodically broadcasts network access information in a broadcast packet manner.

[0161] The network access information can be, for example, an IP address of the first device in the ad hoc network.

[0162] Step S520: After other terminal devices in the ad hoc network receive the network access information, the first device is registered as a serviceable object in respective application programs of the other terminal devices, and the first device is displayed in a serviceable object list.

[0163] Step S530: When a second device needs to communicate with the first device, the first device is selected in a serviceable object list of the second device for service. The service can include, for example, sending and receiving of messages, sending and receiving of voice, etc.

[0164] Step S540: If network access information periodically broadcast by a registered serviceable object (for example, the first device) is not received within a preset time, the serviceable object is deleted from the serviceable object list.

[0165] In embodiments of the present disclosure, the control node periodically broadcasts its own identity information. The identity information includes the network address of the control node, i.e., the IP address in the ad hoc network.

[0166] The identity information further includes gateway indication information. The gateway indication information is used to indicate that the control node has the external network service capability, so that the nodes in the ad hoc network set the control node as a gateway. For example, Figure 1B The control node AP1 in the network of FIG. 1 periodically broadcasts its own identity information, which includes not only the IP address of the control node AP1, but also AP=T to indicate that the control node AP1 has the external network service capability. For example, after the control node AP2 receives the identity information broadcast by the control node AP1, if the identity information indicates that the control node AP1 has the external network service capability, the control node AP2 can set the control node AP1 as a gateway.

[0167] In some embodiments of the present disclosure, the corresponding communication method further includes, in response to the control node establishing a communication connection with the external network server, broadcasting the external network address of the external network server, so that the nodes in the ad hoc network add the external network address to their own serviceable object lists.

[0168] As shown in FIG. 1, after the control node AP1 establishes a communication connection with the external network server 101 through, for example, a public communication network (such as a 3G / 4G / 5G mobile communication network or a satellite network, etc.), the control node AP1 broadcasts the external network address of the external network server 101. For example, the control nodes AP2-AP4 add the external network address of the external network server 101 to their respective serviceable object lists in response to receiving the external network address of the external network server 101. Figure 1B

[0169] The slave nodes STA21-STA23 add the external network address of the external network server 101 to their respective serviceable object lists in response to receiving the external network address of the external network server 101 provided by the control node AP2. Similarly, the slave node STA31 adds the external network address of the external network server 101 to its serviceable object list in response to receiving the external network address of the external network server 101 provided by the control node AP3.

[0170] Figure 6A A flowchart of another communication method provided by at least one embodiment of the present disclosure is shown.

[0171] As shown in FIG. 1, after the control node AP1 establishes a communication connection with the external network server 101 through, for example, a public communication network (such as a 3G / 4G / 5G mobile communication network or a satellite network, etc.), the control node AP1 broadcasts the external network address of the external network server 101. For example, the control nodes AP2-AP4 add the external network address of the external network server 101 to their respective serviceable object lists in response to receiving the external network address of the external network server 101. Figure 6A

[0172] Step S610: receiving a second access request. ​​

[0173] Step S620: obtaining the access network address in the second access request.

[0174] Step S630: forwarding the second access request to the external network server in response to the access network address being the external network address.

[0175] Step S640: forwarding the second access request to the target node in response to the access network address being the target network address of the target node in the ad hoc network.

[0176] The method can realize that the control node acts as a relay to enable the devices in the ad hoc network to communicate with each other and to communicate with the external network.

[0177] For step S610, for example, in the example of Figure 1B the control node AP2 sends the second access request to the control node AP1.

[0178] The control node AP1 receives the access request from the control node AP2.

[0179] For step S620, the access network address is obtained from the second access request, for example.

[0180] For step S630, if the access network address is the external network address, for example, the external network address of the external network server 101, the second access request is forwarded to the external network server 101.

[0181] For step S640, for example, the target node is the slave node STA11, in response to the access network address being the network address of the slave node STA11 in the ad hoc network, the second access request is forwarded to the slave node STA11.

[0182] Figure 6B A flow chart of another communication method provided by at least one embodiment of the present disclosure is shown.

[0183] As shown in Figure 6B the communication method can further include steps S650-S680 on the basis of the foregoing embodiments.

[0184] Step S650: when the wireless gateway mAP accesses the ad hoc network, if it still has external network service capability, it broadcasts the IP address of the wireless gateway mAP in the ad hoc network and the fixed IP address of the external network server.

[0185] Step S660: after the other terminal devices in the ad hoc network receive the broadcast message of the wireless gateway mAP, the IP address of the wireless gateway mAP in the ad hoc network is set as one of the local gateway addresses, and the fixed IP address of the external network server is added to the serviceable object list of each application program.

[0186] Step S670: The terminal device in the ad hoc network performs service with the external server through the wireless gateway mAP.

[0187] Step S680: For each terminal device in the ad hoc network, if the wireless gateway mAP does not broadcast the message periodically for more than a certain time, it is considered that the wireless gateway mAP has left the network, and the network address of the wireless gateway mAP is deleted from the local gateway address list.

[0188] In some embodiments of the present disclosure, for example, the second access request is from a first node in the ad hoc network, and the external server establishes a communication connection with the mobile terminal. For example, as shown in FIG. 1, the external server 101 also establishes a communication connection with the mobile terminal 102. Figure 1B

[0189] For example, the external server 101 establishes a communication connection with the mobile terminal 102 as a proxy server. For another example, the external server 101 establishes a communication connection with the mobile terminal 102 through a cellular network.

[0190] The communication method can further include: in response to the access network address being the network address of the mobile terminal, sending a second access request to the external server to forward the second access request to the mobile terminal through the external server; and forwarding a response message from the external server to the first node, the response message being provided by the mobile terminal to the external server.

[0191] For example, the first node is the control node AP2. The access network address provided by the control node AP2 is the IP address of the mobile terminal 102. The control node AP2 sends the second access request to the control node AP1, the control node AP1 forwards the second access request to the external server 101, and the external server 101 forwards the second access request to the mobile terminal 102.

[0192] The mobile terminal 102 sends a response message to the external server 101 in response to the second access request. The external server 101 provides the response message to the control node AP2 via the control node AP1.

[0193] The communication method can realize communication between any device in the ad hoc network and the external mobile terminal. For example, any device in the ad hoc network can perform data communication, voice communication, etc. with the external mobile terminal.

[0194] In some embodiments of the present disclosure, the proxy server further includes a short message service of a proxy operator channel, and sends a short message to the mobile terminal through the proxy server. That is, the external server acts as a proxy server of an operator channel, and is used for proxying a short message service or a call service of the operator channel, and sends a short message or a voice call to the mobile terminal through the proxy server. ​

[0195] In this embodiment, the external network server is a proxy of the operator, and the terminal device in the ad hoc network can send a short message to a mobile terminal through the external network server. This embodiment expands the communication mode between the terminal device in the ad hoc network and the external terminal.

[0196] In some embodiments of the present disclosure, in addition to that the control node establishes a communication connection with the external network server, at least one second node in the ad hoc network also establishes a communication connection with the external network server, and the ad hoc network selects a communication node for communication with the external network server from the at least one second node and the control node in a polling manner. Receiving the second access request comprises: receiving the second access request by the control node when the communication node is the control node.

[0197] In some embodiments of the present disclosure, the communication with the external network server comprises communication with the external network server by using a mobile cellular network and / or a satellite network.

[0198] For example, in the example shown in Figure 1B In addition to that the control node AP1 establishes a communication connection with the external network server 101, the control node AP3 and the control node AP4 also establish a communication connection with the external network server. The control node AP3 and the control node AP4 are examples of the at least one second node. That is, in the ad hoc network shown in Figure 1B In the ad hoc network shown in

[0199] In the present disclosure, the polling manner refers to that the multiple control nodes (i.e., mAPs) in the ad hoc network that can communicate with the external network server are sorted in a certain order, and each control node is accessed in turn according to the order.

[0200] In some embodiments of the present disclosure, the arrangement order of the control node and the at least one second node in the polling is changed periodically, that is, the arrangement order of the multiple mAPs in the polling is changed periodically in these ad hoc networks. Changing the arrangement order of the multiple mAPs in the polling periodically can balance the proxy load of each mAP in a macroscopic manner.

[0201] In some embodiments of the present disclosure, in the arrangement order of the plurality of mAPs in the ad hoc network, the arrangement order of the node using the mobile cellular network to communicate with the external network server in the polling is in front of the node using the satellite network to communicate with the external network server, in the case that the ad hoc network is capable of communicating with the external network server. In this way, the mobile cellular network is prioritized for communicating with the external network server, reducing the communication cost and providing communication efficiency.

[0202] Embodiments of the present disclosure provide an ad hoc network-based network communication method using unlicensed frequency band wireless communication technology. For example, a plurality of vehicle infotainment systems and mobile terminals will implement an ad hoc network according to the wireless link quality and authorization conditions. Real-time intercommunication of basic services (such as messages, voice, etc.) between any devices in the ad hoc network is possible. For example, when there is a device in the ad hoc network that has external network communication capabilities (such as satellite communication capabilities or entering a cellular network coverage area), other devices can also achieve contact with the external network through this device. Through this fully automatic network communication method, seamless and economical interconnection and intercommunication between users in the group at any time and in any region is achieved, reducing the existence of information silos. The ad hoc network architecture provided by embodiments of the present disclosure can be quickly and securely established, ensuring the security, stability, and scalability of the ad hoc network.

[0203] Figure 7 A schematic block diagram of a communication apparatus 700 is shown, which is provided by at least one embodiment of the present disclosure.

[0204] For example, as shown in Figure 7 , the communication apparatus 700 includes a receiving unit 710 and an address allocation unit 720.

[0205] The receiving unit 710 is configured to receive a wireless access request provided by a first terminal device, the wireless access request being used to request access to an ad hoc network.

[0206] The receiving unit 710 may, for example, perform Figure 1A step S10 described above.

[0207] The address allocation unit 720 is configured to, in response to allowing the first terminal device to access the ad hoc network, allocate a first network address for the first terminal device to communicate in the ad hoc network, so that the first terminal device accesses the ad hoc network and communicates in the ad hoc network using the first network address.

[0208] The receiving unit 710 may, for example, perform Figure 1A step S20 described above.

[0209] For example, the receiving unit 710 and the address allocation unit 720 can be hardware, software, firmware, and any feasible combination thereof. For example, the receiving unit 710 and the address allocation unit 720 can be a dedicated or general-purpose circuit, chip, or device, or a combination of a processor and a memory. The embodiments of the present disclosure do not limit the specific implementation forms of the above-mentioned units.

[0210] It should be noted that in the embodiments of the present disclosure, the units of the communication apparatus 700 correspond to the steps of the above-mentioned communication method, and the specific functions of the communication apparatus 700 can be referred to the related description of the communication method, which will not be repeated here. Figure 7 The components and structures of the communication apparatus 700 shown are exemplary rather than limiting, and the communication apparatus 700 can further include other components and structures as needed.

[0211] At least one embodiment of the present disclosure further provides an electronic device including a processor and a memory including one or more computer program modules. The one or more computer program modules are stored in the memory and configured to be executed by the processor, and the one or more computer program modules include instructions for implementing the above-mentioned communication method. The electronic device can establish an ad hoc network by using a control node, so as to realize internal intercommunication through the ad hoc network even in a communication infrastructure-free scenario, and other devices in the ad hoc network can further realize intercommunication with the outside through a device in the ad hoc network that has basic communication capability.

[0212] Figure 8A A schematic block diagram of an electronic device provided by some embodiments of the present disclosure is shown. As shown, the electronic device 800 includes a processor 810 and a memory 820. The memory 820 is configured to store non-transitory computer-readable instructions (for example, one or more computer program modules). The processor 810 is configured to execute the non-transitory computer-readable instructions, and the non-transitory computer-readable instructions executed by the processor 810 can perform one or more steps of the above-mentioned communication method. The memory 820 and the processor 810 can be interconnected by a bus system and / or other forms of connection mechanism (not shown). Figure 8A

[0213] For example, the processor 810 can be a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units having data processing capability and / or program execution capability. For example, the central processing unit (CPU) can be X86 or ARM architecture, etc. The processor 810 can be a general-purpose processor or a special-purpose processor, and can control other components in the electronic device 800 to perform desired functions.

[0214] ​For example, the memory 820 can include any combination of one or more computer program products, which can include various forms of computer-readable storage media, for example, volatile and / or non-volatile memory. Volatile memory, for example, can include random access memory (RAM), and / or a cache, etc. Non-volatile memory, for example, can include read-only memory (ROM), hard disks, erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, flash memory, etc. One or more computer program modules can be stored on the computer-readable storage media, and the processor 810 can run the one or more computer program modules to implement various functions of the electronic device 800. Various application programs and various data used and / or generated by the application programs, etc. can also be stored in the computer-readable storage media.

[0215] It should be noted that, in the embodiments of the present disclosure, the specific functions and technical effects of the electronic device 800 can refer to the description of the communication method in the foregoing, which will not be described here.

[0216] Figure 8B Another schematic block diagram of an electronic device is provided for some embodiments of the present disclosure. The electronic device 900 is suitable for implementing the communication method provided by the embodiments of the present disclosure, for example. The electronic device 900 can be a terminal device such as a mobile phone, a tablet computer, a navigation device, a vehicle (for example, an in-vehicle system), a smart wearable device, etc. It should be noted that, Figure 8B The electronic device 900 shown is only an example, which does not bring any limitation to the functions and use range of the embodiments of the present disclosure.

[0217] As shown in Figure 8B The electronic device 900 can include a processing device (for example, a central processing unit, a graphics processing unit, etc.) 910, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 920 or programs loaded from a storage device 980 to a random access memory (RAM) 930. Various programs and data required for the operation of the electronic device 900 are also stored in the RAM 930. The processing device 910, the ROM 920, and the RAM 930 are connected to each other through a bus 940. An input / output (I / O) interface 950 is also connected to the bus 940.

[0218] Typically, the following devices can be connected to I / O interface 950: input devices 960 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 970 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 980 including, for example, magnetic tapes, hard disks, etc.; and communication devices 990. Communication device 990 allows electronic device 900 to communicate wirelessly or wiredly with other electronic devices to exchange data. Although Figure 8B An electronic device 900 with various devices is shown, but it should be understood that it is not required to implement or have all of the devices shown, and the electronic device 900 may alternatively implement or have more or fewer devices.

[0219] For example, according to embodiments of this disclosure, the communication method described above can be implemented as a computer software program. For instance, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program including program code for performing the communication method described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 990, or installed from a storage device 980, or installed from a ROM 920. When the computer program is executed by a processing device 910, the functions defined in the communication method provided by embodiments of this disclosure can be implemented.

[0220] At least one embodiment of this disclosure also provides a computer-readable storage medium for storing non-transitory computer-readable instructions that, when executed by a computer, can implement the aforementioned communication method. Using this computer-readable storage medium, a self-organizing network can be established using control nodes, enabling internal communication even in scenarios without communication infrastructure. Furthermore, once one device within the self-organizing network possesses basic communication capabilities, other devices within the network can also communicate with the outside world through that device.

[0221] Figure 9 This is a schematic diagram of a storage medium provided for some embodiments of this disclosure. For example... Figure 9 As shown, the storage medium 1000 is used to store non-transitory computer-readable instructions 1010. For example, when the non-transitory computer-readable instructions 1010 are executed by a computer, one or more steps in the communication method described above can be performed.

[0222] For example, the storage medium 1000 can be used in the aforementioned electronic device 800. For example, the storage medium 1000 can be... Figure 8A The memory 820 in the illustrated electronic device 800. For example, a description of the storage medium 1000 can be found here. Figure 8AThe corresponding description of the memory 820 in the electronic device 800 shown here will not be repeated.

[0223] The following points need to be explained:

[0224] (1) The drawings of the embodiments of the present disclosure only relate to the structures involved in the embodiments of the present disclosure, and other structures can be referred to the general design.

[0225] (2) In the case of no conflict, the embodiments of the present disclosure and the features in the embodiments can be combined to obtain new embodiments.

[0226] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto, and the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. A communication method applied to a control node in an ad hoc network, the method comprising: Receive a wireless access request provided by a first terminal device, wherein the wireless access request is used to request access to the ad hoc network; and In response to allowing the first terminal device to access the ad hoc network, a first network address is assigned to the first terminal device for communication within the ad hoc network, enabling the first terminal device to access the ad hoc network and communicate within it using the first network address. The method further includes: In response to the first terminal device being another control node, determine whether the first terminal device has external network service capabilities; In response to the fact that the first terminal device has external network service capabilities, the first terminal device is marked as a gateway.

2. The method according to claim 1, wherein, The self-organizing network includes wireless local area networks established using unlicensed spectrum.

3. The method according to claim 1, wherein, In response to allowing the first terminal device to access the ad hoc network, a first network address for communication in the ad hoc network is assigned to the first terminal device, including: In response to allowing the first terminal device to access the ad hoc network, the device type of the first terminal device is determined; In response to the first terminal device being a slave node of the control node, a first type of network address is assigned to the first terminal device; In response to the first terminal device being another control node, a second type of network address is assigned to the first terminal device.

4. The method according to claim 3, wherein, The first type of network address includes Class C network addresses, and the second type of network address includes Class B network addresses.

5. The method according to claim 1, further comprising: After the first terminal device accesses the self-organizing network, it broadcasts the first network address of the first terminal device.

6. The method according to claim 1, further comprising: Set a keep-alive timer for the first terminal device; In response to receiving a probe message from the first terminal device, the keep-alive timer is reset to its maximum value; In response to the failure to receive a probe message from the first terminal device, causing the keep-alive timer count to reach 0, offline processing of the first terminal device is initiated.

7. The method according to claim 1, further comprising: In response to receiving the second network address broadcast by the second terminal device in the self-organizing network, the second network address is recorded and displayed in the list of serviceable objects; In response to the selection operation of the second network address, a first access request is provided to the second terminal device.

8. The method according to claim 7, wherein, The terminal devices recorded in the list of serviceable objects periodically send broadcast messages to the control node; If no broadcast message is received from a third terminal device recorded in the list of serviceable objects within a preset time, the third terminal device is removed from the list of serviceable objects.

9. The method according to claim 1, further comprising: The identity information of the control node is broadcast, wherein the identity information includes the network address of the control node.

10. The method according to claim 9, wherein, The identity information also includes gateway indication information, which is used to indicate that the control node has external network service capabilities, so that the nodes in the ad hoc network can set the control node as a gateway.

11. The method of claim 9, further comprising: In response to the control node establishing a communication connection with the external network server, the external network address of the external network server is broadcast, causing the nodes in the ad hoc network to add the external network address to their own list of serviceable objects.

12. The method according to claim 11, wherein, The control node establishes a communication connection with the external network server, and the method further includes: Receive the second access request; Obtain the access network address from the second access request; In response to the fact that the access network address is the external network address, the second access request is forwarded to the external network server; In response to the fact that the accessed network address is the target network address of the target node in the ad hoc network, the second access request is forwarded to the target node.

13. The method according to claim 12, wherein, The second access request originates from the first node in the ad hoc network, the external network server establishes a communication connection with the mobile terminal, and the method further includes: In response to the access network address being the network address of the mobile terminal, a second access request is sent to the external network server, so that the external network server forwards the second access request to the mobile terminal; and The response message from the external network server is forwarded to the first node, wherein the response message is provided by the mobile terminal to the external network server.

14. The method according to claim 13, wherein, The external network server acts as a proxy server to establish a communication connection with the mobile terminal.

15. The method according to claim 14, wherein, The proxy server also includes: The SMS service through the proxy operator channel sends SMS messages to the mobile terminal via the proxy server.

16. The method according to claim 12, wherein, In addition to the control node establishing a communication connection with the external network server, at least one second node in the ad hoc network establishes a communication connection with the external network server. The ad hoc network selects a communication node for communicating with the external network server from among the at least one second node and the control node in a round-robin manner. Receiving the second access request includes: In response to the fact that the communication node is the control node, the second access request is received.

17. The method according to claim 16, wherein, The order of the control node and the at least one second node in the polling is changed periodically.

18. The method according to claim 17, wherein, The communication with the external network server includes communicating with the external network server using mobile cellular networks and / or satellite networks.

19. The method according to claim 18, wherein, When a node is able to communicate with an external network server, the node that communicates with the external network server via a mobile cellular network is ranked ahead of the node that communicates with the external network server via a satellite network in the polling process.

20. A communication device for use as a control node in an ad hoc network, the device comprising: A receiving unit is configured to receive a wireless access request provided by a first terminal device, wherein the wireless access request is used to request access to the ad hoc network; and The address allocation unit is configured to, in response to allowing the first terminal device to access the ad hoc network, allocate a first network address to the first terminal device for communication within the ad hoc network, thereby enabling the first terminal device to access the ad hoc network and communicate within it using the first network address. The communication device is further configured as follows: In response to the first terminal device being another control node, determine whether the first terminal device has external network service capabilities; In response to the fact that the first terminal device has external network service capabilities, the first terminal device is marked as a gateway.

21. An electronic device, comprising: processor; Memory, which includes one or more computer program instructions; The one or more computer program instructions are stored in the memory and, when executed by the processor, implement the instructions of the communication method according to any one of claims 1-19.

22. A computer-readable storage medium that non-transitoryly stores computer-readable instructions, wherein, The communication method according to any one of claims 1-19 is implemented when the computer-readable instructions are executed by a processor.

Citation Information

Patent Citations

  • Node address allocation method and device, storage medium and electronic equipment

    CN113194462A