Disclosure of Invention
The invention aims to provide a novel undetermined interest table self-maintenance method and a route forwarding method, and aims to solve the problems that the existing undetermined interest table matching search method is long in search time and large in search error, causes storage space waste and cannot adapt to all NDN network environments.
In order to achieve the purpose, the invention provides the following scheme:
a novel self-maintenance method of an undetermined interest table is based on a novel undetermined interest table PIT, and the structure of the novel undetermined interest table comprises a hotlist, a main PIT and an auxiliary PIT; the hot table is positioned at the forefront of the whole novel PIT and is used for recording the prefix and the quantity of the incoming information and not recording the specific information; the main PIT is responsible for storing prefixes in a hot list and requesting high-frequency interest; the auxiliary PIT is used for storing the interest that the prefix and any one of the hot tables cannot be matched and the request frequency is low; the self-maintenance method comprises the following steps:
acquiring last access time and requested total times of each prefix recorded in the hotlist;
determining the time interval and the average access time interval of each prefix from the last access according to the latest access time and the requested total times;
determining the prefix value of each prefix according to the time interval of each prefix from the last access and the average access time interval;
determining a prefix deletion threshold according to the prefix value of each prefix; the prefix deletion threshold comprises a primary prefix deletion threshold and a secondary prefix deletion threshold;
storing the prefix with the prefix value larger than or equal to the primary prefix deletion threshold value and the data packet corresponding to the prefix to the main PIT;
and storing the prefix with the prefix value smaller than the primary prefix deletion threshold value and the data packet corresponding to the prefix to the auxiliary PIT.
Optionally, the determining, according to the latest access time and the requested total number of times, a time interval between each prefix and the last access and an average access time interval specifically includes:
for the ith prefix recorded in the hot table, according to the latest access time T of the ith prefixlast(i) By the formula Tinterval(i)=Tcurrent(i)-Tlast(i) Determining the time interval T of the ith prefix from the last accessinterval(i) (ii) a Wherein T iscurrent(i) The current time of the ith prefix;
according to the total number R of times of requesting the ith prefixall(i) By the formula Taverage(i)=(Tlast(i)-Tfirst(i))/RallDetermining an average access time interval T for an ith prefixaverage(i) (ii) a Wherein T isfirst(i) The time when the ith prefix is accessed for the first time.
Optionally, the determining the prefix value of each prefix according to the time interval between each prefix and the last access and the average access time interval specifically includes:
according to the time interval T of last access of the ith prefix distance
interval(i) By the formula
Determining the time interval T of the ith prefix from the last access
interval(i) Normalized value of (T)
i_new(i) (ii) a Wherein T is
i_maxDenotes all T
interval(i) Maximum value of (1); t is
i_minDenotes all T
interval(i) Minimum value of (1);
average access time interval T of ith prefix
average(i) By the formula
Determining an average access time interval T for an ith prefix
average(i) Normalized value of (T)
a_new(i) (ii) a Wherein T is
a_maxDenotes all T
average(i) Maximum value of (1); t is
a_minDenotes all T
average(i) Minimum value of (1);
according to the normalized value T
i_new(i) And T
a_new(i) By the formula
Determining prefix value P of ith prefix
value(i)。
Optionally, the determining a prefix deletion threshold according to the prefix value of each prefix specifically includes:
using a formula
Determining a standard deviation sigma of prefix values of all prefixes recorded in the hot table; wherein gi-xi- μ; xi ═ P
value(i);μ=(x
1+x
2+...+x
n) N; n is the total number of all prefixes recorded in the hot table;
and determining mu-2 sigma as a primary prefix deletion threshold and mu-delta as a secondary prefix deletion threshold according to the standard deviation sigma of prefix values of all prefixes.
Optionally, the self-maintenance method further includes:
judging whether the current number of items of the prefix stored in the main PIT is larger than or equal to a preset item threshold value or not, and obtaining a first judgment result;
if the first judgment result is that the current number of the prefixes stored in the main PIT is larger than or equal to a preset entry threshold, deleting the prefixes of which the prefix values are smaller than a primary prefix deletion threshold in the hot table, and setting the hot table to only store the secondary prefixes of the interest packets from the current moment;
and if the first judgment result is that the current number of entries of prefixes stored in the main PIT is smaller than a preset entry threshold, setting the hot table as a primary prefix of the interest packet stored from the current moment.
Optionally, the self-maintenance method further includes:
and if the current number of the items of the prefixes stored in the main PIT is greater than or equal to a preset item threshold value in two continuous judgments, deleting the prefixes of which the prefix values are less than a secondary prefix deletion threshold value in the hot table.
A route forwarding method based on a novel undetermined interest table is disclosed, wherein the structure of the novel undetermined interest table comprises a hotlist, a main PIT and an auxiliary PIT; the hot table is positioned at the forefront of the whole novel PIT and is used for recording the prefix and the quantity of the incoming information and not recording the specific information; the main PIT is responsible for storing prefixes in a hot list and requesting high-frequency interest; the auxiliary PIT is used for storing the interest that the prefix and any one of the hot tables cannot be matched and the request frequency is low; the route forwarding method comprises the following steps:
acquiring a currently arriving interest packet;
judging whether a data packet corresponding to the interest packet exists in a content storage library CS or not, and obtaining a second judgment result;
if the second judgment result is that the data packet corresponding to the interest packet exists in the CS, directly returning to the data packet;
if the second judgment result is that the data packet corresponding to the interest packet does not exist in the CS, judging whether a prefix corresponding to the interest packet exists in the hot list or not, and obtaining a third judgment result; the prefix comprises a primary prefix and a secondary prefix;
if the third judgment result is that the prefix corresponding to the interest packet exists in the hot table, adding 1 to the requested total times corresponding to the prefix, and updating the latest access time corresponding to the prefix to be the current time; sending the interest packet to the main PIT for matching;
if the third judgment result is that the prefix corresponding to the interest packet does not exist in the hot table, judging whether an available space exists in the hot table or not, and obtaining a fourth judgment result;
if the fourth judgment result is that the available space exists in the hot list, recording the prefix of the interest packet in the hot list, setting the total requested times corresponding to the prefix to be 1, and setting the latest access time corresponding to the prefix to be the current time; sending the interest package to the auxiliary PIT for matching;
if the fourth judgment result is that no available space exists in the hot list, the interest packet is sent to the auxiliary PIT for matching;
if no data packet matched with the prefix of the interest packet is found in the main PIT and the auxiliary PIT, judging whether a data packet matched with the prefix of the interest packet exists in a Forwarding Information Base (FIB) or not, and obtaining a fifth judgment result;
if the fifth judgment result is that a data packet matched with the prefix of the interest packet exists in the FIB, forwarding the interest packet according to an interface list of the FIB;
and if the fifth judgment result is that no data packet matched with the prefix of the interest packet exists in the FIB, discarding the interest packet or rejecting the response.
Optionally, the route forwarding method further includes:
judging whether the returned prefix of the data packet is recorded in the hot table or not, and obtaining a sixth judgment result;
if the sixth judgment result is that the returned prefix of the data packet is recorded in the hot table, sending the data packet to the main PIT for matching;
judging whether a prefix matched with the prefix of the data packet exists in the main PIT or not, and obtaining a seventh judgment result;
if the seventh judgment result is that the prefix matched with the prefix of the data packet exists in the main PIT, forwarding the data packet;
if the seventh judgment result is that the prefix matched with the prefix of the data packet does not exist in the main PIT, discarding the data packet;
if the sixth judgment result is that the returned prefix of the data packet is not recorded in the hot table, sending the data packet to the auxiliary PIT for matching;
judging whether the prefix of the data packet is recorded in the auxiliary PIT or not, and obtaining an eighth judgment result;
if the eighth judgment result is that the prefix of the data packet is not recorded in the auxiliary PIT, the step of sending the data packet to the main PIT for matching is executed;
and if the eighth judgment result is that the prefix of the data packet is recorded in the auxiliary PIT, forwarding the data packet.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
the invention provides a novel self-maintenance method of an undetermined interest table and a route forwarding method, aiming at the design requirements of quick processing and efficient forwarding of the undetermined interest table, the invention provides the concept of prefix value by improving the structure of PIT, records prefixes with higher value entering the PIT by utilizing a hot table, and enables information containing the prefixes to be inquired and processed preferentially when an interest packet enters and a data packet returns, thereby saving the overall processing time, ensuring the efficient operation of the whole NDN router, having the advantages of quick retrieval speed, small packet round-trip delay, low packet loss rate and the like, and being capable of improving the forwarding efficiency of the undetermined interest table to a greater extent.
Furthermore, the invention can ensure that a small amount of information with higher value can enter the main PIT for rapid matching through the recording and distribution of the hotlist; and a large amount of information with smaller value is moved into the sub-PIT for normal matching. Therefore, the priority query and processing with higher value and interest can be effectively guaranteed, and the entries in the table can be responded before the timeout time, so that the packet loss rate is reduced, the round-trip delay is reduced, and the forwarding efficiency of the whole PIT is improved.
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.
The invention aims to provide a novel undetermined interest table self-maintenance method and a route forwarding method, and aims to solve the problems that the existing undetermined interest table matching search method is long in search time and large in search error, causes storage space waste and cannot adapt to all NDN network environments.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The invention provides a novel self-maintenance method of an undetermined interest table, which is based on a novel undetermined interest table, and the structure of the novel undetermined interest table comprises a hotlist, a main PIT and an auxiliary PIT.
In the NDN architecture, the pending interest table provides two main functions, namely the aggregation of interest packets and the forwarding of data packets. The same interest packets from different interfaces will be merged in the PIT, with only the first arriving interest packet being routed to the potential responder. When a packet arrives at the PIT, the interface at the time of entry will be fetched from the PIT and transferred out from the interface. The PIT is typically large, and for large NDN networks, may reach the scale of millions to tens of millions. The PIT is used as a core structure for NDN data forwarding, and matching is performed once in the table for each incoming interest packet or data packet, so that the matching speed is undoubtedly low, and the efficiency of the entire NDN forwarding is reduced. In order to solve the problem, the invention provides a novel pending interest table structure based on a hotlist, as shown in fig. 1.
Fig. 1 is a schematic structural diagram of a novel pending interest table provided in the present invention. Referring to fig. 1, the new pending interest table provided by the present invention is composed of a hotlist, a primary PIT and a secondary PIT. The hotlist is located at the forefront of the overall PIT and serves as an "indicator" for data offloading. The hot table is completely transparent to the data stream, does not make any modification to the interest packet or data packet, only records data, only records the prefix and the quantity of the incoming information, does not record specific information, and has extremely small requirement on storage space. By concentrating the prefixes with high value into the hot table for rapid matching, the pressure of concentrated storage of all information in the original framework in one table for matching can be effectively relieved. In addition, the data flow is reasonably distributed, and the load balance can be effectively realized.
The hotlist is used for storing prefixes which are frequently requested within a certain time and have higher values, and then centralized and rapid processing is carried out on information containing the prefixes. The addition of a hot table does add some lookup cost relative to the original PIT structure. However, since the hot table is small overall and only stores the content name prefix instead of the content in the table, the lookup cost of the hot table itself is very small for the PIT overall.
The original PIT structure is divided into two parts, namely a main PIT and an auxiliary PIT, wherein the main PIT is used for storing the prefix in the hot list and requesting the interest with higher frequency, and the auxiliary PIT is used for storing the interest with lower request frequency, which can not be matched with any one of the prefix and the hot list. Besides the storage space, the internal structure of the primary PIT and the secondary PIT is consistent with the original PIT structure.
In the whole network, since the popularity of the data content conforms to Zipf (Zipf) distribution, that is, 20% of the content meets 80% of the request amount of the whole network, and the remaining 80% of the content meets 20% of the request amount of the user. Therefore, in the capacity allocation of the primary PIT and the secondary PIT, the invention sets the size of the primary PIT to be 20% of the maximum number of interest packets which the node can pass through, and sets the size of the secondary PIT to be 80% of the maximum number of interest packets which the node can pass through.
As shown in fig. 1, the hotlist record includes three items:
(1) and the prefix is responsible for recording the prefix name of the incoming interest packet. The primary prefix of the interest package is typically stored by default. When the ratio of the number of the entries in the main PIT is larger than a preset entry threshold lambda, the secondary prefixes of the interest packets are stored in the hot table instead, and the total number of the entries in the main PIT table can be dynamically adjusted in this way, so that the overflow phenomenon of the main PIT table is prevented, and the efficient operation of the whole system is ensured. Wherein the proportion of the number of the items refers to the proportion of the number of the currently stored items to the total number of the items which can be stored.
(2) The number of times, the total number of times that an interest packet containing a certain prefix arrives is recorded, and is referred to as the total number of times that the prefix is requested in the invention.
(3) The time, the last arrival time of the interest packet containing a certain prefix is recorded, and is referred to as the latest access time of the prefix in the invention.
Based on the improved novel undetermined interest table, the invention provides a novel undetermined interest table self-maintenance method, which mainly discusses how the hotlist realizes the data shunting function. Each prefix in the hotlist has its own value attribute. For a prefix, the last access time of the prefix and the total number of times it was requested can be combined to give a value, which is the value of each prefix. The higher the value, the higher the popularity of the prefix is while it is being accessed frequently in the near future. The hotlist calculates the value of each prefix in the list at intervals (typically 10 seconds) and deletes prefixes that do not meet a predetermined threshold.
The invention obtains the value of each prefix by using a normalization method.
Let TlastThe time when a certain prefix is accessed last time, the current time TcurrentThe time interval from the last access is:
Tinterval=Tcurrent-Tlast (1)
let RallIs the total number of times the prefix is requested, TfirstThe time when the prefix is accessed for the first time, the average access time interval of the prefix is:
Taverage=(Tlast-Tfirst)/Rall (2)
Taveragethe smaller the number of times the data is accessed in a short time.
Let Ti_maxRepresenting T in all dataintervalThe largest data, Ti _ min represents the data with the smallest Tinterval among all the data, for TintervalCarrying out normalization treatment to obtain:
let Ta_maxRepresenting Tavera in all datageMaximum value of (1), Ta_minRepresenting T in all dataaverageNormalized to obtain:
thus each prefix value is:
based on the principle, the novel self-maintenance method of the undetermined interest list provided by the invention comprises the following steps:
step 101: and acquiring the last access time and the total requested times of each prefix recorded in the hot table.
Step 102: determining the time interval and the average access time interval of each prefix from the last access according to the latest access time and the requested total times; the method specifically comprises the following steps:
for the ith prefix recorded in the hot table, according to the latest access time T of the ith prefixlast(i) By the formula Tinterval(i)=Tcurrent(i)-Tlast(i) Determining the time interval T of the ith prefix from the last accessinterval(i) (ii) a Wherein T iscurrent(i) The current time of the ith prefix;
according to the total number R of times of requesting the ith prefixall(i) By the formula Taverage(i)=(Tlast(i)-Tfirst(i))/RallDetermining an average access time interval T for an ith prefixaverage(i) (ii) a Wherein T isfirst(i) The time when the ith prefix is accessed for the first time.
Step 103: determining the prefix value of each prefix according to the time interval of each prefix from the last access and the average access time interval; the method specifically comprises the following steps:
according to the time interval T of last access of the ith prefix distance
interval(i) By the formula
Determining the time interval T of the ith prefix from the last access
interval(i) Normalized value of (T)
i_new(i) (ii) a Wherein T is
i_maxDenotes all T
interval(i) Maximum value of (1); t is
i_minDenotes all T
interval(i) Minimum value of (1);
average access time interval T of ith prefix
average(i) By the formula
Determining an average access time interval T for an ith prefix
average(i) Normalized value of (T)
a_new(i) (ii) a Wherein T is
a_maxDenotes all T
average(i) Maximum value of (1); t is
a_minDenotes all T
average(i) Minimum value of (1);
according to the normalized value T
i_new(i) And T
a_new(i) By the formula
Determining prefix value P of ith prefix
value(i)。
Step 104: determining a prefix deletion threshold based on the prefix value for each prefix.
In order to ensure the accuracy and timeliness of hot list data distribution, the value of each prefix needs to be calculated periodically for a hot list, and prefixes which do not meet a preset threshold value are deleted. The invention deletes prefixes with significantly less value than other prefixes according to the Lautacriterion (PC). The Lauda criterion is that a group of detection data is supposed to only contain random errors, the detection data is calculated to obtain a standard deviation, an interval is determined according to a certain probability, and all data exceeding the standard deviation are removed. Each prefix value in the hotlist is defined as x1, x2 … xn. Then, the average is:
μ=(x1+x2+...+xn)/n (6)
the residual error is:
gi=xi-μ (7)
according to the Bessel (Bessel formula) formula, the standard deviation of the values of these prefixes can be found as:
the Laviand criterion considers the probability of a numerical distribution in (μ - σ, μ + σ) to be 0.6827 and the probability of a numerical distribution in (μ -2 σ, μ +2 σ) to be 0.9544. Therefore, the value of the prefix value is mostly concentrated in the interval (mu-2 sigma, mu +2 sigma), and the possibility of exceeding the range only accounts for less than 4%. Because only prefixes of a lesser value typically need to be deleted, only prefixes of values less than μ -2 σ need to be deleted per maintenance.
Through the self-maintenance strategy of the hot table, the effect of 'cache pollution' brought by historical data to the hot table can be prevented. Content prefixes frequently requested in a recent period of time can be successfully retained in the hot table, and content prefixes with obviously reduced request times in the recent period of time can be removed, so that the freshness of the hot table and the timeliness of entries in the hot table are ensured, and the internal logic of the hot table is realized.
Therefore, the determining a prefix deletion threshold according to the prefix value of each prefix specifically includes:
using a formula
Determining a standard deviation sigma of prefix values of all prefixes recorded in the hot table; wherein gi-xi- μ; xi ═ P
value(i);μ=(x
1+x
2+...+x
n) N; n is the total number of all prefixes recorded in the hot table.
The prefix deletion threshold includes a primary prefix deletion threshold and a secondary prefix deletion threshold. And determining mu-2 sigma as a primary prefix deletion threshold and mu-delta as a secondary prefix deletion threshold according to the standard deviation sigma of prefix values of all prefixes.
Step 105: and storing the prefix with the prefix value larger than or equal to the primary prefix deletion threshold value and the data packet corresponding to the prefix to the main PIT.
Step 106: and storing the prefix with the prefix value smaller than the primary prefix deletion threshold value and the data packet corresponding to the prefix to the auxiliary PIT.
Storing the prefix with the prefix value larger than or equal to the primary prefix deletion threshold value and the corresponding data packet to the main PIT when the self-maintenance strategy of the hot list is firstly carried out; and storing the prefix with the prefix value smaller than the primary prefix deletion threshold value and the data packet corresponding to the prefix to the auxiliary PIT.
The invention also adds a flow control mechanism to the main PIT aiming at the condition of sudden burst of network flow which may occur. When the number of entries in the primary PIT reaches 80% of the size of the primary PIT, a maintenance strategy of the hot table is immediately executed, prefixes with values smaller than mu-2 sigma are deleted, and a certain space is reserved for the hot table. At this time, the incoming interest package only stores the secondary prefix and replaces the original primary prefix in the hot table instead. The hot table follows the longest prefix match principle, so that traffic under the original primary prefix will partially flow into the secondary PIT, thus controlling the traffic entering the primary PIT.
Therefore, the self-maintenance method further comprises:
judging whether the current number of items of the prefix stored in the main PIT is larger than or equal to a preset item threshold value or not, and obtaining a first judgment result;
if the first judgment result is that the current number of the prefixes stored in the main PIT is larger than or equal to a preset entry threshold, deleting the prefixes of which the prefix values are smaller than a primary prefix deletion threshold in the hot table, and setting the hot table to only store the secondary prefixes of the interest packets from the current moment;
and if the first judgment result is that the current number of entries of prefixes stored in the main PIT is smaller than a preset entry threshold, setting the hot table as a primary prefix of the interest packet stored from the current moment.
If the number of entries in the primary PIT table is more than 80% of the table capacity for at least two consecutive maintenances, a secondary hot table maintenance policy is implemented. According to the LayEd criterion, the probability that the prefix value in the hot table is distributed in (mu-sigma, mu + sigma) is 0.6827, and the prefix with the value smaller than mu-sigma in the hot table is deleted, so that more space is provided for the hot table to store the newly arrived secondary prefix.
Therefore, the self-maintenance method further comprises:
and if the current number of the items of the prefixes stored in the main PIT is greater than or equal to a preset item threshold value in two continuous judgments, deleting the prefixes of which the prefix values are less than a secondary prefix deletion threshold value in the hot table.
When the hot table maintenance time is up, if the number of the entries in the main PIT is found to be less than 80%, executing a conventional hot table maintenance strategy, and changing the reserved secondary prefixes in the hot table back to the stored primary prefixes. By adopting the method, the phenomenon that the entries in the hot list are filled with useless prefixes due to the accidental occurrence of large bursty flow can be prevented. The flow control process of PIT is shown in fig. 2 and 3.
Fig. 2 is a schematic view of a flow control process of the novel PIT before the self-maintenance policy of the hot table provided by the present invention is executed, and fig. 3 is a schematic view of a flow control process of the novel PIT after the self-maintenance policy of the hot table provided by the present invention is executed. Referring to fig. 2, the self-maintenance policy of the hot table is before execution, the prefix youtube.com is recorded in the hot table, so all interests under the primary prefix youtube.com go into the master PIT for matching. Referring to fig. 3, when the number of entries in the primary PIT increases to a preset entry threshold, the hot table deletes part of the prefixes within the table through the self-maintenance policy and the hot table instead stores only the secondary prefixes of interest. For the interest packages of the subsequent coming youtube websites, the secondary prefixes youtube.com/1 and youtube.com/2 are stored in the hot table, and the original primary prefixes are deleted. When a new interest packet arrives at the hot table, the longest prefix matching principle is followed in the hot table, and all the interests under youtube.com which do not belong to youtube.com/1 or youtube.com/2 are shunted to the auxiliary PIT.
This approach works better in situations where there are large data requests (e.g., video requests) in a short period of time. Because the traffic in this case is concentrated in several or several tens of prefixes, the hotlist maintenance strategy of the present invention is a normalization process based on the current distance from the last visited time and the current maximum value of the average visited time interval. Therefore, in this case, the differentiation of different prefix values is more obvious compared with random flow, more space is left for storing new secondary prefixes, and therefore the flow control of the pending interest table is more facilitated.
Aiming at the design requirements of rapid processing and efficient forwarding of a Pending Interest Table (PIT) in a Named Data Network (NDN), the invention provides a novel Pending Interest Table structure by improving the structure of the PIT, further provides the concept of prefix value, records prefixes with higher value entering the PIT by using a hot Table, and enables information containing the prefixes to be inquired and processed preferentially when an Interest packet enters and a Data packet returns, thereby saving the overall processing time and ensuring the efficient operation of the whole NDN router.
The invention constructs the undetermined interest list structure based on the hotlist, takes the hotlist as an indicator of data distribution, records the prefix and the quantity of the incoming information, and distributes according to the prefix value. The original PIT structure is divided into two parts, namely a main PIT and an auxiliary PIT, wherein the main PIT is used for storing the prefix in the hot list and requesting the interest with higher frequency, and the auxiliary PIT is used for storing the interest with lower request frequency, which can not be matched with any one of the prefix and the hot list. Besides the storage space, the internal structures of the main PIT and the auxiliary PIT are consistent with the original PIT structure, and the hot table can play a role in data distribution in route forwarding through the structural improvement of the original undetermined interest table.
After the implementation of the self-maintenance method of the hot table, the present invention further discusses how to implement the whole route forwarding by using the hot table. The flow of NDN processing based on the new pending interest table is shown in fig. 4. In fig. 4, "interest" indicates an interest packet, and "Date" indicates a data packet.
Referring to fig. 4, assuming that a request youtube, com/music/jay/a.mp3 arrives, for the just-coming interest packet, first accessing a Content Store (CS) which is responsible for storing the data that has been requested by the router, and if the Content Store queries the data packet corresponding to the interest packet, returning the data packet directly without performing subsequent operations; otherwise, if no matched data exists, the interest packet is sent to the novel PIT for matching.
After entering the new type of PIT, first check if there is a primary or secondary prefix (youtube. If so, the total number of times R that prefix is requestedallAdding 1, updating the latest access time T corresponding to the prefix in the hot listlastIs the current time. Then, the request is moved into a main PIT for matching; if there is no match, look up the hotlistWhether it is full. If the hot table has space, the prefix of the interest packet is placed in the hot table, and the number of times R is recordedallSet to 1, time TlastAnd setting the current time, and moving the interest packet into the main PIT for matching. If the hot table is full, the prefixes which are requested more frequently and are accessed frequently in the near future are stored in the table at the moment, and the interest packet is moved into the auxiliary PIT at the moment.
In the process of searching the interest packet, if the CS and the PIT have no result, the FIB is searched, if the corresponding content name entry is found in the FIB, the node receives the interest packet for the first time, the interest packet is forwarded according to an interface list (an interface which does not contain the interest packet) of the FIB, and a new entry is added in the PIT. If there is no result in any of the three structures, it indicates that there is no relevant matching route, the node cannot process this interest packet and discards it. A Forwarding Information Base (FIB) records a next hop interface of a current node reaching a content providing node, which is equivalent to an FIB in an IP network, and is automatically generated by a routing protocol, and is a basis for forwarding an interest packet. Unlike IP forwarding, NDN forwarding allows a set of forwarding outlets, not limited to one.
When the data packet corresponding to the request returns, the hot table is searched first, and if the prefix is in the hot table, the data packet enters the main PIT to search for corresponding information; otherwise, entering a secondary PIT table for matching.
In addition, the invention also considers the situation that after a certain prefix in the hot table is deleted in the data forwarding process, the data packet is returned and goes to the auxiliary PIT for query because the prefix can not be found in the hot table. In this respect, the present invention performs the following processing: when the data packet returns, if the prefix exists in the hot table, the data packet is directly inquired to the main PIT, if the prefix does not exist in the hot table, the data packet is firstly inquired to the auxiliary PIT, and if the prefix does not exist in the auxiliary PIT, the data packet is inquired to the main PIT again. Because the primary PIT is relatively small, the lookup time can be increased slightly while avoiding possible problems, thereby improving the overall forwarding efficiency of the PIT.
By adopting the route forwarding mode, a small amount of information with higher value can enter the main PIT for rapid matching; and a large amount of information with smaller value is moved into the sub-PIT for normal matching. Therefore, the priority query and processing with higher value interest can be effectively guaranteed, and the forwarding efficiency of the whole PIT is improved.
Based on the above principle, the invention provides a routing forwarding method based on a novel undetermined interest table, as shown in fig. 4, the novel undetermined interest table comprises a hotlist, a main PIT and an auxiliary PIT; the route forwarding method comprises the following steps:
acquiring a currently arriving interest packet;
judging whether a data packet corresponding to the interest packet exists in a content storage library CS or not, and obtaining a second judgment result;
if the second judgment result is that the data packet corresponding to the interest packet exists in the CS, directly returning to the data packet;
if the second judgment result is that the data packet corresponding to the interest packet does not exist in the CS, judging whether a prefix corresponding to the interest packet exists in the hot list or not, and obtaining a third judgment result; the prefix comprises a primary prefix and a secondary prefix;
if the third judgment result is that the prefix corresponding to the interest packet exists in the hot table, adding 1 to the requested total times corresponding to the prefix, and updating the latest access time corresponding to the prefix to be the current time; sending the interest packet to the main PIT for matching;
if the third judgment result is that the prefix corresponding to the interest packet does not exist in the hot table, judging whether an available space exists in the hot table or not, and obtaining a fourth judgment result;
if the fourth judgment result is that the available space exists in the hot list, recording the prefix of the interest packet in the hot list, setting the total requested times corresponding to the prefix to be 1, and setting the latest access time corresponding to the prefix to be the current time; sending the interest package to the auxiliary PIT for matching;
if the fourth judgment result is that no available space exists in the hot list, the interest packet is sent to the auxiliary PIT for matching;
if no data packet matched with the prefix of the interest packet is found in the main PIT and the auxiliary PIT, judging whether a data packet matched with the prefix of the interest packet exists in a Forwarding Information Base (FIB) or not, and obtaining a fifth judgment result;
if the fifth judgment result is that a data packet matched with the prefix of the interest packet exists in the FIB, forwarding the interest packet according to an interface list of the FIB;
and if the fifth judgment result is that no data packet matched with the prefix of the interest packet exists in the FIB, discarding the interest packet or rejecting the response.
When the data packet corresponding to the interest packet is returned, the route forwarding method further includes:
judging whether the returned prefix of the data packet is recorded in the hot table or not, and obtaining a sixth judgment result;
if the sixth judgment result is that the returned prefix of the data packet is recorded in the hot table, sending the data packet to the main PIT for matching;
judging whether a prefix matched with the prefix of the data packet exists in the main PIT or not, and obtaining a seventh judgment result;
if the seventh judgment result is that the prefix matched with the prefix of the data packet exists in the main PIT, forwarding the data packet;
if the seventh judgment result is that the prefix matched with the prefix of the data packet does not exist in the main PIT, discarding the data packet;
if the sixth judgment result is that the returned prefix of the data packet is not recorded in the hot table, sending the data packet to the auxiliary PIT for matching;
judging whether the prefix of the data packet is recorded in the auxiliary PIT or not, and obtaining an eighth judgment result;
if the eighth judgment result is that the prefix of the data packet is not recorded in the auxiliary PIT, the step of sending the data packet to the main PIT for matching is executed;
and if the eighth judgment result is that the prefix of the data packet is recorded in the auxiliary PIT, forwarding the data packet.
The invention designs a novel undetermined interest table structure based on a hotlist, records and screens the prefix of an interest packet about to enter the undetermined interest table, and establishes an independent 'priority channel' for the information which often passes through the undetermined interest table. The concept of prefix value is put forward in the pending interest table, and information is processed in a grading way according to the value of the prefix, so that the interest packet containing the prefix with higher value can be inquired and processed preferentially. Furthermore, the invention also provides a self-maintenance method of the hot list, which realizes the dynamic adjustment of the data inflow direction, ensures the interest of higher value in the recent period of time processed in the priority channel, and can effectively prevent the overflow phenomenon of the list to be determined.
Aiming at the design requirements of quick processing and efficient forwarding of the interest table to be determined, the invention provides a novel structure of the interest table to be determined by improving the structure of the PIT, and further provides a concept of prefix value, records prefixes with higher values entering the PIT by using a hot table, and enables information containing the prefixes to be inquired and processed preferentially when the interest packet enters and the data packet returns, thereby saving the overall processing time and ensuring the efficient operation of the whole NDN router.
Through recording and shunting of the hotlist, a small amount of information with higher value can enter the main PIT for rapid matching; and a large amount of information with smaller value is moved into the sub-PIT for normal matching. Therefore, the priority query and processing with higher value and interest can be effectively guaranteed, and the entries in the table can be responded before the timeout time, so that the packet loss rate is reduced, the round-trip delay is reduced, and the forwarding efficiency of the whole PIT is improved.
Therefore, compared with the existing method for improving the performance of the to-be-determined interest table of the named data network, the method provided by the invention has the advantages of high retrieval speed, small packet round-trip delay, low packet loss rate and the like, and can improve the forwarding efficiency of the to-be-determined interest table to a greater extent. The invention adopts a novel undetermined interest table structure based on the hotlist, realizes the rapid search of the items on the PIT, improves the search rate and avoids the search error and the waste of the storage space. The method can be suitable for NDN networks of various scales, and the problem that the existing method cannot adapt to all NDN network environments is solved.
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 principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.