Domain name policy matching method, server, computer program product and storage medium

By constructing a combined matching method of the first policy list and the second policy list, the speed problem of the domain name server in resolving domain names is solved, faster and more accurate domain name policy matching is achieved, and the performance of the domain name server is improved.

CN120692252APending Publication Date: 2025-09-23SHANGHAI YAMU COMMUNICATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511129174.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

When resolving domain names, the domain name server needs to match domain name policies through multiple hash tables, which reduces the resolution speed and affects performance.

Method used

A combined matching method of the first strategy list and the second strategy list is adopted to construct the first strategy list according to the matching frequency of the domain name information. Direct matching is performed when the first matching priority is met, and step-by-step matching is performed when the second matching priority is met, thereby reducing the number of hash table queries.

Benefits of technology

It improves the resolution speed of the domain name server and the efficiency of matching domain name strategies, reduces the frequency of memory calls, and improves the speed and accuracy of domain name resolution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120692252A_ABST
    Figure CN120692252A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and discloses a domain name strategy matching method, a server, a computer program product and a storage medium. In the method, a first server receives a first request message sent by terminal equipment, and the first request message comprises first domain name information and first identification information of the terminal equipment; when the first domain name information meets the first matching priority, a first domain name strategy matched with the first domain name information is obtained through matching of a first strategy list; and when the first domain name information meets the second matching priority, obtaining a first domain name strategy matched with the first domain name information through matching of a second strategy list. In this way, the first server effectively reduces the number of times of matching, and the speed of matching the domain name strategy by the domain name server is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a domain name policy matching method, server, computer program product, and storage medium. Background Art

[0002] When the domain name server receives the domain name resolution request sent by the terminal device, the domain name server can perform an operation of matching the domain name with the domain name policy based on the domain name information such as the domain name to be resolved and the domain name category contained in the domain name resolution request.

[0003] However, during this process, the domain name server needs to obtain a domain name policy that matches the domain name through multiple hash table matches, which reduces the speed of the domain name server in resolving the domain name and affects the performance of the domain name server. Summary of the Invention

[0004] To address the above issues, embodiments of the present application provide a domain name policy matching method, server, computer program product, and storage medium.

[0005] In a first aspect, the present application provides a domain name policy matching method, which is applied to a first server, and the first server is used to parse first domain name information sent by a terminal device. The domain name policy matching method includes: receiving a first request message sent by the terminal device, the first request message including first domain name information and first identification information of the terminal device; corresponding to the first domain name information satisfying a first matching priority, obtaining a first domain name policy that matches the first domain name information through a first policy list matching; corresponding to the first domain name information satisfying a second matching priority, obtaining a first domain name policy that matches the first domain name information through a second policy list matching.

[0006] In a possible implementation of the first aspect above, the first domain name information includes at least protocol identification information, server identification information, and top-level domain name information.

[0007] In a possible implementation of the first aspect above, the first matching priority is greater than the second matching priority; the first matching priority and the second matching priority are determined by a matching frequency of the first domain name information.

[0008] In a possible implementation of the first aspect above, the second policy list is constructed including: based on multiple domain name information, setting the top-level domain name information in the multiple domain name information as the first level in the second policy list, setting the server identification information as the second level in the second policy list, and setting the protocol identification information as the third level in the second policy list; wherein, the first level in the second policy list, the second level in the second policy list, and the third level in the second policy list are associated with each other.

[0009] In a possible implementation of the first aspect above, a first policy list is constructed based on the second policy list. The first policy list is constructed in a manner including: obtaining at least one domain name information having a matching frequency greater than a frequency threshold from multiple domain name information; and setting each domain name information of the at least one domain name information as the first level in the first policy list based on the at least one domain name information, thereby constructing the first policy list.

[0010] In a possible implementation of the first aspect, corresponding to the first domain name information satisfying the first matching priority, obtaining the first domain name policy that matches the first domain name information through the first policy list includes: matching, based on the first domain name information, through the first level in the first policy list, to obtain the first domain name policy that matches the first domain name information; or matching, based on the first domain name information, through the first level in the first policy list, to obtain an acquisition address of the first domain name policy that matches the first domain name information.

[0011] In a possible implementation of the first aspect, corresponding to the first domain name information satisfying the second matching priority, obtaining a first domain name policy that matches the first domain name information through matching the second policy list includes: obtaining, based on the first domain name information, a first sub-policy that matches top-level domain name information in the first domain name information through the first level in the second policy list; inheriting the first sub-policy to the second level in the second policy list based on the first sub-policy, and obtaining, based on the second level in the second policy list, a second sub-policy that matches server identification information and top-level domain name information in the first domain name information; inheriting the second sub-policy to the third level in the second policy list based on the second sub-policy, and obtaining, based on the third level in the second policy list, a third sub-policy that matches protocol identification information, server identification information, and top-level domain name information in the first domain name information; and obtaining, based on the third sub-policy, the first domain name policy that matches the first domain name information; wherein the first domain name policy includes at least one of the first sub-policy, the second sub-policy, and the third sub-policy.

[0012] In a second aspect, an embodiment of the present application provides a server, comprising: a memory for storing instructions executed by one or more processors of the server; and a processor, which is one of the processors of the server, for executing the instructions stored in the memory to implement the above-mentioned first aspect, and any one of the methods mentioned in the first aspect.

[0013] In a third aspect, an embodiment of the present application provides a computer program product, including: a computer program / instruction, which, when executed by a processor, implements the above-mentioned first aspect, as well as the computer program code of the domain name policy matching method mentioned in the first aspect.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having instructions stored thereon. When the instructions are executed on a computer, the computer program code for implementing the above-mentioned first aspect and the domain name policy matching method mentioned in the first aspect is implemented.

[0015] The beneficial effects of the second, third and fourth aspects mentioned above can be found in the first aspect mentioned above, as well as the relevant descriptions in various possible implementations of the first aspect, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of a domain name resolution scenario is shown according to the prior art;

[0017] Figure 2 According to some embodiments of the present application, a flowchart of a domain name policy matching method is shown;

[0018] Figure 3 According to some embodiments of the present application, a schematic structural diagram of a constructed first policy list is shown;

[0019] Figure 4 According to some embodiments of the present application, a schematic structural diagram of a constructed second policy list is shown;

[0020] Figure 5 According to some embodiments of the present application, a schematic diagram of the structure of a domain name resolution system is shown;

[0021] Figure 6 According to some embodiments of the present application, a flowchart of a domain name policy matching method is shown. DETAILED DESCRIPTION

[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0023] It is understood that the terminal device in the embodiments of the present application may also be referred to as a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The terminal device may be a mobile phone, a smart TV, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc.

[0024] To facilitate understanding of the technical solution of this application, the terms involved are introduced below.

[0025] (1) A generic top-level domain (gTLD) is the highest-level domain name category in the Internet Domain Name System (DNS), such as .com, .org, .net, etc. In the embodiments of the present application, a generic top-level domain name may refer to top-level domain name information.

[0026] Figure 1 According to the prior art, a schematic diagram of a domain name resolution scenario is shown, which includes a terminal device 01 and a domain name server 02. In some optional embodiments, when the terminal device 01 detects that the user performs an operation of searching for a URL (corresponding to a first domain name), for example, the user can enter a domain name in the search box 102 of the search interface 101 of the browser application, the terminal device 01 can send a domain name resolution request to the domain name server 02 in response to the user's operation of searching for a URL. The domain name resolution request includes identification information of the terminal device 01, first domain name information, etc. The first domain name information may include but is not limited to protocol identification information, server identification information, and top-level domain name information. For example, in www.XXX.com, www can be called protocol identification information, .XXX can be called server identification information, and .com can be called top-level domain name information.

[0027] Then, the domain name server 02 performs a domain name and domain name policy matching operation according to the received domain name resolution request. According to the first domain name information, the domain name server 02 performs domain name policy matching from a plurality of stored hash tables in sequence.

[0028] Specifically, based on the top-level domain name information in the first domain name information, the domain name server 02 can perform domain name policy matching from the hash table corresponding to the top-level domain name information. In the case of matching a domain name policy that matches the top-level domain name information, the domain name server 02 can then perform domain name policy matching from the hash table corresponding to the server identification information. Alternatively, in the case of not matching a domain name policy that matches the top-level domain name information, the domain name server 02 can return a result of a match failure and then perform domain name policy matching from the hash table corresponding to the server identification information. Correspondingly, in the case of matching a domain name policy that matches the server identification information, the domain name server 02 can then perform domain name policy matching from the hash table corresponding to the protocol identification information. Finally, the domain name server 02 performs domain name policy matching from multiple stored hash tables and can obtain a domain name policy that matches the domain name.

[0029] In some optional embodiments, the domain name server 02 may further perform operations such as searching for a protocol address of the first domain name according to the domain name policy, and then return the operation result to the terminal device 01 .

[0030] It is understood that during this process, the domain name server 02 interacts with multiple terminal devices and receives domain name resolution requests from multiple terminal devices at the same time. Therefore, the domain name server 02 will not only perform domain name and domain name policy matching operations from multiple hash tables simultaneously, but also affect the resolution speed of the domain name server 02.

[0031] In this regard, the present application provides a domain name policy matching method, in which a domain name server (first server) can create a second policy list for matching corresponding domain name policies based on multiple domain name information. Based on this, a first policy list can be created based on at least one domain name information in the multiple domain name information whose matching frequency is greater than a frequency threshold. Furthermore, when the domain name server performs a domain name and domain name policy matching operation based on a domain name resolution request from a terminal device, a first domain name policy matching the first domain name information is searched from the first policy list or the second policy list based on the first domain name information in the domain name resolution request.

[0032] Specifically, when the first domain name information satisfies the first matching priority, the domain name server can directly match the first domain name policy that matches the first domain name information through the first policy list. Thus, when the domain name server performs a domain name and domain name policy matching operation, when the first domain name information satisfies the first matching priority, it only needs to query the first policy list once to match the first domain name policy that matches the first domain name information. This effectively reduces the number of queries, increases the speed at which the domain name server matches domain name policies, and thus increases the speed at which domain names are resolved.

[0033] In some optional embodiments, when the domain name server fails to obtain a first domain name policy that matches the first domain name information through the first policy list, it can indicate that the first domain name information meets the second priority, and the domain name server can then obtain a first domain name policy that matches the first domain name information through the second policy list step by step. In this way, the domain name server only needs to query through a second policy list to match the first domain name policy that matches the first domain name information. Without the need to go through multiple policy lists (corresponding to the hash table mentioned above), the accuracy of matching domain name policies can be improved while reducing the number of queries.

[0034] The domain name policy matching method mentioned in the embodiment of the present application is further described in detail below with reference to the accompanying drawings. The hardware structure involved in executing the domain name policy matching method is as follows: Figure 1 The above is not repeated here.

[0035] Specifically, Figure 2 A flow chart of a domain name policy matching method according to an embodiment of the present application is shown. It can be understood that the execution subject of the flow can be the first server mentioned above.

[0036] S201: Receive a first request message sent by a terminal device, where the first request message includes first domain name information and first identification information of the terminal device.

[0037] In some optional embodiments, the terminal device may have applications such as browser applications and shopping applications (the browser application is taken as an example below), and the terminal device may generate a corresponding first request message in response to the user's search URL operation, link access operation, etc. performed in the browser application.

[0038] The first request message includes, but is not limited to, first domain name information and first identification information of the terminal device. The first identification information includes, but is not limited to, an identifier of the terminal device and a first port address (or source port) of a received result (e.g., a resolution result). The first domain name information may refer to a URL searched by a user in a browser application.

[0039] In some optional embodiments, the first domain name information may include, but is not limited to, protocol identification information, server identification information, and top-level domain name information. For example, the website address searched by the user in the browser application is www.XXX.com, where www can be referred to as protocol identification information, .XXX can be referred to as server identification information, and .com can be referred to as top-level domain name information.

[0040] Furthermore, the terminal device may send the first request message to the first server according to the first port address; and the first server receives the first request message sent by the terminal device.

[0041] S202: corresponding to the first domain name information satisfying the first matching priority, a first domain name policy matching the first domain name information is obtained through matching in the first policy list.

[0042] In some optional embodiments, the first server may create a second policy list (or multi-level policy table) based on multiple domain name information.

[0043] In the second policy list, the top-level domain name information is set as the first level in the second policy list, the server identification information is set as the second level in the second policy list, and the protocol identification information is set as the third level in the second policy list. There is an association relationship between the first level in the second policy list, the second level in the second policy list, and the third level in the second policy list. It can be understood that for ease of description, the process of creating the second policy list can refer to the following Figure 4 , I will not go into details here.

[0044] In some optional embodiments, the first server receives request messages from multiple terminal devices. To improve domain name matching speed, the first server may, based on the domain name information in the received request messages, retrieve at least one domain name information having a matching frequency greater than a frequency threshold from the multiple domain name information in the second policy list. A first policy list (or hotspot domain name policy table) is then created based on the at least one domain name information.

[0045] Figure 3 The created first policy list is exemplarily shown, and the first policy list may include a first level. Then, when receiving the first request message sent by the terminal device, the first server may first match from the first policy list according to the first domain name information.

[0046] For example, the first server can match the first domain name from the first policy list based on the first domain name information being www.XXX.com. Figure 3As shown in the dotted box 311, the first server obtains the first domain name policy that matches www.XXX.com through matching the first policy list. The first server can directly obtain the first domain name policy that matches www.XXX.com without having to perform multiple matches from multiple hash tables based on the top-level domain name information, protocol identification information, and server identification information of the first domain name information.

[0047] For example Figure 3 As shown in the dashed box 312, the first server can match the first domain name information, www.aaa.cn, from the first policy list. Since the first server obtains a first domain name policy that matches www.aaa.cn through matching the first policy list, the first server can directly obtain the first domain name policy that matches www.aaa.cn without having to perform multiple matches in multiple hash tables based on the top-level domain information, protocol identifier information, and server identifier information of the first domain name information.

[0048] In the case where a first domain name policy matching the first domain name information can be obtained through matching of the first policy list, it can be said that the first domain name information meets the first matching priority.

[0049] In this way, during this process, the first server only needs to perform one query operation to obtain the first domain name policy that matches the first domain name information, without having to perform domain name and domain name policy matching operations multiple times, which can improve the speed of the domain name server matching domain name policy.

[0050] In an embodiment of the present application, obtaining the first domain name policy that matches the first domain name information through matching the first policy list may include: directly obtaining the first domain name policy that matches the first domain name information through matching the first policy list, or obtaining an acquisition address corresponding to the first domain name policy that matches the first domain name information through matching the first policy list, and then obtaining the first domain name policy based on the acquisition address.

[0051] S203: Corresponding to the first domain name information satisfying the second matching priority, a first domain name policy matching the first domain name information is obtained through matching the second policy list.

[0052] In some optional embodiments, when the first server fails to obtain a first domain name policy that matches the first domain name information through the first policy list, the first domain name information may be deemed to meet the second matching priority. The first server may obtain a first domain name policy that matches the first domain name information through the second policy list.

[0053] Specifically, based on the first domain name information, the first server can obtain a first sub-policy that matches the top-level domain name information in the first domain name information through the first level in the second policy list. Afterwards, based on the first sub-policy, the first server can inherit the first sub-policy to the second level in the second policy list, and can obtain a second sub-policy that matches the server identification information and top-level domain name information in the first domain name information through the second level in the second policy list. Then, based on the second sub-policy, the first server can inherit the second sub-policy to the third level in the second policy list, and can obtain a third sub-policy that matches the protocol identification information, server identification information, and top-level domain name information in the first domain name information through the third level in the second policy list. Furthermore, the first domain name policy that matches the first domain name information can be obtained from the third sub-policy. The first domain name policy may include a first sub-policy, a second sub-policy, and a third sub-policy.

[0054] For example, based on www.XXX.com, the first server can obtain a first sub-policy matching .com through the first level in the second policy list. Subsequently, based on the first sub-policy, the first server can inherit the first sub-policy to the second level in the second policy list, and can obtain a second sub-policy matching .XXX.com through the second level in the second policy list. Then, based on the second sub-policy, the first server can inherit the second sub-policy to the third level in the second policy list, and can obtain a third sub-policy matching www.XXX.com through the third level in the second policy list. In this regard, the resulting first domain name policy can be a policy set that can include the first sub-policy, the second sub-policy, and the third sub-policy.

[0055] In this way, the domain name server only needs to perform multiple queries through a second policy list to match the first domain name policy that matches the first domain name information. Instead of matching through multiple policy lists (corresponding to the hash table mentioned above), domain name information and domain name policy can be matched in a second policy list by associating server identification information, top-level domain information, and protocol identification information, effectively reducing the frequency of memory calls.

[0056] The following describes the construction of the second strategy list mentioned in S202. Figure 4 The second policy list shown includes top-level domain information corresponding to the first level, server identification information corresponding to the second level, and protocol identification information corresponding to the third level. For example, the top-level domain information includes .com, .cn, and .net, the server identification information includes .XXX and .123, and the protocol identification information includes www.

[0057] In some optional embodiments, the first server may create a Figure 4The second policy list shown. For example, the top-level domain information in the domain name information may include .com, .cn, and .net, the server identification information may include .xxx and .123, and the protocol identification information may include www. Then, .com, .cn, and .net may be set as the first level in the second policy list, .xxx and .123 may be set as the second level, and www may be set as the third level.

[0058] For example Figure 4 The dotted box 301 in the figure, combined with Figure 4 An exemplary description of a domain name and domain name policy matching process may include: a first server first matches the first domain name information at the first level of a second policy list, obtaining a first sub-policy that matches the top-level domain name information. Subsequently, the domain name policy that matches the top-level domain name information is inherited to the second level of the second policy list. The first server then matches the server identification information and the first sub-policy that matches the top-level domain name information at the second level of the second policy list, obtaining a second sub-policy that matches the server identification information and the top-level domain name information.

[0059] Similarly, the second sub-policy that matches the server identification information and the top-level domain name information is inherited to the third level of the second policy list. The first server then matches the protocol identification information and the second sub-policy that matches the server identification information and the top-level domain name information at the third level of the second policy list to obtain the first domain name policy. The first domain name policy that matches the first domain name information obtained by the first server may include: a first sub-policy that matches the top-level domain name information, a second sub-policy that matches the server identification information and the top-level domain name information, and a third sub-policy that matches the protocol identification information, the server identification information, and the top-level domain name information, etc.

[0060] In some optional embodiments, the present application provides a system for domain name resolution, such as Figure 5 As shown in the structural diagram, the system may include a terminal device 01 and a domain name server 02

[0061] The terminal device 01 is configured to send a first request message and receive a first response message to the domain name server 02. The first request message includes first domain name information and first identification information of the terminal device; the first response message includes a protocol address.

[0062] The domain name server 02 corresponds to the first server mentioned above, and is used to receive the first request message sent by the terminal device; and is used to obtain the protocol address corresponding to the first domain name information through the first policy list when the first domain name information satisfies the first matching priority; to obtain the first domain name policy that matches the first domain name information through the first policy list when the first domain name information satisfies the first matching priority; and to obtain the first domain name policy that matches the first domain name information through the second policy list when the first domain name information satisfies the second matching priority.

[0063] like Figure 6 As shown, the operation steps of the domain name resolution system are as follows:

[0064] S601: The terminal device 01 sends a first request message to the domain name server 02.

[0065] In some optional embodiments, when the terminal device 01 detects that the user performs an operation to search for a URL (corresponding to a domain name), for example, the user can enter the domain name in the search box 102 of the search interface 101 of the browser application, the terminal device 01 can respond to the user's operation to search for a URL and send a first request message to the domain name server 02 to resolve the domain name.

[0066] The first request message includes, but is not limited to, first domain name information and first identification information of the terminal device. The first identification information includes, but is not limited to, an identifier of the terminal device and a first port address (or source port) of the receiving protocol address. The first domain name information may refer to a URL searched by a user in a browser application.

[0067] Then, the terminal device 01 sends the first request message to the domain name server 02.

[0068] S602: The domain name server 02 performs a domain name and domain name policy matching operation according to the first request message.

[0069] In some optional embodiments, the domain name server 02 receives the first request message sent by the terminal device 01, and then, based on the first request message, the domain name server 02 performs a domain name and domain name policy matching operation on the first domain name information in the first request message.

[0070] S603: corresponding to the first domain name information meeting the first matching priority, the domain name server 02 obtains a first domain name policy that matches the first domain name information through matching the first policy list.

[0071] It can be understood that the construction method of the first policy list and the second policy list can refer to the relevant description of the above step S202, and to avoid repetition, it will not be repeated here.

[0072] In some optional embodiments, upon receiving the first request message sent by terminal device 01, domain name server 02 may first query the first policy list based on the first domain name information. Domain name server 02 obtains the first domain name policy that matches the first domain name information through matching the first policy list. Domain name server 02 may directly obtain the first domain name policy that matches the first domain name information without having to perform multiple matches in multiple hash tables based on the top-level domain name information, protocol identification information, and server identification information of the first domain name information.

[0073] In the case where a first domain name policy matching the first domain name information can be obtained through matching of the first policy list, it can be said that the first domain name information meets the first matching priority.

[0074] Thus, during this process, the domain name server 02 only needs to perform one matching operation to obtain the first domain name policy that matches the first domain name information, without having to perform domain name policy matching operations multiple times, thereby improving the speed of domain name policy matching.

[0075] S604: corresponding to the first domain name information meeting the second matching priority, the domain name server 02 obtains a first domain name policy that matches the first domain name information through matching the second policy list.

[0076] In some optional embodiments, when the domain name server 02 fails to obtain a first domain name policy that matches the first domain name information through the first policy list, the first domain name information may be said to meet the second matching priority. The domain name server 02 may obtain a first domain name policy that matches the first domain name information through the second policy list.

[0077] Specifically, based on the first domain name information, domain name server 02 can obtain a first sub-policy that matches the top-level domain name information in the first domain name information through the first level in the second policy list. Subsequently, based on the first sub-policy, domain name server 02 can inherit the first sub-policy to the second level in the second policy list, and can obtain a second sub-policy that matches the server identification information and top-level domain name information in the first domain name information through the second level in the second policy list. Then, based on the second sub-policy, domain name server 02 can inherit the second sub-policy to the third level in the second policy list, and can obtain a third sub-policy that matches the protocol identification information, server identification information, and top-level domain name information in the first domain name information through the third level in the second policy list. Furthermore, the first domain name policy that matches the first domain name information can be obtained from the third sub-policy. The first domain name policy may include a first sub-policy, a second sub-policy, and a third sub-policy.

[0078] For example, based on www.XXX.com, domain name server 02 can obtain a first sub-policy matching .com from the first level in the second policy list. Subsequently, based on the first sub-policy, domain name server 02 can inherit the first sub-policy to the second level in the second policy list, and obtain a second sub-policy matching .XXX.com from the second level in the second policy list. Then, based on the second sub-policy, domain name server 02 can inherit the second sub-policy to the third level in the second policy list, and obtain a third sub-policy matching www.XXX.com from the third level in the second policy list. The resulting first domain name policy can be a policy set that includes a first sub-policy, a second sub-policy, and a third sub-policy.

[0079] In this way, the domain name server 02 only needs to query through a second policy list to match the first domain name information. There is no need to match through multiple policy lists (corresponding to the hash table mentioned above). The domain name information and domain name policy can be matched in a second policy list by associating server identification information, top-level domain information and protocol identification information, effectively reducing the frequency of memory calls.

[0080] In some specific application scenarios, for the first domain name information including abcwww.ddd.com, if abcwww.ddd.com meets the first matching priority, the first server can match from the constructed first policy list and obtain a policy that matches abcwww.ddd.com, or a policy that matches bcwww.ddd.com, or a policy that matches c.www.ddd.com, or a policy that matches www.ddd.com, or a policy that matches 1.com. Furthermore, based on the obtained policy, the protocol address and configured speed limit corresponding to the first domain name information can be obtained. For example, based on the obtained policy that matches abcwww.ddd.com, the protocol address corresponding to the first domain name information can be obtained as 5.5.5.5, and the configured speed limit is 20. For another example, based on the obtained policy that matches c.www.ddd.com, the protocol address corresponding to the first domain name information can be obtained as 5.5.5.5, and the configured speed limit is 20. Thus, by querying the first policy list only once, the policy that matches the first domain name information can be obtained.

[0081] Still taking the first domain name information including abcwww.ddd.com as an example, it is necessary to Figure 4When the second policy list shown is matched level by level, it can be matched in the following order: abcwww.baidu.com → bcwww.baidu.com → c.www.baidu.com → www.baidu.com → baidu.com → .com. The resulting matching results may include, for example: not matched according to abcwww.baidu.com; not matched according to bcwww.baidu.com; not matched according to c.www.baidu.com; matched according to www.baidu.com, with a protocol address of 5.5.5.5 and no speed limit configured; matched according to baidu.com, with a protocol address of 5.5.5.5 and no speed limit configured; matched according to .com, with a protocol address of 5.5.5.5 and a speed limit of 20 configured. In this way, a policy that matches the first domain name information is obtained through multiple matches. To this end, the first policy list can be constructed based on the second policy list according to the number of matches for abcwww.baidu.com, effectively improving the efficiency of policy matching.

[0082] An embodiment of the present application further provides a server comprising: a memory and one or more processors, wherein the memory is used to store instructions executed by the one or more processors, and the processors are used to execute the domain name policy matching method mentioned in any one of the above embodiments of the present application.

[0083] An embodiment of the present application further provides a computer-readable medium having instructions stored thereon. When the instructions are executed on a server, the server executes the domain name policy matching method mentioned in any one of the above embodiments of the present application.

[0084] An embodiment of the present application further provides a computer program product, including: a computer program / instruction, which, when executed by a processor, implements computer program code for the domain name policy matching method mentioned in any of the above embodiments of the present application.

[0085] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems raised by this application. In addition, in order to highlight the innovative part of this application, the above-mentioned device embodiments of this application do not introduce units / modules that are not closely related to solving the technical problems raised by this application. This does not mean that other units / modules do not exist in the above-mentioned device embodiments.

[0086] It should be noted that in the examples and description of this application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a" does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0087] Although the present application has been shown and described with reference to certain embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the application.

[0088] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A domain name strategy matching method, characterized in that: Applied to a first server, the first server is used to parse first domain name information sent by a terminal device, and the domain name policy matching method includes: receiving a first request message sent by the terminal device, where the first request message includes first domain name information and first identification information of the terminal device; Corresponding to the first domain name information satisfying the first matching priority, a first domain name policy matching the first domain name information is obtained through matching the first policy list; Corresponding to the first domain name information satisfying the second matching priority, the first domain name policy that matches the first domain name information is obtained through matching the second policy list.

2. The domain name strategy matching method according to claim 1, characterized in that: The first domain name information includes at least protocol identification information, server identification information and top-level domain name information.

3. The domain name strategy matching method according to claim 2, characterized in that: The first matching priority is greater than the second matching priority; The first matching priority and the second matching priority are determined by a matching frequency of the first domain name information.

4. The domain name strategy matching method according to claim 3, characterized in that: The second strategy list is constructed in the following manner: According to the plurality of domain name information, the top-level domain name information among the plurality of domain name information is set as the first level in the second policy list, the server identification information is set as the second level in the second policy list, and the protocol identification information is set as the third level in the second policy list; There is an association relationship among the first level in the second policy list, the second level in the second policy list, and the third level in the second policy list.

5. The domain name strategy matching method according to claim 4, characterized in that: The first policy list is constructed according to the second policy list, where the first policy list is constructed in the following manner: Acquire at least one domain name information having a matching frequency greater than a frequency threshold from the multiple domain name information; According to the at least one domain name information, each domain name information of the at least one domain name information is set as the first level in the first policy list to construct the first policy list.

6. The domain name strategy matching method according to claim 5, characterized in that: The first domain name information satisfies the first matching priority, and a first domain name policy that matches the first domain name information is obtained by matching the first policy list, including: According to the first domain name information, a first domain name policy that matches the first domain name information is matched through the first level in the first policy list; Alternatively, according to the first domain name information, an acquisition address of a first domain name policy that matches the first domain name information is obtained by matching through the first level in the first policy list.

7. The domain name strategy matching method according to claim 4, characterized in that: The first domain name policy that matches the first domain name information by matching the second policy list corresponding to the first domain name information meeting the second matching priority includes: According to the first domain name information, obtaining a first sub-policy matching the top-level domain name information in the first domain name information through the first level in the second policy list; According to the first sub-policy, inherit the first sub-policy to the second level in the second policy list, and obtain a second sub-policy that matches the server identification information and the top-level domain name information in the first domain name information through the second level in the second policy list; Inheriting the second sub-policy to the third level in the second policy list according to the second sub-policy, and obtaining a third sub-policy that matches the protocol identification information, the server identification information, and the top-level domain name information in the first domain name information through the third level in the second policy list; The first domain name policy that matches the first domain name information is obtained from the third sub-policy; wherein the first domain name policy includes at least one of the first sub-policy, the second sub-policy, and the third sub-policy.

8. A server, characterized in that: include: A memory and one or more processors, wherein the memory is used to store instructions executed by the processor, and the processor is used to execute the domain name policy matching method according to any one of claims 1 to 7.

9. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, implements the domain name policy matching method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the domain name policy matching method according to any one of claims 1 to 7.