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

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

Info

Publication number
WO2024060930A1
WO2024060930A1 PCT/CN2023/114841 CN2023114841W WO2024060930A1 WO 2024060930 A1 WO2024060930 A1 WO 2024060930A1 CN 2023114841 W CN2023114841 W CN 2023114841W WO 2024060930 A1 WO2024060930 A1 WO 2024060930A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
network
control node
response
node
Prior art date
Application number
PCT/CN2023/114841
Other languages
French (fr)
Chinese (zh)
Inventor
张亚东
朱清华
Original Assignee
湖北星纪魅族科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 湖北星纪魅族科技有限公司 filed Critical 湖北星纪魅族科技有限公司
Publication of WO2024060930A1 publication Critical patent/WO2024060930A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/20Selecting an access point
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/48Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for in-vehicle communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/18Self-organising networks, e.g. ad-hoc networks or sensor networks

Definitions

  • Embodiments of the present disclosure relate to a communication method, device, electronic device, and computer-readable storage medium.
  • At least one embodiment of the present disclosure provides a communication method applied to a control node in an ad hoc network.
  • the method includes: receiving a wireless access request provided by a first terminal device, wherein the wireless access request is used to request accessing 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 communicating in the ad hoc network to the first terminal device, The first terminal device is caused to access the ad hoc network and communicate in the ad hoc network using the first network address.
  • the ad hoc network includes a wireless local area network established using unlicensed spectrum.
  • allocating the first terminal device for communication in the ad hoc network includes: 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 the control node The slave node allocates a first type network address to the first terminal device; in response to the first terminal device being another control node, allocates a second type network address to the first terminal device.
  • the first type of network address includes a Class C network address
  • the second type of network address includes a Class B network address
  • the communication method provided by an embodiment of the present disclosure further includes, in response to the first terminal device being another control node, determining whether the first terminal device has external network service capabilities; in response to the first terminal device being another control node, The terminal device has external network service capabilities, and the first terminal device is marked as a gateway.
  • the communication method provided by an embodiment of the present disclosure further includes broadcasting the first network address of the first terminal device after the first terminal device accesses the ad hoc network.
  • the communication method provided by an embodiment of the present disclosure further includes setting a keep-alive timer for the first terminal device; in response to receiving a detection message from the first terminal device, resetting the keep-alive timer is the maximum value; in response to the fact that the keep-alive timer count is 0 due to the fact that no detection message from the first terminal device has been received, offline processing of the first terminal device is started.
  • the communication method also includes: in response to receiving a second network address broadcast by a second terminal device in the self-organizing network, recording and displaying the second network address in a list of serviceable objects; in response to a selection operation on the second network address, providing a first access request to the second terminal device.
  • the terminal device recorded in the serviceable object list regularly sends broadcast messages to the control node; in response to not receiving the record in the serviceable object list within a preset time, broadcast message provided by the third terminal device, and delete the third terminal device from the serviceable object list.
  • the communication method provided by an embodiment of the present disclosure further includes: broadcasting the identity information of the control node, where the identity information includes the network address of the control node.
  • the identity information also includes gateway indication information, and the gateway indication information is used to indicate that the control node has external network service capabilities so that the ad hoc network can The node sets this control node as a gateway.
  • it 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 ad hoc network The node adds the external network address to its own serviceable object list.
  • the control node establishes a communication connection with an external network server.
  • the method further includes: receiving a second access request; obtaining the access network address in the second access request; and responding When the accessed network address is the external network address, forward the second access request to the external network server; in response to the accessed network address being the target network address of the target node in the ad hoc network, forward the second access request to the external network server.
  • the target node forwards the second access request.
  • the second access request comes from the first node in the ad hoc network
  • the external network server establishes a communication connection with the mobile terminal
  • the method further includes: responding to The access network address is the network address of the mobile terminal, and the second access request is sent to the external network server to forward the second access request to the mobile terminal through the external network server; and The response message from the external network server is forwarded to the first node, where the response message is provided by the mobile terminal to the external network server.
  • the external network server acts as a proxy server to establish a communication connection with the mobile terminal.
  • the proxy server further includes an agent for the SMS service of the operator channel, and the SMS is sent to the mobile terminal through the proxy server.
  • the ad hoc network 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 the at least one second node and the control node in a polling manner, and receives the second access request, including: In response to the communication node being the control node, the second access request is received.
  • the arrangement order of the control node and the at least one second node in polling is periodically changed.
  • communicating with the external network server includes using a mobile cellular network and/or a satellite network to communicate with the external network server.
  • the nodes that use the mobile cellular network to communicate with the external network server are ranked in the polling order between those using the satellite network and the external network server.
  • the external network server communicates in front of the node.
  • At least one embodiment of the present disclosure provides a communication device applied to a control node in an ad hoc network.
  • the device includes: 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 the address allocation unit is configured to respond to allowing the first terminal device to access the ad hoc network. Allocate a first network address for communication in the ad hoc network, so that the first terminal device accesses the ad hoc network and uses the first network address to communicate in the ad hoc network.
  • At least one embodiment of the present disclosure provides an electronic device including a processor; a memory including one or more computer program modules; wherein the one or more computer program modules are stored in the memory and configured to The processor executes, and the one or more computer program modules include instructions for implementing the communication method provided by any embodiment of the present disclosure.
  • At least one embodiment of the present disclosure provides a computer-readable storage medium for storing non-transitory computer-readable instructions.
  • the non-transitory computer-readable instructions are executed by a computer, the methods provided by any embodiment of the present disclosure can be implemented. Communication methods.
  • Figure 1A shows a flow chart of a communication method provided by at least one embodiment of the present disclosure
  • FIG. 1B shows a schematic diagram of an ad hoc network established using the communication method provided by the present disclosure provided by at least one embodiment of the present disclosure
  • Figure 2 shows a flow chart of a method for a control node to be accessed to access a target control node provided by at least one embodiment of the present disclosure
  • Figure 3 shows a flow chart of a method for accessing a control node from a slave node according to at least one embodiment of the present disclosure
  • Figure 4A shows a flow chart of another communication method provided by some embodiments of the present disclosure.
  • FIG4B shows a flow chart of another communication method provided by some embodiments of the present disclosure.
  • Figure 5 shows a flow chart of a communication method between devices in an ad hoc network provided by at least one embodiment of the present disclosure
  • Figure 6A shows a flow chart of another communication method provided by at least one embodiment of the present disclosure
  • Figure 6B shows a flow chart of another communication method provided by at least one embodiment of the present disclosure
  • Figure 7 shows a schematic block diagram of a communication device provided by at least one embodiment of the present disclosure
  • Figure 8A shows a schematic block diagram of an electronic device provided by at least one embodiment of the present disclosure
  • FIG. 8B shows a schematic block diagram of another electronic device provided by at least one embodiment of the present disclosure.
  • Figure 9 shows a schematic diagram of a computer-readable storage medium provided by at least one embodiment of the present disclosure.
  • the communication connection between the vehicle system and the mobile terminal is generally established using point-to-point (P2P) method, mainly to complete the function of wireless sharing of data (such as Bluetooth music, screen projection, etc.) between the two, which belongs to PAN (Personal Domain). Business within the scope of the Internet). There are no direct wireless transmission links between multiple PANs. If data sharing is required, it can only be achieved in disguise through expensive public networks. In some special scenarios, such as traveling in groups to remote areas and entering areas without public network services, inter-PAN communication will not be possible, which means loss of connection for those devices without external network service capabilities, which will cause problems for the entire Team safety poses a risk.
  • P2P point-to-point
  • At least one embodiment of the present disclosure provides a communication method, apparatus, electronic device, and computer-readable storage medium.
  • This communication method is applied to control nodes in ad hoc networks.
  • the method includes: receiving a wireless access request provided by a first terminal device, the wireless access request being used to request access to an ad hoc network; and in response to allowing the first terminal device to access the ad hoc network, allocating a username to the first terminal device. Based on the first network address for communication in the ad hoc network, the first terminal device is allowed to access the ad hoc network and communicate in the ad hoc network using the first network address.
  • the communication method establishes an ad hoc network based on control nodes, so that even in a scenario without communication infrastructure, internal intercommunication can be carried out through the ad hoc network, and further, for example, in at least one example, once a network within the ad hoc network When the device has basic communication capabilities, other devices in the ad hoc network can also communicate with the outside through the device.
  • FIG. 1A shows a flowchart of a communication method provided by at least one embodiment of the present disclosure.
  • the method may include steps S10 to S20. This method is applied to control nodes in ad hoc networks.
  • Step S10 Receive a wireless access request provided by the first terminal device, where the wireless access request is used to request access to the ad hoc network.
  • Step S20 In response to allowing the first terminal device to access the ad hoc network, allocate a first network address for communicating in the ad hoc network to the first terminal device, so that the first terminal device accesses the ad hoc network and utilizes the first A network address communicates in an ad hoc network.
  • one or more terminal devices in the ad hoc network may have both functions of router and host.
  • the terminal device needs to run various user-oriented applications, such as editors, browsers, etc.
  • the terminal device needs to run the corresponding routing protocol and complete the forwarding and routing maintenance of data packets according to the routing policy and routing table. Therefore, the terminal device in the ad hoc network needs to implement a suitable routing protocol.
  • Ad hoc networks can utilize the routing and forwarding functions of terminal devices to communicate without infrastructure, thus making up for the shortcomings of unavailable network communication infrastructure.
  • the ad hoc network may be a wireless ad hoc network.
  • the wireless ad hoc network is a system composed of a group of movable nodes with wireless transceiver modules. It does not rely on preset infrastructure. , which has the characteristics of temporary networking, rapid deployment, no control center, and strong invulnerability.
  • control node may be, for example, a device with strong network capabilities.
  • the control node as a parent node, establishes a wireless link with its slave node.
  • the control node may also establish a wireless link with other surrounding control nodes.
  • the control node completes the routing and forwarding function of data.
  • control node may be a vehicle system device with strong network capabilities
  • slave node of the control node may be a mobile phone, tablet, headset, etc. that establishes a communication connection with the vehicle system device.
  • control node may be a mobile phone with strong network capabilities
  • slave nodes of the control node may be a car computer, a tablet, a headset, etc. that establishes a communication connection with the mobile phone.
  • network capabilities may be set to be evaluated based on whether a network connection can be established. For example, in the absence of a cellular mobile network, a device that can establish a satellite communication network connection has stronger network capabilities than other devices. ; When there is a certain cellular mobile network, you can set it to network speed, delay, etc. to evaluate the network capabilities of different devices; when there are both cellular mobile networks and satellite communication networks, you can set it to network speed, delay, etc. Evaluate the network capabilities of different devices.
  • control node may be determined based on its own capabilities when the device accesses the network. For example, if a certain device allows other devices to establish connections with itself, and the communication capability of the device is stronger than that of at least some other devices, the device can serve as a control node.
  • control node may serve as a wireless access point (AP), the creator of a wireless network, and the central node of the wireless network.
  • AP wireless access point
  • FIG1B shows a schematic diagram of an ad hoc network established by applying the communication method provided by the present disclosure, provided by at least one embodiment of the present disclosure.
  • the ad hoc network includes multiple nodes. These multiple nodes further include at least one control node and at least one slave node.
  • the slave node may be called an "STA" node, which is a terminal in the wireless network.
  • STA control node AP1, control node AP2, control node AP3 and control node AP4.
  • Node STA11 and node STA12 access the control node AP1 and serve as slave nodes of the control node AP1.
  • Node STA21, node STA22 and node STA23 access the control node AP2 and serve as slave nodes of the control node AP2.
  • Node STA31 accesses the control node AP3 and serves as a slave node of the control node AP3.
  • Control nodes AP1 ⁇ AP4 establish communication connections between any two nodes.
  • the slave node refers to a mobile terminal with weak network capabilities or does not have the ability to allow other devices to access. It only establishes a wireless link with the parent AP and communicates with other terminals in the network. The letter is relayed by the parent AP.
  • the networking capabilities of the slave nodes are weaker than those of the control nodes.
  • Each AP broadcasts beacon frames to surrounding STAs and APs at certain intervals (ranging from tens of milliseconds to several seconds) to tell surrounding STAs and other APs that it can access it.
  • each STA (such as mobile phones, notebooks, etc.) can also actively send probe frames to find APs that can be accessed.
  • the ad hoc network shown in FIG. 1B is only an example to facilitate understanding of the present invention and has no limiting effect on the present disclosure.
  • the number of control nodes can be arbitrary and is not limited to four, and the number of access control nodes can also be arbitrary.
  • any control node in the ad hoc network shown in FIG. 1B can apply the communication method provided by the embodiment of the present disclosure.
  • the following uses the control node AP1 as an example to illustrate embodiments of the present disclosure.
  • the slave nodes STA11, STA12, and the control nodes AP2 to AP4 can all access the control node AP1 using the communication method shown in Figure 1A, thereby accessing the ad hoc network based on the control node AP1.
  • the first terminal device may be any device with wireless communication capabilities.
  • the first terminal device may be a device including, but not limited to, a wireless communication module including a Wi-Fi module, a Bluetooth (BT) module, a uwb module, a zigbee module, and the like.
  • the first terminal device may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR)/virtual reality (VR) device, a notebook computer, or an ultra-mobile personal computer (Ultra-mobile).
  • personal computer UMPC
  • netbook personal digital assistant
  • PDA personal digital assistant
  • the first terminal device may be a station (ST) in WLAN, and may be a cellular phone, a cordless phone, a session initiation protocol (Session Initiation Protocol, SIP) phone, or a wireless local loop (Wireless Local Loop, WLL) station.
  • ST station
  • SIP Session Initiation Protocol
  • WLL wireless Local Loop
  • PDA Personal Digital Assistant
  • handheld device with wireless communication module computing device or other processing device connected to wireless communication module, computer, laptop computer, handheld communication device, handheld Computing devices, and/or other devices for communicating on wireless systems
  • next-generation communication systems such as mobile terminals in 5G networks and mobile terminals in future evolved Public Land Mobile Networks (PLMN) Or mobile terminals in future evolved non-terrestrial networks (Non-terrestrial Network, NTN), etc.
  • PLMN Public Land Mobile Network
  • NTN Non-terrestrial Network
  • the wearable device may also be a general term for devices that apply wearable technology to intelligently design daily wear and develop wearable devices, such as configured with Near field communication modules for gloves, watches, etc.
  • a wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not just hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly defined wearable smart devices include full-featured, large-sized devices that can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, and those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones. , such as various types of smart watches and smart bracelets with display screens.
  • the first terminal device may be a terminal device serving as a slave node, or the first terminal device may be a terminal device serving as another control node.
  • the first terminal device may be one of the slave nodes STA11, STA12, and control nodes AP2 to AP4 in FIG. 1B.
  • Wireless communication modules such as Wi-Fi modules, BT modules, uwb modules, and zigbee modules support communication in unlicensed frequency bands. Therefore, in some embodiments of the present disclosure, ad hoc networks include those established using unlicensed spectrum.
  • Wireless LAN Using unlicensed spectrum to establish wireless LANs can reduce communication costs and improve communication flexibility without being restricted by external conditions.
  • Unlicensed spectrum may be, for example, the 2.4GHz, 5GHz, 6GHz and 60GHz frequency bands.
  • the unlicensed frequency band has the characteristics of sharing without permission, provides best-effort services in the form of competition for spectrum, and is used in accordance with the principles of channel access fairness and the coexistence of multiple wireless communication technologies.
  • the wireless access request may include, for example, a probe request and an authentication request.
  • the first terminal device broadcasts a detection request to the control node AP1, and the control node AP1 responds to receiving the detection request by sending a detection response to the first terminal device.
  • the first terminal device sends an authentication request to the control node AP1, so that the control node AP1 determines whether to allow the first terminal device to access based on the authentication request.
  • the first terminal device sends a detection request and an authentication request to the control node AP1 through the Wi-Fi module.
  • the first terminal device sends a detection request and an authentication request to the control node AP1 through the zigbee module.
  • a probe request includes a probe frame to find an accessible AP. Originator of probe request is the first terminal device.
  • the wireless access request may be generated in response to receiving a beacon frame sent by the control node.
  • control node broadcasts beacon frames to surrounding STAs and APs at certain intervals, telling the surrounding STAs and other APs that it can access, so that the first terminal device requests access to the AP.
  • the control node AP1 responds to receiving the authentication request, and displays an interactive interface on the terminal device of the control node AP1.
  • the interactive interface displays, for example, a list including the control node AP1.
  • it may also include Text prompt information such as "Whether to access” allows the user to operate on the interactive interface whether to allow access to the control node AP1.
  • the operating system of the terminal device as the control node AP1 can be android, linux, windows, etc., and the driver with the corresponding communication module can trigger the display of the interactive interface, and the terminal device has a touch screen (or screen + buttons) and other peripherals.
  • the authentication request may carry the identity information of the first terminal device, and the control node AP1 determines whether to allow the first terminal device to access based on the identity information in the authentication request.
  • the control node AP1 includes an access device list, and if the identity of the first terminal device appears in the device list, the first terminal device is allowed to access.
  • users can set the device list in the control node to add their own devices to the device list to prevent too many users from occupying network resources.
  • the control node AP1 if the first terminal device provides a wireless access request to the control node AP1 for the first time, and the control node AP1 confirms that the first terminal device is allowed to access the self-organizing network according to the method described in the above embodiment, the control node AP1 generates a random key and provides the key to the first terminal device through a response message.
  • the authentication request provided by the first terminal device carries the key.
  • the control node AP1 determines whether the key carried in 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.
  • 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.
  • the first terminal device In response to receiving the response message, the first terminal device sends an association request to the control node AP1.
  • the control node AP1 responds to the association request Apply to a Dynamic Host Configuration Protocol (Dynamic Host Configuration Protocol, DHCP) service module to allocate a network address (for example, a first network address) to the first terminal device.
  • a Dynamic Host Configuration Protocol Dynamic Host Configuration Protocol
  • DHCP Dynamic Host Configuration Protocol
  • the network address assigned by the control node AP1 to the first terminal device is the IP address: 192.168.*.0.
  • the DHCP service module is integrated in the control node, or the DHCP service module can also be a device independent of the control node.
  • the control node AP1 allocates a network address to the first terminal device
  • the control node sends an association response to the first terminal device
  • the association response includes the network address of the first terminal device
  • the control node updates own routing table.
  • the first terminal device updates its own routing table, so that the first terminal device accesses the ad hoc network and uses the first network address to communicate in the ad hoc network.
  • step S20 includes: 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, determining the device type of the first terminal device.
  • a terminal device allocates a first type network address; in response to the first terminal device being another control node, allocating a second type network address to the first terminal device.
  • 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 an AP access request and the device type of the first terminal device is another control node, the second type network address is allocated to the first terminal device. If the association request is a non-AP access request and the device type of the first terminal device is a slave node, the first terminal device is assigned a first-class network address.
  • the first type of network address includes a Class C network address and the second type of network address includes a Class B network address.
  • Class B network The address range of Class B network is: 128.1.0.1-191.255.255.254; the address range of Class C network is: 192.0.1.1-223.255.255.254.
  • a Class B IP address consists of a 2-byte network address and a 2-byte host address. The highest bit of the network address must be "10", that is, the first number ranges from 128 to 191. There are 16,256 Class B addresses on the Internet.
  • a Class C address consists of a 3-byte network address and a 1-byte host address. The highest bit of the network address must be "ll0", that is, the first number ranges from 192 to 223. There are 2,054,512 Class C addresses on the Internet. That is, the number of Class C network addresses is greater than the number of Class B network addresses. Since the number of control nodes in an ad hoc network is less than the number of slave nodes in an ad hoc network, class B network addresses are assigned to control nodes and class C network nodes are assigned to slave nodes.
  • the communication method may further include step S30 and step S40.
  • Step S30 In response to the first terminal device being another control node, determine whether the first terminal device has external network service capabilities.
  • Step S40 In response to the first terminal device having external network service capabilities, mark the first terminal device as a gateway.
  • the first terminal device if the first terminal device itself has the 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.
  • an AP with external network service capabilities is called a wireless gateway (Mobile Access Portal, mAP).
  • mAP allows other nodes in the ad hoc network to communicate with the external network through mAP. For example, when the AP enters the network or during the networking process, it can be set according to the free will or the administrator's will to allow it to serve as an external network proxy. If it is allowed, it means that the AP can be used as a mAP and can be used as the default gateway for other terminals in the network. .
  • the external network service capability may refer to the ability to communicate with external servers outside the ad hoc network.
  • the association request sent by the first terminal device to the control node includes information indicating whether the first terminal device has external network service capabilities. That is, the association request includes identity information indicating whether the first terminal device can serve as a mAP.
  • the control node can mark the first terminal device as a gateway.
  • the first network address of the first terminal device is broadcast.
  • the control node broadcasts the first network address spontaneously, or the first terminal device broadcasts its own first network address, and the control node unconditionally forwards the first network address in response to the first terminal device broadcasting the first network address.
  • Figure 2 shows a flow chart of a method for a control node to be accessed to access a target control node provided by at least one embodiment of the present disclosure.
  • the method includes steps S201-209.
  • the control node to be accessed (hereinafter referred to as the "AP to be accessed") is the control node AP4 in Figure 1B
  • the target control node (hereinafter referred to as the "target AP”) (labeled "AP") is the control node AP1.
  • Step S201 The AP to be accessed sends a detection request to the target AP.
  • Probe requests are used to scan the communication area for the presence of connected networks. Probe requests include probe frames to find accessible APs.
  • Step S202 The target AP sends a detection response to the AP to be accessed.
  • the target AP sends a probe response to the AP to be accessed in response to the probe request.
  • Step S203 The AP to be accessed sends an authentication request to the target AP.
  • step S204 includes the target AP checking whether the key in the authentication request is correct. If the key is correct, step S205 is executed, that is, the authentication response is fed back to the AP to be accessed.
  • step S204 includes the target AP generating a random key
  • 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 can access with the key the next time it accesses, thereby avoiding wasting time and resources on reallocating keys to the AP to be accessed again.
  • Step S206 The AP to be accessed sends an association request to the target AP.
  • the association request includes indication information that the device type is AP.
  • the association request also includes the network address of the AP to be accessed, that is, the IP address.
  • Step S207 If the association request includes the IP address (that is, this access is the first access), the target AP updates its own routing table. For example, add the IP address of the AP to be accessed in its own routing table.
  • the target AP applies to the DHCP service module to assign a Class B IP address to the AP to be accessed, and updates its own routing table.
  • Step S208 The target AP sends an association response to the AP to be accessed.
  • the association response includes the IP address of the target AP. If the AP to be accessed is accessing the ad hoc network for the first time, the association response also includes the network address assigned by the target AP to the AP to be accessed.
  • Step S209 The AP to be accessed updates its own routing table. For example, register your own IP address and add the network address of the target AP.
  • the AP to be connected can use its own IP address to communicate with other nodes in the ad hoc network.
  • Figure 3 shows a flow chart of a method for accessing a control node from a slave node according to at least one embodiment of the present disclosure.
  • the method includes steps S301 to 309.
  • the slave node to be accessed (hereinafter referred to as "STA to be accessed”) is the slave node STA11 in Fig. 1B
  • the target control node (hereinafter referred to as "target AP”) is the control node AP1.
  • Step S301 The STA to be accessed sends a detection request to the target AP. Probe requests are used to scan the communication area for the presence of connected networks.
  • Step S302 The target AP sends a detection response to the STA to be accessed.
  • the target AP sends a probe response to the STA to be accessed in response to the probe request.
  • Step S303 The STA to be accessed sends an authentication request to the target AP.
  • step S304 includes the target AP checking whether the key in the authentication request is correct. If the key is correct, step S205 is executed, that is, the authentication response is fed back to the STA to be accessed.
  • step S204 includes the target AP generating a random key
  • step S205 includes feedback to the STA to be accessed.
  • the authentication response includes the random key so that the STA to be accessed can use this key to access the STA next time to avoid wasting time and resources by redistributing the key to the STA to be accessed again.
  • Step S306 The STA to be accessed sends an association request to the target AP.
  • the association request includes indication information that the device type is non-AP to indicate that the device type is STA.
  • the association request also includes the network address of the STA to be accessed, that is, the IP address.
  • Step S307 If the association request includes the IP address, the target AP updates its own routing table. For example, add the IP address of the STA to be connected to its own routing table.
  • the target AP applies to the DHCP service module to assign a Class C IP address to the AP to be accessed, and updates its own routing table.
  • Step S308 The target AP sends an association response to the STA to be accessed.
  • the association response includes the IP address of the target AP. If the STA to be accessed is accessing the ad hoc network for the first time, the association response also includes the network address assigned by the target AP to the STA to be accessed.
  • Step S309 The STA to be accessed updates its own routing table. For example, register your own IP address and add the network address of the target AP.
  • the STA to be connected can use its own IP address to communicate with other nodes in the ad hoc network.
  • Figure 4A shows a flowchart of another communication method provided by some embodiments of the present disclosure.
  • the method may also include steps S401 to S403 in addition to the foregoing steps.
  • Steps S401 to S403 may be executed after the first terminal device accesses the ad hoc network. For example, it is executed after step S20.
  • Step S401 Set a keep-alive timer for the first terminal device.
  • Step S402 In response to receiving the detection message from the first terminal device, reset the keep-alive timer to the maximum value.
  • Step S403 In response to the fact that the keep-alive timer count reaches 0 because the detection message of the first terminal device has not been received, start offline processing of the first terminal device.
  • the first terminal device is only an example of a terminal device connected to the control node, and the first terminal device may be any device connected to the control node.
  • control node establishes a keep-alive timer for each terminal device connected to the control node (including slave nodes and other control nodes).
  • the keep-alive timer is, for example, a countdown timer. As long as no detection message from the terminal device is received, the countdown timer counts down from the initial value (that is, the maximum value).
  • the initial value may be set by those skilled in the art, and the initial value may represent a preset time length.
  • step S402 if a detection message from the terminal device is received, the keep-alive timer is reset to the initial value.
  • step S403 if the count of the keep-alive timer has been updated from the maximum value to 0, then determine The terminal device is disconnected from the control node, and offline processing of the first terminal device is started.
  • Offline processing may include, for example, clearing resources occupied by the terminal device, clearing the keeper of the terminal device, etc.
  • This method can promptly clean up the terminal device that has been offline (that is, disconnected), thereby reducing the resources occupied by the terminal device and avoiding the network resources occupied by sending messages to the offline terminal device.
  • Figure 4B shows a flowchart of another communication method provided by some embodiments of the present disclosure.
  • the method may also include steps S404 to S406 in addition to the foregoing steps.
  • Steps S404 to S406 may be executed after the terminal device accesses the ad hoc network. For example, it is executed after step S20.
  • Step S404 Device A periodically broadcasts detection requests.
  • Step S405 When device B finds that device A has been successfully registered, it considers that device A is in the keep-alive state and resets the keep-alive timer of device A.
  • Successful registration of device A may mean, for example, that device A has established a direct communication connection with device B.
  • device A is a slave node of device B, or device A is another control node to which device B is directly connected through communication.
  • Step S406 After the preset time length, the keep-alive timer of device A in device B counts to 0, and device A is considered to have disconnected from device B.
  • the AP to be accessed may be device A in FIG. 4B, and the target AP may be device B in FIG. 4B.
  • the STA to be accessed may be device A in FIG. 4B
  • the target AP may be device B in FIG. 4B .
  • the communication method further includes, in response to receiving the second network address broadcast by the second terminal device in the ad hoc network, recording and displaying the second network address in the serviceable object list; in response to The selection operation of the second network address provides the first access request to the second terminal device.
  • the second terminal device can be the slave node STA21, the slave node STA22, the slave node STA23, Slave node STA31, control node AP2, control node AP3 and control node AP4.
  • the respective network addresses (ie, the second network addresses) of the slave nodes STA21, STA22, STA23, and STA31 are forwarded by the control node AP2 and the control node AP3 respectively.
  • 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.
  • the control node AP1 In response to receiving the network address of the slave node STA21, the control node AP1 records and displays the network address of the slave node STA21 in the serviceable object list of the application program, so that the user can select the network address of the slave node STA21 and the slave node in the application program. STA21 communication.
  • an access request (for example, a first access request) is provided from the second terminal device.
  • the name of each node or other identification can be used to represent the network address of the node, so as to facilitate users to distinguish different terminal devices, thereby helping users accurately select the node to visit.
  • the control node records the device name of the slave node STA21 in the serviceable object list of the application program to identify the network address of the slave node STA21.
  • the network address of the terminal device that can communicate in the ad hoc network is registered in the service object list of the application program, so as to facilitate the user to select the terminal device for communication, and realize the communication of each terminal device in the ad hoc network.
  • the terminal device recorded in the serviceable object list regularly sends broadcast messages to the control node; in response to not receiving a broadcast message provided by the third terminal device recorded in the serviceable object list within a preset time , delete the third terminal device from the serviceable object list.
  • a terminal device After a terminal device successfully connects to an ad hoc network, it regularly broadcasts network access information (for example, the IP address in the ad hoc network) through broadcast packets. After other terminal devices receive the network access information, they use it in their respective applications. Register as a serviceable object and display in the serviceable object list. When a terminal device needs to communicate with a target terminal device in the ad hoc network, the target terminal device is selected in the service object list of the terminal device to perform services (for example, short message communication, short voice communication, etc.).
  • network access information for example, the IP address in the ad hoc network
  • the target terminal device is selected in the service object list of the terminal device to perform services (for example, short message communication, short voice communication, etc.).
  • the registered terminal device For example, for each terminal device (which can be a slave node or a control node), if the network access information regularly broadcast by the registered terminal device (ie, the third terminal device) is not received for more than the preset time, it is considered that the If the registered terminal device is offline, the registered terminal device will be deleted from the service object list of the application.
  • Figure 5 shows communication between devices in an ad hoc network provided by at least one embodiment of the present disclosure. Flowchart of the method.
  • the communication method includes steps S510 to S540.
  • Step S510 After successfully accessing the ad hoc network, the first device regularly broadcasts network access information through broadcast packets.
  • the network access information may be, for example, the IP address of the first device in the ad hoc network.
  • Step S520 After receiving the network access information, other terminal devices in the ad hoc network register the first device as a serviceable object in their respective applications, and display the first device in the serviceable object list.
  • Step S530 When the second device needs to communicate with the first device, the second device selects the first device in the serviceable object list of the second device to perform a service.
  • the service may include, for example, sending and receiving messages, sending and receiving voice, and the like.
  • Step S540 If the network access information regularly broadcast by the registered serviceable object (for example, the first device) is not received within a preset time, delete the serviceable object from the serviceable object list.
  • the control node periodically broadcasts its own identity information.
  • the identity information includes the network address of the control node, that is, the IP address in the ad hoc network.
  • Identity information also includes gateway indication information.
  • the gateway indication information 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.
  • the control node AP1 in Figure 1B regularly broadcasts its own identity information.
  • the corresponding communication method also 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 the to its own list of serviceable objects.
  • the control node AP1 After the control node AP1 establishes a communication connection with the external network server 101 through, for example, a public communication network (such as 3G/4G/5G mobile communication network or satellite network, etc.), the control node AP1 broadcasts the external network of the external network server 101 website address. For example, in response to receiving the external network address of the external network server 101, the control nodes AP2 to AP4 add the external network address of the external network server 101 to their respective serviceable object lists.
  • a public communication network such as 3G/4G/5G mobile communication network or satellite network, etc.
  • the slave nodes STA21 to STA23 add the external network address of the external network server 101 to their respective serviceable object lists.
  • the slave node STA31 adds the external network address of the external network server 101 to the serviceable object list of the slave node STA31.
  • FIG. 6A shows a flowchart of another communication method provided by at least one embodiment of the present disclosure.
  • the communication method may further include steps S610 to S640 based on the foregoing embodiment.
  • Step S610 Receive a second access request.
  • Step S620 Obtain the access network address in the second access request.
  • Step S630 In response to the access network address being an external network address, forward the second access request to the external network server.
  • Step S640 In response to the access network address being the target network address of the target node in the ad hoc network, forward the second access request to the target node.
  • This method can realize the control node as a relay to enable communication between devices in the ad hoc network, and enable the devices in the ad hoc network to communicate with external networks.
  • step S610 for example in the example of FIG. 1B , the control node AP2 sends a second access request to the control node AP1.
  • the control node AP1 receives the access request from the control node AP2.
  • step S620 for example, the access network address is obtained from the second access request.
  • step S630 if the accessed network address is an 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.
  • an external network address for example, the external network address of the external network server 101
  • the target node is the slave node STA11, and 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.
  • FIG. 6B shows a flowchart of another communication method provided by at least one embodiment of the present disclosure.
  • the communication method may further include steps S650 to S680 based on the foregoing embodiment.
  • Step S650 When the wireless gateway mAP accesses the ad hoc network, if it also has the capability of providing external network services, 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.
  • Step S660 Other terminal devices in the ad hoc network receive the broadcast message of the wireless gateway mAP After that, set the IP address of the wireless gateway mAP in the ad hoc network as one of the local gateway addresses, and add the fixed IP address of the external network server to the serviceable object list of the respective application.
  • Step S670 The terminal device in the ad hoc network conducts services with the external network server through the wireless gateway mAP.
  • Step S680 For each terminal device in the ad hoc network, if the wireless gateway mAP does not receive a regular broadcast message for more than a certain period of time, it is considered that the wireless gateway mAP has left the network, and the network address of the wireless gateway mAP is changed from the local gateway removed from the address list.
  • the second access request comes from the first node in the ad hoc network
  • the external network server establishes a communication connection with the mobile terminal.
  • the external network server 101 also establishes a communication connection with the mobile terminal 102 .
  • the external network server 101 serves as a proxy server to establish a communication connection with the mobile terminal 102.
  • the external network server 101 and the mobile terminal 102 establish a communication connection through a cellular network.
  • the communication method may also include: in response to the access network address being the network address of the mobile terminal, sending a second access request to the external network server to forward the second access request to the mobile terminal through the external network server; and sending the response from the external network server The message is forwarded to the first node, and the response message is provided by the mobile terminal to the external network server.
  • 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 a second access request to the control node AP1.
  • the control node AP1 forwards the second access request to the external network server 101, and then the external network server 101 forwards the second access request to the mobile terminal 102.
  • the mobile terminal 102 responds to the second access request and sends a response message to the external network server 101.
  • the external network server 101 provides a response message to the control node AP2 via the control node AP1.
  • This communication method can realize communication between any device in the ad hoc network and an external mobile terminal.
  • any device in the ad hoc network can perform data communication, voice communication, etc. with external mobile terminals.
  • the proxy server also includes a proxy server for the SMS service of the operator channel, and sends SMS messages to the mobile terminal through the proxy server. That is, the external network server serves as the proxy server of the operator channel, is used to act as an agent for the SMS service or call service of the operator channel, and sends SMS messages or voice calls to the mobile terminal through the proxy server.
  • the external network server is an agent of the operator, and the terminal device in the ad hoc network can send text messages to the mobile terminal through the external network server.
  • This embodiment expands the terminal equipment in the ad hoc network How the device communicates with external terminals.
  • At least one second node in the ad hoc network 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, and the ad hoc network is configured with the external network server in a polling manner.
  • the communication node selected from at least one second node and the control node is used to communicate with the external network server.
  • Receiving the second access request includes: receiving the second access request in response to the communication node being the control node, that is, when the communication node is the control node, the control node receives the second access request.
  • communicating with the external network server includes utilizing a mobile cellular network and/or a satellite network to communicate with the external network server.
  • control node AP3 and the control node AP4 in addition to the control node AP1 establishing 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.
  • Control node AP3 and control node AP4 are examples of at least one second node. That is, in the ad hoc network shown in Figure 1B, the control node AP1, the control node AP3 and the control node AP4 establish communication connections with the external network server 101, and the ad hoc network starts from the control node AP1, the control node AP3 and the external network server in a polling manner.
  • the control node AP4 selects a communication node used to communicate with the external network server 101. If the communication node is the control node AP1, the control node AP1 receives the second access request. If the communication node is the control node AP2, the control node AP2 receives the second access request.
  • the polling method means that multiple control nodes (ie, 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 visited sequentially in this order.
  • the order in which the control node and at least one second node are arranged in polling is periodically changed, that is, the order in which multiple mAPs in these ad hoc networks are arranged in polling is regularly changed. Regularly changing the order of multiple mAPs in polling can macroscopically balance the proxy load of each mAP.
  • the nodes that use the mobile cellular network to communicate with the external network server are polled.
  • the sort order is in front of the nodes that use the satellite network to communicate with the external network server. In this way, the mobile cellular network is given priority to communicate with the external network server, which reduces communication costs and improves communication efficiency.
  • Embodiments of the present disclosure provide a network communication method based on an ad hoc network using unlicensed frequency band wireless communication technology.
  • multiple vehicle systems and mobile terminals will implement ad hoc networks based on wireless link quality and authorization conditions.
  • Basic services (such as messages, voice, etc.) can be communicated in real time between any devices in the network.
  • the external network such as having satellite communication capabilities or entering the cellular network coverage area
  • other devices can also communicate with the external network through the device.
  • seamless and economical interconnection between users in the group at any time and in any region is achieved, reducing the existence of information islands.
  • the self-organizing network architecture provided by the embodiments of the present disclosure can be quickly and safely established, ensuring the security, stability, and scalability of the self-organizing network.
  • Figure 7 shows a schematic block diagram of a communication device 700 provided by at least one embodiment of the present disclosure.
  • the communication device 700 includes a receiving unit 710 and an address allocating unit 720 .
  • the receiving unit 710 is configured to receive a wireless access request provided by the first terminal device, where the wireless access request is used to request access to the ad hoc network.
  • the receiving unit 710 may, for example, perform step S10 described in FIG. 1A.
  • the address allocation unit 720 is configured to allocate a first network address for communicating 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.
  • the receiving unit 710 may, for example, perform step S20 described in FIG. 1A.
  • the receiving unit 710 and the address allocating unit 720 may be hardware, software, firmware, or any feasible combination thereof.
  • the receiving unit 710 and the address allocating unit 720 may be dedicated or general-purpose circuits, chips or devices, or may be a combination of a processor and a memory.
  • the embodiments of the present disclosure do not limit this.
  • the various units of the communication device 700 correspond to the various steps of the aforementioned communication method.
  • the communication device 700 For the specific functions of the communication device 700, reference can be made to the relevant description of the communication method, which will not be repeated here.
  • the components and structure of the communication device 700 shown in FIG7 are only exemplary and non-restrictive.
  • the communication device 700 may also include other components and structures as needed.
  • At least one embodiment of the present disclosure also provides an electronic device including a processor and a memory including one or more computer program modules.
  • 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 use control nodes to establish an ad hoc network, so that even in scenarios where there is no communication infrastructure, it can communicate internally through the ad hoc network. Once a device in the ad hoc network has basic communication capabilities, the ad hoc network can Other devices in the network can also communicate with the outside through this device.
  • FIG. 8A is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure.
  • the electronic device 800 includes a processor 810 and a memory 820 .
  • Memory 820 is used to store non-transitory computer-readable instructions (eg, one or more computer program modules).
  • the processor 810 is configured to execute non-transitory computer readable instructions. When the non-transitory computer readable instructions are executed by the processor 810, they may perform one or more steps in the communication method described above.
  • Memory 820 and processor 810 may be interconnected by a bus system and/or other forms of connection mechanisms (not shown).
  • the processor 810 may be a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units having data processing capabilities and/or program execution capabilities.
  • the central processing unit (CPU) may be an X86 or ARM architecture, etc.
  • the processor 810 may be a general-purpose processor or a dedicated processor, and may control other components in the electronic device 800 to perform desired functions.
  • memory 820 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory.
  • Volatile memory may include, for example, random access memory (RAM) and/or cache memory (cache), etc.
  • Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, flash memory, and the like.
  • One or more computer program modules may be stored on the computer-readable storage medium, and the processor 810 may run the one or more computer program modules to implement various functions of the electronic device 800 .
  • Various application programs and various data, as well as various data used and/or generated by the application programs, etc. can also be stored in the computer-readable storage medium.
  • FIG. 8B is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure.
  • the electronic device 900 is, for example, suitable for implementing the communication method provided by the embodiment of the present disclosure.
  • Electronic equipment 900 can So mobile phones, tablets, navigation equipment, vehicles (such as vehicle systems), smart wearable devices and other terminal equipment, etc. It should be noted that the electronic device 900 shown in FIG. 8B is only an example, which does not bring any limitations to the functions and scope of use of the embodiments of the present disclosure.
  • the electronic device 900 may include a processing device (eg, central processing unit, graphics processor, etc.) 910, which may be loaded into a random access memory according to a program stored in a read-only memory (ROM) 920 or from a storage device 980.
  • the program in the memory (RAM) 930 executes various appropriate actions and processes.
  • various programs and data required for the operation of the electronic device 900 are also stored.
  • the processing device 910, ROM 920 and RAM 930 are connected to each other through a bus 940.
  • An input/output (I/O) interface 950 is also connected to bus 940.
  • the following devices may be connected to the I/O interface 950: input devices 960 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 970 such as a computer; a storage device 980 including a magnetic tape, a hard disk, etc.; and a communication device 990.
  • the communication device 990 may allow the electronic device 900 to communicate wirelessly or wiredly with other electronic devices to exchange data.
  • FIG. 8B illustrates electronic device 900 having various means, it should be understood that implementation or provision of all illustrated means is not required, and electronic device 900 may alternatively implement or be provided with more or fewer means.
  • the above-mentioned communication method can be implemented as a computer software program.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the above-mentioned communication method.
  • the computer program can be downloaded and installed from a network through a communication device 990, or installed from a storage device 980, or installed from a ROM 920.
  • the processing device 910 the functions defined in the communication method provided in the embodiment of the present disclosure can be implemented.
  • At least one embodiment of the present disclosure also provides a computer-readable storage medium for storing non-transitory computer-readable instructions, which can implement the above when the non-transitory computer-readable instructions are executed by a computer. communication method.
  • control nodes can be used to establish an ad hoc network, so that even in scenarios where there is no communication infrastructure, internal intercommunication can be carried out through the ad hoc network, and once a device in the ad hoc network has basic communication When capable, other devices in the ad hoc network can also communicate with the outside through this device.
  • FIG9 is a schematic diagram of a storage medium provided by some embodiments of the present disclosure. As shown in FIG9, 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 may be performed.
  • the storage medium 1000 can be applied to the above-mentioned electronic device 800.
  • the storage medium 1000 may be the memory 820 in the electronic device 800 shown in FIG. 8A.
  • the storage medium 1000 for relevant descriptions about the storage medium 1000, reference may be made to the corresponding description of the memory 820 in the electronic device 800 shown in FIG. 8A, which will not be described again here.

Abstract

A communication method, a communication apparatus, 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 radio access request, which is provided by a first terminal device, wherein the radio access request is used for requesting to access an ad hoc network; and in response to allowing the first terminal device to access the ad hoc network, allocating to the first terminal device a first network address for communication in the ad hoc network, such that the first terminal device accesses the ad hoc network, and performs communication in the ad hoc network by using the first network address. In the method, an ad hoc network can be established by using a control node, therefore internal intercommunication can be performed by means of the ad hoc network even in a scenario where there is no communication infrastructure, and once a device in the ad hoc network has a basic communication capacity, the other devices in the ad hoc network can also implement intercommunication with the outside by means of the device.

Description

通信方法、装置、电子设备和计算机可读存储介质Communication methods, devices, electronic equipment and computer-readable storage media
本申请要求于2022年9月20日递交的中国专利申请第202211144154.9号的优先权,在此全文引用上述中国专利申请公开的内容以作为本申请的一部分。This application claims priority from Chinese Patent Application No. 202211144154.9 submitted on September 20, 2022. The disclosure of the above Chinese patent application is hereby cited in its entirety as part of this application.
技术领域Technical field
本公开的实施例涉及一种通信方法、装置、电子设备和计算机可读存储介质。Embodiments of the present disclosure relate to a communication method, device, electronic device, and computer-readable storage medium.
背景技术Background technique
随着手持终端的快速发展以及汽车的智能化改进,移动终端、车机系统等设备的通讯能力越来越强。目前,例如汽车用户的手持终端和汽车本身的车机系统之间主要通过公共通信网络通信。With the rapid development of handheld terminals and the improvement of intelligence in automobiles, the communication capabilities of mobile terminals, vehicle systems and other devices are getting stronger and stronger. Currently, for example, communication between a car user's handheld terminal and the car's own on-board system mainly occurs through a public communication network.
发明内容Contents of the invention
本公开至少一个实施例提供一种通信方法,应用于自组网中的控制节点,所述方法包括:接收第一终端设备提供的无线接入请求,其中,所述无线接入请求用于请求接入所述自组网;以及响应于允许所述第一终端设备接入所述自组网,为所述第一终端设备分配用于在所述自组网中通信的第一网络地址,使得所述第一终端设备接入所述自组网,并且利用所述第一网络地址在所述自组网中通信。At least one embodiment of the present disclosure provides a communication method applied to a control node in an ad hoc network. The method includes: receiving a wireless access request provided by a first terminal device, wherein the wireless access request is used to request accessing 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 communicating in the ad hoc network to the first terminal device, The first terminal device is caused to access the ad hoc network and communicate in the ad hoc network using the first network address.
例如,在本公开一实施例提供的通信方法中,自组网包括使用非授权频谱建立的无线局域网。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.
例如,在本公开一实施例提供的通信方法中,响应于允许所述第一终端设备接入所述自组网,为所述第一终端设备分配用于在所述自组网中通信的第一网络地址,包括:响应于允许所述第一终端设备接入所述自组网,确定所述第一终端设备的设备类型;响应于所述第一终端设备为所述控制节点的 从节点,为所述第一终端设备分配第一类网络地址;响应于所述第一终端设备为另一控制节点,为所述第一终端设备分配第二类网络地址。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 the first terminal device for communication in the ad hoc network The first network address includes: 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 the control node The slave node allocates a first type network address to the first terminal device; in response to the first terminal device being another control node, allocates a second type network address to the first terminal device.
例如,在本公开一实施例提供的通信方法中,第一类网络地址包括C类网络地址,所述第二类网络地址包括B类网络地址。For example, in the communication method provided by an embodiment of the present disclosure, the first type of network address includes a Class C network address, and the second type of network address includes a Class B network address.
例如,在本公开一实施例提供的通信方法中,还包括响应于所述第一终端设备为另一控制节点,判断所述第一终端设备是否具有外网服务能力;响应于所述第一终端设备具有外网服务能力,将所述第一终端设备标记为网关。For example, the communication method provided by an embodiment of the present disclosure further includes, in response to the first terminal device being another control node, determining whether the first terminal device has external network service capabilities; in response to the first terminal device being another control node, The terminal device has external network service capabilities, and the first terminal device is marked as a gateway.
例如,在本公开一实施例提供的通信方法中,还包括在所述第一终端设备接入所述自组网之后,广播所述第一终端设备的所述第一网络地址。For example, the communication method provided by an embodiment of the present disclosure further includes broadcasting the first network address of the first terminal device after the first terminal device accesses the ad hoc network.
例如,在本公开一实施例提供的通信方法中,还包括为所述第一终端设备设置保活定时器;响应于接收到所述第一终端设备的探测消息,复位所述保活定时器为最大值;响应于一直未收到所述第一终端设备的探测消息导致所述保活定时器计数为0,启动对所述第一终端设备进行的离线处理。For example, the communication method provided by an embodiment of the present disclosure further includes setting a keep-alive timer for the first terminal device; in response to receiving a detection message from the first terminal device, resetting the keep-alive timer is the maximum value; in response to the fact that the keep-alive timer count is 0 due to the fact that no detection message from the first terminal device has been received, offline processing of the first terminal device is started.
例如,在本公开一实施例提供的通信方法中,还包括:响应于接收到所述自组网中第二终端设备广播的第二网络地址,在可服务对象列表中记录并且显示所述第二网络地址;响应于对所述第二网络地址的选择操作,向所述第二终端设备提供第一访问请求。For example, in the communication method provided in one embodiment of the present disclosure, it also includes: in response to receiving a second network address broadcast by a second terminal device in the self-organizing network, recording and displaying the second network address in a list of serviceable objects; in response to a selection operation on the second network address, providing a first access request to the second terminal device.
例如,在本公开一实施例提供的通信方法中,可服务对象列表中记录的终端设备定期向所述控制节点发送广播消息;响应于预设时间内未收到所述可服务对象列表中记录的第三终端设备提供的广播消息,从所述可服务对象列表中删除该第三终端设备。For example, in the communication method provided by an embodiment of the present disclosure, the terminal device recorded in the serviceable object list regularly sends broadcast messages to the control node; in response to not receiving the record in the serviceable object list within a preset time, broadcast message provided by the third terminal device, and delete the third terminal device from the serviceable object list.
例如,在本公开一实施例提供的通信方法中,还包括:广播所述控制节点的身份信息,其中,所述身份信息包括所述控制节点的网络地址。For example, the communication method provided by an embodiment of the present disclosure further includes: broadcasting the identity information of the control node, where the identity information includes the network address of the control node.
例如,在本公开一实施例提供的通信方法中,所述身份信息还包括网关指示信息,所述网关指示信息用于指示所述控制节点具有外网服务能力,以便所述自组网中的节点将该控制节点设置为网关。For example, in the communication method provided by an embodiment of the present disclosure, the identity information also includes gateway indication information, and the gateway indication information is used to indicate that the control node has external network service capabilities so that the ad hoc network can The node sets this control node as a gateway.
例如,在本公开一实施例提供的通信方法中,还包括:响应于所述控制节点与外网服务器建立通信连接,广播所述外网服务器的外网网络地址,使得所述自组网中的节点将所述外网网络地址加入到自身的可服务对象列表中。 For example, in the communication method provided by an embodiment of the present disclosure, it 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 ad hoc network The node adds the external network address to its own serviceable object list.
例如,在本公开一实施例提供的通信方法中,控制节点与外网服务器建立通信连接,所述方法还包括:接收第二访问请求;获取所述第二访问请求中的访问网络地址;响应于所述访问网络地址为所述外网网络地址,向所述外网服务器转发所述第二访问请求;响应于所述访问网络地址为所述自组网中目标节点的目标网络地址,向所述目标节点转发所述第二访问请求。For example, in a communication method provided by an embodiment of the present disclosure, the control node establishes a communication connection with an external network server. The method further includes: receiving a second access request; obtaining the access network address in the second access request; and responding When the accessed network address is the external network address, forward the second access request to the external network server; in response to the accessed network address being the target network address of the target node in the ad hoc network, forward the second access request to the external network server. The target node forwards the second access request.
例如,在本公开一实施例提供的通信方法中,第二访问请求来自所述自组网中的第一节点,所述外网服务器与移动终端建立通信连接,所述方法还包括:响应于所述访问网络地址为所述移动终端的网络地址,向所述外网服务器发送所述第二访问请求,以通过所述外网服务器转发所述第二访问请求至所述移动终端;以及将来自所述外网服务器的应答消息转发至所述第一节点,其中,所述应答消息由所述移动终端提供至所述外网服务器。For example, in the communication method provided by an embodiment of the present disclosure, the second access request comes 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: responding to The access network address is the network address of the mobile terminal, and the second access request is sent to the external network server to forward the second access request to the mobile terminal through the external network server; and The response message from the external network server is forwarded to the first node, where the response message is provided by the mobile terminal to the external network server.
例如,在本公开一实施例提供的通信方法中,外网服务器作为代理服务器与所述移动终端建立通信连接。For example, in a communication method provided in an embodiment of the present disclosure, the external network server acts as a proxy server to establish a communication connection with the mobile terminal.
例如,在本公开一实施例提供的通信方法中,所述代理服务器还包括代理运营商通道的短信业务,通过所述代理服务器向所述移动终端发送短信。For example, in the communication method provided by an embodiment of the present disclosure, the proxy server further includes an agent for the SMS service of the operator channel, and the SMS is sent to the mobile terminal through the proxy server.
例如,在本公开一实施例提供的通信方法中,除所述控制节点与所述外网服务器建立通信连接之外,所述自组网中的至少一个第二节点与所述外网服务器建立通信连接,所述自组网按照轮询的方式从与所述至少一个第二节点和所述控制节点中选择用于与外网服务器通信的通信节点,接收所述第二访问请求,包括:响应于所述通信节点为所述控制节点,接收所述第二访问请求。For example, in the communication method provided by an embodiment of the present disclosure, 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. Communication connection, the ad hoc network selects a communication node for communicating 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, including: In response to the communication node being the control node, the second access request is received.
例如,在本公开一实施例提供的通信方法中,所述控制节点与所述至少一个第二节点在轮询中的排列顺序被定期改变。For example, in a 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 polling is periodically changed.
例如,在本公开一实施例提供的通信方法中,所述与外网服务器通信包括利用移动蜂窝网和/或卫星网络与外网服务器通信。For example, in the communication method provided by an embodiment of the present disclosure, communicating with the external network server includes using a mobile cellular network and/or a satellite network to communicate with the external network server.
例如,在本公开一实施例提供的通信方法中,在能够与外网服务器通信的情况下,利用移动蜂窝网与所述外网服务器通信的节点在轮询中的排列顺序位于利用卫星网络与所述外网服务器通信的节点的前面。For example, in the communication method provided by an embodiment of the present disclosure, when it is possible to communicate with an external network server, the nodes that use the mobile cellular network to communicate with the external network server are ranked in the polling order between those using the satellite network and the external network server. The external network server communicates in front of the node.
本公开至少一个实施例提供一种通信装置,应用于自组网中的控制节点,所述装置包括:接收单元,配置为接收第一终端设备提供的无线接入请求, 其中,所述无线接入请求用于请求接入所述自组网;以及地址分配单元,配置为响应于允许所述第一终端设备接入所述自组网,为所述第一终端设备分配用于在所述自组网中通信的第一网络地址,使得所述第一终端设备接入所述自组网,并且利用所述第一网络地址在所述自组网中通信。At least one embodiment of the present disclosure provides a communication device applied to a control node in an ad hoc network. The device includes: 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 the address allocation unit is configured to respond to allowing the first terminal device to access the ad hoc network. Allocate a first network address for communication in the ad hoc network, so that the first terminal device accesses the ad hoc network and uses the first network address to communicate in the ad hoc network.
本公开至少一个实施例提供一种电子设备,包括处理器;存储器,包括一个或多个计算机程序模块;其中,所述一个或多个计算机程序模块被存储在所述存储器中并被配置为由所述处理器执行,所述一个或多个计算机程序模块包括用于实现本公开任一实施例提供的通信方法的指令。At least one embodiment of the present disclosure provides an electronic device including a processor; a memory including one or more computer program modules; wherein the one or more computer program modules are stored in the memory and configured to The processor executes, and the one or more computer program modules include instructions for implementing the communication method provided by any embodiment of the present disclosure.
本公开至少一个实施例提供一种计算机可读存储介质,用于存储非暂时性计算机可读指令,当所述非暂时性计算机可读指令由计算机执行时可以实现本公开任一实施例提供的通信方法。At least one embodiment of the present disclosure provides a computer-readable storage medium for storing non-transitory computer-readable instructions. When the non-transitory computer-readable instructions are executed by a computer, the methods provided by any embodiment of the present disclosure can be implemented. Communication methods.
附图说明Description of drawings
为了更清楚地说明本公开实施例,下面将对实施例的附图作简单地介绍,显而易见地,下面描述中的附图仅仅涉及本公开的一些实施例,而非对本公开的限制。In order to illustrate the embodiments of the present disclosure more clearly, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present disclosure and do not limit the present disclosure.
图1A示出了本公开至少一个实施例提供的一种通信方法的流程图;Figure 1A shows a flow chart of a communication method provided by at least one embodiment of the present disclosure;
图1B示出了本公开至少一个实施例提供的一种应用本公开提供的通信方法建立的自组网的示意图;1B shows a schematic diagram of an ad hoc network established using the communication method provided by the present disclosure provided by at least one embodiment of the present disclosure;
图2示出了本公开至少一个实施例提供的待接入控制节点接入目标控制节点的方法流程图;Figure 2 shows a flow chart of a method for a control node to be accessed to access a target control node provided by at least one embodiment of the present disclosure;
图3示出了本公开至少一个实施例提供的从节点接入控制节点的方法流程图;Figure 3 shows a flow chart of a method for accessing a control node from a slave node according to at least one embodiment of the present disclosure;
图4A示出了本公开一些实施例提供的另一种通信方法的流程图;Figure 4A shows a flow chart of another communication method provided by some embodiments of the present disclosure;
图4B示出了本公开一些实施例提供的另一种通信方法的流程图;FIG4B shows a flow chart of another communication method provided by some embodiments of the present disclosure;
图5示出了本公开至少一个实施例提供的一种自组网内设备之间的通信方法的流程图;Figure 5 shows a flow chart of a communication method between devices in an ad hoc network provided by at least one embodiment of the present disclosure;
图6A示出了本公开至少一个实施例提供的另一种通信方法的流程图;Figure 6A shows a flow chart of another communication method provided by at least one embodiment of the present disclosure;
图6B示出了本公开至少一个实施例提供的另一种通信方法的流程图;Figure 6B shows a flow chart of another communication method provided by at least one embodiment of the present disclosure;
图7示出了本公开至少一个实施例提供的一种通信装置的示意框图; Figure 7 shows a schematic block diagram of a communication device provided by at least one embodiment of the present disclosure;
图8A示出了本公开至少一个实施例提供的一种电子设备的示意框图;Figure 8A shows a schematic block diagram of an electronic device provided by at least one embodiment of the present disclosure;
图8B示出了本公开至少一个实施例提供的另一种电子设备的示意框图;以及8B shows a schematic block diagram of another electronic device provided by at least one embodiment of the present disclosure; and
图9示出了本公开至少一个实施例提供的一种计算机可读存储介质的示意图。Figure 9 shows a schematic diagram of a computer-readable storage medium provided by at least one embodiment of the present disclosure.
具体实施方式Detailed ways
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例的附图,对本公开实施例的技术方案进行清楚、完整地描述。显然,所描述的实施例是本公开的一部分实施例,而不是全部的实施例。基于所描述的本公开的实施例,本领域普通技术人员在无需创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings of the embodiments of the present disclosure. Obviously, the described embodiments are some, but not all, of 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 efforts fall within the scope of protection of the present disclosure.
除非另外定义,本公开使用的技术术语或者科学术语应当为本公开所属领域内具有一般技能的人士所理解的通常意义。本公开中使用的“第一”、“第二”以及类似的词语并不表示任何顺序、数量或者重要性,而只是用来区分不同的组成部分。同样,“一个”、“一”或者“该”等类似词语也不表示数量限制,而是表示存在至少一个。“包括”或者“包含”等类似的词语意指出现该词前面的元件或者物件涵盖出现在该词后面列举的元件或者物件及其等同,而不排除其他元件或者物件。“连接”或者“相连”等类似的词语并非限定于物理的或者机械的连接,而是可以包括电性的连接,不管是直接的还是间接的。“上”、“下”、“左”、“右”等仅用于表示相对位置关系,当被描述对象的绝对位置改变后,则该相对位置关系也可能相应地改变。Unless otherwise defined, technical terms or scientific terms used in this disclosure shall have the usual meaning understood by a person with ordinary skill in the art to which this disclosure belongs. "First", "second" and similar words used in this disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Likewise, similar words such as "a", "an" or "the" do not indicate a quantitative limitation but rather indicate the presence of at least one. Words such as "include" or "comprising" mean that the elements or things appearing before the word include the elements or things listed after the word and their equivalents, without excluding other elements or things. Words such as "connected" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right", etc. are only used to express relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
目前,车机系统与移动终端的通信连接一般是采用点对点(P2P)方式创建而成的,主要是完成两者间无线分享数据(如蓝牙音乐、投屏等)功能,这属于PAN(个域网)范畴内业务。多个PAN间并无直接的无线传输链路存在,如需要进行数据分享,则只能通过昂贵的公众网络来变相实现。在一些特殊场景下,例如结队自驾去偏远地区旅游进入无公众网服务区域时,PAN间互通将无法进行,对那些无外网服务能力的设备而言则意味着失联,这将给整个团队的安全带来隐患。 At present, the communication connection between the vehicle system and the mobile terminal is generally established using point-to-point (P2P) method, mainly to complete the function of wireless sharing of data (such as Bluetooth music, screen projection, etc.) between the two, which belongs to PAN (Personal Domain). Business within the scope of the Internet). There are no direct wireless transmission links between multiple PANs. If data sharing is required, it can only be achieved in disguise through expensive public networks. In some special scenarios, such as traveling in groups to remote areas and entering areas without public network services, inter-PAN communication will not be possible, which means loss of connection for those devices without external network service capabilities, which will cause problems for the entire Team safety poses a risk.
本公开至少一个实施例提供一种通信方法、装置、电子设备和计算机可读存储介质。该通信方法应用于自组网中的控制节点。该方法包括:接收第一终端设备提供的无线接入请求,无线接入请求用于请求接入自组网;以及响应于允许第一终端设备接入自组网,为第一终端设备分配用于在自组网中通信的第一网络地址,使得第一终端设备接入自组网,并且利用第一网络地址在自组网中通信。该通信方法基于控制节点建立自组网,从而即使在无通信基础设施场景下,也能通过自组的网络进行内部互通,并且进一步地,例如,在至少一个示例中一旦自组网内的一个设备具备基础通信能力时,自组网内其他设备还可通过该设备实现与外部的互通。At least one embodiment of the present disclosure provides a communication method, apparatus, electronic device, and computer-readable storage medium. This communication method is applied to control nodes in ad hoc networks. The method includes: receiving a wireless access request provided by a first terminal device, the wireless access request being used to request access to an ad hoc network; and in response to allowing the first terminal device to access the ad hoc network, allocating a username to the first terminal device. Based on the first network address for communication in the ad hoc network, the first terminal device is allowed to access the ad hoc network and communicate in the ad hoc network using the first network address. The communication method establishes an ad hoc network based on control nodes, so that even in a scenario without communication infrastructure, internal intercommunication can be carried out through the ad hoc network, and further, for example, in at least one example, once a network within the ad hoc network When the device has basic communication capabilities, other devices in the ad hoc network can also communicate with the outside through the device.
图1A示出了本公开至少一个实施例提供的一种通信方法的流程图。FIG. 1A shows a flowchart of a communication method provided by at least one embodiment of the present disclosure.
如图1A所示,该方法可以包括步骤S10~S20。该方法应用于自组网中的控制节点。As shown in Figure 1A, the method may include steps S10 to S20. This method is applied to control nodes in ad hoc networks.
步骤S10:接收第一终端设备提供的无线接入请求,该无线接入请求用于请求接入自组网。Step S10: Receive a wireless access request provided by the first terminal device, where the wireless access request is used to request access to the ad hoc network.
步骤S20:响应于允许第一终端设备接入自组网,为第一终端设备分配用于在自组网中通信的第一网络地址,使得第一终端设备接入自组网,并且利用第一网络地址在自组网中通信。Step S20: In response to allowing the first terminal device to access the ad hoc network, allocate a first network address for communicating in the ad hoc network to the first terminal device, so that the first terminal device accesses the ad hoc network and utilizes the first A network address communicates in an ad hoc network.
在本公开的一些实施例中,自组网中一个或者多个终端设备可以兼有路由器和主机两种功能。作为主机,终端设备需要运行各种面向用户的应用程序,如编辑器、浏览器等。作为路由器,终端设备需要运行相应的路由协议,根据路由策略和路由表完成数据分组的转发和路由维护工作,因此自组网中终端设备需要实现合适的路由协议。自组网能够利用终端设备的路由转发功能,在无基础设施的情况下进行通信,从而弥补了无网络通信基础设施可使用的缺陷。在本公开的实施例中,自组网可以是无线自组网,无线自组网是由一组带有无线收发模组的可移动节点所组成的系统,它不依赖于预设的基础设施,具有可临时组网、快速展开、无控制中心、抗毁性强等特点。In some embodiments of the present disclosure, one or more terminal devices in the ad hoc network may have both functions of router and host. 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 the corresponding routing protocol and complete the forwarding and routing maintenance of data packets according to the routing policy and routing table. Therefore, the terminal device in the ad hoc network needs to implement a suitable routing protocol. Ad hoc networks can utilize the routing and forwarding functions of terminal devices to communicate without infrastructure, thus making up for the shortcomings of unavailable network communication infrastructure. In embodiments of the present disclosure, the ad hoc network may be a wireless ad hoc network. The wireless ad hoc network is a system composed of a group of movable nodes with wireless transceiver modules. It does not rely on preset infrastructure. , which has the characteristics of temporary networking, rapid deployment, no control center, and strong invulnerability.
在本公开的一些实施例中,控制节点例如可以是网络能力较强的设备,控制节点作为父节点与其从节点建立无线链路,控制节点也可以与周边其他控制节点建立无线链路。在本公开的一些实施例中,控制节点完成数据的路由转发功能。 In some embodiments of the present disclosure, the control node may be, for example, a device with strong network capabilities. The control node, as a parent node, establishes a wireless link with its slave node. The control node may also establish a wireless link with other surrounding control nodes. In some embodiments of the present disclosure, the control node completes the routing and forwarding function of data.
例如,控制节点可以是网络能力较强的车机系统设备,控制节点的从节点可以是与该车机系统设备建立通信连接的手机、平板、耳机等。For example, the control node may be a vehicle system device with strong network capabilities, and the slave node of the control node may be a mobile phone, tablet, headset, etc. that establishes a communication connection with the vehicle system device.
例如,控制节点可以是网络能力较强的手机,控制节点的从节点可以是与该手机建立通信连接的车机、平板、耳机等。For example, the control node may be a mobile phone with strong network capabilities, and the slave nodes of the control node may be a car computer, a tablet, a headset, etc. that establishes a communication connection with the mobile phone.
在本公开的一些实施例中,网络能力,可以被设置为按照是否能建立网络连接进行评估,例如在没有蜂窝移动网络的情况下,能建立卫星通信网络连接的设备的网络能力强于其它设备;在有一定蜂窝移动网络的情况下,可以设置为网速、延迟等对不同设备的网络能力进行评估;在同时存在蜂窝移动网络、卫星通信网络的情况下,可以设置为网速、延迟等对不同设备的网络能力进行评估。In some embodiments of the present disclosure, network capabilities may be set to be evaluated based on whether a network connection can be established. For example, in the absence of a cellular mobile network, a device that can establish a satellite communication network connection has stronger network capabilities than other devices. ; When there is a certain cellular mobile network, you can set it to network speed, delay, etc. to evaluate the network capabilities of different devices; when there are both cellular mobile networks and satellite communication networks, you can set it to network speed, delay, etc. Evaluate the network capabilities of different devices.
尽管没有明确描述的,在评估何者适合作为控制节点时,还可以考虑到续航等限制。例如在具有相似的网络能力时,车机相较于手机、平板以及其它可穿戴设备更适合作为控制节点。Although not explicitly described, limitations such as battery life can also be taken into consideration when evaluating which ones are suitable as control nodes. For example, when having similar network capabilities, cars are more suitable as control nodes than mobile phones, tablets, and other wearable devices.
在本公开的一些实施例中,控制节点可以在设备接入网络时根据自身的能力确定。例如,若某个设备允许其他设备与自身建立连接,并且该设备的通信能力也强于至少部分其他设备,则该设备可以作为控制节点。In some embodiments of the present disclosure, the control node may be determined based on its own capabilities when the device accesses the network. For example, if a certain device allows other devices to establish connections with itself, and the communication capability of the device is stronger than that of at least some other devices, the device can serve as a control node.
在本公开的实施例中,控制节点可以作为无线接入点(Access Point,AP),可以作为一个无线网络的创建者,作为该无线网络的中心节点。In embodiments of the present disclosure, the control node may serve as a wireless access point (AP), the creator of a wireless network, and the central node of the wireless network.
图1B示出了本公开至少一个实施例提供的一种应用本公开提供的通信方法建立的自组网的示意图。FIG1B shows a schematic diagram of an ad hoc network established by applying the communication method provided by the present disclosure, provided by at least one embodiment of the present disclosure.
如图1B所示,该自组网包括多个节点。这些多个节点又包括至少一个控制节点和至少一个从节点,该从节点可以称为“STA”节点,为无线网络中的终端。例如,控制节点AP1、控制节点AP2、控制节点AP3和控制节点AP4。节点STA11和节点STA12接入控制节点AP1,作为控制节点AP1的从节点。节点STA21、节点STA22和节点STA23接入控制节点AP2,作为控制节点AP2的从节点。节点STA31接入控制节点AP3,作为控制节点AP3的从节点。当前还不存在与控制节点AP4建立连接的从节点。控制节点AP1~AP4任意两节点建立通信连接。As shown in Figure 1B, the ad hoc network includes multiple nodes. These multiple nodes further include at least one control node and at least one slave node. The slave node may be called an "STA" node, which is a terminal in the wireless network. For example, control node AP1, control node AP2, control node AP3 and control node AP4. Node STA11 and node STA12 access the control node AP1 and serve as slave nodes of the control node AP1. Node STA21, node STA22 and node STA23 access the control node AP2 and serve as slave nodes of the control node AP2. Node STA31 accesses the control node AP3 and serves as a slave node of the control node AP3. Currently, there is no slave node that is connected to the control node AP4. Control nodes AP1 ~ AP4 establish communication connections between any two nodes.
在本公开的实施例中,从节点指网络能力较弱的移动终端或者不具有允许其他设备接入的能力,只与父AP建立有无线链路,与网内其他终端的通 信由父AP中转完成。从节点的联网能力弱于控制节点。In the embodiment of the present disclosure, the slave node refers to a mobile terminal with weak network capabilities or does not have the ability to allow other devices to access. It only establishes a wireless link with the parent AP and communicates with other terminals in the network. The letter is relayed by the parent AP. The networking capabilities of the slave nodes are weaker than those of the control nodes.
每个AP每隔一定时间(几十毫秒到几秒不等)向周围的STA和AP广播beacon帧,告诉周围的STA和其他的AP,自身可以接入。Each AP broadcasts beacon frames to surrounding STAs and APs at certain intervals (ranging from tens of milliseconds to several seconds) to tell surrounding STAs and other APs that it can access it.
每个STA(例如手机、笔记本等终端)除了监听周边AP发送的beacon帧以外,也可以主动发送probe帧以寻找可以接入的AP。In addition to monitoring beacon frames sent by surrounding APs, each STA (such as mobile phones, notebooks, etc.) can also actively send probe frames to find APs that can be accessed.
需要理解的是,图1B所示的自组网仅为便于理解本发明示出的示例,对本公开没有限定作用。例如,控制节点的数量可以是任意的而非限定为4个,接入任意控制节点的数量也可以是任意的。It should be understood that the ad hoc network shown in FIG. 1B is only an example to facilitate understanding of the present invention and has no limiting effect on the present disclosure. For example, the number of control nodes can be arbitrary and is not limited to four, and the number of access control nodes can also be arbitrary.
例如,图1B所示的自组网中的任意一个控制节点可以应用本公开的实施例提供的通信方法。下文中以控制节点AP1为例来说明本公开的实施例。For example, any control node in the ad hoc network shown in FIG. 1B can apply the communication method provided by the embodiment of the present disclosure. The following uses the control node AP1 as an example to illustrate embodiments of the present disclosure.
从节点STA11、从节点STA12以及控制节点AP2~控制节点AP4均可以是应用图1A所示的通信方法接入控制节点AP1,从而接入基于控制节点AP1的自组网。The slave nodes STA11, STA12, and the control nodes AP2 to AP4 can all access the control node AP1 using the communication method shown in Figure 1A, thereby accessing the ad hoc network based on the control node AP1.
对于步骤S10,第一终端设备可以是具有无线通信能力的任何设备。例如,第一终端设备可以是包括但不限于具有Wi-Fi模组、蓝牙(BT)模组、uwb模组、zigbee模组等无线通信模组的设备。例如,第一终端设备可以是手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等具有无线通信模组的设备,本申请实施例对终端设备的具体类型不作任何限制。For step S10, the first terminal device may be any device with wireless communication capabilities. For example, the first terminal device may be a device including, but not limited to, a wireless communication module including a Wi-Fi module, a Bluetooth (BT) module, a uwb module, a zigbee module, and the like. For example, the first terminal device may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR)/virtual reality (VR) device, a notebook computer, or an ultra-mobile personal computer (Ultra-mobile). personal computer (UMPC), netbook, personal digital assistant (personal digital assistant, PDA) and other devices with wireless communication modules. The embodiments of this application do not place any restrictions on the specific types of terminal devices.
例如,所述第一终端设备可以是WLAN中的站点(STAION,ST),可以是蜂窝电话、无绳电话、会话启动协议(Session InitiationProtocol,SIP)电话、无线本地环路(WirelessLocal Loop,WLL)站、个人数字处理(Personal Digital Assistant,PDA)设备、具有无线通信模组的手持设备、计算设备或连接到无线通信模组的其它处理设备、电脑、膝上型计算机、手持式通信设备、手持式计算设备、和/或用于在无线系统上进行通信的其它设备以及下一代通信系统,例如,5G网络中的移动终端、未来演进的公共陆地移动网络(PublicLand Mobile Network,PLMN)中的移动终端或者未来演进的非地面网络(Non-terrestrial Network,NTN)中的移动终端等。 For example, the first terminal device may be a station (ST) in WLAN, and may be a cellular phone, a cordless phone, a session initiation protocol (Session Initiation Protocol, SIP) phone, or a wireless local loop (Wireless Local Loop, WLL) station. , Personal Digital Assistant (PDA) device, handheld device with wireless communication module, computing device or other processing device connected to wireless communication module, computer, laptop computer, handheld communication device, handheld Computing devices, and/or other devices for communicating on wireless systems, and next-generation communication systems, such as mobile terminals in 5G networks and mobile terminals in future evolved Public Land Mobile Networks (PLMN) Or mobile terminals in future evolved non-terrestrial networks (Non-terrestrial Network, NTN), etc.
作为示例而非限定,当所述第一终端设备为可穿戴设备时,该可穿戴设备还可以是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如配置有近场通信模块的手套、手表等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,如智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行具有显示屏的智能手表、智能手环等。As an example and not a limitation, when the first terminal device is a wearable device, the wearable device may also be a general term for devices that apply wearable technology to intelligently design daily wear and develop wearable devices, such as configured with Near field communication modules for gloves, watches, etc. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothing or accessories. Wearable devices are not just hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly defined wearable smart devices include full-featured, large-sized devices that can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, and those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones. , such as various types of smart watches and smart bracelets with display screens.
例如,第一终端设备可以是作为从节点的终端设备,或者第一终端设备可以是作为另一控制节点的终端设备。例如,第一终端设备可以是图1B中的从节点STA11、从节点STA12以及控制节点AP2~控制节点AP4之一。For example, the first terminal device may be a terminal device serving as a slave node, or the first terminal device may be a terminal device serving as another control node. For example, the first terminal device may be one of the slave nodes STA11, STA12, and control nodes AP2 to AP4 in FIG. 1B.
Wi-Fi模组、BT模组、uwb模组、zigbee模组等无线通信模组支持非授权频段的通信,因此,在本公开的一些实施例中,自组网包括使用非授权频谱建立的无线局域网。利用非授权频谱建立无线局域网能够降低通信成本,且不受外部条件限制提高通信灵活性。非授权频谱例如可以是2.4GHz、5GHz、6GHz和60GHz频段。非授权频段具有无需许可的共享特性,以竞争频谱的方式提供尽力而为的服务,按照信道访问公平性,多无线通信技术共存的原则来使用。Wireless communication modules such as Wi-Fi modules, BT modules, uwb modules, and zigbee modules support communication in unlicensed frequency bands. Therefore, in some embodiments of the present disclosure, ad hoc networks include those established using unlicensed spectrum. Wireless LAN. Using unlicensed spectrum to establish wireless LANs can reduce communication costs and improve communication flexibility without being restricted by external conditions. Unlicensed spectrum may be, for example, the 2.4GHz, 5GHz, 6GHz and 60GHz frequency bands. The unlicensed frequency band has the characteristics of sharing without permission, provides best-effort services in the form of competition for spectrum, and is used in accordance with the principles of channel access fairness and the coexistence of multiple wireless communication technologies.
在本公开的一些实施例中,无线接入请求例如可以包括探测请求和认证请求。In some embodiments of the present disclosure, the wireless access request may include, for example, a probe request and an authentication request.
例如,第一终端设备广播探测请求到达控制节点AP1,控制节点AP1响应于接收探测请求,向第一终端设备发送探测响应。第一终端设备响应于接收到探测响应,向控制节点AP1发送认证请求,以便控制节点AP1根据认证请求判断是否允许第一终端设备接入。For example, the first terminal device broadcasts a detection request to the control node AP1, and the control node AP1 responds to receiving the detection request by sending a detection response to the first terminal device. In response to receiving the detection response, the first terminal device sends an authentication request to the control node AP1, so that the control node AP1 determines whether to allow the first terminal device to access based on the authentication request.
例如,第一终端设备具有Wi-Fi模组,则第一终端设备通过Wi-Fi模组向控制节点AP1发送探测请求和认证请求。又例如,第一终端设备具有zigbee模组,则第一终端设备通过zigbee模组向控制节点AP1发送探测请求和认证请求。For example, if the first terminal device has a Wi-Fi module, the first terminal device sends a detection request and an authentication request to the control node AP1 through the Wi-Fi module. For another example, if the first terminal device has a zigbee module, the first terminal device sends a detection request and an authentication request to the control node AP1 through the zigbee module.
例如,探测请求包括probe帧以寻找可以接入的AP。探测请求的发起者 为第一终端设备。For example, a probe request includes a probe frame to find an accessible AP. Originator of probe request is the first terminal device.
在本公开的一些实施例中,无线接入请求可以是响应于接收到控制节点发送的beacon帧而生成的。In some embodiments of the present disclosure, the wireless access request may be generated in response to receiving a beacon frame sent by the control node.
例如,控制节点每隔一定时间向周围的STA和AP广播beacon帧,告诉周围的STA和其他的AP,自身可以接入,从而第一终端设备请求接入AP。For example, the control node broadcasts beacon frames to surrounding STAs and APs at certain intervals, telling the surrounding STAs and other APs that it can access, so that the first terminal device requests access to the AP.
在本公开的一些实施例中,例如控制节点AP1响应于接收到认证请求,并且在控制节点AP1的终端设备展示交互界面,该交互界面中显示有例如包括控制节点AP1的列表,例如还可以包括“是否接入”等文字提示信息,使得用户可以在交互界面上操作是否允许控制节点AP1接入。在该实施例中,作为控制节点AP1的终端设备的操作系统可以是android、linux以及windows等,具有相应的通信模块的驱动程序能够触发展示该交互界面,并且,该终端设备有触摸屏(或者屏幕+按键)等外设。In some embodiments of the present disclosure, for example, the control node AP1 responds to receiving the authentication request, and displays an interactive interface on the terminal device of the control node AP1. The interactive interface displays, for example, a list including the control node AP1. For example, it may also include Text prompt information such as "Whether to access" allows the user to operate on the interactive interface whether to allow access to the control node AP1. In this embodiment, the operating system of the terminal device as the control node AP1 can be android, linux, windows, etc., and the driver with the corresponding communication module can trigger the display of the interactive interface, and the terminal device has a touch screen (or screen + buttons) and other peripherals.
又例如,认证请求中可以携带第一终端设备的身份信息,控制节点AP1根据认证请求中身份信息判断是否允许该第一终端设备接入。例如,控制节点AP1中包括接入设备列表,若第一终端设备的身份标识出现在该设备列表中,则允许第一终端设备接入。For another example, the authentication request may carry the identity information of the first terminal device, and the control node AP1 determines whether to allow the first terminal device to access based on the identity information in the authentication request. For example, the control node AP1 includes an access device list, and if the identity of the first terminal device appears in the device list, the first terminal device is allowed to access.
例如,用户可以对控制节点中的设备列表进行设置,以将自家设备添加到设备列表中,以防过多用户接入占用网络资源。For example, users can set the device list in the control node to add their own devices to the device list to prevent too many users from occupying network resources.
在本公开的一些实施例中,如果第一终端设备是首次向控制节点AP1提供无线接入请求,并且控制节点AP1根据上述实施例描述的方法确认允许该第一终端设备接入自组网,则控制节点AP1生成一个随机密钥,并且通过响应消息向第一终端设备提供该密钥。In some embodiments of the present disclosure, if the first terminal device provides a wireless access request to the control node AP1 for the first time, and the control node AP1 confirms that the first terminal device is allowed to access the self-organizing network according to the method described in the above embodiment, the control node AP1 generates a random key and provides the key to the first terminal device through a response message.
如果第一终端设备曾经接入过该自组网,则第一终端设备提供的认证请求中携带该密钥,控制节点AP1响应于接收到认证请求,判断认证请求携带的密钥是否正确。若该密钥正确,则确认允许该第一终端设备接入自组网。若密钥不正确,则确认不允许该第一终端设备接入自组网。If the first terminal device has ever accessed the ad hoc network, the authentication request provided by the first terminal device carries the key. In response to receiving the authentication request, the control node AP1 determines whether the key carried in 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.
对于步骤S20,例如响应于允许第一终端设备接入自组网,则向第一终端设备发送响应消息。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.
第一终端设备响应于接收到该响应消息,向控制节点AP1发送关联请求。在第一终端设备未接入该自组网的情形中,控制节点AP1响应于关联请 求,向动态主机配置协议(Dynamic Host Configuration Protocol,DHCP)服务模块申请为第一终端设备分配网络地址(例如,第一网络地址)。例如,控制节点AP1为第一终端设备分配的网络地址为IP地址:192.168.*.0。DHCP服务模块例如集成于控制节点中,或者DHCP服务模块也可以是独立于控制节点的设备。In response to receiving the response message, the first terminal device sends an association request to the control node AP1. In the case where the first terminal device is not connected to the ad hoc network, the control node AP1 responds to the association request Apply to a Dynamic Host Configuration Protocol (Dynamic Host Configuration Protocol, DHCP) service module to allocate a network address (for example, a first network address) to the first terminal device. For example, the network address assigned by the control node AP1 to the first terminal device is the IP address: 192.168.*.0. For example, the DHCP service module is integrated in the control node, or the DHCP service module can also be a device independent of the control node.
在本公开的一些实施例中,在控制节点AP1为第一终端设备分配网络地址之后,控制节点向第一终端设备发送关联响应,该关联响应包括第一终端设备的网络地址,并且控制节点更新自身路由表。第一终端设备接收到该关联响应之后,更新自身的路由表,从而第一终端设备接入自组网,并且利用第一网络地址在自组网中通信。In some embodiments of the present disclosure, after the control node AP1 allocates a network address to the first terminal device, the control node sends an association response to the first terminal device, the association response includes the network address of the first terminal device, and the control node updates own routing table. After receiving the association response, the first terminal device updates its own routing table, so that the first terminal device accesses the ad hoc network and uses the first network address to communicate in the ad hoc network.
在本公开的一些实施例中,步骤S20包括:响应于允许第一终端设备接入自组网,确定第一终端设备的设备类型;响应于第一终端设备为控制节点的从节点,为第一终端设备分配第一类网络地址;响应于第一终端设备为另一控制节点,为第一终端设备分配第二类网络地址。In some embodiments of the present disclosure, step S20 includes: 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, determining the device type of the first terminal device. A terminal device allocates a first type network address; in response to the first terminal device being another control node, allocating a second type network address to the first terminal device.
在本公开的一些实施例中,例如关联请求根据第一终端设备是否可以作为控制节点划分为AP接入请求和非AP接入请求。若关联请求为AP接入请求,则第一终端设备的设备类型为另一控制节点,则向第一终端设备分配第二类网络地址。若关联请求为非AP接入请求,则第一终端设备的设备类型为从节点,则为第一终端设备分配第一类网络地址。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 an AP access request and the device type of the first terminal device is another control node, the second type network address is allocated to the first terminal device. If the association request is a non-AP access request and the device type of the first terminal device is a slave node, the first terminal device is assigned a first-class network address.
在本公开的一些实施例中,第一类网络地址包括C类网络地址,第二类网络地址包括B类网络地址。In some embodiments of the present disclosure, the first type of network address includes a Class C network address and the second type of network address includes a Class B network address.
B类网络地址范围为:128.1.0.1-191.255.255.254;C类网络地址范围为:192.0.1.1-223.255.255.254。一个B类IP地址由2个字节的网络地址和2个字节的主机地址组成,网络地址的最高位必须是“10”,即第一段数字范围为128~191。互联网有16256个B类地址。一个C类地址是由3个字节的网络地址和1个字节的主机地址组成,网络地址的最高位必须是“ll0”,即第一段数字范围为192~223。互联网有2054512个C类地址。即,C类网络地址的数量多于B类网络地址的数量。由于自组网中控制节点的数量少于自组网中从节点的数量,因此,为控制节点分配B类网络地址,为从节点分配C类网络节点。 The address range of Class B network is: 128.1.0.1-191.255.255.254; the address range of Class C network is: 192.0.1.1-223.255.255.254. A Class B IP address consists of a 2-byte network address and a 2-byte host address. The highest bit of the network address must be "10", that is, the first number ranges from 128 to 191. There are 16,256 Class B addresses on the Internet. A Class C address consists of a 3-byte network address and a 1-byte host address. The highest bit of the network address must be "ll0", that is, the first number ranges from 192 to 223. There are 2,054,512 Class C addresses on the Internet. That is, the number of Class C network addresses is greater than the number of Class B network addresses. Since the number of control nodes in an ad hoc network is less than the number of slave nodes in an ad hoc network, class B network addresses are assigned to control nodes and class C network nodes are assigned to slave nodes.
按照设备为从节点还是控制节点为设备分配网络地址,便于识别设备的身份。Assign a network address to the device according to whether it is a slave node or a control node, so as to facilitate identification of the device.
在本公开的一些实施例中,如图1A所示,通信方法还可以包括步骤S30和步骤S40。In some embodiments of the present disclosure, as shown in FIG. 1A , the communication method may further include step S30 and step S40.
步骤S30:响应于第一终端设备为另一控制节点,判断第一终端设备是否具有外网服务能力。Step S30: In response to the first terminal device being another control node, determine whether the first terminal device has external network service capabilities.
步骤S40:响应于第一终端设备具有外网服务能力,将第一终端设备标记为网关。Step S40: In response to the first terminal device having external network service capabilities, mark the first terminal device as a gateway.
在该实施例中,如果第一终端设备本身具有外网服务能力,将该第一终端设备标记为网关,以便自组网中的任一终端设备能够通过网关与外部沟通。In this embodiment, if the first terminal device itself has the 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.
在本公开的实施例中,将具有外网服务能力的AP称为无线网关(Mobile Access Portal,mAP)。mAP允许自组网内的其他节点经mAP与外网互通。例如,AP进网时或在联网工作过程中可根据自主意愿或管理员意愿设置为是否允许作为外网代理,如果允许,则表示该AP可当mAP使用,可以作为网内其他终端的默认网关。In the embodiment of the present disclosure, an AP with external network service capabilities is called a wireless gateway (Mobile Access Portal, mAP). mAP allows other nodes in the ad hoc network to communicate with the external network through mAP. For example, when the AP enters the network or during the networking process, it can be set according to the free will or the administrator's will to allow it to serve as an external network proxy. If it is allowed, it means that the AP can be used as a mAP and can be used as the default gateway for other terminals in the network. .
在本公开的一些实施例中,外网服务能力可以是指与自组网之外的外部服务器通信连接的能力。In some embodiments of the present disclosure, the external network service capability may refer to the ability to communicate with external servers outside the ad hoc network.
例如,第一终端设备向控制节点发送的关联请求中包括指示该第一终端设备是否具有外网服务能力的信息,也即关联请求中包括该第一终端设备是否可作为mAP的身份信息。For example, the association request sent by the first terminal device to the control node includes information indicating whether the first terminal device has external network service capabilities. That is, the association request includes identity information indicating whether the first terminal device can serve as a mAP.
若第一终端设备可作为mAP,则控制节点可以将该第一终端设备标记为网关。If the first terminal device can serve as a mAP, the control node can mark the first terminal device as a gateway.
在本公开的一些实施例中,在第一终端设备接入自组网之后,广播第一终端设备的第一网络地址。例如,控制节点自发地广播第一网络地址,或者由第一终端设备广播自身的第一网络地址,并且控制节点响应于第一终端设备的广播第一网络地址,无条件地转发第一网络地址。In some embodiments of the present disclosure, after the first terminal device accesses the ad hoc network, the first network address of the first terminal device is broadcast. 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 unconditionally forwards the first network address in response to the first terminal device broadcasting the first network address.
图2示出了本公开至少一个实施例提供的待接入控制节点接入目标控制节点的方法流程图。Figure 2 shows a flow chart of a method for a control node to be accessed to access a target control node provided by at least one embodiment of the present disclosure.
如图2所示,该方法包括步骤S201~209。例如,待接入控制节点(以下简称“待接入AP”)为图1B中的控制节点AP4,目标控制节点(以下简称“目 标AP”)为控制节点AP1。As shown in Figure 2, the method includes steps S201-209. For example, the control node to be accessed (hereinafter referred to as the "AP to be accessed") is the control node AP4 in Figure 1B, and the target control node (hereinafter referred to as the "target AP") (labeled "AP") is the control node AP1.
步骤S201:待接入AP向目标AP发送探测请求。探测请求用于扫描通信区域内存在哪些用于连接的网络。探测请求包括probe帧以寻找可以接入的AP。Step S201: The AP to be accessed sends a detection request to the target AP. Probe requests are used to scan the communication area for the presence of connected networks. Probe requests include probe frames to find accessible APs.
步骤S202:目标AP向待接入AP发送探测响应。例如,目标AP响应于探测请求向待接入AP发送探测响应。Step S202: The target AP sends a detection response to the AP to be accessed. For example, the target AP sends a probe response to the AP to be accessed in response to the probe request.
步骤S203:待接入AP向目标AP发送认证请求。Step S203: The AP to be accessed sends an authentication request to the target AP.
如果待接入AP曾经接入过该目标AP,则认证请求携带第一次接入时为该待接入AP分配的密钥。在该情形中,步骤S204包括目标AP检查认证请求中的密钥是否正确。若密钥正确,则执行步骤S205,即向待接入AP反馈认证响应。If the AP to be accessed has previously accessed the target AP, the authentication request carries the key assigned to the AP to be accessed during the first access. In this case, step S204 includes the target AP checking whether the key in the authentication request is correct. If the key is correct, step S205 is executed, that is, the authentication response is fed back to the AP to be accessed.
如果待接入AP是首次请求接入自组网,且目标AP接收到用户输入的允许接入的指示,则步骤S204包括目标AP生成一个随机密钥,并且步骤S205包括向待接入AP反馈认证响应,该认证响应中包括该随机密钥,以便待接入AP下次接入时凭借该密钥接入,避免再次为待接入AP重新分配密钥而浪费时间和资源。If the AP to be accessed requests access to the ad hoc network for the first time, and the target AP receives an indication from the user that access is allowed, 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 can access with the key the next time it accesses, thereby avoiding wasting time and resources on reallocating keys to the AP to be accessed again.
步骤S206:待接入AP向目标AP发送关联请求。在该关联请求中包括设备类型为AP的指示信息。例如,关联请求包括指示符AP=T,AP=T表明请求接入的设备为AP。Step S206: The AP to be accessed sends an association request to the target AP. The association request includes indication information that the device type is AP. For example, the association request includes the indicator AP=T, and AP=T indicates that the device requesting access is an AP.
若待接入AP曾经接入过该自组网,则关联请求中还包括该待接入AP的网络地址,即IP地址。If the AP to be accessed has previously accessed the ad hoc network, the association request also includes the network address of the AP to be accessed, that is, the IP address.
步骤S207:若关联请求中包括IP地址(即,本次接入为首次接入),则目标AP更新自身的路由表。例如在自身的路由表中添加待接入AP的IP地址。Step S207: If the association request includes the IP address (that is, this access is the first access), the target AP updates its own routing table. For example, add the IP address of the AP to be accessed in its own routing table.
若关联请求中不包括IP地址(即,待接入AP首次接入自组网),则目标AP向DHCP服务模块申请为待接入AP分配B类IP地址,并且更新自身路由表。If the association request does not include an IP address (that is, the AP to be accessed is connected to the ad hoc network for the first time), the target AP applies to the DHCP service module to assign a Class B IP address to the AP to be accessed, and updates its own routing table.
步骤S208:目标AP向待接入AP发送关联响应。例如,该关联响应中包括目标AP的IP地址。若待接入AP是首次接入该自组网,则关联响应中还包括目标AP为待接入AP分配的网络地址。 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 accessing the ad hoc network for the first time, the association response also includes the network address assigned by the target AP to the AP to be accessed.
步骤S209:待接入AP更新自身的路由表。例如,登记自身的IP地址,并且添加目标AP的网络地址。Step S209: The AP to be accessed updates its own routing table. For example, register your own IP address and add the network address of the target AP.
之后,待接入AP可以利用自己的IP地址于自组网的其他节点进行通信。Afterwards, the AP to be connected can use its own IP address to communicate with other nodes in the ad hoc network.
图3示出了本公开至少一个实施例提供的从节点接入控制节点的方法流程图。Figure 3 shows a flow chart of a method for accessing a control node from a slave node according to at least one embodiment of the present disclosure.
如图3所示,该方法包括步骤S301~309。例如,待接入从节点(以下简称“待接入STA”)为图1B中的从节点STA11,目标控制节点(以下简称“目标AP”)为控制节点AP1。As shown in Fig. 3, the method includes steps S301 to 309. For example, the slave node to be accessed (hereinafter referred to as "STA to be accessed") is the slave node STA11 in Fig. 1B, and the target control node (hereinafter referred to as "target AP") is the control node AP1.
步骤S301:待接入STA向目标AP发送探测请求。探测请求用于扫描通信区域内存在哪些用于连接的网络。Step S301: The STA to be accessed sends a detection request to the target AP. Probe requests are used to scan the communication area for the presence of connected networks.
步骤S302:目标AP向待接入STA发送探测响应。例如,目标AP响应于探测请求向待接入STA发送探测响应。Step S302: The target AP sends a detection response to the STA to be accessed. For example, the target AP sends a probe response to the STA to be accessed in response to the probe request.
步骤S303:待接入STA向目标AP发送认证请求。Step S303: The STA to be accessed sends an authentication request to the target AP.
如果待接入STA曾经接入过该自组网,则认证请求携带第一次接入时为待接入STA分配的密钥。在该情形中,步骤S304包括目标AP检查认证请求中的密钥是否正确。若密钥正确,则执行步骤S205,即向待接入STA反馈认证响应。If the STA to be accessed has previously accessed the ad hoc network, the authentication request carries the key assigned to the STA to be accessed during the first access. In this case, step S304 includes the target AP checking whether the key in the authentication request is correct. If the key is correct, step S205 is executed, that is, the authentication response is fed back to the STA to be accessed.
如果待接入STA是首次请求接入自组网,且目标AP接收到用户输入的允许接入的指示,则步骤S204包括目标AP生成一个随机密钥,并且步骤S205包括向待接入STA反馈认证响应,该认证响应中包括该随机密钥,以便待接入STA下次接入时凭借该密钥接入,避免再次向待接入STA重新分配密钥而浪费时间和资源。If the STA to be accessed requests access to the ad hoc network for the first time, and the target AP receives an instruction input by the user to allow access, step S204 includes the target AP generating a random key, and step S205 includes feedback to the STA to be accessed. Authentication response. The authentication response includes the random key so that the STA to be accessed can use this key to access the STA next time to avoid wasting time and resources by redistributing the key to the STA to be accessed again.
步骤S306:待接入STA向目标AP发送关联请求。在该关联请求中包括设备类型为非AP的指示信息,以表明该设备类型为STA。例如,关联请求包括指示符AP=F,AP=F表明请求接入的设备为STA。Step S306: The STA to be accessed sends an association request to the target AP. The association request includes indication information that the device type is non-AP to indicate that the device type is STA. For example, the association request includes the indicator AP=F, and AP=F indicates that the device requesting access is an STA.
若待接入STA曾经接入过该自组网(即,本次接入为非首次接入),则关联请求中还包括该待接入STA的网络地址,即IP地址。If the STA to be accessed has previously accessed the ad hoc network (that is, this access is not the first access), the association request also includes the network address of the STA to be accessed, that is, the IP address.
步骤S307:若关联请求中包括IP地址,则目标AP更新自身的路由表。例如在自身的路由表中添加待接入STA的IP地址。 Step S307: If the association request includes the IP address, the target AP updates its own routing table. For example, add the IP address of the STA to be connected to its own routing table.
若关联请求中不包括IP地址(即,待接入STA首次接入自组网),则目标AP向DHCP服务模块申请为待接入AP分配C类IP地址,并且更新自身路由表。If the association request does not include an IP address (that is, the STA to be accessed is connected to the ad hoc network for the first time), the target AP applies to the DHCP service module to assign a Class C IP address to the AP to be accessed, and updates its own routing table.
步骤S308:目标AP向待接入STA发送关联响应。例如,该关联响应中包括目标AP的IP地址。若待接入STA是首次接入该自组网,则关联响应中还包括目标AP为待接入STA分配的网络地址。Step S308: The target AP sends an association response to the STA to be accessed. For example, the association response includes the IP address of the target AP. If the STA to be accessed is accessing the ad hoc network for the first time, the association response also includes the network address assigned by the target AP to the STA to be accessed.
步骤S309:待接入STA更新自身的路由表。例如,登记自身的IP地址,并且添加目标AP的网络地址。Step S309: The STA to be accessed updates its own routing table. For example, register your own IP address and add the network address of the target AP.
之后,待接入STA可以利用自己的IP地址于自组网的其他节点进行通信。Afterwards, the STA to be connected can use its own IP address to communicate with other nodes in the ad hoc network.
图4A示出了本公开一些实施例提供的另一种通信方法的流程图。Figure 4A shows a flowchart of another communication method provided by some embodiments of the present disclosure.
如图4A所示,该方法在前述步骤的基础上还可以包括步骤S401~S403。步骤S401~S403可以在第一终端设备接入自组网之后执行。例如在步骤S20之后执行。As shown in Figure 4A, the method may also include steps S401 to S403 in addition to the foregoing steps. Steps S401 to S403 may be executed after the first terminal device accesses the ad hoc network. For example, it is executed after step S20.
步骤S401:为第一终端设备设置保活定时器。Step S401: Set a keep-alive timer for the first terminal device.
步骤S402:响应于接收到第一终端设备的探测消息,复位保活定时器为最大值。Step S402: In response to receiving the detection message from the first terminal device, reset the keep-alive timer to the maximum value.
步骤S403:响应于一直未收到第一终端设备的探测消息导致保活定时器计数为0,启动对第一终端设备进行的离线处理。Step S403: In response to the fact that the keep-alive timer count reaches 0 because the detection message of the first terminal device has not been received, start offline processing of the first terminal device.
需要理解的是,第一终端设备只是一个与控制节点的终端设备的示例,第一终端设备可以是与控制节点连接的任一设备。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 may be any device connected to the control node.
例如,控制节点为与该控制节点连接的每个终端设备(包括从节点和其他控制节点)建立保活定时器。For example, the control node establishes a keep-alive timer for each terminal device connected to the control node (including slave nodes and other control nodes).
对于步骤S401,保活定时器例如是一个倒计数定时器,只要未接收到终端设备的探测消息,则从倒计数定时器的初始值(也即,最大值)以倒数的方式计数。For step S401, the keep-alive timer is, for example, a countdown timer. As long as no detection message from the terminal device is received, the countdown timer counts down from the initial value (that is, the maximum value).
初始值可以是本领域技术人员设置的,初始值可以表示预设时间长度。The initial value may be set by those skilled in the art, and the initial value may represent a preset time length.
对于步骤S402,若接收到终端设备的探测消息,则将保活定时器复位为初始值。For step S402, if a detection message from the terminal device is received, the keep-alive timer is reset to the initial value.
对于步骤S403,若保活定时器的计数已经由最大值更新为0了,则确定 终端设备与控制节点断开了连接,启动对第一终端设备进行的离线处理。For step S403, if the count of the keep-alive timer has been updated from the maximum value to 0, then determine The terminal device is disconnected from the control node, and offline processing of the first terminal device is started.
在该实施例中,例如预设时间长度内未接收到终端设备的探测消息,则表明终端设备与控制节点已经断开连接,启动对终端设备进行的离线处理。In this embodiment, for example, if no detection message from the terminal device is received within a preset time length, it indicates that the terminal device has been disconnected from the control node, and offline processing of the terminal device is initiated.
离线处理例如可以包括清除终端设备占据的资源、清除终端设备的保活器等。Offline processing may include, for example, clearing resources occupied by the terminal device, clearing the keeper of the terminal device, etc.
该方法能够及时地清理已经离线(也即,断开连接)的终端设备,从而降低终端设备占据的资源,并且避免向已经离线的终端设备发送消息占用的网络资源。This method can promptly clean up the terminal device that has been offline (that is, disconnected), thereby reducing the resources occupied by the terminal device and avoiding the network resources occupied by sending messages to the offline terminal device.
图4B示出了本公开一些实施例提供的另一种通信方法的流程图。Figure 4B shows a flowchart of another communication method provided by some embodiments of the present disclosure.
如图4B所示,该方法在前述步骤的基础上还可以包括步骤S404~S406。步骤S404~S406可以在终端设备接入自组网之后执行。例如在步骤S20之后执行。As shown in Figure 4B, the method may also include steps S404 to S406 in addition to the foregoing steps. Steps S404 to S406 may be executed after the terminal device accesses the ad hoc network. For example, it is executed after step S20.
步骤S404:设备A周期性广播探测请求。Step S404: Device A periodically broadcasts detection requests.
步骤S405:设备B发现设备A已经注册成功,则认为设备A处于保活态,重置设备A的保活定时器。Step S405: When device B finds that device A has been successfully registered, it considers that device A is in the keep-alive state and resets the keep-alive timer of device A.
设备A注册成功例如可以是指设备A已经与设备B建立了直接通信连接。例如,设备A是设备B的从节点,或者设备A是设备B直接通信连接的另一控制节点。Successful registration of device A may mean, for example, that device A has established a direct communication connection with device B. For example, device A is a slave node of device B, or device A is another control node to which device B is directly connected through communication.
步骤所S406:在预设时间长度后,设备B中设备A的保活定时器计数到0,认为设备A已经与设备B断开连接。Step S406: After the preset time length, the keep-alive timer of device A in device B counts to 0, and device A is considered to have disconnected from device B.
例如,在图2的示例中,待接入AP接入目标AP之后,待接入AP可以是图4B中的设备A,目标AP可以是图4B中的设备B。For example, in the example of FIG. 2, after the AP to be accessed accesses the target AP, the AP to be accessed may be device A in FIG. 4B, and the target AP may be device B in FIG. 4B.
又例如,在图3的示例中,待接入STA接入目标AP之后,待接入STA可以是图4B中的设备A,目标AP可以是图4B中的设备B。For another example, in the example of FIG. 3 , after the STA to be accessed accesses the target AP, the STA to be accessed may be device A in FIG. 4B , and the target AP may be device B in FIG. 4B .
在本公开的一些实施例中,该通信方法还包括响应于接收到自组网中第二终端设备广播的第二网络地址,在可服务对象列表中记录并且显示第二网络地址;响应于对第二网络地址的选择操作,向第二终端设备提供第一访问请求。In some embodiments of the present disclosure, the communication method further includes, in response to receiving the second network address broadcast by the second terminal device in the ad hoc network, recording and displaying the second network address in the serviceable object list; in response to The selection operation of the second network address provides the first access request to the second terminal device.
例如,以执行该通信方法的控制节点为图1B的控制节点为AP1为例,第二终端设备可以是图1B中的从节点STA21、从节点STA22、从节点STA23、 从节点STA31、控制节点AP2、控制节点AP3和控制节点AP4。For example, taking the control node that executes the communication method as the control node AP1 in Figure 1B as an example, the second terminal device can be the slave node STA21, the slave node STA22, the slave node STA23, Slave node STA31, control node AP2, control node AP3 and control node AP4.
从节点STA21、从节点STA22、从节点STA23、从节点STA31各自的网络地址(即,第二网络地址)分别由控制节点AP2、控制节点AP3转发。The respective network addresses (ie, the second network addresses) of the slave nodes STA21, STA22, STA23, and STA31 are forwarded by the control node AP2 and the control node AP3 respectively.
例如,从节点STA21广播自身的网络地址到控制节点AP2,控制节点AP2无条件地转发从节点STA21的网络地址到控制节点AP1。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.
控制节点AP1响应于接收到从节点STA21的网络地址,在应用程序的可服务对象列表中记录并且显示从节点STA21的网络地址,以供用户在应用程序中选择从节点STA21的网络地址与从节点STA21通信。In response to receiving the network address of the slave node STA21, the control node AP1 records and displays the network address of the slave node STA21 in the serviceable object list of the application program, so that the user can select the network address of the slave node STA21 and the slave node in the application program. STA21 communication.
例如,响应于用户选择对从节点STA21的网络地址的选择操作,从第二终端设备提供访问请求(例如,第一访问请求)。For example, in response to a user selection operation on the network address of the slave node STA21, an access request (for example, a first access request) is provided from the second terminal device.
在本公开的一些实施例中,例如可以使用每个节点的名称或者其他标识来表示节点的网络地址,以便于用户区分不同的终端设备,从而有利于用户精准地选择要访问的节点。例如,控制节点在应用程序的可服务对象列表中记录从节点STA21的设备名称以标识从节点STA21的网络地址。In some embodiments of the present disclosure, for example, the name of each node or other identification can be used to represent the network address of the node, so as to facilitate users to distinguish different terminal devices, thereby helping users accurately select the node to visit. For example, the control node records the device name of the slave node STA21 in the serviceable object list of the application program to identify the network address of the slave node STA21.
该实施例在应用程序的可服务对象列表中登记自组网中可通信的终端设备的网络地址,便于用户选择通信的终端设备,实现了自组网内各个终端设备的通信。In this embodiment, the network address of the terminal device that can communicate in the ad hoc network is registered in the service object list of the application program, so as to facilitate the user to select the terminal device for communication, and realize the communication of each terminal device in the ad hoc network.
在本公开的一些实施例中,可服务对象列表中记录的终端设备定期向控制节点发送广播消息;响应于预设时间内未收到可服务对象列表中记录的第三终端设备提供的广播消息,从可服务对象列表中删除该第三终端设备。In some embodiments of the present disclosure, the terminal device recorded in the serviceable object list regularly sends broadcast messages to the control node; in response to not receiving a broadcast message provided by the third terminal device recorded in the serviceable object list within a preset time , delete the third terminal device from the serviceable object list.
例如,终端设备在接入自组网成功后,通过广播包方式定期广播入网信息(例如,自组网内的IP地址),在其他终端设备接收到该入网信息后,在各自的应用程序中登记为可服务对象,并且在可服务对象列表中显示。当某个终端设备需要与自组网内目标终端设备通信时,在该终端设备的可服务对象列表中选中该目标终端设备进行业务(例如,短报文通信、短语音通信等)。For example, after a terminal device successfully connects to an ad hoc network, it regularly broadcasts network access information (for example, the IP address in the ad hoc network) through broadcast packets. After other terminal devices receive the network access information, they use it in their respective applications. Register as a serviceable object and display in the serviceable object list. When a terminal device needs to communicate with a target terminal device in the ad hoc network, the target terminal device is selected in the service object list of the terminal device to perform services (for example, short message communication, short voice communication, etc.).
例如,对于每个终端设备(可以是从节点也可以是控制节点),如果未收到已登记的终端设备(即,第三终端设备)定期广播的入网信息超过预设时间后,即认为该已登记的终端设备已离网,将在应用程序的可服务对象列表中删除该已登记的终端设备。For example, for each terminal device (which can be a slave node or a control node), if the network access information regularly broadcast by the registered terminal device (ie, the third terminal device) is not received for more than the preset time, it is considered that the If the registered terminal device is offline, the registered terminal device will be deleted from the service object list of the application.
图5示出了本公开至少一个实施例提供的一种自组网内设备之间的通信 方法的流程图。Figure 5 shows communication between devices in an ad hoc network provided by at least one embodiment of the present disclosure. Flowchart of the method.
如图5所示,该通信方法包括步骤S510~S540。As shown in Figure 5, the communication method includes steps S510 to S540.
步骤S510:第一设备在接入自组网成功之后,通过广播包方式定期广播入网信息。Step S510: After successfully accessing the ad hoc network, the first device regularly broadcasts network access information through broadcast packets.
入网信息例如可以是该第一设备在自组网中的IP地址。The network access information may be, for example, the IP address of the first device in the ad hoc network.
步骤S520:自组网中的其他终端设备接收到该入网信息之后,在各自的应用程序中将第一设备登记为可服务对象,并且在可服务对象列表中显示第一设备。Step S520: After receiving the network access information, other terminal devices in the ad hoc network register the first device as a serviceable object in their respective applications, and display the first device in the serviceable object list.
步骤S530:当第二设备需要与第一设备通信时,在第二设备的可服务对象列表中选择该第一设备以进行业务。业务例如可以包括报文的发送接收,语音的发送接收等。Step S530: When the second device needs to communicate with the first device, the second device selects the first device in the serviceable object list of the second device to perform a service. The service may include, for example, sending and receiving messages, sending and receiving voice, and the like.
步骤S540:如果在预设时间内未收到已登记的可服务对象(例如,第一设备)定期广播的入网信息,在可服务对象列表中删除该可服务对象。Step S540: If the network access information regularly broadcast by the registered serviceable object (for example, the first device) is not received within a preset time, delete the serviceable object from the serviceable object list.
在本公开的实施例中,控制节点定期广播自身的身份信息。身份信息包括控制节点的网络地址即在自组网中的IP地址。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, that is, the IP address in the ad hoc network.
身份信息还包括网关指示信息。网关指示信息用于指示控制节点具有外网服务能力,以便自组网中的节点将该控制节点设置为网关。例如,图1B中的控制节点AP1定期广播自身的身份信息,该身份信息不仅包括控制节点AP1的IP地址,还包括AP=T以表示控制节点AP1具有外网服务能力。例如,控制节点AP2接收到控制节点AP1广播的身份信息之后,若该身份信息指示控制节点AP1具有外网服务能力,则控制节点AP2可以将控制节点AP1设置为网关。Identity information also includes gateway indication information. The gateway indication information 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. For example, the control node AP1 in Figure 1B regularly broadcasts its own identity information. The identity information not only includes the IP address of the control node AP1, but also includes AP=T to indicate that the control node AP1 has external network service capabilities. 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.
在本公开的一些实施例中,对应的通信方法还包括响应于控制节点与外网服务器建立通信连接,广播外网服务器的外网网络地址,使得自组网中的节点将外网网络地址加入到自身的可服务对象列表中。In some embodiments of the present disclosure, the corresponding communication method also 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 the to its own list of serviceable objects.
如图1B所示,控制节点AP1通过例如公共通信网络(例如3G/4G/5G移动通信网络或者卫星网络等)与外网服务器101建立通信连接之后,控制节点AP1广播外网服务器101的外网网络地址。例如,控制节点AP2~控制节点AP4响应于接收到外网服务器101的外网网络地址,将外网服务器101的外网网络地址加入到各自的可服务对象列表中。 As shown in FIG. 1B , after the control node AP1 establishes a communication connection with the external network server 101 through, for example, a public communication network (such as 3G/4G/5G mobile communication network or satellite network, etc.), the control node AP1 broadcasts the external network of the external network server 101 website address. For example, in response to receiving the external network address of the external network server 101, the control nodes AP2 to AP4 add the external network address of the external network server 101 to their respective serviceable object lists.
从节点STA21~从节点STA23响应于接收到控制节点AP2提供的外网服务器101的外网网络地址,将外网服务器101的外网网络地址加入到各自的可服务对象列表中。类似地,从节点STA31响应于接收到控制节点AP3提供的外网服务器101的外网网络地址,将外网服务器101的外网网络地址加入到从节点STA31的可服务对象列表中。In response to receiving the external network address of the external network server 101 provided by the control node AP2, the slave nodes STA21 to STA23 add the external network address of the external network server 101 to their respective serviceable object lists. Similarly, in response to receiving the external network address of the external network server 101 provided by the control node AP3, the slave node STA31 adds the external network address of the external network server 101 to the serviceable object list of the slave node STA31.
图6A示出了本公开至少一个实施例提供的另一种通信方法的流程图。FIG. 6A shows a flowchart of another communication method provided by at least one embodiment of the present disclosure.
如图6A所示,该通信方法在前述实施例的基础上还可以进一步包括步骤S610~S640。As shown in Figure 6A, the communication method may further include steps S610 to S640 based on the foregoing embodiment.
步骤S610:接收第二访问请求。Step S610: Receive a second access request.
步骤S620:获取第二访问请求中的访问网络地址。Step S620: Obtain the access network address in the second access request.
步骤S630:响应于访问网络地址为外网网络地址,向外网服务器转发第二访问请求。Step S630: In response to the access network address being an external network address, forward the second access request to the external network server.
步骤S640:响应于访问网络地址为自组网中目标节点的目标网络地址,向目标节点转发第二访问请求。Step S640: In response to the access network address being the target network address of the target node in the ad hoc network, forward the second access request to the target node.
该方法能够实现控制节点作为中继使得自组网中的设备之间能够通信,并且使得自组网中的设备可以与外部网络通信。This method can realize the control node as a relay to enable communication between devices in the ad hoc network, and enable the devices in the ad hoc network to communicate with external networks.
对于步骤S610,例如在图1B的示例中,控制节点AP2向控制节点AP1发送第二访问请求。Regarding step S610, for example in the example of FIG. 1B , the control node AP2 sends a second access request to the control node AP1.
控制节点AP1接收来自控制节点AP2的访问请求。The control node AP1 receives the access request from the control node AP2.
对于步骤S620,例如从第二访问请求中获取访问网络地址。For step S620, for example, the access network address is obtained from the second access request.
对于步骤S630,若访问网络地址为外网网络地址,例如为外网服务器101的外网网络地址,向外网服务器101转发第二访问请求。For step S630, if the accessed network address is an 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.
对于步骤S640,例如目标节点为从节点STA11,响应于访问网络地址为自组网中从节点STA11的网络地址,向从节点STA11转发第二访问请求。For step S640, for example, the target node is the slave node STA11, and 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.
图6B示出了本公开至少一个实施例提供的另一种通信方法的流程图。FIG. 6B shows a flowchart of another communication method provided by at least one embodiment of the present disclosure.
如图6B所示,该通信方法在前述实施例的基础上还可以进一步包括步骤S650~S680。As shown in Figure 6B, the communication method may further include steps S650 to S680 based on the foregoing embodiment.
步骤S650:无线网关mAP接入自组网时,如果还具有外网服务能力,则广播无线网关mAP在自组网内的IP地址以及外网服务器的固定IP地址。Step S650: When the wireless gateway mAP accesses the ad hoc network, if it also has the capability of providing external network services, 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.
步骤S660:自组网内的其他终端设备接收到无线网关mAP的广播消息 之后,将该无线网关mAP在自组网内的IP地址设置为本机的网关地址之一,同时将外网服务器的固定IP地址加入各自应用程序的可服务对象列表中。Step S660: Other terminal devices in the ad hoc network receive the broadcast message of the wireless gateway mAP After that, set the IP address of the wireless gateway mAP in the ad hoc network as one of the local gateway addresses, and add the fixed IP address of the external network server to the serviceable object list of the respective application.
步骤S670:自组网内的终端设备通过无线网关mAP与外网服务器进行业务。Step S670: The terminal device in the ad hoc network conducts services with the external network server through the wireless gateway mAP.
步骤S680:对于自组网内的每个终端设备,如果未收到无线网关mAP定期广播消息超过一定时间后,则认为该无线网关mAP已经离网,将该无线网关mAP的网络地址从本地网关地址列表中删除。Step S680: For each terminal device in the ad hoc network, if the wireless gateway mAP does not receive a regular broadcast message for more than a certain period of time, it is considered that the wireless gateway mAP has left the network, and the network address of the wireless gateway mAP is changed from the local gateway removed from the address list.
在本公开的一些实施例中,例如第二访问请求来自自组网中的第一节点,外网服务器与移动终端建立通信连接。例如,如图1B所示,外网服务器101还与移动终端102建立通信连接。In some embodiments of the present disclosure, for example, the second access request comes from the first node in the ad hoc network, and the external network server establishes a communication connection with the mobile terminal. For example, as shown in FIG. 1B , the external network server 101 also establishes a communication connection with the mobile terminal 102 .
例如,外网服务器101作为代理服务器与移动终端102建立通信连接。又例如,外网服务器101与移动终端102通过蜂窝网建立通信连接。For example, the external network server 101 serves as a proxy server to establish a communication connection with the mobile terminal 102. For another example, the external network server 101 and the mobile terminal 102 establish a communication connection through a cellular network.
通信方法还可以包括:响应于访问网络地址为移动终端的网络地址,向外网服务器发送第二访问请求,以通过外网服务器转发第二访问请求至移动终端;以及将来自外网服务器的应答消息转发至第一节点,应答消息由移动终端提供至外网服务器。The communication method may also include: in response to the access network address being the network address of the mobile terminal, sending a second access request to the external network server to forward the second access request to the mobile terminal through the external network server; and sending the response from the external network server The message is forwarded to the first node, and the response message is provided by the mobile terminal to the external network server.
例如,例如,第一节点为控制节点AP2。控制节点AP2提供的访问网络地址为移动终端102的IP地址。控制节点AP2向控制节点AP1发送第二访问请求,由控制节点AP1向外网服务器101转发第二访问请求,再由外网服务器101向移动终端102转发第二访问请求。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 a second access request to the control node AP1. The control node AP1 forwards the second access request to the external network server 101, and then the external network server 101 forwards the second access request to the mobile terminal 102.
移动终端102响应第二访问请求,向外网服务器101发送应答消息。外网服务器101经由控制节点AP1向控制节点AP2提供应答消息。The mobile terminal 102 responds to the second access request and sends a response message to the external network server 101. The external network server 101 provides a response message to the control node AP2 via the control node AP1.
该通信方法能够实现自组网中的任一设备与外部的移动终端的通信。例如,自组网中的任一设备能够与外部的移动终端进行数据通信、语音通信等。This communication method can realize communication between any device in the ad hoc network and an external mobile terminal. For example, any device in the ad hoc network can perform data communication, voice communication, etc. with external mobile terminals.
在本公开的一些实施例中,代理服务器还包括代理运营商通道的短信业务,通过代理服务器向移动终端发送短信。即,外网服务器作为运营商通道的代理服务器,用于代理运营商通道的短信业务或者通话业务,通过代理服务器向移动终端发送短信或者语音通话。In some embodiments of the present disclosure, the proxy server also includes a proxy server for the SMS service of the operator channel, and sends SMS messages to the mobile terminal through the proxy server. That is, the external network server serves as the proxy server of the operator channel, is used to act as an agent for the SMS service or call service of the operator channel, and sends SMS messages or voice calls to the mobile terminal through the proxy server.
在该实施例中,外网服务器为运营商的代理,从自组网内的终端设备可以通过外网服务器向移动终端发送短信。该实施例拓展了自组网内的终端设 备与外部终端通信的方式。In this embodiment, the external network server is an agent of the operator, and the terminal device in the ad hoc network can send text messages to the mobile terminal through the external network server. This embodiment expands the terminal equipment in the ad hoc network How the device communicates with external terminals.
在本公开的一些实施例中,除控制节点与外网服务器建立通信连接之外,自组网中的至少一个第二节点与外网服务器建立通信连接,自组网按照轮询的方式从与至少一个第二节点和控制节点中选择用于与外网服务器通信的通信节点。接收所述第二访问请求,包括:响应于通信节点为控制节点,接收第二访问请求,即当通信节点为控制节点时,由控制节点接收第二访问请求。In some embodiments of the present disclosure, 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, and the ad hoc network is configured with the external network server in a polling manner. The communication node selected from at least one second node and the control node is used to communicate with the external network server. Receiving the second access request includes: receiving the second access request in response to the communication node being the control node, that is, when the communication node is the control node, the control node receives the second access request.
在本公开的一些实施例中,与外网服务器通信包括利用移动蜂窝网和/或卫星网络与外网服务器通信。In some embodiments of the present disclosure, communicating with the external network server includes utilizing a mobile cellular network and/or a satellite network to communicate with the external network server.
例如,在图1B的示例中,除控制节点AP1与外网服务器101建立之外,控制节点AP3和控制节点AP4也与外网服务器建立通信连接。控制节点AP3和控制节点AP4为至少一个第二节点的示例。即,在图1B所示的自组网中,控制节点AP1、控制节点AP3和控制节点AP4与外网服务器101建立通信连接,自组网按照轮询的方式从控制节点AP1、控制节点AP3和控制节点AP4中选择用于与外网服务器101通信的通信节点。若通信节点为控制节点AP1,则由控制节点AP1接收第二访问请求。若通信节点为控制节点AP2,则由控制节点AP2接收第二访问请求。For example, in the example of FIG. 1B , in addition to the control node AP1 establishing 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. Control node AP3 and control node AP4 are examples of at least one second node. That is, in the ad hoc network shown in Figure 1B, the control node AP1, the control node AP3 and the control node AP4 establish communication connections with the external network server 101, and the ad hoc network starts from the control node AP1, the control node AP3 and the external network server in a polling manner. The control node AP4 selects a communication node used to communicate with the external network server 101. If the communication node is the control node AP1, the control node AP1 receives the second access request. If the communication node is the control node AP2, the control node AP2 receives the second access request.
在本公开中,轮询的方式是指自组网中的能够与外网服务器通信的多个控制节点(即,mAP)按照一定的顺序排序,按照该顺序依次访问每个控制节点。In this disclosure, the polling method means that multiple control nodes (ie, 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 visited sequentially in this order.
在本公开的一些实施例中,控制节点与至少一个第二节点在轮询中的排列顺序被定期改变,即,这些自组网中的多个mAP在轮询中的排列顺序被定期改变。定期改变多个mAP在轮询中的排列顺序能够在宏观上平衡各个mAP的代理负荷。In some embodiments of the present disclosure, the order in which the control node and at least one second node are arranged in polling is periodically changed, that is, the order in which multiple mAPs in these ad hoc networks are arranged in polling is regularly changed. Regularly changing the order of multiple mAPs in polling can macroscopically balance the proxy load of each mAP.
在本公开的一些实施例中,在能够与外网服务器通信的情况下,在一个自组网中多个mAP的排列顺序中,利用移动蜂窝网与外网服务器通信的节点在轮询中的排列顺序位于利用卫星网络与外网服务器通信的节点的前面。这样优先选择移动蜂窝网与外网服务器通信,降低通信成本,并且提供通信效率。 In some embodiments of the present disclosure, in the case of being able to communicate with the external network server, in the arrangement sequence of multiple mAPs in an ad hoc network, the nodes that use the mobile cellular network to communicate with the external network server are polled. The sort order is in front of the nodes that use the satellite network to communicate with the external network server. In this way, the mobile cellular network is given priority to communicate with the external network server, which reduces communication costs and improves communication efficiency.
本公开的实施例提供了一种采用非授权频段无线通信技术基于自组网的网络通讯方法,例如多个车机系统和移动终端将根据无线链路质量情况及授权情况实现自组网,自组网内任何设备间均可进行基础业务(如报文、语音等)的实时互通。例如,当自组网中存在某设备具备外网通信能力时(如具备卫星通信能力或进入了蜂窝网覆盖区域),其他设备还可以通过该设备实现与外网的联系。通过这种全自动的网络通讯方法,实现了组内用户间任何时刻、任何地域的无缝、经济的互联互通,减少了信息孤岛的存在。本公开实施例提供的自组网架构能够快速且安全的组建,保证了自组网的安全性、稳定性、可扩展性。Embodiments of the present disclosure provide a network communication method based on an ad hoc network using unlicensed frequency band wireless communication technology. For example, multiple vehicle systems and mobile terminals will implement ad hoc networks based on wireless link quality and authorization conditions. Basic services (such as messages, voice, etc.) can be communicated in real time between any devices in the network. For example, when there is a device in the ad hoc network that has the ability to communicate with the external network (such as having satellite communication capabilities or entering the cellular network coverage area), other devices can also communicate with the external network through the device. Through this fully automatic network communication method, seamless and economical interconnection between users in the group at any time and in any region is achieved, reducing the existence of information islands. The self-organizing network architecture provided by the embodiments of the present disclosure can be quickly and safely established, ensuring the security, stability, and scalability of the self-organizing network.
图7示出了本公开至少一个实施例提供的一种通信装置700的示意框图。Figure 7 shows a schematic block diagram of a communication device 700 provided by at least one embodiment of the present disclosure.
例如,如图7所示,该通信装置700包括接收单元710和地址分配单元720。For example, as shown in FIG. 7 , the communication device 700 includes a receiving unit 710 and an address allocating unit 720 .
接收单元710配置为接收第一终端设备提供的无线接入请求,无线接入请求用于请求接入自组网。The receiving unit 710 is configured to receive a wireless access request provided by the first terminal device, where the wireless access request is used to request access to the ad hoc network.
接收单元710例如可以执行图1A描述的步骤S10。The receiving unit 710 may, for example, perform step S10 described in FIG. 1A.
地址分配单元720配置为响应于允许第一终端设备接入自组网,为第一终端设备分配用于在自组网中通信的第一网络地址,使得第一终端设备接入自组网,并且利用第一网络地址在自组网中通信。The address allocation unit 720 is configured to allocate a first network address for communicating 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.
接收单元710例如可以执行图1A描述的步骤S20。The receiving unit 710 may, for example, perform step S20 described in FIG. 1A.
例如,接收单元710和地址分配单元720可以为硬件、软件、固件以及它们的任意可行的组合。例如,接收单元710和地址分配单元720可以为专用或通用的电路、芯片或装置等,也可以为处理器和存储器的结合。关于上述各个单元的具体实现形式,本公开的实施例对此不作限制。For example, the receiving unit 710 and the address allocating unit 720 may be hardware, software, firmware, or any feasible combination thereof. For example, the receiving unit 710 and the address allocating unit 720 may be dedicated or general-purpose circuits, chips or devices, or may be a combination of a processor and a memory. Regarding the specific implementation forms of each of the above units, the embodiments of the present disclosure do not limit this.
需要说明的是,本公开的实施例中,通信装置700的各个单元与前述的通信方法的各个步骤对应,关于通信装置700的具体功能可以参考关于通信方法的相关描述,此处不再赘述。图7所示的通信装置700的组件和结构只是示例性的,而非限制性的,根据需要,该通信装置700还可以包括其他组件和结构。 It should be noted that in the embodiments of the present disclosure, the various units of the communication device 700 correspond to the various steps of the aforementioned communication method. For the specific functions of the communication device 700, reference can be made to the relevant description of the communication method, which will not be repeated here. The components and structure of the communication device 700 shown in FIG7 are only exemplary and non-restrictive. The communication device 700 may also include other components and structures as needed.
本公开的至少一个实施例还提供了一种电子设备,该电子设备包括处理器和存储器,存储器包括一个或多个计算机程序模块。一个或多个计算机程序模块被存储在存储器中并被配置为由处理器执行,一个或多个计算机程序模块包括用于实现上述的通信方法的指令。该电子设备可以利用控制节点建立自组网,从而即使在无通信基础设施场景下,也能通过自组的网络进行内部互通,并且一旦自组网内的一个设备具备基础通信能力时,自组网内其他设备还可通过该设备实现与外部的互通。At least one embodiment of the present disclosure also provides an electronic device including a processor and a memory including one or more computer program modules. 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 use control nodes to establish an ad hoc network, so that even in scenarios where there is no communication infrastructure, it can communicate internally through the ad hoc network. Once a device in the ad hoc network has basic communication capabilities, the ad hoc network can Other devices in the network can also communicate with the outside through this device.
图8A为本公开一些实施例提供的一种电子设备的示意框图。如图8A所示,该电子设备800包括处理器810和存储器820。存储器820用于存储非暂时性计算机可读指令(例如一个或多个计算机程序模块)。处理器810用于运行非暂时性计算机可读指令,非暂时性计算机可读指令被处理器810运行时可以执行上文所述的通信方法中的一个或多个步骤。存储器820和处理器810可以通过总线系统和/或其它形式的连接机构(未示出)互连。FIG. 8A is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure. As shown in FIG. 8A , the electronic device 800 includes a processor 810 and a memory 820 . Memory 820 is used to store non-transitory computer-readable instructions (eg, one or more computer program modules). The processor 810 is configured to execute non-transitory computer readable instructions. When the non-transitory computer readable instructions are executed by the processor 810, they may perform one or more steps in the communication method described above. Memory 820 and processor 810 may be interconnected by a bus system and/or other forms of connection mechanisms (not shown).
例如,处理器810可以是中央处理单元(CPU)、图形处理单元(GPU)或者具有数据处理能力和/或程序执行能力的其它形式的处理单元。例如,中央处理单元(CPU)可以为X86或ARM架构等。处理器810可以为通用处理器或专用处理器,可以控制电子设备800中的其它组件以执行期望的功能。For example, the processor 810 may be a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units having data processing capabilities and/or program execution capabilities. For example, the central processing unit (CPU) may be an X86 or ARM architecture, etc. The processor 810 may be a general-purpose processor or a dedicated processor, and may control other components in the electronic device 800 to perform desired functions.
例如,存储器820可以包括一个或多个计算机程序产品的任意组合,计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。非易失性存储器例如可以包括只读存储器(ROM)、硬盘、可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、USB存储器、闪存等。在计算机可读存储介质上可以存储一个或多个计算机程序模块,处理器810可以运行一个或多个计算机程序模块,以实现电子设备800的各种功能。在计算机可读存储介质中还可以存储各种应用程序和各种数据以及应用程序使用和/或产生的各种数据等。For example, memory 820 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and/or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, flash memory, and the like. One or more computer program modules may be stored on the computer-readable storage medium, and the processor 810 may run the one or more computer program modules to implement various functions of the electronic device 800 . Various application programs and various data, as well as various data used and/or generated by the application programs, etc. can also be stored in the computer-readable storage medium.
需要说明的是,本公开的实施例中,电子设备800的具体功能和技术效果可以参考上文中关于通信方法的描述,此处不再赘述。It should be noted that in the embodiment of the present disclosure, for the specific functions and technical effects of the electronic device 800, reference can be made to the above description of the communication method, which will not be described again here.
图8B为本公开一些实施例提供的另一种电子设备的示意框图。该电子设备900例如适于用来实施本公开实施例提供的通信方法。电子设备900可 以是手机、平板电脑、导航设备、交通工具(例如车载系统)、智能穿戴设备等终端设备等。需要注意的是,图8B示出的电子设备900仅仅是一个示例,其不会对本公开实施例的功能和使用范围带来任何限制。FIG. 8B is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure. The electronic device 900 is, for example, suitable for implementing the communication method provided by the embodiment of the present disclosure. Electronic equipment 900 can So mobile phones, tablets, navigation equipment, vehicles (such as vehicle systems), smart wearable devices and other terminal equipment, etc. It should be noted that the electronic device 900 shown in FIG. 8B is only an example, which does not bring any limitations to the functions and scope of use of the embodiments of the present disclosure.
如图8B所示,电子设备900可以包括处理装置(例如中央处理器、图形处理器等)910,其可以根据存储在只读存储器(ROM)920中的程序或者从存储装置980加载到随机访问存储器(RAM)930中的程序而执行各种适当的动作和处理。在RAM 930中,还存储有电子设备900操作所需的各种程序和数据。处理装置910、ROM 920以及RAM930通过总线940彼此相连。输入/输出(I/O)接口950也连接至总线940。As shown in FIG. 8B, the electronic device 900 may include a processing device (eg, central processing unit, graphics processor, etc.) 910, which may be loaded into a random access memory according to a program stored in a read-only memory (ROM) 920 or from a storage device 980. The program in the memory (RAM) 930 executes various appropriate actions and processes. In the RAM 930, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 910, ROM 920 and RAM 930 are connected to each other through a bus 940. An input/output (I/O) interface 950 is also connected to bus 940.
通常,以下装置可以连接至I/O接口950:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置960;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置970;包括例如磁带、硬盘等的存储装置980;以及通信装置990。通信装置990可以允许电子设备900与其他电子设备进行无线或有线通信以交换数据。虽然图8B示出了具有各种装置的电子设备900,但应理解的是,并不要求实施或具备所有示出的装置,电子设备900可以替代地实施或具备更多或更少的装置。Generally, the following devices may be connected to the I/O interface 950: input devices 960 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 970 such as a computer; a storage device 980 including a magnetic tape, a hard disk, etc.; and a communication device 990. The communication device 990 may allow the electronic device 900 to communicate wirelessly or wiredly with other electronic devices to exchange data. Although FIG. 8B illustrates electronic device 900 having various means, it should be understood that implementation or provision of all illustrated means is not required, and electronic device 900 may alternatively implement or be provided with more or fewer means.
例如,根据本公开的实施例,上述通信方法可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包括用于执行上述通信方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置990从网络上被下载和安装,或者从存储装置980安装,或者从ROM 920安装。在该计算机程序被处理装置910执行时,可以实现本公开实施例提供的通信方法中限定的功能。For example, according to an embodiment of the present disclosure, the above-mentioned communication method can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the above-mentioned communication method. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 990, or installed from a storage device 980, or installed from a ROM 920. When the computer program is executed by the processing device 910, the functions defined in the communication method provided in the embodiment of the present disclosure can be implemented.
本公开的至少一个实施例还提供了一种计算机可读存储介质,该计算机可读存储介质用于存储非暂时性计算机可读指令,当非暂时性计算机可读指令由计算机执行时可以实现上述的通信方法。利用该计算机可读存储介质,可以利用控制节点建立自组网,从而即使在无通信基础设施场景下,也能通过自组的网络进行内部互通,并且一旦自组网内的一个设备具备基础通信能力时,自组网内其他设备还可通过该设备实现与外部的互通。At least one embodiment of the present disclosure also provides a computer-readable storage medium for storing non-transitory computer-readable instructions, which can implement the above when the non-transitory computer-readable instructions are executed by a computer. communication method. Using this computer-readable storage medium, control nodes can be used to establish an ad hoc network, so that even in scenarios where there is no communication infrastructure, internal intercommunication can be carried out through the ad hoc network, and once a device in the ad hoc network has basic communication When capable, other devices in the ad hoc network can also communicate with the outside through this device.
图9为本公开一些实施例提供的一种存储介质的示意图。如图9所示, 存储介质1000用于存储非暂时性计算机可读指令1010。例如,当非暂时性计算机可读指令1010由计算机执行时可以执行根据上文所述的通信方法中的一个或多个步骤。FIG9 is a schematic diagram of a storage medium provided by some embodiments of the present disclosure. As shown in FIG9, 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 may be performed.
例如,该存储介质1000可以应用于上述电子设备800中。例如,存储介质1000可以为图8A所示的电子设备800中的存储器820。例如,关于存储介质1000的相关说明可以参考图8A所示的电子设备800中的存储器820的相应描述,此处不再赘述。For example, the storage medium 1000 can be applied to the above-mentioned electronic device 800. For example, the storage medium 1000 may be the memory 820 in the electronic device 800 shown in FIG. 8A. For example, for relevant descriptions about the storage medium 1000, reference may be made to the corresponding description of the memory 820 in the electronic device 800 shown in FIG. 8A, which will not be described again here.
有以下几点需要说明:The following points need to be explained:
(1)本公开实施例附图只涉及到本公开实施例涉及到的结构,其他结构可参考通常设计。(1) The drawings of the embodiments of this disclosure only relate to the structures involved in the embodiments of this disclosure, and other structures can refer to common designs.
(2)在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合以得到新的实施例。(2) Without conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other to obtain new embodiments.
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,本公开的保护范围应以所述权利要求的保护范围为准。 The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. The protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims (23)

  1. 一种通信方法,应用于自组网中的控制节点,所述方法包括:A communication method, applied to control nodes in ad hoc networks, the method includes:
    接收第一终端设备提供的无线接入请求,其中,所述无线接入请求用于请求接入所述自组网;以及Receive a wireless access request provided by the 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 communicating in the ad hoc network to the first terminal device, so that the first terminal device accesses the ad hoc network, and communicate in the ad hoc network using the first network address.
  2. 根据权利要求1所述的方法,其中,所述自组网包括使用非授权频谱建立的无线局域网。The method of claim 1, wherein the ad hoc network includes a wireless local area network established using unlicensed spectrum.
  3. 根据权利要求1或2所述的方法,其中,响应于允许所述第一终端设备接入所述自组网,为所述第一终端设备分配用于在所述自组网中通信的第一网络地址,包括:The method according to claim 1 or 2, wherein, in response to allowing the first terminal device to access the ad hoc network, allocating a first network address for communicating in the ad hoc network to the first terminal device 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, allocate a first type network address to the first terminal device;
    响应于所述第一终端设备为另一控制节点,为所述第一终端设备分配第二类网络地址。In response to the first terminal device being another control node, a second-type network address is allocated to the first terminal device.
  4. 根据权利要求3所述的方法,其中,所述第一类网络地址包括C类网络地址,所述第二类网络地址包括B类网络地址。The method of claim 3, wherein the first type of network address includes a Class C network address and the second type of network address includes a Class B network address.
  5. 根据权利要求3或4所述的方法,还包括:The method according to claim 3 or 4, further comprising:
    响应于所述第一终端设备为另一控制节点,判断所述第一终端设备是否具有外网服务能力;In response to the first terminal device being another control node, determining whether the first terminal device has external network service capabilities;
    响应于所述第一终端设备具有外网服务能力,将所述第一终端设备标记为网关。In response to the first terminal device having an external network service capability, the first terminal device is marked as a gateway.
  6. 根据权利要求1-5任一项所述的方法,还包括:The method according to any one of claims 1-5, further comprising:
    在所述第一终端设备接入所述自组网之后,广播所述第一终端设备的所述第一网络地址。After the first terminal device accesses the ad hoc network, the first network address of the first terminal device is broadcast.
  7. 根据权利要求1-6任一项所述的方法,还包括: The method according to any one of claims 1-6, further comprising:
    为所述第一终端设备设置保活定时器;Set a keep-alive timer for the first terminal device;
    响应于接收到所述第一终端设备的探测消息,复位所述保活定时器为最大值;In response to receiving the detection message from the first terminal device, resetting the keep-alive timer to a maximum value;
    响应于一直未收到所述第一终端设备的探测消息导致所述保活定时器计数为0,启动对所述第一终端设备进行的离线处理。In response to the fact that the detection message of the first terminal device has not been received and the keep-alive timer counts to 0, offline processing of the first terminal device is started.
  8. 根据权利要求1-7任一项所述的方法,还包括:The method according to any one of claims 1-7, further comprising:
    响应于接收到所述自组网中第二终端设备广播的第二网络地址,在可服务对象列表中记录并且显示所述第二网络地址;In response to receiving a second network address broadcasted by a second terminal device in the ad hoc network, recording and displaying the second network address in a serviceable object list;
    响应于对所述第二网络地址的选择操作,向所述第二终端设备提供第一访问请求。In response to the selection operation of the second network address, a first access request is provided to the second terminal device.
  9. 根据权利要求8所述的方法,其中,所述可服务对象列表中记录的终端设备定期向所述控制节点发送广播消息;The method according to claim 8, wherein the terminal device recorded in the serviceable object list regularly sends broadcast messages 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, deleting the third terminal device from the serviceable object list.
  10. 根据权利要求1-9任一项所述的方法,还包括:The method according to any one of claims 1-9, further comprising:
    广播所述控制节点的身份信息,其中,所述身份信息包括所述控制节点的网络地址。Broadcast the identity information of the control node, wherein the identity information includes the network address of the control node.
  11. 根据权利要求10所述的方法,其中,所述身份信息还包括网关指示信息,所述网关指示信息用于指示所述控制节点具有外网服务能力,以便所述自组网中的节点将该控制节点设置为网关。The method according to claim 10, wherein the identity information further includes gateway indication information, and the gateway indication information is used to indicate that the control node has external network service capabilities, so that the nodes in the ad hoc network will use the external network service capability. The control node is set as a gateway.
  12. 根据权利要求10或11所述的方法,还包括:The method according to claim 10 or 11, further comprising:
    响应于所述控制节点与外网服务器建立通信连接,广播所述外网服务器的外网网络地址,使得所述自组网中的节点将所述外网网络地址加入到自身的可服务对象列表中。In response to the control node establishing a communication connection with the external network server, broadcast the external network address of the external network server, so that the node in the ad hoc network adds the external network address to its own serviceable object list middle.
  13. 根据权利要求12所述的方法,其中,所述控制节点与所述外网服务器建立通信连接,所述方法还包括:The method according to claim 12, 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 in the second access request;
    响应于所述访问网络地址为所述外网网络地址,向所述外网服务器转发所述第二访问请求; In response to the access network address being the external network address, forward the second access request to the external network server;
    响应于所述访问网络地址为所述自组网中目标节点的目标网络地址,向所述目标节点转发所述第二访问请求。In response to the access network address being the target network address of the target node in the ad hoc network, the second access request is forwarded to the target node.
  14. 根据权利要求13所述的方法,其中,所述第二访问请求来自所述自组网中的第一节点,所述外网服务器与移动终端建立通信连接,所述方法还包括:The method according to claim 13, wherein the second access request comes 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 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 to forward the second access request to the mobile terminal through the external network server; as well as
    将来自所述外网服务器的应答消息转发至所述第一节点,其中,所述应答消息由所述移动终端提供至所述外网服务器。Forwarding the 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.
  15. 根据权利要求14所述的方法,其中,所述外网服务器作为代理服务器与所述移动终端建立通信连接。The method according to claim 14, wherein the external network server serves as a proxy server to establish a communication connection with the mobile terminal.
  16. 根据权利要求15所述的方法,其中,所述代理服务器还包括:The method according to claim 15, wherein the proxy server further includes:
    代理运营商通道的短信业务,通过所述代理服务器向所述移动终端发送短信。Act as an agent for the SMS service of the operator channel, and send SMS messages to the mobile terminal through the proxy server.
  17. 根据权利要求13-16任一项所述的方法,其中,除所述控制节点与所述外网服务器建立通信连接之外,所述自组网中的至少一个第二节点与所述外网服务器建立通信连接,所述自组网按照轮询的方式从与所述至少一个第二节点和所述控制节点中选择用于与外网服务器通信的通信节点,The method according to any one of claims 13-16, 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 communicates with the external network. The server establishes a communication connection, and the ad hoc network selects a communication node for communicating 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 includes:
    响应于所述通信节点为所述控制节点,接收所述第二访问请求。In response to the communication node being the control node, the second access request is received.
  18. 根据权利要求17所述的方法,其中,所述控制节点与所述至少一个第二节点在所述轮询中的排列顺序被定期改变。The method of claim 17, wherein the order of the control node and the at least one second node in the polling is periodically changed.
  19. 根据权利要求18所述的方法,其中,所述与外网服务器通信包括利用移动蜂窝网和/或卫星网络与外网服务器通信。The method according to claim 18, wherein communicating with the external network server includes using a mobile cellular network and/or a satellite network to communicate with the external network server.
  20. 根据权利要求19所述的方法,其中,在能够与所述外网服务器通信的情况下,利用移动蜂窝网与所述外网服务器通信的节点在所述轮询中的排列顺序位于利用卫星网络与所述外网服务器通信的节点的前面。The method according to claim 19, wherein in the case of being able to communicate with the external network server, the order of the nodes communicating with the external network server using the mobile cellular network in the polling is in the order of using the satellite network. The front of the node communicating with the external network server.
  21. 一种通信装置,应用于自组网中的控制节点,所述装置包括: A communication device applied to a control node in an ad hoc network, the device includes:
    接收单元,配置为接收第一终端设备提供的无线接入请求,其中,所述无线接入请求用于请求接入所述自组网;以及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, in response to allowing the first terminal device to access the ad hoc network, allocate to the first terminal device a first network address for communication in the ad hoc network, so that the The first terminal device accesses the ad hoc network and uses the first network address to communicate in the ad hoc network.
  22. 一种电子设备,包括:An electronic device including:
    处理器;processor;
    存储器,包括一个或多个计算机程序指令;memory, including one or more computer program instructions;
    其中,所述一个或多个计算机程序指令被存储在所述存储器中,并由所述处理器执行时实现权利要求1-20任一项所述的通信方法的指令。Wherein, the one or more computer program instructions are stored in the memory, and when executed by the processor, the instructions implement the communication method according to any one of claims 1-20.
  23. 一种计算机可读存储介质,非暂时性存储有计算机可读指令,其中,当所述计算机可读指令由处理器执行时实现权利要求1-20任一项所述的通信方法。 A computer-readable storage medium non-transitoryly stores computer-readable instructions, wherein when the computer-readable instructions are executed by a processor, the communication method according to any one of claims 1-20 is implemented.
PCT/CN2023/114841 2022-09-20 2023-08-25 Communication method and apparatus, and electronic device and computer-readable storage medium WO2024060930A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211144154.9A CN115515207A (en) 2022-09-20 2022-09-20 Communication method, communication device, electronic equipment and computer-readable storage medium
CN202211144154.9 2022-09-20

Publications (1)

Publication Number Publication Date
WO2024060930A1 true WO2024060930A1 (en) 2024-03-28

Family

ID=84503704

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/114841 WO2024060930A1 (en) 2022-09-20 2023-08-25 Communication method and apparatus, and electronic device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN115515207A (en)
WO (1) WO2024060930A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115515207A (en) * 2022-09-20 2022-12-23 湖北星纪时代科技有限公司 Communication method, communication device, electronic equipment and computer-readable storage medium
CN116388853B (en) * 2023-04-26 2023-12-12 中国人民解放军32039部队 Registration authentication method and device for multi-target relay data transmission service

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101772122A (en) * 2008-12-26 2010-07-07 中国移动通信集团公司 Method for establishing self-organization network for mobile terminals and equipment thereof
US20110208846A1 (en) * 2008-09-19 2011-08-25 Kiyoshige Ito Communication method and terminal apparatuses using the communication method in an ad-hoc network
CN113194462A (en) * 2021-03-30 2021-07-30 北京和峰科技有限公司 Node address allocation method and device, storage medium and electronic equipment
CN115515207A (en) * 2022-09-20 2022-12-23 湖北星纪时代科技有限公司 Communication method, communication device, electronic equipment and computer-readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110208846A1 (en) * 2008-09-19 2011-08-25 Kiyoshige Ito Communication method and terminal apparatuses using the communication method in an ad-hoc network
CN101772122A (en) * 2008-12-26 2010-07-07 中国移动通信集团公司 Method for establishing self-organization network for mobile terminals and equipment thereof
CN113194462A (en) * 2021-03-30 2021-07-30 北京和峰科技有限公司 Node address allocation method and device, storage medium and electronic equipment
CN115515207A (en) * 2022-09-20 2022-12-23 湖北星纪时代科技有限公司 Communication method, communication device, electronic equipment and computer-readable storage medium

Also Published As

Publication number Publication date
CN115515207A (en) 2022-12-23

Similar Documents

Publication Publication Date Title
WO2024060930A1 (en) Communication method and apparatus, and electronic device and computer-readable storage medium
EP3742779B1 (en) Management control device and communication control device
US11139887B2 (en) System and method for radio link sharing
JP2018514139A (en) Method for determining, using and apparatus for D2D relay node
CN113207191B (en) Session establishment method, device and equipment based on network slice and storage medium
JP2007189658A (en) Method for setting radio security
EP4145864A1 (en) Prs configuration processing method and apparatus, and communication device and storage medium
US20150133131A1 (en) Accessing Mobile Communication Resources
KR20130093953A (en) Method and apparatus for supporting device to device communications
WO2016045568A1 (en) Method and device for d2d resource allocation
WO2018035960A1 (en) Relay network connection method and associated apparatus
US10397969B2 (en) Method and device for establishing backhaul link
JP2018515030A (en) Provision of services
EP3107320B1 (en) Apparatus, program and method to perform direct communication
WO2020001319A1 (en) Dynamic networking method, device and system
US10051456B2 (en) Near field communication discovery method, apparatus and system
CN111194085B (en) Control method of channel resources, terminal and communication network element
CN113472474A (en) Information transmission method, user terminal and access network element
WO2023051288A1 (en) Tunnel management method, device, and system
CN112291845B (en) Paging method and communication device
CN113050958A (en) Terminal upgrading method, terminal and server
CN114731567A (en) Method, apparatus and computer readable medium for controlling D2D routing
CN117221884B (en) Base station system information management method and system
JP3862717B2 (en) Wireless communication system
WO2022247875A1 (en) Method, apparatus and system for establishing connection

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23867222

Country of ref document: EP

Kind code of ref document: A1