CN114448815A - CDN node data generation method and device based on network topology and computer equipment - Google Patents

CDN node data generation method and device based on network topology and computer equipment Download PDF

Info

Publication number
CN114448815A
CN114448815A CN202111619766.4A CN202111619766A CN114448815A CN 114448815 A CN114448815 A CN 114448815A CN 202111619766 A CN202111619766 A CN 202111619766A CN 114448815 A CN114448815 A CN 114448815A
Authority
CN
China
Prior art keywords
node
target areas
byte
target
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.)
Granted
Application number
CN202111619766.4A
Other languages
Chinese (zh)
Other versions
CN114448815B (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.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud 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 Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202111619766.4A priority Critical patent/CN114448815B/en
Publication of CN114448815A publication Critical patent/CN114448815A/en
Application granted granted Critical
Publication of CN114448815B publication Critical patent/CN114448815B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • 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/10Protocols in which an application is distributed across nodes in the network

Abstract

The invention discloses a CDN node data generation method, a device and computer equipment based on network topology, wherein the method comprises the steps of splitting binary network values corresponding to initial network addresses of two target areas according to first different bytes obtained by comparing from high order to low order by the binary network values corresponding to the initial network addresses of the two target areas, creating network topology maps of a plurality of target areas by generating virtual network addresses of the two target areas and generating parent-child relationship topology maps of the two target areas, so that the number of nodes is obviously reduced, the node insertion speed is improved, and the response speed of CDN node data is finally ensured.

Description

CDN node data generation method and device based on network topology and computer equipment
Technical Field
The invention relates to the technical field of CDN (Content Delivery Network) node data generation, in particular to a CDN node data generation method and device based on Network topology and computer equipment.
Background
The CDN is a content delivery network, which forms an intelligent virtual network on the basis of the Internet with node servers arranged at each position of the network, and can redirect the request of a user to a service node closest to the user according to the comprehensive information such as network flow, connection of each node, load condition, distance to the user, response time and the like in real time, so that the user can obtain required content nearby, the crowded condition of the Internet network is solved, and the response speed of the user for accessing a website is improved.
With the increasing demand of 5G and internet big data, the user experience requirements of high bandwidth and low time delay are increasing, and in order to adapt to the demand, CDN node data is sunk and refined based on network topology. The network topology is a CDN node service end, and the nodes are sunk to the edge in a regional layering mode to realize local network service provision for users, so that delay and blockage caused by the fact that the users access across cities and even across provinces are reduced.
Because the CDN node server can perform regional layering on each province and maintain an address base based on an IP address section according to the sinking requirements of different provinces. With the continuous subdivision of the granularity of sinking nodes, from province to city, to county, and even to access network, there will be thousands of areas in the whole country, and each area contains tens of hundreds of IP address segments, so the content of the address base will also be greatly expanded, as shown in fig. 1.
In the related art, a network topology structure is often formed by starting from the 0 th bit of an IP address and according to the value of each bit one by one, the 0 value is located on the left side of an entry node, and the 1 value is located on the right side of the entry node. The network topology of IPV4 can support up to 32-level nodes, and the network topology of IPV6 can support up to 128-level nodes. If nodes are created according to different byte values of the IP address, all path nodes on the path must be created simultaneously in each process of creating a valid node. For example: the IP network address segment 132.24.173.4/24 requires 23 path nodes to be created to ensure that the valid content of the destination address segment node can be retrieved, obviously, the memory consumption is very serious, and for the network topology of IPV6, the invalid memory consumption is more serious because the number of bits of the IP address is increased to 128 bits. Therefore, in the related art, nodes are created sequentially according to different byte values of the IP address, which not only causes a slow creation speed and increases memory consumption, but also affects a response speed of scheduling CDN node data.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the problems in the prior art that nodes are created one by one according to different byte values of an IP address, which not only has a slow creation speed and increases the consumption of a memory, but also affects the response speed of scheduling CDN node data, thereby providing a CDN node data generation method, apparatus, and computer device based on a network topology.
According to a first aspect, an embodiment of the present invention provides a CDN node data generation method based on a network topology, including the following steps:
step S11: acquiring initial network addresses of a plurality of target areas;
step S12: determining first different bytes which are obtained by comparing binary network values corresponding to initial network addresses of two target areas from high order to low order;
step S13: generating virtual network addresses of two target areas according to the same byte positioned on the first side of the first different byte and the different byte positioned on the second side of the first different byte and the last byte;
step S14: generating parent-child relationship topological graphs of the two target areas according to the initial network addresses of the two target areas and the virtual network addresses of the two target areas;
step S15: and executing the steps S12-S14 according to the topological graph of the parent-child relationship between the two target areas and the different bytes positioned on the second side of the first different byte, and generating the target network topological graphs of the plurality of target areas.
In one embodiment, generating virtual network addresses for two target areas based on a same byte located on a first side of a first different byte and a last byte located on a second side of the first different byte comprises:
acquiring byte bits of the same byte positioned on the first side of the first different byte;
respectively converting the same byte positioned at the first side of the first different byte into a decimal numerical value, setting the different byte positioned at the second side of the first different byte as a first numerical value, and taking the byte bit number of the same byte positioned at the first side of the first different byte as the last byte of the virtual network address to generate the virtual network address.
In one embodiment, generating a parent-child relationship topological graph of two target areas according to initial network addresses of the two target areas and virtual network addresses of the two target areas comprises:
respectively determining a first area as a father node and a second area as a child node in the two target areas, and connecting the father node and the child node to form a node edge;
if the first different byte is a first numerical value, the child node is positioned at a first side of the father node, and if the first different byte is a second numerical value, the child node is positioned at a second side of the father node;
and taking the virtual network address or the initial network address as the attribute parameter of the node edge, and setting node parameters on the father node and/or the child node, thereby generating a father-child relationship topological graph of two target areas.
In one embodiment, the steps S12-S14 are executed according to the topology map of parent-child relationship between two target areas and different bytes located at the second side of the first different byte, and the target network topology map of multiple target areas is generated, including:
generating a parent-child relationship topological graph which forms a plurality of groups based on the plurality of target areas by executing the step S12-the step S14;
in the multiple sets of parent-child relationship topological graphs, the multiple sets of parent-child relationship topological graphs are combined together to generate a target network topological graph of multiple target areas by executing the steps S12-S14.
In an embodiment, the CDN node data generation method based on network topology in the embodiment of the present invention further includes:
determining a target position of a node to be inserted in the target network topological graph, and acquiring a target node at the target position;
and determining the position of the node to be inserted at the target node according to the current network addresses of the target node and the node to be inserted.
In an embodiment, in the CDN node data generation method based on network topology in the embodiment of the present invention, the initial network address data of the multiple target areas is obtained by a CDN data scheduling node.
In one embodiment, the user searches the target network topology map for the target network address by indexing.
According to a second aspect, an embodiment of the present invention further provides a CDN node data generating apparatus based on a network topology, including the following modules:
the initial network address acquisition module is used for acquiring initial network addresses of a plurality of target areas;
a network address byte determining module, configured to determine a first different byte obtained by comparing a binary network value corresponding to the initial network addresses of the two target areas from a high bit to a low bit;
the virtual network address generating module is used for generating virtual network addresses of two target areas according to the same byte positioned on the first side of the first different byte and the last byte positioned on the second side of the first different byte;
the parent-child relationship topological graph generating module is used for generating parent-child relationship topological graphs of the two target areas according to the initial network addresses of the two target areas and the virtual network addresses of the two target areas;
and the target network topological graph generating module is used for sequentially executing the network address byte determining module, the virtual network address generating module and the parent-child relationship topological graph generating module to generate the target network topological graphs of the plurality of target areas according to the different bytes positioned on the second side of the first different bytes and the parent-child relationship topological graphs of the two target areas.
According to a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and the computer instructions are configured to cause the computer to execute the CDN node data generation method based on the network topology described in the first aspect or any implementation manner of the first aspect.
According to a fourth aspect, an embodiment of the present invention further provides a computer device, including: the CDN node data generating method comprises a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the CDN node data generating method based on a network topology according to the first aspect or any embodiment of the first aspect.
The technical scheme of the invention has the following advantages:
the invention provides a CDN node data generation method, a CDN node data generation device and computer equipment based on network topology, wherein the method comprises the following steps: step S11: acquiring initial network addresses of a plurality of target areas; step S12: determining first different bytes which are obtained by comparing binary network values corresponding to initial network addresses of two target areas from high order to low order; step S13: generating virtual network addresses of two target areas according to the same byte positioned on the first side of the first different byte and the different byte positioned on the second side of the first different byte and the last byte; step S14: generating parent-child relationship topological graphs of the two target areas according to the initial network addresses of the two target areas and the virtual network addresses of the two target areas; step S15: and executing the steps S12-S14 according to the topological graph of the parent-child relationship between the two target areas and the different bytes positioned on the second side of the first different byte, and generating the target network topological graphs of the plurality of target areas. According to the invention, the binary network values corresponding to the initial network addresses of the two target areas are split according to the first different bytes obtained by comparing the initial network addresses of the two target areas from high order to low order, the virtual network addresses of the two target areas are generated, and the network topological graphs of a plurality of target areas are created based on the generated parent-child relationship topological graphs of the two target areas, so that the number of nodes is obviously reduced, the node insertion speed is improved, and the response speed of CDN node data is finally ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic diagram of region layering and node sinking of IP address segments in different regions according to an embodiment of the present invention;
fig. 2 is a specific flowchart of a CDN node data generation method based on a network topology;
fig. 3 is a schematic structural diagram of a system of CDN data scheduling nodes in an embodiment of the present invention;
FIG. 4 is a schematic diagram of generating a target network topology map in an embodiment of the invention;
fig. 5 is another specific flowchart of the CDN node data generation method based on the network topology in the embodiment of the present invention;
FIG. 6 is a target network topology graph of a plurality of target areas generated based on a parent-child relationship topology graph in an embodiment of the present invention;
fig. 7 is a block diagram of a CDN node data generation apparatus based on a network topology;
fig. 8 is a hardware diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it is to be understood that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The embodiment of the invention provides a CDN node data generation method based on network topology, as shown in FIG. 2, comprising the following steps:
step S11: initial network addresses of a plurality of target areas are acquired.
The plurality of target areas may be any areas marked on the nationwide provinces or cities or counties or villages or maps. The initial network address is an initial network address obtained by the CDN data scheduling node, for example: the initial IP network address of province A is 132.24.173.4/24.
Fig. 3 is a schematic system structure diagram of a CDN data scheduling node. In fig. 3. The local DNS cache server is used for caching IP data according to ECS (user source IP) information through an IP database of a regional area partitioned based on an IP address field, and meanwhile, a regional layered IP database after national node sinking is established in the DNS authority server and used for responding to EDNS (DNS request carrying ECS information) recursive query. As the granularity of node sinking is continuously refined (how to refine) the subdivided regions in the whole country may reach thousands of regions, each region contains hundreds of IP address segments, and the data volume of the CDN data scheduling node with multiple processes and high concurrence is very large.
Step S12: determining the first different bytes which are obtained by comparing the binary network values corresponding to the initial network addresses of the two target areas from the high order to the low order.
For example: the two target areas are respectively a city B and a city C, the initial network address of the city B is 58.57.64.0/19, the initial network address of the city C is 60.235.48.0/20, wherein the binary network value corresponding to 58.57.64.0/19 is 00111010001110010100000000000000/19, and the binary network value corresponding to 60.235.48.0/20 is 00111100111010110011000000000000/20. The high order bits are located on the left side of the binary network value and the low order bits are located on the right side of the binary network value.
For example: b, market: 00111010001110010100000000000000/19, respectively;
for example: c, market: 00111100111010110011000000000000/20, respectively;
the first different bytes of the binary network values of the B city and the C city are respectively 0 and 1 by comparing from high to low.
For example: the initial network address of the initial source node corresponds to a binary network value of 0, and the initial source node can be used as an entry source node, as shown in fig. 4. The initial network address of city A is 222.173.184.0/24, which corresponds to a binary network value of 11011110101011011011100000000000/24.
For example: a market: 11011110101011011011100000000000/24, respectively;
for example: an entrance source node: 00000000000000000000000000000000/0, respectively;
the first different bytes of the binary network values of the city A and the entry source node are respectively 1 and 0 through comparison from high to low.
The first different bytes obtained by comparing the binary network values corresponding to the initial network addresses of the two target areas from the high order to the low order can be split the different bytes of the binary network values of the two target areas, which is beneficial to effectively reducing the number of nodes in the process of generating the target network topological graph.
Step S13: the virtual network addresses of the two target areas are generated according to the same byte located on the first side of the first different byte, and the different byte and the last byte located on the second side of the first different byte.
The first side is the left side and the second side is the right side, and the virtual network address is an invalid network address.
For example: b, market: 00111010001110010100000000000000/19, respectively;
for example: c, market: 00111100111010110011000000000000/20, respectively;
the first different bytes of the binary network values of the city B and the city C are respectively 0 and 1, the same bytes at the first sides of the first different bytes 0 and 1 are 00111, and the last bytes at the second sides of the first different bytes of the binary network values of the city B and the city C are respectively 19 and 20.
In one embodiment, the step S13 of generating virtual network addresses of two target areas according to the same byte located at the first side of the first different byte and the different byte located at the second side of the first different byte and the last byte includes:
the first step is as follows: the byte bit number of the same byte located on the first side of the first different byte is obtained.
For example: b, market: 00111010001110010100000000000000/19, respectively;
for example: c, market: 00111100111010110011000000000000/20, respectively;
by comparing the high order to the low order, the first different bytes of the binary network values of the city B and the city C are respectively 0 and 1, and the same byte is 00111, it can be seen that the byte number of the same byte is 5, that is, the first five bits of the binary network addresses of the city B and the city C are the same.
The second step is that: respectively converting the same byte positioned at the first side of the first different byte into a decimal value, setting the different byte positioned at the second side of the first different byte as a first value, and taking the byte bit number of the same byte positioned at the first side of the first different byte as the last byte of the virtual network address to generate the virtual network address.
The first value here is 0.
For example: b, market: 00111010001110010100000000000000/19, respectively;
the same byte located on the first side of the first different byte 0 is 00111, which is converted to a decimal value of 56, the different byte located on the second side of the first different byte is 010001110010100000000000000, which is set to a first value, i.e. 0, the same byte located on the first side of the first different byte 0 is 00111, which has a byte number of 5, resulting in 56.0.0.0/5, i.e. a virtual network address.
Step S14: and generating parent-child relationship topological graphs of the two target areas according to the initial network addresses of the two target areas and the virtual network addresses of the two target areas.
In one embodiment, as shown in fig. 5, the step S14 of generating a topology map of parent-child relationships between two target areas according to the initial network addresses of the two target areas and the virtual network addresses of the two target areas includes:
step S51: and respectively determining the first area as a father node and the second area as a child node in the two target areas, and connecting the father node and the child node to form a node edge.
For example: a market: 11011110101011011011100000000000/24, respectively;
for example: an entrance source node: 00000000000000000000000000000000/0, respectively;
the first different bytes of the binary network values of the city A and the entry source node are respectively 1 and 0 through comparison from high to low.
Here, the first area may be an entry source node, the entry source node is a parent node, the second area is an a city, the a city is a child node, and the entry source node and the a city are connected to form a node edge therebetween.
In fig. 4, for example: and the B city and the path node, wherein the first area is the path node, the second area is the B city, the path node is taken as a father node, the B city is taken as a child node, and the path node and the B city are connected to form a node edge between the path node and the B city.
In fig. 4, for example: and the C city and the path nodes, wherein the first area is the path node, the second area is the C city, the path node is taken as a father node, the C city is taken as a child node, and the path node and the C city are connected to form a node edge between the path node and the C city.
Step S52: if the first byte is the first value, the child node is located on the first side of the father node, and if the first byte is the second value, the child node is located on the second side of the father node.
For example: b, market: 00111010001110010100000000000000/19, respectively;
for example: c, market: 00111100111010110011000000000000/20, respectively;
comparing from high to low to obtain the first different bytes of binary network values of B city and C city as 0 and 1 respectively; in fig. 4, if the path node is a parent node, for city B, the first byte is a first value 0, and for city C, the first byte is a second value 1, so that the city B is located on the left side of the path node, that is, the child node is located on the first side of the parent node; then C city is located to the right of the path node, i.e., the child node is located on the second side of the parent node.
For example: a market: 11011110101011011011100000000000/24, respectively;
for example: an entrance source node: 00000000000000000000000000000000/0, respectively;
comparing from high to low to obtain the first different bytes of binary network values of the city A and the entrance source node as 1 and 0 respectively; in fig. 4, if the entry source node is the parent node, and for a city, the first byte is the second value 1, then the a city is located on the right side of the entry source node, that is, the child node is located on the second side of the parent node.
Step S53: and taking the virtual network address or the initial network address as an attribute parameter of a node edge, setting node parameters on a father node and/or a child node, and further generating a father-son relation topological graph of two target areas.
For example: in FIG. 4, the virtual network address is 56.0.0.0/5, the initial network address of city A is 222.173.184.0/24, the initial network address of city B is 58.57.64.0/19, and the initial network address of city C is 60.235.48.0/20, which are used as node edges. Wherein 222.173.184.0/24, 58.57.64.0/19 are valid node network addresses, and 56.0.0.0/5 are invalid network addresses. The attribute may be considered as a key value, and the node parameter may be considered as a value. Since 56.0.0.0/5 is an invalid network address, in fig. 4, the path node Value is NULL, and 222.173.184.0/24, 58.57.64.0/19 are valid node network addresses, then the Value exists in reality.
In fig. 4, a parent-child relationship topological graph of two nodes is formed based on the parent-child relationship established between two nodes, that is, the parent-child relationship topological graph of two target areas is generated.
Step S15: and executing the steps S12-S14 according to the topological graph of the parent-child relationship between the two target areas and the different bytes positioned on the second side of the first different byte, and generating the topological graph of the target network of the plurality of target areas.
For example: if a plurality of provinces exist in the country, if a target network topological graph is generated for the plurality of provinces in the country, the target network topological graph is established for the plurality of target areas, and the nodes are sunk to the edge in a regional layering mode to be continuously refined in a regional layering mode.
In one embodiment, the step S15, executing steps S12-S14 according to the topology map of parent-child relationships between different bytes located at the second side of the first different byte of the header and two target areas, generating the target network topology map of the plurality of target areas, includes:
the first step is as follows: by executing steps S12-S14, a parent-child relationship topological graph is generated that constitutes a plurality of groups based on a plurality of target areas.
The second step is that: in the multiple sets of parent-child relationship topological graphs, the multiple sets of parent-child relationship topological graphs are combined together by executing steps S12-S14, and then target network topological graphs of multiple target areas are generated.
For the multiple sets of parent-child relationship topological graphs, the multiple sets of parent-child relationship topological graphs need to be spliced together, and the splicing mode is still executed according to the modes of the steps S12 to S14.
In an embodiment, the CDN node data generation method based on the network topology in the embodiment of the present invention further includes:
the first step is as follows: and determining the target position of the node to be inserted in the target network topological graph, and acquiring the target node at the target position.
The second step is that: and determining the position of the node to be inserted at the target node according to the current network addresses of the target node and the node to be inserted.
For example: in fig. 4, in order to identify a node to be inserted in the target network topology, it is necessary to first identify whether the node is inserted at a position of an a city, a B city, or a C city, and if the node is inserted in the a city, the a city is used as a target node, and if the node is inserted in the B city, the B city is used as a target node, and if the node is inserted in the C city, the C city is used as a target node. Then, for example: if the node is inserted into the A city, the A city is taken as a target node, the current network address of the A city is 222.173.184.0/24, and if the node to be inserted is the current network of the node to be inserted
Element(s) Description of the invention
addr Key: valid IP address of connected node, note: edge does not require value
len Key length: IP address effective length of connected node
node Connected child nodes
parent_node Connected parent node
parent_index Edge indication connecting parent nodes: indicating which child side left and right of the parent node is the side, 0 is the left child side, and 1 is the right child side
The network address is 222.173.184.0/20, and the node to be inserted is determined to be positioned at the upper layer position or the lower layer position of the A city based on 222.173.184.0/24 and 222.173.184.0/20. Since the subnet length of 222.173.184.0/20 is less than 222.173.184.0/24, the node to be inserted is located at the upper layer of the target node.
As shown in table 1 below, the node structure of the target network topology, and as shown in table 2 below, the edge structure of the target network topology.
TABLE 1
Figure BDA0003437530810000151
The node structure is specifically realized by the following code forms:
Figure BDA0003437530810000152
table 2 the above edge structure is specifically implemented by the following exemplary code forms:
Figure BDA0003437530810000161
in an embodiment, in the CDN node data generation method based on the network topology in the embodiment of the present invention, a user searches for a target network address in a target network topology map in an indexing manner.
The specific indexing mode is as follows, the indexing mode adopts the same bit-by-bit comparison as the traditional indexing mode, and ensures that the comparison times are not changed, so the query efficiency is not changed.
The first step is as follows: inputting parameters: the address to be indexed, IP, the effective length of the address segment to be indexed is sourcemask;
and secondly, starting from the root node, carrying out a process of edge selection → contrast edge selection → > … … until the index is successful or failed.
Wherein, in the process of edge selection: and starting from the root node, selecting the child edges according to the parent edges of the nodes, namely traversing the tree. If the address is on one side at this time, the address is marked as side, and the key in the side is addr/len in the edge structure, then the direction of the next traversal is selected according to the len bit value of the IP address segment to be searched, namely IP [ side → len ]. If IP [ side → len ] ═ 0 then selects the left child side of the node to which the side is connected next, and if IP [ side → len ] ═ 1 then selects the right child side of the node to which the side is connected next, the parent side of the root node (i.e., the entry source node in the above description) can be understood as 0.0.0.0/0.
Wherein, in the process of comparison: and judging whether the side- > addr/len address segment stored in the current edge contains the IP/sourcemask of the node to be indexed by adopting a bit-by-bit comparison mode, wherein the condition that the front len bit of addr is completely consistent with the front len bit of the IP address segment is included. If not, indicating that the node to be indexed does not exist in the tree and the indexing fails; otherwise, continuing to check the tree.
Note that: the digit between the len of the parent edge and the len of the edge at the moment is compared, and the comparison is guaranteed to be consistent with the index mode because the front len of the parent edge is completed in the last comparison process.
And (3) an index success condition: after the comparison is completed, if the len value of the traversed edge is consistent with the sourcemask, and the attribute value of the node connected with the edge is not null (if the value is null, the node is a path node), the node is the node to be indexed, and the indexing is successful.
As shown in fig. 6, based on the network topology map generated by successively creating nodes according to different byte values of an IP address in a conventional manner, in fig. 6, it can be seen that there are 58 nodes and 55 path nodes in total except for a root, and in fig. 4, there is only one path node in the target network topology map generated in the embodiment of the present invention, and therefore, in comparison, the more the number of nodes in the network topology map in fig. 6 is, the more structure bodies are occupied, the greater the memory overhead is, and the depth of the network topology map can be significantly reduced by generating fig. 4, so that the response speed of scheduling CDN node data is increased.
In summary, in the CDN node data generation method based on the network topology in the embodiment of the present invention, binary network values corresponding to initial network addresses of two target areas are split according to first different bytes obtained by comparing from a high bit to a low bit, and the virtual network addresses of the two target areas are generated, and a network topology map of a plurality of target areas is created based on generating a parent-child relationship topology map of the two target areas, so that the number of nodes is significantly reduced, the node insertion speed is increased, and the response speed of CDN node data is finally ensured.
Based on the same concept, an embodiment of the present invention further provides a CDN node data generating device based on a network topology, as shown in fig. 8, including the following modules:
an initial network address obtaining module 81, configured to obtain initial network addresses of multiple target areas;
a network address byte determining module 82, configured to determine a first different byte obtained by comparing the binary network values corresponding to the initial network addresses of the two target areas from the high order to the low order;
a virtual network address generating module 83, configured to generate virtual network addresses of two target areas according to the same byte located on a first side of the first different byte and the different byte and last byte located on a second side of the first different byte;
a parent-child relationship topological graph generating module 84, configured to generate parent-child relationship topological graphs of two target areas according to the initial network addresses of the two target areas and the virtual network addresses of the two target areas;
and the target network topology map generating module 85 is configured to sequentially execute the network address byte determining module, the virtual network address generating module, and the parent-child relationship topology map generating module to generate target network topology maps of a plurality of target areas according to the different bytes located on the second side of the first different byte and the parent-child relationship topology maps of the two target areas.
Based on the same concept, the embodiment of the present invention further provides a computer device, as shown in fig. 8, the computer device may include a processor 81 and a memory 82, where the processor 81 and the memory 82 may be connected by a bus or in another manner, and fig. 8 takes the example of connection by a bus as an example.
Processor 81 may be a Central Processing Unit (CPU). The Processor 81 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 82, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules. The processor 81 executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory 82, that is, implements the CDN node data generation method based on the network topology in the above embodiments.
The memory 82 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 81, and the like. Further, the memory 82 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 82 may optionally include memory located remotely from the processor 81, which may be connected to the processor 81 via a network. Examples of such networks include, but are not limited to, the power grid, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 82, and when executed by the processor 81, perform the CDN node data generation method based on the network topology in the embodiment shown in the drawings. The details of the computer device can be understood by referring to the corresponding related descriptions and effects in the embodiments shown in the drawings, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. This need not be, nor should it be exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

Claims (10)

1. A CDN node data generation method based on network topology is characterized by comprising the following steps:
step S11: acquiring initial network addresses of a plurality of target areas;
step S12: determining first different bytes which are obtained by comparing binary network values corresponding to initial network addresses of two target areas from high order to low order;
step S13: generating virtual network addresses of two target areas according to the same byte positioned on the first side of the first different byte and the different byte positioned on the second side of the first different byte and the last byte;
step S14: generating parent-child relationship topological graphs of the two target areas according to the initial network addresses of the two target areas and the virtual network addresses of the two target areas;
step S15: and executing the steps S12-S14 according to the topological graph of the parent-child relationship between the two target areas and the different bytes positioned on the second side of the first different byte, and generating the target network topological graphs of the plurality of target areas.
2. The method for generating CDN node data based on a network topology as recited in claim 1, wherein generating virtual network addresses for two target areas according to a same byte located on a first side of a first different byte and a last byte located on a second side of the first different byte comprises:
acquiring byte bits of the same byte positioned on the first side of the first different byte;
respectively converting the same byte positioned at the first side of the first different byte into a decimal numerical value, setting the different byte positioned at the second side of the first different byte as a first numerical value, and taking the byte bit number of the same byte positioned at the first side of the first different byte as the last byte of the virtual network address to generate the virtual network address.
3. The method for generating CDN node data based on network topology according to claim 1, wherein generating parent-child relationship topological graphs of two target areas according to initial network addresses of the two target areas and virtual network addresses of the two target areas includes:
respectively determining a first area as a father node and a second area as a child node in the two target areas, and connecting the father node and the child node to form a node edge;
if the first different byte is a first numerical value, the child node is positioned at a first side of the father node, and if the first different byte is a second numerical value, the child node is positioned at a second side of the father node;
and taking the virtual network address or the initial network address as an attribute parameter of the node edge, setting node parameters on the father node and/or the child node, and further generating a father-child relationship topological graph of two target areas.
4. The method for generating CDN node data based on network topology as recited in claim 1, wherein the steps S12-S14 are performed according to the topology graph of parent-child relationships between two target areas and different bytes located on the second side of the first different byte, so as to generate a target network topology graph for a plurality of target areas, including:
generating a parent-child relationship topological graph which forms a plurality of groups based on the plurality of target areas by executing the step S12-the step S14;
in the multiple sets of parent-child relationship topological graphs, the multiple sets of parent-child relationship topological graphs are combined together to generate a target network topological graph of multiple target areas by executing the steps S12-S14.
5. The method for generating CDN node data based on a network topology according to claim 1 or 4, further comprising:
determining a target position of a node to be inserted in the target network topological graph, and acquiring a target node at the target position;
and determining the position of the node to be inserted at the target node according to the current network addresses of the target node and the node to be inserted.
6. The method for generating CDN node data based on a network topology according to any one of claims 1 to 4, wherein the initial network address data of the plurality of target areas is obtained by a CDN data scheduling node.
7. The method as claimed in claim 6, wherein the user searches the target network address in the target network topology map by indexing.
8. A CDN node data generation device based on network topology is characterized by comprising the following modules:
the initial network address acquisition module is used for acquiring initial network addresses of a plurality of target areas;
a network address byte determining module, configured to determine a first different byte obtained by comparing a binary network value corresponding to the initial network addresses of the two target areas from a high bit to a low bit;
the virtual network address generating module is used for generating virtual network addresses of two target areas according to the same byte positioned on the first side of the first different byte and the last byte positioned on the second side of the first different byte;
the parent-child relationship topological graph generating module is used for generating parent-child relationship topological graphs of the two target areas according to the initial network addresses of the two target areas and the virtual network addresses of the two target areas;
and the target network topological graph generating module is used for sequentially executing the network address byte determining module, the virtual network address generating module and the parent-child relationship topological graph generating module to generate the target network topological graphs of the plurality of target areas according to the different bytes positioned on the second side of the first different bytes and the parent-child relationship topological graphs of the two target areas.
9. A computer-readable storage medium storing computer instructions for causing a computer to perform CDN node data generation based on a network topology as recited in any one of claims 1 through 7.
10. A computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the CDN node data generation method based on the network topology according to any one of claims 1 to 7.
CN202111619766.4A 2021-12-27 2021-12-27 CDN node data generation method and device based on network topology and computer equipment Active CN114448815B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111619766.4A CN114448815B (en) 2021-12-27 2021-12-27 CDN node data generation method and device based on network topology and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111619766.4A CN114448815B (en) 2021-12-27 2021-12-27 CDN node data generation method and device based on network topology and computer equipment

Publications (2)

Publication Number Publication Date
CN114448815A true CN114448815A (en) 2022-05-06
CN114448815B CN114448815B (en) 2023-11-03

Family

ID=81365180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111619766.4A Active CN114448815B (en) 2021-12-27 2021-12-27 CDN node data generation method and device based on network topology and computer equipment

Country Status (1)

Country Link
CN (1) CN114448815B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040024729A1 (en) * 2002-07-30 2004-02-05 Worley John S. Method and system for storing sparse data in memory and accessing stored sparse data
CN103475704A (en) * 2013-09-06 2013-12-25 中国科学院计算技术研究所 Method for virtual node configuration for virtual cluster application
US20140189155A1 (en) * 2012-12-27 2014-07-03 Deep River Ventures, Llc Methods, Systems, and Computer Program Products for Determining a Protocol Address For a Node
CN104301445A (en) * 2013-07-15 2015-01-21 北京邮电大学 Mobile Internet data transmission method and system
CN104796469A (en) * 2015-04-15 2015-07-22 北京中油瑞飞信息技术有限责任公司 Method and device for configuring cloud computing platforms
US20160085684A1 (en) * 2014-09-23 2016-03-24 Cisco Technology, Inc. Multi-level paging and address translation in a network environment
CN105872091A (en) * 2016-05-30 2016-08-17 乐视控股(北京)有限公司 Data requesting method and device
CN105933234A (en) * 2016-04-20 2016-09-07 乐视控股(北京)有限公司 Node management method and system in CDN network
US20170230287A1 (en) * 2016-02-04 2017-08-10 Trinity Mobile Networks, Inc. Overloading Address Space For Improved Routing, Diagnostics, And Content-Relay Network
US20180032441A1 (en) * 2016-07-29 2018-02-01 Qualcomm Incorporated Updating virtual memory addresses of target application functionalities for an updated version of application binary code
US9979602B1 (en) * 2014-08-25 2018-05-22 Cisco Technology, Inc. Network function virtualization infrastructure pod in a network environment
CN110063045A (en) * 2016-12-08 2019-07-26 华为技术有限公司 Message processing method and equipment in cloud computing system
US20200183854A1 (en) * 2018-12-10 2020-06-11 International Business Machines Corporation Identifying location of data granules in global virtual address space

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040024729A1 (en) * 2002-07-30 2004-02-05 Worley John S. Method and system for storing sparse data in memory and accessing stored sparse data
US20140189155A1 (en) * 2012-12-27 2014-07-03 Deep River Ventures, Llc Methods, Systems, and Computer Program Products for Determining a Protocol Address For a Node
CN104301445A (en) * 2013-07-15 2015-01-21 北京邮电大学 Mobile Internet data transmission method and system
CN103475704A (en) * 2013-09-06 2013-12-25 中国科学院计算技术研究所 Method for virtual node configuration for virtual cluster application
US9979602B1 (en) * 2014-08-25 2018-05-22 Cisco Technology, Inc. Network function virtualization infrastructure pod in a network environment
US20160085684A1 (en) * 2014-09-23 2016-03-24 Cisco Technology, Inc. Multi-level paging and address translation in a network environment
CN104796469A (en) * 2015-04-15 2015-07-22 北京中油瑞飞信息技术有限责任公司 Method and device for configuring cloud computing platforms
US20170230287A1 (en) * 2016-02-04 2017-08-10 Trinity Mobile Networks, Inc. Overloading Address Space For Improved Routing, Diagnostics, And Content-Relay Network
CN105933234A (en) * 2016-04-20 2016-09-07 乐视控股(北京)有限公司 Node management method and system in CDN network
CN105872091A (en) * 2016-05-30 2016-08-17 乐视控股(北京)有限公司 Data requesting method and device
US20180032441A1 (en) * 2016-07-29 2018-02-01 Qualcomm Incorporated Updating virtual memory addresses of target application functionalities for an updated version of application binary code
CN110063045A (en) * 2016-12-08 2019-07-26 华为技术有限公司 Message processing method and equipment in cloud computing system
US20200183854A1 (en) * 2018-12-10 2020-06-11 International Business Machines Corporation Identifying location of data granules in global virtual address space

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ARNON SAENGARUNWONG: "A Two-Step Server Selection in Hybrid CDN-P2P Mesh-based for Video-on-Demand Streaming", 2018 INTERNATIONAL CONFERENCE ON INFORMATION AND COMMUNICATION TECHNOLOGY CONVERGENCE *
鄂金龙: "异构云存储服务协同的数据传输优化研究", 中国优秀硕士学位论文数据库 *

Also Published As

Publication number Publication date
CN114448815B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
EP3236365A1 (en) Data query method and device
CN103051543B (en) A kind of process of route prefix, search, increase and delet method
CN108875006B (en) Method and device for determining IP address region
CN109729183B (en) Request processing method, device, equipment and storage medium
CN110413845B (en) Resource storage method and device based on Internet of things operating system
CN111680489B (en) Target text matching method and device, storage medium and electronic equipment
CN110674427B (en) Method, device, equipment and storage medium for responding to webpage access request
CN113268550A (en) Method and system for scheduling autonomous domain system, electronic device and storage medium
CN104636368A (en) Data retrieval method and device and server
CN111447292A (en) IPv6 geographical position positioning method, device, equipment and storage medium
CN114221929A (en) Address translation method, apparatus, device, medium, and computer program product
CN112115328B (en) Page flow map construction method and device and computer readable storage medium
CN114448815A (en) CDN node data generation method and device based on network topology and computer equipment
CN113411364B (en) Resource acquisition method and device and server
CN104301182A (en) Method and device for inquiring slow website access abnormal information
CN114398567A (en) Multi-time-state power grid topological graph data management method and device and computer equipment
CN112817983A (en) Handle identifier analysis caching method, query method and handle identifier analysis system
CN112231481A (en) Website classification method and device, computer equipment and storage medium
CN107545026B (en) Method and device for realizing function of interface name analysis tree
US11799962B1 (en) Method, electronic device, and computer program product for looking up data
CN114201520B (en) Method and device for rapidly retrieving IP address and electronic equipment
CN114124887B (en) View query method of DNS server, DNS server and readable storage medium
CN111159146B (en) Processing method and device for embedded database
CN117389533A (en) Data aggregation method and device, electronic equipment and storage medium
CN115858542A (en) GeoIPv6 tree-shaped indexing method, system and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant