CN108737276B - Method for constructing routing table data structure and realizing routing forwarding - Google Patents

Method for constructing routing table data structure and realizing routing forwarding Download PDF

Info

Publication number
CN108737276B
CN108737276B CN201810633244.1A CN201810633244A CN108737276B CN 108737276 B CN108737276 B CN 108737276B CN 201810633244 A CN201810633244 A CN 201810633244A CN 108737276 B CN108737276 B CN 108737276B
Authority
CN
China
Prior art keywords
knowledge
tensor
data structure
order
forwarding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810633244.1A
Other languages
Chinese (zh)
Other versions
CN108737276A (en
Inventor
姜晓枫
张琦
杨坚
姚振
谢金森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Science and Technology of China USTC
Original Assignee
University of Science and Technology of China USTC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Science and Technology of China USTC filed Critical University of Science and Technology of China USTC
Priority to CN201810633244.1A priority Critical patent/CN108737276B/en
Publication of CN108737276A publication Critical patent/CN108737276A/en
Application granted granted Critical
Publication of CN108737276B publication Critical patent/CN108737276B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/742Route cache; Operation thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Abstract

The invention discloses a method for constructing a routing table data structure and realizing routing forwarding. Based on the method, the network big data knowledge is extracted quickly, and meanwhile, key characteristic information in high-order high-dimensional structural knowledge can be found, so that the resource consumption of routing nodes, computing nodes and storage nodes in the network is reduced, and the network service performance is improved.

Description

Method for constructing routing table data structure and realizing routing forwarding
Technical Field
The invention relates to the technical field of computer networks, in particular to a method for constructing a routing table data structure and realizing routing forwarding.
Background
The new architecture of the current intelligent internet is changed from data acquisition as the center to knowledge acquisition as the center, large-scale network big data with various sources and complex types can only transmit non-critical information, non-demand information and demand information to network users at the same time if the large data is not analyzed and processed to be converted into structured compressed knowledge, wherein the scale of the non-critical information and the non-demand information is usually far larger than that of the critical information and the demand information, so that the demand information is lost and the critical information is covered at a user terminal, and heavy burden is brought to an information transmission channel of the network.
The communication process of the knowledge center internet is driven by data, and the routing process of the knowledge center internet mainly relates to three data structures: a Knowledge Forwarding Table (KFT) stores a mapping relation between Knowledge and a Knowledge source port; a Pending Request Table (PRT) stores the mapping relation between the knowledge which has not received the response and the source port of the Request packet; the Knowledge cache Table (KST) records local Knowledge cache information of the Knowledge interconnection node.
After obtaining the requested knowledge, the knowledge consumer sends out a request packet. The node where the request packet arrives firstly queries the KST, and if corresponding knowledge is found in a local cache, a response packet is directly returned; otherwise the requested knowledge and the request packet are recorded in the PRT from the source port. Then, searching KFT, and if finding a forwarding port with corresponding knowledge, forwarding the request packet to the port; otherwise, the NACK confirmation information is discarded or returned. Until the request packet reaches the producer or the cache node with the request knowledge, the producer or the cache node encapsulates the corresponding response packet and returns the response packet to the consumer along the path of the arrival of the request packet. And after the knowledge interconnection node receiving the response information forwards the response packet, updating the local knowledge base and the KST according to a cache strategy.
A variable-length knowledge extraction evolution mode is adopted in the knowledge center internet, the problem of address resource exhaustion in an IP network is solved, and however, the mode causes new problems.
Identifying the problem: under unbounded knowledge space, each table entry in the routing table may occupy larger storage resources; and the mapping of the knowledge and the forwarding port is recorded in the routing table of the knowledge center internet, and the amount of the knowledge in the network is far larger than that of the host, which causes the number of entries of the routing table to be huge. By combining the two points, compared with an IP network, the number of the routing table entries in the knowledge center Internet and the space occupied by each entry are greatly increased. The knowledge quantity is huge, the knowledge generation has high dynamics, and new knowledge can be continuously deduced from old knowledge. Although the knowledge center internet faces the problem of huge knowledge space, the huge knowledge space is a sparse space in nature, and an effective specification is not available at present to fully utilize all elements in a space.
Routing problems: because the quantity of knowledge is far greater than that of the host, the problem of huge number of routing table entries inevitably exists in the knowledge center internet. In this case, if the conventional route search algorithm (such as sequential traversal and binary tree search) is still used, a large delay will be introduced into the routing process.
Disclosure of Invention
The invention aims to provide a method for constructing a routing table data structure and realizing routing forwarding.
The purpose of the invention is realized by the following technical scheme:
a method for constructing a routing table data structure and realizing routing forwarding comprises the following steps:
integrating three data structures KFT, KST and PRT related to route forwarding in the knowledge center Internet into an information summary table, and expressing by using an N-order tensorial data structure x;
extracting low-dimensional information characteristics of the network from the N-order tensorial data structure x by using a PARAFAC decomposition technology;
and after receiving the request packet or the response packet, mapping the knowledge in the request packet or the response packet into an index of an N-order tensorial data structure x, obtaining a corresponding tensor element value by using a PARAFAC decomposition technology, and performing subsequent routing and forwarding operations if the corresponding knowledge is judged to be in the N-order tensorial data structure x according to the tensor element value.
According to the technical scheme provided by the invention, the key characteristic information in the high-order high-dimensional structural knowledge can be found while the network big data knowledge is rapidly extracted, the consumed resources of the routing node, the computing node and the storage node in the network are reduced, and the network service performance is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of a method for constructing a routing table data structure and implementing route forwarding according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an N-order tensoriated data structure x according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an nth order tensor data structure according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a tensorial data structure of a routing information table with knowledge identifiers in two levels of hierarchy according to an embodiment of the present invention;
FIG. 5 is a flowchart of tensor PARAFAC decomposition according to an embodiment of the present invention;
FIG. 6 shows a method for calculating U by using the repeated alternate least square method according to an embodiment of the present invention(n)A flow chart of (1);
FIG. 7 is a flow chart of routing a tensorial data structure according to an embodiment of the present invention;
FIG. 8 is a flow chart of querying whether knowledge is in a tensor table as provided by an embodiment of the present invention;
fig. 9 is a flowchart of a method for implementing route forwarding after dividing a small tensor data structure according to an embodiment of the present invention;
fig. 10 is a schematic diagram of an update structure of N-order tensorial data according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention are 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 embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
The new architecture of the current intelligent internet is changed from data acquisition as the center to knowledge acquisition as the center, large-scale network big data with various sources and complex types can only transmit non-critical information, non-demand information and demand information to network users at the same time if the large data is not analyzed and processed to be converted into structured compressed knowledge, wherein the scale of the non-critical information and the non-demand information is usually far larger than that of the critical information and the demand information, so that the demand information is lost and the critical information is covered at a user terminal, and heavy burden is brought to an information transmission channel of the network. The invention provides a method for constructing a routing table data structure and realizing routing forwarding, which can quickly extract network big data knowledge and discover key characteristic information in high-order high-dimensional structured knowledge, thereby reducing the consumption resources of routing nodes, computing nodes and storage nodes in a network and improving the service performance of the network.
As shown in fig. 1, a method for constructing a routing table data structure and implementing routing forwarding provided in an embodiment of the present invention mainly includes:
1. three data structures KFT, KST and PRT related to route forwarding in the knowledge center Internet are integrated into an information summary table and are represented by an N-order tensorial data structure x.
In the embodiment of the invention, the size of the N-order tensoriated data structure x is I1×I2×…×INThe first N-1 tensors of the N-th order tensoriated data structure x represent knowledge with N-1 levels of hierarchy, the size I of each order tensor1,I2,…,IN-1Is the number of knowledge each level in the knowledge hierarchy contains; the Nth order tensor is the characteristic information of knowledge, and the characteristic information can be designed into signature information, knowledge popularity, data packet size and the like according to needs, and the size I of the characteristic informationNRelating to the number of categories of the characteristic information;
in the embodiment of the present invention, the knowledge in the knowledge-centric networking is a network information data structure that includes a name of data content and corresponding network information, which may be information such as an identifier, a pointer, a source address, a source port, a destination address, a destination port, a transport protocol, a flag bit, and the like, and the knowledge is represented by a hierarchical structure, where each hierarchical structure is separated by "/", for example: com/youtube/user/pe; the KFT refers to a Knowledge Forwarding Table (KFT) in a routing forwarding process, and stores a mapping relation between knowledge and a knowledge source port; the PRT is a Pending Request Table (PRT) and stores the mapping relation between the knowledge which has not received the response and the source port of the Request packet; the KST is a Knowledge cache Table (KST) and records local Knowledge cache information of the Knowledge interconnection node.
2. And extracting low-dimensional information characteristics of the network from the N-order tensorial data structure x by using a PARAFAC decomposition technology.
In the embodiment of the invention, the PARAFAC decomposition technology is utilized to extract the low-dimensional information features of the network from the large-scale N-order tensoriated data structure x, so that the low-efficiency N-order tensoriated data structure x is decomposed into N high-efficiency network information feature vectors { U }(1),U(2),…,U(N)And the processing procedure is represented as follows:
Figure BDA0001700147910000041
where R represents a decomposition rank of the tensor, ° is an outer product of vectors, [ σ ═ σ [ [ σ ]12,…,σR]In order to normalize the factors, the method comprises the steps of,
Figure BDA0001700147910000042
is a factor matrix in which
Figure BDA0001700147910000043
Representing eigenvectors that project tensors into eigenspace, an
Figure BDA0001700147910000044
Extraction of low-dimensional knowledge features is completed in the above manner, and the whole large-scale N-order tensoriated data structure x is decomposed into R × (I) in scale1+I2+…+IN) To an efficient knowledge storage structure.
3. And after receiving the request packet or the response packet, mapping the knowledge in the request packet or the response packet into an index of an N-order tensorial data structure x, obtaining a corresponding tensor element value by using a PARAFAC decomposition technology, and performing subsequent routing and forwarding operations if the corresponding knowledge is judged to be in the N-order tensorial data structure x according to the tensor element value.
In the process of network routing, caching and forwarding, the knowledge of the request and the response reaching the route needs to be inquired firstly. Mapping knowledge in the request packet or the response packet into an index of an N-order tensorial data structure x in the step 1, obtaining a corresponding tensor element value by adopting and utilizing a PARAFAC decomposition technology, and if the obtained value is 0, indicating that the record is not in the routing table and outputting the record which is not found; if the obtained value is not 0, the record is in the routing table, and the output value of the tensor element is the record to be searched. And then carrying out subsequent routing and forwarding operations of the routing service according to the value of the tensor element.
In the embodiment of the invention, the request packet refers to a data packet containing request knowledge, which is sent by knowledge consumers in the knowledge internet; the response packet refers to a data packet with requested knowledge content, which is packaged after the knowledge requested by the knowledge consumer is found in the knowledge internet.
The routing and forwarding operations are briefly described as follows: if the request packet is received, judging whether the knowledge of the request packet is in the KST, if so, finding the corresponding knowledge content in the local cache, packaging and returning a response packet, otherwise, recording the requested knowledge and the source port of the request packet in the PRT; and then searching KFT, and if finding a forwarding port with corresponding knowledge, forwarding the request packet through the port. Until the request packet reaches the producer or the cache node with the request knowledge, the producer or the cache node encapsulates the corresponding response packet and returns the response packet to the consumer along the path of the arrival of the request packet. If the response packet is received and the route receiving the response information finds the source port number of the request packet of the response knowledge in the PRT, the response packet is forwarded by the source port of the request packet and the local knowledge base is updated, the knowledge in the response packet is inserted into the KST, and then the record of the response knowledge in the PRT is deleted
4. The N-order tensorial data structure is updated.
The embodiment of the invention also comprises a mode of updating the N-order tensor data structure, namely adding the knowledge updating structure in the knowledge extraction and generation process, namely dividing the original network content tensor data structure into a plurality of small tensor blocks, and independently extracting knowledge from each tensor block.
For ease of understanding, the above aspects of the present invention are further described below.
Firstly, a routing table data structure is constructed.
In the embodiment of the invention, KFT, KST and PRT are integrated into an information summary table, and the scale is I1×I2×…×INIs shown in fig. 2, and the schematic diagram of the N-order tensoriated data structure x is shown in fig. 2.
The first N-1 tensor representation knowledge identification of the N-order tensorial data structure x has N-1 levels of layering, and the size I of each tensor1,I2,…,IN-1The number of knowledge identifications contained in each layer of the knowledge layer structure; the Nth order tensor is the network characteristic information of knowledge, and the characteristic information can be designed into signature information, knowledge popularity, data packet scale and the like according to needs, and the size I of the characteristic informationNRelating to the number of categories of the characteristic information;
in order to realize the basic forwarding function, the characteristic information in the nth order tensor must have the following three contents (I in this case)N3): as shown in fig. 3, in the data structure of the nth order tensor, the front part uses 3 bits to characterize the type of the table (to distinguish which table the knowledge is contained in KFT, PRT, KST), the middle part uses 32 bits to store the pointer of the knowledge content, and the tail part uses 8 bits to store the port number, where the first 4 bits are the forwarding port number and the last 4 bits are the source port number of the request packet.
Each tensor element in an N-th order tensoriated data structure x
Figure BDA0001700147910000061
Shows knowledge identification as g-1(i1)/g-1(i2)/…/g-1(iN-1) Characteristic information of network knowledge of in∈{1,2,…,In1,2, …, N, g denotes the mapping function of knowledge to tensor element indices.
Taking the information summary table with knowledge identification as a two-level hierarchy as an example, the corresponding information summary table is shown in table 1.
Figure BDA0001700147910000062
Table 1 summary of information with knowledge identification of 2 levels of hierarchy
The knowledge is identified as a two-level hierarchical information summary table, that is, N-1 is 2, which corresponds to a three-level tensor data structure, and a schematic diagram thereof is shown in fig. 4.
And secondly, extracting low-dimensional information features.
Extracting low-dimensional information characteristics of the network from the large-scale N-order tensorial data structure x by using a PARAFAC decomposition technology, thereby decomposing the low-efficiency N-order tensorial data structure x into N high-efficiency network information characteristic vectors { U }(1),U(2),…,U(N)And then:
Figure BDA0001700147910000063
where R represents a decomposition rank of the tensor, ° is an outer product of vectors, [ σ ═ σ [ [ σ ]12,…,σR]In order to normalize the factors, the method comprises the steps of,
Figure BDA0001700147910000064
is a factor matrix in which
Figure BDA0001700147910000065
Representing eigenvectors that project tensors into eigenspace, an
Figure BDA0001700147910000066
The specific steps of the parafacc decomposition technique are shown in fig. 5, and mainly include the following steps:
step ST 101: decomposition rank R and maximum iteration number T of input tensormax
Step ST 102: estimating
Figure BDA0001700147910000067
And is assigned to U(1),U(2)…U(N)
Step ST 103: completing one iteration from step 1031 to step 1036 is called one iteration, and repeating steps ST1031 to ST1035 until convergence or maximum number of iterations T is reachedmax(ii) a Step ST1033 to step ST 1035: cycling N times, obtaining U on cycle 1(1)Obtaining U in cycle 2(2)Repeating the process for the Nth time to obtain U(N)
Step ST 104: network information feature vector (U) in output factor matrix form(1),U(2),…,U(N)}。
As shown in FIG. 6, U is calculated for the repeated use of the alternating least squares method in FIG. 5(n)The flowchart of (a), that is, the specific process of step ST103, mainly includes:
step ST 1031: initializing a loop variable to 1;
step ST 1032: judging whether the circulation is finished or not, wherein the circulation frequency is N; if the current cycle is not over, the intermediate parameter V is calculated using the following formula(n)
V(n)=U(N)TU(N)*…*U(n+1)TU(n+1)*U(n-1)TU(n-1)*…*U(1)TU(1)
In the above formula, T is a matrix transposition symbol, and represents a Hadamard product of the matrix;
step ST 1034: calculate U as follows(n)
Figure BDA0001700147910000071
In the above formula, X(n)Is an n-mode matrix of the tensor x,
Figure BDA0001700147910000072
representing the pseudo-inverse, ⊙ representing the Khatri-Rao product of the matrix;
step ST 1035: normalized U(n)For each column, the normalization factor is assigned to σ.
Routing process
In the examples of the inventionOf the 3 bits at the front end of the N-order tensor, the 1 st bit to the 3 rd bit are correspondingly marked as a1~a3,a1To 1 denotes that knowledge belongs to the knowledge forwarding table, a1A value of 0 indicates that knowledge does not belong to the knowledge forwarding table; a is2A value of 1 indicates that knowledge belongs to the pending request list, a2A value of 0 indicates that knowledge does not belong to the pending request form; a is3To 1 indicates that the knowledge belongs to a knowledge cache table, a3A value of 0 indicates that the knowledge does not belong to the knowledge cache table.
In the embodiment of the present invention, for the received request packet and response packet, mapping knowledge therein to an index of an N-order tensorial data structure x, and obtaining a corresponding tensor element value by using a parafacc decomposition technique, if it is determined that the corresponding knowledge is in the N-order tensorial data structure x according to the tensor element value, then performing different routing processes for the request packet and response packet, where the processes are respectively shown in fig. 7a to 7 b.
As shown in fig. 7a to 7b, the specific implementation process of step ST201 (whether the query knowledge is in the tensor table) is shown in fig. 8, and the main process is as follows:
after receiving the request packet or the response packet, mapping the knowledge thereof into an index of an N-order tensorial data structure x, and obtaining the corresponding tensor element value by using the PARAFAC decomposition technology as follows:
step ST 2011: acquiring knowledge from the request packet or the response packet;
step ST 2012: according to the acquired knowledge c1/c2/…/cN-1Obtaining tensor elements by mapping function g
Figure BDA0001700147910000073
Index number i of1=g(c1),i2=g(c2),…,iN-1=g(cN-1),i N1 is ═ 1; wherein iNThe first dimension data of the Nth order tensor is inquired, namely the type of the table; the type of the table will not be "0" as long as knowledge is in the table, so the nth order tensor at query need only know whether the first dimension data is "true".
Step ST 2013: computing knowledge correspondencesTensor element of
Figure BDA0001700147910000081
The calculation formula is as follows:
Figure BDA0001700147910000082
wherein R represents the decomposition rank of the tensor,
Figure BDA0001700147910000083
is that
Figure BDA0001700147910000084
One element of (1).
Step ST 2014: if the calculated tensor element value is 0, outputting that the tensor element value is not found; if not, the subsequent routing and forwarding operation is performed.
As shown in fig. 7a, for a request packet:
step ST 202: judging whether corresponding knowledge exists in a knowledge cache table, namely judging tensor elements
Figure BDA0001700147910000085
In (a)3Is 1, wherein i1=g(c1),i2=g(c2),…,iN-1=g(cN-1),iNIf yes, it indicates that the corresponding knowledge exists in the knowledge cache table, and proceeds to step ST 203; if a3If the value of (1) is 0, it means that the knowledge is not in the local knowledge cache table, and the process proceeds to step ST 204.
Step ST 203: computing
Figure BDA0001700147910000086
Is the pointer, where i1=g(c1),i2=g(c2),…,iN-1=g(cN-1),iN2 (the second dimension data of the nth order tensor is the content pointer so iN2); and packaging the content pointed by the pointer and forwarding the content through the port i.
Step ST 204:determining whether corresponding knowledge exists in the pending request list, i.e. determining a2If the value of (1) is not 1, if yes, it indicates that the knowledge already exists in the pending request table, and the process proceeds to step ST 205; if a2If the value of "0" indicates that knowledge is not in the pending request table, the process proceeds to step ST 206.
Step ST 205: the knowledge of the request already exists in the pending request table, which indicates that the request with the same knowledge has been forwarded before, and the port number i of the current request is recorded in the source port number of the request packet.
Step ST 206: if the requested knowledge is not in the pending request list, judging whether the knowledge forwarding table has information for forwarding the next hop route, namely judging a1If the value of (1) is not 1, if yes, it indicates that the forwarding table has the information of the knowledge, and step ST207 is performed; if a1If the value of (1) is 0, the request packet is discarded or a NACK acknowledgement message is returned.
Step ST 207: recording the corresponding knowledge in the pending request form, i.e. a2Is set to 1, and records the port number i of the current request into the source port number of the request packet.
Step ST 208: recalculation
Figure BDA0001700147910000087
Is a port number, where i1=g(c1),i2=g(c2),…,iN-1=g(cN-1),iN3 (the third dimension of the nth order tensor is the port number so iN3) and forwards the next hop route via the request packet source port.
As shown in fig. 7b, for a response packet:
step ST 209: by tensor elements
Figure BDA0001700147910000091
A value of (b), wherein i1=g(c1),i2=g(c2),…,iN-1=g(cN-1),iNJudging whether the knowledge of the response packet is requested by the route or not, namely judging
Figure BDA0001700147910000092
In (a)2If yes, it indicates that the corresponding knowledge is already in the pending request table and there is an existing request, and step ST210 is performed. If a is2If the value of "0" indicates that knowledge is not in the pending request table and has not been requested, the response packet may be discarded or a NACK acknowledgement may be returned.
Step ST 210: computing
Figure BDA0001700147910000093
Is a port number, where i1=g(c1),i2=g(c2),…,iN-1=g(cN-1),iN3, and forwarding the next hop route through a port corresponding to the forwarding port number, and then deleting the record of the corresponding knowledge in the pending request table, namely a2And setting 0.
Step ST 211: then storing the corresponding knowledge into a knowledge cache table, and a3Is set to 1.
Step ST 212: the address where the corresponding knowledge is stored is entered into a pointer.
And updating the tensorial data structures of the fourth order and the N order.
In the embodiment of the invention, an N-order tensed data structure x is divided into a plurality of small non-overlapping tensor blocks in advance; decomposing each small tensor block by utilizing a PARAFAC decomposition technology, extracting low-dimensional information characteristics and storing the low-dimensional information characteristics; when the routing, caching and forwarding operations are carried out, the updating operations such as inquiring, deleting, inserting and the like are carried out according to the knowledge in the corresponding small tensor block. A flowchart for implementing route forwarding after dividing the small tensor data structure is shown in fig. 9. Constructing a large tensorial data structure according to the method of "one, construct routing Table data Structure" above
Figure BDA0001700147910000094
The method of (2) is not changed; after the construction of the large tensor data structure, step ST302 is added, i.e. the large tensor is divided into non-overlapping small tensors. The method for extracting the low-dimensional information features is not changed, and the specific operation is carried out by extracting the low-dimensional information of the large tensorThe information features become low-dimensional information features for which each small tensor is extracted, respectively.
As shown in fig. 9, the flow of adding the update structure mainly includes the following steps:
ST 301: constructing an N-order tensorial data structure
Figure BDA0001700147910000095
ST 302: the N-order tensorial data structure x is structurally divided into a plurality of independent and non-overlapping small tensor structures as shown in FIG. 10
Figure BDA0001700147910000096
Each small tensor corresponds to a record table to be updated, the capacity of the record table is T knowledge records, and the knowledge records to be updated are recorded in the record table.
ST 303: and recording the data needing to be updated into the record table to be updated. When the number of records in the record table to be updated exceeds T, updating the values in the table to the corresponding small tensor
Figure BDA0001700147910000097
In the method, the updated small tensor structure is subjected to PARAFAC decomposition technology
Figure BDA0001700147910000098
Decomposition is carried out. And returning the updated decomposition value to store for route query, and emptying the record table to be updated.
The subsequent operations after the decomposition of the small tensor are similar to those introduced before, and mainly as follows:
the specific operation of decomposing the small tensor according to the steps of the PARAFAC decomposition technique described above and shown in fig. 5 is as follows:
step ST 101: decomposition rank R of input small tensor, small tensor
Figure BDA0001700147910000101
Maximum number of iterations Tmax
Step ST 102: estimating
Figure BDA0001700147910000102
And is assigned to U(1),U(2)...U(N)
Step ST 103: completing one iteration from step 1031 to step 1036 is called one iteration, and repeating steps ST1031 to ST1035 until convergence or maximum number of iterations T is reachedmax(ii) a Step ST1033 to step ST 1035: cycling N times, 1 st of the cycle obtaining U(1)Obtaining U in cycle 2(2)Repeating the process for the Nth time to obtain U(N)
Step ST 104: and (3) outputting: factor matrix U(1),U(2),…,U(N)
FIG. 6 shows the calculation U of the alternating least squares algorithm in step ST103 in FIG. 5(n)Is described.
Step ST 1031: initializing a loop variable to 1;
step ST 1032: judging whether the circulation is finished or not, wherein the circulation frequency is N;
step ST 1033: calculated according to the following formula;
Figure BDA0001700147910000103
in the above formula, UTDenotes the transpose of U and denotes the Hadamard product of the matrix.
Step ST 1034: calculated according to the following formula;
Figure BDA0001700147910000104
in the above formula, the first and second carbon atoms are,
Figure BDA0001700147910000105
is the tensor
Figure BDA0001700147910000106
The n-mode matrix of (a) is,
Figure BDA0001700147910000108
representing the pseudo-inverse, ⊙ representing the momentsKhatri-Rao product of the matrix.
Step ST 1035: normalized U(n)For each column, the normalization factor is assigned to σ.
After adding the small tensor structure convenient for updating, the following steps in the routing process in fig. 7 and 8 need to adjust specific operations:
in steps ST2012, ST2013, ST203 and ST208, the corresponding small tensor index i needs to be calculated according to the actual tensor division condition1,i2,…,iNTo calculate the corresponding small tensor element of the index
Figure BDA0001700147910000107
The value of (c). Step ST 202: judging whether corresponding knowledge exists in a knowledge cache table, namely judging a in the corresponding tensor element3If yes, it indicates that the corresponding knowledge exists in the knowledge cache table, and go to step ST 203; if a3Is 0, a corresponding knowledge is searched in the record table to be updated3If the value of (1) is 0 or the knowledge does not exist in the record table to be updated, it means that the knowledge is not in the local knowledge cache table, and the process proceeds to step ST204, and if the value of (1) is 1, the process proceeds to step ST 203.
Step ST 204: judging whether corresponding knowledge exists in the pending request list, namely judging a in the tensor element2If the value of (1) is not 1, if yes, it indicates that the knowledge already exists in the pending request table, and the process proceeds to step ST 205; if a2Is 0, a corresponding knowledge is searched in the record table to be updated2If the value of (1) is 0 or the knowledge does not exist in the record table to be updated, it means that the knowledge is not in the local knowledge cache table, and the process proceeds to step ST206, and if the value of (1) is 1, the process proceeds to step ST 205.
Step ST 205: the knowledge of the request already exists in the pending request table, which indicates that the request with the same knowledge has been forwarded before, and the port number i of the request is recorded in the record table to be updated.
Step ST 207: recording corresponding knowledge into a pending request table, namely recording the knowledge and the requested port number i into a record table to be updated, wherein the record table to be updated contains the port number iA of knowledge2Is set to 1.
Step ST 209: judging whether the knowledge of the response packet is requested by the routing, namely calculating the small tensor element of the table type corresponding to the knowledge
Figure BDA0001700147910000111
The corresponding index i needs to be calculated according to the actual tensoriation division condition1,i2,…,iNJudgment of a2If yes, it indicates that the corresponding knowledge is already in the pending request table and there is an existing request, and step ST210 is performed. If a is2Is 0, a corresponding knowledge is searched in the record table to be updated2A value of (a)2Also 0 or the knowledge is not to exist in the update record table, indicating that the knowledge is not in the pending request table and has not been requested, the response packet may be discarded or a NACK confirmation message may be returned.
Step ST 210: computing small tensor elements of knowledge corresponding port numbers
Figure BDA0001700147910000112
According to the actual tensorial division, calculating the corresponding index i1,i2,…,iNThe next hop route is forwarded through the port corresponding to the port number, and then the record of the corresponding knowledge in the pending request table is deleted, namely a corresponding to the knowledge in the corresponding record table to be updated2And is noted as 0.
Step ST 211: then storing the corresponding knowledge in a knowledge cache table, and storing a corresponding to the knowledge in a corresponding record table to be updated3Is denoted as 1.
Step ST 212: and recording the address for storing the corresponding knowledge into a pointer of the knowledge in the corresponding record table to be updated.
Through the above description of the embodiments, it is clear to those skilled in the art that the above embodiments can be implemented by software, and can also be implemented by software plus a necessary general hardware platform. With this understanding, the technical solutions of the embodiments can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods according to the embodiments of the present invention.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. A method for constructing a routing table data structure and implementing routing forwarding, comprising:
three data structures KFT, KST and PRT related to route forwarding in the knowledge center Internet are integrated into an information summary table, and an N-order tensorial data structure is utilized
Figure FDA0002493262660000017
To represent;
tensor data structure from order N using PARAFAC decomposition technique
Figure FDA0002493262660000018
Extracting low-dimensional information characteristics of the network;
after receiving the request packet or the response packet, mapping the knowledge thereof into an N-order tensoriated data structure
Figure FDA0002493262660000019
And obtaining corresponding tensor element values by using a PARAFAC decomposition technology, and judging a tensoriation data structure of corresponding knowledge in the N order according to the tensor element values
Figure FDA00024932626600000110
If so, performing subsequent routing and forwarding operations;
wherein the data structure is tensed from the N order by using PARAFAC decomposition technique
Figure FDA00024932626600000112
Extracting low-dimensional information characteristics of the network, thereby tensifying the data structure of the N order
Figure FDA00024932626600000111
Decomposed into N network information feature vectors { U }(1),U(2),...,U(N)The scale after decomposition is R × (I)1+I2+…+IN);
The above process is represented as:
Figure FDA0002493262660000011
wherein R represents the decomposition rank of the tensor,
Figure FDA0002493262660000012
is the outer product of the vector, σ ═ σ12,…,σR]In order to normalize the factors, the method comprises the steps of,
Figure FDA0002493262660000013
is a factor matrix in which
Figure FDA0002493262660000014
Representing eigenvectors that project tensors into eigenspace, an
Figure FDA0002493262660000015
2. The method of claim 1, wherein the N-order tensorial data structure is a data structure of N-degree tensor
Figure FDA00024932626600000113
Scale of I1×I2×…×INThe first N-1 order tensor represents that the knowledge mark has N-1 levels of layers, and the size of each order tensor is the number of knowledge contained in each layer in the knowledge layer structure; the Nth-order tensor is the characteristic information of knowledge, and the size of the characteristic information is related to the category number of the characteristic information;
in the data structure of the Nth order tensor, the front end part uses 3 bits to represent the type of the table, the middle part uses 32 bits to store the pointer of the knowledge content, the tail part uses 8 bits to store the port number, wherein the front part is 4 bits to forward the port number, and the rear part is 4 bits to request the source port number.
3. The method of claim 1, wherein the N-th order tensorial data structure is a N-th order tensorial data structure
Figure FDA00024932626600000114
Each tensor element of
Figure FDA0002493262660000016
Shows knowledge identification as g-1(i1)/g-1(i2)/…/g-1(iN-1) The knowledge is represented by a hierarchy, each hierarchy being symbolized/separated, in∈{1,2,…,In1,2, …, N, g denotes the mapping function of knowledge to tensor element indices.
4. The method of claim 1, wherein the data structure is tensoriated from N-th order using PARAFAC decomposition technique
Figure FDA0002493262660000024
The step of extracting the low-dimensional information features of the network comprises the following steps:
decomposition rank R and maximum iteration number T of input tensormax
Estimating
Figure FDA0002493262660000025
And is assigned to U(1),U(2)…U(N)
Repeat TmaxCalculating U by using alternative least square method(n)Obtaining U for cycle 1(1)Obtaining U in cycle 2(2)Repeating the process for the Nth time to obtain U(N)
Network information feature vector (U) in output factor matrix form(1),U(2),...,U(N)}。
5. The method of claim 4, wherein the calculation of U by using the alternating least square method is repeated(n)The process of (2) is as follows:
if the current cycle is not over, the intermediate parameter V is calculated using the following formula(n)
V(n)=U(N)TU(N)*...*U(n+1)TU(n+1)*U(n-1)TU(n-1)*...*U(1)TU(1)
In the above formula, T is a matrix transposition symbol, and represents a Hadamard product of the matrix;
then, calculate U(n)
Figure FDA0002493262660000021
In the above formula, X(n)Is the tensor
Figure FDA0002493262660000026
The n-mode matrix of (a) is,
Figure FDA0002493262660000027
representing the pseudo-inverse, ⊙ representing the Khatri-Rao product of the matrix;
finally, normalize U(n)For each column, the normalization factor is assigned to σ.
6. The method of claim 5, wherein the request packet or the response packet is received, and the knowledge thereof is mapped into an N-order tensorial data structure
Figure FDA0002493262660000028
And the corresponding tensor element values are obtained by using the PARAFAC decomposition technology as follows:
acquiring knowledge from the request packet or the response packet;
according to the acquired knowledge c1/c2/…/cN-1Obtaining tensor elements by mapping function g
Figure FDA0002493262660000022
Index number i of1=g(c1),i2=g(c2),...,iN-1=g(cN-1),iN1 is ═ 1; wherein iNThe first dimension data of the Nth order tensor is inquired, namely the type of the table;
then, tensor elements corresponding to knowledge are calculated
Figure FDA0002493262660000029
The calculation formula is as follows:
Figure FDA0002493262660000023
wherein R represents the decomposition rank of the tensor,
Figure FDA00024932626600000210
is that
Figure FDA00024932626600000211
One element of (1).
7. The method of claim 1 or 6, wherein the computed tensor element value is 0 and the output is not found; if not, the subsequent routing and forwarding operation is performed.
8. The method of claim 2, wherein the routing and forwarding operation comprises:
of the 3 bits at the front end of the Nth order tensor, the 1 st bit to the 3 rd bit are correspondingly marked as a1~a3,a1To 1 denotes that knowledge belongs to the knowledge forwarding table, a1A value of 0 indicates that knowledge does not belong to the knowledge forwarding table; a is2A value of 1 indicates that knowledge belongs to the pending request list, a2A value of 0 indicates that knowledge does not belong to the pending request form; a is3To 1 indicates that the knowledge belongs to a knowledge cache table, a3A value of 0 indicates that the knowledge does not belong to the knowledge cache table;
assuming that a port receiving the request packet or the response packet is a port i;
for the request packet, judging whether corresponding knowledge exists in a knowledge cache table, namely judging tensor elements
Figure FDA0002493262660000031
In (a)3Is 1, wherein i1=g(c1),i2=g(c2),…,iN-1=g(cN-1),iNIf yes, the corresponding knowledge is present in the knowledge cache table, and calculation is carried out
Figure FDA0002493262660000032
Is the pointer, where i1=g(c1),i2=g(c2),...,iN-1=g(cN-1),iN2; packaging the content pointed by the pointer and forwarding the content through a port i; if a3If the value of (a) is 0, then it is determined whether the corresponding knowledge exists in the pending request table, i.e., it is determined that a2If yes, recording the port number i of the request to the source port number of the request packet(ii) a If a2If the value of (a) is 0, judging whether the information for forwarding the next hop route exists in the knowledge forwarding table, namely judging a1If so, recording corresponding knowledge into the pending request table, namely a2Is set to 1, and records the port number i of the current request into the source port number of the request packet, and then calculates
Figure FDA0002493262660000033
Is a port number, where i1=g(c1),i2=g(c2),...,iN-1=g(cN-1),iN3, and forwarding the next hop route through the source port of the request packet; if a1If the value of the packet is 0, discarding the request packet or returning a NACK acknowledgement message;
for response packets, passing tensor elements
Figure FDA0002493262660000034
Determining whether the knowledge of the response packet has been requested by the route, i.e. determining
Figure FDA0002493262660000035
In (a)2Is 1, wherein i1=g(c1),i2=g(c2),…,iN-1=g(cN-1),iNIf yes, it shows that the corresponding knowledge is already in the pending request table, and the excess request is already existed, and the calculation is carried out
Figure FDA0002493262660000036
Is a port number, where i1=g(c1),i2=g(c2),...,iN-1=g(cN-1),iN3, and forwarding the next hop route through a port corresponding to the forwarding port number, and then deleting the record of the corresponding knowledge in the pending request table, namely a2Setting 0; then storing the corresponding knowledge into a knowledge cache table, and a3Setting the value of (1), and finally, recording the address for storing the corresponding knowledge into a pointer; if a is2Is 0, the response is discardedA packet or a NACK acknowledgement message is returned.
9. The method of claim 1, wherein the method further comprises: updating the N-order tensorial data structure in the following way:
n-order tensor data structure
Figure FDA0002493262660000041
Dividing the data into a plurality of non-overlapped small tensor blocks, wherein each small tensor block corresponds to a record table to be updated, the capacity of the record table is T knowledge records, and the knowledge to be updated is recorded in the record table;
decomposing each small tensor block by utilizing a PARAFAC decomposition technology, extracting low-dimensional information characteristics and storing the low-dimensional information characteristics into a route;
when the routing, caching and forwarding operations are carried out, the knowledge in the corresponding small tensor block is inquired, deleted and inserted.
CN201810633244.1A 2018-06-19 2018-06-19 Method for constructing routing table data structure and realizing routing forwarding Active CN108737276B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810633244.1A CN108737276B (en) 2018-06-19 2018-06-19 Method for constructing routing table data structure and realizing routing forwarding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810633244.1A CN108737276B (en) 2018-06-19 2018-06-19 Method for constructing routing table data structure and realizing routing forwarding

Publications (2)

Publication Number Publication Date
CN108737276A CN108737276A (en) 2018-11-02
CN108737276B true CN108737276B (en) 2020-08-25

Family

ID=63930187

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810633244.1A Active CN108737276B (en) 2018-06-19 2018-06-19 Method for constructing routing table data structure and realizing routing forwarding

Country Status (1)

Country Link
CN (1) CN108737276B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463910B (en) * 2020-12-17 2022-08-09 福州物联网开放实验室有限公司 Internet of things multidimensional data fusion system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102986170A (en) * 2010-06-15 2013-03-20 泰克莱克股份有限公司 Methods, systems, and computer readable media for providing dynamic origination-based routing key registration in a DIAMETER network
CN103236971A (en) * 2013-05-13 2013-08-07 北京科技大学 Route forwarding method for content internet
CN104836733A (en) * 2015-04-14 2015-08-12 中国人民解放军国防科学技术大学 Method for achieving optimal link state routing protocol
CN107948060A (en) * 2016-10-12 2018-04-20 深圳市中兴微电子技术有限公司 A kind of new routing table is established and IP method for searching route and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10447676B2 (en) * 2014-10-10 2019-10-15 Adp, Llc Securing application programming interfaces (APIS) through infrastructure virtualization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102986170A (en) * 2010-06-15 2013-03-20 泰克莱克股份有限公司 Methods, systems, and computer readable media for providing dynamic origination-based routing key registration in a DIAMETER network
CN103236971A (en) * 2013-05-13 2013-08-07 北京科技大学 Route forwarding method for content internet
CN104836733A (en) * 2015-04-14 2015-08-12 中国人民解放军国防科学技术大学 Method for achieving optimal link state routing protocol
CN107948060A (en) * 2016-10-12 2018-04-20 深圳市中兴微电子技术有限公司 A kind of new routing table is established and IP method for searching route and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
路由表在网络中的应用研究;张轶瑄;《科技风》;20161230;全文 *

Also Published As

Publication number Publication date
CN108737276A (en) 2018-11-02

Similar Documents

Publication Publication Date Title
Li et al. Packet forwarding in named data networking requirements and survey of solutions
US9077669B2 (en) Efficient lookup methods for ternary content addressable memory and associated devices and systems
US7613134B2 (en) Method and apparatus for storing tree data structures among and within multiple memory channels
CN102656580B (en) Methods of structuring data, pre-complied exception list engines, and network appliances
US9178806B2 (en) High-speed content routing
CN111026788B (en) Homomorphic encryption-based multi-keyword ciphertext ordering and retrieving method in hybrid cloud
CN108769111A (en) A kind of server connection method, computer readable storage medium and terminal device
CN106815350A (en) Dynamic ciphertext multi-key word searches for method generally in a kind of cloud environment
CN101827137B (en) Hash table-based and extended memory-based high-performance IPv6 address searching method
US20120066410A1 (en) Data structure, method and system for address lookup
CN107967219A (en) A kind of extensive character string high-speed searching method based on TCAM
CN108134739B (en) Route searching method and device based on index trie
WO2020038399A1 (en) Data packet classification method and apparatus, and computer-readable storage medium
CN111629081A (en) Internet protocol IP address data processing method and device and electronic equipment
CN108737276B (en) Method for constructing routing table data structure and realizing routing forwarding
CN115292737B (en) Multi-keyword fuzzy search encryption method and system and electronic equipment
CN108521376B (en) Flow table design method based on attribute similarity in software defined network
CN103870267B (en) For the method realized in computer systems and computer implemented system of the data object in process data center network
CN107294855B (en) A kind of TCP under high-performance calculation network searches optimization method
CN110851658B (en) Tree index data structure, content storage pool, router and tree index method
WO2021218854A1 (en) Message classification method and apparatus, electronic device, and readable medium
JP6980412B2 (en) Systems and methods for efficient interval search using locality retention hashes
JP2005071115A (en) Registration/retrieval method for object in p2p environment and program therefor
CN102457530A (en) Iterative P2P credit management scheme based on clustering
Jing et al. An Efficient Name Look-up Architecture Based on Binary Search in NDN Networking

Legal Events

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