CN109068367B - Wireless token passing method, device, equipment and readable storage medium - Google Patents

Wireless token passing method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN109068367B
CN109068367B CN201811148797.4A CN201811148797A CN109068367B CN 109068367 B CN109068367 B CN 109068367B CN 201811148797 A CN201811148797 A CN 201811148797A CN 109068367 B CN109068367 B CN 109068367B
Authority
CN
China
Prior art keywords
terminal
token
address
target
relay
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811148797.4A
Other languages
Chinese (zh)
Other versions
CN109068367A (en
Inventor
喻明
吴宇
孙捷敏
王金鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Keyshare Communication Technology Co ltd
Original Assignee
Hunan Keyshare Communication Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Keyshare Communication Technology Co ltd filed Critical Hunan Keyshare Communication Technology Co ltd
Priority to CN201811148797.4A priority Critical patent/CN109068367B/en
Publication of CN109068367A publication Critical patent/CN109068367A/en
Application granted granted Critical
Publication of CN109068367B publication Critical patent/CN109068367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing
    • H04W40/22Communication route or path selection, e.g. power-based or shortest path routing using selective relaying for reaching a BTS [Base Transceiver Station] or an access point
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/321Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority
    • H04L9/3213Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority using tickets or tokens, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W40/00Communication routing or communication path finding
    • H04W40/02Communication route or path selection, e.g. power-based or shortest path routing

Abstract

The invention discloses a wireless token passing method, which comprises the following steps: determining a target terminal to receive the token frame; inquiring an optimal transmission path from the terminal to a target terminal through a routing protocol; determining a target terminal of the next hop of the terminal by using the optimal transmission path; constructing a target token frame and sending the target token frame to a target terminal; therefore, in the scheme, when the token frame is sent to the destination terminal, the optimal transmission path sent to the destination terminal by the terminal needs to be inquired through the routing protocol, so that the token frame is sent through the optimal transmission path between the terminal and the destination terminal. The invention also discloses a wireless token transmission device, equipment and a computer readable storage medium, which can also realize the technical effects.

Description

Wireless token passing method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of wireless communication technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for transmitting a wireless token based on an Ad Hoc network.
Background
A wireless Ad Hoc network is a network formed by a group of autonomous wireless nodes or terminals cooperating with each other, independent of a fixed infrastructure, and employing distributed management. The WTRP (Wireless Token Ring Protocol) is a distributed MAC layer Protocol suitable for the Ad Hoc network, the Protocol adopts a control mode of a Token Ring, and stations in the Ring transmit data under the control of the Token, so that transmission collision is effectively avoided, and the problems of hiding a terminal and exposing the terminal are thoroughly solved; however, the WTRP protocol needs to establish a virtual ring token transfer route in advance, and is not well adapted to the network topology change of the wireless mobile station; WDTP (Wireless Dynamic Token Protocol) is an improved Protocol based on WTRP, and the Protocol enables Token transmission to be free from establishing a logical annular link in advance by limiting the maximum node number in each subnet and introducing a Dynamic transmission algorithm of a Token, so that the WDTP can be well adapted to the Dynamic change of a Wireless network topological structure, and the throughput and the stability of a network are improved.
Although the WDTP protocol well solves the problem that WTRP needs to establish a ring transmission link of a token virtual logic in advance by introducing a dynamic transmission algorithm of the token, the dynamic transmission algorithm of the WDTP protocol does not consider the channel quality change of the token in the transmission process, so that in practical application, frequent token loss due to channel mutation or fading exists, and the token network is rushed.
Therefore, how to avoid the situation of token passing failure caused by channel change and improve the reliability and stability of token passing is a problem to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a wireless token passing method, a device, equipment and a computer readable storage medium based on an Ad Hoc network, so as to avoid the situation of token passing failure caused by channel change and improve the reliability and stability of token passing.
In order to achieve the above purpose, the embodiment of the present invention provides the following technical solutions:
a wireless token passing method based on an Ad Hoc network comprises the following steps:
determining a target terminal to receive the token frame;
inquiring an optimal transmission path from the terminal to a target terminal through a routing protocol;
determining a target terminal of the next hop of the terminal by using the optimal transmission path; the target terminal is the target terminal or a relay terminal between the terminal and the target terminal;
and constructing a target token frame and sending the target token frame to the target terminal.
The determining of the destination terminal to receive the token frame includes:
judging whether the terminal is a relay terminal;
if so, determining a target terminal according to a token frame sent by the terminal of the previous hop; and if not, taking the head terminal in the token passing queue of the terminal as the target terminal.
If the terminal is not a relay terminal, determining a target terminal of a next hop of the terminal by using the optimal transmission path, including:
judging whether the optimal transmission path is an empty path or not;
if yes, deleting the head of line terminal in the token transmission queue of the terminal, selecting the current head of line terminal from the deleted token transmission queue, taking the current head of line terminal as the target terminal, and continuously executing the step of inquiring the optimal transmission path from the terminal to the target terminal through the routing protocol.
Wherein the constructing the target token frame comprises:
determining address information carried by a target token frame according to the type of the terminal and the type of a target terminal; the types of the terminal include: the source terminal and the relay source terminal, the type of the target terminal includes: a destination terminal and a relay destination terminal;
if the terminal is a source terminal and the target terminal is a destination terminal, the constructed target token frame includes: a token destination address and a token source address; the destination address of the token is the address of the target terminal, and the source address of the token is the address of the terminal;
if the terminal is a source terminal and the target terminal is a relay target terminal, the constructed target token frame comprises: a token relay destination address, a token source address and a token destination address; the token relay destination address is the address of the target terminal, the token destination address is the address of the target terminal, and the token source address is the address of the terminal;
if the terminal is a relay source terminal and the target terminal is a relay target terminal, the constructed target token frame comprises: a token relay destination address, a token relay source address, a token destination address, and a token source address; the token relay destination address is the address of the target terminal, the token relay source address is the address of the terminal, the token destination address is the address of the target terminal, and the token source address is the address of the source terminal;
if the terminal is a relay source terminal and the target terminal is a target terminal, the constructed target token frame comprises: a token destination address, a token relay source address and a token source address; the destination address of the token is the address of the target terminal, the relay source address of the token is the address of the local terminal, and the source address of the token is the address of the source terminal.
When determining the address information carried by the target token frame according to the type of the terminal and the type of the target terminal, the method further includes:
determining an address zone bit carried by a target token frame according to the type of the terminal and the type of a target terminal;
if the terminal is a source terminal and the target terminal is a destination terminal, the address zone bit is a first address zone bit; if the terminal is a source terminal and the target terminal is a relay target terminal, the address zone bit is a second address zone bit; if the terminal is a relay source terminal and the target terminal is a relay target terminal, the address zone bit is a third address zone bit; and if the terminal is a relay source terminal and the target terminal is a target terminal, the address zone bit is a fourth address zone bit.
Wherein, this scheme still includes:
after a terminal in the network monitors a token frame, if the monitored token frame is sent by a relay terminal, a local token transmission queue is not updated; and if the monitored token frame is sent by the source terminal, updating a local token transmission queue.
An Ad Hoc network-based wireless token passing apparatus, comprising:
the destination terminal determining module is used for determining a destination terminal to receive the token frame;
the route query module is used for querying the optimal transmission route from the terminal to the destination terminal through a routing protocol;
the target terminal determining module is used for determining the target terminal of the next hop of the terminal by utilizing the optimal transmission path;
the token frame construction module is used for constructing a target token frame;
and the token frame sending module is used for sending the target token frame to the target terminal.
Wherein, this scheme still includes:
the token transmission queue management module is used for not updating the local token transmission queue if the monitored token frame is sent by the relay terminal after the token frame is monitored; and if the monitored token frame is sent by the source terminal, updating a local token transmission queue.
A wireless token passing apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the above-described wireless token passing method when executing the computer program.
A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, carries out the steps of the above-mentioned wireless token passing method.
By the above scheme, the method for passing a wireless token based on an Ad Hoc network provided by the embodiment of the present invention includes: determining a target terminal to receive the token frame; inquiring an optimal transmission path from the terminal to a target terminal through a routing protocol; determining a target terminal of the next hop of the terminal by using the optimal transmission path; constructing a target token frame and sending the target token frame to the target terminal;
therefore, in the scheme, when the token frame is sent to the destination terminal, the optimal transmission path sent to the destination terminal by the terminal needs to be inquired through the routing protocol, so that the token frame is sent through the optimal transmission path between the terminal and the destination terminal.
The invention also discloses a wireless token passing device, equipment and a computer readable storage medium based on the Ad Hoc network, and the technical effects can be realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a terminal topology structure disclosed in an embodiment of the present invention;
fig. 2 is a schematic diagram of another terminal topology disclosed in the embodiment of the present invention;
fig. 3 is a schematic diagram of a wireless token passing method based on an Ad Hoc network according to an embodiment of the present invention;
fig. 4 is a schematic diagram of another terminal topology disclosed in the embodiment of the present invention;
FIG. 5 is a diagram illustrating a token path query according to an embodiment of the present invention;
FIG. 6 is a flowchart of token sending disclosed in an embodiment of the present invention;
FIG. 7 is a diagram illustrating a token frame format according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a wireless token passing apparatus based on an Ad Hoc network according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, in the WDTP protocol, since it is not necessary to establish a virtual logical token loop in advance, each terminal directly passes a token to some neighboring terminal when passing the token. Therefore, the next hop for token passing must be agreed, otherwise a local ring may be formed, and the terminals on the ring do not require other terminals to join, which results in an imbalance of fairness. The idea of WDTP dynamic token passing is therefore as follows:
1. and the terminal adds the detected terminal which sends the token into the token passing queue.
2. All terminals waiting for the token monitor the channel, and if the other terminals are detected to send the token, the position of the token terminal is adjusted to the tail of the queue in the token transmission queue of the terminal.
3. For the received token, if the destination address of the token is different from the address of the terminal, continuing to wait for the token; if the token is the same, the token is held, and the service information is transmitted.
4. And after the terminal holding the token constructs a token frame, taking out the head address from the token transmission queue and sending the token to the head terminal. If the transmission is unsuccessful, deleting the head of line terminal from the token transmission queue, and selecting a new head of line terminal for transmission; and if the sequence is successful, adjusting the head end of the queue to the tail end of the queue. And repeating the 2 nd to the 4 th parts to finish the passing of the token.
Referring to fig. 1, a schematic diagram of a terminal topology structure provided in an embodiment of the present invention is shown; the dynamic token passing method is explained according to the topology of fig. 1 as an example:
1. an initialization process: as can be seen from fig. 1, the token passing queue of S4 is: s2, S3; the token passing queue of S3 is: s2, S4; the token passing queue of S2 is: s1, S3, S4; token passing queue of S1: and S2.
2、S1—>S2
S4: S2S 3 (not listening to this transmission);
s3: S2S 4 (not listening to this transmission);
s2: S3S 4S 1 (monitor this sending, migrate S1 to the end of the queue);
s1: s2 (self is the sending terminal this time, and only one neighbor terminal in the queue, S2 remains as the head of the queue);
3、S2—>S3
s4: S3S 2 (monitor this sending, send this terminal S2 to the end of the queue);
s3: S4S 2 (monitor this sending, send this terminal S2 to the end of the queue);
s2: S4S 1S 3 (which is the current transmitting terminal and moves the current transmitting destination terminal S3 to the end of the queue);
s1: s2 (only one neighbor terminal in the queue is monitored to send this time, and S2 is kept as the head of the queue);
3、S3—>S4
s4: S2S 3 (monitor this sending, send this terminal S3 to the end of the queue);
s3: S2S 4 (the terminal itself is the current sending terminal, and the destination terminal S4 of the current sending is moved to the end of the queue);
s2: S4S 1S 3 (monitor the sending, send the terminal S3 to the end of the queue this time);
s1: s2 (no transmission is detected);
4、S4—>S2
s4: S3S 2 (the terminal itself is the current sending terminal, and the destination terminal S2 of the current sending is moved to the end of the queue);
s3: S2S 4 (monitor this sending, send this terminal S4 to the end of the queue);
s2: S1S 3S 4 (monitor the sending, send the terminal S4 to the end of the queue this time);
s1: s2 (not monitoring this transmission)
5、S2—>S1
S4: S3S 2 (monitor this sending, send this terminal S2 to the end of the queue);
s3: S4S 2 (monitor this sending, send this terminal S2 to the end of the queue);
s2: S3S 4S 1 (which is the current transmitting terminal and moves the current transmitting destination terminal S1 to the end of the queue);
s1: s2 (monitor this sending, send this terminal S2 to queue end).
Therefore, the dynamic token passing method of the WDTP protocol omits the complicated steps of constructing a virtual token ring, can be better suitable for a self-organizing network formed by wireless terminals, particularly when the wireless terminals have the mobile characteristic, the topological structure of the wireless network has uncertainty and time-varying characteristic, and the advantages of the dynamic token passing method of the wireless terminal are more prominent under the condition;
however, in an actual wireless network, the channel quality between each wireless terminal is different, and besides the two situations of connection and complete disconnection under an ideal situation, the link quality between the wireless terminals also often has some 'weak' channel links which are not enough to support the high-quality transmission of services, but cannot completely disconnect the equipment at two ends; meanwhile, the background noise in the space environment where each wireless terminal is located and the distance between the terminal and the terminal are different, so that the channel quality between the terminals is very different, and the difference changes correspondingly with time and space; if the 'weak' channel link and the differential channel link appear, if token transmission is carried out continuously according to a WDTP dynamic token transmission algorithm, the situation of token transmission failure can occur frequently, the channel utilization rate is reduced, and meanwhile, the stability of the wireless token network is also reduced.
For example, in the topology of fig. 1, if there are "weak" channels in the S1 terminal and the S4 terminal, see fig. 2, the "weak" channels are indicated by dashed lines; each two terminals present different channel quality due to different background noise and channel attenuation, and to represent the quality of the channel, the channel quality is divided into 3 levels, 1 represents that the channel quality is poor, 3 represents that the channel quality is good, and 2 represents that the channel quality is between poor and good, so that fig. 1 is converted into a topology closer to that in practical application, as shown in fig. 2.
Under the topology, according to a dynamic token passing algorithm, the terminals S1 and S4 may write the other side into a local token passing queue, but the link quality between the terminals S1 and S4 is not enough to ensure the successful passing of the high quality of the token, which may frequently cause the repeated retransmission of the token between the terminals S1 and S4, and increase the channel overhead of the whole network; also by way of the topology of fig. 2, it is found that when S2 passes the token to S4, there are two paths, one of which is forwarded to S4 through S3; the other is directly sent to S4, and the calculation of the rate grade shows that the overall rate grade of the path forwarded to S4 through S3 can reach 1.5, which is superior to the rate grade 1 of the path forwarded to S4 through S2 and is directly transmitted to S4 according to the dynamic token transmission method S2 of WDTP protocol, so that the cost for transmitting the token is increased, and the network capacity is reduced.
Therefore, in view of the above problems exposed when the dynamic token passing method of the WDTP protocol is applied, the embodiment of the present invention discloses a wireless token passing method, apparatus, device and computer readable storage medium based on an Ad Hoc network, so as to avoid the situation of token passing failure caused by channel change, and improve the reliability and stability of token passing.
Referring to fig. 3, a method for passing a wireless token based on an Ad Hoc network according to an embodiment of the present invention includes:
s101, determining a target terminal to receive a token frame;
firstly, respectively explaining a source terminal, a destination terminal, a relay source terminal and a relay destination terminal in the scheme, wherein the source terminal is a terminal for sending a token frame, and the destination terminal is a terminal for finally receiving a token; the relay terminal plays a role in forwarding the token frame, the relay source terminal is a relay terminal for sending the token frame, and the relay destination terminal is a relay terminal for receiving the token frame. Taking the topology structure in fig. 4 as an example, when S1 sends a token frame to S4, S1 is the source terminal, and S4 is the destination terminal; if the token is transmitted to S4 through S2 and S3 by S1, S2 and S3 are relay terminals, specifically, when the token frame is transmitted to S2 by S1, S2 is a relay destination terminal, when the token frame is transmitted to S3 by S2, S2 is a relay source terminal, S3 is a relay destination terminal, and when the token frame is transmitted to S4 by S3, S3 is a relay source terminal.
The determining of the destination terminal to receive the token frame includes:
judging whether the terminal is a relay terminal;
if so, determining a target terminal according to a token frame sent by the terminal of the previous hop; and if not, taking the head terminal in the token passing queue of the terminal as the target terminal.
Specifically, when the destination terminal is determined, the scheme is specifically divided into two situations: one is that the terminal is not a relay terminal, and the other is that the terminal is a relay terminal; under the condition that the terminal is not a relay terminal, the two situations are actually divided into two situations, one is that the terminal is an initiating terminal of the token, and the other is that the terminal is a source terminal, and under the two situations, according to the wireless dynamic token protocol, the head of line terminal in the token transmission queue of the terminal is required to be used as a target terminal.
If the terminal is a relay terminal, it indicates that there is a token frame sent by the source terminal/relay terminal to the terminal, and at this time, the terminal plays a role of token forwarding, so when determining the destination terminal in this case, it is necessary to determine the destination terminal from the token frame sent by the terminal of the previous hop.
S102, inquiring an optimal transmission path from the terminal to a destination terminal through a routing protocol;
s103, determining a target terminal of the next hop of the terminal by using the optimal transmission path; the target terminal is the target terminal or a relay terminal between the terminal and the target terminal;
referring to fig. 5, a schematic diagram of token path query provided in the embodiment of the present invention; specifically, in the present scheme, in order to determine the optimal transmission path, a query interface of a token path needs to be constructed, an interaction interface of a route and a token provides an optimal path query function for token passing, and a specific interface is defined as shown in fig. 5.
When a certain terminal selects a destination terminal for token transmission according to a wireless dynamic token transmission method, a token network MAC protocol initiates a path query request to a routing protocol and informs the routing protocol of the MAC address of the destination terminal transmitted at the time, and the routing protocol queries the optimal transmission path of the destination terminal according to the MAC address of the destination terminal, outputs a query result and synchronously outputs a query result valid mark.
It should be noted that the optimal transmission path in this scheme may be a path from the terminal to the address of the next hop terminal, or may be a path from the terminal to the destination terminal; if the optimal transmission path only includes the next hop terminal of the terminal, the terminal in the optimal transmission path may be directly used as the target terminal in S103, and if the optimal transmission path includes all the relay terminals from the terminal to the target terminal, then in S103, the next hop terminal closest to the terminal needs to be selected from the optimal transmission path as the target terminal. In practice, the routing protocol can satisfy the subsequent requirement only by outputting the path of the next-hop terminal address, but in order to make the terminal know the subsequent transmission trend, the path output by the routing protocol can also be set as the path from the terminal to the destination terminal.
In any of the above manners, if there is no relay terminal between the terminal and the destination terminal, the finally determined destination terminal is the destination terminal, and if there is a relay terminal between the terminal and the destination terminal, the finally determined destination terminal is the first relay terminal between the terminal and the destination terminal.
It can be understood that, in a wireless multi-hop network, there may exist multiple paths for transmission of an end-to-end device, and each path has different channel quality, which further causes different effects when the same service is transmitted through different paths, such as different transmission reliability and different transmission delay, and how to select an optimal transmission path becomes an important research of a routing protocol of the wireless multi-hop network, for example, the current BATMAN routing protocol, OLSR routing protocol, and the like all provide a good solution.
In this embodiment, a selection algorithm of an optimal path is provided, and specifically, to adopt a simple path rate level calculation scheme, that is, a rate level of a certain path is equal to a minimum rate level in the entire path divided by a hop count, referring to fig. 2, for example, when calculating the rate levels of S2-S3-S4, a minimum rate level 3 in the path is selected, and divided by a hop count 2, so that the rate level of S2-S3-S4 is 1.5. Of course, the optimal path selection algorithm in the present solution is not limited to this, as long as the optimal path can be selected.
And S104, constructing a target token frame and sending the target token frame to the target terminal.
After a terminal in the network monitors a token frame, if the monitored token frame is sent by a relay terminal, a local token transmission queue is not updated; and if the monitored token frame is sent by the source terminal, updating a local token transmission queue.
Specifically, in the current wireless dynamic token protocol, all terminals waiting for tokens monitor channels, and if it is detected that other terminals send tokens, the position of the token terminal is adjusted to the tail of the queue in its token passing queue. In the present application, the terminal monitors the transmission, but obtains the message as a relay forwarding message after analyzing the token, that is, the token frame is transmitted by the relay terminal, and at this time, the queue is kept unchanged.
In conclusion, after the new token transmission path selection method is adopted, the channel quality change in practical application does not cause the token to be transmitted on a weak channel, and the token retransmission cost is reduced; meanwhile, the scheme adopts the path with the best rate grade to transmit the token, compared with the traditional WTDP protocol, the token always selects the best channel to transmit according to the routing protocol rule under the current network topology, and the token transmission efficiency is improved.
Based on the foregoing embodiment, in this embodiment, if the terminal is not a relay terminal, determining a target terminal of a next hop of the terminal by using the optimal transmission path includes:
judging whether the optimal transmission path is an empty path or not;
if yes, deleting the head of line terminal in the token transmission queue of the terminal, selecting the current head of line terminal from the deleted token transmission queue, taking the current head of line terminal as the target terminal, and continuously executing the step of inquiring the optimal transmission path from the terminal to the target terminal through the routing protocol.
Specifically, referring to fig. 6, a flow chart of token transmission provided for the present scheme; it can be seen from the figure that, in the scheme, after the destination address of the token is extracted, a path query request is sent to the route, and if an effective path exists, a token frame is constructed and sent; if no effective path exists, the queue head needs to be deleted from the queue, the next terminal is extracted, and the steps of routing query and the like are executed again based on the next terminal.
That is, the query result in the present scheme has the following situations: if the best path is inquired, outputting the inquired terminal MAC address, wherein the result can be a destination terminal or a relay terminal; if the path is not inquired, outputting that the token passing terminal is empty, and indicating that no reliable path reaches the destination terminal; and deleting the destination terminal from the token queue, selecting a new queue head in the queue again, and then performing path query. By the method, the token queue local to the terminal can be updated, the terminal which cannot be transmitted can be deleted in time, and the step of searching the terminal again can be omitted when the subsequent token is sent, so that the route query time of the terminal is saved, and the token sending rate is improved.
Based on any of the above embodiments, in this embodiment, the construction target token frame includes two parts, where the first part is the construction of the address information in the token frame, and the second part is the construction of the address flag bit in the token frame, and the following is separately described here:
1. construction of address information in token frame:
determining address information carried by a target token frame according to the type of the terminal and the type of a target terminal; the types of the terminal include: the source terminal and the relay source terminal, the type of the target terminal includes: a destination terminal and a relay destination terminal;
if the terminal is a source terminal and the target terminal is a destination terminal, the constructed target token frame includes: a token destination address and a token source address; the destination address of the token is the address of the target terminal, and the source address of the token is the address of the terminal;
if the terminal is a source terminal and the target terminal is a relay target terminal, the constructed target token frame comprises: a token relay destination address, a token source address and a token destination address; the token relay destination address is the address of the target terminal, the token destination address is the address of the target terminal, and the token source address is the address of the terminal;
if the terminal is a relay source terminal and the target terminal is a relay target terminal, the constructed target token frame comprises: a token relay destination address, a token relay source address, a token destination address, and a token source address; the token relay destination address is the address of the target terminal, the token relay source address is the address of the terminal, the token destination address is the address of the target terminal, and the token source address is the address of the source terminal;
if the terminal is a relay source terminal and the target terminal is a target terminal, the constructed target token frame comprises: a token destination address, a token relay source address and a token source address; the destination address of the token is the address of the target terminal, the relay source address of the token is the address of the local terminal, and the source address of the token is the address of the source terminal.
2. Constructing an address flag bit in a token frame:
determining an address zone bit carried by a target token frame according to the type of the terminal and the type of a target terminal; if the terminal is a source terminal and the target terminal is a destination terminal, the address zone bit is a first address zone bit; if the terminal is a source terminal and the target terminal is a relay target terminal, the address zone bit is a second address zone bit; if the terminal is a relay source terminal and the target terminal is a relay target terminal, the address zone bit is a third address zone bit; and if the terminal is a relay source terminal and the target terminal is a target terminal, the address zone bit is a fourth address zone bit.
It should be noted that, in this embodiment, the token frame structure is redefined, the token address is extended to 4 MAC addresses, and address flag bits are added, which is shown in fig. 7 and is a schematic diagram of a token frame format provided in this scheme; it can be seen that the difference between the definition of the token frame format and the WDTP protocol is that 2 address flag bits are added in the frame type, and two addresses, MAC2 and MAC3, are added in the token frame of the WDTP protocol, and the definitions of the added contents are shown in table 1 according to the scheme requirements:
TABLE 1
Figure GDA0003199755160000121
As can be seen from table 1, the first address flag bit is 00, the second address flag bit is 01, the third address flag bit is 10, and the fourth address flag bit is 11; that is, if the address flag bit is 00, it indicates that the MAC address includes the token destination address and the token source address; if the address flag bit is 01, the MAC address comprises a token relay destination address, a token source address and a token destination address; if the address flag bit is 10, the MAC address comprises a token relay destination address, a token relay source address, a token destination address and a token source address; if the address flag bit is 11, the MAC address is shown to comprise a token destination address, a token relay source address and a token source address.
In the above addresses, the token source address is an address of a source terminal, the token destination address is an address of a destination terminal, the token relay source address is an address of a relay source terminal, and the token relay destination address is an address of a relay destination terminal, and they have a one-to-one correspondence relationship.
Specifically, taking the topological diagram of the topology of fig. 4 as an example, after the method is applied to a token passing method combined with a routing protocol, there are 3 paths from the S1 terminal to the S4 terminal, where the three paths are S1 directly to S4, S1 sends a token through S2 to S4, and S1 sends a token through S2 to S3 and finally to S4, and in these three cases, different token frame contents need to be constructed according to the format in table 1 in the token frame passing process.
1) When the token goes from the terminal of S1 to S4, S1 constructs the address flag bit and MAC address content of the token frame as shown in Table 2:
TABLE 2
Address flag bit MAC0 MAC1 MAC2 MAC3
00 S4 S1 NA NA
It can be seen that the terminal S1 is the source terminal, the destination terminal is S4, and there is no relay terminal between S1 and S4, at this time, the destination terminal is the destination terminal S4; thus, the constructed target token frame includes: token destination address S4 and token source address S1; the destination address of the token is the address of the target terminal, and the source address of the token is the address of the terminal; since the source terminal S1 is the destination terminal S4, the address flag bit is the first address flag bit 00.
2) When the token passes from the S1 terminal to the S4 terminal through the S2, the S1 first constructs a token frame and sends it to the S2, and the format of the token frame constructed by the S1 is shown in table 3:
TABLE 3
Address flag bit MAC0 MAC1 MAC2 MAC3
01 S2 S1 S4 NA
It can be seen that the own terminal S1 is the source terminal, the destination terminal is S4, and there is a relay terminal S2 between S1 and S4, so the destination terminal is S2; therefore, when the terminal is the source terminal S1 and the target terminal is the relay destination terminal S2, the constructed target token frame includes: token relay destination address S2, token source address and order S1 and token destination address S4; the token relay destination address is the address of a target terminal, the token destination address is the address of the target terminal, and the token source address is the address of the terminal; and, since the own terminal is the source terminal and the destination terminal is the relay destination terminal, the address flag bit is the second address flag bit 01.
Furthermore, after the S2 terminal receives the token frame of S1, from the perspective of the S2 terminal, the S2 of the terminal is a relay terminal, S2 needs to analyze the token frame sent by the previous-hop terminal S1, obtain the destination address of the token as S4, and obtain the source address as S1, at this time, S2 needs to reconstruct the token frame, specifically including modifying the address flag bit and the MAC address, for example, as shown in table 4, so as to forward the token frame to S4.
TABLE 4
Address flag bit MAC0 MAC1 MAC2 MAC3
11 S4 S2 S1 NA
It can be seen that the terminal S2 is a relay source terminal, the destination terminal is S4, and no relay terminal exists between the relay source terminal and the destination terminal, so the destination terminal is the destination terminal; therefore, when the terminal is a relay source terminal and the target terminal is a target terminal, the constructed target token frame includes: token destination address S4, token relay source address S2, token source address S1; the destination address of the token is the address of the destination terminal, the address of the token relay source is the address of the local terminal, i.e. S2, and the source address of the token is the address of the source terminal, and the address of the source terminal can be obtained by analyzing the token frame sent by the terminal of the previous hop to the local terminal, i.e. by analyzing the token frame sent by S1 to S2. And, since the terminal is the relay source terminal and the destination terminal is the destination terminal, the address flag bit is the fourth address flag bit 11.
3) When S1 sends the token to the relay terminal S2, the relay terminal S3 and finally to the S4 terminal, S1 first constructs a token frame and sends it to S2, and the format of the token frame constructed by S1 is shown in table 5:
TABLE 5
Address flag bit MAC0 MAC1 MAC2 MAC3
01 S2 S1 S4 NA
The manner of constructing the token frame sent to S2 in S1 is the same as the manner and content of the token frame constructed in S1 when the token passes from S1 terminal to S2 terminal to S4 terminal in the previous step, and is not described herein again. After receiving the token, the S2 terminal constructs a token and sends it to S3, and the address flag bit and address content of the token frame sent by S2 are shown in table 6:
TABLE 6
Figure GDA0003199755160000141
Figure GDA0003199755160000151
Specifically, after S1 transmits the token frame to S2, S2, upon receiving the token, needs to transmit the token frame to S3, where S2 is the relay source terminal, and there is a relay terminal S3 between the relay source terminal S2 and the destination terminal S4, so the target terminal in this case is the relay destination terminal S3. Therefore, if the terminal is a relay source terminal and the target terminal is a relay destination terminal, the constructed target token frame includes: a token relay destination address, a token relay source address, a token destination address, and a token source address; the token relay destination address is the address of a target terminal, the token relay source address is the address of the terminal, the token destination address is the address of the target terminal, and the token source address is the address of a source terminal;
in this case, the address of the destination terminal and the address of the source terminal are both obtained by parsing the token frame sent by the terminal of the previous hop to the terminal, that is, by parsing the token frame sent by S1 to S2; and, since the terminal is the relay source terminal and the destination terminal is the relay destination terminal, the address flag bit is the third address flag bit 10.
Further, after receiving the token from the S2 terminal, S3 parses the address flag to find the destination address and the source address of the token, reconstructs a token frame and sends the token frame to the destination terminal S4, where the address flag bit and the address content of the token frame are shown in table 7:
TABLE 7
Address flag bit MAC0 MAC1 MAC2 MAC3
11 S4 S3 S1 NA
Specifically, when the token frame is sent from S3 to S4, the terminal S3 is the relay source terminal, the destination address is S4, and the destination terminal is also S4, in this case, the content and construction method of the token frame sent from S2 to S4 are the same, and details are not repeated here.
In summary, after the scheme adopts the token passing method combined with the routing protocol optimization, the node needs to send the token under the following two conditions:
1) when the token is transmitted according to a WDTP protocol dynamic token transmission algorithm, the token needs to be sent to a token queue head terminal maintained by the terminal;
2) when the token transmission method combined with the route is adopted, each terminal has the possibility of token forwarding, when the token is received, the address mark and the content of 4 MAC addresses of the token need to be analyzed, if the token is the forwarding token, the destination terminal address of the forwarding token needs to be analyzed, and then the next hop path selection is carried out through the route.
In any case, before the token is sent, the destination terminal address of the token needs to be extracted, and whether an effective sending path exists between the sending terminal and the token receiving terminal is searched according to the route defined in fig. 5 and the path query interface defined by the token MAC protocol, if the effective sending path does not exist, the destination terminal is deleted from the token queue, a new queue head is selected from the queue again, and then the path query is performed; and if the optimal path exists, constructing a token by combining the address mark of the token frame and the address rule according to the inquired next hop address, and then sending the token frame.
Taking the topology in fig. 2 as an example, the present solution is explained in detail below, where the neighbor queues initialized by the terminal in the whole network are as follows:
initialization:
S4:S2 S3
S3:S2 S4
S2:S1 S3 S4
S1:S2
here, S1 is the initial originating end of the token, and it takes out the head of the queue S2 as the destination end of the token, and queries the route to select the best path, and at this time, according to the topology of fig. 2, the route feeds back the best path, so S1 constructs a token frame according to the above address rule, and sends the token directly to S2; the token address and address tag contents are detailed in table 8:
TABLE 8
Address flag bit MAC0 MAC1 MAC2 MAC3
00 S2 S1 NA NA
When S1 sends the token to S2, since S1 and S4 may have a "weak" channel in practical application and are not completely disconnected, S4 may or may not listen to the token frame of S1, and herein, assuming that S4 listens to the current transmission of S1, the queue change of each terminal is as follows:
S1—>S2
s4: S2S 3S 1 (monitor this transmission, increase S1 to the end of queue)
S3: S2S 4 (not monitoring this transmission)
S2: S3S 4S 1 (monitor this transmission, migrate S1 to the end of the team)
S1: s2 (it is the sending terminal and there is only one neighbor terminal in the queue, S2 remains as the head of the queue)
Next, after receiving the token of S1, S2 waits until the token is held overtime, selects the head of the local token passing queue as the destination terminal of token passing, that is, S3, queries the optimal route for routing, and at this time, according to the topology of fig. 2, the route feedback direct route is optimal, so S2 constructs a token frame according to the above address rules, and directly sends the token to S3; the token address and the address tag content are shown in table 9:
TABLE 9
Address flag bit MAC0 MAC1 MAC2 MAC3
00 S3 S2 NA NA
S2—>S3
S4: S3S 1S 2 (monitor this sending, send this terminal S2 to the end of the team)
S3: S4S 2 (monitor this sending, send this terminal S2 to the end of the team)
S2: S4S 1S 3 (it is the current transmitting terminal, moving the current transmitting destination terminal S3 to the end of the team)
S1: s2 (monitor this transmission and only one neighbor terminal in the queue, S2 remains as head of queue)
Next, after receiving the token, S3 queries the path in the same manner, and passes the token to S4; the token address and address tag contents are shown in table 10:
watch 10
Address flag bit MAC0 MAC1 MAC2 MAC3
00 S4 S3 NA NA
S3—>S4
S4: S1S 2S 3 (monitor this sending, send this terminal S3 to the end of the team)
S3: S2S 4 (is the current sending terminal, and moves the current sending destination terminal S4 to the end of the team)
S2: S4S 1S 3 (monitor this sending, send this terminal S3 to the end of the team)
S1: s2 (not monitoring this transmission)
Next, after S4 receives the token, because a weak channel exists between S1 and S4 when S1 sends the token, the head of the queue taken out by S4 is S1, according to the token passing method proposed in this scheme, S1 is used as a token destination terminal to query an optimal path provided by the route, and the routing protocol calculates that the rate levels of all paths from S4 to S1 are less than 1, the token is abandoned from S1, S1 is deleted from the queue, and S2 is selected as a token passing destination terminal to continue querying the optimal path of the route.
Further, since the rate class of the routing is calculated to be 1.5 in S4-S3-S2, which is the best path, the token constructs a token message according to the above address encapsulation rule, and sends the message to the relay S3, where the token address and the address flag content are shown in table 11:
TABLE 11
Address flag bit MAC0 MAC1 MAC2 MAC3
01 S3 S4 S2 NA
S3, after receiving the message, resolving the destination address of the message, finding that the message is a relay token, so the token is not held, and after inquiring the optimal route, reconstructing the token and sending the token to S2; the token address and address tag contents are shown in table 12:
TABLE 12
Address flag bit MAC0 MAC1 MAC2 MAC3
11 S2 S3 S4 NA
In this process, when the S3 forwards the relay packet, S4 also monitors the transmission, but S4 analyzes the packet to know that the token transmission is one-time relay forwarding, and then the S4 neighbor queue is kept unchanged.
Because S1 and S4 have "weak" channels, S1 may or may not monitor the transmission of S4, but after the new path selection method described in this scheme is adopted, no token is transmitted in the "weak" channel in any case, which wastes network bandwidth.
In the token passing process of S4-S2, each terminal queue changes as follows:
s4- > S3 (Relay)
S4: S3S 2 (the terminal itself is the current sending terminal, delete S1, and move the current sending destination terminal S2 to the end of the team)
S3: S2S 4 (monitor this sending, relay forwarding node, this sending terminal S4 to the end of the team)
S2: S1S 3S 4 (monitor this sending, send this terminal S4 to the end of the team)
S1: s2 (assuming S1 does not monitor this transmission)
S3- > S2 (Relay forwarding)
S4: S3S 2 (monitor this sending, but know not relay forwarding message after analyzing token, keep queue unchanged)
S3: S2S 4 (Relay terminal, queue remains unchanged)
S2: S1S 3S 4 (monitor this transmission, hold the token forwarded by the relay, keep the queue unchanged)
S1: s2 (not monitoring this transmission)
S2, after receiving the token, waiting for the held token to be overtime, and transmitting the token to S1; the token address and address tag contents are shown in table 13:
watch 13
Address flag bit MAC0 MAC1 MAC2 MAC3
00 S1 S2 NA NA
S2—>S1
S4: S3S 2 (monitor this sending, send this terminal S2 to the end of the team)
S3: S4S 2 (monitor this sending, send this terminal S2 to the end of the team)
S2: S3S 4S 1 (it is the current transmitting terminal, moving the current transmitting destination terminal S1 to the end of the team)
S1: s2 (monitor this sending, send this terminal S2 to the end of the team)
In conclusion, the scheme avoids meaningless transmission of the token on a 'weak' channel which is similar to disconnection and connection, reduces retransmission of the token and improves channel utilization efficiency compared with a traditional token transmission algorithm; compared with the traditional token passing method, the scheme increases the selection of the optimal passing path of the route, improves the reliability of token transmission, further reduces the cost of token passing and provides more network bandwidth for other services; after the wireless token passing method is applied, the robustness of the wireless token network is higher, and the network capacity is larger.
The following describes a wireless token passing apparatus according to an embodiment of the present invention, and the wireless token passing apparatus described below and the wireless token passing method described above may be referred to with each other.
Referring to fig. 8, an Ad Hoc network-based wireless token passing apparatus according to an embodiment of the present invention includes:
a destination terminal determining module 100, configured to determine a destination terminal to receive a token frame;
a path query module 200, configured to query an optimal transmission path from the terminal to a destination terminal through a routing protocol;
a target terminal determining module 300, configured to determine a target terminal of a next hop of the terminal by using the optimal transmission path;
a token frame construction module 400 for constructing a target token frame;
a token frame sending module 500, configured to send the target token frame to the target terminal.
The destination terminal determining module is specifically configured to: judging whether the terminal is a relay terminal; if so, determining a target terminal according to a token frame sent by the terminal of the previous hop; and if not, taking the head terminal in the token passing queue of the terminal as the target terminal.
The target terminal determination module is specifically configured to: judging whether the optimal transmission path is an empty path or not; if yes, deleting the head of line terminal in the token transmission queue of the terminal, selecting the current head of line terminal from the deleted token transmission queue, taking the current head of line terminal as the target terminal, and continuously executing the step of inquiring the optimal transmission path from the terminal to the target terminal through the routing protocol.
Wherein, the token frame construction module comprises:
the first token frame construction unit is used for determining address information carried by a target token frame according to the type of the terminal and the type of a target terminal; the types of the terminal include: the source terminal and the relay source terminal, the type of the target terminal includes: a destination terminal and a relay destination terminal;
if the terminal is a source terminal and the target terminal is a destination terminal, the constructed target token frame includes: a token destination address and a token source address; the destination address of the token is the address of the target terminal, and the source address of the token is the address of the terminal;
if the terminal is a source terminal and the target terminal is a relay target terminal, the constructed target token frame comprises: a token relay destination address, a token source address and a token destination address; the token relay destination address is the address of the target terminal, the token destination address is the address of the target terminal, and the token source address is the address of the terminal;
if the terminal is a relay source terminal and the target terminal is a relay target terminal, the constructed target token frame comprises: a token relay destination address, a token relay source address, a token destination address, and a token source address; the token relay destination address is the address of the target terminal, the token relay source address is the address of the terminal, the token destination address is the address of the target terminal, and the token source address is the address of the source terminal;
if the terminal is a relay source terminal and the target terminal is a target terminal, the constructed target token frame comprises: a token destination address, a token relay source address and a token source address; the destination address of the token is the address of the target terminal, the relay source address of the token is the address of the local terminal, and the source address of the token is the address of the source terminal.
Wherein, the token frame construction module further comprises:
the second token frame construction unit is used for determining the address flag bit carried by the target token frame according to the type of the terminal and the type of the target terminal;
if the terminal is a source terminal and the target terminal is a destination terminal, the address zone bit is a first address zone bit; if the terminal is a source terminal and the target terminal is a relay target terminal, the address zone bit is a second address zone bit; if the terminal is a relay source terminal and the target terminal is a relay target terminal, the address zone bit is a third address zone bit; and if the terminal is a relay source terminal and the target terminal is a target terminal, the address zone bit is a fourth address zone bit.
Wherein, this scheme still includes:
the token transmission queue management module is used for not updating the local token transmission queue if the monitored token frame is sent by the relay terminal after the token frame is monitored; and if the monitored token frame is sent by the source terminal, updating a local token transmission queue.
The embodiment of the invention also discloses a wireless token passing device, which comprises:
a memory for storing a computer program;
a processor for implementing the steps of the wireless token passing method in the above method embodiments when executing the computer program.
The embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when being executed by a processor, the computer program realizes the steps of the wireless token passing method in the embodiment of the method.
Wherein the storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A wireless token passing method based on Ad Hoc network is characterized by comprising the following steps:
determining a target terminal to receive the token frame;
inquiring an optimal transmission path from the terminal to a target terminal through a routing protocol;
determining a target terminal of the next hop of the terminal by using the optimal transmission path; the target terminal is the target terminal or a relay terminal between the terminal and the target terminal;
constructing a target token frame and sending the target token frame to the target terminal;
wherein the constructing the target token frame comprises:
determining address information carried by a target token frame according to the type of the terminal and the type of a target terminal; the types of the terminal include: the source terminal and the relay source terminal, the type of the target terminal includes: a destination terminal and a relay destination terminal;
if the terminal is a source terminal and the target terminal is a destination terminal, the constructed target token frame includes: a token destination address and a token source address; the destination address of the token is the address of the target terminal, and the source address of the token is the address of the terminal; if the terminal is a source terminal and the target terminal is a relay target terminal, the constructed target token frame comprises: a token relay destination address, a token source address and a token destination address; the token relay destination address is the address of the target terminal, the token destination address is the address of the target terminal, and the token source address is the address of the terminal; if the terminal is a relay source terminal and the target terminal is a relay target terminal, the constructed target token frame comprises: a token relay destination address, a token relay source address, a token destination address, and a token source address; the token relay destination address is the address of the target terminal, the token relay source address is the address of the terminal, the token destination address is the address of the target terminal, and the token source address is the address of the source terminal; if the terminal is a relay source terminal and the target terminal is a target terminal, the constructed target token frame comprises: a token destination address, a token relay source address and a token source address; the destination address of the token is the address of the target terminal, the relay source address of the token is the address of the local terminal, and the source address of the token is the address of the source terminal;
when determining the address information carried by the target token frame according to the type of the terminal and the type of the target terminal, the method further includes:
determining an address zone bit carried by a target token frame according to the type of the terminal and the type of a target terminal; if the terminal is a source terminal and the target terminal is a destination terminal, the address zone bit is a first address zone bit; if the terminal is a source terminal and the target terminal is a relay target terminal, the address zone bit is a second address zone bit; if the terminal is a relay source terminal and the target terminal is a relay target terminal, the address zone bit is a third address zone bit; and if the terminal is a relay source terminal and the target terminal is a target terminal, the address zone bit is a fourth address zone bit.
2. The method of claim 1, wherein the determining the destination terminal to receive the token frame comprises:
judging whether the terminal is a relay terminal;
if so, determining a target terminal according to a token frame sent by the terminal of the previous hop; and if not, taking the head terminal in the token passing queue of the terminal as the target terminal.
3. The method of claim 2, wherein if the terminal is not a relay terminal, determining a target terminal of a next hop of the terminal using the optimal transmission path comprises:
judging whether the optimal transmission path is an empty path or not;
if yes, deleting the head of line terminal in the token transmission queue of the terminal, selecting the current head of line terminal from the deleted token transmission queue, taking the current head of line terminal as the target terminal, and continuously executing the step of inquiring the optimal transmission path from the terminal to the target terminal through the routing protocol.
4. The wireless token passing method of any one of claims 1 to 3, further comprising:
after a terminal in the network monitors a token frame, if the monitored token frame is sent by a relay terminal, a local token transmission queue is not updated; and if the monitored token frame is sent by the source terminal, updating a local token transmission queue.
5. An Ad Hoc network-based wireless token passing apparatus, comprising:
the destination terminal determining module is used for determining a destination terminal to receive the token frame;
the route query module is used for querying the optimal transmission route from the terminal to the destination terminal through a routing protocol;
the target terminal determining module is used for determining the target terminal of the next hop of the terminal by utilizing the optimal transmission path;
the token frame construction module is used for constructing a target token frame;
the token frame sending module is used for sending the target token frame to the target terminal;
wherein, the token frame construction module comprises:
the first token frame construction unit is used for determining address information carried by a target token frame according to the type of the terminal and the type of a target terminal; the types of the terminal include: the source terminal and the relay source terminal, the type of the target terminal includes: a destination terminal and a relay destination terminal;
if the terminal is a source terminal and the target terminal is a destination terminal, the constructed target token frame includes: a token destination address and a token source address; the destination address of the token is the address of the target terminal, and the source address of the token is the address of the terminal; if the terminal is a source terminal and the target terminal is a relay target terminal, the constructed target token frame comprises: a token relay destination address, a token source address and a token destination address; the token relay destination address is the address of the target terminal, the token destination address is the address of the target terminal, and the token source address is the address of the terminal; if the terminal is a relay source terminal and the target terminal is a relay target terminal, the constructed target token frame comprises: a token relay destination address, a token relay source address, a token destination address, and a token source address; the token relay destination address is the address of the target terminal, the token relay source address is the address of the terminal, the token destination address is the address of the target terminal, and the token source address is the address of the source terminal; if the terminal is a relay source terminal and the target terminal is a target terminal, the constructed target token frame comprises: a token destination address, a token relay source address and a token source address; the destination address of the token is the address of the target terminal, the relay source address of the token is the address of the local terminal, and the source address of the token is the address of the source terminal;
wherein, the token frame construction module further comprises:
the second token frame construction unit is used for determining the address flag bit carried by the target token frame according to the type of the terminal and the type of the target terminal; if the terminal is a source terminal and the target terminal is a destination terminal, the address zone bit is a first address zone bit; if the terminal is a source terminal and the target terminal is a relay target terminal, the address zone bit is a second address zone bit; if the terminal is a relay source terminal and the target terminal is a relay target terminal, the address zone bit is a third address zone bit; and if the terminal is a relay source terminal and the target terminal is a target terminal, the address zone bit is a fourth address zone bit.
6. The wireless token passing apparatus of claim 5, further comprising:
the token transmission queue management module is used for not updating the local token transmission queue if the monitored token frame is sent by the relay terminal after the token frame is monitored; and if the monitored token frame is sent by the source terminal, updating a local token transmission queue.
7. A wireless token passing apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the wireless token passing method according to any one of claims 1 to 4 when executing said computer program.
8. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the wireless token passing method according to any one of claims 1 to 4.
CN201811148797.4A 2018-09-29 2018-09-29 Wireless token passing method, device, equipment and readable storage medium Active CN109068367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811148797.4A CN109068367B (en) 2018-09-29 2018-09-29 Wireless token passing method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811148797.4A CN109068367B (en) 2018-09-29 2018-09-29 Wireless token passing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN109068367A CN109068367A (en) 2018-12-21
CN109068367B true CN109068367B (en) 2021-11-19

Family

ID=64767012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811148797.4A Active CN109068367B (en) 2018-09-29 2018-09-29 Wireless token passing method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN109068367B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110365530A (en) * 2019-07-11 2019-10-22 电子科技大学 A kind of test token passing network independently of network-on-chip
CN110784244B (en) * 2019-09-24 2021-08-31 厦门蓝斯通信股份有限公司 Data transmission method and full-duplex Ad Hoc network system
CN110912794B (en) * 2019-11-15 2021-07-16 国网安徽省电力有限公司安庆供电公司 Approximate matching strategy based on token set
CN112104762B (en) * 2020-09-14 2023-05-12 南京南瑞继保电气有限公司 Online distribution method for addresses of sub-module controllers in multi-level converter
WO2022207113A1 (en) * 2021-04-01 2022-10-06 Huawei Technologies Co., Ltd. Devices and methods for allocating transmission rights in communication networks

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100452750C (en) * 2005-02-04 2009-01-14 西安电子科技大学 Token transfer and manage method for Ad Hoc network
CN102325071A (en) * 2006-06-26 2012-01-18 三菱电机株式会社 Communication node and token-ring communication method
CN103916215A (en) * 2014-03-14 2014-07-09 上海交通大学 Real-time moving Ad-hoc network achieving method based on token transmission mechanism
CN107371216A (en) * 2017-09-13 2017-11-21 湖南基石通信技术有限公司 A kind of token subnet website cut-in method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100452750C (en) * 2005-02-04 2009-01-14 西安电子科技大学 Token transfer and manage method for Ad Hoc network
CN102325071A (en) * 2006-06-26 2012-01-18 三菱电机株式会社 Communication node and token-ring communication method
CN103916215A (en) * 2014-03-14 2014-07-09 上海交通大学 Real-time moving Ad-hoc network achieving method based on token transmission mechanism
CN107371216A (en) * 2017-09-13 2017-11-21 湖南基石通信技术有限公司 A kind of token subnet website cut-in method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于WTRP网络的自适应令牌传递算法;杨斌等;《舰船电子工程》;20150531;全文 *
无线动态令牌协议及性能分析;孙献璞等;《电子学报》;20091031;全文 *

Also Published As

Publication number Publication date
CN109068367A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
CN109068367B (en) Wireless token passing method, device, equipment and readable storage medium
US7330694B2 (en) Method for setting up route path through route discovery in a mobile ad hoc network using partial route discovery
US8031720B2 (en) Packet transfer system, radio base station, and packet transfer route optimization method
JP4800067B2 (en) Communication node and routing method
US8213352B2 (en) Wireless communication system, wireless communication device, wireless communication method, and program
US20160150459A1 (en) Techniques to support heterogeneous network data path discovery
JP4679616B2 (en) Wireless LAN relay device, wireless LAN relay method, and computer program
US7751332B2 (en) Data routing method and apparatus
CN106454984B (en) Routing method and device
US20060285510A1 (en) Method and apparatus for transferring frames in extended wireless LAN
JP6801191B2 (en) Wireless communication systems, wireless communication devices, and wireless communication programs
US9380513B2 (en) Reducing broadcast duplication in hybrid wireless mesh protocol routing
KR100772397B1 (en) Method and apparatus for forwarding station informaion in wireless mesh network
CN113259864B (en) Narrow-band communication method, interphone, equipment, storage medium and ad hoc network system
JP4918900B2 (en) Wireless multi-hop network, node, multicast routing method and program
CN106953683B (en) Route realization method suitable for large-scale dynamic networking based on MF-TDMA satellite channel
US20040233847A1 (en) Routing system for establishing optimal route in wireless personal area network (WPAN) and method thereof
JP2006519515A (en) Method and base station for transmission of information in a cellular radio communication system extended with ad hoc connection
WO2013042209A1 (en) Data transfer method and node device employing same
JP4167226B2 (en) Method for use in an ad hoc mode WLAN system
CN111510982B (en) Data transmission method and device
JP2009260720A (en) Route control method, communication system and communication apparatus
CN110996266B (en) Multicast group data transmission method of ad hoc network system
CN113055945A (en) Load balancing method and mobile ad hoc network
JPWO2008114327A1 (en) Address resolution method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant