Information determination method, device, equipment and computer readable storage medium

By using the target base and number of bits in DNS to build a hierarchical data structure and binary tree, it can quickly match the target IP address and domain name file, solve the problem of low efficiency in determining the target access address in DNS, and achieve efficient domain name query.

CN116233064BActive Publication Date: 2024-09-13CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111480903.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2024-09-13
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

The existing Domain Name Service System (DNS) is inefficient in determining the target access address, mainly due to the large number of IP information and domain name files in the view information, resulting in inefficient matching process.

Method used

Use a hierarchical data structure based on the target base and target number of digits to construct a target binary tree, convert IP information into a base number sequence, determine the node relationship of the view information in the data structure, and quickly match the target IP address and domain name based on this relationship files to improve query efficiency.

Benefits of technology

Through hierarchical data structure and binary tree matching technology, the efficiency of determining the target access address is significantly improved, reducing the one-by-one analysis and matching of DNS view information and domain name files, and improving the query speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233064B
    Figure CN116233064B
Patent Text Reader

Abstract

The embodiment of the present application discloses an information determination method, which includes: obtaining view information and a data structure with a hierarchical relationship in a domain name system DNS; wherein the view information includes Internet protocol IP information and a domain name file; for each view information, determining the node of the view information in the data structure based on the IP information, and determining the first relationship between the view information and the node; based on the first relationship and the data structure, determining the second relationship between the IP address, the target node in the data structure and the domain name of the domain name file; receiving a query request sent by a terminal for querying a target access address; responding to the query request, determining the target domain name file corresponding to the domain name to be queried based on the target IP address, the domain name to be queried, the second relationship and the data structure; determining the target access address from the target domain name file, and sending the target access address to the terminal. The embodiment of the present application also discloses an information determination device, equipment and computer-readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to information determination technology in the field of information determination, and in particular to an information determination method, device, equipment and computer-readable storage medium. Background Art

[0002] The Domain Name System (DNS) is used to provide a mutual conversion service between domain names and Internet Protocol (IP) addresses. In the related art, when the DNS system receives a query request sent by a terminal, it matches the IP address of the terminal that sent the query request with each IP information in the DNS view information, and matches the domain name to be queried with the domain name of each domain name file in the DNS view information to determine the target access address, wherein the domain name file includes at least one access address. However, due to the large number of IP information and domain names in the DNS view information, the efficiency of determining the target access address is low. Summary of the invention

[0003] To solve the above technical problems, the embodiments of the present application hope to provide an information determination method, apparatus, device and computer-readable storage medium, which solve the problem of low efficiency in determining the target access address and improve the efficiency of determining the target access address.

[0004] The technical solution of this application is implemented as follows:

[0005] A method for determining information, the method comprising:

[0006] Obtaining view information and a data structure with a hierarchical relationship in a domain name system DNS; wherein the view information includes Internet protocol IP information and a domain name file; and the data structure is determined based on a target base and a target number of bits;

[0007] For each piece of view information, determine a node of the view information in the data structure based on the IP information, and determine a first relationship between the view information and the node;

[0008] Based on the first relationship and the data structure, determining a second relationship between the IP address, the target node in the data structure, and the domain name of the domain name file;

[0009] Receiving a query request sent by a terminal for querying a target access address; wherein the query request carries the target IP address of the terminal and the domain name to be queried;

[0010] In response to the query request, based on the target IP address, the domain name to be queried, the second relationship and the data structure, determine a target domain name file corresponding to the domain name to be queried;

[0011] A target access address is determined from the target domain name file, and the target access address is sent to the terminal.

[0012] In the above solution, the step of obtaining a data structure having a hierarchical relationship includes:

[0013] Determining the target base system and the target number of bits based on the target Internet protocol;

[0014] Based on the target base and the target number of bits, a target binary tree is constructed according to a target distribution rule.

[0015] In the above solution, for each piece of view information, determining a node of the view information in the data structure based on the IP information, and determining a first relationship between the view information and the node includes:

[0016] For each view information, convert the IP information to obtain a base number sequence;

[0017] Determine a network number from the binary number sequence, and determine a node of the view information in the target binary tree based on the network number;

[0018] The first relationship between the view information and the node is determined.

[0019] In the above solution, the determining, based on the first relationship and the data structure, the second relationship between the IP address, the target node in the data structure, and the domain name of the domain name file includes:

[0020] Determine, based on the first relationship and the target binary tree, a third relationship among the IP address, the target node, and the view information;

[0021] Based on the third relationship and the domain name corresponding to the domain name file in the view information, the second relationship between the IP address, the target node and the domain name in the domain name file is determined.

[0022] In the above solution, determining the third relationship between the IP address, the target node and the view information based on the first relationship and the target binary tree includes:

[0023] For each leaf node of the target binary tree, based on the first relationship and a path node on a path between the leaf node and a root node in the target binary tree, determine view information corresponding to the path node;

[0024] Based on the view information corresponding to the path node, a third relationship among the IP address, the leaf node and the view information is determined.

[0025] In the above scheme, the responding to the query request, based on the target IP address, the domain name to be queried, the second relationship and the data structure, determines the target domain name file corresponding to the domain name to be queried, including:

[0026] In response to the query request, determining a domain name of a domain name file corresponding to the target IP address based on the target IP address, the second relationship and the data structure;

[0027] The target domain name file is determined based on the domain name to be queried and the domain name of the domain name file corresponding to the target IP address.

[0028] In the above scheme, the responding to the query request and determining the domain name of the domain name file corresponding to the target IP address based on the target IP address, the second relationship and the data structure includes:

[0029] In response to the query request, the target IP address is converted into a base number to obtain a target base number sequence;

[0030] Analyze the target binary tree to determine the target leaf node corresponding to the target base number sequence in the target binary tree;

[0031] Based on the target leaf node and the second relationship, the domain name of the domain name file corresponding to the target IP address is determined.

[0032] An information determination device, the device comprising:

[0033] An acquisition unit, used for acquiring view information and a data structure with a hierarchical relationship in a domain name system DNS; wherein the view information includes Internet protocol IP information and a domain name file; and the data structure is determined based on a target base and a target number of bits;

[0034] The determining unit is further used to determine a second relationship between the IP address, the target node in the data structure, and the domain name of the domain name file based on the first relationship and the data structure;

[0035] A receiving unit, configured to receive a query request sent by a terminal for querying a target access address; wherein the query request carries a target IP address of the terminal and a domain name to be queried;

[0036] The determination unit is further configured to respond to the query request and determine a target domain name file corresponding to the domain name to be queried based on the target IP address, the domain name to be queried, the second relationship and the data structure;

[0037] A sending unit is used to determine a target access address from the target domain name file and send the target access address to the terminal.

[0038] An information determination device, the device comprising: a processor, a memory, and a communication bus;

[0039] The communication bus is used to realize the communication connection between the processor and the memory;

[0040] The processor is used to execute the information determination program stored in the memory to implement the following steps:

[0041] Obtaining view information and a data structure with a hierarchical relationship in a domain name system DNS; wherein the view information includes Internet protocol IP information and a domain name file; and the data structure is determined based on a target base and a target number of bits;

[0042] For each piece of view information, determine a node of the view information in the data structure based on the IP information, and determine a first relationship between the view information and the node;

[0043] Based on the first relationship and the data structure, determining a second relationship between the IP address, the target node in the data structure, and the domain name of the domain name file;

[0044] Receiving a query request sent by a terminal for querying a target access address; wherein the query request carries the target IP address of the terminal and the domain name to be queried;

[0045] In response to the query request, based on the target IP address, the domain name to be queried, the second relationship and the data structure, determine a target domain name file corresponding to the domain name to be queried;

[0046] A target access address is determined from the target domain name file, and the target access address is sent to the terminal.

[0047] A computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the above-mentioned information determination method.

[0048] The information determination method, apparatus, device and computer-readable storage medium provided in the embodiments of the present application obtain view information and a data structure with a hierarchical relationship in a domain name system DNS; wherein the view information includes Internet protocol IP information and a domain name file; the data structure is determined based on a target base and a target number of digits; for each view information, a node of the view information in the data structure is determined based on the IP information, and a first relationship between the view information and the node is determined; based on the first relationship and the data structure, a second relationship between the IP address, a target node in the data structure and a domain name in the domain name file is determined; a query request for querying a target access address sent by a terminal is received; wherein the query request carries a target IP address of the terminal and a domain name to be queried; in response to the query request, based on The method comprises the following steps: based on the target IP address, the domain name to be queried, the second relationship and the data structure, determining the target domain name file corresponding to the domain name to be queried; determining the target access address from the target domain name file, and sending the target access address to the terminal; in this way, it is not necessary to analyze each IP information and the domain name of each domain name file in the DNS view information to determine the target access address, and the node corresponding to the target IP address can be determined from the target node of the data structure according to the target IP address, and the domain name of the domain name file corresponding to the target IP address is obtained based on the node and the second relationship, and the target domain name file corresponding to the domain name to be queried is determined according to the domain name of the domain name file corresponding to the target IP address and the domain name to be queried, and then the target access address is determined from the target domain name file, thereby improving the efficiency of determining the target access address. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A flowchart of an information determination method provided in an embodiment of the present application;

[0050] Figure 2 A flowchart of another information determination method provided in an embodiment of the present application;

[0051] Figure 3 A schematic diagram of the structure of a target binary tree provided in an embodiment of the present application;

[0052] Figure 4 A schematic diagram of the structure of another target binary tree provided in an embodiment of the present application;

[0053] Figure 5 A schematic diagram of the structure of another target binary tree provided in an embodiment of the present application;

[0054] Figure 6 A schematic diagram of the structure of another target binary tree provided in an embodiment of the present application;

[0055] Figure 7 A schematic diagram of the structure of an information determination device provided in an embodiment of the present application;

[0056] Figure 8 A schematic diagram of the structure of an information determination device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0058] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0059] The embodiment of the present application provides an information determination method, which can be applied to an information determination device, referring to Figure 1 As shown, the method comprises the following steps:

[0060] Step 101: Obtain view information and a data structure with a hierarchical relationship in a domain name system DNS.

[0061] The view information includes Internet Protocol IP information and domain name files; the data structure is determined based on the target base and the target number of bits.

[0062] The data structure may be a tree data structure; each view information may include multiple IP information and multiple domain name files; the file name of the domain name file may be represented by a domain name, and the domain name file includes at least one access address.

[0063] In an embodiment of the present application, the information determination device and the DNS server may be different devices. The information determination device may initiate an acquisition request to the DNS server for obtaining DNS view information. The DNS server may retrieve the view information from a database in response to the acquisition request and send the view information to the information determination device. The information determination device receives and stores the view information so as to subsequently process the view information. The information determination device may be a DNS server, and the DNS server may directly retrieve the DNS view information from the database.

[0064] It should be noted that the data structure may be obtained before obtaining the view information, after obtaining the view information, or simultaneously with the view information. The target base and the target number of bits may be determined according to the target Internet protocol. The target Internet protocol may be Internet Protocol version 4 (IPv4) or Internet Protocol version 6 (IPv6).

[0065] Step 102: For each piece of view information, determine a node of the view information in the data structure based on the IP information, and determine a first relationship between the view information and the node.

[0066] The first relationship is a corresponding relationship between the view information and the nodes in the data structure; and the IP information includes an IP address and / or an IP segment.

[0067] In an embodiment of the present application, for each view information, the IP information in the view information may be analyzed to determine the node of the IP information in the view information in the data structure, thereby obtaining the node of the view information in the data structure, and determining the first relationship between the view information and the node.

[0068] In a feasible implementation, the view information A includes IP information m1, IP information m2, domain name file n1 and domain name file n2. When the node of the IP information m1 in the data structure is determined to be the first node, the relationship between the view information A and the first node can be determined. When the node of the IP information m2 in the data structure is determined to be the second node, the relationship between the view information A and the second node can be determined. By traversing all the view information, the first relationship between the view information and the nodes can be obtained. For the same view information, multiple nodes of the view information in the data structure can be determined in the data structure according to different IP information in the view information, and the relationship between the view information and the multiple nodes can be determined.

[0069] Step 103: Based on the first relationship and the data structure, determine a second relationship between the IP address, the target node in the data structure, and the domain name in the domain name file.

[0070] Among them, the nodes between the first layer and the last layer of the data structure can form multiple paths, among which the nodes of the last layer are target nodes, and the target node can correspond to an IP address. For any target node, each value in the IP address corresponding to the target node can be found in the node in the unique path between the target node and the node of the first layer. Among them, the nodes of the first layer do not represent any values, and each node outside the nodes of the first layer can represent a value. If the target base is binary, then the value represented by each node can be 0 or 1. The number of layers of the data structure can be calculated by the number of target bits + 1.

[0071] In an embodiment of the present application, based on the first relationship between the view information and the node, the nodes on each path in the data structure can be analyzed to determine the second relationship between the IP address, the target node, and the domain name of the domain name file in the view information. The second relationship represents the corresponding relationship between the IP address, the target node, and the domain name of the domain name file in the view information.

[0072] Step 104: receiving a query request sent by a terminal for querying a target access address.

[0073] The query request carries the target IP address of the terminal and the domain name to be queried; the query request may be sent by the network user to the information determination device through the terminal; the domain name to be queried is the domain name requested to be resolved by the network user.

[0074] In an embodiment of the present application, the information determination device can receive a query request and parse the query request to obtain a target IP address and a domain name to be queried.

[0075] Step 105: In response to the query request, based on the target IP address, the domain name to be queried, the second relationship and the data structure, determine the target domain name file corresponding to the domain name to be queried.

[0076] In an embodiment of the present application, the information determination device can respond to a query request, analyze the data structure according to the target IP address, determine the node in the target node of the data structure that corresponds to the target IP address, and based on the node and the second relationship, determine the domain name of the domain name file corresponding to the IP address on the node, and determine the target domain name file based on the domain name to be queried and the domain name of the domain name file corresponding to the IP address on the node.

[0077] Step 106: Determine the target access address from the target domain name file, and send the target access address to the terminal.

[0078] In an embodiment of the present application, the access address of the target domain name file can be screened to obtain the target access address, and the target access address can be sent to the terminal.

[0079] In a feasible implementation, the region to which the user belongs can be determined based on the target IP address, and the access address of the target domain name file can be screened based on the region to which the network user belongs, to determine a website closest to the network user, and use the access address of the website as the target access address.

[0080] The information determination method provided in the embodiment of the present application obtains view information and a data structure with a hierarchical relationship in the domain name system DNS; wherein the view information includes Internet interconnection protocol IP information and a domain name file; the data structure is determined based on a target base and a target number of digits; for each view information, a node of the view information in the data structure is determined based on the IP information, and a first relationship between the view information and the node is determined; based on the first relationship and the data structure, a second relationship between the IP address, a target node in the data structure and a domain name in the domain name file is determined; a query request for querying a target access address sent by a terminal is received; wherein the query request carries a target IP address of the terminal and a domain name to be queried; in response to the query request, based on the target IP address, The domain name to be queried, the second relationship and the data structure are used to determine the target domain name file corresponding to the domain name to be queried; the target access address is determined from the target domain name file, and the target access address is sent to the terminal; in this way, it is not necessary to analyze each IP information and the domain name of each domain name file in the DNS view information to determine the target access address, and the node corresponding to the target IP address can be determined from the target node of the data structure according to the target IP address, and the domain name of the domain name file corresponding to the target IP address is obtained based on the node and the second relationship, and the target domain name file corresponding to the domain name to be queried is determined according to the domain name of the domain name file corresponding to the target IP address and the domain name to be queried, and the target access address is determined from the target domain name file, thereby improving the efficiency of determining the target access address.

[0081] Based on the above embodiments, the present application provides an information determination method, referring to Figure 2 As shown, the method comprises the following steps:

[0082] Step 201: The information determination device obtains view information and a data structure with a hierarchical relationship in a domain name system DNS.

[0083] Wherein, obtaining the data structure with a hierarchical relationship in step 201 can be implemented by steps a1 and a2:

[0084] Step a1: Determine the target base and target number of bits based on the target Internet protocol.

[0085] The target Internet protocol may be preset. The target Internet protocol may be IPv4 or IPv6. The target base and the target number of bits are determined by the target Internet protocol.

[0086] In a feasible implementation, if the target Internet protocol is IPv4, the address length of IPv4 is 32, that is, the IPv4 address can be written as a 32-bit binary address, so the target bit number can be 32 and the target base is binary. If the target Internet protocol is IPv6, the IPv6 address length is 128 bits, that is, the IPv6 address can be written as a 128-bit binary address, so the target bit number can be 128 and the target base is binary.

[0087] Step a2: The information determination device constructs a target binary tree based on the target base and the target number of bits according to the target distribution rule.

[0088] The data structure includes a target binary tree. When the target base is binary, the target distribution rule indicates that the child nodes of all nodes are distributed in 0, 1 or 1, 0.

[0089] In the embodiment of the present application, the number of layers of the target binary tree to be constructed can be determined according to the target number of bits, and the value range of each node in the target binary tree to be constructed can be determined according to the target base, and the target binary tree can be constructed according to the number of layers and the value range of the nodes according to the target distribution law. Wherein, the number of layers = the target number of bits + 1.

[0090] In a feasible implementation, the target system is binary, then the value of each node can be 0 or 1, the target number of bits is 32, then the number of layers is 32+1=33, and the target binary tree is constructed according to the distribution of 0 and 1 of the child nodes of each node, such as Figure 3 As shown, the first node in the target binary tree is the root node and does not represent any value. There are a total of 33 nodes on the path from each leaf node to the root node in the target binary tree (including leaf nodes and root nodes). Except for the root node, each node corresponds to a value (0 or 1). The values ​​corresponding to the nodes from the root node to the leaf node in the path are sorted in sequence to obtain a 32-bit binary IP address, and the IP address can be represented in the leaf node, that is, the number of leaf nodes is the number of binary IP addresses corresponding to the IPV4 address, specifically 2 to the power of 32.

[0091] Step 202: The information determination device converts the IP information for each view information to obtain a base number sequence.

[0092] The IP information includes an IP address and / or an IP segment address.

[0093] In the embodiment of the present application, the IP information may be converted into a base-based number to obtain a base-based number sequence.

[0094] In a feasible implementation, if the IP information is an IPv4 decimal IP address, the IP information may be converted into a 32-bit binary number sequence.

[0095] Step 203: The information determination device determines a network number from the binary number sequence, and determines a node of the view information in the target binary tree based on the network number.

[0096] In the embodiment of the present application, based on the number of bits of the subnet mask in the IP information, the network number of the IP information is determined from the binary number sequence, and the data structure is analyzed from the root node according to the network number to determine the node of the network number in the target binary tree, and the node of the view information in the target binary tree is obtained. The target binary tree is a complete binary tree.

[0097] In one possible implementation, Figure 4As shown in the figure, if the IP information is "192.0.0.0 / 2", where "2" is the number of bits of the subnet mask, the binary number sequence obtained after converting "192.0.0.0 / 2" to binary is "1100000000000000000000000000000000 / 2", where the first "2" digits from left to right are the network number, which is specifically "11". According to "11", the node with a value of 1 in the second layer of the target binary tree can be determined, and then the node with a child node of 1 can be determined. The point is taken as the first node, and the node where the view information of "192.0.0.0 / 2" is located in the target binary tree is the first node; if the IP information is "160.0.0.0 / 3", where "3" is the number of bits of the subnet mask, the hexadecimal number sequence obtained after converting "160.0.0.0 / 3" into binary is "10100000000000000000000000000000000 / 3", and the first "3" digits from left to right are the network number, which is "101". 1" determines the second node in the target binary tree, and determines that the node where the view information of "160.0.0.0 / 3" is located in the target binary tree is the second node; if the IP information is "255.255.255.254 / 32", where "32" is the number of bits in the subnet mask, the hexadecimal number sequence obtained after converting "255.255.255.254 / 32" to binary is "111111111111111111111111111110 / 32", where the first "32" bits from left to right are The number is the network number, which is specifically "1111111111111111111111111111111110". The third node can be determined in the target binary tree according to "1111111111111111111111111111110", and the node where the view information of "255.255.255.254 / 32" is located in the target binary tree is determined as the third node. Among them, the number of bits of the subnet mask of the IP address is 32, and the number of bits of the subnet mask of the IP segment address is less than 32.

[0098] Step 204: The information determination device determines a first relationship between the view information and the node.

[0099] In the embodiment of the present application, a correspondence relationship between the view information and the node in the target binary tree where the view information is located may be established to obtain a first relationship.

[0100] Specifically, a correspondence relationship between the identifier of the view information and the node of the view information in the target binary tree may be established to obtain a first relationship; wherein the identifier of the view information is used to uniquely refer to the view information.

[0101] In a feasible implementation, continuing the above example, Figure 4 As shown, the relationship between the view information where "192.0.0.0 / 2" is located and the first node of the view information in the target binary tree can be determined to obtain the relationship between the first node and the view information, and the relationship between the view information where "160.0.0.0 / 3" is located and the second node of the view information in the target binary tree can be determined to obtain the relationship between the second node and the view information, and the relationship between the view information where "255.255.255.254 / 32" is located and the third node in the target binary tree can be determined to obtain the relationship between the third node and the view information, and the relationship between each node and the view information can be determined in turn to obtain the first relationship between the view information and the node, which can also be called the first relationship between the node and the view information.

[0102] Among them, if the view information where "192.0.0.0 / 2" is identified as view1, the relationship between view1 and the first node can be determined; if the view information where "160.0.0.0 / 3" is identified as view2, the relationship between view2 and the second node can be established; if the view information where "255.255.255.254 / 32" is identified as view3, the relationship between view3 and the third node can be determined.

[0103] Step 205: The information determination device determines a third relationship among the IP address, the target node, and the view information based on the first relationship and the target binary tree.

[0104] Among them, the target node is a leaf node in the target binary tree.

[0105] In an embodiment of the present application, traversal is performed from each leaf node in the target binary tree to the root node, and based on the first relationship, the relationship between the nodes on the path between each leaf node and the root node and the view information is determined, and the relationship between each node on the path and the view information is analyzed to determine the third relationship between the IP address, the target node, and the view information.

[0106] Wherein, step 205 can be implemented by steps b1 and b2:

[0107] Step b1: The information determination device determines, for each leaf node of the target binary tree, view information corresponding to the path node based on the first relationship and the path nodes on the path between the leaf node and the root node in the target binary tree.

[0108] Among them, each leaf node corresponds to an IP address.

[0109] In the embodiment of the present application, for each leaf node of the target binary tree, a path node on the path between the leaf node and the root node (i.e., a node on the path) is determined, and view information of the path node is determined based on the path node and the first relationship. The path node may include all nodes on the path except the root node.

[0110] In a feasible implementation, if the view information of the second node in the path (the first node is the root node, excluding the root node) is represented by view1 and view2, the view information of the third node is represented by view3, and the view information of the nth node is represented by viewx, then the view information of the path node is a set of view information of nodes (including leaf nodes) on the path except the root node, wherein the set includes at least view1, view2, view3 and viewx.

[0111] Step b2: The information determination device determines a third relationship between the IP address, the leaf node and the view information based on the view information corresponding to the path node.

[0112] In an embodiment of the present application, the view information corresponding to the path node can be used as the target information of the leaf node, and the IP address can be obtained according to the numerical value corresponding to the path node on the path between the leaf node and the root node, and the relationship between the IP address and the leaf node is determined, and then the relationship between the IP address, the leaf node and the target information is determined, and the third relationship between the IP address, the leaf node and the view information is obtained; wherein each leaf node corresponds to an IP address.

[0113] In a feasible implementation method, if the numerical values ​​corresponding to the nodes on the path between the leaf node and the root node are "10010000100000001000000010000000", the binary IP address is "0000000100000001000000100001001", which can be expressed as "1.1.1.9" in decimal. Then the IP address corresponding to the leaf node is "1.1.1.9", and the relationship between "1.1.1.9" and the target information of the leaf node can be determined. If the target information is represented by the identifier of the view information, the target information includes view1 and view3, and the relationship between the leaf node, "1.1.1.9" and "view1 and view3" can be determined.

[0114] Step 206: The information determination device determines a second relationship between the IP address, the target node, and the domain name in the domain name file based on the third relationship and the domain name corresponding to the domain name file in the view information.

[0115] In an embodiment of the present application, the third relationship between the IP address, leaf node and view information and the domain name corresponding to the domain name file in the view information can be analyzed to determine the second relationship between the IP address, target node and the domain name in the domain name file in the view information.

[0116] In a feasible implementation method, if the third relationship represents the relationship between the leaf node corresponding to the IP address "3.3.0.5 / 32" and view2, where the domain names of the domain name file in the view information corresponding to view2 are c.cn, d.tk and e.com, then the second relationship between the leaf node corresponding to "3.3.0.5 / 32" and "c.cn, d.tk and e.com" can be determined.

[0117] Step 207: The information determination device responds to the query request and determines the domain name of the domain name file corresponding to the target IP address based on the target IP address, the second relationship and the data structure.

[0118] In an embodiment of the present application, the information determination device can respond to the query request, determine the node corresponding to the target IP address of the terminal in the data structure, and determine the domain name of the domain name file corresponding to the IP address of the node according to the node and the second relationship, and obtain the domain name of the domain name file corresponding to the target IP address. Among them, the node corresponding to the target IP address of the terminal in the data structure is a leaf node.

[0119] Wherein, step 207 can be implemented through steps c1 to c3:

[0120] Step c1, the information determination device responds to the query request, performs base conversion on the target IP address, and obtains a target base number sequence.

[0121] In an embodiment of the present application, if the target binary tree is constructed according to IPV4 and the target IP address is expressed in decimal, then the target IP address can be converted into binary form to obtain a 32-bit binary number sequence corresponding to the target IP address; if the target binary tree is constructed according to IPV6 and the target IP address is expressed in hexadecimal, then the target IP address can be converted into binary form to obtain a 128-bit binary number sequence corresponding to the target IP address. Among them, the target IP address can be an IPV4 address, which is usually expressed in decimal; it can also be an IPV6 address, which is usually expressed in hexadecimal.

[0122] Step c2: The information determination device analyzes the target binary tree to determine the target leaf node corresponding to the target base number sequence in the target binary tree.

[0123] In an embodiment of the present application, the target binary tree can be analyzed, the first bit value in the target base number sequence can be matched with the value of the node in the second layer of the target binary tree, the second layer target node can be determined from the nodes in the second layer of the target binary tree, and the second bit value in the target base number sequence can be matched with the value of the child node of the second layer target node in the third layer to determine the third layer target node, and the target leaf node corresponding to the target base number sequence in the target binary tree can be determined by matching the value in the target base number sequence with the value of the node in the target binary tree in turn, thereby improving the efficiency of determining the target leaf node.

[0124] In a feasible implementation, the target IP address is the IPV4 address "255.255.255.254 / 32", "255.255.255.254 / 32" can be converted into binary to get "11111111111111111111111111111110 / 32", and the target binary tree is built based on IPV4. Then for "111111111111111111111111111110", From left to right, match the first digit "1" with the value of the node in the second layer of the target binary tree to obtain the second-layer target node whose value is 1, and determine the third-layer target node that matches the second digit "1" among the child nodes of the second-layer target node in the nodes of the third layer. Then, determine the fourth-layer target node that matches the third digit "1" among the child nodes of the third-layer target node in the nodes of the fourth layer, and match according to this rule until the thirty-third layer target node, that is, the target leaf node, is matched.

[0125] Step c3: The information determination device determines the domain name of the domain name file corresponding to the target IP address based on the IP address corresponding to the target leaf node and the second relationship.

[0126] In the embodiment of the present application, the domain name of the domain name file corresponding to the IP address of the target leaf node can be determined according to the IP address corresponding to the target leaf node and the second relationship, and the domain name of the domain name file corresponding to the target IP address can be obtained; wherein the IP address corresponding to the target leaf node carries the identifier of the target leaf node. The domain name of the domain name file corresponding to the IP address of the target leaf node can also be determined according to the target leaf node, the IP address corresponding to the target leaf node, and the second relationship, and the domain name of the domain name file corresponding to the target IP address can be obtained; wherein the IP address corresponding to the target leaf node does not carry the identifier of the target leaf node.

[0127] It should be noted that after obtaining the target leaf node, the IP address corresponding to the target leaf node can be determined based on the target leaf node and the second relationship, and it can be determined whether the target IP address is the same as the IP address corresponding to the target leaf node. When it is determined that the target IP address is the same as the IP address corresponding to the target leaf node, the domain name of the domain name file corresponding to the target IP address can be determined based on the IP address of the target leaf node and the second relationship, so as to avoid inaccurate determination of the target leaf node, which will result in inaccurate target access address, and further improve the accuracy of the determined target access address.

[0128] Step 208: The information determination device determines the target domain name file based on the domain name to be queried and the domain name of the domain name file corresponding to the target IP address.

[0129] In the embodiment of the present application, the domain name to be queried can be matched with the domain name of the domain name file corresponding to the target IP address, the target domain name corresponding to the domain name to be queried in the domain name file corresponding to the target IP address is determined, and the target domain name file is determined according to the target domain name. The name of the domain name file can be a domain name.

[0130] Step 209: The information determination device determines the target access address from the target domain name file and sends the target access address to the terminal.

[0131] It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.

[0132] The following is a detailed explanation of the information determination method provided in the embodiment of the present application with reference to examples:

[0133] As shown in Table 1, the view information in the DNS can be represented by view identifiers, specifically view1, view2, and view3; wherein, the IP information included in view1 is 1.1.1.0 / 24 and 2.2.2.0 / 24, and the domain name file includes a domain name file with a domain name of a.net and a domain name file with a domain name of b.com; the IP information included in view2 is 2.2.2.0 / 24 and 3.3.0.5 / 32, and the domain name file includes a domain name file with a domain name of c.cn, a domain name file with a domain name of d.tk, and a domain name file with a domain name of e.com; the IP information included in view3 is 1.1.1.0 / 24, and the domain name file is a domain name file with a domain name of f.top.

[0134] Identification of view information IP Information Domain name of the domain name file view1 1.1.1.0 / 24、2.2.2.0 / 24 a.net、b.com view2 2.2.2.0 / 24、3.3.0.5 / 32 c.cn, d.tk, e.com view3 1.1.1.0 / 24 f.top

[0135] Table 1

[0136] As shown in Table 2 and Figure 5As shown, each view information is traversed one by one, and the identifier of the view information is inserted into the corresponding node according to the IP information in the view information. After the traversal is completed, the node determined according to 1.1.1.0 / 24 is mounted with view1 and view3, the node determined according to 2.2.2.0 / 24 is mounted with view1 and view2, and the node determined according to 3.3.0.5 / 32 is mounted with view2.

[0137] IP Information Number of layers Identification of view information 1.1.1.0 / 24 25 view1、view3 2.2.2.0 / 24 25 view1, view2 3.3.0.5 / 32 33 view2

[0138] Table 2

[0139] There is a unique path from each leaf node to the root node. Summarize the identifiers of the view information corresponding to all nodes on the path and remove the duplicate view information identifiers to obtain a set of view information identifiers corresponding to the path, that is, the view information of the path node can be obtained. The view information of the path node can be used as the target information of the leaf node in the path. Table 3 shows an example of the view information corresponding to the IP addresses of three leaf nodes and the domain name of the domain name file:

[0140] Leaf Node Identification of view information The domain name of the leaf node's domain name file 1.1.1.9 view1、view3 a.net, b.com, f.top 2.2.2.7 view1, view2 a.net, b.com, c.cn, d.tk, e.com 3.3.0.5 view2 c.cn, d.tk, e.com

[0141] Table 3

[0142] The identifier of the view information in Table 3 and the domain name of the leaf node domain name file can be found in Figure 6 The corresponding target binary tree is used to represent it.

[0143] like Figure 6 As shown, if the target IP address is "1.1.1.9", "1.1.1.9" can be converted into a binary system to obtain the binary sequence corresponding to "1.1.1.9", and 32 matches are performed in the target binary tree based on the binary sequence to determine the target leaf node corresponding to "1.1.1.9" in the target binary tree, and determine the domain name of the domain name file corresponding to the target leaf node; wherein, the IP address corresponding to the target leaf node is the same as the target IP address, and the domain name of the domain name file corresponding to the target leaf node can be determined in advance based on the IP address of the target leaf node and the second relationship, so when querying, as long as the target leaf node corresponding to the target IP address in the target binary tree is found, the domain name of the domain name file corresponding to the target IP address can be determined. wherein, the domain names of the multiple domain name files corresponding to the target leaf node are presented in the form of a binary tree, wherein the memory address of the binary tree can be stored in the target leaf node, so that after determining the target leaf node, the binary tree can be obtained according to the address of the binary tree stored in the target leaf node, and the binary tree is traversed according to the domain name to be queried to obtain the domain name of the domain name file corresponding to the target IP address.

[0144] The following is an explanation of the information determination method provided by the present application in combination with the solutions in the related art.

[0145] Thousands of DNS policies can be configured in DNS, where one DNS policy corresponds to one view information, each view information includes multiple acl rule sets and multiple domain name files, and each acl rule set includes multiple IP information.

[0146] When determining the target access address in the related art, it is necessary to traverse the view information corresponding to each DNS policy one by one. Specifically, the target IP address of the terminal can be matched with the IP information in the acl rule set in the view information one by one. If there is an IP information in the acl rule set that can be matched, it means that the target view information where the matched acl rule set is located meets the conditions, and the domain name to be queried can be used to match the domain name of the domain name file in the target view information to obtain the target domain name file, and determine the target access address from the target domain name file; for a view information, if there is no IP information in the acl rule set that can match the target IP address of the terminal, it means that the view information does not meet the conditions, and the target IP address can be matched with the IP information of the acl rule set in the next view information to determine the target access address; assuming that there are n view information in the DNS, and each view information has There are n acl rule sets and n domain name files, each acl rule set contains n IP information, wherein the time complexity of each acl rule set is O(log2n), there are n acl rule sets in each view information, and the acl rule sets are traversed by linked lists, then the time complexity of the acl rule sets is O(n*log2n), the corresponding multiple domain name files in the view information can be presented in the form of a binary tree, wherein the name of the domain name file is the domain name, and the time complexity of the domain name of the domain name file presented in the form of a binary tree is O(log2n), the retrieval time complexity of a view information is O(n*log2n+log2n), and n view information is queried in linked list order, then the total time complexity of determining the target access address is O(n*(n*log2n+log2n)), when the number of view information and acl rule sets is huge, the efficiency of retrieval through linked lists is very low.

[0147] Another solution in the related art is to merge the acl rule sets of all view information and merge all domain name files, that is, to summarize the IP information in the acl rule set in the DNS to obtain an IP information set, and to summarize the domain name files to obtain a domain name file set, and to match the target IP address with the IP information set obtained after the summary to determine view information set 1, and to match the domain name to be queried with the domain name (file name) of the domain name file in the domain name file set to obtain view information set 2, to take the intersection of view information set 1 and view information set 2 to obtain the target view information, and to determine the target access address based on the target view information. In this way, since the IP information set and domain name file set obtained after the summary are very large, the number of matches is large and the retrieval time is long.

[0148] Therefore, it can be seen that the efficiency of determining the target access address in the related art is very low, while in the embodiment of the present application, the relationship between the nodes in the target binary tree and the view information can be established first, and then the view information of each node on the path can be determined according to the leaf nodes of the target binary tree to determine the IP address of the leaf node and the second relationship between the leaf node and the domain name of the domain name file. When parsing the domain name to be queried to determine the target access address, it is only necessary to determine the corresponding target leaf node according to the target IP address, and determine the domain name of the domain name file corresponding to the IP address of the target leaf node according to the target leaf node and the second relationship, and obtain the domain name of the domain name file corresponding to the target IP address, and match the domain name to be queried with the domain name of the domain name file corresponding to the target IP address to obtain the target domain name, and then determine the target domain name file corresponding to the target domain name, and further determine the target service address from the target domain name file, thereby improving the efficiency of determining the target service address. Moreover, if the target binary tree has I layers, it is only necessary to match the target IP address in the target binary tree I-1 times to determine the target leaf node corresponding to the target IP address, thereby reducing the number of matches, shortening the matching time, and further improving the efficiency of determining the target service address.

[0149] It should be noted that the target binary tree is built based on IPv4. No matter what DNS policy is set in the view information, the target IP address can determine the corresponding leaf node in the target binary tree. No matter how large the view information and the acl rule set are, the number of layers (depth) of the target binary tree is constant at 33 layers, and the performance will not be uncontrollable due to the huge DNS policy.

[0150] The information determination method provided by the embodiment of the present application does not need to analyze each IP information and the domain name of each domain name file in the DNS view information to determine the target access address. The node corresponding to the target IP address can be determined from the target node of the data structure according to the target IP address, and the domain name of the domain name file corresponding to the target IP address is obtained based on the node and the second relationship. The target domain name file corresponding to the domain name to be queried is determined according to the domain name of the domain name file corresponding to the target IP address and the domain name to be queried, and the target access address is determined from the target domain name file, thereby improving the efficiency of determining the target access address.

[0151] Based on the above embodiments, the embodiments of the present application provide an information determination device, which can be applied to Figures 1-2 In the information determination method provided in the corresponding embodiment, refer to Figure 7 As shown, the device may include: an acquisition unit 31, a determination unit 32, a receiving unit 33 and a sending unit 34, wherein:

[0152] The acquisition unit 31 is used to acquire the view information and the data structure with a hierarchical relationship in the domain name system DNS; wherein the view information includes the Internet protocol IP information and the domain name file; the data structure is determined based on the target base and the target number of bits;

[0153] a determining unit 32, configured to determine, for each piece of view information, a node of the view information in the data structure based on the IP information, and determine a first relationship between the view information and the node;

[0154] The determining unit 32 is further used to determine a second relationship between the IP address, the target node in the data structure, and the domain name of the domain name file based on the first relationship and the data structure;

[0155] The receiving unit 33 is used to receive a query request sent by the terminal for querying a target access address; wherein the query request carries the target IP address of the terminal and the domain name to be queried;

[0156] The determination unit 32 is further configured to respond to the query request and determine a target domain name file corresponding to the domain name to be queried based on the target IP address, the domain name to be queried, the second relationship and the data structure;

[0157] The sending unit 34 is used to determine the target access address from the target domain name file and send the target access address to the terminal.

[0158] In other embodiments of the present application, the acquisition unit 31 is further configured to perform the following steps:

[0159] Obtaining a target Internet protocol, and determining a target base and a target number of bits based on the target Internet protocol;

[0160] Based on the target base and target number of digits, a target binary tree is constructed according to the target distribution rule.

[0161] In other embodiments of the present application, the determining unit 32 is further configured to perform the following steps:

[0162] For each view information, convert the IP information to obtain a base number sequence;

[0163] Determine a network number from the binary number sequence, and determine a node of the view information in the target binary tree based on the network number;

[0164] A first relationship between the view information and the node is determined.

[0165] In other embodiments of the present application, the determining unit 32 is further configured to perform the following steps:

[0166] Determine, based on the first relationship and the target binary tree, a third relationship between the IP address, the target node, and the view information;

[0167] Based on the third relationship and the domain name corresponding to the domain name file in the view information, a second relationship between the IP address, the target node, and the domain name in the domain name file is determined.

[0168] In other embodiments of the present application, the determining unit 32 is further configured to perform the following steps:

[0169] For each leaf node of the target binary tree, based on the first relationship and the path nodes on the path between the leaf node and the root node in the target binary tree, determine view information corresponding to the path node;

[0170] Based on the view information corresponding to the path node, a third relationship among the IP address, the leaf node, and the view information is determined.

[0171] In other embodiments of the present application, the determining unit 32 is further configured to perform the following steps:

[0172] In response to the query request, determining a domain name of a domain name file corresponding to the target IP address based on the target IP address, the second relationship, and the data structure;

[0173] The target domain name file is determined based on the domain name to be queried and the domain name of the domain name file corresponding to the target IP address.

[0174] In other embodiments of the present application, the determining unit 32 is further configured to perform the following steps:

[0175] In response to the query request, the target IP address is converted into a base number to obtain a target base number sequence;

[0176] Analyze the target binary tree to determine the target leaf node corresponding to the target base number sequence in the target binary tree;

[0177] Based on the IP address corresponding to the target leaf node and the second relationship, the domain name of the domain name file corresponding to the target IP address is determined.

[0178] It should be noted that the specific implementation process of the steps performed by each unit in this embodiment can be referred to Figures 1-2 The implementation process of the information determination method provided in the corresponding embodiment will not be repeated here.

[0179] The information determination device provided in the embodiment of the present application does not need to analyze each IP information and the domain name of each domain name file in the DNS view information to determine the target access address. The node corresponding to the target IP address can be determined from the target node of the data structure according to the target IP address, and the domain name of the domain name file corresponding to the target IP address is obtained based on the node and the second relationship. The target domain name file corresponding to the domain name to be queried is determined according to the domain name of the domain name file corresponding to the target IP address and the domain name to be queried, and the target access address is determined from the target domain name file, thereby improving the efficiency of determining the target access address.

[0180] Based on the above embodiments, the embodiments of the present application provide an information determination device, which can be applied to Figures 1-2 In the information determination method provided in the corresponding embodiment, refer to Figure 8 As shown, the information determination device 3 may include: a processor 42, a memory 41 and a communication bus 43; wherein:

[0181] The communication bus 43 is used to realize the communication connection between the processor 42 and the memory 41;

[0182] The processor 42 is used to execute the information determination program stored in the memory 41 to implement the following steps:

[0183] Obtaining view information and a hierarchical data structure in a domain name system DNS; wherein the view information includes Internet protocol IP information and a domain name file; and the data structure is determined based on a target base and a target number of bits;

[0184] For each piece of view information, determine a node of the view information in the data structure based on the IP information, and determine a first relationship between the view information and the node;

[0185] Based on the first relationship and the data structure, determining a second relationship between the IP address, the target node in the data structure, and the domain name of the domain name file;

[0186] A query request for querying a target access address sent by a receiving terminal; wherein the query request carries a target IP address of the terminal and a domain name to be queried;

[0187] In response to the query request, based on the target IP address, the domain name to be queried, the second relationship and the data structure, determine a target domain name file corresponding to the domain name to be queried;

[0188] Determine the target access address from the target domain name file and send the target access address to the terminal.

[0189] In other embodiments of the present application, the processor 42 is used to execute the information determination program in the memory 41 to obtain a data structure with a hierarchical relationship to implement the following steps:

[0190] Obtaining a target Internet protocol, and determining a target base and a target number of bits based on the target Internet protocol;

[0191] Based on the target base and target number of digits, a target binary tree is constructed according to the target distribution rule.

[0192] In other embodiments of the present application, the processor 42 is used to execute the information determination program in the memory 41 to determine, for each view information, a node of the view information in the data structure based on the IP information, and determine a first relationship between the view information and the node, so as to implement the following steps:

[0193] For each view information, convert the IP information to obtain a base number sequence;

[0194] Determine a network number from the binary number sequence, and determine a node of the view information in the target binary tree based on the network number;

[0195] A first relationship between the view information and the node is determined.

[0196] In other embodiments of the present application, the processor 42 is used to execute the information determination program in the memory 41 to determine the second relationship between the IP address, the target node in the data structure, and the domain name of the domain name file based on the first relationship and the data structure, so as to implement the following steps:

[0197] Determine, based on the first relationship and the target binary tree, a third relationship between the IP address, the target node, and the view information;

[0198] Based on the third relationship and the domain name corresponding to the domain name file in the view information, a second relationship between the IP address, the target node, and the domain name in the domain name file is determined.

[0199] In other embodiments of the present application, the processor 42 is used to execute the information determination program in the memory 41 to determine the third relationship between the IP address, the target node, and the view information based on the first relationship and the target binary tree, so as to implement the following steps:

[0200] For each leaf node of the target binary tree, based on the first relationship and the path nodes on the path between the leaf node and the root node in the target binary tree, determine view information corresponding to the path node;

[0201] Based on the view information corresponding to the path node, a third relationship among the IP address, the leaf node, and the view information is determined.

[0202] In other embodiments of the present application, the processor 42 is used to execute the response query request of the information determination program in the memory 41, and determine the target domain name file corresponding to the domain name to be queried based on the target IP address, the domain name to be queried and the second relationship and data structure to implement the following steps:

[0203] In response to the query request, determining a domain name of a domain name file corresponding to the target IP address based on the target IP address, the second relationship, and the data structure;

[0204] The target domain name file is determined based on the domain name to be queried and the domain name of the domain name file corresponding to the target IP address.

[0205] In other embodiments of the present application, the processor 42 is used to execute the response query request of the information determination program in the memory 41, and determine the domain name of the domain name file corresponding to the target IP address based on the target IP address, the second relationship and the data structure, so as to implement the following steps:

[0206] In response to the query request, the target IP address is converted into a base number to obtain a target base number sequence;

[0207] Analyze the target binary tree to determine the target leaf node corresponding to the target base number sequence in the target binary tree;

[0208] Based on the IP address corresponding to the target leaf node and the second relationship, the domain name of the domain name file corresponding to the target IP address is determined.

[0209] It should be noted that the specific implementation process of the steps executed by the processor in this embodiment can refer to Figures 1-2 The implementation process of the information determination method provided in the corresponding embodiment will not be repeated here.

[0210] The information determination device provided by the embodiment of the present application does not need to analyze each IP information and the domain name of each domain name file in the DNS view information to determine the target access address. The node corresponding to the target IP address can be determined from the target node of the data structure according to the target IP address, and the domain name of the domain name file corresponding to the target IP address is obtained based on the node and the second relationship. The target domain name file corresponding to the domain name to be queried is determined according to the domain name of the domain name file corresponding to the target IP address and the domain name to be queried, and the target access address is determined from the target domain name file, thereby improving the efficiency of determining the target access address.

[0211] Based on the foregoing embodiments, the embodiments of the present application provide a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement Figures 1-2 The corresponding embodiments provide steps of the information determination method.

[0212] It should be noted that the above-mentioned computer-readable storage medium can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM) and other memories; it can also be various electronic devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0213] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0214] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0215] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0216] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0217] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0218] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0219] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for determining information, characterized in that: The method comprises: Obtaining view information and a data structure with a hierarchical relationship in a domain name system DNS; wherein the view information includes Internet protocol IP information and a domain name file; and the data structure is a tree data structure determined based on a target base and a target number of bits; For each piece of view information, determine a node of the view information in the data structure based on the IP information, and determine a first relationship between the view information and the node; Based on the first relationship and the data structure, determining a second relationship between the IP address, the target node in the data structure, and the domain name of the domain name file; Receiving a query request sent by a terminal for querying a target access address; wherein the query request carries the target IP address of the terminal and the domain name to be queried; In response to the query request, based on the target IP address, the domain name to be queried, the second relationship and the data structure, determine a target domain name file corresponding to the domain name to be queried; A target access address is determined from the target domain name file, and the target access address is sent to the terminal.

2. The method according to claim 1, characterized in that The step of obtaining a data structure having a hierarchical relationship includes: Determining the target base system and the target number of bits based on the target Internet protocol; Based on the target base and the target number of bits, a target binary tree is constructed according to a target distribution rule.

3. The method according to claim 2, characterized in that The step of determining, for each piece of the view information, a node of the view information in the data structure based on the IP information, and determining a first relationship between the view information and the node includes: For each view information, convert the IP information to obtain a base number sequence; Determine a network number from the binary number sequence, and determine a node of the view information in the target binary tree based on the network number; The first relationship between the view information and the node is determined.

4. The method according to claim 2, characterized in that The determining, based on the first relationship and the data structure, a second relationship between the IP address, the target node in the data structure, and the domain name in the domain name file includes: Determine, based on the first relationship and the target binary tree, a third relationship among the IP address, the target node, and the view information; Based on the third relationship and the domain name corresponding to the domain name file in the view information, the second relationship between the IP address, the target node and the domain name in the domain name file is determined.

5. The method according to claim 4, characterized in that The determining, based on the first relationship and the target binary tree, a third relationship among the IP address, the target node, and the view information includes: For each leaf node of the target binary tree, based on the first relationship and a path node on a path between the leaf node and a root node in the target binary tree, determine view information corresponding to the path node; Based on the view information corresponding to the path node, a third relationship among the IP address, the leaf node and the view information is determined.

6. The method according to claim 2, characterized in that The step of responding to the query request and determining a target domain name file corresponding to the domain name to be queried based on the target IP address, the domain name to be queried, the second relationship, and the data structure includes: In response to the query request, determining a domain name of a domain name file corresponding to the target IP address based on the target IP address, the second relationship and the data structure; The target domain name file is determined based on the domain name to be queried and the domain name of the domain name file corresponding to the target IP address.

7. The method according to claim 6, characterized in that The responding to the query request, based on the target IP address, the second relationship and the data structure, determining the domain name of the domain name file corresponding to the target IP address, comprises: In response to the query request, the target IP address is converted into a base number to obtain a target base number sequence; Analyze the target binary tree to determine the target leaf node corresponding to the target base number sequence in the target binary tree; Based on the target leaf node and the second relationship, the domain name of the domain name file corresponding to the target IP address is determined.

8. An information determination device, characterized in that: The device comprises: An acquisition unit, used for acquiring view information and a data structure with a hierarchical relationship in a domain name system DNS; wherein the view information includes Internet protocol IP information and a domain name file; and the data structure is a tree data structure determined based on a target base and a target number of bits; a determining unit, configured to determine, for each piece of view information, a node of the view information in the data structure based on the IP information, and determine a first relationship between the view information and the node; The determining unit is further used to determine a second relationship between the IP address, the target node in the data structure, and the domain name of the domain name file based on the first relationship and the data structure; A receiving unit, configured to receive a query request sent by a terminal for querying a target access address; wherein the query request carries a target IP address of the terminal and a domain name to be queried; The determination unit is further configured to respond to the query request and determine a target domain name file corresponding to the domain name to be queried based on the target IP address, the domain name to be queried, the second relationship and the data structure; A sending unit is used to determine a target access address from the target domain name file and send the target access address to the terminal.

9. An information determination device, characterized in that The device comprises: a processor, a memory and a communication bus; The communication bus is used to realize the communication connection between the processor and the memory; The processor is used to execute the information determination program stored in the memory to implement the following steps: Obtaining view information and a data structure with a hierarchical relationship in a domain name system DNS; wherein the view information includes Internet protocol IP information and a domain name file; and the data structure is a tree data structure determined based on a target base and a target number of bits; For each piece of view information, determine a node of the view information in the data structure based on the IP information, and determine a first relationship between the view information and the node; Based on the first relationship and the data structure, determining a second relationship between the IP address, the target node in the data structure, and the domain name of the domain name file; Receiving a query request sent by a terminal for querying a target access address; wherein the query request carries the target IP address of the terminal and the domain name to be queried; In response to the query request, based on the target IP address, the domain name to be queried, the second relationship and the data structure, determine a target domain name file corresponding to the domain name to be queried; A target access address is determined from the target domain name file, and the target access address is sent to the terminal.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the information determination method according to any one of claims 1 to 7.