CN115250265B - Domain Name System (DNS) data synchronization method and device and domain name system - Google Patents
Domain Name System (DNS) data synchronization method and device and domain name system Download PDFInfo
- Publication number
- CN115250265B CN115250265B CN202210973135.0A CN202210973135A CN115250265B CN 115250265 B CN115250265 B CN 115250265B CN 202210973135 A CN202210973135 A CN 202210973135A CN 115250265 B CN115250265 B CN 115250265B
- Authority
- CN
- China
- Prior art keywords
- domain name
- node
- request
- routing
- routing node
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000005540 biological transmission Effects 0.000 claims description 26
- 230000004044 response Effects 0.000 claims description 17
- 230000003139 buffering effect Effects 0.000 claims 6
- 238000010586 diagram Methods 0.000 description 8
- 230000001934 delay Effects 0.000 description 3
- 238000012216 screening Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- 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/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明提供一种基于命名数据网络的域名系统、数据同步方法及装置,属于网络技术领域。所述方法包括:更新第一域名节点的域名并产生相应的域名更新数据包;通过路由节点向网络中广播第一请求以使第二域名节点根据第一请求向第一域名节点发送兴趣包;接收所述兴趣包,并通过路由节点向第二域名节点返回所述兴趣包对应的域名更新数据包,以及通过目标路由节点缓存所述域名更新数据包,以便其他第二域名节点获取所述域名更新数据包完成数据同步。所述方法可解决当前域名解析体系中存在的当根域名服务器出现故障,导致互联网无法正常运转的问题。
The invention provides a domain name system based on a naming data network, a data synchronization method and a device, and belongs to the field of network technology. The method includes: updating the domain name of the first domain name node and generating a corresponding domain name update data packet; broadcasting the first request to the network through the routing node so that the second domain name node sends an interest packet to the first domain name node according to the first request; Receive the interest packet, return the domain name update data packet corresponding to the interest packet to the second domain name node through the routing node, and cache the domain name update data packet through the target routing node, so that other second domain name nodes can obtain the domain name Update data package to complete data synchronization. The method can solve the problem that the Internet cannot operate normally when the root domain name server fails in the current domain name resolution system.
Description
技术领域technical field
本发明涉及网络技术领域,尤其涉及一种基于命名数据网络的域名系统DNS数据同步方法及装置、域名系统。The invention relates to the field of network technology, in particular to a domain name system DNS data synchronization method and device based on a naming data network, and a domain name system.
背景技术Background technique
域名系统(domain name system,DNS)作为关键互联网基础设施,为大量互联网应用提供了域名到IP(Internet Protocol,互联网协议)地址的解析服务。其根域名服务器负责解析根区并提供顶级域名(top level domain,TLD)服务器的索引列表,属于中心化域名解析体系,该域名解析体系中当根域名服务器出现故障时,将导致互联网无法正常运转。Domain name system (domain name system, DNS), as a key Internet infrastructure, provides domain name to IP (Internet Protocol, Internet Protocol) address resolution services for a large number of Internet applications. Its root domain name server is responsible for parsing the root zone and providing an index list of top level domain (TLD) servers, which belongs to the centralized domain name resolution system. In this domain name resolution system, when the root domain name server fails, the Internet will not function normally .
发明内容Contents of the invention
本发明所要解决的技术问题是针对现有技术的上述不足,提供一种基于命名数据网络的域名系统DNS数据同步方法及装置、域名系统,以至少解决相关技术中存在的当根域名服务器出现故障,导致互联网无法正常运转的问题。The technical problem to be solved by the present invention is to provide a domain name system DNS data synchronization method and device based on a naming data network, and a domain name system to at least solve the problems existing in the related technology when the root domain name server fails. , causing problems with the Internet not functioning properly.
第一方面,本发明提供一种基于命名数据网络的域名系统DNS数据同步方法,应用于第一域名节点,命名数据网络包括第一域名节点、第二域名节点和路由节点,所述方法包括:更新第一域名节点的域名并产生相应的域名更新数据包;通过路由节点向网络中广播第一请求以使第二域名节点根据第一请求向第一域名节点发送兴趣包,其中,第一请求包括请求类型、域名更新数据包的序列号;接收所述兴趣包,并通过路由节点向第二域名节点返回所述兴趣包对应的域名更新数据包,以及通过目标路由节点缓存所述域名更新数据包,以便其他第二域名节点获取所述域名更新数据包完成数据同步。In a first aspect, the present invention provides a method for synchronizing DNS data in a domain name system based on a naming data network, which is applied to a first domain name node. The naming data network includes a first domain name node, a second domain name node, and a routing node. The method includes: Update the domain name of the first domain name node and generate a corresponding domain name update packet; broadcast the first request to the network through the routing node so that the second domain name node sends an interest packet to the first domain name node according to the first request, wherein the first request Including the request type, the serial number of the domain name update data packet; receiving the interest packet, and returning the domain name update data packet corresponding to the interest packet to the second domain name node through the routing node, and caching the domain name update data through the target routing node package, so that other second domain name nodes can obtain the domain name update data package to complete data synchronization.
优选地,所述目标路由节点指根据路由节点的剩余缓存能力和重要程度选择得到,具体包括:根据以下公式计算路由节点的评分值:Preferably, the target routing node is selected according to the remaining cache capacity and importance of the routing node, specifically including: calculating the scoring value of the routing node according to the following formula:
其中,PX为路由节点X的评分值,RX为路由节点X的剩余缓存能力,n为路由节点的总数量,为所有路由节点的剩余缓存能力之和,S为该次数据传输所需的路径总数,SX为S经过路由节点X的路径数,根据评分值进行降序排列得到所有路由节点的降序结果;根据以下公式从降序结果中选择出排序靠前的目标路由节点:Among them, P X is the scoring value of routing node X, R X is the remaining cache capacity of routing node X, n is the total number of routing nodes, is the sum of the remaining caching capabilities of all routing nodes, S is the total number of paths required for this data transmission, S X is the number of paths that S passes through routing node X, and the descending order results of all routing nodes are obtained by ranking according to the scoring value; according to The following formula selects the top-ranked destination routing nodes from the descending results:
M=n*预设比例M=n*preset ratio
其中,M为目标路由节点的数量,预设比例大于0且小于1。Wherein, M is the number of target routing nodes, and the preset ratio is greater than 0 and less than 1.
优选地,在所述通过路由节点向网络中广播第一请求之前,基于命名数据网络的域名系统DNS数据同步方法还包括:向命名数据网络中与自身相距的距离最小值对应的路由节点发送第二请求,以使路由节点根据第二请求在自身的转发信息库中增加第一域名节点相关的转发信息后,附上自身接收第二请求的接口后再向其他路由节点转发第二请求,直至得到命名数据网络的初始路由,其中,第二请求包括节点标识、活跃状态标识。Preferably, before broadcasting the first request to the network through the routing node, the DNS data synchronization method based on the naming data network further includes: sending the first request to the routing node corresponding to the minimum distance from itself in the naming data network Two requests, so that the routing node adds the forwarding information related to the first domain name node in its own forwarding information base according to the second request, and then attaches its own interface for receiving the second request before forwarding the second request to other routing nodes until An initial route of the named data network is obtained, wherein the second request includes a node identifier and an active status identifier.
优选地,在所述得到命名数据网络的初始路由后,基于命名数据网络的域名系统DNS数据同步方法还包括:周期性向命名数据网络中与自身相距的距离最小值对应的路由节点发送第二请求,以使路由节点响应于预设时长内未接收到第二请求,在自身的转发信息库中删除第一域名节点相关的转发信息,并将第一域名节点的节点标识和退出活跃状态标识转发给其他路由节点用于更新其他路由节点的转发信息库,以及,以使路由节点响应于预设时长内接收到第二请求,保持自身的转发信息库不变更。Preferably, after obtaining the initial route of the named data network, the method for synchronizing DNS data based on the named data network further includes: periodically sending a second request to the routing node corresponding to the minimum distance from itself in the named data network , so that the routing node deletes the forwarding information related to the first domain name node in its own forwarding information database in response to not receiving the second request within the preset time period, and forwards the node ID and the exit active status ID of the first domain name node It is used for other routing nodes to update forwarding information bases of other routing nodes, and to make the routing node keep its own forwarding information base unchanged in response to receiving the second request within a preset time period.
第二方面,本发明还提供一种基于命名数据网络的域名系统DNS数据同步方法,应用于路由节点,命名数据网络包括第一域名节点、第二域名节点和路由节点,所述方法包括:接收第一域名节点广播的第一请求并解析所述第一请求中的请求类型,其中,第一请求包括请求类型、域名更新数据包的序列号,请求类型包括推送类型;响应于请求类型为推送类型,向下一跳路由节点转发所述第一请求,以使第二域名节点根据所述第一请求向第一域名节点发送兴趣包;转发第一域名节点返回的所述兴趣包对应的域名更新数据包,并由目标路由节点缓存所述域名更新数据包,以便其他第二域名节点获取所述域名更新数据包完成数据同步。In a second aspect, the present invention also provides a method for synchronizing DNS data in a domain name system based on a named data network, which is applied to a routing node. The named data network includes a first domain name node, a second domain name node, and a routing node. The method includes: receiving The first request broadcast by the first domain name node and parse the request type in the first request, wherein the first request includes the request type, the serial number of the domain name update data packet, and the request type includes the push type; the response request type is push type, forward the first request to the next-hop routing node, so that the second domain name node sends an interest packet to the first domain name node according to the first request; forward the domain name corresponding to the interest packet returned by the first domain name node Update the data packet, and cache the domain name update data packet by the target routing node, so that other second domain name nodes can obtain the domain name update data packet to complete data synchronization.
优选地,所述目标路由节点指根据路由节点的剩余缓存能力和重要程度选择得到,具体包括:根据以下公式计算路由节点的评分值:Preferably, the target routing node is selected according to the remaining cache capacity and importance of the routing node, specifically including: calculating the scoring value of the routing node according to the following formula:
其中,PX为路由节点X的评分值,RX为路由节点X的剩余缓存能力,n为路由节点的总数量,为所有路由节点的剩余缓存能力之和,S为该次数据传输所需的路径总数,SX为S经过路由节点X的路径数,根据评分值进行降序排列得到所有路由节点的降序结果;根据以下公式从降序结果中选择出排序靠前的目标路由节点:Among them, P X is the scoring value of routing node X, R X is the remaining cache capacity of routing node X, n is the total number of routing nodes, is the sum of the remaining caching capabilities of all routing nodes, S is the total number of paths required for this data transmission, S X is the number of paths that S passes through routing node X, and the descending order results of all routing nodes are obtained by ranking according to the scoring value; according to The following formula selects the top-ranked destination routing nodes from the descending results:
M=n*预设比例M=n*preset ratio
其中,M为目标路由节点的数量,预设比例大于0且小于1。Wherein, M is the number of target routing nodes, and the preset ratio is greater than 0 and less than 1.
优选地,在所述由目标路由节点缓存所述域名更新数据包之后,基于命名数据网络的域名系统DNS数据同步方法还包括:接收其他第二域名节点发送的兴趣包;查询自身的内容存储是否缓存了所述兴趣包对应的域名更新数据包,若查询结果为是,则根据转发信息库返回所缓存的所述兴趣包对应的域名更新数据包,若查询结果为否,则查找待定兴趣表,若待定兴趣表已有相应条目则记录收到所述兴趣包的接口而不转发,若否,则根据转发信息库转发所述兴趣包并增加相应的待定兴趣表条目。Preferably, after the domain name update data packet is cached by the target routing node, the domain name system DNS data synchronization method based on the naming data network further includes: receiving interest packets sent by other second domain name nodes; querying whether its own content storage The domain name update data packet corresponding to the interest packet is cached, and if the query result is yes, the domain name update data packet corresponding to the cached interest packet is returned according to the forwarding information base, and if the query result is no, the pending interest table is searched , if the pending interest table has a corresponding entry, record the interface that received the interest packet and not forward it, if not, forward the interest packet according to the forwarding information base and add the corresponding pending interest table entry.
第三方面,本发明还提供一种基于命名数据网络的域名系统DNS数据同步装置,命名数据网络包括第一域名节点、第二域名节点和路由节点,所述装置包括更新模块、广播模块和同步模块。In a third aspect, the present invention also provides a device for synchronizing DNS data in a domain name system based on a naming data network. The naming data network includes a first domain name node, a second domain name node, and a routing node. The device includes an update module, a broadcast module, and a synchronization module. module.
更新模块,用于更新第一域名节点的域名并产生相应的域名更新数据包。广播模块,与更新模块连接,用于通过路由节点向网络中广播第一请求以使第二域名节点根据第一请求向第一域名节点发送兴趣包,其中,第一请求包括请求类型、域名更新数据包的序列号。同步模块,与更新模块连接,用于接收兴趣包并通过路由节点向第二域名节点返回所述域名更新数据包,以及,通过目标路由节点缓存所述域名更新数据包,以便其他第二域名节点获取所述域名更新数据包完成数据同步。An update module, configured to update the domain name of the first domain name node and generate a corresponding domain name update data packet. The broadcast module, connected with the update module, is used to broadcast the first request to the network through the routing node so that the second domain name node sends an interest packet to the first domain name node according to the first request, wherein the first request includes request type, domain name update The sequence number of the packet. Synchronization module, connected with the update module, used to receive the interest packet and return the domain name update data packet to the second domain name node through the routing node, and cache the domain name update data packet through the target routing node, so that other second domain name nodes Obtain the domain name update data package to complete data synchronization.
第四方面,本发明还提供一种基于命名数据网络的域名系统DNS数据同步装置,命名数据网络包括第一域名节点、第二域名节点和路由节点,所述装置包括解析模块、第一转发模块和第二转发模块。解析模块,用于接收第一域名节点广播的第一请求并解析所述第一请求中的请求类型,其中,第一请求包括请求类型、域名更新数据包的序列号,请求类型包括推送类型。第一转发模块,与解析模块连接,用于响应于请求类型为推送类型,向下一跳路由节点转发所述第一请求,以使第二域名节点根据所述第一请求向第一域名节点发送兴趣包。第二转发模块,与解析模块连接,用于转发第一域名节点返回的所述兴趣包对应的域名更新数据包,并由目标路由节点缓存所述域名更新数据包,以便其他第二域名节点获取所述域名更新数据包完成数据同步。In a fourth aspect, the present invention also provides a device for synchronizing DNS data in a domain name system based on a named data network. The named data network includes a first domain name node, a second domain name node, and a routing node, and the device includes a resolution module and a first forwarding module. and the second forwarding module. The parsing module is configured to receive the first request broadcast by the first domain name node and parse the request type in the first request, wherein the first request includes the request type and the serial number of the domain name update data packet, and the request type includes a push type. The first forwarding module, connected to the parsing module, is used to forward the first request to the next-hop routing node in response to the request type being a push type, so that the second domain name node sends the first domain name node to the first domain name node according to the first request Send interest packets. The second forwarding module is connected with the parsing module, and is used to forward the domain name update data packet corresponding to the interest packet returned by the first domain name node, and cache the domain name update data packet by the target routing node so that other second domain name nodes can obtain The domain name update data packet completes data synchronization.
第五方面,本发明还提供一种基于命名数据网络的域名系统DNS,包括第一域名节点、第二域名节点和路由节点,其中,第一域名节点通过路由节点与第二域名节点连接。第一域名节点,用于更新第一域名节点的域名并产生相应的域名更新数据包,还用于通过路由节点向网络中广播第一请求以使第二域名节点根据第一请求向第一域名节点发送兴趣包,其中,第一请求包括请求类型、域名更新数据包的序列号,以及,用于接收所述兴趣包,并通过路由节点向第二域名节点返回所述兴趣包对应的域名更新数据包。路由节点,用于接收第一域名节点广播的第一请求并解析所述第一请求中的请求类型,响应于请求类型为推送类型,向下一跳路由节点转发所述第一请求,以使第二域名节点根据所述第一请求向第一域名节点发送兴趣包,以及,用于转发第一域名节点返回的所述兴趣包对应的域名更新数据包,并由目标路由节点缓存所述域名更新数据包,以便其他第二域名节点获取所述域名更新数据包完成数据同步。In the fifth aspect, the present invention also provides a domain name system DNS based on a named data network, including a first domain name node, a second domain name node and a routing node, wherein the first domain name node is connected to the second domain name node through the routing node. The first domain name node is used to update the domain name of the first domain name node and generate a corresponding domain name update packet, and is also used to broadcast the first request to the network through the routing node so that the second domain name node sends the first domain name node to the first domain name node according to the first request. The node sends an interest packet, wherein the first request includes the request type, the sequence number of the domain name update data packet, and is used to receive the interest packet and return the domain name update corresponding to the interest packet to the second domain name node through the routing node data pack. The routing node is configured to receive the first request broadcast by the first domain name node and parse the request type in the first request, and forward the first request to the next-hop routing node in response to the request type being a push type, so that The second domain name node sends an interest packet to the first domain name node according to the first request, and is used to forward the domain name update data packet corresponding to the interest packet returned by the first domain name node, and cache the domain name by the target routing node The update data packet, so that other second domain name nodes obtain the domain name update data packet to complete data synchronization.
本发明提供的基于命名数据网络的域名系统DNS数据同步方法及装置、域名系统,通过将各区域的根域名服务器(即各域名节点)组成联盟链,其中,各域名节点分别可以产生域名更新数据,当其中某个域名节点产生域名更新数据后,则基于命名数据网络架构进行其他域名节点的域名更新数据的同步,从而避免中心化域名解析体系存在因根节点发生故障而影响互联网正常运转的问题。The domain name system DNS data synchronization method and device based on the naming data network and the domain name system provided by the present invention form an alliance chain by forming root domain name servers (that is, domain name nodes) in each area, wherein each domain name node can generate domain name update data respectively , when one of the domain name nodes generates domain name update data, the domain name update data of other domain name nodes will be synchronized based on the naming data network architecture, so as to avoid the problem that the centralized domain name resolution system will affect the normal operation of the Internet due to the failure of the root node .
附图说明Description of drawings
图1为本发明实施例1的一种命名数据网络的结构示意图;Fig. 1 is a schematic structural diagram of a named data network according to Embodiment 1 of the present invention;
图2为本发明实施例1的一种基于命名数据网络的域名系统DNS数据同步方法的流程示意图;2 is a schematic flow diagram of a method for synchronizing DNS data in a domain name system based on a named data network according to Embodiment 1 of the present invention;
图3为本发明实施例3的一种基于命名数据网络的域名系统DNS数据同步装置的结构示意图;3 is a schematic structural diagram of a domain name system DNS data synchronization device based on a named data network according to Embodiment 3 of the present invention;
图4为本发明实施例4的一种基于命名数据网络的域名系统DNS数据同步装置的结构示意图。FIG. 4 is a schematic structural diagram of a DNS data synchronization device based on a naming data network according to Embodiment 4 of the present invention.
具体实施方式Detailed ways
为使本领域技术人员更好地理解本发明的技术方案,下面将结合附图对本发明实施方式作进一步地详细描述。In order to enable those skilled in the art to better understand the technical solution of the present invention, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.
可以理解的是,此处描述的具体实施例和附图仅仅用于解释本发明,而非对本发明的限定。It should be understood that the specific embodiments and drawings described here are only for explaining the present invention, rather than limiting the present invention.
可以理解的是,在不冲突的情况下,本发明中的各实施例及实施例中的各特征可相互组合。It can be understood that, in the case of no conflict, each embodiment and each feature in the embodiment of the present invention can be combined with each other.
可以理解的是,为便于描述,本发明的附图中仅示出了与本发明相关的部分,而与本发明无关的部分未在附图中示出。It can be understood that, for the convenience of description, only the parts related to the present invention are shown in the drawings of the present invention, while the parts irrelevant to the present invention are not shown in the drawings.
可以理解的是,本发明的实施例中所涉及的每个单元、模块可仅对应一个实体结构,也可由多个实体结构组成,或者,多个单元、模块也可集成为一个实体结构。It can be understood that each unit and module involved in the embodiments of the present invention may only correspond to one physical structure, or may be composed of multiple physical structures, or multiple units and modules may also be integrated into one physical structure.
可以理解的是,在不冲突的情况下,本发明的流程图和框图中所标注的功能、步骤可按照不同于附图中所标注的顺序发生。It can be understood that, under the condition of no conflict, the functions and steps marked in the flowchart and block diagram of the present invention may occur in a sequence different from that marked in the drawings.
可以理解的是,本发明的流程图和框图中,示出了按照本发明各实施例的系统、装置、设备、方法的可能实现的体系架构、功能和操作。其中,流程图或框图中的每个方框可代表一个单元、模块、程序段、代码,其包含用于实现规定的功能的可执行指令。而且,框图和流程图中的每个方框或方框的组合,可用实现规定的功能的基于硬件的系统实现,也可用硬件与计算机指令的组合来实现。It can be understood that the flowcharts and block diagrams of the present invention show the system architecture, functions and operations of possible implementations of systems, devices, devices, and methods according to various embodiments of the present invention. Wherein, each block in the flowchart or block diagram may represent a unit, module, program segment, or code, which includes executable instructions for realizing specified functions. Furthermore, each block or combination of blocks in the block diagrams and flowcharts can be implemented by a hardware-based system which performs the specified function, or by a combination of hardware and computer instructions.
可以理解的是,本发明实施例中所涉及的单元、模块可通过软件的方式实现,也可通过硬件的方式来实现,例如单元、模块可位于处理器中。It can be understood that the units and modules involved in the embodiments of the present invention may be implemented by means of software or hardware, for example, the units and modules may be located in a processor.
实施例1:Example 1:
本实施例提供一种基于命名数据网络的域名系统DNS数据同步方法,应用于第一域名节点。如图1所示,命名数据网络包括第一域名节点(实心圆)、第二域名节点(实心圆)和路由节点(空心圆),相当于所有域名节点构建成一个联盟链,各域名节点之间共享域名更新数据。第一域名节点通过路由节点与第二域名节点连接,第一域名节点与第二域名节点为不同节点,其中,第一域名节点和第二域名节点的数量均可以是一个或多个。This embodiment provides a domain name system DNS data synchronization method based on a named data network, which is applied to a first domain name node. As shown in Figure 1, the named data network includes the first domain name node (solid circle), the second domain name node (solid circle) and the routing node (hollow circle), which is equivalent to building an alliance chain with all domain name nodes. Share domain name update data among users. The first domain name node is connected to the second domain name node through a routing node, and the first domain name node and the second domain name node are different nodes, wherein the number of the first domain name node and the second domain name node can be one or more.
如图2所示,基于命名数据网络的域名系统DNS数据同步方法包括:As shown in Figure 2, the domain name system DNS data synchronization method based on the named data network includes:
步骤101,更新第一域名节点的域名并产生相应的域名更新数据包。
本实施例中,第一域名节点更新自身节点的域名信息后,针对该次域名更新动作产生相应的域名更新数据包。In this embodiment, after updating the domain name information of its own node, the first domain name node generates a corresponding domain name update data packet for the sub-domain name update action.
步骤102,通过路由节点向网络中广播第一请求以使第二域名节点根据第一请求向第一域名节点发送兴趣包,其中,第一请求包括请求类型、域名更新数据包的序列号。
本实施例中,第一域名节点通过网络中的各路由节点广播第一请求,其中,第一请求包括节点标识、请求类型、域名更新数据包的序列号,请求类型包括推送类型。各路由节点接收所述第一请求后解析请求类型,响应于请求类型为推送类型,各路由节点直接转发所述第一请求且不对待定兴趣表进行操作,直至第二域名节点接收到所述第一请求后解析其中的节点标识和域名更新数据包的序列号,向第一域名节点发起兴趣包(即对所述第一请求中序列号内容的请求),兴趣包包括域名更新数据包的序列号。In this embodiment, the first domain name node broadcasts the first request through each routing node in the network, wherein the first request includes a node identifier, a request type, and a serial number of a domain name update data packet, and the request type includes a push type. Each routing node parses the request type after receiving the first request, and in response to the request type being a push type, each routing node directly forwards the first request and does not operate on the pending interest table until the second domain name node receives the first request After a request, analyze the node identification and the sequence number of the domain name update data packet, and initiate an interest packet (that is, a request for the sequence number content in the first request) to the first domain name node. The interest packet includes the sequence of the domain name update data packet Number.
可选地,第一域名节点在通过路由节点向网络中广播第一请求之前,基于命名数据网络的域名系统DNS数据同步方法还包括:向命名数据网络中与自身相距的距离最小值对应的路由节点发送第二请求,以使路由节点根据第二请求在自身的转发信息库中增加第一域名节点相关的转发信息后,附上自身接收第二请求的接口后再向其他路由节点转发第二请求,直至得到命名数据网络的初始路由,其中,第二请求包括节点标识、活跃状态标识。Optionally, before the first domain name node broadcasts the first request to the network through the routing node, the domain name system DNS data synchronization method based on the named data network further includes: sending to the route corresponding to the minimum distance from itself in the named data network The node sends the second request, so that the routing node adds the forwarding information related to the first domain name node in its own forwarding information base according to the second request, and then forwards the second request to other routing nodes after attaching its own interface for receiving the second request. request until the initial route of the named data network is obtained, wherein the second request includes a node identifier and an active status identifier.
本实施例中,在各路由节点转发所述第一请求之前,需建立整个命名数据网络的初始化路由。为快速建立初始化路由,以保证快速实现域名更新数据的同步,各域名节点(即第一域名节点和第二域名节点)向命名数据网络中与自身相距的距离最小值对应的路由节点发送表达节点活跃状态的第二请求,路由节点接收到所述第二请求后,在本路由节点的转发信息库中增加域名节点相关的转发信息,并附上本路由节点接收第二请求接口后向其他路由节点转发所述第二请求,直至完成初始化路由。完成初始化路由指整个命名数据网络中所有路由节点的转发信息库都保存所有域名节点的转发信息,即整个命名数据网络的各节点之间都是相连的。In this embodiment, before each routing node forwards the first request, an initialization route of the entire named data network needs to be established. In order to quickly establish the initial route to ensure the rapid synchronization of domain name update data, each domain name node (ie, the first domain name node and the second domain name node) sends an expression node to the routing node corresponding to the minimum distance from itself in the naming data network For the second request in the active state, after the routing node receives the second request, it adds forwarding information related to the domain name node in the forwarding information base of the routing node, and attaches the routing node to other routing nodes after receiving the second request interface. The node forwards the second request until initialization routing is complete. Completing the initialization routing means that the forwarding information databases of all routing nodes in the entire naming data network store the forwarding information of all domain name nodes, that is, all nodes in the entire naming data network are connected.
可选地,在所述得到命名数据网络的初始路由后,基于命名数据网络的域名系统DNS数据同步方法还包括:周期性向命名数据网络中与自身相距的距离最小值对应的路由节点发送第二请求,以使路由节点响应于预设时长内未接收到第二请求,在自身的转发信息库中删除第一域名节点相关的转发信息,并将第一域名节点的节点标识和退出活跃状态标识转发给其他路由节点用于更新其他路由节点的转发信息库,以及,以使路由节点响应于预设时长内接收到第二请求,保持自身的转发信息库不变更。Optionally, after the initial route of the named data network is obtained, the method for synchronizing DNS data based on the named data network further includes: periodically sending the second Request, so that the routing node deletes the forwarding information related to the first domain name node in its own forwarding information database in response to not receiving the second request within the preset time period, and stores the node identifier and exit active status identifier of the first domain name node The forwarding to other routing nodes is used to update the forwarding information databases of other routing nodes, and to make the routing nodes keep their own forwarding information databases unchanged in response to receiving the second request within a preset time period.
本实施例中,为实时更新路由并且节约网络传输资源,各域名节点(第一域名节点和第二域名节点)周期性向距离最近的路由节点发送表达节点活跃状态的第二请求,其中,周期等于预设时长,预设时长的取值根据网络代价确定。也就是说,与域名节点距离最近的路由节点可根据预设时长内是否接收到域名节点发送的所述第二请求,判断出域名节点是否正常运行,当判断结果为域名节点正常运行,则保持本路由节点的转发信息库中的信息不变更且不转发第二请求;当判断结果为域名节点为退出状态,则在本路由节点的转发信息库中删除该域名节点相关的转发信息并将该域名节点的节点标识和退出活跃状态标识发送给其他路由节点,以使其他路由节点删除其自身的转发信息库中关于该域名节点的转发信息。相比于域名节点周期性向网络广播第二请求而言,采用与域名节点最近的路由节点判断域名节点活跃状态的方式减少了网络中的传输量,节约了网络传输资源,可避免造成网络延迟,从而提高网络传输性能。In this embodiment, in order to update routes in real time and save network transmission resources, each domain name node (the first domain name node and the second domain name node) periodically sends a second request expressing the active state of the node to the nearest routing node, wherein the period is equal to The preset duration, the value of the preset duration is determined according to the network cost. That is to say, the routing node closest to the domain name node can judge whether the domain name node is running normally according to whether it receives the second request sent by the domain name node within a preset time period. When the judgment result is that the domain name node is running normally, keep The information in the forwarding information base of this routing node does not change and does not forward the second request; when the judgment result is that the domain name node is in the exit state, delete the forwarding information related to the domain name node in the forwarding information base of this routing node and send the The node identifier and the exit active state identifier of the domain name node are sent to other routing nodes, so that other routing nodes delete the forwarding information about the domain name node in their own forwarding information database. Compared with the domain name node periodically broadcasting the second request to the network, using the routing node closest to the domain name node to determine the active status of the domain name node reduces the transmission volume in the network, saves network transmission resources, and avoids network delays. Thereby improving network transmission performance.
步骤103,接收所述兴趣包,并通过路由节点向第二域名节点返回所述兴趣包对应的域名更新数据包,以及通过目标路由节点缓存所述域名更新数据包,以便其他第二域名节点获取所述域名更新数据包完成数据同步。Step 103: Receive the interest packet, return the domain name update data packet corresponding to the interest packet to the second domain name node through the routing node, and cache the domain name update data packet through the target routing node, so that other second domain name nodes can obtain The domain name update data packet completes data synchronization.
本实施例中,当第一域名节点A更新域名且广播第一请求后,根据所接收的兴趣包的传输路径通过路由节点分别向第二域名节点B、第二域名节点C返回各兴趣包对应的域名更新数据包,由于命名数据网络的路由节点在转发数据包的同时具有缓存所转发数据包的情况,即命名数据网络在请求路径上的每一个路由节点都进行转发数据的缓存,会造成缓存冗余。为了减少传输网络中的冗余流量和冗余缓存,通过选择出一定数量的目标路由节点缓存所转发的域名更新数据包,而非所有转发的路由节点均缓存相同的域名更新数据包。当路由节点在收到其他第二域名节点的兴趣包后,路由节点先查询自身的内容存储是否缓存了所述兴趣包对应的域名更新数据包,若查询结果为是,则根据转发信息库返回所缓存的所述兴趣包对应的域名更新数据包,若查询结果为否,则查找待定兴趣表,若待定兴趣表已有相应条目则记录收到所述兴趣包的接口而不转发,若否,则根据转发信息库转发所述兴趣包并增加相应的待定兴趣表条目。In this embodiment, after the first domain name node A updates the domain name and broadcasts the first request, according to the transmission path of the received interest packet, the routing node returns the correspondence of each interest packet to the second domain name node B and the second domain name node C respectively. domain name update packet, because the routing node of the naming data network caches the forwarded data packet while forwarding the data packet, that is, each routing node on the request path of the naming data network caches the forwarding data, which will cause Cache redundancy. In order to reduce redundant traffic and redundant cache in the transmission network, a certain number of target routing nodes are selected to cache forwarded domain name update data packets, instead of all forwarded routing nodes cache the same domain name update data packets. When the routing node receives the interest packets of other second domain name nodes, the routing node first inquires whether its own content storage has cached the domain name update data packet corresponding to the interest packet, and if the query result is yes, it returns according to the forwarding information base The domain name update data packet corresponding to the cached interest packet, if the query result is no, then look up the pending interest table, if there is a corresponding entry in the pending interest table, record the interface that received the interest packet and not forward it, if not , forward the Interest packet according to the forwarding information base and add a corresponding pending Interest table entry.
可选地,目标路由节点指根据路由节点的剩余缓存能力和重要程度选择得到。Optionally, the target routing node is selected according to the remaining cache capacity and importance of the routing node.
本实施例中,为避免部分路由节点满负荷缓存,导致路由节点性能下降,造成网络拥塞,且为避免路由节点缓存能力的冗余浪费,基于路由节点的剩余缓存能力和重要程度(即经过路由节点的路径和整个网络的路径的比值)选择目标路由节点。In this embodiment, in order to avoid the full-load cache of some routing nodes, resulting in the performance degradation of routing nodes, causing network congestion, and in order to avoid redundant waste of routing node caching capabilities, based on the remaining caching capabilities and importance of routing nodes (i.e. The ratio of the path of the node to the path of the entire network) to select the target routing node.
可选地,根据路由节点的剩余缓存能力和重要程度选择得到目标路由节点,具体包括:根据以下公式计算路由节点的评分值:Optionally, the target routing node is selected according to the remaining caching capacity and importance of the routing node, specifically including: calculating the scoring value of the routing node according to the following formula:
其中,PX为路由节点X的评分值,RX为路由节点X的剩余缓存能力,n为路由节点的总数量,为所有路由节点的剩余缓存能力之和,S为该次数据传输所需的路径总数,SX为S经过路由节点X的路径数,根据评分值进行降序排列得到所有路由节点的降序结果;根据以下公式从降序结果中选择出排序靠前的目标路由节点:Among them, P X is the scoring value of routing node X, R X is the remaining cache capacity of routing node X, n is the total number of routing nodes, is the sum of the remaining caching capabilities of all routing nodes, S is the total number of paths required for this data transmission, S X is the number of paths that S passes through routing node X, and the descending order results of all routing nodes are obtained by ranking according to the scoring value; according to The following formula selects the top-ranked destination routing nodes from the descending results:
M=n*预设比例M=n*preset ratio
其中,M为目标路由节点的数量,预设比例大于0且小于1。Wherein, M is the number of target routing nodes, and the preset ratio is greater than 0 and less than 1.
本实施例中,预设比例的取值如8%、10%、15%。为进一步减少传输网络中的冗余流量和冗余缓存,在根据评分值降序排列的所有路由节点中,选择评分值大于预设阈值的部分路由节点作为目标路由节点缓存域名更新数据包,即通过进一步减少目标路由节点的数量以提高网络性能。需要说明的是,本实施例中的剩余缓存能力为实时的剩余缓存能力,故本实施例是根据实时的网络状态确定的目标路由节点,不仅能提高整个网络的缓存利用率,还可以降低网络延迟。In this embodiment, the value of the preset ratio is, for example, 8%, 10%, or 15%. In order to further reduce redundant traffic and redundant cache in the transmission network, among all the routing nodes arranged in descending order according to the score value, some routing nodes whose score value is greater than the preset threshold are selected as target routing nodes to cache domain name update packets, that is, through Further reduce the number of destination routing nodes to improve network performance. It should be noted that the remaining cache capacity in this embodiment is the real-time remaining cache capacity, so this embodiment determines the target routing node according to the real-time network status, which can not only improve the cache utilization rate of the entire network, but also reduce the network Delay.
本实施例提供的基于命名数据网络的域名系统DNS数据同步方法,通过将各区域的根域名服务器(即各域名节点)组成联盟链,其中,各域名节点分别可以产生域名更新数据,当其中某个域名节点产生域名更新数据后,则基于命名数据网络架构进行其他域名节点的域名更新数据的同步,从而避免中心化域名解析体系存在因根节点发生故障而影响互联网正常运转的问题。若基于TCP(Transmission Control Protocol,传输控制协议)网络架构进行域名更新数据的同步,由于TCP网络中的不同节点对同一数据更新的请求是相互独立的,该方式将导致网络中存在大量的冗余流量。由于命名数据网络的路由节点缓存域名更新数据包,使得整个网络中的第二域名节点能快速完成域名更新数据的同步。其次,采用与域名节点最近的路由节点用于周期性判断域名节点活跃状态的方式减少了网络中的传输量,节约了网络传输资源,可避免造成网络延迟,从而提高网络传输性能。进一步地,为了减少传输网络中的冗余流量和冗余缓存,通过选择出一定数量的目标路由节点缓存所转发的域名更新数据包,而非所有转发的路由节点均缓存相同的域名更新数据包。此外,为进一步减少传输网络中的冗余流量和冗余缓存,在根据评分值降序排列的所有路由节点中,选择评分值大于预设阈值的部分路由节点作为目标路由节点缓存域名更新数据包,即通过进一步减少目标路由节点的数量以提高网络性能。剩余缓存能力为实时的剩余缓存能力,不仅能提高整个网络的缓存利用率,还可以降低网络延迟。The domain name system DNS data synchronization method based on the naming data network provided in this embodiment, forms the alliance chain by forming the root domain name servers (that is, each domain name node) in each area, wherein each domain name node can generate domain name update data respectively, when one of them After a domain name node generates domain name update data, it synchronizes the domain name update data of other domain name nodes based on the naming data network architecture, so as to avoid the problem of affecting the normal operation of the Internet due to failure of the root node in the centralized domain name resolution system. If the domain name update data is synchronized based on the TCP (Transmission Control Protocol, Transmission Control Protocol) network architecture, since different nodes in the TCP network have independent requests for the same data update, this method will lead to a large amount of redundancy in the network flow. Since the routing nodes of the naming data network cache the domain name update data packets, the second domain name nodes in the entire network can quickly complete the synchronization of the domain name update data. Secondly, using the routing node closest to the domain name node to periodically determine the active status of the domain name node reduces the transmission volume in the network, saves network transmission resources, avoids network delays, and improves network transmission performance. Further, in order to reduce redundant traffic and redundant cache in the transmission network, a certain number of target routing nodes are selected to cache the forwarded domain name update packets, and not all forwarded routing nodes cache the same domain name update packets . In addition, in order to further reduce redundant traffic and redundant cache in the transmission network, among all the routing nodes arranged in descending order according to the score value, some routing nodes whose score value is greater than the preset threshold are selected as target routing nodes to cache domain name update packets, That is to improve network performance by further reducing the number of target routing nodes. The remaining cache capacity is the real-time remaining cache capacity, which can not only improve the cache utilization rate of the entire network, but also reduce network delay.
实施例2:Example 2:
如图2所示,本实施例提供一种基于命名数据网络的域名系统DNS数据同步方法,应用于路由节点,命名数据网络包括第一域名节点、第二域名节点和路由节点,所述方法包括:As shown in Figure 2, this embodiment provides a method for synchronizing DNS data in a domain name system based on a named data network, which is applied to routing nodes. The named data network includes a first domain name node, a second domain name node, and a routing node. The method includes :
步骤201,接收第一域名节点广播的第一请求并解析所述第一请求中的请求类型,其中,第一请求包括请求类型、域名更新数据包的序列号,请求类型包括推送类型。其中,域名更新数据包的序列号用于标识第一域名节点更新域名后产生的相应的域名更新数据包。Step 201, receiving the first request broadcast by the first domain name node and analyzing the request type in the first request, wherein the first request includes the request type and the sequence number of the domain name update data packet, and the request type includes the push type. Wherein, the serial number of the domain name update data packet is used to identify the corresponding domain name update data packet generated after the first domain name node updates the domain name.
步骤202,响应于请求类型为推送类型,向下一跳路由节点转发所述第一请求,以使第二域名节点根据所述第一请求向第一域名节点发送兴趣包。并向第一域名节点转发所述兴趣包,其中,兴趣包包括域名更新数据包的序列号。Step 202: In response to the request type being a push type, forward the first request to the next-hop routing node, so that the second domain name node sends an Interest packet to the first domain name node according to the first request. And forwarding the interest packet to the first domain name node, where the interest packet includes the sequence number of the domain name update data packet.
步骤203,转发第一域名节点返回的所述兴趣包对应的域名更新数据包,并由目标路由节点缓存所述域名更新数据包,以便其他第二域名节点获取所述域名更新数据包完成数据同步。Step 203, forward the domain name update data packet corresponding to the Interest packet returned by the first domain name node, and cache the domain name update data packet by the target routing node, so that other second domain name nodes can obtain the domain name update data packet to complete data synchronization .
可选地,所述目标路由节点指根据路由节点的剩余缓存能力和重要程度选择得到,具体包括:根据以下公式计算路由节点的评分值:Optionally, the target routing node is selected according to the remaining cache capacity and importance of the routing node, specifically including: calculating the scoring value of the routing node according to the following formula:
其中,PX为路由节点X的评分值,RX为路由节点X的剩余缓存能力,n为路由节点的总数量,为所有路由节点的剩余缓存能力之和,S为该次数据传输所需的路径总数,SX为S经过路由节点X的路径数,根据评分值进行降序排列得到所有路由节点的降序结果;根据以下公式从降序结果中选择出排序靠前的目标路由节点:Among them, P X is the scoring value of routing node X, R X is the remaining cache capacity of routing node X, n is the total number of routing nodes, is the sum of the remaining caching capabilities of all routing nodes, S is the total number of paths required for this data transmission, S X is the number of paths that S passes through routing node X, and the descending order results of all routing nodes are obtained by ranking according to the scoring value; according to The following formula selects the top-ranked destination routing nodes from the descending results:
M=n*预设比例M=n*preset ratio
其中,M为目标路由节点的数量,预设比例大于0且小于1。Wherein, M is the number of target routing nodes, and the preset ratio is greater than 0 and less than 1.
可选地,在所述接收第一域名节点广播的第一请求之前,所述方法还包括:Optionally, before receiving the first request broadcast by the first domain name node, the method further includes:
接收命名数据网络中与自身相距的距离最小值对应的第一域名节点发送的第二请求;receiving the second request sent by the first domain name node corresponding to the minimum distance from itself in the named data network;
根据第二请求在自身的转发信息库中增加第一域名节点相关的转发信息后,附上自身接收第二请求的接口后再向其他路由节点转发所述第二请求,直至得到命名数据网络的初始路由,其中,第二请求包括节点标识、活跃状态标识。活跃状态标识用于标识第一域名节点正常运行。After adding the forwarding information related to the first domain name node in its own forwarding information base according to the second request, attaching its own interface for receiving the second request, and then forwarding the second request to other routing nodes until the name data network is obtained The initial routing, wherein, the second request includes a node identifier and an active status identifier. The active status identifier is used to identify the normal operation of the first domain name node.
可选地,在得到命名数据网络的初始路由之后,所述方法还包括:Optionally, after obtaining the initial route of the named data network, the method further includes:
周期性接收命名数据网络中与自身相距的距离最小值对应的第一域名节点发送的所述第二请求;periodically receiving the second request sent by the first domain name node corresponding to the minimum distance distance from itself in the naming data network;
响应于预设时长内未接收到第二请求,在自身的转发信息库中删除第一域名节点相关的转发信息,并将第一域名节点的节点标识和退出活跃状态标识转发给其他路由节点用于其他路由节点更新各自的转发信息库;In response to not receiving the second request within the preset period of time, delete the forwarding information related to the first domain name node in its own forwarding information database, and forward the node identifier and exit active status identifier of the first domain name node to other routing nodes for use. Update their respective forwarding information bases on other routing nodes;
响应于预设时长内接收到第二请求,保持自身的转发信息库不变更。In response to receiving the second request within a preset time period, keep its own forwarding information base unchanged.
可选地,在所述由目标路由节点缓存所述域名更新数据包之后,所述方法还包括:Optionally, after the domain name update packet is cached by the target routing node, the method further includes:
接收其他第二域名节点发送的兴趣包;Receive interest packets sent by other second domain name nodes;
查询自身的内容存储是否缓存了所述兴趣包对应的域名更新数据包,Query whether its own content storage has cached the domain name update data packet corresponding to the interest packet,
若查询结果为是,则根据转发信息库返回所缓存的所述兴趣包对应的域名更新数据包,If the query result is yes, return the domain name update data packet corresponding to the cached interest packet according to the forwarding information base,
若查询结果为否,则查找待定兴趣表,若待定兴趣表已有相应条目则记录收到所述兴趣包的接口而不转发,若否,则根据转发信息库转发所述兴趣包并增加相应的待定兴趣表条目。If the query result is no, then search the pending interest table, if there is a corresponding entry in the pending interest table, record the interface that received the interest packet and not forward it, if not, forward the interest packet according to the forwarding information base and add the corresponding Pending Interest Form entries for .
实施例3:Example 3:
如图3所示,本实施例提供一种基于命名数据网络的域名系统DNS数据同步装置,命名数据网络包括第一域名节点、第二域名节点和路由节点,所述装置包括更新模块31、广播模块32和同步模块33。As shown in Fig. 3, the present embodiment provides a kind of domain name system DNS data synchronizing device based on naming data network, and naming data network comprises first domain name node, second domain name node and routing node, and described device comprises
更新模块31,用于更新第一域名节点的域名并产生相应的域名更新数据包。The
广播模块32,与更新模块31连接,用于通过路由节点向网络中广播第一请求以使第二域名节点根据第一请求向第一域名节点发送兴趣包,其中,第一请求包括请求类型、域名更新数据包的序列号。The
同步模块33,与更新模块31连接,用于接收兴趣包并通过路由节点向第二域名节点返回所述域名更新数据包,以及,通过目标路由节点缓存所述域名更新数据包,以便其他第二域名节点获取所述域名更新数据包完成数据同步。
可选地,同步模块还包括选择单元。Optionally, the synchronization module further includes a selection unit.
选择单元,用于根据路由节点的剩余缓存能力和重要程度选择得到目标路由节点。The selection unit is configured to select and obtain a target routing node according to the remaining cache capacity and importance of the routing node.
选择单元具体用于根据以下公式计算路由节点的评分值:The selection unit is specifically used to calculate the scoring value of the routing node according to the following formula:
其中,PX为路由节点X的评分值,RX为路由节点X的剩余缓存能力,n为路由节点的总数量,为所有路由节点的剩余缓存能力之和,S为该次数据传输所需的路径总数,SX为S经过路由节点X的路径数,还用于根据评分值进行降序排列得到所有路由节点的降序结果,并根据以下公式从降序结果中选择出排序靠前的目标路由节点:Among them, P X is the scoring value of routing node X, R X is the remaining cache capacity of routing node X, n is the total number of routing nodes, is the sum of the remaining caching capabilities of all routing nodes, S is the total number of paths required for this data transmission, and S X is the number of paths that S passes through routing node X, and is also used to sort in descending order according to the score value to obtain the descending order of all routing nodes results, and select the top-ranked target routing nodes from the descending results according to the following formula:
M=n*预设比例M=n*preset ratio
其中,M为目标路由节点的数量,预设比例大于0且小于1。Wherein, M is the number of target routing nodes, and the preset ratio is greater than 0 and less than 1.
可选地,所述装置还包括第一发送模块。Optionally, the device further includes a first sending module.
第一发送模块,用于向命名数据网络中与自身相距的距离最小值对应的路由节点发送第二请求,以使路由节点根据第二请求在自身的转发信息库中增加第一域名节点相关的转发信息后,附上自身接收第二请求的接口后再向其他路由节点转发第二请求,直至得到命名数据网络的初始路由,其中,第二请求包括节点标识、活跃状态标识。The first sending module is configured to send a second request to the routing node corresponding to the minimum distance distance from itself in the named data network, so that the routing node adds information related to the first domain name node in its own forwarding information base according to the second request. After forwarding the information, it attaches its own interface for receiving the second request and then forwards the second request to other routing nodes until the initial route of the named data network is obtained, wherein the second request includes the node identifier and the active status identifier.
可选地,所述装置还包括第二发送模块。Optionally, the device further includes a second sending module.
第二发送模块,与第一发送模块连接,用于周期性向命名数据网络中与自身相距的距离最小值对应的路由节点发送第二请求,以使路由节点响应于预设时长内未接收到第二请求,在自身的转发信息库中删除第一域名节点相关的转发信息,并将第一域名节点的节点标识和退出活跃状态标识转发给其他路由节点用于更新其他路由节点的转发信息库,以及,以使路由节点响应于预设时长内接收到第二请求,保持自身的转发信息库不变更。The second sending module, connected with the first sending module, is used to periodically send the second request to the routing node corresponding to the minimum distance from itself in the named data network, so that the routing node responds to the failure to receive the second request within the preset time period The second request is to delete the forwarding information related to the first domain name node in its own forwarding information database, and forward the node identifier and exit active status identifier of the first domain name node to other routing nodes for updating the forwarding information database of other routing nodes, And, in response to receiving the second request within a preset time period, the routing node keeps its own forwarding information base unchanged.
实施例4:Example 4:
如图4所示,本实施提供一种基于命名数据网络的域名系统DNS数据同步装置,命名数据网络包括第一域名节点、第二域名节点和路由节点,所述装置包括解析模块41、第一转发模块42和第二转发模块43。As shown in Figure 4, the present implementation provides a domain name system DNS data synchronization device based on a naming data network, the naming data network includes a first domain name node, a second domain name node and a routing node, and the device includes a
解析模块41,用于接收第一域名节点广播的第一请求并解析所述第一请求中的请求类型,其中,第一请求包括请求类型、域名更新数据包的序列号,请求类型包括推送类型。The
第一转发模块42,与解析模块41连接,用于响应于请求类型为推送类型,向下一跳路由节点转发所述第一请求,以使第二域名节点根据所述第一请求向第一域名节点发送兴趣包。The
第二转发模块43,与解析模块41连接,用于转发第一域名节点返回的所述兴趣包对应的域名更新数据包,并由目标路由节点缓存所述域名更新数据包,以便其他第二域名节点获取所述域名更新数据包完成数据同步。The
可选地,第二转发模块还包括筛选单元。筛选单元,用于根据路由节点的剩余缓存能力和重要程度选择得到目标路由节点。筛选单元具体用于根据以下公式计算路由节点的评分值:Optionally, the second forwarding module further includes a screening unit. The screening unit is used to select and obtain a target routing node according to the remaining cache capacity and importance of the routing node. The screening unit is specifically used to calculate the scoring value of the routing node according to the following formula:
其中,PX为路由节点X的评分值,RX为路由节点X的剩余缓存能力,n为路由节点的总数量,为所有路由节点的剩余缓存能力之和,S为该次数据传输所需的路径总数,SX为S经过路由节点X的路径数,根据评分值进行降序排列得到所有路由节点的降序结果;根据以下公式从降序结果中选择出排序靠前的目标路由节点:Among them, P X is the scoring value of routing node X, R X is the remaining cache capacity of routing node X, n is the total number of routing nodes, is the sum of the remaining caching capabilities of all routing nodes, S is the total number of paths required for this data transmission, S X is the number of paths that S passes through routing node X, and the descending order results of all routing nodes are obtained by ranking according to the scoring value; according to The following formula selects the top-ranked destination routing nodes from the descending results:
M=n*预设比例M=n*preset ratio
其中,M为目标路由节点的数量,预设比例大于0且小于1。Wherein, M is the number of target routing nodes, and the preset ratio is greater than 0 and less than 1.
可选地,所述装置还包括第一接收模块。Optionally, the device further includes a first receiving module.
第一接收模块,用于接收命名数据网络中与自身相距的距离最小值对应的第一域名节点发送的第二请求;还用于根据第二请求在自身的转发信息库中增加第一域名节点相关的转发信息后,附上自身接收第二请求的接口后再向其他路由节点转发所述第二请求,直至得到命名数据网络的初始路由,其中,第二请求包括节点标识、活跃状态标识。活跃状态标识用于标识第一域名节点正常运行。The first receiving module is used to receive the second request sent by the first domain name node corresponding to the minimum distance from itself in the named data network; it is also used to add the first domain name node in its own forwarding information base according to the second request After the relevant forwarding information is attached, the interface for receiving the second request is attached, and then the second request is forwarded to other routing nodes until the initial route of the named data network is obtained, wherein the second request includes a node identifier and an active status identifier. The active status identifier is used to identify the normal operation of the first domain name node.
可选地,所述装置还包括第二接收模块。Optionally, the device further includes a second receiving module.
第二接收模块,与第一接收模块连接,用于周期性接收命名数据网络中与自身相距的距离最小值对应的第一域名节点发送的所述第二请求;以及,响应于预设时长内未接收到第二请求,在自身的转发信息库中删除第一域名节点相关的转发信息,并将第一域名节点的节点标识和退出活跃状态标识转发给其他路由节点用于其他路由节点更新各自的转发信息库;以及,响应于预设时长内接收到第二请求,保持自身的转发信息库不变更。The second receiving module, connected to the first receiving module, is used to periodically receive the second request sent by the first domain name node corresponding to the minimum distance from itself in the named data network; and, in response to the preset time period Not receiving the second request, delete the forwarding information related to the first domain name node in its own forwarding information database, and forward the node ID and exit active status ID of the first domain name node to other routing nodes for other routing nodes to update their respective and, in response to receiving the second request within a preset time period, keeping its own forwarding information base unchanged.
可选地,所述装置还包括处理模块。Optionally, the device further includes a processing module.
处理模块,用于接收其他第二域名节点发送的兴趣包;还用于查询自身的内容存储是否缓存了所述兴趣包对应的域名更新数据包,若查询结果为是,则根据转发信息库返回所缓存的所述兴趣包对应的域名更新数据包,若查询结果为否,则查找待定兴趣表,若待定兴趣表已有相应条目则记录收到所述兴趣包的接口而不转发,若否,则根据转发信息库转发所述兴趣包并增加相应的待定兴趣表条目。The processing module is used to receive the interest packets sent by other second domain name nodes; it is also used to query whether the content storage of itself has cached the domain name update data packets corresponding to the interest packets, and if the query result is yes, return according to the forwarding information base The domain name update data packet corresponding to the cached interest packet, if the query result is no, then look up the pending interest table, if there is a corresponding entry in the pending interest table, record the interface that received the interest packet and not forward it, if not , forward the Interest packet according to the forwarding information base and add a corresponding pending Interest table entry.
实施例5:Example 5:
本实施例提供一种基于命名数据网络的域名系统DNS,包括第一域名节点、第二域名节点和路由节点,其中,第一域名节点通过路由节点与第二域名节点连接。This embodiment provides a domain name system DNS based on a named data network, including a first domain name node, a second domain name node and a routing node, wherein the first domain name node is connected to the second domain name node through the routing node.
第一域名节点,用于更新第一域名节点的域名并产生相应的域名更新数据包。The first domain name node is configured to update the domain name of the first domain name node and generate a corresponding domain name update data packet.
还用于通过路由节点向网络中广播第一请求以使第二域名节点根据第一请求向第一域名节点发送兴趣包,其中,第一请求包括请求类型、域名更新数据包的序列号,以及,用于接收所述兴趣包,并通过路由节点向第二域名节点返回所述兴趣包对应的域名更新数据包。It is also used to broadcast the first request to the network through the routing node so that the second domain name node sends an interest packet to the first domain name node according to the first request, wherein the first request includes the request type, the serial number of the domain name update data packet, and , configured to receive the Interest packet, and return the domain name update data packet corresponding to the Interest packet to the second domain name node through the routing node.
路由节点,用于接收第一域名节点广播的第一请求并解析所述第一请求中的请求类型,响应于请求类型为推送类型,向下一跳路由节点转发所述第一请求,以使第二域名节点根据所述第一请求向第一域名节点发送兴趣包,以及,用于转发第一域名节点返回的所述兴趣包对应的域名更新数据包,并由目标路由节点缓存所述域名更新数据包,以便其他第二域名节点获取所述域名更新数据包完成数据同步。The routing node is configured to receive the first request broadcast by the first domain name node and parse the request type in the first request, and forward the first request to the next-hop routing node in response to the request type being a push type, so that The second domain name node sends an interest packet to the first domain name node according to the first request, and is used to forward the domain name update data packet corresponding to the interest packet returned by the first domain name node, and cache the domain name by the target routing node The update data packet, so that other second domain name nodes obtain the domain name update data packet to complete data synchronization.
可选地,第一域名节点还包括实施例3中所述的基于命名数据网络的域名系统DNS数据同步装置。Optionally, the first domain name node further includes the device for synchronizing DNS data of the domain name system based on the naming data network described in Embodiment 3.
可选地,路由节点还包括实施例4中所述的基于命名数据网络的域名系统DNS数据同步装置。Optionally, the routing node further includes the DNS data synchronization device based on the named data network described in Embodiment 4.
实施例2提供的基于命名数据网络的域名系统DNS数据同步方法,实施例3和实施例4提供的数据同步装置,实施例5提供的DNS,均是通过将各区域的根域名服务器(即各域名节点)组成联盟链,其中,各域名节点分别可以产生域名更新数据,当其中某个域名节点产生域名更新数据后,则基于命名数据网络架构进行其他域名节点的域名更新数据的同步,从而避免中心化域名解析体系存在因根节点发生故障而影响互联网正常运转的问题。由于命名数据网络的路由节点缓存域名更新数据包,使得整个网络中的第二域名节点能快速完成域名更新数据的同步。其次,采用与域名节点最近的路由节点用于周期性判断域名节点活跃状态的方式减少了网络中的传输量,节约了网络传输资源,可避免造成网络延迟,从而提高网络传输性能。进一步地,为了减少传输网络中的冗余流量和冗余缓存,通过选择出一定数量的目标路由节点缓存所转发的域名更新数据包,而非所有转发的路由节点均缓存相同的域名更新数据包。剩余缓存能力为实时的剩余缓存能力,不仅能提高整个网络的缓存利用率,还可以降低网络延迟。The domain name system DNS data synchronization method based on the named data network provided by embodiment 2, the data synchronization device provided by embodiment 3 and embodiment 4, and the DNS provided by embodiment 5 are all obtained by connecting the root domain name servers of each area (that is, each domain name node) to form an alliance chain, in which each domain name node can generate domain name update data respectively. When one of the domain name nodes generates domain name update data, it will synchronize the domain name update data of other domain name nodes based on the naming data network architecture, thereby avoiding The centralized domain name resolution system has the problem of affecting the normal operation of the Internet due to the failure of the root node. Since the routing nodes of the naming data network cache the domain name update data packets, the second domain name nodes in the entire network can quickly complete the synchronization of the domain name update data. Secondly, using the routing node closest to the domain name node to periodically determine the active status of the domain name node reduces the transmission volume in the network, saves network transmission resources, avoids network delays, and improves network transmission performance. Further, in order to reduce redundant traffic and redundant cache in the transmission network, a certain number of target routing nodes are selected to cache the forwarded domain name update packets, and not all forwarded routing nodes cache the same domain name update packets . The remaining cache capacity is the real-time remaining cache capacity, which can not only improve the cache utilization rate of the entire network, but also reduce network delay.
可以理解的是,以上实施方式仅仅是为了说明本发明的原理而采用的示例性实施方式,然而本发明并不局限于此。对于本领域内的普通技术人员而言,在不脱离本发明的精神和实质的情况下,可以做出各种变型和改进,这些变型和改进也视为本发明的保护范围。It can be understood that, the above embodiments are only exemplary embodiments adopted for illustrating the principle of the present invention, but the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also regarded as the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210973135.0A CN115250265B (en) | 2022-08-15 | 2022-08-15 | Domain Name System (DNS) data synchronization method and device and domain name system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210973135.0A CN115250265B (en) | 2022-08-15 | 2022-08-15 | Domain Name System (DNS) data synchronization method and device and domain name system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115250265A CN115250265A (en) | 2022-10-28 |
CN115250265B true CN115250265B (en) | 2023-05-16 |
Family
ID=83699238
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210973135.0A Active CN115250265B (en) | 2022-08-15 | 2022-08-15 | Domain Name System (DNS) data synchronization method and device and domain name system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115250265B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119652812B (en) * | 2024-12-09 | 2025-09-23 | 中国人民解放军国防科技大学 | Data transmission method, system, equipment and storage medium of named data network |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104753797A (en) * | 2015-04-09 | 2015-07-01 | 清华大学深圳研究生院 | Content center network dynamic routing method based on selective caching |
CN106612339A (en) * | 2015-10-27 | 2017-05-03 | 中国电信股份有限公司 | Domain name updating method, system and main DNS (Domain Name System) server |
CN108063839A (en) * | 2017-12-29 | 2018-05-22 | 深圳市九洲电器有限公司 | A kind of method for accessing network and the device for accessing network |
CN109981460A (en) * | 2019-03-19 | 2019-07-05 | 北京邮电大学 | A kind of service-oriented converged network, calculating, storage integral method and device |
CN111464667A (en) * | 2020-03-20 | 2020-07-28 | 北京信息科技大学 | Method and system for realizing named data network communication based on IP network |
CN114793223A (en) * | 2021-01-26 | 2022-07-26 | 北京奇虎科技有限公司 | DNS record storage method, device, storage medium and electronic device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9992281B2 (en) * | 2014-05-01 | 2018-06-05 | Cisco Technology, Inc. | Accountable content stores for information centric networks |
-
2022
- 2022-08-15 CN CN202210973135.0A patent/CN115250265B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104753797A (en) * | 2015-04-09 | 2015-07-01 | 清华大学深圳研究生院 | Content center network dynamic routing method based on selective caching |
CN106612339A (en) * | 2015-10-27 | 2017-05-03 | 中国电信股份有限公司 | Domain name updating method, system and main DNS (Domain Name System) server |
CN108063839A (en) * | 2017-12-29 | 2018-05-22 | 深圳市九洲电器有限公司 | A kind of method for accessing network and the device for accessing network |
CN109981460A (en) * | 2019-03-19 | 2019-07-05 | 北京邮电大学 | A kind of service-oriented converged network, calculating, storage integral method and device |
CN111464667A (en) * | 2020-03-20 | 2020-07-28 | 北京信息科技大学 | Method and system for realizing named data network communication based on IP network |
CN114793223A (en) * | 2021-01-26 | 2022-07-26 | 北京奇虎科技有限公司 | DNS record storage method, device, storage medium and electronic device |
Non-Patent Citations (2)
Title |
---|
"命名数据网络中缓存优化技术研究";魏依舜;《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》;全文 * |
Junyu Lai ; Chengkang Li ; Zhongwei Chen ; Yingbing Sun ; Han Xiao."A Novel Content Popularity and Distance based Interval Caching Strategy for Named Data Mobile Ad-hoc Network (NDMANET)".《2019 IEEE 2nd International Conference on Computer and Communication Engineering Technology (CCET)》.2020,全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN115250265A (en) | 2022-10-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Ioannou et al. | A survey of caching policies and forwarding mechanisms in information-centric networking | |
US9847930B2 (en) | System and method for directing clients to optimal servers in computer networks | |
US20130041982A1 (en) | Method and node for acquiring content and content network | |
Marandi et al. | BFR: a bloom filter-based routing approach for information-centric networks | |
US8732298B2 (en) | Method and apparatus for maintaining routing information | |
US8539041B2 (en) | Method, apparatus, and network system for acquiring content | |
Ariefianto et al. | Routing in NDN network: A survey and future perspectives | |
CN101932065B (en) | Method for discovering distributed satellite network resources | |
CN104022911A (en) | Content route managing method of fusion type content distribution network | |
CN100534059C (en) | A Method for Optimizing Routing in Tree Topology Overlay Networks | |
CN103179161B (en) | A kind of content acquisition method, device and network system | |
CN115250265B (en) | Domain Name System (DNS) data synchronization method and device and domain name system | |
Reshadinezhad et al. | An efficient adaptive cache management scheme for named data networks | |
WO2025113567A1 (en) | Sdwan-based cross-border transmission optimization method | |
Chaudhary et al. | eNCache: Improving content delivery with cooperative caching in Named Data Networking | |
WO2003023639A1 (en) | System and method for directing clients to optimal servers in computer networks | |
Mahananda et al. | Performance of homogeneous and heterogeneous cache policy for named data network | |
Kerrouche et al. | AC-QoS-FS: Ant colony based QoS-aware forwarding strategy for routing in Named Data Networking | |
Kumari et al. | An efficient content retrieval and content placement approach for named data networks | |
WO2024140698A1 (en) | Session processing method, system and apparatus, and storage medium | |
CN106970965A (en) | A kind of Novel Internet resource search method | |
CN108337173B (en) | Distributed name address mapping system and method based on local cache and structured P2P | |
Ma et al. | DINNRS: A Distributed In-Network Name Resolution System for information-centric networks | |
CN108449387A (en) | Content node in content distribution network and content distribution method | |
Zhang et al. | Reverse-trace routing scheme in content centric networking |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |