CN109040337B - Information query method, edge server and information query system - Google Patents

Information query method, edge server and information query system Download PDF

Info

Publication number
CN109040337B
CN109040337B CN201810796490.9A CN201810796490A CN109040337B CN 109040337 B CN109040337 B CN 109040337B CN 201810796490 A CN201810796490 A CN 201810796490A CN 109040337 B CN109040337 B CN 109040337B
Authority
CN
China
Prior art keywords
edge
node
address
edge server
client
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.)
Expired - Fee Related
Application number
CN201810796490.9A
Other languages
Chinese (zh)
Other versions
CN109040337A (en
Inventor
林土木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201810796490.9A priority Critical patent/CN109040337B/en
Publication of CN109040337A publication Critical patent/CN109040337A/en
Application granted granted Critical
Publication of CN109040337B publication Critical patent/CN109040337B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/69Types of network addresses using geographic information, e.g. room number
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Abstract

The invention discloses an information query method, an edge server and an information query system. The method comprises the following steps: after receiving a content request sent by a client, a first edge server sends the first request to an edge node in a block chain system, judges whether a target geographic position is matched with the geographic position of the first edge server according to the fact that a response message of the first request comprises the target geographic position of the client, and sends webpage content corresponding to the content request to the client under the condition of matching. Therefore, the edge server only needs to inquire the corresponding relation between the IP address and the geographic position to the corresponding edge node in the block chain system, and the information inquiry efficiency can be effectively improved; on the other hand, the edge nodes in the block chain system can synchronize information and store block information in a block chain mode, so that the timeliness of information updating can be effectively improved, and the efficiency of information updating is greatly improved.

Description

Information query method, edge server and information query system
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an information query method, an edge server, and an information query system.
Background
A Content Delivery Network (CDN) system is a novel Network Content service system, which is constructed based on an Internet Protocol (IP) Network interconnected between networks, and provides Content Delivery and service based on efficiency requirements, quality requirements, and Content order of Content access and application. In a broad sense, the CDN represents a network application service model with high quality, high efficiency and clear network order constructed based on a network.
When an existing CDN system processes a request sent by a client, an edge server generally needs to determine a geographic location of the client, and then further schedules the request according to the geographic location of the client. This process requires the edge server to query for correspondence between IP addresses and geographic locations. However, in the prior art, the maintenance of the corresponding relationship mainly depends on the upgrade of the local data packet, and this upgrade method needs manual operation and maintenance or machine periodic pushing, which results in unstable centralized upgrade or pushing mode, and if there is a network reason, the information of each node is inconsistent, thereby easily resulting in the problems of untimely information update and low efficiency.
Based on this, there is a need for an information query method for solving the problem in the prior art that the information of the IP library in the CDN system is not updated in time and the update efficiency is low, thereby affecting the information query efficiency.
Disclosure of Invention
The embodiment of the invention provides an information query method, an edge server and an information query system, and aims to solve the technical problems that in the prior art, the information of an IP library in a CDN system is not updated timely, the updating efficiency is low, and the information query efficiency is influenced.
The embodiment of the invention provides an information query method, which is applied to a Content Delivery Network (CDN) system, wherein the CDN system comprises a plurality of edge servers, and the method comprises the following steps:
after receiving a content request sent by a client, a first edge server sends a first request to an edge node in a block chain system, wherein the first request comprises an IP address of the client, and the first request is used for requesting to inquire a target geographic position of the client; the edge node in the block chain system is used for receiving and storing block information;
the first edge server receives a response message of the first request sent by the edge node, wherein the response message comprises a target geographic position of the client;
and if the first edge server determines that the target geographic position is matched with the geographic position of the first edge server, the first edge server sends webpage content corresponding to the content request to the client.
Therefore, on one hand, the edge server only needs to inquire the corresponding relation between the IP address and the geographic position to the corresponding edge node in the block chain system, and compared with the mode that the edge server inquires a local database to obtain the corresponding relation between the IP address and the geographic position in the prior art, the efficiency of information inquiry can be effectively improved; on the other hand, in the embodiment of the present invention, the edge nodes in the block chain system may perform information synchronization and store block information in a block chain manner, which can effectively improve the timeliness of information update, thereby implementing real-time update of information in each edge server, and greatly improving the efficiency of information update compared with the manual timing synchronization or update manner in the prior art.
In a possible implementation manner, the block information includes a correspondence between an IP address and a geographic location.
In a possible implementation manner, the target geographic location is determined by the edge node according to the IP address of the client and the correspondence between the IP address and the geographic location.
In a possible implementation manner, the blockchain system further includes at least one master node, any two adjacent master nodes are connected through a network, and each master node is connected with an adjacent edge node through a network; the main node is used for issuing the block information;
the edge node in the block chain system is used for receiving and storing block information, and comprises:
any edge node in the block chain system receives block information sent by a main node adjacent to the edge node, and stores the block information after determining that the adjacent main node is a credible node; alternatively, the first and second electrodes may be,
any edge node in the block chain system receives block information sent by an edge node adjacent to the edge node, and stores the block information after determining that the adjacent edge node is a credible node.
Therefore, the edge node in the block chain system can receive and store block information from the adjacent main node or edge node, and by adopting the information synchronization mode, the time consumption of information updating can be effectively shortened, and the information updating efficiency is improved.
In a possible implementation manner, the blockchain system is connected to a control center, and the control center is configured to receive a correspondence between an IP address to be updated and a geographic location input by an administrator, and send the correspondence between the IP address to be updated and the geographic location to any host node in the blockchain system;
the master node is configured to issue the block information, and includes:
the first main node generates block information according to the corresponding relation between the IP address to be updated and the geographic position, wherein the first main node is the main node which firstly receives the corresponding relation between the IP address to be updated and the geographic position sent by the control center in the at least one main node;
and the first main node sends the block information to an edge node adjacent to the first main node or a main node adjacent to the first main node. Therefore, by adopting the centralized block chain technology, the block information can be triggered only by the main node, so that the information safety can be improved.
In one possible implementation, the method further includes:
and if the first edge server determines that the target geographic position is not matched with the geographic position of the first edge server, sending a response message of the content request to the client, wherein the response message comprises an IP address of a second edge server, the response message is used for indicating the client to establish connection with the second edge server according to the IP address of the second edge server, and the IP address of the second edge server is determined according to the IP address of the client.
An embodiment of the present invention provides an edge server, where the edge server is located in a CDN system, and the edge server includes:
the system comprises a receiving and sending unit, a sending and receiving unit and a sending and receiving unit, wherein the receiving and sending unit is used for sending a first request to an edge node in a block chain system after receiving a content request sent by a client, the first request comprises an IP address of the client, and the first request is used for requesting to inquire a target geographic position of the client; the edge node in the block chain system is used for receiving and storing block information;
the receiving and sending unit is further configured to receive a response message of the first request sent by the edge node, where the response message includes a target geographic location of the client, and the target geographic location is determined by the edge node according to an IP address of the client and a corresponding relationship between the IP address and the geographic location;
and the processing unit is used for sending the webpage content corresponding to the content request to the client if the target geographic position is determined to be matched with the geographic position of the first edge server.
In a possible implementation manner, the block information includes a correspondence between an IP address and a geographic location.
In a possible implementation manner, the target geographic location is determined by the edge node according to the IP address of the client and the correspondence between the IP address and the geographic location.
In a possible implementation manner, the blockchain system includes a plurality of edge nodes, any two adjacent edge nodes are connected through a network, and the edge nodes are in one-to-one correspondence with the edge servers;
the transceiver unit is specifically configured to:
sending a first request to an edge node in the blockchain system corresponding to the first edge server.
In a possible implementation manner, the blockchain system further includes at least one master node, any two adjacent master nodes are connected through a network, and each master node is connected with an adjacent edge node through a network; the main node is used for issuing the block information;
any edge node in the blockchain system is specifically configured to:
receiving block information sent by a main node adjacent to the edge node, and storing the block information after determining that the adjacent main node is a credible node; or receiving block information sent by an edge node adjacent to the edge node, and storing the block information after determining that the adjacent edge node is a trusted node.
In a possible implementation manner, the blockchain system is connected to a control center, and the control center is configured to receive a correspondence between an IP address to be updated and a geographic location input by an administrator, and send the correspondence between the IP address to be updated and the geographic location to any host node in the blockchain system;
the master node is specifically configured to:
the first main node generates block information according to the corresponding relation between the IP address to be updated and the geographic position, wherein the first main node is the main node which firstly receives the corresponding relation between the IP address to be updated and the geographic position sent by the control center in the at least one main node;
and the first main node sends the block information to an edge node adjacent to the first main node or a main node adjacent to the first main node.
In one possible implementation, the processing unit is further configured to:
if the target geographic position is determined not to be matched with the geographic position of the first edge server, sending a response message of the content request to the client, wherein the response message comprises an IP address of a second edge server, the response message is used for indicating the client to establish connection with the second edge server according to the IP address of the second edge server, and the IP address of the second edge server is determined according to the IP address of the client.
The embodiment of the invention provides an information inquiry system, which comprises a control center, at least one main node, a plurality of edge nodes and a plurality of edge servers, wherein the edge servers are used for providing information for users;
the control center is used for receiving the corresponding relation between the IP address to be updated and the geographic position input by an administrator and sending the corresponding relation between the IP address to be updated and the geographic position to any main node in the block chain system;
the main node issues the block information;
the edge node is used for receiving and storing the block information;
the edge server is used for sending a first request to an edge node in a block chain system after receiving a content request sent by a client, wherein the first request comprises an IP address of the client, and the first request is used for requesting to inquire a target geographic position of the client; receiving a response message of the first request sent by the edge node, wherein the response message comprises a target geographic position of the client; and if the target geographic position is determined to be matched with the geographic position of the first edge server, sending webpage content corresponding to the content request to the client.
The embodiment of the application also provides a device, and the device can be an edge server. The apparatus has a function of implementing the information query method described above. This function may be implemented by hardware executing corresponding software, and in one possible design, the apparatus includes: a processor, a transceiver, a memory; the memory is used for storing computer execution instructions, the transceiver is used for realizing the communication between the device and other communication entities, the processor and the memory are connected through the bus, and when the device runs, the processor executes the computer execution instructions stored by the memory so as to enable the device to execute the information inquiry method described above.
An embodiment of the present invention further provides a computer storage medium, where a software program is stored, and when the software program is read and executed by one or more processors, the software program implements the information query method described in the foregoing various possible implementation manners.
Embodiments of the present invention also provide a computer program product containing instructions, which when run on a computer, enable the computer to execute the information query method described in the foregoing various possible implementations.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that are required to be used in the description of the embodiments will be briefly described below.
FIG. 1 is a prior art CDN system architecture diagram;
FIG. 2a is a diagram of a system architecture suitable for use with embodiments of the present invention;
fig. 2b is a schematic structural diagram of a control center according to an embodiment of the present invention;
fig. 3 is a schematic flow chart corresponding to an information query method according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a block chain system distribution information according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating an embodiment of an edge server receiving a target geographic location of a client;
FIG. 6 is a schematic diagram of an overall flow involved in an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an edge server according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an information query system according to an embodiment of the present invention.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings, and the specific operation methods in the method embodiments can also be applied to the apparatus embodiments.
Fig. 1 illustrates an architecture diagram of a CDN system provided by the prior art, and as shown in fig. 1, the CDN system 100 includes a client 101, a local DNS server 102, an authoritative DNS server 103, a DNS schedule server 104, a plurality of edge servers (e.g., edge server 1051, edge server 1052, edge server 1053 shown in fig. 1), and an origin site server 106. Wherein, the client 101 can be connected with the local DNS server 102, any edge server (for example, any one of the edge servers 1051, 1052, 1053) through the network; the local DNS server 102 may be connected to the authoritative DNS server 103 and the DNS scheduling server 104 via a network; either edge server may be networked with the source site server 106.
The working process of the CDN system is as follows:
in step 1, the client 101 sends a site query to the local DNS server 102, for example, an IP address corresponding to the domain name www.a.com is queried.
Step 2, the local DNS server 102 sends a CNAME record query to the authoritative DNS server 103, for example, a CNAME record corresponding to the query domain name www.a.com.
In step 3, the authoritative DNS server 103 returns the CNAME record corresponding to the domain name to the local DNS server 102, for example, www.a.tbcdn.com.
In step 4, the local DNS server 102 initiates a site query to the DNS scheduling server 104, for example, querying an IP address corresponding to the domain name www.a.tbcdn.com.
In step 5, the DNS scheduling server 104 resolves the domain name and returns an IP address to the local DNS server 102, for example, according to the geographic location of the client (for example, beijing), the IP address IP corresponding to the return www.a.tbcdn.com is 2.2.2.2 (IP in beijing).
In step 6, the local DNS server 102 returns an IP address to the client 101, for example, the return IP is 2.2.2.2.
Step 7, the client 101 sends a content request, for example, a request www.a.com content, to the edge server (for example, the edge server 1051) corresponding to the IP address.
Step 8, the edge server 1051 judges whether the geographic position of the client 101 matches with the geographic position of the client, and if the geographic position of the client is matched with the geographic position of the client, returns web page content corresponding to www.a.com to the client 101; if not, the IP address of the edge server (such as edge server 1052) corresponding to the geographic location of the client 101 is determined so that the client 101 establishes a connection with the edge server 1052.
According to the above-described working process of the CDN system, in step 8, the edge server 1051 may determine whether the geographic location of the client 101 matches the edge server 1051 according to the correspondence between the IP address and the geographic location stored in the edge server 1051; and when the mismatch is determined, the edge server 1051 may further determine the edge server actually corresponding to the client 101 according to the correspondence between the IP address and the geographic location stored in the edge server. However, in the prior art, the problem that the update is not timely may exist in the correspondence between the IP address and the geographic location stored in the edge server itself, which easily causes that the edge server cannot accurately judge whether the client matches with itself, and it is difficult to accurately judge the edge server actually corresponding to the client.
In view of the above, fig. 2a illustrates an architecture diagram of a system to which an embodiment of the present invention is applicable, and as shown in fig. 2a, the system 200 includes a client 201, a plurality of edge servers (e.g., edge server 2021, edge server 2022, edge server 2023 shown in fig. 2 a), a control center 203, and a blockchain system 204. The block chain system 204 includes at least one main node (e.g., main node 2041, main node 2042 shown in fig. 2 a), and a plurality of edge nodes (e.g., edge node 2043, edge node 2044, edge node 2045 shown in fig. 2 a).
Further, the client 201 may be connected to any edge server (e.g., any one of the edge server 2021, the edge server 2022, and the edge server 2023) via a network; any edge server may be connected to the corresponding edge node via a network, for example, the edge server 2021 may be connected to the edge node 2043 via a network, the edge server 2022 may be connected to the edge node 2044 via a network, and the edge server 2023 may be connected to the edge node 2045 via a network; the control center 203 may be connected to the blockchain system 204, specifically, the control center 203 may be connected to any host node in the blockchain system 204 through a network, for example, the control center 203 may be connected to the host node 2041 through a network, and the control center 203 may also be connected to the host node 2042 through a network; any two adjacent main nodes may be connected to each other through a network, for example, the main node 2041 and the main node 2042 are connected to each other through a network; each main node and the adjacent edge node may be connected through a network, for example, the main node 2041 may be connected to the edge node 2043 and the edge node 2044 through a network, and the main node 2042 may be connected to the edge node 2044 and the edge node 2045 through a network; any two adjacent edge nodes may be connected to each other through a network, for example, the edge node 2043 and the edge node 2044 may be connected to each other through a network, and the edge node 2044 and the edge node 2045 may be connected to each other through a network.
Fig. 2b is a schematic structural diagram of a control center according to an embodiment of the present invention. The control center 203 includes an information adding and deleting module 2031, a master node maintenance module 2032, an information encryption module 2033, and another expansion module 2034. The control center can be used for receiving information input by an administrator and sending the information to any main node in the block chain system; the master node may package the information and then distribute the information to the blockchain system so that other master nodes or edge nodes can receive the information. Specifically, after receiving the information input by the administrator, the information adding, deleting and modifying module 2031 may send the information to the master node; the master node maintenance module 2032 may maintain information of each master node in the blockchain system; the information encryption module 2033 may encrypt the received information using an encryption algorithm; other expansion modules 2034 may include upgrade, management, etc. functions to upgrade or manage the blockchain system.
In the embodiment of the present invention, the edge servers and the edge nodes may have a one-to-one relationship, for example, the edge server 2021 may correspond to the edge node 2043, the edge server 2022 may correspond to the edge node 2044, and the edge server 2023 may correspond to the edge node 2045; alternatively, the edge server and the edge node may have a many-to-one relationship, for example, both the edge server 2021 and the edge server 2022 may correspond to the edge node 2043, and are not limited specifically.
Further, the edge node may be directly disposed in the edge server, or may also be disposed in other devices, which is not limited specifically.
Furthermore, the edge server may be provided with an information obtaining module, and the information obtaining module in the edge server obtains the required information from the corresponding edge node in the blockchain system, and may further decrypt the obtained information.
In the embodiment of the invention, the client can be various types of clients, such as a notebook computer, a smart phone, a tablet computer, a smart television and the like.
Based on the system architecture shown in fig. 2a, fig. 3 exemplarily shows a flow diagram corresponding to an information query method provided by an embodiment of the present invention. As shown in fig. 3, the method may be performed by any one of the edge servers shown in fig. 2a, for example, may be performed by the edge server 2021, and specifically includes the following steps:
step 301, after receiving a content request sent by a client, a first edge server sends a first request to an edge node in a blockchain system.
Step 302, the first edge server receives a response message of the first request sent by the edge node, where the response message includes a target geographic location of the client.
Step 303, if the first edge server determines that the target geographic location matches the geographic location of the edge server, the first edge server sends the web page content corresponding to the content request to the client.
Therefore, on one hand, the edge server only needs to inquire the corresponding relation between the IP address and the geographic position to the corresponding edge node in the block chain system, and compared with the mode that the edge server inquires a local database to obtain the corresponding relation between the IP address and the geographic position in the prior art, the efficiency of information inquiry can be effectively improved; on the other hand, in the embodiment of the present invention, the edge nodes in the block chain system may perform information synchronization and store block information in a block chain manner, which can effectively improve the timeliness of information update, thereby implementing real-time update of information in each edge server, and greatly improving the efficiency of information update compared with the manual timing synchronization or update manner in the prior art.
Specifically, in step 301, the first request may include an IP address of the client, and may be further used to request the edge node to query the target geographic location of the client according to the IP address of the client. The first edge server may send the first request to any edge node in the blockchain system, for example, the first edge server may send the first request to any node of the edge nodes 2043, 2044, and 2045 shown in fig. 2 a; alternatively, the first edge server may send the request to the edge node corresponding to the first edge server in the blockchain system, and taking the system shown in fig. 2a as an example, if the first edge server is the edge server 2021, the edge server 2021 may send the first request to the corresponding edge node 2043.
In step 302, the edge node may determine a target geographic location of the client according to the IP address of the client and the correspondence between the IP address and the geographic location, and may further send a response message of the first request to the first edge server, where the response message includes the target geographic location of the client.
In the embodiment of the invention, various corresponding relations can exist between the IP address and the geographic position. In one example, there may be a one-to-one correspondence between each IP address and geographic location. As shown in table 1, an example of the correspondence between the IP address and the geographic location is shown. When the IP address is '1.1.1.1', the corresponding geographic position is Beijing; when the IP address is '2.2.2.2', the corresponding geographical position is Shanghai; when the IP address is 3.3.3.3, the corresponding geographic position is Guangzhou; when the IP address is "4.4.4.4", the corresponding geographic position is Shenzhen.
Table 1: example of correspondence between IP address and geographic location
IP address Geographic location
1.1.1.1 Beijing
2.2.2.2 Shanghai province
3.3.3.3 Guangzhou province
4.4.4.4 Shenzhen (Shenzhen medicine)
In another example, there may be a correspondence between multiple IP addresses and geographic locations between the IP addresses and the geographic locations. As shown in table 2, another example of the correspondence between IP addresses and geographic locations is shown. When the IP address is in the interval of 1.1.1.1-1.1.1.100, the corresponding geographic position is Beijing; when the IP address is in the interval of 2.2.2.1-2.2.2.100, the corresponding geographic position is Shanghai; when the IP address is 3.3.3.1-3.3.3.100, the corresponding geographic position is Guangzhou; when the IP addresses are 4.4.4.1-4.4.4.100, the corresponding geographic positions are Shenzhen.
Table 2: example of correspondence between IP address and geographic location
IP address Geographic location
1.1.1.1~1.1.1.100 Beijing
2.2.2.1~2.2.2.100 Shanghai province
3.3.3.1~3.3.3.100 Guangzhou province
4.4.4.1~4.4.4.100 Shenzhen (Shenzhen medicine)
Further, the correspondence between the IP address and the geographic location may be issued in a blockchain manner, so that each node in the blockchain system may store the correspondence between the IP address and the geographic location. Fig. 4 exemplarily shows a schematic diagram of publishing information by a blockchain system according to an embodiment of the present invention, as shown in fig. 4, the method specifically includes the following steps:
step 401, after any master node in the block chain system receives the correspondence between the IP address to be updated and the geographic location issued by the control center, block information is generated according to the correspondence between the IP address to be updated and the geographic location.
In step 402, the master node sends the block information to an edge node adjacent to the master node or a master node adjacent to the master node.
Step 403, any edge node in the blockchain system receives the block information sent by the master node adjacent to the edge node, and stores the block information after determining that the adjacent master node is a trusted node.
In step 404, any edge node in the blockchain system receives the block information sent by the edge node adjacent to the edge node, and stores the block information after determining that the adjacent edge node is a trusted node.
It should be noted that the step numbers are only exemplary representations of execution flows, and the sequence of each step is not specifically limited in this application.
Specifically, the blockchain system in the embodiment of the present invention may employ a centralized blockchain technique, and the generation and update of the blockchain information may be triggered only by the master node. The intelligent contract of the main node can provide interfaces of adding, deleting, modifying and granting nodes and the like, thereby being connected with the control center.
Further, in the embodiment of the present invention, the number of the master nodes may be only one, or may also be multiple, and a person skilled in the art may set the number of the master nodes according to the requirement of the system robustness, which is not limited specifically.
The data stored in the edge node in the embodiment of the invention, such as the corresponding relation between the IP address and the geographic position, can be provided for the edge server to access. From a blockchain perspective, an edge node may be viewed as a blockchain wallet and the edge node's smart contract may provide an interface for the edge server to obtain relevant information.
Further, the master node and the edge node may form a complete blockchain system, which may perform data synchronization in the manner of P2P.
In step 303, the first edge server may determine whether the client is matched with the first edge server according to the target geographic location of the client, and further determine whether the web content corresponding to the content request can be returned to the client. As shown in fig. 5, the schematic diagram after the edge server receives the target geographic location of the client specifically includes the following steps:
step 501, the first edge server judges whether the target geographic position of the client is matched with the geographic position of the first edge server, if so, step 502 is executed; if not, go to step 503.
Step 502, the first edge server sends the web content corresponding to the content request to the client.
Step 503, the first edge server determines a corresponding second edge server according to the IP address of the client.
In step 504, the first edge server sends a response message of the content request to the client, so that the client establishes a connection with the second edge server according to the IP address of the second edge server included in the response message.
It should be noted that, in step 503, there are various ways for the first edge server to determine the second edge server, and the first edge server may query the corresponding relationship from the corresponding edge node to determine the second edge server, or query the corresponding relationship from the local database to determine the second edge server, which is not limited specifically.
In order to describe the above information query method more clearly, the flow involved in the embodiment of the present invention is generally described below with reference to fig. 6. As shown in fig. 6, the following steps may be included:
step 601, the control center receives the corresponding relation between the IP address and the geographic position input by the administrator, encrypts the corresponding relation between the IP address and the geographic position and then distributes the encrypted corresponding relation to the block chain system. Of course, the input of the corresponding relationship between the IP address and the geographic location may also be data import or intelligent automatic entry according to a certain database.
Before step 601 is executed, the intelligent contracts of the master node and the edge nodes in the blockchain system may be modified, for example, the intelligent contract of the master node is modified, so that the master node can provide an add interface, a delete interface, an change interface, and the like to the control center, where the added interface may be AddIp, and is not limited specifically.
Further, the control center may employ an encryption algorithm to encrypt the information entered by the administrator. For example, if the correspondence between the IP address and the geographic location input by the administrator is "the geographic location corresponding to the IP address in the section 120.120.120.0 to 120.120.120.24 is a building door", the information encryption module in the control center may encrypt the correspondence, then maintain the encrypted information that "the geographic location corresponding to the IP address in the section 120.120.120.0 to 120.120.120.24 is a building door", and then the control center may call an interface with the master node, for example, call an AddIp interface, and issue the information to the blockchain system.
Step 602, after receiving the correspondence between the encrypted IP address and the geographic location sent by the control center, any host node generates block information, and sends the block information to an adjacent edge node or other host nodes.
In the above example, the information issued by the control center is encrypted "the geographical position corresponding to the IP address in the section 120.120.120.0-120.120.120.24 is a building door", and the master node may perform data packaging on the information, generate block information, and issue the block information to the block chain system.
Step 603, after the edge node receives the block information sent by the adjacent edge node or the master node, the block information is stored.
After the edge node (or other host node) receives the block information, the edge node (or other host node) may trigger local block chain update after determining that the block information is from the trusted node, and write the block information into the local. In the embodiment of the present invention, the data synchronization (i.e., synchronization of the tile information) in the blockchain system may adopt the P2P mode, so as to improve the synchronization efficiency of the blockchain system and enhance the stability and reliability of the blockchain system.
At step 604, the client device sends a content request to the first edge server.
Step 605, the first edge server sends a first request to a corresponding edge node in the blockchain system, where the first request includes an IP address of the client.
The first edge server may trigger the function of information query after receiving a content request from the client. Specifically, the first edge server may query or retrieve the tile information in the tile chain system through the information obtaining module, so as to find out the related tile information.
And 606, the edge node determines the target geographic position of the client according to the IP address of the client and the corresponding relation between the IP address and the geographic position.
In step 607, the edge node sends a response message of the first request to the first edge server, where the response message includes the target geographic location of the client.
Step 608, the first edge server determines whether the target geographic location of the client matches the geographic location of the first edge server, and if so, step 609 is executed; if not, go to step 610.
Before performing step 608, after the first edge server obtains the tile information through the information obtaining module, the first edge server may decrypt the tile information through a decryption algorithm.
Step 609, the first edge server sends the web content corresponding to the content request to the client.
In step 610, the first edge server determines a corresponding second edge server according to the IP address of the client.
In step 611, the first edge server sends a response message of the content request to the client, so that the client establishes a connection with the second edge server according to the IP address of the second edge server included in the response message.
Based on the same inventive concept, fig. 7 exemplarily illustrates a schematic structural diagram of an edge server provided in an embodiment of the present invention, as shown in fig. 7, the edge server 700 includes a transceiver unit 701, a processing unit 702; wherein the content of the first and second substances,
a transceiving unit 701, configured to send a first request to an edge node in a blockchain system after receiving a content request sent by a client, where the first request includes an IP address of the client, and the first request is used to request to query a target geographic location of the client; the edge node in the block chain system is used for receiving and storing block information, and the block information comprises the corresponding relation between an IP address and a geographic position; the first edge server is any one of the plurality of edge servers;
the transceiver 701 is further configured to receive a response message of the first request sent by the edge node, where the response message includes a target geographic location of the client, and the target geographic location is determined by the edge node according to an IP address of the client and a corresponding relationship between the IP address and the geographic location;
a processing unit 702, configured to send, to the client, web content corresponding to the content request if it is determined that the target geographic location matches the geographic location of the first edge server.
In a possible implementation manner, the blockchain system includes a plurality of edge nodes, any two adjacent edge nodes are connected through a network, and the edge nodes are in one-to-one correspondence with the edge servers;
the transceiver unit 701 is specifically configured to:
sending a first request to an edge node in the blockchain system corresponding to the first edge server.
In a possible implementation manner, the blockchain system further includes at least one master node, any two adjacent master nodes are connected through a network, and each master node is connected with an adjacent edge node through a network; the main node is used for issuing the block information;
any edge node in the blockchain system is specifically configured to:
receiving block information sent by a main node adjacent to the edge node, and storing the block information after determining that the adjacent main node is a credible node; or receiving block information sent by an edge node adjacent to the edge node, and storing the block information after determining that the adjacent edge node is a trusted node.
In a possible implementation manner, the blockchain system is connected to a control center, and the control center is configured to receive a correspondence between an IP address to be updated and a geographic location input by an administrator, and send the correspondence between the IP address to be updated and the geographic location to any host node in the blockchain system;
the master node is specifically configured to:
and the main node in the block chain system generates block information according to the corresponding relation between the IP address to be updated and the geographic position, and sends the block information to the edge node adjacent to the main node or the main node adjacent to the main node.
In one possible implementation manner, the processing unit 702 is further configured to:
if the target geographic position is determined not to be matched with the geographic position of the first edge server, sending a response message of the content request to the client, wherein the response message comprises an IP address of a second edge server, the response message is used for indicating the client to establish connection with the second edge server according to the IP address of the second edge server, and the IP address of the second edge server is determined according to the IP address of the client.
Based on the same inventive concept, fig. 8 exemplarily illustrates a schematic structural diagram of an information query system provided by an embodiment of the present invention, as shown in fig. 8, the information query system 800 includes a control center 801, at least one master node (e.g., master node 8021 and master node 8022 in fig. 8), a plurality of edge nodes (e.g., edge node 8031, edge node 8032, and edge node 8033 in fig. 8), and at least one edge server (e.g., edge server 8041, edge server 8042, and edge server 8043); wherein the plurality of edge nodes correspond to the plurality of edge servers one to one.
The control center 801 is configured to receive a correspondence between an IP address to be updated and a geographic location input by an administrator, and send the correspondence between the IP address to be updated and the geographic location to any host node in the blockchain system;
the master node 8021 (or master node 8022) that issues the tile information;
the edge node 8031 (or edge node 8032, or edge node 8033) is configured to receive and store the block information;
the edge server 8041 (or the edge server 8042, or the edge server 8043) is configured to, after receiving a content request sent by a client, send a first request to an edge node in a blockchain system, where the first request includes an IP address of the client, and the first request is used to request to query a target geographic location of the client; receiving a response message of the first request sent by the edge node, wherein the response message comprises a target geographic position of the client; and if the target geographic position is determined to be matched with the geographic position of the first edge server, sending webpage content corresponding to the content request to the client.
The embodiment of the application also provides a device, and the device can be an edge server. The apparatus has a function of implementing the information query method described above. This function may be implemented by hardware executing corresponding software, and in one possible design, the apparatus includes: a processor, a transceiver, a memory; the memory is used for storing computer execution instructions, the transceiver is used for realizing the communication between the device and other communication entities, the processor and the memory are connected through the bus, and when the device runs, the processor executes the computer execution instructions stored by the memory so as to enable the device to execute the information inquiry method described above.
An embodiment of the present invention further provides a computer storage medium, where a software program is stored, and when the software program is read and executed by one or more processors, the software program implements the information query method described in the foregoing various possible implementation manners.
Embodiments of the present invention also provide a computer program product containing instructions, which when run on a computer, enable the computer to execute the information query method described in the foregoing various possible implementations.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (17)

1. An information query method is applied to a Content Delivery Network (CDN) system, the CDN system comprises a plurality of edge servers, and the method comprises the following steps:
after receiving a content request sent by a client, a first edge server sends a first request to an edge node in a block chain system, wherein the first request comprises an IP address of the client, and the first request is used for requesting to inquire a target geographic position of the client; the edge node in the block chain system is used for receiving and storing block information;
the first edge server receives a response message of the first request sent by the edge node, wherein the response message comprises a target geographic position of the client;
and if the first edge server determines that the target geographic position is matched with the geographic position of the first edge server, the first edge server sends webpage content corresponding to the content request to the client.
2. The method of claim 1, wherein the block information comprises a correspondence between an IP address and a geographic location.
3. The method of claim 1, wherein the target geographic location is determined by the edge node based on an IP address of the client and a correspondence between the IP address and the geographic location.
4. The method according to claim 1, wherein the blockchain system comprises a plurality of edge nodes, any two adjacent edge nodes are connected through a network, and the plurality of edge nodes are in one-to-one correspondence with the plurality of edge servers;
the first edge server sending a first request to an edge node in a blockchain system, comprising:
the first edge server sends a first request to an edge node in the blockchain system corresponding to the first edge server.
5. The method of claim 4, wherein the blockchain system further comprises at least one master node, any two adjacent master nodes are connected through a network, and each master node is connected with an adjacent edge node through a network; the main node is used for issuing the block information;
the edge node in the block chain system is used for receiving and storing block information, and comprises:
any edge node in the block chain system receives block information sent by a main node adjacent to the edge node, and stores the block information after determining that the adjacent main node is a credible node; alternatively, the first and second electrodes may be,
any edge node in the block chain system receives block information sent by an edge node adjacent to the edge node, and stores the block information after determining that the adjacent edge node is a credible node.
6. The method according to claim 5, wherein the blockchain system is connected to a control center, and the control center is configured to receive the correspondence between the IP address to be updated and the geographic location input by an administrator, and send the correspondence between the IP address to be updated and the geographic location to any master node in the blockchain system;
the master node is configured to issue the block information, and includes:
the first main node generates block information according to the corresponding relation between the IP address to be updated and the geographic position, wherein the first main node is the main node which firstly receives the corresponding relation between the IP address to be updated and the geographic position sent by the control center in the at least one main node;
and the first main node sends the block information to an edge node adjacent to the first main node or a main node adjacent to the first main node.
7. The method according to any one of claims 1 to 6, further comprising:
and if the first edge server determines that the target geographic position is not matched with the geographic position of the first edge server, sending a response message of the content request to the client, wherein the response message comprises an IP address of a second edge server, the response message is used for indicating the client to establish connection with the second edge server according to the IP address of the second edge server, and the IP address of the second edge server is determined according to the IP address of the client.
8. An edge server, wherein the edge server is located in a CDN system, and wherein the edge server comprises:
the system comprises a receiving and sending unit, a sending and receiving unit and a sending and receiving unit, wherein the receiving and sending unit is used for sending a first request to an edge node in a block chain system after receiving a content request sent by a client, the first request comprises an IP address of the client, and the first request is used for requesting to inquire a target geographic position of the client; the edge node in the block chain system is used for receiving and storing block information;
the transceiver unit is further configured to receive a response message of the first request sent by the edge node, where the response message includes a target geographic location of the client;
and the processing unit is used for sending the webpage content corresponding to the content request to the client if the target geographic position is matched with the geographic position of the first edge server.
9. The edge server of claim 8, wherein the tile information comprises a correspondence of an IP address and a geographic location.
10. The edge server of claim 8, wherein the target geographic location is determined by the edge node based on an IP address of the client and a correspondence between the IP address and the geographic location.
11. The edge server of claim 8, wherein the blockchain system comprises a plurality of edge nodes, any two adjacent edge nodes are connected through a network, and the plurality of edge nodes are in one-to-one correspondence with the plurality of edge servers;
the transceiver unit is specifically configured to:
sending a first request to an edge node in the blockchain system corresponding to the first edge server.
12. The edge server of claim 11, wherein the blockchain system further comprises at least one master node, any two adjacent master nodes are connected through a network, and each master node is connected with an adjacent edge node through a network; the main node is used for issuing the block information;
any edge node in the blockchain system is specifically configured to:
receiving block information sent by a main node adjacent to the edge node, and storing the block information after determining that the adjacent main node is a credible node; or receiving block information sent by an edge node adjacent to the edge node, and storing the block information after determining that the adjacent edge node is a trusted node.
13. The edge server of claim 12, wherein the blockchain system is connected to a control center, and the control center is configured to receive a correspondence between an IP address to be updated and a geographic location input by an administrator, and send the correspondence between the IP address to be updated and the geographic location to any master node in the blockchain system;
the master node is specifically configured to:
the first main node generates block information according to the corresponding relation between the IP address to be updated and the geographic position, wherein the first main node is the main node which firstly receives the corresponding relation between the IP address to be updated and the geographic position sent by the control center in the at least one main node;
and the first main node sends the block information to an edge node adjacent to the first main node or a main node adjacent to the first main node.
14. The edge server of any of claims 8-13, wherein the processing unit is further configured to:
if the target geographic position is determined not to be matched with the geographic position of the first edge server, sending a response message of the content request to the client, wherein the response message comprises an IP address of a second edge server, the response message is used for indicating the client to establish connection with the second edge server according to the IP address of the second edge server, and the IP address of the second edge server is determined according to the IP address of the client.
15. An information query system, characterized in that the system comprises a control center, at least one master node, a plurality of edge nodes, and at least one edge server according to any one of claims 8 to 14.
16. A computer-readable storage medium, characterized in that the storage medium stores instructions that, when executed on a computer, cause the computer to carry out the method of any one of claims 1 to 7.
17. A computer device, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory to execute the method of any one of claims 1 to 7 in accordance with the obtained program.
CN201810796490.9A 2018-07-19 2018-07-19 Information query method, edge server and information query system Expired - Fee Related CN109040337B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810796490.9A CN109040337B (en) 2018-07-19 2018-07-19 Information query method, edge server and information query system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810796490.9A CN109040337B (en) 2018-07-19 2018-07-19 Information query method, edge server and information query system

Publications (2)

Publication Number Publication Date
CN109040337A CN109040337A (en) 2018-12-18
CN109040337B true CN109040337B (en) 2021-06-04

Family

ID=64644208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810796490.9A Expired - Fee Related CN109040337B (en) 2018-07-19 2018-07-19 Information query method, edge server and information query system

Country Status (1)

Country Link
CN (1) CN109040337B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11095705B2 (en) * 2019-04-05 2021-08-17 International Business Machines Corporation Content distributed over secure channels
CN112217856A (en) * 2019-07-11 2021-01-12 华为技术有限公司 Address acquisition method, device, equipment and storage medium of application example
CN110559663B (en) * 2019-09-11 2022-06-10 腾讯科技(深圳)有限公司 Display control method and device for virtual rounds in game
US20230199480A1 (en) * 2020-05-15 2023-06-22 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for providing edge service
CN112436974B (en) * 2020-07-29 2021-12-24 上海哔哩哔哩科技有限公司 CDN data resource consistency detection method and device and computer equipment
CN112804299B (en) * 2020-12-30 2023-02-28 成都知道创宇信息技术有限公司 Node mapping method, node mapping device, mapping equipment and readable storage medium
CN114448960A (en) * 2021-12-27 2022-05-06 天翼云科技有限公司 Scheduling system, method, device, equipment and medium
CN114679467A (en) * 2022-03-23 2022-06-28 中国联合网络通信集团有限公司 Multi-block chain cooperative service method, block chain service system and cooperative service system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546774A (en) * 2011-12-27 2012-07-04 厦门市美亚柏科信息股份有限公司 CDN (content distribution network) routing method for secondary redirection and system
CN103414777A (en) * 2013-08-15 2013-11-27 网宿科技股份有限公司 Distributed geographic information matching system and method based on content distribution network
CN103825837A (en) * 2014-02-19 2014-05-28 上海视云网络科技有限公司 Node load distributed CDN global scheduling method
WO2015100558A1 (en) * 2013-12-30 2015-07-09 华为技术有限公司 Method and apparatus for managing physical address of network device
CN106713495A (en) * 2017-01-20 2017-05-24 北京海泰方圆科技股份有限公司 Uploading method and apparatus, access method and apparatus, and access system of IP geographic position
CN107566477A (en) * 2017-08-28 2018-01-09 北京奇艺世纪科技有限公司 A kind of method and apparatus that file is obtained in distributed file system cluster
CN107613030A (en) * 2017-11-06 2018-01-19 网宿科技股份有限公司 A kind of method and system of processing business request

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101989986A (en) * 2010-10-28 2011-03-23 北京瑞汛世纪科技有限公司 Method for inquiring service node, server and system
CN107277561A (en) * 2016-04-08 2017-10-20 北京优朋普乐科技有限公司 Content distributing network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546774A (en) * 2011-12-27 2012-07-04 厦门市美亚柏科信息股份有限公司 CDN (content distribution network) routing method for secondary redirection and system
CN103414777A (en) * 2013-08-15 2013-11-27 网宿科技股份有限公司 Distributed geographic information matching system and method based on content distribution network
WO2015100558A1 (en) * 2013-12-30 2015-07-09 华为技术有限公司 Method and apparatus for managing physical address of network device
CN103825837A (en) * 2014-02-19 2014-05-28 上海视云网络科技有限公司 Node load distributed CDN global scheduling method
CN106713495A (en) * 2017-01-20 2017-05-24 北京海泰方圆科技股份有限公司 Uploading method and apparatus, access method and apparatus, and access system of IP geographic position
CN107566477A (en) * 2017-08-28 2018-01-09 北京奇艺世纪科技有限公司 A kind of method and apparatus that file is obtained in distributed file system cluster
CN107613030A (en) * 2017-11-06 2018-01-19 网宿科技股份有限公司 A kind of method and system of processing business request

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于内容发布网络_CDN_的域名解析系统;秦臻;《中国博士学位论文全文数据库》;20121215;全文 *

Also Published As

Publication number Publication date
CN109040337A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN109040337B (en) Information query method, edge server and information query system
Fan et al. Blockchain-based secure time protection scheme in IoT
US10715485B2 (en) Managing dynamic IP address assignments
CN107230056B (en) Quick transaction system based on block chain contract
CN103905572B (en) The processing method and processing device of domain name mapping request
CN108833610B (en) Information updating method, device and system
US8681995B2 (en) Supporting DNS security in a multi-master environment
US10862872B1 (en) Message-based database replication
US10855660B1 (en) Private virtual network replication of cloud databases
JP6954709B1 (en) Domain name management system based on blockchain
CN112702402A (en) System, method, device, processor and storage medium for realizing government affair information resource sharing and exchange based on block chain technology
CN106973125A (en) Domain name mapping implementation method and device
CN111917896A (en) Credible domain name resolution method, system, electronic equipment and storage medium
Henze et al. Practical data compliance for cloud storage
WO2018188607A1 (en) Stream processing method and device
CN103269371A (en) EPC network DS checking method and system based on Anycast
CN108881257B (en) Encryption transmission method for distributed search cluster and encryption transmission distributed search cluster
US11157454B2 (en) Event-based synchronization in a file sharing environment
CN113542013A (en) Method, device and equipment for distributing virtualized network function management messages
CN112801795A (en) Block chain multi-chain management method and device, electronic equipment and readable storage medium
CN116684425B (en) Block chain data processing method, system, device and computer equipment
CN110244912B (en) Caching method of data distribution system
CN116132249A (en) Website content distribution network architecture determination method, device and readable 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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210604