CN108737276A - A method of structure routing table data structure simultaneously realizes routing forwarding - Google Patents
A method of structure routing table data structure simultaneously realizes routing forwarding Download PDFInfo
- Publication number
- CN108737276A CN108737276A CN201810633244.1A CN201810633244A CN108737276A CN 108737276 A CN108737276 A CN 108737276A CN 201810633244 A CN201810633244 A CN 201810633244A CN 108737276 A CN108737276 A CN 108737276A
- Authority
- CN
- China
- Prior art keywords
- knowledge
- tensor
- routing
- forwarding
- value
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/54—Organization of routing tables
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/742—Route cache; Operation thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling 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/63—Routing a service request depending on the request content or context
Abstract
The invention discloses a kind of methods for building routing table data structure and realizing routing forwarding.Based on this method while rapid extraction network big data knowledge, can also find the key feature information in high-order higher-dimension structural knowledge, reduce network routing nodes, calculate node and memory node consumption resource, promote network service performance.
Description
Technical field
The present invention relates to technical field of the computer network more particularly to a kind of structure routing table data structure and realize routing
The method of forwarding.
Background technology
The new architecture of current intelligent Web changes from centered on data acquisition to centered on knowledge acquisition, greatly
If the network big data of scale source Multiple types complexity is changed into the compression knowledge of structuring without analyzing processing, only meeting
By non-critical information, key message, non-demand information, demand information passes to the network user simultaneously, wherein non-key and non-need
The scale of information is asked often to be much larger than crucial and demand information, this will cause demand information loss and key message in user terminal
It is capped, also will be that the information transmission channel of network brings white elephant.
It is driving that the communication process of Knowledge Center internet, which is with data, its routing procedure relates generally to three kinds of numbers
According to structure:The mapping of knowledge forwarding table (Knowledge Forwarding Table, KFT) stored knowledge and Knowledge Source port
Relationship;Pending query requests table (Pending Request Table, PRT) storage not yet receives knowledge and the request bag source of response
The mapping relations of port;Knowledge cache table (Knowledge Storage Table, KST) records the local of knowledge interlink node
Knowledge cache information.
Knowledge consumption person sends out request bag after the knowledge asked.The node that request bag reaches inquires KST first,
The direct returning response packet if finding corresponding knowledge in local cache;Otherwise requested knowledge and request are recorded in PRT
Packet source port.Then KFT is searched, if finding the forwarding port of corresponding knowledge, request bag is forwarded to the port;Otherwise it loses
Abandon or return NACK confirmation messages.It, should until request bag arrival possesses the producer or the cache node of asking follow knowledge
The producer or cache node can encapsulate corresponding response bag, and return to consumer along the path that request bag reaches.Receive this
Local knowledge base and KST are updated according to cache policy after the knowledge interlink node transmitted response packet of response message.
It takes the knowledge of variable-length to extract differentiation mode in Knowledge Center internet, solves address in IP network and provide
The problem of source exhaustion, however this mode but results in some new problems.
Mark problem:Under unbounded knowledge space, each list item may occupy larger storage resource in routing table;
And the mapping for being knowledge with forwarding port recorded in the routing table of Knowledge Center internet, and the quantity of knowledge is in network
It is far longer than the quantity of host, this will cause the number of entries of routing table very huge.In summary 2 points, with IP network phase
Than routing table entry quantity and every entry the space occupied will all greatly increase in Knowledge Center internet.The quantity of knowledge
Very huge, dynamic of the generation with height of knowledge, new knowledge can be deduced constantly from old knowledge and be generated.Although knowing
Knowledge center internet faces the huge problem of knowledge space, but this huge knowledge space is substantially a sparse sky
Between, all elements in a space can be made full use of there is presently no a kind of effective specification.
Routing issue:Since the quantity of knowledge is far longer than the quantity of host, can not be kept away in Knowledge Center internet
There are routing table entry substantial amounts in that exempts from.In this case if still using traditional Routing Algorithm (such as
Order traversal, binary tree search) routing procedure will be made to introduce compared with long time delay.
Invention content
The object of the present invention is to provide a kind of methods for building routing table data structure and realizing routing forwarding.
The purpose of the present invention is what is be achieved through the following technical solutions:
A method of structure routing table data structure simultaneously realizes routing forwarding, including:
Routing forwarding in Knowledge Center internet relevant three kinds of data structures KFT, KST, PRT are integrated into an information
Summary table is indicated using N ranks tensor data structure x;
The low-dimensional information characteristics of network are extracted from N rank tensor data structures x using PARAFAC decomposition techniques;
After receiving request bag or response bag, by Knowledge Mapping therein at the rope of N rank tensor data structures x
Draw, and corresponding tensor element value is obtained using PARAFAC decomposition techniques, if judging corresponding knowledge in N according to tensor element value
In rank tensor data structure x, then carries out follow-up routing and operated with forwarding.
As seen from the above technical solution provided by the invention, while rapid extraction network big data knowledge,
It can find the key feature information in high-order higher-dimension structural knowledge, reduce network routing nodes, calculate node and storage section
The consumption resource of point promotes network service performance.
Description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, required use in being described below to embodiment
Attached drawing be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for this
For the those of ordinary skill in field, without creative efforts, other are can also be obtained according to these attached drawings
Attached drawing.
Fig. 1 is a kind of stream of method for building routing table data structure and realizing routing forwarding provided in an embodiment of the present invention
Cheng Tu;
Fig. 2 is the schematic diagram of N ranks tensor data structure x provided in an embodiment of the present invention;
Fig. 3 is N ranks tensor data structure schematic diagram provided in an embodiment of the present invention;
Fig. 4 provides the route information table tensor data structure signal that knowledge is identified as second order hierarchical for the embodiment of the present invention
Figure;
Fig. 5 is tensor PARAFAC decomposition process figures provided in an embodiment of the present invention;
Fig. 6 is that recycling alternating least-squares provided in an embodiment of the present invention calculate U(n)Flow chart;
Fig. 7 is the routing flow chart of tensor data structure provided in an embodiment of the present invention;
Fig. 8 be inquiry knowledge provided in an embodiment of the present invention whether in tensor table flow chart;
Fig. 9 is the method flow diagram of realization routing forwarding after the small tensor data structure of division provided in an embodiment of the present invention;
Figure 10 is N ranks tensor data update structural schematic diagram provided in an embodiment of the present invention.
Specific implementation mode
With reference to the attached drawing in the embodiment of the present invention, technical solution in the embodiment of the present invention carries out clear, complete
Ground describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on this
The embodiment of invention, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, belongs to protection scope of the present invention.
The new architecture of current intelligent Web changes from centered on data acquisition to centered on knowledge acquisition, greatly
If the network big data of scale source Multiple types complexity is changed into the compression knowledge of structuring without analyzing processing, only meeting
By non-critical information, key message, non-demand information, demand information passes to the network user simultaneously, wherein non-key and non-need
The scale of information is asked often to be much larger than crucial and demand information, this will cause demand information loss and key message in user terminal
It is capped, also will be that the information transmission channel of network brings white elephant.The present invention provides a kind of structure routing table numbers
According to structure and the method for realizing routing forwarding high-order higher-dimension knot can be also found while rapid extraction network big data knowledge
Key feature information in structure knowledge, reduce network routing nodes, calculate node and memory node consumption resource, promoted
Network service performance.
As shown in Figure 1, being a kind of structure routing table data structure provided in an embodiment of the present invention and realizing routing forwarding
Method includes mainly:
1, routing forwarding in Knowledge Center internet relevant three kinds of data structures KFT, KST, PRT are integrated into a letter
Summary table is ceased, is indicated using N ranks tensor data structure x.
In the embodiment of the present invention, the scale of N rank tensor data structures x is I1×I2×…×IN, the N ranks tensor
The preceding N-1 ranks tensor representation knowledge of data structure x has N-1 stage layereds, per the size I of single order tensor1,I2,…,IN-1It is knowledge point
It is each in layer structure to be layered the number for including knowledge;N rank tensors are the characteristic information of knowledge, and characteristic information can be as needed
It is designed as signing messages, knowledge popularity, package size etc., size INIt is related to the categorical measure of characteristic information;
In the embodiment of the present invention, the knowledge in the Knowledge Center internet is a kind of network information data structure packet
Name and its corresponding network information for including data content, can be mark, pointer, the source address of data packet, source port, purpose
The information such as address, destination interface, transport protocol, flag bit, the knowledge indicates with layered structure, each layering "/"
It separates, such as:com/youtube/user/pe;The KFT refers to the knowledge forwarding table (Knowledge during routing forwarding
Forwarding Table, KFT), the mapping relations of stored knowledge and Knowledge Source port;The PRT refers to pending query requests table
(Pending Request Table, PRT), storage not yet receive the mapping relations of the knowledge and request bag source port of response;
The KST refers to knowledge cache table (Knowledge Storage Table, KST), records the Indigenous knowledge of knowledge interlink node
Cache information.
2, the low-dimensional information characteristics of network are extracted from N rank tensor data structures x using PARAFAC decomposition techniques.
In the embodiment of the present invention, net is extracted from extensive N ranks tensor data structure x using PARAFAC decomposition techniques
The low-dimensional information characteristics of network, to which inefficient N rank tensor data structures x is decomposed into N number of efficient network information Characteristic Vectors
Measure { U(1),U(2),…,U(N), above-mentioned processing procedure is expressed as:
Wherein, R indicate tensor decomposition order, ° be vector apposition, σ=[σ1,σ2,…,σR] it is normalization factor,For factor matrix, whereinIt indicates
By the feature vector of tensor projection to feature space, and
The extraction of low-dimensional knowledge feature is completed through the above way, and entire extensive N rank tensor data structures x is decomposed
It is R × (I on a large scale1+I2+…+IN) efficient knowledge store structure.
3, after receiving request bag or response bag, by Knowledge Mapping therein at the rope of N rank tensor data structures x
Draw, and corresponding tensor element value is obtained using PARAFAC decomposition techniques, if judging corresponding knowledge in N according to tensor element value
In rank tensor data structure x, then carries out follow-up routing and operated with forwarding.
In network routing, caching, repeating process, the request and response of routing are reached, its knowledge will be looked into first
It askes.By the Knowledge Mapping in request bag or response bag at the index of N ranks tensor data structure x in step 1, use simultaneously utilizes
PARAFAC decomposition techniques obtain corresponding tensor element value, and obtained value illustrates that this records not in the routing table if 0, defeated
Go out and does not find;Obtained value illustrates this record in the routing table if non-zero, and the value for exporting the tensor element is to search
Record.Then the follow-up routing that route service is carried out further according to the value of the tensor element is operated with forwarding.
In the embodiment of the present invention, the request bag refer in knowledge internet knowledge consumption person send out containing asking follow knowledge
Data packet;The response bag refers to the knowledge post package of the person that finds knowledge consumption in knowledge internet request with please seek knowledge
Know the data packet of content.
Routing is summarized as follows with forwarding operation:If receiving request bag, the knowledge of request bag is judged whether in KST, if
It is then to find corresponding knowledge content encapsulation and returning response packet in local cache, requested knowledge is otherwise recorded in PRT
And request bag source port;Then KFT is searched, if finding the forwarding port of corresponding knowledge, request bag is turned by the port
Hair.Until request bag arrival possesses the producer or the cache node of asking follow knowledge, the producer or cache node can seal
Corresponding response bag is filled, and consumer is returned to along the path that request bag reaches.If receiving response bag, and receive response letter
The request bag source port number of responding to knowledge is found in the routing of breath in PRT, passes through the request bag source port transmitted response packet
And local knowledge base is updated, knowledge in the response bag is inserted into KST, then delete the record of the responding to knowledge in PRT
4, N rank tensor data structures are updated.
The embodiment of the present invention also includes the mode that N rank tensor data structures are updated, i.e., was generated in knowledge extraction
Renewal of knowledge structure is just added in journey, i.e., former Web content tensor data structure is divided into multiple Xiao Zhang's gauge blocks, each tensor
Block individually extracts knowledge, and in the routing of above-mentioned network, caching, repeating process, tensor data structure is inserted into, is deleted
It the operations such as removes, update, then the knowledge by corresponding Xiao Zhang's gauge block is only needed to operate.
In order to make it easy to understand, being described further below for said program of the present invention.
One, routing table data structure is built.
In the embodiment of the present invention, KFT, KST, PRT are integrated into an information summary table, are I with a scale1×I2×…
×INTensor data structure x indicate that N rank tensor data structure x schematic diagrames are as shown in Figure 2.
The preceding N-1 ranks tensor representation knowledge of the N ranks tensor data structure x is identified with N-1 stage layereds, per single order tensor
Size I1,I2,…,IN-1It is the number that each layering includes knowledge mark in knowledge delamination structure;N rank tensors are knowledge
Network feature information, characteristic information can be designed as signing messages, knowledge popularity, package size etc. as needed, big
Small INIt is related to the categorical measure of characteristic information;
To realize that basic forwarding capability, the characteristic information in N rank tensors must have following three content (I at this timeN=
3):As shown in figure 3, in the data structure of N rank tensors, the type that fore-end characterizes table with 3 bit is (to distinguish knowledge
Which table of tri- tables of KFT, PRT, KST be contained within), the pointer that knowledge content is stored in middle section with 32 bit, end
Port numbers are stored in part with 8bit, wherein preceding 4bit is forwarding port numbers, rear 4bit is request bag source port number.
Each tensor element in N rank tensor data structures xIllustrate that knowledge is identified as g-1(i1)/g-1
(i2)/…/g-1(iN-1) network knowledge characteristic information, in∈{1,2,…,In, n=1,2 ..., N, g indicate knowledge to open
The mapping function of secondary element index.
By taking knowledge is identified as the information summary table of second order hierarchical as an example, corresponding information summary table is as shown in table 1.
1 knowledge of table is identified as the information summary table of 2 stage layereds
Above-mentioned knowledge is identified as the information summary table namely N-1=2 of second order hierarchical, then corresponds to three rank tensor data structures,
Its schematic diagram is as shown in Figure 4.
Two, low-dimensional information characteristics are extracted.
The low-dimensional information for extracting network from extensive N ranks tensor data structure x using PARAFAC decomposition techniques is special
Sign, to which inefficient N rank tensor data structures x is decomposed into N number of efficient network information characteristic vector { U(1),U(2),…,U(N), then:
Wherein, R indicate tensor decomposition order, ° be vector apposition, σ=[σ1,σ2,…,σR] it is normalization factor,For factor matrix, whereinIt indicates
By the feature vector of tensor projection to feature space, and
The step of specific PARAFAC decomposition techniques, is as shown in figure 5, mainly include the following steps:
Step ST101:Input the decomposition order R and maximum iteration T of tensormax。
Step ST102:EstimationInitial value, and be assigned to U(1), U(2)…U(N)。
Step ST103:Step 1031 to step 1036 is completed once to be known as an iteration, repeats step ST1031 to step
ST1035 is until restraining or reaching maximum iteration Tmax;Step ST1033 to step ST1035 wherein:N times are recycled,
The 1st time of cycle obtains U(1), the 2nd time of cycle obtain U(2), and so on cycle n-th obtain U(N)。
Step ST104:Export the network information characteristic vector { U of factor matrix form(1),U(2),…,U(N)}。
As shown in fig. 6, calculating U for recycling alternating least-squares in Fig. 5(n)Flow chart namely step ST103
Detailed process, include mainly:
Step ST1031:Loop initialization variable is 1;
Step ST1032:Judge whether cycle terminates, cycle-index N;If previous cycle is not finished, utilize following
Formula calculates intermediate parameters V(n):
V(n)=U(N)TU(N)*…*U(n+1)TU(n+1)*U(n-1)TU(n-1)*…*U(1)TU(1)
In above formula, T is matrix transposition symbol, and the Hadamard of * representing matrixes is accumulated;
Step ST1034:U is calculated as follows(n):
In above formula, X(n)It is the n modular matrixs of tensor x,Indicate pseudoinverse, the Khatri-Rao products of ⊙ representing matrixes;
Step ST1035:Normalize U(n)Each row, normalization factor are included into σ.
Three, routing procedure
In inventive embodiments, in 3 bit of the fore-end of N rank tensors, the 1st bit~the 3rd bit right
That answers is denoted as a1~a3, a1Belong to knowledge forwarding table, a for 1 expression knowledge1It is not belonging to knowledge forwarding table for 0 expression knowledge;a2It is 1
Indicate that knowledge belongs to pending query requests table, a2It is not belonging to pending query requests table for 0 expression knowledge;a3Belong to knowledge caching for 1 expression knowledge
Table, a3It is not belonging to knowledge cache table for 0 expression knowledge.
In the embodiment of the present invention, for receiving request bag with response bag first by Knowledge Mapping therein at N rank tensors
The index of data structure x, and corresponding tensor element value is obtained using PARAFAC decomposition techniques, if being sentenced according to tensor element value
Then fixed corresponding knowledge, different route processings, flow is done for request bag in N rank tensor data structures x from response bag
Respectively as shown in Fig. 7 a~Fig. 7 b.
In Fig. 7 a~Fig. 7 b, specific implementation procedure such as Fig. 8 institutes of step ST201 (whether inquiry knowledge is in tensor table)
Show, main process is as follows:
After receiving request bag or response bag, by Knowledge Mapping therein at the rope of N rank tensor data structures x
Draw, and the process for obtaining using PARAFAC decomposition techniques corresponding tensor element value is as follows:
Step ST2011:Knowledge is obtained from request bag or response bag;
Step ST2012:According to the knowledge c got1/c2/…/cN-1Tensor element is obtained by mapping function g
Call number i1=g (c1),i2=g (c2),…,iN-1=g (cN-1),iN=1;I thereinNThe N rank tensors as inquired
First dimension data, the i.e. type of table;As long as knowledge, in table, the type of table would not be " 0 ", so N rank tensors when inquiry
It is only necessary to know that whether the first dimension data is "true".
Step ST2013:The corresponding tensor element of calculation knowledgeValue, calculation formula is as follows:
Wherein, R indicates the decomposition order of tensor,It isIn an element.
Step ST2014:Calculated tensor element value is that 0 output is not found;If non-zero, then carry out follow-up routing with
Forwarding operation.
As shown in Figure 7a, for request bag:
Step ST202:Judge that corresponding knowledge whether there is in knowledge cache table, that is, judges tensor elementIn
a3Value whether be 1, wherein i1=g (c1),i2=g (c2),…,iN-1=g (cN-1),iN=1, if so, indicating to know accordingly
Knowledge is present in knowledge cache table, is transferred to step ST203;If a3Value be 0, then illustrate that the knowledge is not cached in local knowledge
In table, it is transferred to step ST204.
Step ST203:It calculatesValue be pointer, wherein i1=g (c1),i2=g
(c2),…,iN-1=g (cN-1),iN=2 (the second dimension data of N rank tensors is content pointers so iN=2);By pointer meaning
Content is packaged to be forwarded through port i.
Step ST204:Judge that corresponding knowledge whether there is in pending query requests table, that is, judges a2Value whether be 1, if
It is that then declarative knowledge is present in pending query requests table, is transferred to step ST205;If a2Value be 0, then declarative knowledge do not lie in
In pending query requests table, it is transferred to step ST206.
Step ST205:The knowledge of request is present in pending query requests table forwarded over identical knowledge before explanation
Request records in the port numbers i to request bag source port number that this is asked.
Step ST206:Whether the knowledge of request then has forwarding next not in pending query requests table in judgemental knowledge forwarding table
The information for jumping routing, that is, judge a1Value whether be 1, if so, illustrating the information for having the knowledge in forwarding table, be transferred to step
ST207;If a1Value be 0, then abandon request bag or return a NACK confirmation message.
Step ST207:It records in corresponding knowledge to pending query requests table, i.e., by a2Value be set to 1, and record this request
Port numbers i to request bag source port number in.
Step ST208:It calculates againValue be port numbers, wherein i1=g (c1),i2=g
(c2),…,iN-1=g (cN-1),iN=3 (the third dimension data of N rank tensors is port numbers so iN=3), and through request bag come
Source port forwards next-hop routing.
As shown in Figure 7b, for response bag:
Step ST209:Pass through tensor elementValue, wherein i1=g (c1),i2=g (c2),…,iN-1=g (cN-1),
iN=1 judges whether the knowledge of the response bag is requested through routeing, that is, judgesMiddle a2Value whether be 1, if so, illustrating phase
The knowledge answered is present in pending query requests table, and existing cross is asked, and step ST210 is transferred to.If a2Value be 0, then explanation know
Know not in pending query requests table, without requested, response bag can be abandoned or return to a NACK confirmation message.
Step ST210:It calculatesValue be port numbers, wherein i1=g (c1),i2=g
(c2),…,iN-1=g (cN-1),iN=3, and through forwarding the forwarding next-hop routing of port numbers corresponding ports, then, deletion is accordingly known
Know the record in pending query requests table, i.e., by a2It sets to 0.
Step ST211:Corresponding knowledge is stored in knowledge cache table again, and by a3Value be set to 1.
Step ST212:Pointer is charged into the address for storing corresponding knowledge.
Four, N ranks tensor data structure updates.
In the embodiment of the present invention, N rank tensor data structures x is divided into multiple non-overlapping Xiao Zhang's gauge blocks in advance;Again
Each Xiao Zhang's gauge block is decomposed respectively using PARAFAC decomposition techniques, extraction low-dimensional information characteristics are stored;Into
Walking along the street by, caching and forwarding operate when, inquired for the knowledge in corresponding Xiao Zhang's gauge block, delete, be inserted into etc. updates behaviour
Make.Realize that the flow chart of routing forwarding is as shown in Figure 9 after dividing small tensor data structure.According to front " one, structure routing table number
According to structure " described in method build big tensor data structureMethod it is constant;Build big tensor number
After structure, increases step ST302, i.e., big tensor is divided into non-overlapping small tensor.It is noted earlier " two, extraction low-dimensional
The method of information characteristics " is constant, becomes extracting each Xiao Zhang respectively from the low-dimensional information characteristics for extracting big tensor when specific operation
The low-dimensional information characteristics of amount.
As shown in figure 9, the flow of more new construction is added, key step is as follows:
ST301:Build N rank tensor data structures
ST302:N rank tensor data structures x is divided from structure, as shown in Figure 10, is formed independent non-overlapping
Multiple small tensor structuresEach small tensor corresponds to one and waits for more
New record table, the capacity of record sheet are T knowledge record, will newer knowledge record in this table.
ST303:Record needs in newer data to record sheet to be updated.It is more than when recording quantity in record sheet to be updated
After T, by the value update in table to corresponding small tensorIn, recycle PARAFAC decomposition techniques to updated Xiao Zhang
Measure structureIt is decomposed.It returns to updated decomposition value to be stored for routing inquiry, and empties record to be updated
Table.
Wherein, subsequent operation is all similar with what is introduced before after small tensor resolution, main as follows:
As described above the step of PARAFAC decomposition techniques as shown in Figure 5 decompose small tensor concrete operations it is as follows:
Step ST101:Input decomposition order R, the small tensor of small tensorMaximum iteration Tmax;
Step ST102:EstimationInitial value, and be assigned to U(1), U(2)...U(N);
Step ST103:Step 1031 to step 1036 is completed once to be known as an iteration, repeats step ST1031 to step
ST1035 is until restraining or reaching maximum iteration Tmax;Step ST1033 to step ST1035 wherein:N times are recycled, are followed
The 1st time of ring obtains U(1), the 2nd time of cycle obtain U(2), and so on cycle n-th obtain U(N)。
Step ST104:Output:Factor matrix U(1), U(2)..., U(N)。
Fig. 6 is to replace least-squares algorithm in step ST103 in Fig. 5 to calculate U(n)Flow chart.
Step ST1031:Loop initialization variable is 1;
Step ST1032:Whether judgement follows terminates, cycle-index N;
Step ST1033:It is calculated as follows;
In above formula, UTIndicate the transposition of U, the Hadamard products of * representing matrixes.
Step ST1034:It is calculated as follows;
In above formula,It is tensorN modular matrixs,Indicate pseudoinverse, the Khatri- of ⊙ representing matrixes
Rao is accumulated.
Step ST1035:Normalize U(n)Each row, normalization factor are included into σ.
This is added convenient for after newer small tensor structure, following steps need in the routing procedure in Fig. 7, Fig. 8 noted earlier
Adjust concrete operations:
Step ST2012, it needs to calculate corresponding small tensor according to practical tensor point situation in ST2013, ST203, ST208
Index i1,i2,…,iNValue, to calculate the corresponding small tensor element of indexValue.Step ST202:Judge corresponding
Knowledge whether there is in knowledge cache table, that is, judge a in corresponding tensor element3Value whether be 1, if so, indicate phase
The knowledge answered is present in knowledge cache table, is transferred to step ST203;If a3Value be 0, in record sheet to be updated search correspond to
The a of knowledge3Value, be not present in record sheet to be updated if 0 or the knowledge, then illustrate that the knowledge is not slow in local knowledge
It deposits in table, is transferred to step ST204, if value is 1, be transferred to step ST203.
Step ST204:Judge that corresponding knowledge whether there is in pending query requests table, that is, judges a in tensor element2Value
Whether it is 1, if so, declarative knowledge is present in pending query requests table, is transferred to step ST205;If a2Value be 0, waiting for more
The a of corresponding knowledge is searched in new record table2Value, be not present in record sheet to be updated if 0 or the knowledge, then illustrate that this is known
Know not in local knowledge cache table, be transferred to step ST206, if value is 1, is transferred to step ST205.
Step ST205:The knowledge of request is present in pending query requests table forwarded over identical knowledge before explanation
Request records in the port numbers i to record sheet to be updated that this is asked.
Step ST207:It records in corresponding knowledge to pending query requests table, i.e., by the knowledge and its port numbers i notes of request
It records in record sheet to be updated, a of the knowledge in record sheet to be updated2Value be set to 1.
Step ST209:Judge whether the knowledge of the response bag is requested through routeing, i.e. calculation knowledge corresponding table type
Small tensor elementValue, situation need to be divided to calculate corresponding index i according to practical tensor1,i2,…,iN, judge a2
Value whether be 1, if so, illustrate that corresponding knowledge is present in pending query requests table, existing cross is asked, and step ST210 is transferred to.
If a2Value be 0, a of corresponding knowledge is searched in record sheet to be updated2Value, if a2Also it is that 0 or the knowledge stay in update note
It is not present in record table, then declarative knowledge is not in pending query requests table, without requested, can abandon response bag or return one
NACK confirmation messages.
Step ST210:The small tensor element of calculation knowledge respective end sloganValue, according to practical tensorization point
Situation calculates corresponding index i1,i2,…,iNValue, and through port numbers corresponding ports forwarding next-hop routing, then, delete phase
Record of the knowledge in pending query requests table is answered, i.e., by the corresponding a of the knowledge in corresponding record sheet to be updated2It is denoted as 0.
Step ST211:Corresponding knowledge is stored in knowledge cache table again, and incites somebody to action the knowledge pair in corresponding record sheet to be updated
The a answered3It is denoted as 1.
Step ST212:The address for storing corresponding knowledge is charged to the pointer of the knowledge in corresponding record sheet to be updated.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment can
By software realization, the mode of necessary general hardware platform can also be added to realize by software.Based on this understanding,
The technical solution of above-described embodiment can be expressed in the form of software products, the software product can be stored in one it is non-easily
In the property lost storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.), including some instructions are with so that a computer is set
Standby (can be personal computer, server or the network equipment etc.) executes the method described in each embodiment of the present invention.
The foregoing is only a preferred embodiment of the present invention, but scope of protection of the present invention is not limited thereto,
Any one skilled in the art is in the technical scope of present disclosure, the change or replacement that can be readily occurred in,
It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with the protection model of claims
Subject to enclosing.
Claims (10)
1. a kind of structure routing table data structure and the method for realizing routing forwarding, which is characterized in that including:
It is total that routing forwarding in Knowledge Center internet relevant three kinds of data structures KFT, KST, PRT are integrated into an information
Table utilizes N rank tensor data structuresTo indicate;
Using PARAFAC decomposition techniques from N rank tensor data structuresThe low-dimensional information characteristics of middle extraction network;
After receiving request bag or response bag, by Knowledge Mapping therein at N rank tensor data structuresIndex, and
Corresponding tensor element value is obtained using PARAFAC decomposition techniques, if judging corresponding knowledge in N rank tensors according to tensor element value
Change data structureIn, then it carries out follow-up routing and is operated with forwarding.
2. a kind of method for building routing table data structure and realizing routing forwarding according to claim 1, feature exist
In the N ranks tensor data structureScale be I1×I2×…×IN, preceding N-1 ranks tensor representation knowledge is identified with N-1
Stage layered, the size per single order tensor are the numbers that each layering includes knowledge in knowledge delamination structure;N rank tensors are knowledge
Characteristic information, size is related to the categorical measure of characteristic information;
In the data structure of N rank tensors, the type that fore-end characterizes table with 3 bit, middle section is with 32 bit
The pointer of knowledge content is stored, tail portion stores port numbers with 8bit, wherein preceding is 4bit forwarding port numbers, rear 4bit is to ask
Seek packet source port number.
3. a kind of method for building routing table data structure and realizing routing forwarding according to claim 1, feature exist
In N rank tensor data structuresIn each tensor elementIllustrate that knowledge is identified as g-1(i1)/g-1(i2)/…/
g-1(iN-1) network knowledge characteristic information, knowledge indicates with layered structure, each layering symbol/separate, in∈{1,
2,…,In, n=1,2 ..., N, g indicate the mapping function that knowledge is indexed to tensor element.
4. a kind of method for building routing table data structure and realizing routing forwarding according to claim 1, feature exist
In using PARAFAC decomposition techniques from N rank tensor data structuresThe low-dimensional information characteristics of middle extraction network, thus by N ranks
Tensor data structureIt is decomposed into N number of network information characteristic vector { U(1),U(2),…,U(N), the scale after decomposition is R × (I1
+I2+…+IN);
Above-mentioned processing procedure is expressed as:
Wherein, R indicates the decomposition order of tensor,For the apposition of vector, σ=[σ1,σ2,…,σR] it is normalization factor,For factor matrix, whereinTable
Show the feature vector of tensor projection to feature space, and
5. a kind of method for building routing table data structure and realizing routing forwarding according to claim 4, feature exist
In using PARAFAC decomposition techniques from N rank tensor data structuresThe step of low-dimensional information characteristics of middle extraction network, wraps
It includes:
Input the decomposition order R and maximum iteration T of tensormax;
EstimationInitial value, and be assigned to U(1), U(2)…U(N);
Repeat TmaxIt is secondary to calculate U using alternating least-squares(n), the 1st time of cycle obtain U(1), the 2nd time of cycle obtain U(2),
And so on cycle n-th obtain U(N);
Export the network information characteristic vector { U of factor matrix form(1),U(2),…,U(N)}。
6. a kind of method for building routing table data structure and realizing routing forwarding according to claim 5, feature exist
In recycling alternating least-squares calculate U(n)Process it is as follows:
If previous cycle is not finished, intermediate parameters V is calculated using 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 above formula, T is matrix transposition symbol, and the Hadamard of * representing matrixes is accumulated;
Then, U is calculated(n):
In above formula, X(n)It is tensorN modular matrixs,Indicate pseudoinverse, the Khatri-Rao products of ⊙ representing matrixes;
Finally, U is normalized(n)Each row, normalization factor are included into σ.
7. a kind of method for building routing table data structure and realizing routing forwarding according to claim 6, feature exist
In after receiving request bag or response bag, by Knowledge Mapping therein at N rank tensor data structuresIndex, and
The process that corresponding tensor element value is obtained using PARAFAC decomposition techniques is as follows:
Knowledge is obtained from request bag or response bag;
According to the knowledge c got1/c2/…/CN-1Tensor element is obtained by mapping function gCall number i1=g
(c1),i2=g (c2),…,iN-1=g (cN-1),iN=1;I thereinNFirst dimension data of the N rank tensors as inquired, i.e.,
The type of table;
Then, the corresponding tensor element of calculation knowledgeValue, calculation formula is as follows:
Wherein, R indicates the decomposition order of tensor,It isIn an element.
8. a kind of structure routing table data structure according to claim 1 or claim 7 and the method for realizing routing forwarding, feature
It is, calculated tensor element value is that 0 output is not found;If non-zero, the then follow-up routing of progress and forwarding operation.
9. a kind of method for building routing table data structure and realizing routing forwarding according to claim 2, feature exist
In routeing the process operated with forwarding includes:
In 3 bit of the fore-end of N rank tensors, the 1st bit~the 3rd bit corresponding to be denoted as a1~a3, a1
Belong to knowledge forwarding table, a for 1 expression knowledge1It is not belonging to knowledge forwarding table for 0 expression knowledge;a2Belong to undetermined for 1 expression knowledge
Required list, a2It is not belonging to pending query requests table for 0 expression knowledge;a3Belong to knowledge cache table, a for 1 expression knowledge3Knowledge is indicated for 0
It is not belonging to knowledge cache table;
Assuming that receiving the port-for-port i of request bag or response bag;
For request bag, judges that corresponding knowledge whether there is in knowledge cache table, that is, judge tensor elementMiddle a3's
Whether value is 1, wherein i1=g (c1),i2=g (c2),…,iN-1=g (cN-1),iN=1, if so, indicating that corresponding knowledge is deposited
It is in knowledge cache table, calculatesValue be pointer, wherein i1=g (c1),i2=g
(c2),…,iN-1=g (cN-1),iN=2;Pointer meaning content is packaged and is forwarded through port i;If a3Value be 0, then judge corresponding
Knowledge whether there is in pending query requests table, that is, judge a2Value whether be 1, if so, record this request port numbers i
Into request bag source port number;If a2Value be 0, then whether have in judgemental knowledge forwarding table forwarding next-hop routing letter
Breath, that is, judge a1Value whether be 1, if so, recording in corresponding knowledge to pending query requests table, i.e., by a2Value be set to 1, and
In the port numbers i to request bag source port number for recording this request, then calculateValue be port
Number, wherein i1=g (c1),i2=g (c2),…,iN-1=g (cN-1),iN=3, and through request bag source port forwarding next-hop road
By;If a1Value be 0, then abandon request bag or return a NACK confirmation message;
For response bag, pass through tensor elementJudge whether the knowledge of the response bag is requested through routeing, that is, judges
Middle a2Value whether be 1, wherein i1=g (c1),i2=g (c2),…,iN-1=g (cN-1),iN=1, if so, explanation is known accordingly
Knowledge is present in pending query requests table, and existing cross is asked, and is calculatedValue be port numbers, wherein i1=
g(c1),i2=g (c2),…,iN-1=g (cN-1),iN=3, and through forwarding the forwarding next-hop routing of port numbers corresponding ports, so
Afterwards, record of the corresponding knowledge in pending query requests table is deleted, i.e., by a2It sets to 0;Corresponding knowledge is stored in knowledge cache table again, and
By a3Value be set to 1, finally, pointer is charged into the address for storing corresponding knowledge;If a2Value be 0, then abandon response bag or return
Return a NACK confirmation message.
10. a kind of method for building routing table data structure and realizing routing forwarding according to claim 1, feature exist
In this method further includes:N rank tensor data structures are updated, mode is as follows:
In advance by N rank tensor data structuresMultiple Xiao Zhang's gauge blocks are divided into, each small tensor corresponds to a record to be updated
Table, the capacity of record sheet are T knowledge record, will newer knowledge record in this table;
Each Xiao Zhang's gauge block is decomposed respectively using PARAFAC decomposition techniques, extraction low-dimensional information characteristics deposit routing
In;
It when being route, being cached and being forwarded operation, inquires, deletes for the knowledge in corresponding Xiao Zhang's gauge block, be inserted into
Operation.
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 true CN108737276A (en) | 2018-11-02 |
CN108737276B 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) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112463910A (en) * | 2020-12-17 | 2021-03-09 | 福州物联网开放实验室有限公司 | Internet of things multidimensional data fusion system and method |
Citations (5)
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 |
US20160105408A1 (en) * | 2014-10-10 | 2016-04-14 | Adp, Llc | Securing application programming interfaces (apis) through infrastructure virtualization |
CN107948060A (en) * | 2016-10-12 | 2018-04-20 | 深圳市中兴微电子技术有限公司 | A kind of new routing table is established and IP method for searching route and device |
-
2018
- 2018-06-19 CN CN201810633244.1A patent/CN108737276B/en active Active
Patent Citations (5)
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 |
US20160105408A1 (en) * | 2014-10-10 | 2016-04-14 | Adp, Llc | Securing application programming interfaces (apis) through infrastructure virtualization |
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)
Title |
---|
张轶瑄: "路由表在网络中的应用研究", 《科技风》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112463910A (en) * | 2020-12-17 | 2021-03-09 | 福州物联网开放实验室有限公司 | Internet of things multidimensional data fusion system and method |
CN112463910B (en) * | 2020-12-17 | 2022-08-09 | 福州物联网开放实验室有限公司 | Internet of things multidimensional data fusion system and method |
Also Published As
Publication number | Publication date |
---|---|
CN108737276B (en) | 2020-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Li et al. | Packet forwarding in named data networking requirements and survey of solutions | |
JP3735471B2 (en) | Packet relay device and LSI | |
CN100465947C (en) | Method and device for producing and using improved tree-shape bit map data structure | |
US7418505B2 (en) | IP address lookup using either a hashing table or multiple hash functions | |
CN108769111A (en) | A kind of server connection method, computer readable storage medium and terminal device | |
TW494322B (en) | Prefix search method and data structure using compressed search tables | |
US20110307656A1 (en) | Efficient lookup methods for ternary content addressable memory and associated devices and systems | |
WO2009135417A1 (en) | The longest prefix match mehtod and device based on tree data structure | |
CN113672629B (en) | Distributed network traffic retrieval method and device | |
CN112988912B (en) | Block chain data storage method and device and electronic equipment | |
WO2013078644A1 (en) | Route prefix storage method and device and route address searching method and device | |
Saxena et al. | Radient: Scalable, memory efficient name lookup algorithm for named data networking | |
CN108647266A (en) | A kind of isomeric data is quickly distributed storage, exchange method | |
US8838563B2 (en) | Method and system for routing a telephone call | |
CN104536700B (en) | Quick storage/the read method and system of a kind of bit stream data | |
CN110413711A (en) | A kind of variance data acquisition methods and its storage medium | |
Li et al. | Smart name lookup for NDN forwarding plane via neural networks | |
CN100397816C (en) | Method for classifying received data pocket in network apparatus | |
CN112988908B (en) | Block chain data storage method and device and electronic equipment | |
CN112988909B (en) | Block chain data storage method and device and electronic equipment | |
CN108737276A (en) | A method of structure routing table data structure simultaneously realizes routing forwarding | |
TW508926B (en) | Method and system for efficient routing table compression and fast routing lookups | |
CN108780455A (en) | A kind of compressed index method and device of character string sequence | |
CN109857913A (en) | A kind of distributed content lookup method | |
CN112988911B (en) | Block chain data storage method and device and electronic equipment |
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 |