CN110062045B - Caching method and device of content router - Google Patents

Caching method and device of content router Download PDF

Info

Publication number
CN110062045B
CN110062045B CN201910327612.4A CN201910327612A CN110062045B CN 110062045 B CN110062045 B CN 110062045B CN 201910327612 A CN201910327612 A CN 201910327612A CN 110062045 B CN110062045 B CN 110062045B
Authority
CN
China
Prior art keywords
target
packet
keyword
data packet
target data
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
CN201910327612.4A
Other languages
Chinese (zh)
Other versions
CN110062045A (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.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
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 Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN201910327612.4A priority Critical patent/CN110062045B/en
Publication of CN110062045A publication Critical patent/CN110062045A/en
Application granted granted Critical
Publication of CN110062045B publication Critical patent/CN110062045B/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/74Address processing for routing
    • H04L45/742Route cache; Operation thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • 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
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Analyzing a packet header of a received first target interest packet request, acquiring keywords and an offset, judging whether an I/O (input/output) waiting queue in a CS (circuit switched) is smaller than a preset threshold value, if so, pushing a first target data packet to a server sending the first target interest packet request, if not, judging whether the keywords exist in a pending request table PIT, sending the keywords to an FIB (fiber-based routing) aiming at the condition that the keywords do not exist in the PIT, and routing and forwarding the keywords through an upstream router by using the FIB; receiving the sent second target data packet, sending the second target data packet to a server corresponding to the port according to the PIT, deleting the mapping relation record, and adding the keyword into a data structure of the bloom filter; the method and the device for solving the CS congestion problem can solve the problem of frequent CS congestion.

Description

Caching method and device of content router
The application is a divisional application with application date of 2017, 6 and 29, application number of 201710517235.1 and invention name of 'a non-blocking content caching method and device of a content router'.
Technical Field
The present application relates to the technical field of high performance router design, and in particular, to a caching method and apparatus for a content router.
Background
CCN (Content-Centric Networking ) networks are proposed by the Palo Alto Research Center (PARC for short). Unlike traditional IP-based, host-based network architectures, CCN networks focus on the content itself and can address and route directly through it. In a CCN network, the client host's communication credentials would be based on the naming of the content rather than the IP address, and the content router serves as the network infrastructure to enable high-speed forwarding of content request and content return messages. Because the content router has the characteristic of caching content in the network, the cached content can be conveniently obtained without obtaining the content from an upstream router except the CNN router every time; the characteristics enable the content request to be directly responded by the router in the network instead of just the end host, reduce the network congestion and improve the content distribution efficiency. Although the innovative architecture can achieve good data distribution efficiency, it subverts the end-to-end principle in the classic IP network, and gives the data plane of the router a certain storage capacity, which also brings some performance burden, so that the forwarding of data packets of the CCN network becomes very complex compared with the conventional IP network. Therefore, improving the performance of the data plane plays a crucial role in large CCN network deployment.
In a CCN content router, three components are mainly included: forwarding information table fib (forwarding information base), pending request table pit (pending interest table), and content storage cs (contentstore), as shown in fig. 1. These three components divide the CCN router into three pipelines when processing data packets. There are mainly two types of data packets in the network: interest packets (Interest) and Data packets (Data). The user end sends interest packet to the network to request content, and the returned content is carried back in the form of data packet. The content is stored on the CCN routers in the network so that subsequent identical requests do not have to be forwarded to the server but can be processed directly on the routing node.
Referring to fig. 1, the processing flow of a data packet by a conventional CCN content router is briefly described as follows: when the interest packet reaches the CCN router, firstly, whether the CS has the requested content is searched, if so, the router reads the corresponding content and encapsulates the content into a data packet to directly return, otherwise, the interest packet enters the PIT to search whether the prefix of the same requested content name exists. If the content exists, the content is indicated to have previously initiated a request to an upstream router, and does not need to be forwarded upstream again, but only an interface information record of an ingress port of the interest packet request is added to the PIT, otherwise, the interest packet needs to be forwarded upstream through the FIB in addition to the addition of the relevant record to the PIT.
When the data packet returns to the current router from the upstream router, the router firstly searches the records of the PIT, if the ingress port information recorded by the previous interest packet request can be found, the data packet is forwarded out from the interfaces to the downstream router, meanwhile, the CS carries out the caching operation of the content according to a certain caching strategy, and if the corresponding record cannot be found in the PIT, the data packet is directly discarded. It follows that a data packet always takes the opposite path as the corresponding interest packet.
As can be seen from the above, the data packets of the conventional CCN mainly exist in the CS, and almost all the traffic of the interest packets is analyzed in the CS first, and only part of the traffic is sequentially forwarded to the PIT and the FIB for processing.
Disclosure of Invention
An object of the embodiments of the present application is to provide a caching method and apparatus for a content router, which solve the problem of frequent CS congestion.
The specific technical scheme is as follows:
a caching method of a content router, the method comprising:
analyzing a packet header of a received first target interest packet request, and acquiring keywords and offset of the first target interest packet request, wherein the packet header comprises a prefix and offset of a content name of requested content, and the prefix is used as the keyword;
judging whether an I/O waiting queue in the CS is smaller than a preset threshold value or not;
if the value is smaller than the preset threshold value, searching the content corresponding to the keyword requested by the first target interest package from the CS according to the keyword and the offset requested by the first target interest package, and pushing the first target data package to a server sending the first target interest package request, wherein the first target data package comprises the content which is searched in the CS and corresponds to the keyword requested by the first target interest package;
if the value is not less than the preset threshold value, judging whether keywords requested by the first target interest packet exist in a pending request table PIT or not;
if the first target interest packet does not exist, adding a mapping relation record between a keyword of the first target interest packet request and an ingress port in the PIT, forwarding the keyword of the first target interest packet request to a forwarding information table (FIB), and utilizing the FIB to route and forward the keyword of the first target interest packet request to an upstream router, wherein the ingress port is a port through which the first target interest packet request enters the router;
if yes, judging whether the mapping relation record exists in the PIT or not;
if not, adding the mapping relation record in the PIT;
receiving a second target data packet sent by an upstream router, wherein the second target data packet comprises content corresponding to a keyword requested by the first target interest packet sent by the upstream router;
analyzing a packet header of a second target data packet, obtaining a keyword of the second target data packet, and forwarding the keyword of the second target data packet to a PIT (packet intermediate transfer protocol);
and according to the mapping relation record recorded in the PIT, sending the second target data packet to a server corresponding to the ingress port, deleting the mapping relation record, and adding the keyword of the second target data packet to a data structure of a bloom filter.
Further, after sending the second target data packet to the server corresponding to the ingress port according to the mapping relationship record recorded in the PIT, deleting the mapping relationship record, and adding the key of the second target data packet to the data structure of the bloom filter, the method further includes:
storing a second target data packet in the CS using the offset requested by the first target interest packet.
Further, according to the keyword and the offset of the first target interest package request, searching the CS for content corresponding to the keyword of the first target interest package request, and pushing a first target data package to a server sending the first target interest package request, where the first target data package includes content corresponding to the keyword of the first target interest package request, which is searched in the CS, and the method includes:
transmitting a first target I/O instruction to a sub-thread by using a main thread of the CS according to a keyword requested by the first target interest packet, wherein the first target I/O instruction is an instruction for searching the CS for content corresponding to the keyword requested by the first target interest packet;
and receiving a first target data packet retrieved by the child thread through the offset of the first target interest packet request, and pushing the first target data packet to a server sending the first target interest packet request, wherein the first target data packet comprises content which is searched in the CS and corresponds to the keyword requested by the first target interest packet.
Further, storing a second target data packet in the CS using the offset requested by the first target interest packet, comprising:
transmitting a second target I/O instruction into the sub-thread by using the main thread of the CS according to the second target data packet, wherein the second target I/O instruction is an instruction for storing the second target data packet in the CS;
and storing the second target data packet by utilizing the offset requested by the child thread through the first target interest packet.
Further, after parsing a header of a second target packet, obtaining a key of the second target packet, and forwarding the key of the second target packet to the PIT, the method further includes:
judging whether keywords of the second target data packet exist in the PIT;
if so, executing the steps of sending the second target data packet to a server corresponding to the ingress port according to the mapping relation record recorded in the PIT, deleting the mapping relation record, and adding the keyword of the second target data packet to the data structure of the bloom filter;
and if not, discarding the second target data packet.
A caching apparatus of a content router, the apparatus comprising:
the interest package request analysis module is used for analyzing a packet header of a received first target interest package request and acquiring keywords and offset of the first target interest package request, wherein the packet header comprises a prefix and offset of a content name of requested content, and the prefix is used as the keyword;
the I/O waiting queue judging module is used for judging whether the I/O waiting queue in the CS is smaller than a preset threshold value or not; if the content is less than the preset threshold, triggering a content searching module, and if the content is not less than the preset threshold, triggering a first judging module;
the content searching module is configured to search, according to the keyword and the offset requested by the first target interest package, content corresponding to the keyword requested by the first target interest package from the CS, and push the first target data package to a server that sends the first target interest package request, where the first target data package includes content corresponding to the keyword requested by the first target interest package, which is searched in the CS;
the first judging module is used for judging whether keywords requested by the first target interest packet exist in a pending request table PIT or not; if the mapping relation judging module exists, the mapping relation judging module is triggered;
the upstream router module is configured to add, in a PIT, a mapping relationship record between a keyword of the first target interest packet request and an ingress port, forward the keyword of the first target interest packet request to a forwarding information table FIB, and perform routing forwarding on the keyword of the first target interest packet request to an upstream router by using the FIB, where the ingress port is a port through which the first target interest packet request enters the router;
the mapping relation record judging module is used for judging whether the mapping relation record exists in the PIT or not; if not, triggering the first PIT module;
the first PIT module is used for adding the mapping relation record in the PIT;
a data packet receiving module, configured to receive a second target data packet sent by an upstream router, where the second target data packet includes content corresponding to a keyword requested by the first target interest packet sent by the upstream router;
the analysis module is used for analyzing the packet head of a second target data packet, acquiring the keywords of the second target data packet and forwarding the keywords of the second target data packet to the PIT;
and the second PIT module is used for sending the second target data packet to a server corresponding to the ingress port according to the mapping relation record recorded in the PIT, deleting the mapping relation record, and adding the keyword of the second target data packet into the data structure of the bloom filter.
According to the caching method and device for the content router, provided by the embodiment of the application, keywords and offset of a first target interest packet request can be obtained by analyzing a header of the received first target interest packet request, and whether content corresponding to the keywords of the first target interest packet request exists in a content memory CS is judged by using a bloom filter; if so, searching the content corresponding to the keyword requested by the first target interest package from the CS according to the keyword and the offset requested by the first target interest package, and pushing the first target data package to a server sending the first target interest package request; the method solves the problem of frequent congestion of the CS, thereby fully utilizing PIT and FIB, reducing the queuing time delay of flow and improving the overall performance of the content router. Of course, it is not necessary for any product or method of the present application to achieve all of the above-described advantages at the same time. Of course, it is not necessary for any product or method of the present application to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow diagram of a conventional CCN content router processing a data packet;
fig. 2 is a flowchart of a non-blocking content caching method of a content router according to a first embodiment of the present disclosure;
FIG. 3 is a diagram of a CCN router packet processing mathematical model;
fig. 4 is a flowchart of a non-blocking content caching method of a second content router according to an embodiment of the present disclosure;
fig. 5 is a flowchart of a non-blocking content caching method of a third content router according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a non-blocking content caching apparatus of a second content router according to an embodiment of the present application
Fig. 7 is a schematic view of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 2 is a flowchart of a non-blocking content caching method of a content router according to an embodiment of the present disclosure, where the method includes:
s101, analyzing a received packet header of a first target interest packet request, and acquiring keywords and offset of the first target interest packet request, wherein the packet header comprises a prefix and offset of a content name of requested content, and the prefix is used as the keyword;
the analyzing the header of the received first target interest package request may be performed by receiving the first target interest package request, and analyzing the header of the first target interest package request by using a Packet header analyzing module (Packet parser) of the state machine, so as to obtain a keyword of the first target interest package request; the packet header analysis module of the state machine is a module for analyzing and receiving a first target interest packet request;
the interest package is a data package type, and has a content name, and the name is encrypted and signed. The interest package can also be understood as a content package required by a user in a CCN network according to the information by the user sending the interest package to inform the network of the requirement of the user. When a user requests data, only the name of the data needs to be noted, and the user does not need to state where the data is to be acquired to obtain related resources;
the packet header is a header (packet header) of the data packet, and includes a name prefix and an offset of the content;
the offset is the number of bytes moved forward or backward from the specified location, and is used to find the data used in the file.
S102, judging whether the content corresponding to the keyword requested by the first target interest package exists in a content memory CS by using a bloom filter, if not, executing S104, and if so, executing S103;
wherein, the Bloom Filter (Bloom Filter) is a long binary vector and a series of random mapping functions, the Bloom Filter is used to search whether an element is in a set, if so, the element is not necessarily in the set; if not, the element must not be in the set; that is to say, the bloom filter in the present application document is used to determine whether the content corresponding to the keyword requested by the first target interest package exists in cs (content store); the advantages of bloom filters are that both space efficiency and query time far exceed that of a typical algorithm.
It should be noted that although the query result of the bloom filter cannot obtain the storage address of the content, the insertion and query times are constant, and based on this, the CS can more quickly determine whether the requested content exists on the router. In addition, the memory footprint of the bloom filter is smaller than other index data structures, such as hash tables and binary trees. Therefore, in the scheme, the data packet is designed to be firstly inquired through a bloom filter, and if the judgment result is in a set, the searching of the content storage address and the asynchronous content reading operation are carried out; if not, the CS can more quickly forward the request to the PIT and continue processing of subsequent packets.
The Bloom Filter (Bloom Filter) is set to make up for the defect that the performance of the conventional CCN router is easy to be congested, and for the purpose of more clearly describing the invention of the present document, specific reasoning is as follows:
as shown in fig. 1, according to the processing flow of a conventional CCN content router for data packets, the CCN router is abstracted into queue pipeline processing in two directions, each direction is composed of a plurality of queues and service stations, as shown in fig. 3. The next time a packet leaves each queue can be selected with a certain forwarding probability, the packet can be blocked by the queue and queued, and can be dropped because the queue is full.
The following assumptions were made:
(1) each part in the architecture is abstracted into a First-in First-out (FIFO) queue and a service desk, the queue is responsible for packet buffering, and the service desk is used for packet processing.
(2) The arrival of packets at each queue is a poisson flow.
(3) The service time of the packet at each service desk follows a negative exponential distribution.
(4) Each part of the architecture can be viewed as an M/M/1 queuing system.
(5) The transmission rate of packets between the two parts is smooth and the CCN packet processing flow can be modeled using an open queuing network (Jackson network, from James R jackson.1963.jobshop-like queuing systems. management science 10,1(1963), 131-.
The poisson flow is understood as a process in which an arriving flow is input according to the following conditions:
1) stationarity, the probability of k data packets arriving within the interval [ a, a + t) is independent of the starting point a and only dependent on the length of time t.
2) Without the aftereffect, the probability distributions of the number of arriving data packets within disjoint intervals are independent of each other.
3) Generally, the probability of reaching at least two data packets within a time interval of length t is a high order infinitesimal quantity of t.
4) Finite, the probability of reaching a finite number of data packets within an arbitrary finite interval is 1.
In the model established by the CCN packet processing flow, queues in two directions are arranged in the CS and the PIT and respectively correspond to processing queues of an interest packet and a data packet, and the FIB only has a queue in one direction and only processes the interest packet. Some symbols in the model are defined as: λ is the average arrival rate of interest packets, TiIs the average throughput rate, μ, of the ith queueiThe average service rate of the ith service desk, α the CS hit rate of the interest packet, β the PIT hit rate of the interest packet, theta the FIB hit rate of the interest packet, tau the average leaving rate of the interest packet, lambda' the average arrival rate of the data packet,
Figure BDA0002036712430000091
for packet buffer rate, τ' is the buffered packetMean leaving ratio, ρiIs the utilization rate of the ith service desk.
According to the Jackson network, for each queue, the average arrival rate of packets should be equal to the average departure rate after the system is in a steady state. Assuming that the average arrival rate of the interest packets entering the CCN router from the outside is lambda, there are:
Figure BDA0002036712430000092
similarly, for a packet, there are:
Figure BDA0002036712430000093
if packet loss is not considered, one data packet always responds to one interest packet, and the balance of the flow can be guaranteed. Therefore, the leaving rate τ of the interest packet should be approximately equal to the arrival rate λ' of the data packet, and then:
τ≈λ′ (3)
the joint type (1), the formula (2) and the formula (3) can calculate and obtain the throughput rate of each queue after the system is in a stable state:
Figure BDA0002036712430000094
according to the M/M/1 queuing system theory recorded in the literature 'communication network performance analysis base', the utilization rate rho of each service deskiComprises the following steps:
Figure BDA0002036712430000095
obviously, to prevent the queue from overflowing in overload, the throughput T of the queue in a steady state is requirediNot greater than the service rate mu of the service deskiI.e. the utilization of the service desk is not more than 1.
The throughput rate is a data amount per unit time through a certain network (or a channel or an interface).
The overload overflow is that the data volume stored in the queue exceeds the preset capacity, so that the subsequent data cannot be normally stored and is discarded.
By bringing formula (4) into formula (5), the following inequality can be obtained:
Figure BDA0002036712430000101
therefore, the maximum throughput rate of the router is the maximum arrival rate of the interest packet of the 1 st queue, and is constrained by the following constraints:
Figure BDA0002036712430000102
due to α, β, theta and
Figure BDA0002036712430000103
are all parameters less than 1, so that the CS service rate causes the performance of the whole router to be bottleneck as shown in formula (7) unless the CS service rate is equal to the service rate mu1Greater than the service rate of the other queues. That is, if the service rate μ1Not large enough, the CS will be overloaded with enqueues for packets of interest, while other queues will frequently be idle, making the entire router less efficient.
In addition, in general, the CS has more frequent memory access operations than the PIT and FIB, which results in that the service rate of the CS is hardly higher than that of the PIT and FIB.
Therefore, the present document needs to improve the service rate of the CS to be higher than the service rates of the PIT and the FIB.
Another embodiment of the above: after S102, further comprising: judging whether the I/O waiting queue in the CS is smaller than a preset threshold value or not, if so, executing S103, and if not, executing S104;
the I/O wait queue is a data structure for storing the I/O instruction when the initiated I/O instruction cannot be executed immediately, and can be realized by a linear table or a linked list.
It should be noted that when there are too many requests for a CCN router to read content, a queue will be performed, which may cause congestion, and this also tends to degrade the performance of CS processing, and at this time, if a part of the requests are forwarded to an upstream router with a low load pressure for processing, the processing efficiency of the whole network can be improved. Therefore, an I/O waiting queue is designed, and when the content of the interest packet request is judged to exist on the router by the bloom filter, the I/O waiting queue enters the queue to wait for the initiation of the corresponding asynchronous read operation. And a certain length threshold value is set for the queue, and if the length of the current queue reaches the threshold value, the overflowing request is sent to the PIT and is handed to an upstream router for processing. That is, although interest packets can hit successfully at the CS, since the CS is now fully loaded, these interest packets will overflow and be forwarded to a less loaded router on its routing path in a best effort manner for processing.
S103, searching content corresponding to the keyword requested by the first target interest package from the CS according to the keyword and the offset requested by the first target interest package, and pushing a first target data package to a server sending the first target interest package request, wherein the first target data package comprises the content which is searched in the CS and corresponds to the keyword requested by the first target interest package;
the above-mentioned searching for the content corresponding to the keyword requested by the first target interest package from the CS may be understood as that the content matching the keyword requested by the first target interest package exists in the CS.
It should be noted that the server corresponding to the first target interest package request may be understood as a server from which the user sends the first target interest package request.
In particular, the method comprises the following steps of,
transmitting a first target I/O instruction to a sub-thread by using a main thread of the CS according to a keyword requested by the first target interest packet, wherein the first target I/O instruction is an instruction for searching the CS for content corresponding to the keyword requested by the first target interest packet;
and receiving a first target data packet retrieved by the child thread through the offset of the first target interest packet request, and pushing the first target data packet to a server sending the first target interest packet request, wherein the first target data packet comprises the content which is searched in the CS and corresponds to the keyword requested by the first target interest packet.
The main thread of the CS is a thread created when a program of the CS structure is started.
The above-described I/O instruction may be understood as an instruction to input or output data.
It should be noted that, since the amount of contents to be cached in the network is very large, the CS has to be built using a large-capacity storage medium, and the efficiency of I/O operations for these contents becomes very important for the CS. Most I/O requests are blocking type, which results in that the control right of the program cannot be released until the I/O is completed, and thus the CS needs to be influenced by the access delay of the previous I/O for the subsequent interest packet processing, and the access delay is unnecessary. It is clear that this blocking approach will be inefficient during high speed network traffic processing, increasing the average queuing delay of data packets. Therefore, in order to be able to return control right immediately, it is proposed to employ asynchronous I/O operations: when the main thread initiates an I/O instruction, the instruction is processed by a newly created sub-thread and control of the main thread can immediately return to processing the next request. Advantageously, after the CS successfully issues the asynchronous read command, the CS can immediately continue to process the subsequent interest packet without blocking the I/O command; and when the CS receives the notice of the completion of the asynchronous reading operation, the asynchronous reading operation is encapsulated into a data packet and returned.
S104, judging whether the keywords requested by the first target interest packet exist in the PIT, if not, executing S105, and if so, executing S106
The above-mentioned determining whether the keyword requested by the first target interest package exists in the PIT may be understood as that the keyword that is possibly the same as the keyword requested by the first target interest package may exist in the PIT in advance.
S105, adding a mapping relation record between a keyword of the first target interest packet request and an ingress port in a PIT, forwarding the keyword of the first target interest packet request to a forwarding information table (FIB), and using the FIB to route and forward the keyword of the first target interest packet request to an upstream router, wherein the ingress port is a port through which the first target interest packet request enters the router;
the mapping relation comprises a keyword requested by the first target interest package, an ingress port and a corresponding relation between the keyword and the ingress port;
the PIT is used for recording the mapping information of the key and the corresponding ingress port, and the ingress port may be understood as a port having a mapping relationship with the corresponding key when each target interest packet requests to enter the port of the CCN router, that is, the port of each target interest packet requests to enter the router corresponds to one key.
Wherein, the upstream router is the next hop router displayed according to the routing table in the process of route forwarding.
One embodiment of the foregoing routing and forwarding the key requested by the first target interest packet to an upstream router by using the FIB may be: and searching an output port of the CCN router corresponding to the keyword for forwarding the first target interest packet request to an upstream router from the FIB by using the keyword for the first target interest packet request, and routing and forwarding the keyword for the first target interest packet request to the upstream router according to the output port.
It should be noted that whether the keyword, that is, the keyword requested by the first target interest packet, is to be forwarded by routing is determined by determining that the same content as the keyword exists in the PIT. That is to say, the interest packet enters the PIT to find whether there is a prefix of the same requested content name, if there is, it indicates that the content has previously initiated a request to an upstream router, and it does not need to be forwarded upstream again, but only needs to newly add the mapping relation record including the ingress port information record in the PIT, otherwise, it needs to continue forwarding the interest packet upstream through the FIB in addition to adding the relevant record in the PIT.
In addition, it can be known through retrieval that the key word same as the key word does not exist in the PIT, the ingress port information is not only required to be added to the PIT, so as to send the searched first target data packet to the server corresponding to the ingress port; and sending the keyword requested by the first target interest packet to the FIB, wherein the keyword is used for routing and forwarding the keyword through an upstream router by using the FIB so as to search the first target data packet matched with the keyword requested by the first target interest packet.
It should be noted that adding the mapping relationship in the PIT means that the ingress port information is added, and the purpose of the mapping relationship is to find a server corresponding to the transmitting port of the first target packet, that is, the first target packet is transmitted according to the ingress port information record recorded by the PIT.
S106, judging whether the mapping relation record exists in the PIT or not; if not, executing S107;
the above-mentioned determining whether the mapping relationship record exists in the PIT may be understood as that a keyword and an ingress port that have the same mapping relationship with the keyword and the ingress port requested by the first target interest package and a mapping relationship between the keyword and the ingress port may exist in the PIT in advance.
S107, adding the mapping relation record in the PIT;
based on the above situation, the purpose of adding the mapping relation record in the PIT is also to add a server corresponding to a transmission port for finding the first target packet in the PIT, that is, the first target packet is transmitted according to the ingress port information record recorded by the PIT.
S108, receiving a second target data packet sent by an upstream router, wherein the second target data packet comprises content corresponding to the keyword requested by the first target interest packet sent by the upstream router;
based on the above, a search from the upstream router is required according to whether there is no content matching the keyword requested by the first target packet of interest in the CS or the I/O waiting queue in the CS is full, wherein the second target packet is the content matching the keyword requested by the first target packet of interest obtained by the upstream router.
S109, analyzing the packet header of a second target data packet, obtaining the keyword of the second target data packet, and forwarding the keyword of the second target data packet to a PIT;
the analysis of the packet header of the second target data packet may be performed by using a packet header analysis module of the state machine;
it should be noted that, when obtaining the second destination packet sent by the upstream router, the header of the second destination packet also needs to be analyzed, so as to match the content of the second destination packet with the interest packet request, and also to cache the second destination packet quickly.
After S109, further comprising:
judging whether keywords of the second target data packet exist in the PIT;
if yes, go to S110;
and if not, discarding the second target data packet.
And S110, according to the mapping relation record recorded in the PIT, sending the second target data packet to a server corresponding to the ingress port, deleting the mapping relation record, and adding the keyword of the second target data packet to the data structure of the bloom filter.
The purpose of adding the keyword of the second target data packet to the data structure of the bloom filter is to update the data structure of the bloom filter, so that the keyword is used when the next target interest packet requests to query whether the CS has the content matched with the target interest packet.
The deleting of the mapping relation record is to push the second target data packet without repeating the request for no interest packet to the same ingress port.
Therefore, the method not only solves the problem of frequent congestion of the CS by adding the bloom filter, but also fully utilizes PIT and FIB, reduces queuing delay of flow and improves the overall performance of the content router.
Based on the situation, after the keywords of the second target data packet are obtained, the keywords of the second target data packet can be used for being compared and matched with the keywords stored by the PIT, information matched with the keywords of the second target data packet is obtained, and meanwhile, port information of a router matched with the second target data packet, namely port information of a first target interest packet request entering the router, is quickly found and sent;
one embodiment of the foregoing is: after S110, the method may further include:
storing the second target data packet in the CS using the offset requested by the first target interest packet.
The second target data packet is stored in the CS, so that the query of the next interest packet request is convenient and fast, and the CS content is enriched.
In particular, the method comprises the following steps of,
transmitting a second target I/O instruction into the sub-thread by using the main thread of the CS according to the second target data packet, wherein the second target I/O instruction is an instruction for storing the second target data packet in the CS;
and storing the second target data packet by utilizing the offset requested by the child thread through the first target interest packet.
Therefore, in the above embodiment, by adopting asynchronous I/O operation and adding a bloom filter in the high-speed network traffic processing process, the average queuing delay of the data packet is reduced, the problem of frequent CS congestion is solved, the PIT and the FIB are fully utilized, the queuing delay of the traffic is reduced, and the overall performance of the content router is improved.
Fig. 4 is a flowchart of a non-blocking content caching method for implementing a second content router provided in an embodiment of the present application, where the method includes:
s201, analyzing a header of a received first target interest package request, and acquiring a keyword and an offset of the first target interest package request, wherein the header comprises a prefix and an offset of a content name of requested content, and the prefix is used as the keyword;
s202, judging whether an I/O waiting queue in the CS is smaller than a preset threshold value or not; if the threshold value is smaller than the preset threshold value, executing S203, and if the threshold value is not smaller than the preset threshold value, executing S204;
s203, searching content corresponding to the keyword requested by the first target interest package from the CS according to the keyword and the offset requested by the first target interest package, and pushing a first target data package to a server sending the first target interest package request, wherein the first target data package comprises the content which is searched in the CS and corresponds to the keyword requested by the first target interest package;
specifically, according to a keyword requested by the first target interest package, a main thread of the CS is used to transmit a first target I/O instruction to a sub-thread, where the first target I/O instruction is an instruction for searching a CS for content corresponding to the keyword requested by the first target interest package;
and receiving a first target data packet retrieved by the child thread through the offset of the first target interest packet request, and pushing the first target data packet to a server sending the first target interest packet request, wherein the first target data packet comprises content which is searched in the CS and corresponds to the keyword requested by the first target interest packet.
S204, judging whether keywords requested by the first target interest packet exist in the PIT; if not, executing S205, and if yes, executing S206;
s205, adding a mapping relation record between a keyword of the first target interest packet request and an ingress port in a PIT, forwarding the keyword of the first target interest packet request to a forwarding information table (FIB), and using the FIB to route and forward the keyword of the first target interest packet request to an upstream router, wherein the ingress port is a port through which the first target interest packet request enters the router;
s206, judging whether the mapping relation record exists in the PIT; if not, go to S207;
s207, adding the mapping relation record in the PIT;
s208, receiving a second target data packet sent by the upstream router, wherein the second target data packet includes content corresponding to the keyword requested by the first target interest packet sent by the upstream router;
s209, analyzing the packet header of a second target data packet, obtaining the keyword of the second target data packet, and forwarding the keyword of the second target data packet to a PIT;
after S209, including:
judging whether keywords of the second target data packet exist in the PIT;
if so, executing the steps of sending the second target data packet to a server corresponding to the ingress port according to the mapping relation record recorded in the PIT, deleting the mapping relation record, and adding the keyword of the second target data packet to the data structure of the bloom filter;
and if not, discarding the second target data packet.
S210, according to the mapping relation record recorded in the PIT, the second target data packet is sent to a server corresponding to the ingress port, then the mapping relation record is deleted, and the keyword of the second target data packet is added to the data structure of the bloom filter.
After S210, comprising: storing a second target data packet in the CS using the offset requested by the first target interest packet.
In particular, the method comprises the following steps of,
transmitting a second target I/O instruction into the sub-thread by using the main thread of the CS according to the second target data packet, wherein the second target I/O instruction is an instruction for storing the second target data packet in the CS;
and storing the second target data packet by utilizing the offset requested by the child thread through the first target interest packet.
Fig. 5 is a flowchart of a non-blocking content caching method for a third content router according to an embodiment of the present application, where the method includes:
s301, analyzing a header of a received first target interest packet request, and acquiring a keyword and an offset of the first target interest packet request, wherein the header comprises a prefix and an offset of a content name of requested content, and the prefix is used as the keyword;
s302, judging whether the content corresponding to the keyword requested by the first target interest package exists in a content memory CS by using a bloom filter, if not, executing S305, and if so, executing S303;
s303, judging whether the I/O waiting queue in the CS is smaller than a preset threshold value, if so, returning to execute S304, and if not, executing S305;
s304, searching content corresponding to the keyword requested by the first target interest package from the CS according to the keyword and the offset requested by the first target interest package, and pushing a first target data package to a server sending the first target interest package request, wherein the first target data package comprises the content which is searched in the CS and corresponds to the keyword requested by the first target interest package;
s305, judging whether keywords requested by the first target interest packet exist in a PIT (destination entry table); if not, executing S306, and if yes, executing S307;
s306, adding a mapping relation record between a keyword of the first target interest packet request and an ingress port in the PIT, forwarding the keyword of the first target interest packet request to a forwarding information table (FIB), and using the FIB to route and forward the keyword of the first target interest packet request to an upstream router, wherein the ingress port is a port through which the first target interest packet request enters the router;
s307, judging whether the mapping relation record exists in the PIT or not; if not, go to step S208;
s308, adding the mapping relation record in the PIT;
s309, receiving a second target data packet sent by the upstream router, wherein the second target data packet includes content corresponding to the keyword requested by the first target interest packet sent by the upstream router;
s310, analyzing a packet header of a second target data packet, obtaining a keyword of the second target data packet, and forwarding the keyword of the second target data packet to a PIT;
s311, judging whether the keywords of the second target data packet exist in the PIT; if yes, go to S312, otherwise, S313;
s312, according to the ingress port information and the corresponding keywords recorded by the PIT, the second target data packet is sent to the server corresponding to the ingress port, the mapping relation record is deleted, and the keywords of the second target data packet are added to the data structure of the bloom filter;
s313, discarding the second destination packet.
Therefore, the method not only solves the problem of frequent congestion of the CS, but also fully utilizes PIT and FIB by increasing the limitations of a bloom filter and an I/O waiting queue, reduces the queuing time delay of flow and improves the overall performance of the content router.
Fig. 6 is a schematic structural diagram of a non-blocking content caching apparatus of a second content router according to an embodiment of the present application, where the apparatus includes:
an interest package request parsing module 501, configured to parse a packet header of a received first target interest package request, and obtain a keyword and an offset of the first target interest package request, where the packet header includes a prefix and an offset of a content name of a requested content, and the prefix is used as the keyword;
an I/O waiting queue determining module 502, configured to determine whether an I/O waiting queue in the CS is smaller than a preset threshold; if the value is smaller than the preset threshold, the content search module 503 is triggered, and if the value is not smaller than the preset threshold, the first judgment module 504 is triggered;
the content search module 503 is configured to search, according to the keyword and the offset of the first target interest packet request, content corresponding to the keyword of the first target interest packet request from the CS, and push a first target data packet to a server that sends the first target interest packet request, where the first target data packet includes content corresponding to the keyword of the first target interest packet request that is searched in the CS;
the first determining module 504 is configured to determine whether a keyword requested by the first target interest packet exists in an pending request table PIT; if not, triggering the upstream router module 505, and if yes, triggering the mapping relationship judgment module 506;
the upstream router module 505 is configured to add a mapping relationship record between a keyword of the first target interest packet request and an ingress port in a PIT, forward the keyword of the first target interest packet request to a forwarding information table FIB, and forward the keyword of the first target interest packet request to an upstream router by using the FIB, where the ingress port is a port where the first target interest packet request enters the router;
the mapping relation record determining module 506 is configured to determine whether the mapping relation record exists in the PIT; if not, triggering the first PIT module 507;
the first PIT module 507 is configured to add the mapping relationship record to a PIT;
a data packet receiving module 508, configured to receive a second target data packet sent by an upstream router, where the second target data packet includes content corresponding to a keyword requested by the first target interest packet sent by the upstream router;
an analyzing module 509, configured to analyze a packet header of a second target data packet, obtain a keyword of the second target data packet, and forward the keyword of the second target data packet to the PIT;
the second PIT module 510 is configured to send the second target data packet to the server corresponding to the ingress port according to the mapping relationship record recorded in the PIT, delete the mapping relationship record, and add the keyword of the second target data packet to the data structure of the bloom filter.
The device further comprises:
and the storage module is used for storing the second target data packet in the CS by using the offset requested by the first target interest packet.
The second judging module is used for judging whether keywords of the second target data packet exist in the PIT; if so, triggering a second PIT module; if not, triggering a discarding module;
the discarding module is configured to discard the second target packet.
The content search module 503 includes:
the first main thread sub-module is used for transmitting a first target I/O instruction to a sub-thread by using a main thread of the CS according to a keyword requested by the first target interest packet, wherein the first target I/O instruction is an instruction for searching the CS for content corresponding to the keyword requested by the first target interest packet;
and the first sub-thread sub-module is used for receiving a first target data packet retrieved by the sub-thread through the offset of the first target interest packet request, and pushing the first target data packet to a server sending the first target interest packet request, wherein the first target data packet comprises content which is searched in the CS and corresponds to the keyword of the first target interest packet request.
The memory module includes:
the second main thread submodule is used for transmitting a second target I/O instruction to a sub-thread by using the main thread of the CS according to the second target data packet, wherein the second target I/O instruction is an instruction for storing the second target data packet in the CS;
and the second sub-thread sub-module is used for storing the second target data packet by utilizing the offset requested by the sub-thread through the first target interest packet.
An electronic device provided in the embodiment of the present application, as shown in fig. 7, includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the following steps when executing the program stored in the memory 603:
analyzing a packet header of a received first target interest packet request, and acquiring keywords and offset of the first target interest packet request, wherein the packet header comprises a prefix and offset of a content name of requested content, and the prefix is used as the keyword;
judging whether an I/O waiting queue in the CS is smaller than a preset threshold value or not;
if the value is smaller than the preset threshold value, searching the content corresponding to the keyword requested by the first target interest package from the CS according to the keyword and the offset requested by the first target interest package, and pushing the first target data package to a server sending the first target interest package request, wherein the first target data package comprises the content which is searched in the CS and corresponds to the keyword requested by the first target interest package;
if the value is not less than the preset threshold value, judging whether keywords requested by the first target interest packet exist in a pending request table PIT or not;
if the first target interest packet does not exist, adding a mapping relation record between a keyword of the first target interest packet request and an ingress port in the PIT, forwarding the keyword of the first target interest packet request to a forwarding information table (FIB), and utilizing the FIB to route and forward the keyword of the first target interest packet request to an upstream router, wherein the ingress port is a port through which the first target interest packet request enters the router;
if yes, judging whether the mapping relation record exists in the PIT or not;
if not, adding the mapping relation record in the PIT;
receiving a second target data packet sent by an upstream router, wherein the second target data packet comprises content corresponding to a keyword requested by the first target interest packet sent by the upstream router;
analyzing a packet header of a second target data packet, obtaining a keyword of the second target data packet, and forwarding the keyword of the second target data packet to a PIT (packet intermediate transfer protocol);
and according to the mapping relation record recorded in the PIT, sending the second target data packet to a server corresponding to the ingress port, deleting the mapping relation record, and adding the keyword of the second target data packet to a data structure of a bloom filter.
Therefore, the electronic device provided by the embodiment can solve the problem of frequent congestion of the CS by adding the bloom filter, and fully utilize the PIT and the FIB, thereby reducing the queuing delay of the traffic and improving the overall performance of the content router.
The above-mentioned implementation of the non-blocking content caching method of the relevant content router is the same as the test method of the non-blocking content caching method of the content router provided in the foregoing method embodiment section, and is not described here again.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
A computer-readable storage medium having a computer program stored therein, which when executed by a processor, performs the steps of:
analyzing a packet header of a received first target interest packet request, and acquiring keywords and offset of the first target interest packet request, wherein the packet header comprises a prefix and offset of a content name of requested content, and the prefix is used as the keyword;
judging whether an I/O waiting queue in the CS is smaller than a preset threshold value or not;
if the value is smaller than the preset threshold value, searching the content corresponding to the keyword requested by the first target interest package from the CS according to the keyword and the offset requested by the first target interest package, and pushing the first target data package to a server sending the first target interest package request, wherein the first target data package comprises the content which is searched in the CS and corresponds to the keyword requested by the first target interest package;
if the value is not less than the preset threshold value, judging whether keywords requested by the first target interest packet exist in a pending request table PIT or not;
if the first target interest packet does not exist, adding a mapping relation record between a keyword of the first target interest packet request and an ingress port in the PIT, forwarding the keyword of the first target interest packet request to a forwarding information table (FIB), and utilizing the FIB to route and forward the keyword of the first target interest packet request to an upstream router, wherein the ingress port is a port through which the first target interest packet request enters the router;
if yes, judging whether the mapping relation record exists in the PIT or not;
if not, adding the mapping relation record in the PIT;
receiving a second target data packet sent by an upstream router, wherein the second target data packet comprises content corresponding to a keyword requested by the first target interest packet sent by the upstream router;
analyzing a packet header of a second target data packet, obtaining a keyword of the second target data packet, and forwarding the keyword of the second target data packet to a PIT (packet intermediate transfer protocol);
and according to the mapping relation record recorded in the PIT, sending the second target data packet to a server corresponding to the ingress port, deleting the mapping relation record, and adding the keyword of the second target data packet to a data structure of a bloom filter.
Therefore, when the application program stored in the computer-readable storage medium provided by this embodiment is executed, not only the problem of frequent CS congestion is solved by adding the bloom filter, but also the PIT and the FIB are fully utilized, the queuing delay of the traffic is reduced, and the overall performance of the content router is improved.
The above-mentioned implementation of the non-blocking content caching method of the relevant content router is the same as the test method of the non-blocking content caching method of the content router provided in the foregoing method embodiment section, and is not described here again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (9)

1. A caching method for a content router, the method comprising:
analyzing a packet header of a received first target interest packet request, and acquiring keywords and offset of the first target interest packet request, wherein the packet header comprises a prefix and offset of a content name of requested content, and the prefix is used as the keyword;
judging whether an I/O waiting queue in the content memory CS is smaller than a preset threshold value or not;
if the value is smaller than the preset threshold value, searching the content corresponding to the keyword requested by the first target interest package from the CS according to the keyword and the offset requested by the first target interest package, and pushing the first target data package to a server sending the first target interest package request, wherein the first target data package comprises the content which is searched in the CS and corresponds to the keyword requested by the first target interest package;
if the value is not less than the preset threshold value, judging whether keywords requested by the first target interest packet exist in a pending request table PIT or not;
if the first target interest packet does not exist, adding a mapping relation record between a keyword of the first target interest packet request and an ingress port in the PIT, forwarding the keyword of the first target interest packet request to a forwarding information table (FIB), and utilizing the FIB to route and forward the keyword of the first target interest packet request to an upstream router, wherein the ingress port is a port through which the first target interest packet request enters the router;
if yes, judging whether the mapping relation record exists in the PIT or not;
if not, adding the mapping relation record in the PIT;
receiving a second target data packet sent by an upstream router, wherein the second target data packet comprises content corresponding to a keyword requested by the first target interest packet sent by the upstream router;
analyzing a packet header of a second target data packet, obtaining a keyword of the second target data packet, and forwarding the keyword of the second target data packet to a PIT (packet intermediate transfer protocol);
and according to the mapping relation record recorded in the PIT, sending the second target data packet to a server corresponding to the ingress port, deleting the mapping relation record, and adding the keyword of the second target data packet to a data structure of a bloom filter.
2. The method of claim 1, wherein after the mapping relation record is deleted after the second target packet is sent to the server corresponding to the ingress port according to the mapping relation record recorded in the PIT, and a key of the second target packet is added to a data structure of a bloom filter, the method further comprises:
storing a second target data packet in the CS using the offset requested by the first target interest packet.
3. The method of claim 1, wherein searching for content corresponding to the keyword requested by the first target interest package from the CS according to the keyword and the offset of the first target interest package request, and pushing a first target data package to a server sending the first target interest package request, wherein the content corresponding to the keyword requested by the first target interest package searched in the CS is included in the first target data package, comprises:
transmitting a first target I/O instruction to a sub-thread by using a main thread of the CS according to a keyword requested by the first target interest packet, wherein the first target I/O instruction is an instruction for searching the CS for content corresponding to the keyword requested by the first target interest packet;
and receiving a first target data packet retrieved by the child thread through the offset of the first target interest packet request, and pushing the first target data packet to a server sending the first target interest packet request, wherein the first target data packet comprises content which is searched in the CS and corresponds to the keyword requested by the first target interest packet.
4. The method of claim 3, wherein storing a second target data packet in the CS using the offset requested by the first target interest packet comprises:
transmitting a second target I/O instruction into the sub-thread by using the main thread of the CS according to the second target data packet, wherein the second target I/O instruction is an instruction for storing the second target data packet in the CS;
and storing the second target data packet by utilizing the offset requested by the child thread through the first target interest packet.
5. The method of any of claims 1-4, wherein after parsing a header of a second destination packet, obtaining a key of the second destination packet, and forwarding the key of the second destination packet into the PIT, further comprising:
judging whether keywords of the second target data packet exist in the PIT;
if so, executing the steps of sending the second target data packet to a server corresponding to the ingress port according to the mapping relation record recorded in the PIT, deleting the mapping relation record, and adding the keyword of the second target data packet to the data structure of the bloom filter;
and if not, discarding the second target data packet.
6. A caching apparatus for a content router, the apparatus comprising:
the interest package request analysis module is used for analyzing a packet header of a received first target interest package request and acquiring keywords and offset of the first target interest package request, wherein the packet header comprises a prefix and offset of a content name of requested content, and the prefix is used as the keyword;
an I/O waiting queue judging module, which is used for judging whether the I/O waiting queue in the content memory CS is smaller than a preset threshold value; if the content is less than the preset threshold, triggering a content searching module, and if the content is not less than the preset threshold, triggering a first judging module;
the content searching module is configured to search, according to the keyword and the offset requested by the first target interest package, content corresponding to the keyword requested by the first target interest package from the CS, and push the first target data package to a server that sends the first target interest package request, where the first target data package includes content corresponding to the keyword requested by the first target interest package, which is searched in the CS;
the first judging module is used for judging whether keywords requested by the first target interest packet exist in a pending request table PIT or not; if the mapping relation judging module exists, the mapping relation judging module is triggered;
the upstream router module is configured to add, in a PIT, a mapping relationship record between a keyword of the first target interest packet request and an ingress port, forward the keyword of the first target interest packet request to a forwarding information table FIB, and perform routing forwarding on the keyword of the first target interest packet request to an upstream router by using the FIB, where the ingress port is a port through which the first target interest packet request enters the router;
the mapping relation judging module is used for judging whether the mapping relation record exists in the PIT or not; if not, triggering the first PIT module;
the first PIT module is used for adding the mapping relation record in the PIT;
a data packet receiving module, configured to receive a second target data packet sent by an upstream router, where the second target data packet includes content corresponding to a keyword requested by the first target interest packet sent by the upstream router;
the analysis module is used for analyzing the packet head of a second target data packet, acquiring the keywords of the second target data packet and forwarding the keywords of the second target data packet to the PIT;
and the second PIT module is used for sending the second target data packet to a server corresponding to the ingress port according to the mapping relation record recorded in the PIT, deleting the mapping relation record, and adding the keyword of the second target data packet into the data structure of the bloom filter.
7. The apparatus of claim 6, wherein the apparatus further comprises:
a storage module, configured to store a second target data packet in the CS using the offset requested by the first target interest packet;
the second judging module is used for judging whether keywords of the second target data packet exist in the PIT; if so, triggering a second PIT module; if not, triggering a discarding module;
the discarding module is configured to discard the second target packet.
8. The apparatus of claim 6, wherein the content search module comprises:
the first main thread sub-module is used for transmitting a first target I/O instruction to a sub-thread by using a main thread of the CS according to a keyword requested by the first target interest packet, wherein the first target I/O instruction is an instruction for searching the CS for content corresponding to the keyword requested by the first target interest packet;
and the first sub-thread sub-module is used for receiving a first target data packet retrieved by the sub-thread through the offset of the first target interest packet request, and pushing the first target data packet to a server sending the first target interest packet request, wherein the first target data packet comprises content which is searched in the CS and corresponds to the keyword of the first target interest packet request.
9. The apparatus of claim 7, wherein the storage module comprises:
the second main thread submodule is used for transmitting a second target I/O instruction to a sub-thread by using the main thread of the CS according to the second target data packet, wherein the second target I/O instruction is an instruction for storing the second target data packet in the CS;
and the second sub-thread sub-module is used for storing the second target data packet by utilizing the offset requested by the sub-thread through the first target interest packet.
CN201910327612.4A 2017-06-29 2017-06-29 Caching method and device of content router Active CN110062045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910327612.4A CN110062045B (en) 2017-06-29 2017-06-29 Caching method and device of content router

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710517235.1A CN107454142B (en) 2017-06-29 2017-06-29 A kind of non-obstruction content buffering method and device of content router
CN201910327612.4A CN110062045B (en) 2017-06-29 2017-06-29 Caching method and device of content router

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201710517235.1A Division CN107454142B (en) 2017-06-29 2017-06-29 A kind of non-obstruction content buffering method and device of content router

Publications (2)

Publication Number Publication Date
CN110062045A CN110062045A (en) 2019-07-26
CN110062045B true CN110062045B (en) 2020-04-17

Family

ID=60488533

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201910327612.4A Active CN110062045B (en) 2017-06-29 2017-06-29 Caching method and device of content router
CN201710517235.1A Active CN107454142B (en) 2017-06-29 2017-06-29 A kind of non-obstruction content buffering method and device of content router

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201710517235.1A Active CN107454142B (en) 2017-06-29 2017-06-29 A kind of non-obstruction content buffering method and device of content router

Country Status (1)

Country Link
CN (2) CN110062045B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110138555B (en) * 2019-05-21 2020-11-20 长沙能川信息科技有限公司 Encryption and decryption method for FBX format three-dimensional model
CN110460633A (en) * 2019-06-29 2019-11-15 天津大学 A kind of internet of things networking internodal data synchronization transfer method of content oriented
CN111611348A (en) * 2020-05-25 2020-09-01 河南科技大学 ICN network information name searching method based on learning bloom filter
CN115002036B (en) * 2022-05-26 2023-07-25 国网河北省电力有限公司电力科学研究院 NDN network congestion control method, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103379029A (en) * 2012-04-24 2013-10-30 华为技术有限公司 Method, device and system for forwarding routing of content network
CN105723666A (en) * 2014-12-16 2016-06-29 北京大学深圳研究生院 Content-based routing method and system

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2562978B1 (en) * 2011-08-12 2014-10-08 Alcatel Lucent Content router of a content centric network
WO2013029569A1 (en) * 2011-09-01 2013-03-07 Huawei Technologies Co., Ltd. A Generalized Dual-Mode Data Forwarding Plane for Information-Centric Network
US8762570B2 (en) * 2012-02-21 2014-06-24 Futurewei Technologies, Inc. Method and apparatus for adaptive forwarding strategies in content-centric networking
CN103491003B (en) * 2012-06-14 2016-12-21 华为技术有限公司 A kind of content router and the method processing message thereof
CN103905327B (en) * 2012-12-25 2017-05-17 中国科学院声学研究所 Stream state information based content-centric network congestion control method and system thereof
CN103118013B (en) * 2013-01-16 2015-12-23 西安电子科技大学 The method of packet incidentally reverse interest bag in content center network
CN103095724B (en) * 2013-02-05 2015-12-23 西安电子科技大学 The method that the multiple interest packet compression of a kind of content center network sends and processes
CN104052667B (en) * 2013-03-15 2017-05-31 华为技术有限公司 Message processing method and equipment
CN103428093B (en) * 2013-07-03 2017-02-08 北京邮电大学 Route prefix storing, matching and updating method and device based on names
CN104320451A (en) * 2014-10-21 2015-01-28 北京邮电大学 Content-centric networking supporting web server cache system and processing method
US9716664B2 (en) * 2014-12-03 2017-07-25 Cisco Technology, Inc. Tracking queuing delay and performing related congestion control in information centric networking
CN105260429B (en) * 2015-09-30 2019-04-26 河南科技大学 A kind of ICN network information Name Lookup method based on multiple Bloom filter
CN106657181B (en) * 2015-10-30 2020-02-21 中国科学院声学研究所 Data pushing method based on content-centric network
CN106534360A (en) * 2016-12-13 2017-03-22 重庆大学 Content centric network routing method based on software definition

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103379029A (en) * 2012-04-24 2013-10-30 华为技术有限公司 Method, device and system for forwarding routing of content network
CN105723666A (en) * 2014-12-16 2016-06-29 北京大学深圳研究生院 Content-based routing method and system

Also Published As

Publication number Publication date
CN110062045A (en) 2019-07-26
CN107454142A (en) 2017-12-08
CN107454142B (en) 2019-06-07

Similar Documents

Publication Publication Date Title
CN110062045B (en) Caching method and device of content router
EP1371187B1 (en) Cache entry selection method and apparatus
US6421342B1 (en) Packet forwarding apparatus and method using pipelined node address processing
US20180011936A1 (en) System and method for direct storage access in a content-centric network
US6854117B1 (en) Parallel network processor array
CN102685177B (en) The transparent proxy cache method of resource, the network equipment and system
US7480242B2 (en) Pass/drop apparatus and method for network switching node
JP4550728B2 (en) Packet transfer apparatus and multicast deployment method
CN109729022B (en) Data sending method, device and system based on software defined network
US7088731B2 (en) Memory management for packet switching device
KR101688635B1 (en) Apparatus for storing traffic based on flow and method
CN112737940B (en) Data transmission method and device
CN113454957B (en) Memory management method and device
CN113490084B (en) FC-AE exchanger ultra-bandwidth transmission method supporting priority scheduling
JP2013131903A (en) Network node and packet control method
US10033665B2 (en) System and a method of analysing a plurality of data packets
Pan et al. Nb-cache: Non-blocking in-network caching for high-performance content routers
JP2000083055A (en) Router
JP3563278B2 (en) Priority route control method and router device
CN114710444A (en) Data center flow statistical method and system based on tower abstract and evictable flow table
JP7251060B2 (en) Information processing device, information processing system and information processing program
Alhisnawi et al. Designing Cuckoo Based Pending Interest Table for CCN Networks.
CN117997853A (en) Message forwarding method based on multicast table item cache and switch device
Pan et al. Non-Blocking In-Network Caching for High-Capacity Content Routers
US6775722B2 (en) Efficient data retrieval from input coupling queues

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