Methods and apparatus for creating routing tables
By monitoring and building routing tables, the problem of determining the network topology in multi-device ad hoc networks is solved, enabling normal communication between devices and optimizing network adaptability.
Patent Information
- Application Number
- CN202210565229.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-23
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2042-05-23
AI Technical Summary
In multi-device self-organizing networks, communication between devices requires the use of relay routing to transmit data, but existing technologies have failed to effectively determine the network topology, leading to abnormal communication.
By listening to heartbeat frames, a routing table is built to determine the routing information between devices. After a preset time has elapsed, the final routing table is determined, the network topology is updated, and the master device allocates time-frequency resources to send heartbeat frames to avoid resource contention.
To ensure normal communication between devices, optimize channel code rate allocation and dynamic power consumption control, adapt to rapid changes in network topology, and reduce additional latency and routing protocol overhead.
Smart Images

Figure CN117155828B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication, and in particular to a method and apparatus for establishing a routing table. Background Technology
[0002] Multiple terminal devices communicating in unlicensed frequency bands can form an ad hoc network. This ad hoc network can support long-distance multi-hop communication between different terminal devices. For example, in the ad hoc network, terminal devices with relay functions can realize unicast, multicast, broadcast and real-time voice communication services between devices in the group for text, voice, and files.
[0003] In a multi-device ad hoc network, the device receiving services and the device sending services may not be directly connected at the link layer. Communication between the two devices requires other devices in the ad hoc network to act as relay routes to transmit data. In this case, each device in the ad hoc network needs to learn and continuously refresh the network topology to ensure normal communication between devices.
[0004] Therefore, there is an urgent need for a method to establish routing tables, determine the network topology, and ensure normal communication between devices. Summary of the Invention
[0005] This application provides a method and apparatus for establishing a routing table, which can determine the network topology and help ensure normal communication between devices.
[0006] In a first aspect, this application provides a method for establishing a routing table, applied to an ad hoc network architecture including multiple devices. The method includes: each of the multiple devices listening to a first heartbeat frame, the first heartbeat frame including first device information and / or first routing information; each device determining routing information from each device to other devices based on the first heartbeat frame and storing it in a routing table; each device determining whether a preset time has elapsed, the preset time being the duration for which each device listens to the first heartbeat frame; if the preset time has elapsed, each device determining the routing table as the target routing table.
[0007] Each of the multiple devices can listen to the first heartbeat frame or send the first heartbeat frame.
[0008] It should be noted that each device can only listen to the first heartbeat frame sent by its neighboring device, and correspondingly, the first heartbeat frame sent by each device can only be listened to by the connected device.
[0009] The first heartbeat frame can be understood as a single-hop heartbeat frame or a multi-hop heartbeat frame; this application embodiment does not limit this. When the first heartbeat frame includes first device information, it can be understood as a single-hop heartbeat frame. When the first heartbeat frame includes first routing information, it can be understood as a multi-hop heartbeat frame. A single-hop heartbeat frame is used to maintain the status of neighboring devices that are reachable in a single hop. A multi-hop heartbeat frame is used to provide its own routing information to neighboring devices to help them establish multi-hop routing information relayed through that device.
[0010] The preset duration can be referred to as the duration of the heartbeat cycle, but this application does not limit this.
[0011] Before the preset timeout period is reached, the routing table can be called a temporary routing table. After the preset timeout period is reached, the routing table can be called a final routing table or a destination routing table.
[0012] The routing table establishment method provided in this application obtains device information and routing information by listening to the first heartbeat frame, constructs the routing table, and determines the network topology, which helps to ensure normal communication between devices.
[0013] In conjunction with the first aspect, in some implementations of the first aspect, the above method further includes: if the preset time has not been reached, each device continues to listen for the first heartbeat frame; each device updates the information in the routing table according to the first heartbeat frame until the preset time has been reached.
[0014] The routing table establishment method provided in this application continuously listens for the first heartbeat frame before the preset time expires, continuously updates the routing table, and continuously refreshes the connection relationship between devices in the ad hoc network on the link, which helps to ensure the normal communication between devices.
[0015] In conjunction with the first aspect, in some implementations of the first aspect, the multiple devices include a first device and a second device, and the first heartbeat frame includes device information of the second device; wherein, each of the multiple devices listens to the first heartbeat frame, including: the first device listens to the first heartbeat frame from the second device; each device determines routing information from each device to other devices based on the first heartbeat frame and stores it in a routing table, including: the first device determines routing information from the first device to the second device based on the first heartbeat frame and stores it in the routing table.
[0016] If the first device is called a device, then the second device can be called another device.
[0017] The first heartbeat frame includes the device information of the second device, so it can be understood as a single-hop heartbeat frame. When the first device listens to a single-hop heartbeat frame from the second device, it can determine that the first device and the second device are directly connected at the link layer and can communicate directly.
[0018] The routing table establishment method provided in this application can establish routing information between connected devices when the first heartbeat frame includes device information, which is beneficial to ensuring communication between connected devices.
[0019] In conjunction with the first aspect, in some implementations of the first aspect, the device information of the second device includes the device name and the device address of the second device; the routing information from the first device to the second device includes the device name, the device address of the second device, and the number of hops required from the first device to the second device, wherein the number of hops from the first device to the second device is 1.
[0020] In conjunction with the first aspect, in some implementations of the first aspect, the multiple devices include a first device, a second device, and a third device, and the first heartbeat frame includes routing information of the third device; wherein, each of the multiple devices listens to the first heartbeat frame, including: the first device listens to the first heartbeat frame from the second device; each device determines routing information from each device to other devices based on the first heartbeat frame and stores it in a routing table, including: the first device determines routing information from the first device to the third device based on the first heartbeat frame and stores it in the routing table.
[0021] The first heartbeat frame includes routing information for the third device, so it can be understood as a multi-hop heartbeat frame. When the first device listens to the multi-hop heartbeat frame from the second device, it can determine that the first device can reach the third device via the second device and communicate with the third device, thus obtaining the routing information from the first device to the third device.
[0022] The routing table establishment method provided in this application can establish routing information between connected devices and non-adjacent devices when the first heartbeat frame includes the routing information of the device, which is beneficial to ensuring normal communication between devices.
[0023] In conjunction with the first aspect, in some implementations of the first aspect, the routing information of the third device includes the device name of the third device, the device address of the third device, and the number of hops required from the second device to the third device; the routing information from the first device to the third device includes the device name of the third device, the device address of the third device, the device address of the second device, and the number of hops required from the first device to the third device.
[0024] In conjunction with the first aspect, in some implementations of the first aspect, the multiple devices include a first device, a second device, and a third device, and the first heartbeat frame includes device information of the second device and routing information of the third device; wherein, each of the multiple devices listens to the first heartbeat frame, including: the first device listens to the first heartbeat frame from the second device; each device determines routing information from each device to other devices based on the first heartbeat frame and stores it in a routing table, including: the first device stores routing information from the first device to the second device and routing information from the first device to the third device in the routing table based on the first heartbeat frame.
[0025] The first heartbeat frame includes device information from the second device and routing information from the third device, thus it can be understood as a multi-hop heartbeat frame. When the first device listens to the multi-hop heartbeat frame from the second device, it can determine that it can reach the third device via the second device and communicate with the third device, thus obtaining the routing information from the first device to the third device. It can also determine that the first device and the second device are directly connected at the link layer and can communicate directly.
[0026] The routing table establishment method provided in this application can establish routing information between connected devices and non-adjacent devices, as well as routing information between connected devices, when the first heartbeat frame includes routing information and device information. This is beneficial for ensuring normal communication between devices.
[0027] In conjunction with the first aspect, in some implementations of the first aspect, the above method further includes: each device acquiring time-frequency resources; each device using the time-frequency resources to send a second heartbeat frame, the second heartbeat frame including second device information and / or second routing information.
[0028] The time-frequency resources acquired by each device are sent by the master device. The master device is a device in the ad hoc network architecture. After a device connects to the network, it can receive the time-frequency resources allocated by the master device, which are used to send the second heartbeat frame.
[0029] It should be noted that multiple devices include the master device. The master device can send time and frequency resources to other devices, and can also reserve time and frequency resources for itself to send a second heartbeat frame.
[0030] It should be understood that in this application, the heartbeat frame sent by the device is called the second heartbeat frame, and the heartbeat frame received by the device is called the first heartbeat frame, but the embodiments of this application are not limited thereto.
[0031] The second heartbeat frame can be a single-hop heartbeat frame or a multi-hop heartbeat frame; this application embodiment does not limit this. The device can send single-hop heartbeat frames and multi-hop heartbeat frames on time-frequency resources. If the device does not support relay, it may not send multi-hop heartbeat frames on time-frequency resources to reduce power consumption and save resources.
[0032] The heartbeat frame transmission method provided in this application utilizes time-frequency resources uniformly allocated by the master device. Online devices transmit heartbeat frames according to the allocated time-frequency resources, which can avoid resource contention and help ensure normal communication between devices.
[0033] In conjunction with the first aspect, in some implementations of the first aspect, the time-frequency resource is one time slot.
[0034] In conjunction with the first aspect, in some implementations of the first aspect, one time slot is the time slot in the last frame of one slice.
[0035] Secondly, this application provides a routing table establishment apparatus, including a listening module and a processing module. The listening module is configured to: listen to a first heartbeat frame, the first heartbeat frame including first device information and / or first routing information; the processing module is configured to: determine routing information from the establishment device to other devices based on the first heartbeat frame, and store it in the routing table; determine whether a preset time has elapsed, the preset time being the duration for which the establishment device listens to the first heartbeat frame; and, if the preset time has elapsed, determine the routing table as the target routing table.
[0036] In conjunction with the second aspect, in some implementations of the second aspect, the listening module is also used to: continue listening to the first heartbeat frame if the preset time has not been reached; the processing module is also used to: update the information in the routing table according to the first heartbeat frame until the preset time has been reached.
[0037] In conjunction with the second aspect, in some implementations of the second aspect, the first heartbeat frame includes device information of the second device; wherein, the listening module is further configured to: listen for the first heartbeat frame from the second device;
[0038] The processing module is also used to: determine the routing information from the establishment device to the second device based on the first heartbeat frame, and store it in the routing table.
[0039] In conjunction with the second aspect, in some implementations of the second aspect, the device information of the second device includes the device name and the device address of the second device; the routing information from the establishing device to the second device includes the device name, the device address of the second device, and the number of hops required from the establishing device to the second device, wherein the number of hops from the establishing device to the second device is 1.
[0040] In conjunction with the second aspect, in some implementations of the second aspect, the first heartbeat frame includes routing information of the third device; wherein, the listening module is further configured to: listen for the first heartbeat frame from the second device; and the processing module is further configured to: determine the routing information from the establishment device to the third device based on the first heartbeat frame, and store it in the routing table.
[0041] In conjunction with the second aspect, in some implementations of the second aspect, the routing information of the third device includes the device name of the third device, the device address of the third device, and the number of hops required from the second device to the third device; the routing information from the establishment device to the third device includes the device name of the third device, the device address of the third device, the device address of the second device, and the number of hops required from the establishment device to the third device.
[0042] In conjunction with the second aspect, in some implementations of the second aspect, the first heartbeat frame includes device information of the second device and routing information of the third device; wherein, the listening module is further configured to: listen for the first heartbeat frame from the second device; and the processing module is further configured to: store the routing information from the establishment device to the second device and the routing information from the establishment device to the third device in the routing table according to the first heartbeat frame.
[0043] In conjunction with the second aspect, in some implementations of the second aspect, the establishment device further includes a sending module; the processing module is further configured to: acquire time-frequency resources; the sending module is further configured to: send a second heartbeat frame using the time-frequency resources, the second heartbeat frame including second device information and / or second routing information.
[0044] In conjunction with the second aspect, in some implementations of the second aspect, the time-frequency resource is one time slot.
[0045] In conjunction with the second aspect, in some implementations of the second aspect, one time slot is the time slot in the last frame of one slice.
[0046] Thirdly, this application provides a routing table creation apparatus, including a processor coupled to a memory, which can be used to execute instructions in the memory to implement the method in any of the possible implementations of the first aspect described above. Optionally, the routing table creation apparatus further includes a memory. Optionally, the routing table creation apparatus further includes a transceiver, with the processor coupled to the transceiver.
[0047] Fourthly, this application provides a processor, including: an input circuit, an output circuit, and a processing circuit. The processing circuit is used to receive signals through the input circuit and transmit signals through the output circuit, causing the processor to execute the method in any of the possible implementations of the first aspect described above.
[0048] In specific implementation, the processor can be a chip, the input circuit can be input pins, the output circuit can be output pins, and the processing circuit can be transistors, gate circuits, flip-flops, and various logic circuits. The input signal received by the input circuit can be received and input by, for example, but not limited to, a receiver, and the signal output by the output circuit can be, for example, but not limited to, output to and transmitted by a transmitter. Furthermore, the input circuit and the output circuit can be the same circuit, which is used as both the input circuit and the output circuit at different times. This application does not limit the specific implementation of the processor and various circuits.
[0049] Fifthly, this application provides a processing apparatus, including a processor and a memory. The processor is used to read instructions stored in the memory and can receive signals via a receiver and transmit signals via a transmitter to execute the method in any of the possible implementations of the first aspect described above.
[0050] Optionally, there may be one or more processors and one or more memories.
[0051] Alternatively, the memory can be integrated with the processor, or the memory can be set up separately from the processor.
[0052] In the specific implementation process, the memory can be a non-transitory memory, such as read-only memory (ROM), which can be integrated with the processor on the same chip or set on different chips. This application does not limit the type of memory or the way the memory and processor are set.
[0053] It should be understood that the relevant data interaction process, such as sending indication information, can be the process of outputting indication information from the processor, and receiving capability information can be the process of the processor receiving input capability information. Specifically, the processed output data can be output to the transmitter, and the input data received by the processor can come from the receiver. Here, the transmitter and receiver can be collectively referred to as a transceiver.
[0054] The processing device in the fifth aspect above can be a chip. The processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. The memory can be integrated into the processor or located outside the processor and exist independently.
[0055] In a sixth aspect, this application provides a computer-readable storage medium storing a computer program (also referred to as code or instructions) that, when run on a computer, causes the computer to perform the method in any of the possible implementations of the first aspect described above.
[0056] In a seventh aspect, this application provides a computer program product comprising: a computer program (also referred to as code or instructions) that, when run, causes a computer to perform the method in any of the possible implementations of the first aspect described above. Attached Figure Description
[0057] Figure 1 This is a schematic diagram of a self-organizing network architecture;
[0058] Figure 2 A schematic flowchart illustrating a method for establishing a routing table as provided in an embodiment of this application;
[0059] Figure 3 This is a schematic diagram of another self-organizing network architecture;
[0060] Figure 4 A schematic flowchart illustrating a method for sending heartbeat frames provided in an embodiment of this application;
[0061] Figure 5 A schematic diagram of a slice provided in an embodiment of this application;
[0062] Figure 6 A schematic diagram illustrating time-frequency resource allocation provided in an embodiment of this application;
[0063] Figure 7 A schematic diagram illustrating another time-frequency resource allocation provided in an embodiment of this application;
[0064] Figure 8 This is a schematic diagram of yet another self-organizing network architecture;
[0065] Figure 9 A schematic block diagram of a routing table creation apparatus provided in an embodiment of this application;
[0066] Figure 10 A schematic block diagram of another routing table creation apparatus provided in an embodiment of this application. Detailed Implementation
[0067] The technical solutions in this application will now be described with reference to the accompanying drawings.
[0068] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. For example, "first device" and "second device" are used to distinguish different devices and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" do not necessarily imply that they are different.
[0069] It should be noted that, in this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0070] Furthermore, "at least one" refers to one or more, while "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b, and c, where a, b, and c can be single or multiple.
[0071] Multiple terminal devices communicating in unlicensed frequency bands can form an ad hoc network, where the terminal devices can be mobile portable terminals. In this case, each terminal device in the ad hoc network performs both router and host functions. As a host, the terminal device needs to run various user-facing applications, such as editors and browsers; as a router, the terminal device needs to run the corresponding routing protocol and perform data packet forwarding and route maintenance according to routing policies and routing tables. Therefore, each terminal device is required to have a suitable routing protocol.
[0072] The goal of ad hoc network routing protocols is to be fast, accurate, and efficient. They require finding accurate and usable routing information in the shortest possible time and to adapt to rapid changes in network topology. At the same time, they should reduce the additional latency and control information introduced to maintain routes, and reduce the overhead of routing protocols to meet the limitations of mobile terminal computing power, storage space, and power supply.
[0073] To better understand the embodiments of this application, the self-organizing network architecture to which the embodiments of this application are applicable will be introduced first.
[0074] For example, Figure 1 A schematic diagram of a self-organizing network 100 is shown. (For example...) Figure 1 As shown, the self-organizing network 100 includes terminal device 101, terminal device 102, terminal device 103, terminal device 104, and terminal device 105. Terminal device 103 and terminal device 104 have relay functions. The number of terminal devices is merely an example, and this embodiment does not limit the number of devices.
[0075] In this self-organizing network architecture 100, there are devices that are directly connected on the link and devices that are not directly connected on the link. For example, the directly connected devices include: terminal device 101 and terminal device 103, terminal device 102 and terminal device 103, terminal device 105 and terminal device 104, terminal device 103 and terminal device 104, etc. The devices that are not directly connected include: terminal device 102 and terminal device 105, terminal device 102 and terminal device 104, terminal device 101 and terminal device 105, terminal device 101 and terminal device 104, etc.
[0076] If terminal device 102 is a service transmitting device and terminal device 105 is a service receiving device, terminal device 102 needs to determine the network topology in the ad hoc network architecture 100, i.e., the connection relationship of each terminal device, in order to ensure the transmission of service data. Terminal device 102 can transmit service data to terminal device 105 through terminal devices 103 and 104. Specifically, terminal device 102 needs to first send the service data to terminal device 103, then terminal device 103 sends the service data to terminal device 104, and finally terminal device 104 sends it to terminal device 105.
[0077] In this communication method, each terminal device in the self-organizing network architecture 100 needs to learn and continuously refresh the network topology, that is, update the connection relationship of each device in real time to ensure normal communication between devices.
[0078] In view of this, embodiments of this application provide a method and apparatus for establishing a routing table, which can determine the network topology and help ensure normal communication between devices.
[0079] The routing table establishment method provided in this application embodiment can meet various service requirements, such as mobile devices, narrowband communication, long-distance transmission, and services that need to support low-power emergency rescue. The self-organizing network using this method can optimize channel code rate allocation, dynamic power consumption control, network device access and authentication process, heartbeat routing mechanism, time slot resource allocation, logical channel allocation, device role conversion within the network, low-power emergency rescue process, and frequency hopping mechanism. This makes the self-organizing network different from other protocols, such as WiFi neighbor awareness networking (NAN), Apple wireless direct link (AWDL), Bluetooth low energy (BLE) mesh network, Zigbee protocol, etc., and better complete the predetermined services under the aforementioned constraints.
[0080] Figure 2 This is a schematic diagram of a routing table establishment method 200 provided in an embodiment of this application. Method 200 can be applied to the above... Figure 1 The self-organizing network architecture shown is not limited to this embodiment. The method 200 can be executed by any device in the self-organizing network architecture, for example, the one described above. Figure 1 The terminal devices 101, 102, 103, 104, or 105 shown are referred to as the first device for ease of description.
[0081] like Figure 2 As shown, the method 200 may include the following steps:
[0082] S201, Listening to heartbeat frames.
[0083] The heartbeat frame can also be called the first heartbeat frame, but this application does not limit it in the embodiments.
[0084] The first device is an online device in the ad hoc network architecture, capable of listening to heartbeat frames sent by other devices in real time. While any online device in the ad hoc network architecture can send heartbeat frames, the first device can only listen to the heartbeat frames of its neighboring devices. Therefore, the aforementioned "other devices" refer to devices adjacent to the first device.
[0085] For example, in the above Figure 1 In the self-organizing network architecture shown, terminal device 102 can listen to the heartbeat frames sent by terminal device 103, and terminal device 103 can listen to the heartbeat frames sent by terminal device 101, terminal device 102 and terminal device 104.
[0086] The first device can be used to monitor heartbeat frames in real time or periodically; this application does not limit this.
[0087] When the first device listens to heartbeat frames in real time, it can avoid missing heartbeat frames and obtain information in real time, which helps to ensure that no information is missed.
[0088] When the first device periodically listens for heartbeat frames, its power consumption can be reduced.
[0089] The number of heartbeat frames that the first device can listen to can be one or more, and this application embodiment does not limit this.
[0090] The heartbeat frames monitored by the first device can be either single-beat or multi-beat frames.
[0091] Single-hop heartbeat frames are used to maintain the status of neighboring devices that are reachable within a single hop. Multi-hop heartbeat frames are used to provide routing information to neighboring devices to help them establish multi-hop routes relayed through that device.
[0092] S202. Based on the heartbeat frame, construct a temporary routing table.
[0093] A temporary routing table refers to a routing table whose information may be updated at any time. It can also be understood as a network topology that may be updated at any time. In this case, the information in the routing table or the network topology is temporary.
[0094] If the first device receives a single-hop heartbeat frame from another device, it can be determined that the first device and the other device are directly connected at the link layer and can communicate directly. That is, the routing information from the first device to the other device is obtained, and a temporary routing table is built and stored in the temporary routing table.
[0095] If the first device receives a multi-hop heartbeat frame from another device, it can determine that the first device can reach other terminal devices via another terminal device and communicate with other terminal devices. That is, it obtains the routing information from the first device to other devices, builds a temporary routing table, and stores the routing information in the temporary routing table.
[0096] The temporary routing table may contain multiple routes to the same device or a single route to the same device. This application does not limit this.
[0097] S203. Determine whether the duration of the heartbeat cycle has been reached.
[0098] After constructing a temporary routing table based on the monitored heartbeat frames, the first device can determine whether the heartbeat cycle duration has been reached. If the heartbeat cycle duration has been reached, the first device can execute S204. If the heartbeat cycle duration has not been reached, the first device can execute S201, that is, continue monitoring heartbeat frames. It should be understood that the first device can monitor heartbeat frames within the heartbeat cycle duration, and the heartbeat cycle duration is preset.
[0099] For example, the heartbeat cycle can last for 10 seconds. During these 10 seconds, the first device listens for heartbeat frames. If the first device detects heartbeat frame 1 at 3 seconds and constructs a temporary routing table, this temporary routing table may include one route entry. The first device can then continue listening for heartbeat frames. If the first device detects heartbeat frame 2 at 5 seconds and updates the temporary routing table based on heartbeat frame 2, this temporary routing table may include two route entries. The first device can then continue listening for heartbeat frames until the 10-second period expires.
[0100] S204. Determine the final routing table based on the temporary routing table.
[0101] When the heartbeat cycle duration is reached, the first device can determine the final routing table based on the temporary routing table and preset rules. The preset rules may include deleting routing information that has not been updated within the preset duration and / or routing information that exceeds the maximum hop count.
[0102] Optionally, in the final routing table, there may be only one path for data transmission between the two devices, namely the optimal data transmission path.
[0103] For example, Figure 3 A schematic diagram of a self-organizing network architecture is shown, which includes devices A, B, C, D, E, F, G, and H. After listening for one heartbeat cycle, device A has three routing paths from device A to device E in its temporary routing table: a path through device F, a path through device B, and a path through device H. Device A can determine the optimal path from device A to device E based on factors such as hop count length and channel state information.
[0104] For example, device A can determine the path with the shortest hop count as the optimal path between device A and device E. In this case, device A needs to calculate the hop count for each of the three paths. The hop count from device A to device E via device F is 4, the hop count from device A to device E via device B is 4, and the hop count from device A to device E via device H is 2. This path has the shortest hop count, so the final routing table can include the path from device A to device E via device H.
[0105] Optionally, after determining the final routing table, the first device enters the next heartbeat cycle and can continue to execute S201 to S204 in the next heartbeat cycle, that is, it can listen for heartbeat frames, create a temporary routing table, and determine the final routing table in the next cycle.
[0106] It should be noted that each heartbeat cycle determines a final routing table. Two adjacent heartbeat cycles (the first and second heartbeat cycles, respectively) can determine two final routing tables. Therefore, after the second heartbeat cycle ends, the first device can update the final routing table determined in the first heartbeat cycle based on the final routing table determined in the second heartbeat cycle. The update timing can be within 1 millisecond after each heartbeat cycle, so the update timing is t = t1 + 1. Here, mod(t1, T_slice*N) = , where N is the heartbeat cycle (the unit can be a slice). It should be understood that t and t1 are in milliseconds.
[0107] The routing table establishment method provided in this application obtains routing information by listening to heartbeat frames, constructs a routing table, determines the network topology, and periodically updates the routing information to continuously refresh the connection relationship between devices in the ad hoc network on the link, which helps to ensure the normal communication between devices.
[0108] The above describes how any device in an ad hoc network architecture can listen to heartbeat frames. This application also provides a method for sending heartbeat frames.
[0109] Figure 4 A schematic flowchart of a heartbeat frame transmission method 400 is shown. This method 400 can be executed by any network-connected device and can be applied to the above-mentioned... Figure 1 The self-organizing network architecture shown is not limited to this embodiment. For ease of description, the entity executing method 400 is referred to as the first device.
[0110] like Figure 4 As shown, the method 400 may further include the following steps:
[0111] S401, Accessing the network.
[0112] The first device connects to the network, that is, it joins the self-organizing network architecture.
[0113] There are several possible ways to enable the first device to access the network.
[0114] In one possible implementation, the user enables either the Wi-Fi or cellular network option on a page provided by the first device, and the first device responds to the user's action by accessing the network.
[0115] In another possible implementation, the first device detects that the current state meets the networking conditions and automatically connects to the network.
[0116] S402, Obtain the time and frequency resources allocated by the master device.
[0117] The master device is a device in the ad hoc network architecture. After the first device connects to the network, it can receive time-frequency resources allocated by the master device, which are used to send heartbeat frames.
[0118] S403, Send heartbeat frames on time-frequency resources.
[0119] The heartbeat frame can also be called the second heartbeat frame, but this application does not limit it in the embodiments.
[0120] The heartbeat frame can be a single-beat heartbeat frame or a multi-beat heartbeat frame; this application does not limit this.
[0121] The first device can send single-hop heartbeat frames and multi-hop heartbeat frames on time-frequency resources. If it is a device that does not support relay, it can choose not to send multi-hop heartbeat frames on time-frequency resources to reduce power consumption and save resources.
[0122] The heartbeat frame transmission method provided in this application embodiment uses time and frequency resources that are uniformly allocated by the master device. Online devices transmit heartbeat frames according to the allocated time and frequency resources, which can avoid the problem of resource contention and help ensure the normal operation of communication between devices.
[0123] It should be noted that in a self-organizing network architecture, all online devices can send single-hop heartbeat frames. Among the online devices, those that support relay can all send multi-hop heartbeat frames, while devices that do not support relay can choose to send or not send multi-hop heartbeat frames.
[0124] This application also provides frame structure designs for the single-hop heartbeat frame and the multi-hop heartbeat frame described above.
[0125] A single-hop heartbeat frame can include information such as frame control, cluster ID, source address, device name, paging location, maximum hop count, number of multi-hop heartbeat frames (Multi Heart best Num), channel status, number of valid route Info (Valid Route Info Num), route Info, and frame check sequences (FCS). The channel status, also known as the working status, indicates the channel occupancy.
[0126] Among them, frame control can occupy 2 bytes, cluster identifier can occupy 1 byte, source address can occupy 1 byte, device name can occupy 5 bytes, paging location can occupy 1 byte, maximum hop count can occupy 0.5 bytes, number of multi-hop heartbeat frames can occupy 0.5 bytes, channel status can occupy 13 bytes, number of valid routing information can occupy 1 byte, routing information can occupy 3*7=21 (3 routing information, each routing information occupies 7 bytes) bytes, FCS can occupy 2 bytes, so the length of a single-hop heartbeat frame can be controlled to 48 bytes.
[0127] The frame structure of a single-beat heartbeat frame can be shown in Table 1.
[0128] Table 1
[0129]
[0130] In a single-hop heartbeat frame, information related to the establishment of the routing table includes the source address, device name, maximum hop count, number of multi-hop heartbeat frames, number of valid routing information, and routing information. Upon receiving this single-hop heartbeat frame, the first device can obtain the address and name of the device that sent the frame, the maximum supported hop count, the number of multi-hop heartbeat frames it can send, and, based on the number of valid routing information, retrieve valid routing information from the routing information.
[0131] Optionally, among the information related to the establishment of the routing table mentioned above, the single heartbeat frame may only include the source address and device name, while other information is added to increase resource utilization so as to transmit more information in a limited number of bytes.
[0132] A multi-hop heartbeat frame can include information such as frame control, cluster identifier, source address, number of valid route information (ValidRoute Info Num), route information (Route Info), and frame check sequences (FCS).
[0133] Among them, frame control can occupy 2 bytes, cluster identifier can occupy 1 byte, source address can occupy 0.5 bytes, number of valid routing information can occupy 0.5 bytes, routing information can occupy 6*7=42 (6 routing information, each routing information occupies 7 bytes) bytes, FCS can occupy 2 bytes, so the length of multi-hop heartbeat frame can be controlled at 48 bytes.
[0134] The frame structure of a multi-beat heartbeat frame can be shown in Table 2.
[0135] Table 2
[0136] Field Name Frame Control Cluster identifier Source address Number of valid routing information Routing information FCS byte count 2 1 0.5 0.5 6*7 2
[0137] In a multi-hop heartbeat frame, information related to the establishment of the routing table includes the source address, the number of valid routing entries, and the routing information itself. Upon receiving the multi-hop heartbeat frame, the first device can obtain the address of the device that sent the frame and retrieve valid routing information from the routing information based on the number of valid routing entries.
[0138] It should be noted that when a single-hop heartbeat frame includes routing information, it can alleviate the pressure of multi-hop heartbeat frames carrying routing information, which is beneficial for determining the network topology more quickly.
[0139] For example, in an ad hoc network architecture, each device can include 15 routing information entries. If a single-hop heartbeat frame can include 3 routing information entries and a multi-hop heartbeat frame can include 6 routing information entries, then each device can send 1 single-hop heartbeat frame and 2 multi-hop heartbeat frames (i.e., 3 + 2 * 6 = 15). If the single-hop heartbeat frame does not include routing information, and the multi-hop heartbeat frame can include 6 routing information entries, then each device needs to send 1 single-hop heartbeat frame and 3 multi-hop heartbeat frames, which requires sending one more multi-hop heartbeat frame compared to the method where the single-hop heartbeat frame includes routing information.
[0140] If a single-hop heartbeat frame includes routing information, the structure of the routing information in single-hop and multi-hop heartbeat frames can be the same. The routing information can include device name, device address, hop count, and channel status, among other things. Specifically, the device name can occupy 5 bytes, the device address can occupy 1 byte, the hop count can occupy 0.5 bytes, and the channel status can occupy 0.5 bytes, resulting in a single routing information entry occupying 7 bytes.
[0141] The information structure of routing information can be shown in Table 3.
[0142] Table 3
[0143] Field Name Equipment Name Device address Number of jumps Channel state byte count 5 1 0.5 0.5
[0144] Based on the single-hop heartbeat frames shown in Table 1 and the multi-hop signal frames shown in Table 2, the routing table constructed by the first device may include information such as device name, device address, forwarding address, hop count, channel status, update time, and paging location. Among these, the channel status and paging location are optional.
[0145] For example, in the above Figure 3 In the self-organizing network architecture shown, the routing information corresponding to the path from device A to device E via device F may include: device name of device E, device address of device E, device address of device F, hop count of 4, channel state of 3, update time of T1, and paging location of 13.
[0146] The routing information corresponding to the path from device A to device E via device H may include: device name of device E, device address of device E, device address of device H, hop count of 2, channel state of 0, update time of T2, and paging location of 28.
[0147] The information structure of the routing table can be shown in Table 4.
[0148] Table 4
[0149]
[0150] Under the constraints of narrowband self-organizing networks, this application provides a method for calculating the heartbeat period. The method provided in this application is based on a heartbeat frame length of 48 bytes and is merely an example; this application is not limited to this.
[0151] If the length of a heartbeat frame (single-hop and multi-hop heartbeat frames) is controlled at 48 bytes, then in a preset 2 Mbps narrowband system, at a code rate of 1 / 12, a heartbeat frame can be completed within a 4 millisecond (ms) time slot. Here, 1 byte equals 8 bits, and an orthogonal frequency division multiplexing (OFDM) symbol has 52 subcarriers for data transmission. Therefore, the number of OFDM symbols required to transmit one heartbeat frame is 48 * 8 / (1 / 12) / 52 = 88.62. 1 ms includes 25 OFDM symbols, so the time required to transmit one heartbeat frame is 3.54 ms. Therefore, any time slot longer than 3.54 ms can transmit a heartbeat frame; 4 ms is merely an example, and this application is not limited to this.
[0152] Given the constraint that the heartbeat frame length is controlled within 48 bytes, a single-hop heartbeat frame, in addition to the bytes occupied by its own status information, can carry 3 routing information entries, as shown in Table 1 above. A multi-hop heartbeat frame can carry 6 routing information entries, as shown in Table 2 above.
[0153] In a self-organizing network with 16 devices, each device can have routing information from a maximum of 15 other devices. Therefore, each device needs a maximum of 3 heartbeat frames to completely send its own routing information in one heartbeat cycle, which consists of 1 single-hop heartbeat frame + 2 multi-hop heartbeat frames (i.e., 3 + 2 * 6 = 15).
[0154] A heartbeat frame transmission takes 4ms, and 4 slots = 16ms, so it can be carried on 1 time slot. Each of the 16 devices needs to transmit 3 heartbeat frames, and these 3 heartbeat frames can be carried on 3 time slots respectively. Therefore, the heartbeat frames of the 16 devices can be carried on 16*3=48 time slots respectively.
[0155] Assuming 1 slice = 32 frames = 512 milliseconds, that is, 1 slice = 32 frames = 512 ms, and 1 frame = 4 slots = 16 milliseconds, that is, 1 frame = 4 slots = 16 ms, then we can get 1 slice = 32 frames = 128 slots = 512 ms.
[0156] Figure 5 A schematic diagram of slice 1 is shown. (As shown) Figure 1 As shown, one slice is 512ms, which can include four 128ms segments: 128ms-0, 128ms-1, 128ms-2, and 128ms-3. Each of the four 128ms segments includes eight frames, so one slice can include 32 frames, from frame 0 to frame 31.
[0157] Of these, the last frame (frame 31) can be used to broadcast the heartbeat frame. 1 frame = 4 slots, meaning the last 4 slots can be used to broadcast the heartbeat frame. If 4 slots in one slice are used to broadcast the heartbeat frame, then 48 slots can be broadcast. Therefore, 48 / 4 = 12 slices can be used, and the duration of one heartbeat cycle can be 12 * 512 = 6144 ms. 1 second = 1000 milliseconds, meaning 1 second = 1000 ms, so the duration of one heartbeat cycle can be 6.144 seconds.
[0158] In summary, in a self-organizing network with 16 devices, each device can have routing information from up to 15 other devices. To ensure the broadcasting and listening of heartbeat frames, the duration of one heartbeat cycle can be 6.144 seconds (12 slices or 12*32*4 time slots).
[0159] It should be noted that if the preset heartbeat cycle length of the devices in the self-organizing network is 6.144s, it is only applicable to scenarios where there are 16 or fewer devices in the self-organizing network, which can meet the needs of broadcasting and listening to heartbeat frames.
[0160] Optionally, the duration of one heartbeat cycle can also be 10.24 seconds (20 slices or 20*32*4 time slots). The first 6.144 seconds, or the first 48 time slots, can be used for 16 devices to broadcast heartbeat frames. The remaining 4.096 seconds (10.24-6.144), or the last 32 time slots, can be used for dynamic resource allocation. This approach allows for the broadcasting of heartbeat frames from newly connected devices within the ad hoc network, enabling the network to accommodate more devices, increasing flexibility, and broadening its application scenarios.
[0161] The heartbeat cycle duration in the above method 200 can be preset to 6.144s or 10.24s, and this application embodiment does not limit it.
[0162] It should be noted that in the above method 200, the preset heartbeat cycle duration can save computation and reduce the power consumption of the devices compared to calculating the heartbeat cycle in real time based on the number of devices in the ad hoc network.
[0163] Devices in a self-organizing network can also calculate the heartbeat cycle in real time according to the above process. The heartbeat cycle can be adjusted in a timely manner according to the number of devices in the self-organizing network, which helps to save time and frequency resources and avoid waste.
[0164] Based on the aforementioned heartbeat cycle time-frequency resources, this application also provides various methods for allocating time-frequency resources.
[0165] In a self-organizing network with 16 devices, the heartbeat cycle duration is 12 slices. The last 4 time slots (i.e. the last frame) of these 12 slices are used to broadcast the heartbeat frame. Therefore, the 12 slices can include 48 time slots for broadcasting the heartbeat frame. These 48 time slots are used to broadcast the heartbeat frames of the 16 devices. There are multiple implementation methods for the specific allocation.
[0166] It should be noted that in a self-organizing network, the master device is used to allocate time and frequency resources to each device in the network; therefore, the master device is the main body responsible for implementing the resource allocation method.
[0167] Figure 6 A schematic diagram of time-frequency resource allocation is shown. For example... Figure 6 As shown, the 12 slices can be slice 0 to slice 11 respectively. The last frame, i.e., frame 31, is used in each of slices 0 to slice 11 to broadcast the heartbeat frame.
[0168] The master device can use the four time slots comprising the 31 frames of slice 0 to broadcast one single-hop heartbeat frame and two multi-hop heartbeat frames for device 1, and one single-hop heartbeat frame for device 2, respectively. Similarly, the master device can use the four time slots comprising the 31 frames of slice 1 to broadcast two multi-hop heartbeat frames for device 2, and one single-hop heartbeat frame and one multi-hop heartbeat frame for device 3. And so on. The four time slots comprising the 31 frames of slice 10 are used to broadcast two multi-hop heartbeat frames for device 14, and one single-hop heartbeat frame and one multi-hop heartbeat frame for device 15, respectively. The four time slots comprising the 31 frames of slice 11 are used to broadcast one multi-hop heartbeat frame for device 15, and one single-hop heartbeat frame and two multi-hop heartbeat frames for device 16, respectively.
[0169] Figure 7 A schematic diagram of another time-frequency resource allocation is shown. For example... Figure 7 As shown, the 12 slices can be slice 0 to slice 11 respectively. The last frame, i.e., frame 31, is used in each of slices 0 to slice 11 to broadcast the heartbeat frame.
[0170] The master device can use the four time slots included in the 31 frames of slice 0 to broadcast single-hop heartbeat frames of devices 1 to 4 respectively; it can use the four time slots included in the 31 frames of slice 1 to broadcast single-hop heartbeat frames of devices 5 to 8 respectively; it can use the four time slots included in the 31 frames of slice 2 to broadcast single-hop heartbeat frames of devices 9 to 12 respectively; it can use the four time slots included in the 31 frames of slice 3 to broadcast single-hop heartbeat frames of devices 13 to 16 respectively; it can use the four time slots included in the 31 frames of slice 4 to broadcast the first multi-hop heartbeat frames of devices 1 to 14 respectively; it can use the four time slots included in the 31 frames of slice 5 to broadcast the first multi-hop heartbeat frames of devices 5 to 8 respectively; and so on. The four time slots included in the 31 frames of slice 11 can be used to broadcast the second multi-hop heartbeat frames of devices 13 to 16 respectively.
[0171] The routing table shown in the above method 200 refers to the routing table constructed by any device in the ad hoc network. This application embodiment also provides a process for all devices in the ad hoc network to complete the establishment of a routing table.
[0172] Figure 8 A schematic diagram of a self-organizing network architecture is shown. (For example...) Figure 8 As shown, the self-organizing network architecture includes five devices: device A, device B, device C, device D, and device E. Device A is directly connected to devices B, C, and D via links, while device D is directly connected to devices A and E via links. Devices A and D are relay devices.
[0173] The duration of the heartbeat cycle can be 10.24 seconds. A single-hop heartbeat frame may not carry routing information, while a multi-hop heartbeat frame may carry up to 6 routing information entries.
[0174] 1) During the first heartbeat cycle, devices A, B, C, D and E will all send single-hop heartbeat frames. The order in which these five devices send single-hop heartbeat frames is not limited.
[0175] The information in a single-hop heartbeat frame sent by device A includes: device A's device address (i.e., source address) and device A's device name (i.e., device name). The information in a single-hop heartbeat frame sent by device B includes: device B's device address and device B's device name. Other heartbeat frames follow the same principle and will not be elaborated further here.
[0176] Each of the five devices can also listen for heartbeat frames within this heartbeat cycle. Specifically, devices B, C, and D are connected to device A, and therefore can listen for single-hop heartbeat frames sent by device A. Correspondingly, device A can listen for single-hop heartbeat frames sent by devices B, C, and D.
[0177] Device C detects a single-hop heartbeat frame from device A and can construct a temporary routing table C1. Temporary routing table C1 includes one routing entry: device address of device A, device name of device A, and hop count of 1. Device B detects a single-hop heartbeat frame from device A and can construct a temporary routing table B1. Temporary routing table B1 includes one routing entry: device address of device A, device name of device A, and hop count of 1. Device D detects a single-hop heartbeat frame from device A and can construct a temporary routing table D1. Temporary routing table D1 includes one routing entry: device address of device A, device name of device A, and hop count of 1.
[0178] Device A receives single-hop heartbeat frames from devices B, C, and D, and can construct a temporary routing table A1. Temporary routing table A1 includes three routing entries: device address, device name, and hop count of 1 for device B; device address, device name, and hop count of 1 for device C; and device address, device name, and hop count of 1 for device D. The routing information in temporary routing table A1 can then be represented as shown in Table 5.
[0179] Table 5
[0180]
[0181] Device D is directly connected to device E on the link, so device D can listen to the single-hop heartbeat frames sent by E, and correspondingly, device E can listen to the single-hop heartbeat frames sent by device D.
[0182] Device D detects a single-hop heartbeat frame sent by device E and can add a routing entry to the temporary routing table D1: device address of device E, device name of device E, and hop count of 1. The routing information in the temporary routing table D1 at this time can be as shown in Table 6.
[0183] Table 6
[0184]
[0185] Device E listens to the single-hop heartbeat frame sent by device D and can build a temporary routing table E1. Temporary routing table E1 includes a routing information: device address of device D, device name of device D, and hop count of 1.
[0186] Therefore, after the first heartbeat cycle, device A's temporary routing table A1 includes routing information for devices B, C, and D; device D's temporary routing table D1 includes routing information for devices A and E. Devices B, C, and D's temporary routing tables each include routing information for device A. Device E's temporary routing table E1 includes routing information for device D.
[0187] After the first heartbeat cycle ends, temporary routing tables A1, B1, C1, D1, and E1 can be used as the final routing tables.
[0188] 2) During the second heartbeat cycle, devices B, C, and E are not relay devices and do not need to send multi-hop heartbeat frames. Devices A and D have relay functions and can send multi-hop heartbeat frames. There is no restriction on the order in which devices A and D send multi-hop heartbeat frames.
[0189] Devices B, C, and D are connected to device A, and therefore can listen to the multi-hop heartbeat frames sent by device A. Device C, upon hearing these frames, can construct a temporary routing table C2. Temporary routing table C2 includes two routing entries: device address of device B, device name of device B, device address (i.e., forwarding address) of device A, and a hop count of 2; and device address of device D, device name of device D, device address of device A, and a hop count of 2. Device B, also upon hearing these frames, can construct a temporary routing table B2. Temporary routing table B2 includes two routing entries: device address of device C, device name of device C, device address of device A, and a hop count of 2; and device address of device D, device name of device D, device address of device A, and a hop count of 2. Device D listens to the multi-hop heartbeat frame of device A and can build a temporary routing table D2. Temporary routing table D2 includes two routing information: device address of device C, device name of device C, device address of device A, and hop count of 2; device address of device B, device name of device B, device address of device A, and hop count of 2.
[0190] Device D is directly connected to both Device A and Device E on the link, so Device A and Device E can listen to D's multi-hop heartbeat frames. Device A, having listened to D's multi-hop heartbeat frames, can construct a temporary routing table A2. Temporary routing table A2 includes one routing entry: Device E's device address, Device E's device name, Device D's device address, and a hop count of 2.
[0191] Device E listens to the multi-hop heartbeat frame of D and can build a temporary routing table E2. Temporary routing table E2 includes a routing information: device address of device A, device name of device A, device address of device D, and hop count of 2.
[0192] After the second heartbeat cycle, device A can use temporary routing table A2 to update routing table A1 obtained in the first heartbeat cycle, thus determining the final routing table A. Device B can use temporary routing table B2 to update routing table B1 obtained in the first heartbeat cycle, thus determining the final routing table B. Device C can use temporary routing table C2 to update routing table C1 obtained in the first heartbeat cycle, thus determining the final routing table C. Device D can use temporary routing table D2 to update routing table D1 obtained in the first heartbeat cycle, thus determining the final routing table D. Device E can use temporary routing table E2 to update routing table E1 obtained in the first heartbeat cycle, thus determining the final routing table E.
[0193] At this point, the routing information in routing table B can be shown as shown in Table 7, the routing information in routing table C can be shown as shown in Table 8, the routing information in routing table D can be shown as shown in Table 9, the routing information in routing table A can be shown as shown in Table 10, and the routing information in routing table E can be shown as shown in Table 11.
[0194] Table 7
[0195]
[0196] Table 8
[0197]
[0198]
[0199] Table 9
[0200]
[0201] Table 10
[0202]
[0203] Table 11
[0204]
[0205] Therefore, after the second heartbeat cycle, device C's routing table has added routing information for devices B and D compared to the previous heartbeat cycle; device D's routing table has added routing information for devices B and C; and device B's routing table has added routing information for devices D and C. Device E's routing table has added routing information for device A compared to the previous heartbeat cycle. Device A's routing table has added routing information for device E compared to the previous heartbeat cycle.
[0206] 3) During the third heartbeat cycle, device A can send a multi-hop heartbeat frame, which includes routing information from routing table A. Device D can also send a multi-hop heartbeat frame, which includes routing information from routing table D.
[0207] Devices B, C, and D are connected to device A, and therefore can listen to the multi-hop heartbeat frames sent by device A. Device C, upon hearing these frames, can construct a temporary routing table C2, which includes one routing entry: device address of device E, device name of device E, device address of device D, and a hop count of 3. Device B, also hearing these frames, can construct a temporary routing table B2, which includes one routing entry: device address of device E, device name of device E, device address of device D, and a hop count of 3. Device D, hearing these frames but without additional information, does not need to construct a temporary routing table.
[0208] Device E listens to the multi-hop heartbeat frame of device D and can build a temporary routing table E3. Temporary routing table E3 includes two routing information: device address of device B, device name of device B, device address of device A, with a hop count of 3; device address of device C, device name of device C, device address of device A, with a hop count of 3.
[0209] After the third heartbeat cycle, device C updates the routing table C obtained in the first heartbeat cycle using temporary routing table C3, thus determining the final routing table C. Device B can update the routing table B obtained in the first heartbeat cycle using temporary routing table B3, thus determining the final routing table B. Device E can update the routing table E obtained in the first heartbeat cycle using temporary routing table E3, thus determining the final routing table E.
[0210] At this point, the routing information in routing table B can be shown in Table 12. The routing information in routing table C can be shown in Table 13. The routing information in routing table E can be shown in Table 14.
[0211] Table 12
[0212]
[0213] Table Thirteen
[0214]
[0215] Table 14
[0216]
[0217]
[0218] Therefore, after the third heartbeat cycle, device B's routing table B has added routing information from device E compared to the second heartbeat cycle, and device C's routing table C has added routing information from device E compared to the second heartbeat cycle. Device E's routing table E has added routing information from both devices B and C compared to the second heartbeat cycle.
[0219] After the third heartbeat cycle, each device obtains routing information from other devices, thus establishing a routing table. Subsequently, devices in the ad hoc network can communicate based on their respective established routing tables.
[0220] It should be noted that the routing table above also includes information such as MCS, update time, and paging location, but these are not shown in this example.
[0221] The sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0222] The above text combines Figures 1 to 8 The method provided in the embodiments of this application is described in detail below. Figure 9 and Figure 10 The present application provides a detailed description of the apparatus provided in the embodiments thereof.
[0223] Figure 9 An embodiment of this application illustrates a routing table establishment apparatus 900, which includes a monitoring module 910 and a processing module 920. The monitoring module 910 is configured to: monitor a first heartbeat frame, the first heartbeat frame including first device information and / or first routing information; the processing module 920 is configured to: determine routing information from the establishment apparatus to other devices based on the first heartbeat frame and store it in a routing table; determine whether a preset time has elapsed, the preset time being the duration for which the establishment apparatus monitors the first heartbeat frame; and, if the preset time has elapsed, determine the routing table as the target routing table.
[0224] It should be understood that the routing table creation device 900 here is embodied in the form of a functional module. The term "module" here can refer to application-specific integrated circuits (ASICs), electronic circuits, processors (e.g., shared processors, proprietary processors, or group processors, etc.) and memories for executing one or more software or firmware programs, integrated logic circuits, and / or other suitable components supporting the described functions. In an alternative example, those skilled in the art will understand that the routing table creation device 900 can be specifically the first device in the above method embodiments, or the functions of the first device in the above method embodiments can be integrated into the routing table creation device 900. The routing table creation device 900 can be used to execute the various processes and / or steps corresponding to the first device in the above method embodiments; to avoid repetition, these will not be described again here.
[0225] The routing table establishment device 900 described above has the function of implementing the corresponding steps performed by the first device in the above method embodiment; the above function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above function.
[0226] In the embodiments of this application, Figure 9 The routing table creation device 900 can also be a chip or a chip system, such as a system on chip (SoC).
[0227] Figure 10This is a schematic block diagram of another routing table establishment apparatus 1000 provided in an embodiment of this application. The first device 1000 includes a processor 1010, a transceiver 1020, and a memory 1030. The processor 1010, transceiver 1020, and memory 1030 communicate with each other via an internal connection path. The memory 1030 is used to store instructions, and the processor 1020 is used to execute the instructions stored in the memory 1030 to control the transceiver 1020 to send and / or receive signals.
[0228] It should be understood that the first device 1000 may specifically be the first device in the above method embodiments, or the functions of the first device in the above method embodiments may be integrated into the first device 1000. The first device 1000 may be used to execute the various steps and / or processes corresponding to the first device in the above method embodiments. Optionally, the memory 1030 may include read-only memory and random access memory, and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information. The processor 1010 may be used to execute instructions stored in the memory, and when the processor executes the instructions, the processor may execute the various steps and / or processes corresponding to the first device in the above method embodiments.
[0229] It should be understood that, in the embodiments of this application, the processor 1010 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0230] In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The steps of the method disclosed in the embodiments of this application can be directly manifested as execution by a hardware processor, or as a combination of hardware and software modules within the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor executes the instructions in the memory, combining them with its hardware to complete the steps of the above method. To avoid repetition, detailed descriptions are omitted here.
[0231] This application also provides a computer-readable storage medium for storing a computer program for implementing the method corresponding to the first device in the above method embodiments.
[0232] This application also provides a chip system for supporting the first device in the above method embodiments to implement the functions shown in the embodiments of this application.
[0233] This application also provides a computer program product, which includes a computer program (also referred to as code or instructions), which, when run on a computer, enables the computer to execute the method corresponding to the first device shown in the above method embodiments.
[0234] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0235] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0236] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0237] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0238] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0239] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0240] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for establishing a routing table, characterized in that, Applied to an ad hoc network architecture comprising multiple devices, the method includes: Each of the plurality of devices listens to a first heartbeat frame, the first heartbeat frame including first device information and / or first routing information, the first heartbeat frame being used to characterize the address of the device sending the first heartbeat frame and whether the device sending the first heartbeat frame supports relay; Each device determines its routing information to other devices based on the first heartbeat frame and stores it in a routing table; Each device determines whether a preset time has been reached, where the preset time is the duration for which each device listens to the first heartbeat frame; If the preset time period is reached, each device will determine the routing table as the target routing table; If the preset time period has not been reached, each device continues to listen to the first heartbeat frame; Each device updates the information in the routing table based on the first heartbeat frame until the preset time is reached; Each device acquires time-frequency resources; Each device uses the time-frequency resources to send a second heartbeat frame, the second heartbeat frame including second device information and / or second routing information; The time-frequency resource is one time slot; the one time slot is the time slot in the last frame of one slice.
2. The method according to claim 1, characterized in that, The plurality of devices includes a first device and a second device, and the first heartbeat frame includes device information of the second device; Each of the plurality of devices listens to the first heartbeat frame, including: The first device detects the first heartbeat frame from the second device; Each device determines its routing information to other devices based on the first heartbeat frame and stores it in a routing table, including: The first device determines the routing information from the first device to the second device based on the first heartbeat frame and stores it in the routing table.
3. The method according to claim 2, characterized in that, The device information of the second device includes the device name and the device address of the second device; The routing information from the first device to the second device includes the device name of the second device, the device address of the second device, and the number of hops required from the first device to the second device, wherein the number of hops from the first device to the second device is 1.
4. The method according to claim 1, characterized in that, The plurality of devices includes a first device, a second device, and a third device, and the first heartbeat frame includes routing information of the third device; Each of the plurality of devices listens to the first heartbeat frame, including: The first device detects the first heartbeat frame from the second device; Each device determines its routing information to other devices based on the first heartbeat frame and stores it in a routing table, including: The first device determines the routing information from the first device to the third device based on the first heartbeat frame and stores it in the routing table.
5. The method according to claim 4, characterized in that, The routing information of the third device includes the device name of the third device, the device address of the third device, and the number of hops required from the second device to the third device; The routing information from the first device to the third device includes the device name of the third device, the device address of the third device, the device address of the second device, and the number of hops required from the first device to the third device.
6. The method according to claim 1, characterized in that, The plurality of devices includes a first device, a second device, and a third device, and the first heartbeat frame includes device information of the second device and routing information of the third device; Each of the plurality of devices listens to the first heartbeat frame, including: The first device detects the first heartbeat frame from the second device; Each device determines its routing information to other devices based on the first heartbeat frame and stores it in a routing table, including: Based on the first heartbeat frame, the first device stores routing information from the first device to the second device and routing information from the first device to the third device in the routing table.
7. A device for establishing a routing table, characterized in that, include: The monitoring module is used to: monitor a first heartbeat frame, the first heartbeat frame including first device information and / or first routing information, the first heartbeat frame being used to characterize the address of the device sending the first heartbeat frame and whether the device sending the first heartbeat frame supports relay; The processing module is used to: determine the routing information from the establishment device to other devices based on the first heartbeat frame, and store it in the routing table; determine whether a preset time has been reached, wherein the preset time is the duration for which the establishment device listens to the first heartbeat frame; And, if the preset time period is reached, the routing table will be determined as the target routing table; The monitoring module is also used for: If the preset duration has not been reached, continue monitoring the first heartbeat frame; The processing module is also used for: Update the information in the routing table based on the first heartbeat frame until the preset time is reached; The establishment device also includes a sending module; The processing module is also used for: Acquire time and frequency resources; The sending module is also used for: The second heartbeat frame is sent using the time-frequency resources, and the second heartbeat frame includes second device information and / or second routing information; The time-frequency resource is one time slot; the one time slot is the time slot in the last frame of one slice.
8. The apparatus for establishing according to claim 7, characterized in that, The first heartbeat frame includes device information of the second device; The monitoring module is further used for: The first heartbeat frame from the second device was detected; The processing module is also used for: Based on the first heartbeat frame, the routing information from the establishment device to the second device is determined and stored in the routing table.
9. The apparatus for establishing according to claim 8, characterized in that, The device information of the second device includes the device name and the device address of the second device; The routing information from the establishment device to the second device includes the device name of the second device, the device address of the second device, and the number of hops required from the establishment device to the second device, wherein the number of hops from the establishment device to the second device is 1.
10. The apparatus for establishing according to claim 7, characterized in that, The first heartbeat frame includes routing information from the third device; The monitoring module is further used for: The first heartbeat frame from the second device was detected. The processing module is also used for: Based on the first heartbeat frame, the routing information from the establishment device to the third device is determined and stored in the routing table.
11. The apparatus for establishing according to claim 10, characterized in that, The routing information of the third device includes the device name of the third device, the device address of the third device, and the number of hops required from the second device to the third device; The routing information from the establishment device to the third device includes the device name of the third device, the device address of the third device, the device address of the second device, and the number of hops required from the establishment device to the third device.
12. The apparatus for establishing according to claim 7, characterized in that, The first heartbeat frame includes device information of the second device and routing information of the third device; The monitoring module is further used for: The first heartbeat frame from the second device was detected; The processing module is also used for: Based on the first heartbeat frame, the routing table stores the routing information from the establishment device to the second device and the routing information from the establishment device to the third device.
13. A device for establishing a routing table, characterized in that, include: A processor coupled to a memory for storing a computer program, which, when invoked by the processor, causes the apparatus to perform the method as described in any one of claims 1 to 6.
14. A chip system, characterized in that, Includes: a processor for retrieving and running a computer program from memory, such that a device having the chip system mounted implements the method as described in any one of claims 1 to 6.
15. A computer-readable storage medium, characterized in that, Used to store a computer program, the computer program including instructions for implementing the method as described in any one of claims 1 to 6.
16. A computer program product, characterized in that, The computer program product includes computer program code that, when run on a computer, causes the computer to implement the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Monitoring method and device for node device
CN104601365A
Data communication method, device and system, electronic equipment and storage medium
CN113301512A