FIELD
[0001] The embodiments discussed herein are related to a transfer destination selecting
method, a transfer destination selecting program, and a communication device.
BACKGROUND
[0002] In an ad-hoc network, nodes that join the network autonomously form a communication
route, and data is transferred between adjacent nodes. Accordingly, data is transferred
from a transmission source node that transmits the data up to a destination node.
[0003] As a related technology, a technology has been proposed that registers a transfer
source and a transmission source of a frame in a registration table when the frame
is received from a device that is not registered in a route information table, so
as to use the transfer source and the transmission source as route information (see,
for example, Patent Document 1).
[0004] Further, a technology has been proposed that distributes a traffic load on an integral
part located upstream of a tree structure with a gateway at the top (see, for example,
Patent Document 2).
Patent Document 1: International Publication Pamphlet No. WO 2012/133521
Patent Document 2: International Publication Pamphlet No. WO 2013/129671
SUMMARY
[0005] Accordingly, it is an object in one aspect of the embodiment to distribute a communication
load in a network.
[0006] According to an aspect of the embodiments, a transfer destination selecting method
conducted by a communication device includes selecting, when the communication device
stores, according to a destination, pieces of information indicating a plurality of
other communication devices that are candidates for a transfer destination of data,
one of the other communication devices to be the transfer destination from among the
candidates on the basis of a number of destinations in a routing table used for controlling
a data transfer and stored in the plurality of other communication devices, respectively.
BRIEF DESCRIPTION OF DRAWINGS
[0007]
FIG. 1 illustrates an example of an ad-hoc network according to an embodiment;
FIG. 2 illustrates an example of a node;
FIG. 3 is a diagram (Part 1) that illustrates the ad-hoc network according to the
embodiment and an example of a routing table;
FIG. 4 is a diagram (Part 2) that illustrates the ad-hoc network according to the
embodiment and an example of the routing table;
FIG. 5 is a diagram (Part 3) that illustrates the ad-hoc network according to the
embodiment and an example of the routing table;
FIG. 6 is a diagram (Part 1) that illustrates an example of a report about the number
of uses;
FIG. 7 is a diagram (Part 2) that illustrates an example of the report about the number
of uses;
FIG. 8 is a diagram (Part 4) that illustrates the ad-hoc network according to the
embodiment and an example of the routing table;
FIG. 9 illustrates an example of a data frame;
FIG. 10 is a diagram (Part 5) that illustrates the ad-hoc network according to the
embodiment and an example of the routing table;
FIG. 11 is a flowchart (Part 1) that illustrates an example of a flow of processing
according to the embodiment;
FIG. 12 is a flowchart (Part 2) that illustrates an example of a flow of processing
according to the embodiment;
FIG. 13 is a flowchart (Part 3) that illustrates an example of a flow of processing
according to the embodiment;
FIG. 14 is a diagram (Part 1) that illustrates a variation of the ad-hoc network and
an example of the routing table;
FIG. 15 is a diagram (Part 2) that illustrates a variation of the ad-hoc network and
an example of the routing table;
FIG. 16 is a diagram (Part 3) that illustrates a variation of the ad-hoc network and
an example of the routing table;
FIG. 17 is a flowchart that illustrates an example of a flow of processing according
to the variations; and
FIG. 18 is a diagram that illustrates an example of a hardware configuration of a
node.
DESCRIPTION OF EMBODIMENTS
[0008] In an ad-hoc network, a communication route is formed autonomously. There is a possibility
that a communication load will be concentrated on a specific node depending on the
network configuration or the communication state in the ad-hoc network.
<Example of Ad-hoc Network According to Embodiments>
[0009] FIG. 1 illustrates an example of an ad-hoc network 1 according to an embodiment.
The ad-hoc network 1 is not limited to the example of FIG. 1. A gateway GW and sensor
nodes N0 to N8 join the ad-hoc network 1 of FIG. 1. The sensor nodes N0 to N8 may
be collectively referred to as a sensor node N.
[0010] The sensor node N is, for example, a node that measures a power or a temperature
and transmits a measurement value. In the embodiment, it is assumed that each sensor
node N transmits a measurement value to the gateway GW. A node other than the sensor
node N may join the ad-hoc network 1.
[0011] For example, a node for relaying a data transfer (hereinafter referred to as a relay
node R) may join the ad-hoc network 1. Further, any node other than the sensor node
N and the relay node R may join the ad-hoc network 1. An example in which the relay
node R joins the ad-hoc network 1 will be described later.
[0012] The sensor node N and the relay node R may hereinafter be collectively referred to
as a node. The node is an example of a communication device. Further, a node adjacent
to a certain node is an example of another communication device.
[0013] A censor node N communicates with another sensor node N that is adjacent to the censor
node N (hereinafter referred to as an adjacent sensor node N). The communication performed
between two sensor nodes N that are adjacent to each other may be a radio communication
or may be a wire communication.
[0014] FIG. 1 illustrates an example in which the number of sensor nodes N is nine, but
there may be any number of sensor nodes N. For example, the ad-hoc network 1 may include
a thousand or more nodes.
[0015] In the example of FIG. 1, "distance" is notated near each sensor node N. The distance
of each sensor node N indicates the number of nodes originating from the gateway GW
up to the sensor node N. For example, the sensor node N1 is adjacent to the gateway
GW, so its distance is "1".
[0016] Further, there exists the sensor node N0 or the sensor node N1 on the communication
route between the sensor node N3 and the gateway GW, so the distance of the sensor
node N3 is "2".
[0017] For example, when there is another sensor node N between the sensor node N0 and the
sensor node N3, the distance of the sensor node N3 with respect to the communication
route through the sensor node N0 is "3". Further, the distance of the sensor node
N3 with respect to the communication route through the sensor node N1 is "2".
[0018] The number obtained by subtracting "1" from a distance of each sensor node N indicates
the number of times that data is transferred (the number of transfers) . For example,
when data is transferred from the sensor node N5 to the gateway GW, the sensor node
N3 and the sensor node N1 (or the sensor node N0) perform a data transfer, so the
number of transfers is two.
[0019] For example, the gateway GW broadcasts a gateway advertisement to each sensor node
N. The gateway advertisement is data for the gateway GW to report its existence to
each node that joins the ad-hoc network 1. The gateway GW may transmit a gateway advertisement
that is to be reported within a limited range.
[0020] When receiving a gateway advertisement, each sensor node N stores information on
a distance in a routing table. The routing table is a table that is used for controlling
a data transfer. The routing table is also referred to as a route information table.
<Example of Each Node>
[0021] FIG. 2 illustrates an example of a node. The node includes a communication unit 11,
a processing unit 12, a storage 13, a random number generator 14, a selector 15, and
a clock unit 16. The node may be a sensor node N or a relay node R.
[0022] The sensor node N and the relay node R may include a function other than the components
of FIG. 2. For example, the sensor node N may incorporate therein a sensor that measures
a power or a temperature.
[0023] The communication unit 11 communicates with an adjacent sensor node N. For example,
when the sensor node N performs a radio communication, a communication unit 11 of
the sensor node N communicates directly with a communication unit 11 of the adjacent
sensor node N. Thus, the sensor node N and the adjacent sensor node N are installed
within a range in which radio waves from each other are able to reach.
[0024] The processing unit 12 performs prescribed processing on the basis of data received
by the communication unit 11. The storage 13 stores therein a routing table and a
time threshold. The time threshold is a threshold that serves as a baseline when times
indicated by the clock unit 16 are compared. The storage 13 may store therein information
other than a routing table. The random number generator 14 generates a random number.
[0025] The selector 15 selects, according to a destination of the data received by the communication
unit 11, a sensor node N that is a transfer destination of the data. The selector
15 refers to the routing table stored in the storage 13 and selects a transfer destination
of the data.
[0026] In the ad-hoc network 1, the destination of data indicates a node that is a final
destination of the data. The destination of data indicates a node to which a certain
node transfers data subsequently. Thus, when the certain node is set to be a base,
the transfer destination of the data is a node that is adjacent to the certain node.
[0027] It is hereinafter assumed that the destination of data is the gateway GW. However,
the destination of data may be any sensor node N. There may be one or a plurality
of communication routes from a sensor node N to the gateway GW.
[0028] When a certain sensor node has a plurality of communication routes up to the gateway
GW that is the destination, there are a plurality of candidate sensor nodes N to which
data is to be transferred by the certain sensor node N (adjacent sensor nodes N).
When there are a plurality of candidates for a transfer destination of data, the selector
15 selects one sensor node N from among the plurality of candidates for a destination.
The clock unit 16 presents a current time.
<Example of Number of Uses for Node>
[0029] Next, the number of uses for a node is notated with reference to FIG. 3. FIG. 3 illustrates
the ad-hoc network 1 of FIG. 1 and an example of a routing table of the sensor node
N2 which joins the ad-hoc network 1.
[0030] Each sensor node N performs data communication with an adjacent sensor node N. Each
sensor node N may update its routing table on the basis of the information included
in data received from the adjacent sensor node N. For example, when the sensor node
N2 receives data from the sensor node N1, the sensor node N2 may update the routing
table on the basis of the information included in received data.
[0031] It is assumed that routing tables of the respective sensor nodes N of and after FIG.
3 are routing tables that have been updated as a result of performing the following
six data communications:
- 1) Data communication from the sensor node N6 to the gateway GW
- 2) Data communication from the sensor node N7 to the gateway GW
- 3) Data communication from the sensor node N8 to the gateway GW
- 4) Data communication from the gateway GW to the sensor node N6
- 5) Data communication from the gateway GW to the sensor node N7
- 6) Data communication from the gateway GW to the sensor node N8
[0032] As illustrated in the example of FIG. 3, the routing table includes items such as
a global destination (GD), an local destination (LD), a distance, a usage time, a
type of device, and a number of uses. The routing table may include an item of other
information.
[0033] The GD indicates an address of a sensor node N that is a destination of data. The
GD registered in the routing table may be referred to as an entry. The number of GDs
registered in the routing table (the number of entries) is an example of the number
of destinations.
[0034] As described above, data communications are performed between the sensor node N7
and the gateway GW, and between the sensor node N8 and the gateway GW. In the example
of FIG. 3, the GDs are the gateway GW, the sensor node N7, and the sensor node N8
in the routing table of the sensor node N2.
[0035] The local destination (LD) indicates an address of a transfer-destination sensor
node N on a communication route through which data is to be transferred to the GD.
In the example of the routing table of FIG. 3, the LD in an entry in which the GD
is the gateway GW is the sensor node N1.
[0036] The distance in the routing table is the distance described above. With respect to
the sensor node N2, the distance up to the gateway GW that is a GD is "2". In this
case, the number of transfers of data from the sensor node N2 up to the gateway GW
is "1".
[0037] The usage time indicates the time at which each entry was referred to the last time.
The selector 15 of the sensor node N refers to the routing table so as to control
a data transfer. For example, when the sensor node N2 transfers data to the gateway
GW, a selector 15 of the sensor node N2 refers to an entry, in the routing table,
in which the GD is the gateway GW.
[0038] When the selector 15 refers to the entry, the selector 15 registers a current time
presented by the clock unit 16 in the routing table as a corresponding usage time
of the referred to entry. Accordingly, the time at which the entry was referred to
is registered in the entry in the routing table.
[0039] In the example of FIG. 3, "14:30" is the usage time in the entry in which the GD
is the gateway GW in the routing table of the sensor node N2. Thus, the time at which
the selector 15 referred to the entry last time is "14:30".
[0040] The type of device refers to information that indicates types of nodes that are described
as the LDs (information on a type of device) . The information on a type of device
is also referred to as a device address.
[0041] For example, the node is a sensor node N or a relay node R. In this case, the sensor
node N and the relay node R are different from each other in type of device. The sensor
node N is a communication device that transmits a value obtained by measuring a power
or a temperature, and often has a lower throughput of communication than that of the
relay node R intended for performing communication.
[0042] In the embodiment, the type of device of the sensor node N is "1", and the type of
device of the relay node R is "2". There may be three or more types of devices. For
example, when there are a plurality of types of relay nodes, pieces of information
on types of device of the plurality of types of relay nodes may be different from
one another according to the throughput of communication.
[0043] For example, each sensor node N may mutually communicate with an adjacent sensor
node N, recognize a type of device of the adjacent sensor node N, and register the
type of device of the adjacent sensor node N in a routing table. Further, when the
type of device of the adjacent sensor node N is known, the type of device of the adjacent
sensor node N may be registered, in advance, in the routing table of each sensor node
N.
[0044] Next, the number of uses is described. The number of uses is the number of entries
obtained by excluding, from the entries in the routing table of the sensor node N,
an entry that is not referred to for a prescribed period of time or longer (the number
of destinations). The prescribed period of time is a time threshold which the storage
13 stores therein. It is hereinafter assumed that the prescribed period of time (time
threshold) is three hours.
[0045] In the embodiment, the number of uses is used for the selector 15 of the sensor node
N selecting a transfer destination of data. For example, it is assumed that time (current
time) presented by the clock unit 16 is "15:00", as illustrated in the example of
FIG. 3. In this case, in the routing table, an entry (GD) in which a time before "12:00"
is notated as the usage time is not referred to for the prescribed period of time
or longer.
[0046] An entry that is not referred to for the prescribed period of time or longer is to
be excluded. On the other hand, in the routing table, an entry (GD) in which a time
after "12:00" is notated as the usage time is referred to between the current time
and the prescribed period of time ago. An entry that was referred to between the current
time and the prescribed period of time ago is not to be excluded.
[0047] In the example of FIG. 3, all of the usage times in the three entries registered
in the routing table are times after "12 : 00". Thus, the three entries registered
in the routing table in the example of FIG. 3 are not to be excluded.
[0048] Thus, in the routing table of the sensor node N2, there does not exist any entry
that is not referred to for the prescribed period of time or longer. As a result,
there is no entry to be excluded, so the number of uses for the sensor node N2 is
"3". In this case, the number of uses is the same as the number of entries, in the
routing table, in which the GD is the gateway GW.
[0049] The number of uses registered in the routing table corresponds to the LD. The number
of uses in the routing table indicates the number of uses for a corresponding LD.
For example, in the example of FIG. 3, the number of uses for the sensor node N1 and
the number of uses for the sensor node N5 are registered in the routing table of the
sensor node N2.
[0050] Next, the number of uses for the sensor node N3 is described with reference to FIG.
4. FIG. 4 illustrates the ad-hoc network 1 of FIG. 1 and an example of a routing table
of the sensor node N3 which joins the ad-hoc network 1.
[0051] In the ad-hoc network 1 in the example of FIG. 4, there are a communication route
through the sensor node N0 and a communication route through the sensor node N1 as
a communication route from the sensor node N3 up to the gateway GW.
[0052] Thus, in the routing table of the sensor node N3, two LDs, the sensor node N0 and
the sensor node N1, are registered in an entry in which the GD is the gateway GW.
In this case, a plurality of LDs are registered in one entry.
[0053] In the example of FIG. 4, the usage times in entries, in the routing table of the
sensor node N3, in which the GDs are the gateway GW and the sensor node N8 are times
after "12:00". Thus, these entries are not to be excluded.
[0054] On the other hand, the usage time in an entry, in the routing table of the sensor
node N3, in which the GD is the sensor node N7 is "11:30", which is a time before
"12:00". Thus, this entry is to be excluded. In FIG. 4 onwards, an entry to be excluded
is depicted by shading in each corresponding figure.
[0055] The number of entries in the routing table of the sensor node N3 is "3". Further,
one entry is to be excluded. Thus, the number of uses for the sensor node N3 is "2",
which is obtained by subtracting the number of entries to be excluded from the number
of entries in the routing table.
[0056] Each sensor node N refers to a routing table so as to control a data transfer. Thus,
a transfer of data whose destination is a GD in an entry that is not referred to for
a long period of time is not performed for a long period of time.
[0057] For example, in the example of FIG. 4, an entry, in the routing table of the sensor
node N3, in which the GD is the sensor node N7 is not referred to for the prescribed
period of time or longer. Thus, the sensor node N3 does not perform a transfer of
data whose destination is the sensor node N7 for a long period of time.
[0058] Thus, when the current time is a baseline, it is presumed that the sensor node N3
is less likely to perform a transfer of data whose destination is the sensor node
N7. Thus, in the example of FIG. 4, it is presumed that there are two destinations,
the gateway GW and the sensor node N8, for a data transfer which the sensor node N3
is more likely to perform.
[0059] The number of uses in the embodiment refers to the number of destinations for which
the sensor node N is more likely to perform a data transfer. The number of uses for
the sensor node N2 is "3". The number of uses for the sensor node N3 is "2". Thus,
the number of destinations for which the sensor node N3 is more likely to perform
a data transfer is fewer than that of the sensor node N2. In this case, it is presumed
that the sensor node N3 is under a communication load that is lighter than the sensor
node N2.
[0060] Next, the number of uses for the sensor node N4 is described with reference to FIG.
5. FIG. 5 illustrates the ad-hoc network 1 of FIG. 1 and an example of a routing table
of the sensor node N4 which joins the ad-hoc network 1.
[0061] In the example of FIG. 5, four entries in which the GDs are the gateway GW, the sensor
node N6, the sensor node N7, and the sensor node N8 are registered in the routing
table of the sensor node N4. From among them, the usage time in the entry in which
the GD is the sensor node N6 is "12:30", which is a time after "12:00".
[0062] Thus, the entry of the sensor node N6 in the routing table is not to be excluded.
On the other hand, the usage times in the entries in which the GDs are the gateway
GW, the sensor node N7, and the sensor node N8 are times before "12:00", which is
the time corresponding to the time threshold before the current time. Thus, these
entries are to be excluded because they are not referred to for the prescribed period
of time or longer.
[0063] Thus, the number of uses for the sensor node N4 is "1" because three entries are
excluded from the four entries. As described above, the number of uses for the sensor
node N2 is "3", and the number of uses for the sensor node N3 is "2".
[0064] As a result, from among the sensor node N2, the sensor node N3, and the sensor node
N4, the number of uses for the sensor node N4 is fewest. In other words, it is presumed
that a sensor node N that is under a lightest communication load from among the sensor
node N2, the sensor node N3, and the sensor node N4 is the sensor node N4.
<Example of Report About Number of Uses>
[0065] Next, a report about the number of uses is described. FIG. 6 illustrates an example
in which each sensor node N reports the number of uses to an adj acent sensor node
N by use of a gateway advertisement. The gateway advertisement is an example of data
to be transmitted from a gateway. An arrow illustrated in FIG. 6 indicates a gateway
advertisement to be transferred.
[0066] In the example of FIG. 6, the gateway advertisement is data that includes pieces
of information on an LD, an LS, a GD, a GS, a distance, the number of uses, and data
to be transmitted. The LD is the local destination described above. The local source
(LS) indicates an address of a transfer-source sensor node N when a data frame is
transferred.
[0067] The GD is the global destination described above. The global source (GS) indicates
an address of a sensor node N that generates data. The distance indicates a distance
from the gateway GW up to a sensor node N. The number of uses indicates the number
of uses for a sensor node N. The data to be transmitted is prescribed information
included in a gateway advertisement.
[0068] For example, the gateway GW broadcasts a gateway advertisement. A communication unit
11 of the sensor node N1 receives the gateway advertisement. When the sensor node
N1 transfers the gateway advertisement to the sensor node N2, a processing unit 12
of the sensor node N1 rewrites the LS in the gateway advertisement with the sensor
node N1.
[0069] Further, the processing unit 12 rewrites the number of uses in the gateway advertisement
with the number of uses for the sensor node N1 (=4) and increments the distance in
the gateway advertisement. The sensor node N1 is adjacent to the gateway GW, so the
distance in the gateway advertisement received by the sensor node N1 from the gateway
GW is zero. Thus, the processing unit 12 increments the distance in the gateway advertisement
so that the distance in the gateway advertisement becomes "1".
[0070] The communication unit 11 of the sensor node N1 transfers, to the sensor node N2,
the gateway advertisement in which the information has been rewritten by the processing
unit 12. A communication unit 11 of the sensor node N2 receives the transferred gateway
advertisement.
[0071] A processing unit 12 of the sensor node N2 registers, in a routing table, the number
of uses for the sensor node N1 (=4) that is included in the gateway advertisement.
Further, the processing unit 12 rewrites the content of the gateway advertisement.
[0072] The communication unit 11 of the sensor node N2 transfers, to the sensor node N5,
the gateway advertisement in which the information has been rewritten. A communication
unit 11 of the sensor node N5 receives the gateway advertisement transmitted from
the sensor node N2. A processing unit 12 of the sensor node N5 registers, in a routing
table, the number of uses for the sensor node N2 (=3) that is included in the gateway
advertisement.
[0073] As illustrated in the example of FIG. 6, the gateway advertisement is data to be
broadcast, so the LD is not designated.
[0074] Next, referring to the example of FIG. 7, an example in which the number of uses
is reported by use of an acknowledgement signal (ACK) is described. It is assumed
that the sensor node N0 transmits data (hereinafter referred to as a data frame) to
the sensor node N4. When it receives the data frame, the sensor node N4 transmits,
to the sensor node N0, an ACK indicating that it has received a data frame.
[0075] In the example of FIG. 7, a dashed arrow indicates a data frame transmitted from
the sensor node N0 to the sensor node N4, and a solid arrow indicates an ACK.
[0076] A processing unit 12 of the sensor node N4 includes the number of uses (=1) in the
ACK to be transmitted to the sensor node N0. A communication unit 11 of the sensor
node N4 transmits the ACK to the sensor node N0. A communication unit 11 of the sensor
node N0 receives the ACK. A communication unit 12 of the sensor node N0 registers,
in a routing table, the number of uses for the sensor node N4 (=1) that is included
in the ACK.
<Example of Route Selection Based on Number of Uses>
[0077] Next, referring to the example of FIG. 8, an example of a route selection based on
the number of uses is described. FIG. 8 illustrates an example in which the sensor
node N7 transmits a data frame whose destination is the gateway GW. A processing unit
12 of the sensor node N7 generates a data frame to be transmitted. Arrows in the ad-hoc
network 1 of FIG. 8 indicate a communication route through which the data frame is
transferred.
[0078] FIG. 9 illustrates an example of a data frame. The data frame in the example of FIG.
9 includes items such as an LD, an LS, a GD, a GS, and data to be transmitted. The
data frame may include other information. For example, the data frame may include,
for example, information that guarantees the validity of the data frame and information
on a length of the data frame.
[0079] Only the sensor node N5 is adjacent to the sensor node N7. Thus, the processing unit
12 of the sensor node N7 generates a data frame that indicates the sensor node N5
to be the LD, the sensor node N7 to be the LS, the gateway GW to be the GD, and the
sensor node N7 to be the GS.
[0080] As illustrated in FIG. 8, the sensor node N7 transfers the data frame to the sensor
node N5. The communication unit 11 of the sensor node N5 receives the data frame transferred
from the sensor node N7. A selector 15 of the sensor node N5 refers to the GD in the
received data frame so as to recognize that the GD in the data frame is the gateway
GW.
[0081] The selector 15 refers, in a routing table stored in the storage 13, to an entry
in which the GD is the gateway GW. As illustrated in the example of FIG. 8, the entry
of the GD includes three LDs.
[0082] When the sensor node N5 transfers a data frame whose destination is the gateway GW,
the sensor node N2, the sensor node N3, and the sensor node N4 that are the three
LDs included in the entry of the GD registered in the routing table are candidates
for a next transfer destination.
[0083] The selector 15 selects a sensor node N having a fewest number of uses from among
the candidates for a transfer destination of the data frame. In the example of FIG.
8, the number of uses for the sensor node N4 is fewest. Thus, the selector 15 selects
the sensor node N4 from among the candidates for a transfer destination.
[0084] The communication unit 11 of the sensor node N5 transfers the data frame to the sensor
node N4 selected by the selector 15. The data frame is transferred to the sensor node
N4, and after that, it is transferred to the sensor node N0. Then, the data frame
is transferred from the sensor node N0 to the gateway GW.
[0085] When there are a plurality of candidates for a transfer destination of the data frame,
the selector 15 of the sensor node N5 selects a transfer destination of the data frame
on the basis of the number of uses for each candidate. As described above, the sensor
node N4 having a fewer number of uses is presumed to be under a lighter communication
load, and the sensor node N2 having a larger number of uses is presumed to be under
a heavier communication load.
[0086] When the data frame is transferred to the sensor node N2 that is under a heavy communication
load, there is a possibility that the sensor node N2 will be under a much heavier
communication load. In this case, for example, there is a possibility that, for example,
an increase in power consumption or a pressure on a bandwidth will occur in the sensor
node N2. Thus, a concentration of a communication load on a specific node is not preferable.
[0087] Then, the selector 15 of the sensor node N5 selects the sensor node N4 that is presumed
to be under a light communication load as a transfer destination of the data frame.
The selector 15 of each sensor node N that joins the ad-hoc network 1 selects a sensor
node N having a fewest number of uses as a transfer destination of a data frame, which
results in distributing a communication load.
[0088] In the example of FIG. 8, the communication unit 11 of the sensor node N5 transfers
the data frame to the sensor node N4 selected by the selector 15. A selector 15 of
the sensor node N4 refers, in a routing table, to an entry in which the GD is the
gateway GW.
[0089] The selector 15 of the sensor node N4 registers a time presented by a clock unit
16 of the sensor node N4 as a usage time in an entry, in the routing table, in which
the GD is the gateway GW. It is assumed that, as illustrated in the example of FIG.
10, the registered usage time is "15:05".
[0090] Before the usage time was newly registered, the entry in which the GD is the gateway
GW in the routing table of the sensor node N4 was not referred to for the prescribed
period of time or longer, so the entry was to be excluded.
[0091] When the usage time is newly registered, in the routing table of the sensor node
N4, the entry in which the GD is the gateway GW was referred to between the current
time and the prescribed period of time ago. Thus, this entry is now not to be excluded.
As a result, the number of uses for the sensor node N4 is "2".
[0092] Accordingly, when the selector 15 of the sensor node N5 selects, from among the candidates
for a transfer destination, the sensor node N4 having a fewest number of uses as a
transfer destination, the number of uses for the sensor node N4 selected to be a transfer
destination increases by one. Thus, the number of uses for a candidate for a transfer
destination changes every time the sensor node N5 transfers a data frame.
[0093] Therefore, a sensor node N selected by the selector 15 of the sensor node N5 changes.
In other words, the sensor node N5 transfers, according to an actual communication
state, a data frame to a sensor node N that is presumed to be under a light communication
load, so there is no possibility of any concentration of a communication load on a
specific sensor node N. This results in distribution of a communication load.
[0094] In the example described above, the selector 15 of a sensor node N selects a transfer
destination on the basis of the number of uses for a candidate for a transfer destination.
The number of uses is the number of entries obtained by excluding, from the entries
in a routing table of a candidate for a transfer destination (the number of destinations),
an entry that is not referred to for a prescribed period of time or longer.
[0095] The selector 15 of the sensor node N may select a transfer destination on the basis
of the number of entries for a candidate for a transfer destination (the number of
destinations) . In this case, the selector 15 of the sensor node N selects a transfer
destination on the basis of the number of entries in a state in which any entry is
not excluded. Then, the selector 15 of the sensor node N transfers a data frame to
another sensor node N having a fewest number of entries from among the candidates
for a transfer destination.
[0096] The number of entries for a candidate for a transfer destination to which a sensor
node N transfers a data frame may change according to various factors. For example,
the sensor node N may delete an entry from a routing table due to a communication
failure.
[0097] Further, when a new sensor node N joins the ad-hoc network 1, a new entry may be
added to a routing table of the sensor node N. Thus, the number of entries for a candidate
for a transfer destination (the number of destinations) to which the sensor node N
transfers a data frame changes, so there is no possibility of any concentration of
a communication load on a specific sensor node N. This results in distribution of
a communication load.
<Flowchart of Embodiment>
[0098] Next, flowcharts that illustrate examples of flows of processing according to the
embodiment are described. First, a flow of a sensor node N performing processing of
registering the number of uses for an adjacent sensor node N in a routing table is
described with reference to FIG. 11. The processing of FIG. 11 is performed by each
sensor node N.
[0099] When a certain sensor node N does not receive a gateway advertisement or an ACK (NO
in Step S1), the process does not move on to the next step. When the certain sensor
node N receives a gateway advertisement or an ACK (YES in Step S1), the processing
unit 12 identifies a sensor node N from among the LDs that are included in the received
gateway advertisement or the received ACK (Step S2).
[0100] The processing unit 12 extracts the number of uses from the received gateway advertisement
or the received ACK (Step S3). The extracted number of uses is the number of entries
obtained by excluding, from the entries in a routing table of the certain sensor node
N, an entry that is not referred to for a prescribed period of time.
[0101] The processing unit 12 registers the extracted number of uses in the routing table
according to the identified sensor node N (Step S4) . Accordingly, the number of uses
for an adjacent sensor node N that has transmitted the gateway advertisement or the
ACK is registered in the routing table of the certain sensor node N.
[0102] Next, processing of transferring a data frame is described with reference to the
flowchart of FIG. 12. The processing of FIG. 12 is performed by each sensor node N.
[0103] When a communication unit 11 of the certain sensor node N does not receive a data
frame (NO in Step S11), the certain sensor node N does not perform a transfer of a
data frame. In this case, the process does not move on to the next step.
[0104] When the communication unit 11 of the certain sensor node N receives a data frame
(YES in Step S11), a selector 15 of the certain sensor node N extracts a sensor node
N that is described as the GD in the received data frame (Step S12).
[0105] In the routing table, the selector 15 updates the usage time in an entry which corresponds
to the extracted GD (Step S13) . In the routing table, the selector 15 extracts a
candidate sensor node N for a transfer destination from the LDs in an entry which
corresponds to the GD in the data frame (Step S14).
[0106] In the routing table, the number of LDs in the entry corresponding to the GD in the
data frame may be one or plural. When there is one LD in the entry corresponding to
the GD, the number of candidate sensor nodes N for a transfer destination is one.
When there are a plurality of LDs in the entry corresponding to the GD, the number
of candidates for a transfer destination is plural.
[0107] When there is one candidate for a transfer destination (NO in Step S15), the selector
15 selects the extracted transfer-destination sensor node N. The processing unit 12
sets the transfer-destination sensor node N selected by the selector 15 to the LD
of the data frame to be transferred (Step S16).
[0108] On the other hand, when there are a plurality of candidate sensor nodes N for a transfer
destination (YES in Step 15), the selector 15 performs processing of selecting a transfer-destination
sensor node N from among the plurality of candidates (Step S17). The processing unit
12 sets the transfer-destination sensor node N selected by the selector 15 to the
LD of the data frame to be transferred (Step S18).
[0109] The communication unit 11 transfers the data frame to the set sensor node N described
as the LD (Step S19). Then, the processing is terminated. The processing described
above is performed every time the communication unit 11 receives a data frame.
[0110] Next, the processing of selecting a transfer-destination node in Step S17 is described
with reference to the flowchart of FIG. 13. In the routing table, the selector 15
of the certain sensor node N extracts the number of uses for each of the LDs in the
entry that corresponds to a destination (GD) of the data frame received by the communication
unit 11 (Step S21). Each of the extracted LDs is a candidate transfer destination
of the data frame.
[0111] When there is one sensor node N having a fewest number of uses from among the LDs
in the entry that corresponds to the destination (GD) of the data frame (NO in Step
S22), the candidate destinations to which the data frame is to be transferred are
narrowed down to one. The selector 15 selects a sensor node N having a fewest number
of uses as a transfer destination (Step S23).
[0112] When there are a plurality of sensor nodes N having a fewest number of uses from
among the LDs in an entry that corresponds to the destination (GD) of the data frame
(YES in Step S22), the candidates for a transfer destination of the data frame are
not narrowed down to one.
[0113] In this case, the selector 15 adds a random number generated by the random number
generator 14 to the number of uses for a sensor node N that is a candidate for selection
(Step S24). Then, differences occur between the numbers of uses for the sensor nodes
N that are candidates for selection, which results in narrowing down the sensor nodes
N for a transfer destination of the data frame to one.
[0114] In Step S24, with respect to the number of uses for each candidate, the selector
15 may perform subtraction or addition of the random number generated by the random
number generator 14, or may perform division by it. The selector 15 may perform any
operation using the random number with respect to the number of uses for each candidate.
[0115] The selector 15 selects, on the basis of a result of the addition of the random number
to the number of uses, a sensor node N having a fewest number of uses as a transfer
destination (Step S25). When the process of Step S23 or Step S25 is performed, the
processing of selecting a transfer-destination node is terminated.
<Variations>
[0116] Next, variations are described. The sensor node N5 is adjacent to a relay node R4
in the ad-hoc network 1 in the example of FIG. 14. Further, the relay node R4 is adjacent
to a relay node R0.
[0117] As described above, the relay node R0 and the relay node R4 often have a higher throughput
of communication than that of a sensor node N. In the example of FIG. 14, it is assumed
that the sensor node N7 transfers a data frame whose destination is the gateway GW
to the sensor node N5.
[0118] The selector 15 of the sensor node N5 refers to a routing table and extracts each
of the LDs in an entry in which the GD is the gateway GW. The selector 15 of the sensor
node N5 selects, in the routing table, a transfer destination of the data frame on
the basis of the type of device corresponding to each of the extracted LDs.
[0119] As a candidate for a transfer destination, there are three nodes, the sensor node
N2, the sensor node N3, and the relay node R4. The selector 15 selects a node having
a type of device that has a highest priority from among the types of devices. It is
assumed that a node having a type of device that has a higher throughput of communication
has a higher priority and a node having a type of device that has a lower throughput
of communication has a lower priority.
[0120] It is assumed that the priority of a type of device is represented by a numerical
value. It is also assumed that the priority of a type of device is higher if the numerical
value is higher and the priority of a type of device is lower if the numerical value
is lower. In the example of FIG. 14, the priority of the relay node R4 is highest,
so the selector 15 selects the relay node R4.
[0121] When the selector 15 selects the relay node R4 as a transfer destination of the data
frame, the communication unit 11 transfers the data frame to the relay node R4. The
relay node R4 transfers the data frame to the relay node R0, and the relay node R0
transfers the data frame to the gateway GW.
[0122] In the example of FIG. 14, in the routing table of the sensor node N5, a node having
a fewest number of uses from among the LDs in the entry in which the GD is the gateway
GW is the sensor node N3. However, a node having a highest priority is the relay node
R4.
[0123] The relay node R4 has a higher throughput of communication than the sensor node N3,
so the selector 15 of the sensor node N5 does not select the sensor node N3 but selects
the relay node R4. As a result, the data frame is transferred from the relay node
R4 that has a higher throughput of communication.
[0124] Next, the ad-hoc network 1 of FIG. 15 is described. The ad-hoc network 1 of the FIG.
15 is obtained by adding a relay node R9 and a relay node R10 to the ad-hoc network
1 of FIG. 14.
[0125] The sensor node N5 receives, from the sensor node N7, a data frame whose destination
is the gateway GW. The sensor node N5 refers to a routing table and extracts each
of the LDs in an entry in which the GD is the gateway GW as a candidate for a transfer
destination of the data frame.
[0126] As a candidate for a transfer destination, there are four nodes, the sensor node
N2, the sensor node N3, the relay node R4, and the relay node R9. The selector 15
refers to the routing table and extracts, from among the candidates, a candidate having
a highest priority.
[0127] In the example of FIG. 15, the types of device of the relay node R4 and the relay
node R9 are "2", and the types of device of the sensor node N2 and the sensor node
N3 are "1" . Thus, the selector 15 of the sensor node N5 selects, as a candidate for
a transfer destination of the data frame, the relay node R4 and the relay node R9
that have a highest priority.
[0128] In this case, the transfer destinations of the data frame are not narrowed down to
one. Then, the selector 15 of the sensor node N5 refers to the routing table and extracts
the number of uses corresponding to the relay node R4 and the number of uses corresponding
to the relay node R9.
[0129] In the example of FIG. 15, the number of uses corresponding to the relay node R4
is "1", and the number of uses corresponding to the relay node R9 is "2". The selector
15 selects the relay node R4 having a fewest number of uses. As a result, the communication
unit 11 transfers the data frame to the relay node R4 selected by the selector 15.
[0130] Each node that joins the ad-hoc network 1 belongs to one or a plurality of layers
according to the type of device. For example, when all of the nodes that join the
ad-hoc network 1 are sensor nodes N, each of the sensor nodes N belongs to a layer
in which the type of device is "1".
[0131] In the example of FIG. 15, seven sensor nodes N in total belong to the layer in which
the type of device is "1", and four relay nodes R in total belong to the layer in
which the type of device is "2". The layer in which the type of device is "2" has
a higher priority than the layer in which the type of device is "1".
[0132] When all candidate nodes for a transfer destination of a data frame belong to the
same layer, the selector 15 of each node selects a transfer destination of the data
frame on the basis of the number of uses for each of the candidate nodes.
[0133] On the other hands, when the candidates for a transfer destination of the data frame
include a node that belongs to a layer in which the type of device has a higher priority,
the selector 15 of each node selects a node having a fewest number of uses from among
the nodes that belong to the layer in which the type of device has a higher priority.
[0134] Next, an example of selecting a transfer destination in consideration of distance
is described. The ad-hoc network 1 in the example of FIG. 16 is obtained by excluding
the relay node R0 from the ad-hoc network 1 in the example of FIG. 15. Thus, the relay
node R4 transfers a data frame to the gateway GW.
[0135] When the communication unit 11 of the sensor node N5 receives a data frame whose
destination is the gateway GW, the selector 15 selects a transfer destination of the
data frame. In the example of FIG. 16, the candidate nodes to which the data frame
is to be transferred are four nodes, that is, the sensor node N2, the sensor node
N3, the relay node R4, and the relay node R9.
[0136] The selector 15 of the sensor node N5 refers to a routing table and selects a node
having a type of device that has a highest priority from among the candidates. In
this case, the relay node R4 and the relay node R9 are selected, which means that
the transfer destinations are not narrowed down to one.
[0137] The selector 15 extracts, in the routing table, the distance corresponding to the
relay node R4 and the distance corresponding to the relay node R9. The selector 15
selects a node whose distance is the smaller of the distances of the two nodes.
[0138] As described above, the distance corresponds to the number of transfers of a data
frame. Thus, the selector 15 selects a transfer-destination node from among a plurality
of candidates on the basis of the number of transfers of the data frame.
[0139] As illustrated in FIG. 16, the distance corresponding to the relay node R4 is "1",
and the distance corresponding to the relay node R9 is "2". Thus, the selector 15
of the sensor node N5 selects the relay node R4 as a transfer destination of the data
frame. The communication unit 11 of the sensor node N5 transfers the data frame to
the selected relay node R4.
[0140] Thus, the data frame whose destination is the gateway GW is transferred from the
sensor node N7 to the gateway GW with a smallest number of transfers.
[0141] When, as a candidate for a transfer destination of a node N, there are a plurality
of candidates respectively having a type of device that has a highest priority, and
when, from among the candidates, there are a plurality of candidates having a smallest
distance, the selector 15 selects a transfer destination node on the basis of the
number of uses.
[0142] Next, a flowchart that illustrates a flow of processing according to the variations
is described. The processing according to the variations is different from that in
the flowcharts illustrated in FIGS. 11 and 12 in that it has different processing
of selecting a transfer-destination node than that in Step S17 of FIG. 12. It is similar
to that of FIGS. 11 and 12 except for the processing of Step S17, so its description
is omitted.
[0143] On the basis of the destination of a received data frame, the selector 15 of the
certain sensor node N extracts, as a candidate for a transfer destination of the data
frame, each of the LDs in the entry, in a routing table, in which the GD corresponds
to the destination of the data frame.
[0144] The selector 15 of the certain sensor node N extracts the type of device of each
of the candidates in the routing table (Step S20-1) . The selector 15 extracts a candidate
having a type of device that has a highest priority from among the types of device
of the respective candidates as a candidate for a transfer destination. When there
are not a plurality of candidates respectively having a type of device that has a
highest priority (NO in Step S20-1), the candidates for a transfer destination of
the data frame are narrowed down to one.
[0145] In this case, the selector 15 selects a node having a type of device that has a highest
priority as a transfer destination (Step S20-3). When there are a plurality of candidates
respectively having a type of device that has a highest priority (YES in Step S20-1),
the candidates for a transfer destination of the data frame are not narrowed down
to one.
[0146] In this case, the selector 15 refers to the distance of each of the candidates in
the routing table (Step S20-4). The candidate in this case is a candidate that has
a highest priority. The selector 15 extracts a candidate having a smallest distance
from among the distances of the respective candidates.
[0147] When there are not a plurality of candidates having a smallest distance (NO in Step
S20-5), the candidates for a transfer destination of the data frame are narrowed down
to one. In this case, the selector 15 selects a node having a smallest distance as
a transfer destination of the data frame (Step S20-6) . The selected transfer destination
of the data frame is a sensor node N that has a highest priority and has a smallest
distance.
[0148] When there are a plurality of candidates having a smallest distance (YES in Step
S20-5), the candidates for a transfer destination of the data frame are not narrowed
down to one. In this case, the selector 15 refers to the number of uses for each of
the candidates in the routing table (Step S21).
[0149] When there are not a plurality of candidates having a fewest number of uses (NO in
Step S22), the selector 15 selects a sensor node N having a fewest number of uses
as a transfer destination (Step S23).
[0150] When there are a plurality of candidates having a fewest number of uses (YES in Step
S22), the selector 15 adds a random number to each of the numbers of uses for the
plurality of candidates (Step S24). Then, the selector 15 selects, on the basis of
a result of the addition, a transfer-destination sensor node N (Step S25).
[0151] In the above description, the selector 15 selects, as a transfer destination, a node
having a fewest number of uses from among a plurality of candidates for a transfer
destination according to the destination of a received data frame, but it may select,
as a transfer destination, a node whose number of uses is fewer than a prescribed
value.
[0152] For example, the selector 15 may select, as a transfer destination, a node whose
number of uses is the second fewest. It is presumed that the node whose number of
uses is the second fewest is also under a light communication load. Thus, also in
this case, a communication load can be distributed.
[0153] Further, the selector 15 may select, as a transfer destination, a node having a number
for priority larger than a prescribed value from among the plurality of candidates
for a transfer destination according to the destination of the received data frame.
Furthermore, the selector 15 may select, as a transfer destination, a node whose distance
is smaller than a prescribed value from among the plurality of candidates for a transfer
destination according to the destination of the received data frame.
<Example of Hardware Configuration of Node>
[0154] Next, an example of a hardware configuration of a node is described with reference
to the example of FIG. 18. As illustrated in the example of FIG. 18, a processor 111,
a RAM 112, a ROM 113, an auxiliary storage 114, a medium connecting unit 115, a communication
interface 116, and a timer 117 are connected to a bus 100.
[0155] The processor 111 is any processing circuit. The processor 111 executes a program
deployed in the RAM 112. As a program to be executed, a program that performs the
processing according to the embodiments may be applied. The ROM 113 is a nonvolatile
storage that stores therein the program deployed in the RAM 112.
[0156] The auxiliary storage 114 is a storage that stores therein various pieces of information,
and, for example, a hard disk drive or a semiconductor memory may be applied as the
auxiliary storage 114. The medium connecting unit 115 is provided connectively to
a portable recording medium 118.
[0157] As the portable recording medium 118, a portable memory or an optical disk (such
as a compact disc (CD), a digital versatile disc (DVD), and a semiconductor memory)
may be applied. The program that performs the processing according to the embodiments
may be recorded in the portable recording medium 118.
[0158] The communication interface 116 is an interface that communicates with the outside.
The timer 117 is, for example, a hardware timer.
[0159] The processing unit 12, the random number generator 14, and the selector 15 of the
sensor node N may be realized by the processor 111 executing a prescribed program.
The communication unit 11 may be realized by the communication interface 116. The
storage 13 maybe realized by the RAM 112 or the auxiliary storage 114. The clock unit
16 may be realized by the timer 117.
[0160] All of the RAM 112, the ROM 113, the auxiliary storage 114, and the portable storage
medium 118 are examples of a computer-readable tangible storage medium. These tangible
storage media are not a transitory medium such as a signal carrier.
<Other>
[0161] According to the above embodiment, a communication load in a network can be distributed.