CN114629956B - Method and blockchain network for enabling edge computing network acceleration - Google Patents
Method and blockchain network for enabling edge computing network acceleration Download PDFInfo
- Publication number
- CN114629956B CN114629956B CN202111422239.4A CN202111422239A CN114629956B CN 114629956 B CN114629956 B CN 114629956B CN 202111422239 A CN202111422239 A CN 202111422239A CN 114629956 B CN114629956 B CN 114629956B
- Authority
- CN
- China
- Prior art keywords
- website
- content
- router
- router node
- blockchain network
- 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
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及网络技术,特别涉及用于实现边缘计算网络加速的方法、区块链网络和计算机可读存储介质。The present application relates to network technology, and in particular to a method for implementing edge computing network acceleration, a blockchain network, and a computer-readable storage medium.
背景技术Background technique
5G网络的普及对数据中心的网络带宽需求量激增,为了缓解带宽压力以及提升使用者的体验,企业往往选择内容分发网络(CDN)来加速数据的传送。The popularization of 5G networks has led to a surge in demand for network bandwidth in data centers. In order to alleviate bandwidth pressure and improve user experience, companies often choose content distribution networks (CDNs) to accelerate data transmission.
内容分发网络通过在现有的互联网中增加一层新的网络架构,将网站的内容发布到最接近用户的网络“边缘”,使用户可以就近取得所需的内容,提高用户访问网站的响应速度。CDN服务提供商通常通过租赁数据中心来部署服务器和承载CDN应用需求。Content distribution network adds a new network architecture to the existing Internet, publishes the content of the website to the "edge" of the network closest to the user, so that the user can get the required content nearby, and improve the response speed of user access to the website. CDN service providers usually deploy servers and carry CDN application needs by leasing data centers.
CDN可以明显提高Internet网络中信息流动的效率,全面解决网络带宽小、用户访问量大和网点分布不均等问题,提高用户访问网站的响应速度。然而CDN也存在诸多缺点,例如服务成本较高,网站易受CDN网络架构异常的影响而宕机,因为过分依赖于本地CDN节点数据而无法按需弹性伸缩,以及计价不够透明和计费无法追溯。CDN can significantly improve the efficiency of information flow in the Internet network, comprehensively solve the problems of small network bandwidth, large user visits and uneven distribution of network points, and improve the response speed of users visiting websites. However, CDN also has many disadvantages, such as high service costs, websites are easily affected by CDN network architecture anomalies and downtime, because of excessive reliance on local CDN node data and cannot be elastically scaled on demand, and pricing is not transparent and billing cannot be traced.
发明内容Summary of the invention
按照本申请一个方面的用于实现边缘计算网络加速的方法包含下列步骤:The method for implementing edge computing network acceleration according to one aspect of the present application comprises the following steps:
A、构建包含路由器作为节点的区块链网络;A. Build a blockchain network with routers as nodes;
B、当经由其中一个路由器节点访问网站内容时,在该路由器节点处同步缓存相应的网站内容;B. When the website content is accessed via one of the router nodes, the corresponding website content is synchronously cached at the router node;
C、自动为缓存的网站内容分配相关联的访问数据;以及C. Automatically assign associated access data to cached website content; and
D、将所述访问数据添加到所述区块链网络中。D. Adding the access data to the blockchain network.
可选地,在上述方法中,所述路由器为智能路由器。Optionally, in the above method, the router is an intelligent router.
可选地,在上述方法中,所述访问数据包括为访问路由器节点上缓存的网站内容而配置的访问地址。Optionally, in the above method, the access data includes an access address configured for accessing website content cached on the router node.
可选地,在上述方法中,所述访问数据进一步包括缓存的网站内容的版本号和路由器节点的地理位置。Optionally, in the above method, the access data further includes a version number of the cached website content and a geographical location of the router node.
可选地,在上述方法中,所述访问地址为基于Upnp协议或Ipv6协议的IP地址和端口号。Optionally, in the above method, the access address is an IP address and port number based on the UPnp protocol or the IPv6 protocol.
可选地,在上述方法中,进一步包括:Optionally, in the above method, further comprising:
E、在其中一个路由器节点处接收来自终端设备的访问请求,该访问请求包含欲访问网站的指示;E. receiving, at one of the router nodes, an access request from a terminal device, the access request including an indication of a website to be accessed;
F、基于接收到访问请求的路由器节点上存储的数据确定所述区块链网络中是否有路由器节点缓存欲访问网站的内容;F. Determine whether there is a router node in the blockchain network that caches the content of the website to be accessed based on the data stored on the router node that receives the access request;
G、如果有路由器节点缓存欲访问网站的内容,则向所述终端设备返回为该内容分配的访问地址,否则将所述访问请求重定向至公共域名解析服务器。G. If a router node caches the content of the website to be accessed, the access address assigned to the content is returned to the terminal device, otherwise the access request is redirected to the public domain name resolution server.
可选地,在上述方法中,在步骤G中,当有多个路由器节点缓存欲访问网站的内容时,基于下列项中的一个或多个从中选择一个路由器节点:i)路由器节点的IP地址与所述终端设备的IP地址的匹配程度;ii)路由器节点的地理位置与所述终端设备的地理位置的距离;以及iii)路由器节点处缓存的欲访问网站的内容的版本号。Optionally, in the above method, in step G, when there are multiple router nodes caching the content of the website to be accessed, a router node is selected from them based on one or more of the following items: i) the degree of match between the IP address of the router node and the IP address of the terminal device; ii) the distance between the geographical location of the router node and the geographical location of the terminal device; and iii) the version number of the content of the website to be accessed cached at the router node.
可选地,在上述方法中,进一步包括:Optionally, in the above method, further comprising:
H、当为所述缓存的网站内容配置的访问地址发生变化时,将反映该变化的访问数据添加到所述区块链网络内。H. When the access address configured for the cached website content changes, access data reflecting the change is added to the blockchain network.
可选地,在上述方法中,进一步包括:Optionally, in the above method, further comprising:
I、响应于所述区块链网络中有新加入节点的事件,更新所述区块链网络中的数据。I. In response to an event in which a new node is added to the blockchain network, update the data in the blockchain network.
可选地,在上述方法中,进一步包括:Optionally, in the above method, further comprising:
J、响应于来自终端设备的查询请求,向该终端设备返回其经由区块链网络中的路由器节点访问互联网的历史记录。J. In response to a query request from a terminal device, return to the terminal device a history record of its access to the Internet via a router node in the blockchain network.
按照本申请另一个方面的用于实现边缘计算网络加速的区块链网络包含多个路由器作为节点,其中,每个节点被配置为执行下列操作:According to another aspect of the present application, a blockchain network for implementing edge computing network acceleration includes multiple routers as nodes, wherein each node is configured to perform the following operations:
A、当经由路由器节点访问网站内容时,同步缓存相应的网站内容;A. When accessing website content via a router node, the corresponding website content is cached synchronously;
B、为缓存的网站内容分配相关联的访问数据;以及B. assigning access data associated with the cached website content; and
C、将所述访问数据添加到所述区块链网络中。C. Adding the access data to the blockchain network.
按照本申请的另一个方面的用于实现边缘计算网络加速的方法包含下列步骤:A method for implementing edge computing network acceleration according to another aspect of the present application comprises the following steps:
A、向包含多个路由器作为节点的区块链网络的其中一个路由器节点发送包含欲访问网站的指示的访问请求,其中,每个路由器节点同步缓存经由该路由器节点访问的网站内容并且为缓存的网站内容分配相关联的访问数据,并且所述访问数据被添加到所述区块链网络中;以及A. sending an access request including an indication of a website to be accessed to one of the router nodes of a blockchain network including a plurality of routers as nodes, wherein each router node synchronously caches the website content accessed via the router node and assigns associated access data to the cached website content, and the access data is added to the blockchain network; and
B、基于其中一个路由器节点返回的访问地址来获取欲访问网站的内容,其中,当所述区块链网络中有路由器节点缓存欲访问网站的内容时,所述访问地址指向缓存欲访问网站的内容的路由器节点。B. Obtaining the content of the website to be accessed based on the access address returned by one of the router nodes, wherein when there is a router node in the blockchain network that caches the content of the website to be accessed, the access address points to the router node that caches the content of the website to be accessed.
可选地,在上述方法中,当所述区块链网络中没有路由器节点缓存欲访问网站的内容时,所述访问地址为公共域名解析服务器提供的访问地址。Optionally, in the above method, when there is no router node in the blockchain network that caches the content of the website to be accessed, the access address is the access address provided by the public domain name resolution server.
可选地,在上述方法中,进一步包括:Optionally, in the above method, further comprising:
C、向包含多个路由器作为节点的区块链网络的其中一个路由器节点发送查询请求以获取该终端设备经由区块链网络中的路由器节点访问互联网的历史记录。C. Send a query request to one of the router nodes of the blockchain network that includes multiple routers as nodes to obtain the historical record of the terminal device accessing the Internet via the router node in the blockchain network.
可选地,在上述方法中,所述网站内容以镜像方式缓存。Optionally, in the above method, the website content is cached in a mirrored manner.
按照本申请另一个方面的终端设备包含:According to another aspect of the present application, a terminal device comprises:
存储器;Memory;
处理器;以及Processor; and
存储在所述存储器上并可在所述处理器上运行的计算机程序,该计算机程序的运行导致下列操作:A computer program stored on the memory and executable on the processor, the execution of which results in the following operations:
A、向包含多个路由器作为节点的区块链网络的其中一个路由器节点发送包含欲访问网站的指示的访问请求,其中,每个路由器节点同步缓存经由该路由器节点访问的网站内容并且为缓存的网站内容分配相关联的访问数据,并且所述访问数据被添加到所述区块链网络中;以及A. sending an access request including an indication of a website to be accessed to one of the router nodes of a blockchain network including a plurality of routers as nodes, wherein each router node synchronously caches the website content accessed via the router node and assigns associated access data to the cached website content, and the access data is added to the blockchain network; and
B、基于其中一个路由器节点返回的访问地址来获取欲访问网站的内容,其中,当所述区块链网络中有路由器节点缓存欲访问网站的内容时,所述访问地址指向缓存欲访问网站的内容的路由器节点。B. Obtaining the content of the website to be accessed based on the access address returned by one of the router nodes, wherein when there is a router node in the blockchain network that caches the content of the website to be accessed, the access address points to the router node that caches the content of the website to be accessed.
按照本申请的另一个方面的计算机可读存储介质,其上存储计算机程序,该计算机程序被处理器执行时实现如上所述的方法。According to another aspect of the present application, a computer readable storage medium stores a computer program, which implements the method described above when executed by a processor.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
本申请的上述和/或其它方面和优点将通过以下结合附图的各个方面的描述变得更加清晰和更容易理解,附图中相同或相似的单元采用相同的标号表示。附图包括:The above and/or other aspects and advantages of the present application will become clearer and easier to understand through the following description of various aspects in conjunction with the accompanying drawings, in which the same or similar units are represented by the same reference numerals. The accompanying drawings include:
图1为按照本申请一些实施例的用于实现边缘计算网络加速的区块链网络的结构示意图。FIG1 is a schematic diagram of the structure of a blockchain network for implementing edge computing network acceleration according to some embodiments of the present application.
图2为按照本申请另外一些实施例的用于实现边缘计算网络加速的方法的流程图。FIG2 is a flowchart of a method for implementing edge computing network acceleration according to some other embodiments of the present application.
图3为按照本申请另外一些实施例的用于更新数据区块的方法的流程图。FIG. 3 is a flowchart of a method for updating a data block according to some other embodiments of the present application.
图4为按照本申请另外一些实施例的用于处理访问请求的方法的流程图。FIG. 4 is a flowchart of a method for processing an access request according to some other embodiments of the present application.
图5为按照本申请另外一些实施例的用于处理查询请求的方法的流程图。FIG5 is a flowchart of a method for processing a query request according to some other embodiments of the present application.
图6为按照本申请另外一些实施例的用于实现边缘计算网络加速的方法的流程图。FIG6 is a flowchart of a method for implementing edge computing network acceleration according to some other embodiments of the present application.
图7为一种典型的终端设备的示意框图。FIG. 7 is a schematic block diagram of a typical terminal device.
具体实施方式Detailed ways
下面参照其中图示了本申请示意性实施例的附图更为全面地说明本申请。但本申请可以按不同形式来实现,而不应解读为仅限于本文给出的各实施例。给出的上述各实施例旨在使本文的披露全面完整,以将本申请的保护范围更为全面地传达给本领域技术人员。The present application is described more fully below with reference to the accompanying drawings in which illustrative embodiments of the present application are illustrated. However, the present application may be implemented in different forms and should not be interpreted as being limited to the embodiments given herein. The above embodiments are given to make the disclosure herein comprehensive and complete, so as to more fully convey the scope of protection of the present application to those skilled in the art.
在本说明书中,诸如“包含”和“包括”之类的用语表示除了具有在说明书和权利要求书中有直接和明确表述的单元和步骤以外,本申请的技术方案也不排除具有未被直接或明确表述的其它单元和步骤的情形。In this specification, terms such as "comprise" and "include" indicate that in addition to the units and steps directly and explicitly stated in the specification and claims, the technical solution of the present application does not exclude the situation where there are other units and steps that are not directly or explicitly stated.
诸如“第一”和“第二”之类的用语并不表示单元在时间、空间、大小等方面的顺序而仅仅是作区分各单元之用。Terms such as "first" and "second" do not indicate the order of the units in terms of time, space, size, etc., but are only used to distinguish the units.
在本说明书中,路由器指的是连接两个或多个网络的硬件设备,在网络间起网关的作用,是读取每一个数据包中的地址然后决定如何传送的专用智能性的网络设备。在下面的描述中,除非特别说明,术语“路由器”和“网关设备”可以互换使用。In this specification, a router refers to a hardware device that connects two or more networks and acts as a gateway between networks. It is a dedicated intelligent network device that reads the address in each data packet and then decides how to transmit it. In the following description, unless otherwise specified, the terms "router" and "gateway device" can be used interchangeably.
在本说明书中,区块链指的是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式,其本质上可理解为是一个去中心化的数据库,包含使用密码学方法产生数据区块,每一个数据区块包含了与应用场景相关的信息,可用于验证信息的有效性和生成下一个数据区块。In this specification, blockchain refers to a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. It can essentially be understood as a decentralized database that uses cryptographic methods to generate data blocks. Each data block contains information related to the application scenario and can be used to verify the validity of the information and generate the next data block.
在本申请的一些实施例中,构建一个由路由器或网关设备作为节点的区块链网络,并利用节点或路由器节点(在本说明书中,除非特别指明,术语“节点”与“路由器节点”可以互换使用。)来缓存网站访问内容(例如以镜像备份的方式);与此同时,将与缓存的网站访问内容相关联的访问数据添加到各个区块链节点的数据区块内或添加到区块链网络中(在本说明书中,除非特别指明,将访问数据添加到数据区块内的操作等价于将访问数据添加到区块链网络中的操作)。当节点接收到终端设备的网站访问请求时,基于访问数据或数据区块来判断欲访问网站的内容是否已经被缓存在区块链网络中(即,是否有节点缓存了欲访问网站的内容),如果存在这样的节点,则将访问请求重定向至相应的节点,由此实现CDN加速。可选地,如果不存在这样的节点,则将访问请求重定向至公共域名解析服务器。由于区块链数据的可追溯性、开放性、独立性和安全性,基于区块链网络的CDN服务具有更高的可靠性和扩展性,并且计费机制更为透明。In some embodiments of the present application, a blockchain network with a router or gateway device as a node is constructed, and nodes or router nodes (in this specification, unless otherwise specified, the terms "node" and "router node" can be used interchangeably.) are used to cache website access content (for example, in the form of mirror backup); at the same time, the access data associated with the cached website access content is added to the data block of each blockchain node or to the blockchain network (in this specification, unless otherwise specified, the operation of adding access data to the data block is equivalent to the operation of adding access data to the blockchain network). When the node receives a website access request from a terminal device, it determines whether the content of the website to be accessed has been cached in the blockchain network based on the access data or data block (that is, whether there is a node that has cached the content of the website to be accessed). If such a node exists, the access request is redirected to the corresponding node, thereby achieving CDN acceleration. Optionally, if such a node does not exist, the access request is redirected to a public domain name resolution server. Due to the traceability, openness, independence and security of blockchain data, CDN services based on blockchain networks have higher reliability and scalability, and the billing mechanism is more transparent.
在本申请的一些实施例中,可选地,当有多个节点缓存欲访问网站的内容时,基于下列项中的一个或多个从中选择一个节点:基于下列项中的一个或多个从中选择一个节点:i)节点的IP地址与所述终端设备的IP地址的匹配程度;ii)节点的地理位置与所述终端设备的地理位置的距离;以及iii)节点处缓存的欲访问网站的内容的版本号。示例性地,可以将与终端设备的IP地址匹配程度较高的IP地址作为访问地址,或者将较靠近终端设备地理位置的节点作为重定向的节点,或者将版本号较高的网站内容对应的节点或地址作为重定向的节点或访问地址。可选地,可以通过为IP地址匹配程度、地理位置之间的距离和缓存内容的版本号赋予相应的权重因子来得到一个综合得分,并且将综合得分较高者确定为作为重定向的节点或访问地址。In some embodiments of the present application, optionally, when there are multiple nodes caching the content of the website to be accessed, a node is selected from them based on one or more of the following items: a node is selected from them based on one or more of the following items: i) the degree of match between the IP address of the node and the IP address of the terminal device; ii) the distance between the geographical location of the node and the geographical location of the terminal device; and iii) the version number of the content of the website to be accessed cached at the node. Exemplarily, an IP address with a higher degree of match with the IP address of the terminal device can be used as an access address, or a node closer to the geographical location of the terminal device can be used as a redirected node, or a node or address corresponding to the website content with a higher version number can be used as a redirected node or access address. Optionally, a comprehensive score can be obtained by assigning corresponding weight factors to the degree of IP address match, the distance between geographical locations, and the version number of the cached content, and the one with a higher comprehensive score is determined as a redirected node or access address.
在本申请的一些实施例中,为了使外部设备能够访问节点所缓存的网站内容,配置了相应的访问地址作为访问数据。可选地,路由器针对IPv4可利用UPnp协议自动为缓存的内容分配对外服务的公网IP和端口作为访问地址,外部设备可基于该访问地址直接访问到缓存的内容。为解决IPv4地址资源匮乏的问题,目前世界很多国家都在推广IPv6协议。可选地,为缓存内容分配的访问地址可基于IPv6协议,在这种情况下,缓存内容的IP地址和端口号可以是固定的。另外可选地,访问数据还可包含缓存的网站内容的版本号和节点的地理位置。In some embodiments of the present application, in order to enable external devices to access the website content cached by the node, a corresponding access address is configured as access data. Optionally, the router can use the UPnp protocol to automatically allocate the public network IP and port for external services to the cached content as the access address for IPv4, and the external device can directly access the cached content based on the access address. In order to solve the problem of scarce IPv4 address resources, many countries in the world are currently promoting the IPv6 protocol. Optionally, the access address assigned to the cached content can be based on the IPv6 protocol. In this case, the IP address and port number of the cached content can be fixed. In addition, the access data may also include the version number of the cached website content and the geographical location of the node.
在本申请的一些实施例中,可选地,当路由器公网IP地址发现变化时(例如由于设备重启、DHCP租赁到期等),将反映该变化的访问数据添加到各个节点的数据区块内。In some embodiments of the present application, optionally, when a change is found in the public IP address of the router (for example, due to device restart, DHCP lease expiration, etc.), access data reflecting the change is added to the data block of each node.
在本申请的一些实施例中,可选地,当有新的节点加入区块链网络中时,更新区块链网络内各个节点的数据区块。In some embodiments of the present application, optionally, when a new node joins the blockchain network, the data blocks of each node in the blockchain network are updated.
图1为按照本申请一些实施例的用于实现边缘计算网络加速的区块链网络的结构示意图。FIG1 is a schematic diagram of the structure of a blockchain network for implementing edge computing network acceleration according to some embodiments of the present application.
图1所示的区块链网络10包括多个节点101-110,这些节点可直接之间在一起或者通过其他节点而间接地连接在一起。需要指出的是,这里所示节点的数量仅仅是示例性的,其不应理解为是对所述实施例的任何限定。The blockchain network 10 shown in Figure 1 includes multiple nodes 101-110, which can be directly connected to each other or indirectly connected through other nodes. It should be noted that the number of nodes shown here is only exemplary and should not be understood as any limitation to the embodiment.
图1中的节点101-110中的每个具有区块功能,借助于区块功能可将经由本节点访问网站内容的数据或访问数据添加到本节点的数据区块内。另一方面,节点101-110中的每个还具有路由功能,从而能够将其它节点传送过来的访问数据等信息传送给更多的节点以实现数据区块在整个区块链网络内的更新。这里所述的数据区块是一种记录访问数据的数据结构。示例性地,每个数据区块由区块头和区块主体组成,区块主体记录区块链网络内前段时间内的所有访问数据,区块链的功能主要由区块头实现。Each of the nodes 101-110 in Figure 1 has a block function, by means of which the data or access data of the website content accessed via this node can be added to the data block of this node. On the other hand, each of the nodes 101-110 also has a routing function, so that the access data and other information transmitted by other nodes can be transmitted to more nodes to realize the update of data blocks in the entire blockchain network. The data block described here is a data structure that records access data. Exemplarily, each data block consists of a block header and a block body. The block body records all access data in the blockchain network in the previous period of time, and the function of the blockchain is mainly realized by the block header.
在图1所示的实施例中,节点101-110为路由器或网关设备,其配置为对不同网络之间(例如局域网与互联网之间)的数据包进行存储、分组转发处理。在网络通信中,路由器具有判断网络地址以及选择IP路径的作用,可以在多个网络环境中,构建灵活的链接系统,通过不同的数据分组以及介质访问方式对各个子网进行链接。In the embodiment shown in FIG1 , nodes 101-110 are routers or gateway devices, which are configured to store and forward packets between different networks (e.g., between a local area network and the Internet). In network communications, a router has the function of determining a network address and selecting an IP path, and can build a flexible link system in multiple network environments, linking each subnet through different data packets and media access methods.
可选地,图1中的节点101-110为宽带路由器。示例性地,宽带路由器可集成路由器、防火墙、带宽控制和管理等功能,具备快速转发能力。大部分宽带运营商都将MAC地址和用户的ID、IP地址捆绑在一起,以此进行用户上网认证。带有MAC地址功能的宽带路由器可将网卡上的MAC地址写入,让服务器通过接入时的MAC地址验证,以获取宽带接入认证。宽带路由器通常提供NAT功能,以将局域网内分配给每个终端设备的IP地址转换成合法注册的Internet网实际IP地址,从而使内部网络的终端设备可直接与Internet上的其它主机进行通讯。当采用家庭宽带路由器作为区块链网络的节点时,可以通过共享家庭宽带来降低成本和提高带宽利用率。此外,家庭宽带路由器通常是最为靠近用户设备的边缘节点,因此非常适合于构建内容分发网络。Optionally, nodes 101-110 in FIG. 1 are broadband routers. Exemplarily, a broadband router can integrate functions such as a router, a firewall, bandwidth control and management, and has fast forwarding capabilities. Most broadband operators bundle the MAC address with the user's ID and IP address to authenticate the user's Internet access. A broadband router with a MAC address function can write the MAC address on the network card, allowing the server to obtain broadband access authentication through MAC address verification during access. Broadband routers usually provide a NAT function to convert the IP address assigned to each terminal device in the local area network into a legally registered actual IP address of the Internet network, so that the terminal devices in the internal network can communicate directly with other hosts on the Internet. When a home broadband router is used as a node in a blockchain network, costs can be reduced and bandwidth utilization can be improved by sharing home broadband. In addition, home broadband routers are usually the edge nodes closest to user devices, so they are very suitable for building content distribution networks.
图2为按照本申请另外一些实施例的用于实现边缘计算网络加速的方法的流程图。FIG2 is a flowchart of a method for implementing edge computing network acceleration according to some other embodiments of the present application.
图2所示的方法流程包括下列步骤:The method flow shown in FIG2 includes the following steps:
步骤S201:构建包含路由器作为节点的区块链网络。示例性地,所构建的区块链网络可具有图1所示的网络结构和特征,此处不再赘述。Step S201: construct a blockchain network including routers as nodes. Exemplarily, the constructed blockchain network may have the network structure and features shown in FIG1 , which will not be described in detail here.
下列步骤S202-S204可以在步骤S201之后以并行方式执行。The following steps S202 - S204 may be executed in parallel after step S201 .
步骤S202:当发生触发更新数据区块的事件时,在区块链网络中执行数据区块更新操作。触发数据区块更新的事件例如包括但不限于区块链网络中新节点的加入、节点处缓存内容的变化和节点地址的变化等。对于更新操作,下面将借助图3作进一步的描述。Step S202: When an event that triggers the update of a data block occurs, a data block update operation is performed in the blockchain network. Events that trigger the update of a data block include, but are not limited to, the addition of a new node in the blockchain network, changes in cache content at a node, and changes in a node address. The update operation will be further described below with reference to FIG3.
步骤S203:当接收到来自终端设备的访问请求时,在区块链网络中执行对访问请求的处理操作。对于处理操作,下面将借助图4作进一步的描述。Step S203: When receiving an access request from a terminal device, a processing operation for the access request is performed in the blockchain network. The processing operation will be further described below with reference to FIG. 4 .
步骤S204:当接收到来自终端设备的查询请求时,在区块链网络的数据区块中查询该移动终端经由区块链网络访问互联网的历史数据。对于查询请求的处理操作,下面将借助图5作进一步的描述。Step S204: When a query request is received from a terminal device, historical data of the mobile terminal accessing the Internet via the blockchain network is queried in the data block of the blockchain network. The processing operation of the query request will be further described below with reference to FIG5.
图3为按照本申请另外一些实施例的用于更新数据区块的方法的流程图。FIG. 3 is a flowchart of a method for updating a data block according to some other embodiments of the present application.
图3所示的方法流程包括下列步骤:The method flow shown in FIG3 includes the following steps:
步骤S301:当经由区块链网络中的一个节点(以下以节点108为例)访问网站A的内容时,节点108将同步缓存网站A的内容。可选地,网站A的内容以镜像备份的方式被存储在节点108处。Step S301: When accessing the content of website A via a node in the blockchain network (hereinafter taking node 108 as an example), node 108 will synchronously cache the content of website A. Optionally, the content of website A is stored at node 108 in a mirrored backup manner.
步骤S302:节点108生成与缓存的内容相关联的访问数据。可选地,访问数据包括为访问节点108上缓存的网站A的内容而配置的访问地址。示例性地,访问地址可以是基于Upnp协议的IP地址和端口号,或者基于IPv6协议的IP地址和端口号。另外可选地,访问数据进一步包括缓存的网站内容的版本号和节点108的地理位置。Step S302: Node 108 generates access data associated with cached content. Optionally, the access data includes an access address configured for accessing the content of website A cached on node 108. Exemplarily, the access address can be an IP address and port number based on the UPnp protocol, or an IP address and port number based on the IPv6 protocol. Alternatively, the access data further includes a version number of the cached website content and a geographic location of node 108.
步骤S303:节点108将访问数据写入本节点以及其他节点的数据区块内。Step S303: the node 108 writes the access data into the data blocks of the node and other nodes.
步骤S304:当在节点108处,为缓存的网站A的内容配置的访问地址发生变化时,节点108将生成相应的访问数据。Step S304: When the access address configured for the cached content of website A at node 108 changes, node 108 will generate corresponding access data.
步骤S305:节点108将反映该变化的访问数据添加到本节点以及其他节点的数据区块内。Step S305: the node 108 adds the access data reflecting the change to the data blocks of the node and other nodes.
步骤S306:当区块链网络中有新的节点(例如节点111)加入时,节点101-110将更新各自的数据区块内。Step S306: When a new node (such as node 111) joins the blockchain network, nodes 101-110 will update their respective data blocks.
图4为按照本申请另外一些实施例的用于处理访问请求的方法的流程图。FIG. 4 is a flowchart of a method for processing an access request according to some other embodiments of the present application.
图4所示的方法流程包括下列步骤:The method flow shown in FIG4 includes the following steps:
步骤S401:区块链网络的其中一个节点(以下以节点106为例)接收到来自终端设备的访问请求,该访问请求包含欲访问网站A的指示。Step S401: One of the nodes of the blockchain network (hereinafter taking node 106 as an example) receives an access request from a terminal device, where the access request includes an instruction to access website A.
步骤S402:节点106基于其上存储的数据区块确定区块链网络中是否有节点缓存网站A的内容。如果有节点缓存网站A的内容,则进入步骤S403,否则进入步骤S404。Step S402: Node 106 determines whether there is a node in the blockchain network that caches the content of website A based on the data blocks stored thereon. If there is a node that caches the content of website A, then proceed to step S403, otherwise proceed to step S404.
步骤S403:向终端设备返回为该内容分配的访问地址或者将访问请求重定向至相应的节点(例如节点108)。Step S403: Return the access address assigned to the content to the terminal device or redirect the access request to a corresponding node (eg, node 108).
在本步骤中,当有多个节点缓存欲访问网站A的内容时,如上所述,可基于下列项中的一项或多项确定重定向的节点或访问地址:与终端设备的IP地址匹配程度、与终端设备地理位置的距离和网站A的内容的版本号。In this step, when there are multiple nodes caching the content of website A to be accessed, as described above, the redirected node or access address can be determined based on one or more of the following items: the degree of match with the IP address of the terminal device, the distance from the geographical location of the terminal device, and the version number of the content of website A.
步骤S404:节点106将访问请求重定向至公共域名解析服务器。Step S404: Node 106 redirects the access request to a public domain name resolution server.
图5为按照本申请另外一些实施例的用于处理查询请求的方法的流程图。FIG5 is a flowchart of a method for processing a query request according to some other embodiments of the present application.
图5所示的方法流程包括下列步骤:The method flow shown in FIG5 includes the following steps:
步骤S501:区块链网络的其中一个节点(以下以节点106为例)接收到来自终端设备的查询请求,该查询请求包含终端设备的标识ID。Step S501: One of the nodes of the blockchain network (hereinafter taking node 106 as an example) receives a query request from a terminal device, and the query request includes an identification ID of the terminal device.
步骤S502:节点106在其上存储的数据区块内查询与标识ID指定的终端设备经由区块链网络访问互联网的历史数据。Step S502: Node 106 queries the historical data of the terminal device specified by the identification ID accessing the Internet via the blockchain network in the data block stored thereon.
步骤S503:节点106向移动终端返回查询结果。Step S503: the node 106 returns the query result to the mobile terminal.
在图5所示的实施例中,移动终端可能经由区块链网络中的多个节点访问互联网,或者移动终端并未经由发送查询请求的节点(例如节点106)访问互联网,但是由于每个节点的数据区块记录了终端设备经由区块链网络访问互联网的全部历史数据,因此移动终端仍然可以通过任何一个节点查询到其经由区块链网络访问互联网的历史。In the embodiment shown in FIG. 5 , the mobile terminal may access the Internet via multiple nodes in the blockchain network, or the mobile terminal may not access the Internet via the node that sends the query request (e.g., node 106). However, since the data block of each node records all historical data of the terminal device accessing the Internet via the blockchain network, the mobile terminal can still query its history of accessing the Internet via the blockchain network through any node.
图6为按照本申请另外一些实施例的用于实现边缘计算网络加速的方法的流程图。FIG6 is a flowchart of a method for implementing edge computing network acceleration according to some other embodiments of the present application.
图6所示的方法流程由终端设备执行并包括下列步骤:The method flow shown in FIG6 is executed by the terminal device and includes the following steps:
步骤S601:向包含多个路由器作为节点的区块链网络(示例性地,该区块链网络可具有图1所示的网络结构和特征)的其中一个节点(例如节点106)发送包含欲访问网站A的指示的访问请求。Step S601: Send an access request including an indication of wanting to access website A to one of the nodes (e.g., node 106) of a blockchain network including multiple routers as nodes (exemplarily, the blockchain network may have the network structure and features shown in FIG. 1 ).
可选地,终端设备的应用程序可内置访问策略,该策略将区块链网络中的节点指定为在访问互联网时优先访问的节点。Optionally, the application of the terminal device may have built-in access policies that designate nodes in the blockchain network as nodes that are preferentially accessed when accessing the Internet.
步骤S602:基于节点106返回的访问地址来获取欲访问网站的内容。在示例中,假设节点108上缓存网站A的内容,因此节点106返回的访问地址将指向节点108。可选地,访问地址可以是基于Upnp协议的IP地址和端口号,或者基于IPv6协议的IP地址和端口号。Step S602: Obtain the content of the website to be accessed based on the access address returned by the node 106. In the example, it is assumed that the content of website A is cached on the node 108, so the access address returned by the node 106 will point to the node 108. Optionally, the access address can be an IP address and port number based on the UPnp protocol, or an IP address and port number based on the IPv6 protocol.
步骤S603:向区块链网络的其中一个节点(例如节点103)发送查询请求,该查询请求包含终端设备的标识ID。基于标识ID,节点103可在其存储的数据区块内查询与标识ID指定的终端设备经由区块链网络访问互联网的历史数据。Step S603: Send a query request to one of the nodes (e.g., node 103) of the blockchain network, the query request including the identification ID of the terminal device. Based on the identification ID, node 103 can query the historical data of the terminal device specified by the identification ID accessing the Internet via the blockchain network in the data block stored therein.
步骤S604:从节点103接收查询结果或终端设备访问互联网的历史数据。Step S604: receiving query results or historical data of terminal device accessing the Internet from the node 103 .
需要指出的是,在图6所示实施例中,访问请求发送步骤与查询请求发送步骤的顺序仅仅是示例性的而非限定性。可选地,步骤S603和S604可先于步骤S601和S602,或者步骤S601和S602与步骤S603和S604可以并行方式执行。It should be noted that in the embodiment shown in Figure 6, the order of the access request sending step and the query request sending step is merely exemplary and not limiting. Optionally, steps S603 and S604 may precede steps S601 and S602, or steps S601 and S602 and steps S603 and S604 may be executed in parallel.
图7为一种典型的终端设备的示意框图。参见图7,终端设备70包含通信单元710、存储器720(例如诸如闪存、ROM、硬盘驱动器、磁盘、光盘之类的非易失存储器)、处理器730、存储在存储器720上并可在处理器730上运行的计算机程序740。Fig. 7 is a schematic block diagram of a typical terminal device. Referring to Fig. 7, the terminal device 70 includes a communication unit 710, a memory 720 (e.g., a non-volatile memory such as a flash memory, a ROM, a hard disk drive, a magnetic disk, an optical disk, etc.), a processor 730, and a computer program 740 stored in the memory 720 and executable on the processor 730.
通信单元710作为通信接口,被配置为在终端设备与外部设备或网络(例如图1所示的区块链网络及其节点等)之间建立通信连接。The communication unit 710 serves as a communication interface and is configured to establish a communication connection between the terminal device and an external device or network (such as the blockchain network and its nodes shown in FIG. 1 ).
存储器720存储可由处理器730执行的计算机程序740。处理器730配置为执行计算机程序740以实施相应的数据处理流程。The memory 720 stores a computer program 740 executable by the processor 730. The processor 730 is configured to execute the computer program 740 to implement a corresponding data processing flow.
按照本申请的还有一个方面,提供一种计算机可读存储介质,其上存储适于由终端设备(例如个人计算机、智能手机、可穿戴设备、便携式计算机和平板电脑等)下载的计算机程序。当在该用户终端的处理器上执行被下载的计算机程序时,可执行如图6所示的方法步骤。According to another aspect of the present application, a computer-readable storage medium is provided, on which a computer program suitable for downloading by a terminal device (such as a personal computer, a smart phone, a wearable device, a portable computer, and a tablet computer, etc.) is stored. When the downloaded computer program is executed on the processor of the user terminal, the method steps shown in Figure 6 can be executed.
提供本文中提出的实施例和示例,以便最好地说明按照本技术及其特定应用的实施例,并且由此使本领域的技术人员能够实施和使用本申请。但是,本领域的技术人员将会知道,仅为了便于说明和举例而提供以上描述和示例。所提出的描述不是意在涵盖本申请的各个方面或者将本申请局限于所公开的精确形式。The embodiments and examples set forth herein are provided to best illustrate embodiments according to the present technology and its specific applications, and thereby enable those skilled in the art to implement and use the present application. However, those skilled in the art will appreciate that the above description and examples are provided only for ease of illustration and example. The description set forth is not intended to cover all aspects of the present application or to limit the present application to the precise form disclosed.
鉴于以上所述,本公开的范围通过以下权利要求书来确定。In view of the foregoing, the scope of the present disclosure is determined by the following claims.
Claims (35)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111422239.4A CN114629956B (en) | 2021-11-26 | 2021-11-26 | Method and blockchain network for enabling edge computing network acceleration |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111422239.4A CN114629956B (en) | 2021-11-26 | 2021-11-26 | Method and blockchain network for enabling edge computing network acceleration |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114629956A CN114629956A (en) | 2022-06-14 |
| CN114629956B true CN114629956B (en) | 2024-04-16 |
Family
ID=81898376
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111422239.4A Active CN114629956B (en) | 2021-11-26 | 2021-11-26 | Method and blockchain network for enabling edge computing network acceleration |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114629956B (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9882918B1 (en) * | 2017-05-15 | 2018-01-30 | Forcepoint, LLC | User behavior profile in a blockchain |
| CN109067930A (en) * | 2018-06-26 | 2018-12-21 | 网宿科技股份有限公司 | Domain name cut-in method, domain name analytic method, server, terminal and storage medium |
| CN109151070A (en) * | 2018-10-26 | 2019-01-04 | 平安科技(深圳)有限公司 | Service scheduling method, the electronic device of point-to-point CDN based on block chain |
| JP2019115026A (en) * | 2017-12-22 | 2019-07-11 | メタップス・プラス・インコーポレイテッドMetaps Plus Inc. | Decentralized ledger device, decentralized ledger method, transaction information broadcast device, and method for sharing user information |
| CN113572810A (en) * | 2021-06-09 | 2021-10-29 | 北京邮电大学 | Method for designing and realizing private multi-account book block chain system for Internet of things |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107733950B (en) * | 2016-08-11 | 2020-12-08 | 百度在线网络技术(北京)有限公司 | Method and apparatus for accessing a website |
| US10666603B2 (en) * | 2017-07-13 | 2020-05-26 | T-Mobile Usa, Inc. | Optimizing routing of access to network domains via a wireless communication network |
| US11139979B2 (en) * | 2017-12-18 | 2021-10-05 | Koninklijke Kpn N.V. | Primary and secondary blockchain device |
-
2021
- 2021-11-26 CN CN202111422239.4A patent/CN114629956B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9882918B1 (en) * | 2017-05-15 | 2018-01-30 | Forcepoint, LLC | User behavior profile in a blockchain |
| JP2019115026A (en) * | 2017-12-22 | 2019-07-11 | メタップス・プラス・インコーポレイテッドMetaps Plus Inc. | Decentralized ledger device, decentralized ledger method, transaction information broadcast device, and method for sharing user information |
| CN109067930A (en) * | 2018-06-26 | 2018-12-21 | 网宿科技股份有限公司 | Domain name cut-in method, domain name analytic method, server, terminal and storage medium |
| CN109151070A (en) * | 2018-10-26 | 2019-01-04 | 平安科技(深圳)有限公司 | Service scheduling method, the electronic device of point-to-point CDN based on block chain |
| CN113572810A (en) * | 2021-06-09 | 2021-10-29 | 北京邮电大学 | Method for designing and realizing private multi-account book block chain system for Internet of things |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114629956A (en) | 2022-06-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12425366B2 (en) | Establishing and using a tunnel from an origin server in a distributed edge compute and routing service | |
| US10374955B2 (en) | Managing network computing components utilizing request routing | |
| US10356097B2 (en) | Domain name system and method of operating using restricted channels | |
| JP5590580B2 (en) | Method and system for supporting communication peer selection in an overlay network | |
| JP5516571B2 (en) | Communication method, communication system, anonymization device, server | |
| US20160226815A1 (en) | System and method for communicating in an ssl vpn | |
| AU2009304186B2 (en) | NAT traversal method and apparatus | |
| US20080301303A1 (en) | Virtual network connection apparatus, system, method for controlling connection of a virtual network and computer-readable storage medium | |
| US20120191769A1 (en) | Site-aware distributed file system access from outside enterprise network | |
| CN109819068A (en) | User terminal and its block chain domain name analytic method | |
| EP4007209B1 (en) | Service endpoint interconnect in a virtual private gateway | |
| CN102571640A (en) | Gateway system, gateway device, and load distribution method | |
| KR102254220B1 (en) | Method of shareing cyber threat information based on anonymized network traffic and system using the same | |
| WO2012075768A1 (en) | Method and system for monitoring locator/identifier separation network | |
| CN114629956B (en) | Method and blockchain network for enabling edge computing network acceleration | |
| Naik et al. | Security attacks on information centric networking for healthcare system | |
| Mishra et al. | A review on content centric networking and caching strategies | |
| JP4269343B2 (en) | Name resolution server and packet transfer device | |
| KR20190110719A (en) | Apparatus and method for concealing network | |
| US20060159087A1 (en) | Method for identifying personal information on a network | |
| Wang et al. | NCDN: A Node‐Failure Resilient CDN Solution with Reinforcement Learning Optimization | |
| Li et al. | An anonymous IP-based privacy protection routing mechanism for CDNi | |
| JP4013967B2 (en) | Name resolution server and packet transfer device | |
| Thielens | Master thesis: LISP Privacy: An addressless approach to client-server communication | |
| WO2025051027A1 (en) | Traffic policy determination method, electronic device, and storage medium |
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 |