A hybrid adaptive channel access method for wireless ad hoc networks
By adopting a hybrid adaptive channel access method in wireless Mesh network, using resource allocation vectors and three-time mobile phone system to obtain transmission resources, and switching to the direct competition access mechanism as needed, the problem of excessive channel access delay is solved. Low latency and efficient data transmission are achieved.
Patent Information
- Application Number
- CN202210892185.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-27
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2042-07-27
AI Technical Summary
The existing wireless Mesh network has the problem of excessive channel access delay when acquiring data transmission resources, which is difficult to meet the needs of high throughput and high service quality.
Adopting the hybrid adaptive channel access method, the transmission resources are obtained by initializing the resource allocation vector three times in the control time slot, and the resource allocation situation is determined whether to switch to a direct competition channel access mechanism, such as carrier sense multiple access /Conflict Avoidance or time slot ALOHA access.
It effectively reduces channel access delay, improves channel utilization, and meets the needs of high throughput and high service quality.
Smart Images

Figure CN115226226B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of network communication, and in particular relates to a hybrid adaptive channel access method for a wireless ad hoc network. Background Art
[0002] At present, wireless mesh network is widely studied as a technology that can build flexible wide-area wireless local area networks (WLANs), and its application prospects are broad, such as intelligent transportation, multimedia access, environmental monitoring, etc. These applications often have high quality of service (Qualify of Service, QoS) requirements while ensuring throughput, so the network needs to have the corresponding ability to ensure its QoS requirements.
[0003] The distributed scheduling mechanism for obtaining data transmission resources in IEEE 802.16 includes the following features: synchronous transmission and reception; time is divided into frames, the control time slot in the frame is used for signaling interaction, and the data micro-time slot is used as the basic unit of data transmission; the three-way handshake and available resource broadcast completed in the control time slot are the basic means of scheduling data transmission resources. The node obtains the current available resource set by listening to the three-way handshake of other nodes and the regular broadcast of available resources; the current sending node obtains the transmission resources within two hops without conflict through the three-way handshake with the receiving node.
[0004] Carrier Sense Multiple Access with Collision Avoidance (CSMA / CA) is a quasi-synchronous algorithm. When a node has a data packet to send, it first needs to "wait" for the Distributed Inter-frame Spacing (DIFS) time. If the channel remains idle within the DIFS time, the data is sent; otherwise, it backs off. If the node does not receive an ACK message after sending data, it backs off and retransmits; otherwise, the data is sent successfully. The node determines whether an error occurs based on the ACK message. If an error occurs, the data packet or part of the data packet is retransmitted; otherwise, the data packet is received correctly.
[0005] Slotted ALOHA is a synchronization algorithm with a clock signal for the synchronization of the entire network. It divides time into time slices of the same size. Each time a user has data to send, it must wait until the beginning of the next time slice to send data, thus avoiding the randomness of user data transmission, reducing the possibility of data conflicts, and improving channel utilization.
[0006] When using the distributed scheduling mechanism, since the control subframe comes first and the data subframe comes later, once a data packet with a high latency requirement arrives in the data subframe, the waiting delay is large. Therefore, it is necessary to reasonably use the idle data micro-slots to transmit this type of data in order to reduce the packet delay and provide QoS guarantee. Different types of access methods have different disadvantages: the scheduling algorithm has the problem of too high channel access delay, and CSMA / CA and ALOHA have the problem of low channel utilization. Summary of the invention
[0007] The present invention aims to provide a hybrid adaptive channel access method for a wireless ad hoc network to solve the technical problem of excessively high channel access delay.
[0008] In order to solve the above technical problems, the specific technical solutions of the present invention are as follows:
[0009] A hybrid adaptive channel access method for a wireless ad hoc network comprises the following steps:
[0010] Step S1. Initialize a resource allocation vector, which is used to identify scheduled transmission resources. The resource allocation vector includes scheduled data mini-slots and all control slots. Before scheduling transmission resources, all control slots in each frame are marked with a resource allocation vector. Before each frame starts, the resource allocation vector is used as the initialization value.
[0011] Step S2. Start data transmission resource scheduling, use the election algorithm to calculate the next transmission opportunity of the management message, initiate scheduling in the control time slot, apply for transmission resources for the data packet currently waiting to be sent through a three-way handshake, bind data transmission resources for the data packet, and send the data packet to the physical layer;
[0012] Step S3. Generate a resource allocation vector, and generate a resource allocation vector including the transmission resource scheduling status of the current frame according to the authorization message and authorization confirmation message received in the distributed scheduling MSH-DSCH;
[0013] Step S4. Determine whether to switch the access mode. After the control time slot ends, the node needs to determine whether to switch to another access mode according to the identification of the current resource allocation vector. The switching condition is whether the continuous idle data micro-time slots in the current frame can meet the minimum requirements for starting the direct competition channel access mechanism. If the judgment condition is met, switch to the direct competition channel access mechanism and jump to step S5; otherwise, do not switch and jump to step S6.
[0014] Step S5. Start direct contention channel access, and select one of the following access modes according to the supported access modes: carrier sense multiple access / collision avoidance access or slotted ALOHA access;
[0015] Step S6: Enter the next frame and execute step S2 again.
[0016] Further, step S2 includes a sending node generating an MSH-DSCH process and a receiving node processing the MSH-DSCH process.
[0017] Furthermore, in step S2, the sending node generates the MSH-DSCH process, which specifically includes the following steps:
[0018] Step 2.1.1: Before MSH-DSCH is sent, the next MSH-DSCH transmission opportunity is calculated through the election algorithm;
[0019] Step 2.1.2: Before the sending node sends MSH-DSCH, it generates an MSH-DSCH application message and available information according to the local data packet queue, and loads the generated MSH-DSCH application message and available information into the MSH-DSCH management message. The MSH-DSCH management message is sent to MSH-DSCH and a timer is set. After sending, it waits for an authorization message. If the timer overflows and no authorization message is received, it retransmits the application. The retransmission application needs to generate a new application message and available information in accordance with the previously invalidated application.
[0020] Step 2.1.3: When the sending node receives the authorization message, it generates and sends an authorization confirmation message, updates the local resource occupancy record, and binds the data packet to the time slot.
[0021] Furthermore, the receiving node processes the MSH-DSCH process, specifically including the following steps:
[0022] The receiving nodes include: the application receiving node and its one-hop neighbor node, and the one-hop neighbor node of the sending node;
[0023] Step 2.2.1: Receive MSH-DSCH data packet and unpack it;
[0024] Step 2.2.2: Get the number of each load message and loop to get the load messages;
[0025] Step 2.2.3: When the currently processed message is an application, and the destination node of the application message is the node currently processing the message, generate authorization or authorization confirmation and execute the next step; when the destination node of the application message is not the node currently processing the message, discard the application message and the available message;
[0026] Step 2.2.4: When the currently processed message is authorization or authorization confirmation, update the local resource occupancy record and generate a corresponding resource allocation vector;
[0027] Step 2.2.5: Generate a transmittable and receivable table based on the local available receivable table and the received available transmittable table; the receiving node generates a corresponding authorization message based on the actual available table and the application, loads the generated information into the MSH-DSCH management message, sends the MSH-DSCH, updates the local resource occupancy record, and generates the corresponding resource allocation vector; when the current control subframe ends, proceed to the next step.
[0028] Furthermore, the specific process of the carrier sense multiple access / collision avoidance access in the above step S5 is:
[0029] Step 5.1.1: When the sending node needs to send a data frame, it first detects the channel. If the current medium is idle, the node sends the data frame after continuously detecting that the channel is idle for a distributed inter-frame interval DIFS. If the current medium is not idle, the node needs to wait for an idle DIFS plus a random backoff time and jump to step 5.1.4.
[0030] Step 5.1.2: The receiving node correctly receives the data frame and sends an acknowledgment of the data frame after waiting for a short interframe space (SIFS).
[0031] Step 5.1.3: If the sending node does not receive the corresponding confirmation frame within the specified time, retransmit the data frame until it receives the confirmation, or give up sending after several retransmission failures; retransmit part of the data packet or the entire data packet according to the parameters in the confirmation frame ACK; the maximum number of retransmissions is: repeat_time;
[0032] Step 5.1.4: If another node occupies the medium within the backoff time of the station, the backoff time is suspended;
[0033] Step 5.1.5: When the backoff timer reaches 0, start transmission; if multiple stations reach 0 at the same time, a conflict will occur; if a conflict is caused, the corresponding contention window CW value is doubled and the backoff time is selected from the (0, CW) interval;
[0034] Step 5.1.6: After successful transmission, the CW size is set to the minimum CW min ; If the first data frame is sent successfully, continue to send data packets; send according to the value of the current network allocation vector NAV; if a data packet is too large, split it into multiple data frames and send them continuously.
[0035] Furthermore, the specific process of the time slot ALOHA access in the above step S5 is:
[0036] On the basis of slotted ALOHA, network allocation vectors NAV and ACK are added. NAV is used to inform neighbor nodes of the current transmission time of the sending node. The corresponding field indicates the number of transmission time slices. The unit transmission time T 0 , the unit time of transmission is different from the mini-time slot, and the transmission time of data packets and ACKs is based on mini-time slots; T 0 The calculation formula is as follows:
[0037] T 0 =DATA slot +ACK slot +2×IFS_ACK
[0038] Among them, DATA slot The length of the time slot occupied by the data packet, ACK slot IFS_ACK is the length of the time slot occupied by ACK, and IFS_ACK is the transmission interval between data packets. When multiple time slots are continuously occupied for transmission, the second IFS_ACK separates the ACK of the previous time slot and the DATA of the current time slot.
[0039] Step 5.2.1: Based on the resource allocation vector and the duration information of a frame, determine whether there is a time slot available for transmission. The judgment basis is whether there is idle time greater than or equal to the length of a time slot in a frame. If there is a time slot for the above transmission, random access is performed; if not, no access is performed.
[0040] Step 5.2.2: Divide the transmission time slices;
[0041] Step 5.2.3: Data arrives in the current time slice. If there is data waiting to be sent before, and if the node is sending, wait for the current data packet to be sent. If other nodes are sending, compete again, and only one link can get the transmission opportunity in the next time slice.
[0042] Step 5.2.4: The data packet that competes for the transmission opportunity waits for the NAV instruction. If the next time slot is not occupied, it transmits in the next time slot. If the next time slot is occupied, it retreats and waits for an idle time slot.
[0043] Step 5.2.5: After sending a data packet, the node waits for an ACK response. If the timer T2 overflows and no ACK is received, it backs off. If the timer T2 overflows and an ACK is received, it will send the packet according to the time slice resources occupied by the neighbor node informed by NAV.
[0044] Step 5.2.6: If any node does not send data in the current time slice, scan synchronization; if a complete data packet is received, obtain the value of NAV. If the destination node does not match, set the silent time; otherwise, generate and send the corresponding ACK based on the data packet verification result, obtain the value of NAV, and receive the data packet based on NAV.
[0045] A hybrid adaptive channel access method for a wireless ad hoc network of the present invention has the following advantages:
[0046] 1. The technical solution adopted by the present invention is a hybrid channel access mechanism, which is mainly based on a distributed scheduling mechanism and supplemented by a random access mechanism. Data transmission resources are obtained through a three-way handshake in the control time slot, and a corresponding resource allocation vector (RAV) is generated after the handshake is completed. After the control part in a frame ends, a direct competitive channel access mechanism can be used according to the occupancy of RAV, that is, if there is a long idle part. The direct competitive channel access mechanism includes time slot ALOHA and CSMA / CA.
[0047] 2. The hybrid adaptive channel access method for wireless ad hoc networks provided by the present invention has the advantage of low latency: since the frame structure is that the control subframe is before the data subframe and the three-way handshake can only be transmitted within the control subframe, if a data packet arrives within the data subframe, it is necessary to wait for the next scheduled transmission opportunity before performing the three-way handshake. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a schematic diagram of the process of the adaptive channel access method of the present invention.
[0049] Figure 2 A diagram showing possible transmission conditions of time slot ALOHA in the present invention;
[0050] Figure 3 A diagram showing possible transmission situations of CSMA / CA in the present invention;
[0051] Figure 4 This is a frame structure diagram used in the embodiment of the present invention;
[0052] Figure 5 A three-way handshake success diagram of distributed scheduling in the present invention;
[0053] Figure 6 A diagram of a three-way handshake re-handshake after a handshake failure in distributed scheduling in the present invention;
[0054] Figure 7 A possible transmission time diagram for CSMA / CA access in the present invention;
[0055] Figure 8A diagram of possible transmission time for time slot ALOHA access in the present invention;
[0056] Fig. 9 It is a schematic diagram of the time slot ALOHA time slice in the present invention. DETAILED DESCRIPTION
[0057] In order to better understand the purpose, structure and function of the present invention, a hybrid adaptive channel access method for a wireless ad hoc network of the present invention is further described in detail below in conjunction with the accompanying drawings.
[0058] Figure 4 The frame format used in this case is shown. One frame has 10 control time slots and 20 data mini time slots, and the control time slots are before the data mini time slots.
[0059] A hybrid adaptive channel access method for a wireless ad hoc network, the specific process is as follows:
[0060] 1. Distributed scheduling process, using the election algorithm to obtain management message transmission resources, using the management message MSH-DSCH to perform a three-way handshake, complete data scheduling, obtain data transmission resources, and update RAV based on the obtained data transmission resources.
[0061] 1.1. Before MSH-DSCH is sent, the next MSH-DSCH transmission opportunity is calculated through the election algorithm.
[0062] 1.2. Before sending MSH-DSCH, the sending node generates MSH-DSCH application message and available information according to the local data packet queue, loads the generated information in the MSH-DSCH management message, and sends MSH-DSCH. After sending, it waits for the authorization message.
[0063] 1.3. When the receiving node receives the MSH-DSCH application, it generates a transmittable and receivetable based on the local available table and the received transmittable and receivetable. The receiving node generates a corresponding authorization message based on the actual available table and the application, loads the generated information into the MSH-DSCH management message, and sends the MSH-DSCH.
[0064] 1.4. When the one-hop neighbor node of the receiving node receives the authorization message, it updates the local resource occupancy record and generates the corresponding RAV. When the sending node receives the authorization message, it generates and sends the authorization confirmation message, updates the local resource occupancy record, and binds the data packet to the time slot.
[0065] 1.5. When the one-hop neighbor node of the sending node receives the authorization confirmation message, it updates the local resource occupancy record and the RAV. When the current control subframe ends, it proceeds to the next step. Figure 5 , Figure 6As shown in FIG. 1 , a three-way handshake success diagram for distributed scheduling and a three-way handshake re-diagram for distributed scheduling handshake failure are respectively shown.
[0066] 2. The direct competitive channel access process starts the RAV threshold condition according to the RAV proportion in the distributed scheduling process and the channel access. If it is less than the RAV threshold condition, the direct competitive channel access process can be started and the continuous available time slot range is generated according to RAV; otherwise, it is not started and the next frame distributed scheduling process is directly entered. There are two types of direct competitive channel access, and all nodes in a network only support the same access.
[0067] 2.1. Slotted ALOHA
[0068] like Figure 2 As shown, the time slot ALOHA of the present invention divides time into time slices of the same size. Each time a user has data to send, the user needs to wait until the beginning of the next time slice to send the data. When the data is sent but no ACK is received within a time limit, a data packet conflict occurs and the data packet is backed off and retransmitted. Otherwise, the data is sent successfully and, depending on the ACK situation, the data packet waits for the next time slice to be sent or retransmitted.
[0069] The length of the time slice is T 0 .
[0070] T 0 =DATA slot +ACK slot +2×IFS_ACK
[0071] Among them, DATA slot The length of the time slot occupied by the data packet, ACK slot IFS_ACK is the time slot length occupied by ACK, and IFS_ACK is the transmission interval between data packets.
[0072] 2.2.CSMA / CA
[0073] like Figure 3 As shown in the figure, when a node has a data packet to send, it first needs to "wait" for DIFS time. If the channel remains idle within the DIFS time, the data is sent. If no ACK is received within the timeout, it backs off and retransmits. Otherwise, the data is sent successfully, and the ACK message is used to determine whether an error occurs. If an error occurs, the data packet or part of the data packet is retransmitted; otherwise, the data packet is received correctly.
[0074] like Figure 1 As shown, a hybrid adaptive channel access method for a wireless ad hoc network comprises the following steps:
[0075] Step S1. Initialize the resource allocation vector, which is used to identify the scheduled transmission resources, including data mini-slots and control slots; before scheduling begins, all control slots in each frame are marked with a resource allocation vector, and the resource allocation vector is used as the initialization value before each frame starts.
[0076] Step S2. Start data transmission resource scheduling, use the election algorithm to calculate the next transmission opportunity of the management message, initiate scheduling in the control time slot, apply for transmission resources for the data packet currently waiting to be sent through a three-way handshake, bind data transmission resources for the data packet, and send the corresponding data packet to the physical layer; including the sending node generating the MSH-DSCH process and the receiving node processing the MSH-DSCH process.
[0077] The sending node generates the MSH-DSCH process, the specific process is:
[0078] Step S2.1.1: Before MSH-DSCH is sent, the next MSH-DSCH transmission opportunity is calculated by the election algorithm;
[0079] Step S2.1.2: Before the sending node sends MSH-DSCH, it generates MSH-DSCH application message and available information according to the local data packet queue, loads the generated information in the MSH-DSCH management message, sends MSH-DSCH, and sets the timer. After sending, it waits for the authorization message. If the timer overflows and no authorization message is received, it retransmits the application. The retransmission application needs to generate a new application message and available information in accordance with the previous invalid application. ;
[0080] Step S2.1.3: When the sending node receives the authorization message, it generates and sends an authorization confirmation message, updates the local resource occupancy record, and binds the data packet to the time slot.
[0081] The receiving node processes the MSH-DSCH process. The specific process is as follows:
[0082] The receiving nodes include: the application receiving node and its one-hop neighbor node, and the one-hop neighbor node of the sending node;
[0083] Step S2.2.1: Receive MSH-DSCH data packet and unpack it;
[0084] Step S2.2.2: Obtain the number of each load message, and obtain the load messages in a loop;
[0085] Step S2.2.3: When the currently processed message is an application, and the destination node of the application message is the node currently processing the message, an authorization is generated or an authorization confirmation is made, and the next step is executed; if the destination node of the application message is not the node currently processing the message, the application message and the available message are discarded;
[0086] Step S2.2.4: When the currently processed message is authorization or authorization confirmation, update the local resource occupancy record and generate a corresponding resource allocation vector;
[0087] Step S2.2.5: Generate a transmittable / receivable table based on the local available table and the received transmittable / receivable table; the receiving node generates a corresponding authorization message based on the actual available table and the application, loads the generated information into the MSH-DSCH management message, sends the MSH-DSCH, updates the local resource occupancy record, and generates the corresponding resource allocation vector; when the current control subframe ends, proceed to the next step. Available table: a table of information that time slots can be used for transmission. Receivable means that the time slot can be used for reception, and transmit means that the time slot can be used for transmission. The "available" here means that it can be used at present.
[0088] Step S3: Generate a resource allocation vector, and generate a resource allocation vector containing transmission resource scheduling information of the current frame according to the authorization message and authorization confirmation message received in the MSH-DSCH. The MSH-DSCH is one of the above management messages and is used for data resource scheduling.
[0089] Step S4. Determine whether to switch the access mode. After the control time slot ends, the node needs to determine whether it can switch to another access mode based on the identification of the current resource allocation vector. The switching condition is whether the continuous idle data micro-slots in the current frame can meet the minimum requirements for starting the direct competition channel access mechanism; if the judgment condition is met, switch to the direct competition channel access mechanism and jump to step S5; otherwise, do not switch and jump to step S6.
[0090] Step S5. Start direct contention channel access, and select one of the following access modes according to the supported access modes: carrier sense multiple access / collision avoidance (CSMA / CA) access or slotted ALOHA access;
[0091] The specific process of CSMA / CA access is as follows:
[0092] Step S5.1.1: When the sending node needs to send a data frame, it first detects the channel. If the current medium is idle, the node sends the data frame after continuously detecting that the channel is idle for a distributed inter-frame spacing (DIFS). Otherwise, the node needs to wait for an idle DIFS + random backoff time (CA, multiple time slots, the time slot length is T). unit ), skip to step 5.1.4;
[0093] Step S5.1.2: The receiving node correctly receives the data frame, waits for a short interframe space (SIFS), and then sends an acknowledgement of the data frame;
[0094] Step S5.1.3: If the sending node does not receive the corresponding confirmation frame within the specified time, it must retransmit the data frame until it receives the confirmation, or give up sending after several retransmission failures; retransmit part of the data packet or the entire data packet according to the parameters in the confirmation frame (Acknowledge, ACK); the maximum number of retransmissions is: repeat_time; if Figure 7 A graph of possible transmission times for CSMA / CA access is shown;
[0095] Step S5.1.4: If another node occupies the medium within the backoff time of the station, the backoff time is suspended;
[0096] Step S5.1.5: When the backoff timer reaches 0, transmission starts; if multiple stations reach 0 at the same time, a conflict will be caused; if a conflict is caused (no ACK is received after timeout T2), the corresponding contention window (ContentionWindow, CW) value is doubled, and the backoff time is selected from the (0, CW) interval;
[0097] Step S5.1.6: After successful transmission, the CW size is set to the minimum value CW min ; If the first data frame is sent successfully, continue to send data packets; send according to the value of the current network allocation vector (Network Allocation VectorNAV); if a data packet is too large, split it into multiple data frames and send them continuously.
[0098] The specific process of slotted ALOHA access is as follows:
[0099] NAV and ACK are added on the basis of time slot ALOHA. NAV is used to inform neighbor nodes of the transmission time of the current sending node. The corresponding field indicates the number of transmission time slices. The unit transmission time T 0 , the unit time of transmission is different from the mini-time slot, and the transmission time of data packets and ACKs is based on mini-time slots; T 0 The calculation formula is as follows:
[0100] T 0 =DATA slot +ACK slot +2×IFS_ACK
[0101] Among them, DATA slot The length of the time slot occupied by the data packet, ACK slot IFS_ACK is the length of the time slot occupied by ACK, and IFS_ACK is the transmission interval between data packets. When multiple time slots are continuously occupied for transmission, the second IFS_ACK separates the ACK of the previous time slot and the DATA of the current time slot. Figure 8 The possible transmission time diagram for slotted ALOHA access is shown. Fig. 9 A schematic diagram of the ALOHA time slice is shown; ACK is the confirmation message used by the receiving node to respond to data (DATA), and the purpose of spacing is to avoid data conflicts caused by transmission delays.
[0102] Step S5.2.1: Based on the resource allocation vector and the duration of a frame, determine whether there is a time slot available for transmission. The determination is based on whether there is idle time greater than or equal to the length of a time slot in a frame. If yes, perform synchronous access; otherwise, perform quasi-synchronous access.
[0103] Step S5.2.2: Divide the transmission time slices;
[0104] Step S5.2.3: Data arrives in the current time slice. If there is data waiting to be sent before, and if the node is sending, wait for the current data packet to be sent. If other nodes are sending, compete again, and only one link can get the transmission opportunity in the next time slice.
[0105] Step S5.2.4: The data packet that competes for the transmission opportunity waits for the NAV instruction. If the next time slot is not occupied, it can be transmitted in the next time slot; otherwise, it retreats and waits for an idle time slot;
[0106] Step S5.2.5: After sending a data packet, the node waits for an ACK response. If the timer T2 overflows and no ACK is received, it backs off; otherwise, it sends data according to the time slice resources occupied by the neighbor node informed by NAV;
[0107] Step S5.2.6: If a node does not send data in the current time slice, scan synchronization; if a complete data packet is received (a data packet without conflict), obtain the value of NAV. If the destination node does not match, set the silent time; otherwise, generate and send the corresponding ACK based on the data packet verification result, obtain the value of NAV, and receive the data packet according to NAV.
[0108] Step S6: Enter the next frame and execute step S2 again.
[0109] Under the conditions of the same transmission rate and the same load, this method adds a direct competition channel access mechanism in addition to the basic data transmission scheduling mechanism to achieve hybrid access, thereby achieving the purpose of reducing delay and providing QoS guarantee.
[0110] It is to be understood that the present invention is described by some embodiments, and it is known to those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the scope of protection of the present invention.
Claims
1. A hybrid adaptive channel access method for a wireless ad hoc network, characterized in that: The steps include: Step S1. Initialize a resource allocation vector, which is used to identify scheduled transmission resources. The resource allocation vector includes scheduled data mini-slots and all control slots. Before scheduling transmission resources, all control slots in each frame are marked with a resource allocation vector. Before each frame starts, the resource allocation vector is used as the initialization value. Step S2. Start data transmission resource scheduling, use the election algorithm to calculate the next transmission opportunity of the management message, initiate scheduling in the control time slot, apply for transmission resources for the data packet currently waiting to be sent through a three-way handshake, bind data transmission resources for the data packet, and send the data packet to the physical layer; Step S3. Generate a resource allocation vector, and generate a resource allocation vector including the transmission resource scheduling status of the current frame according to the authorization message and authorization confirmation message received in the distributed scheduling MSH-DSCH; Step S4. Determine whether to switch the access mode. After the control time slot ends, the node needs to determine whether to switch to another access mode according to the identification of the current resource allocation vector. The switching condition is whether the continuous idle data micro-time slots in the current frame can meet the minimum requirements for starting the direct competition channel access mechanism. If the judgment condition is met, switch to the direct competition channel access mechanism and jump to step S5; otherwise, do not switch and jump to step S6. Step S5. Start direct contention channel access, and select one of the following access modes according to the supported access modes: carrier sense multiple access / collision avoidance access or slotted ALOHA access; Step S6. Enter the next frame and execute step S2 again; The step S2 includes a sending node generating an MSH-DSCH process and a receiving node processing an MSH-DSCH process; The process of generating the MSH-DSCH by the sending node in step S2 specifically includes the following steps: Step 2.1.1: Before MSH-DSCH is sent, the next MSH-DSCH transmission opportunity is calculated through the election algorithm; Step 2.1.2: Before the sending node sends MSH-DSCH, it generates an MSH-DSCH application message and available information according to the local data packet queue, and loads the generated MSH-DSCH application message and available information into the MSH-DSCH management message. The MSH-DSCH management message is sent to MSH-DSCH and a timer is set. After sending, it waits for an authorization message. If the timer overflows and no authorization message is received, it retransmits the application. The retransmission application needs to generate a new application message and available information in accordance with the previously invalidated application. Step 2.1.3: When the sending node receives the authorization message, it generates and sends an authorization confirmation message, updates the local resource occupancy record, and binds the data packet to the time slot; The above receiving node processes the MSH-DSCH process, which specifically includes the following steps: The receiving nodes include: the application receiving node and its one-hop neighbor node, and the one-hop neighbor node of the sending node; Step 2.2.1: Receive MSH-DSCH data packet and unpack it; Step 2.2.2: Get the number of each load message and loop to get the load messages; Step 2.2.3: When the currently processed message is an application, and the destination node of the application message is the node currently processing the message, generate authorization or authorization confirmation and execute the next step; when the destination node of the application message is not the node currently processing the message, discard the application message and the available message; Step 2.2.4: When the currently processed message is authorization or authorization confirmation, update the local resource occupancy record and generate a corresponding resource allocation vector; Step 2.2.5: Generate a transmittable / receivable table based on the local available table and the received transmittable / receivable table; the receiving node generates a corresponding authorization message based on the actual available table and the application, loads the generated information into the MSH-DSCH management message, sends the MSH-DSCH, updates the local resource occupancy record, and generates the corresponding resource allocation vector; when the current control subframe ends, proceed to the next step; The specific process of the carrier sense multiple access / collision avoidance access in the above step S5 is as follows: Step 5.1.1: When the sending node needs to send a data frame, it first detects the channel. If the current medium is idle, the node sends the data frame after continuously detecting that the channel is idle for a distributed inter-frame interval DIFS. If the current medium is not idle, the node needs to wait for an idle DIFS plus a random backoff time and jump to step 5.1.
4. Step 5.1.2: The receiving node correctly receives the data frame and sends an acknowledgment of the data frame after waiting for a short interframe space (SIFS). Step 5.1.3: If the sending node does not receive the corresponding confirmation frame within the specified time, retransmit the data frame until it receives the confirmation, or give up sending after several retransmission failures; retransmit part of the data packet or the entire data packet according to the parameters in the confirmation frame ACK; the maximum number of retransmissions is: repeat_time; Step 5.1.4: If another node occupies the medium within the station's backoff time, the backoff time is suspended; Step 5.1.5: When the backoff timer reaches 0, start transmission; if multiple stations reach 0 at the same time, a conflict will occur; if a conflict is caused, the corresponding contention window CW value is doubled and the backoff time is selected from the (0, CW) interval; Step 5.1.6: After successful transmission, the CW size is set to the minimum CW min ; If the first data frame is sent successfully, continue to send data packets; send according to the value of the current network allocation vector NAV; if a data packet is too large, split it into multiple data frames and send them continuously; The specific process of the time slot ALOHA access in the above step S5 is: On the basis of slotted ALOHA, network allocation vectors NAV and ACK are added. NAV is used to inform neighbor nodes of the transmission time of the current sending node. The corresponding field indicates the number of transmission time slices. The unit transmission time is T0. The unit time of transmission is different from the mini-slot. The transmission time of data packets and ACK is based on mini-slots. The calculation formula of T0 is as follows: T0=DATA slot +ACK slot +2×IFS_ACK Among them, DATA slot The length of the time slot occupied by the data packet, ACK slot IFS_ACK is the length of the time slot occupied by ACK, and IFS_ACK is the transmission interval between data packets. When multiple time slots are continuously occupied for transmission, the second IFS_ACK separates the ACK of the previous time slot and the DATA of the current time slot. Step 5.2.1: Based on the resource allocation vector and the duration information of a frame, determine whether there is a time slot available for transmission. The basis for determination is whether there is idle time greater than or equal to the length of a time slot in a frame. If there is a time slot for transmission, perform random access; if not, do not access; Step 5.2.2: Divide the transmission time slices; Step 5.2.3: Data arrives in the current time slice. If there is data waiting to be sent before, and if the node is sending, wait for the current data packet to be sent. If other nodes are sending, compete again, and only one link can get the transmission opportunity in the next time slice. Step 5.2.4: The data packet that competes for the transmission opportunity waits for the NAV instruction. If the next time slot is not occupied, it transmits in the next time slot. If the next time slot is occupied, it retreats and waits for an idle time slot. Step 5.2.5: After sending a data packet, the node waits for an ACK response. If the timer T2 overflows and no ACK is received, it backs off. If the timer T2 overflows and an ACK is received, it will send the packet according to the time slice resources occupied by the neighbor node informed by NAV. Step 5.2.6: If any node does not send data in the current time slice, scan synchronization; if a complete data packet is received, obtain the value of NAV. If the destination node does not match, set the silent time; otherwise, generate and send the corresponding ACK based on the data packet verification result, obtain the value of NAV, and receive the data packet based on NAV.
