Network request sending method and device, computer equipment and readable storage medium

Modify the target domain name through the domain name rewriting rules in the pan-domain configuration database, obtain the request path and send network requests, which solves the problem of the surge in the number of configuration files in multi-domain and dynamic domain name scenarios, and improves configuration efficiency and stability.

CN119583658AActive Publication Date: 2025-03-07CHINA TELECOM CLOUD TECH CO LTD

Patent Information

Application Number
CN202411782288.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-07
Estimated Expiration
2044-12-05

AI Technical Summary

Technical Problem

When traditional channel configuration analysis methods face multiple domain names and dynamic domain name scenarios, the number of configuration files surges, increasing the difficulty and cost of operation and maintenance, and it is difficult to meet the needs of dynamic changes.

Method used

By obtaining the target domain name and the pan-domain name configuration database for the network request, determining the specified level of the target domain name, looking for matching domain name rewriting rules in the pan-domain name configuration database, modifying the target domain name to obtain the corresponding request path, and sending the network request based on the request path.

Benefits of technology

It improves network information configuration efficiency, reduces the number of configuration files, reduces operation and maintenance costs, supports single-customer multi-domain names and dynamic domain names scenarios, and realizes a one-to-many mapping relationship between configuration files and domain names.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583658A_ABST
    Figure CN119583658A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a network request sending method and device, computer equipment and a computer readable storage medium. The network request sending method comprises the following steps: acquiring a target domain name of a network request and a wide domain name configuration database; determining a specified hierarchy in the target domain name; under the condition that the extensive domain name configuration database is matched with the specified hierarchy, searching a domain name rewriting rule matched with the specified hierarchy in the extensive domain name configuration database; under the condition that the domain name rewriting rule matched with the specified hierarchy is found in the extensive domain name configuration database, modifying the target domain name based on the domain name rewriting rule, and obtaining a request path corresponding to the modified target domain name; and sending the network request based on the request path. By setting the extensive domain name configuration database, the configuration file corresponding to the target domain name can be quickly positioned, and the efficiency and stability of configuration analysis are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device and computer-readable storage medium for sending a network request. Background Art

[0002] Content Delivery Network (CDN) is a technology that accelerates network information transmission by deploying multiple nodes around the world. When a user makes a network request, the request will first reach the gateway of the CDN edge node. As a key part of the CDN system, the gateway will select the best node to provide the corresponding content for the user based on the user's location, network conditions, and CDN's cache and load balancing strategies.

[0003] At present, CDN has been applied in many fields. For example, in the field of live video, CDN can reduce network latency and improve the fluency of live broadcast. However, with the rapid development of the live video industry and CDN business, the traditional channel configuration and parsing method has gradually exposed some problems. On the one hand, with the increase in the types of business of live broadcast manufacturers, a manufacturer may have many domain names. Continuing to use the channel configuration method will lead to a surge in the number of configuration files, increasing the difficulty and cost of operation and maintenance. On the other hand, some manufacturers use Hypertext Transfer Protocol-based Domain Name Resolution Service (HTTPDNS) technology and dynamic domain name method, so that each user request corresponds to a separate domain name, and the channel configuration cannot meet this dynamic change demand.

[0004] Therefore, there is an urgent need for a method for sending a network request that can improve the efficiency of network information configuration. Summary of the invention

[0005] Based on this, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium and computer program product for sending a network request that can improve the efficiency of network information configuration in order to address the above technical problems.

[0006] In a first aspect, the present application provides a method for sending a network request, comprising:

[0007] Obtain the target domain name of the network request and the wildcard domain name configuration database;

[0008] Determining a specified level in the target domain name;

[0009] In the case where the wildcard domain name configuration database matches the specified level, searching the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level;

[0010] In the case where a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, modifying the target domain name based on the domain name rewriting rule, and obtaining a request path corresponding to the modified target domain name;

[0011] Based on the request path, the network request is sent.

[0012] In one embodiment, determining the specified level in the target domain name includes:

[0013] Searching for the target domain name in a dynamic configuration database;

[0014] In the case where the target domain name is not found in the dynamic configuration database, a specified level is determined in the target domain name.

[0015] In one of the embodiments, when a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, the target domain name is modified based on the domain name rewriting rule, and after obtaining a request path corresponding to the modified target domain name, the method includes:

[0016] Searching the modified target domain name in the dynamic configuration database;

[0017] When the modified target domain name is found in the dynamic configuration database, the request path is obtained.

[0018] In one embodiment, determining the specified level in the target domain name includes:

[0019] A second-level domain name and / or a top-level domain name is determined in the target domain name.

[0020] In one of the embodiments, when the wildcard domain name configuration database matches the specified level, searching the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level includes:

[0021] Obtaining a regular expression for the wildcard domain name configuration database;

[0022] Based on the designated level and the regular expression, the designated level is matched in the wildcard domain name configuration database.

[0023] In one of the embodiments, when the wildcard domain name configuration database matches the specified level, searching the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level includes:

[0024] When no domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, domain name resolution failure information is sent.

[0025] In a second aspect, the present application further provides a device for sending a network request, the device comprising:

[0026] The acquisition module is used to obtain the target domain name of the network request and the wildcard domain name configuration database;

[0027] A determination module, configured to determine a specified level in the target domain name;

[0028] A matching module, configured to search the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level when the wildcard domain name configuration database matches the specified level;

[0029] A modification module, configured to modify the target domain name based on the domain name rewriting rule and obtain a request path corresponding to the modified target domain name when a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database;

[0030] A sending module is used to send the network request based on the request path.

[0031] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0032] Obtain the target domain name of the network request and the wildcard domain name configuration database;

[0033] Determining a specified level in the target domain name;

[0034] In the case where the wildcard domain name configuration database matches the specified level, searching the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level;

[0035] In the case where a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, modifying the target domain name based on the domain name rewriting rule, and obtaining a request path corresponding to the modified target domain name;

[0036] Based on the request path, the network request is sent.

[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0038] Obtain the target domain name of the network request and the wildcard domain name configuration database;

[0039] Determining a specified level in the target domain name;

[0040] In the case where the wildcard domain name configuration database matches the specified level, searching the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level;

[0041] In the case where a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, modifying the target domain name based on the domain name rewriting rule, and obtaining a request path corresponding to the modified target domain name;

[0042] Based on the request path, the network request is sent.

[0043] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0044] Obtain the target domain name of the network request and the wildcard domain name configuration database;

[0045] Determining a specified level in the target domain name;

[0046] In the case where the wildcard domain name configuration database matches the specified level, searching the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level;

[0047] In the case where a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, modifying the target domain name based on the domain name rewriting rule, and obtaining a request path corresponding to the modified target domain name;

[0048] Based on the request path, the network request is sent.

[0049] The above-mentioned network request sending method, device, computer equipment, computer-readable storage medium and computer program product, first, by setting up a wildcard domain name configuration database, it is possible to quickly locate the configuration file corresponding to the target domain name, thereby improving the efficiency and stability of configuration resolution. Moreover, by setting up a wildcard domain name configuration database, multiple business domain names can be quickly covered, reducing the number of configuration files, thereby saving the workload and difficulty of operation and maintenance personnel and improving the efficiency of the overall process. Subsequently, the present application can meet the scenario where a single customer has multiple domain names, and also supports the scenario of using dynamic domain names, realizing a one-to-many mapping relationship between configuration files and domain names. Finally, in the present application, new domain name configurations can also be easily added or existing configurations updated in the wildcard domain name configuration database, without the need to process each domain name separately, so that the processing method for the target domain name is more flexible and can meet more business needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 A schematic diagram of a method for sending a network request provided in the first embodiment;

[0052] Figure 2 A schematic diagram of a method for sending a network request provided in a second embodiment;

[0053] Figure 3 A schematic diagram of a method for sending a network request provided in a third embodiment;

[0054] Figure 4 A schematic diagram of a method for sending a network request provided in a fourth embodiment;

[0055] Figure 5 A schematic diagram of a method for sending a network request provided in a fifth embodiment;

[0056] Figure 6 A schematic diagram of a method for sending a network request provided in a sixth embodiment;

[0057] Figure 7 is a structural block diagram of a device for sending a network request in one embodiment;

[0058] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. 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.

[0060] In one embodiment, a method for sending a network request is provided. This embodiment uses the method applied to a terminal as an example. It is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and Internet of Things devices. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0061] See also Figure 1 In this embodiment, the method for sending a network request includes the following steps:

[0062] Step S100: Obtain the target domain name of the network request and the wildcard domain name configuration database.

[0063] In step S100, as an example, a user may initiate a network request from a browser or client. The network request may include a target domain name. The target domain name may be the domain name of the website that the network request wishes to access. As an example, in CDN live broadcast, the target domain name may be related to the subdomain name of the service that the user actually wants to access, but the target domain name may not directly correspond to the real service domain name. As an example, the target domain name may be a1b2.abc.com.

[0064] The wildcard domain name configuration database may include all possible wildcard domain name matching rules and corresponding domain name rewriting rules. The matching rules and rewriting rules may be used to convert the target domain name into a real business domain name. As an example, the wildcard domain name configuration database may include a global configuration file.

[0065] Step S200: Determine a designated level in the target domain name.

[0066] In step S200, the target domain name may include multiple levels. As an example, the target domain name may include a subdomain, a second-level domain name, and a top-level domain name. Specifically, the subdomain may include the leftmost part of the domain name. The subdomain may be used to distinguish different services or functions under the same top-level domain name. The second-level domain name may be used to represent the name of an organization, company, or brand. The top-level domain name may include the rightmost part of the domain name, and the top-level domain name may be used to indicate the top-level category to which the domain name belongs. As an example, in a1b2.abc.com, the subdomain may be a1b2, the second-level domain name may be abc, and the top-level domain name may be com.

[0067] After obtaining the target domain name, the designated level in the domain name can be determined, so that the matching rule can be found in the wildcard domain name configuration database. As an example, the designated level can include the second-level domain name and / or the top-level domain name in the target domain name. For example, in a1b2.abc.com, the designated level can include abc.com.

[0068] Step S300: when the wildcard domain name configuration database matches the specified level, searching the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level.

[0069] In step S300, a wildcard domain name configuration database may be searched for a rule matching the level. This matching process may be based on regular expression matching or other string matching algorithms.

[0070] When the match is successful, the domain name rewriting rule corresponding to the specified level can be determined in the wildcard domain name configuration database.

[0071] Step S400: when a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, the target domain name is modified based on the domain name rewriting rule, and a request path corresponding to the modified target domain name is obtained.

[0072] In step S400, after finding the matching domain name rewriting rules, the target domain name can be modified according to these rules. This modification process may include replacing a part of the domain name, adding or deleting certain characters, etc. The modified target domain name may include the real business domain name. Afterwards, the corresponding request path can be obtained according to the modified target domain name. This request path can be the path part in the network request, or it can be a new path generated according to the domain name rewriting rules. As an example, if the path (URI) of the original request can be " / a1b2.abc.com / real_domain / app / stream / ...", after splitting the path, the target domain name a1b2.abc.com is identified. Accordingly, the target domain name is modified (deleted, etc.), and the request path corresponding to the modified target domain name is " / real_domain / app / stream / ...".

[0073] Step S500: Send a network request based on the request path.

[0074] In step S500, a network request may be sent according to the modified target domain name and request path. As an example, the network request may be sent to the address corresponding to the real business domain name on the CDN or server to obtain the content that the user wants to access. Of course, in this process, the CDN or server may find and return the corresponding resources according to the domain name and path in the network request.

[0075] In this embodiment, first, by setting up a wildcard domain name configuration database, the configuration file corresponding to the target domain name can be quickly located, thereby improving the efficiency and stability of configuration parsing. Moreover, by setting up a wildcard domain name configuration database, this embodiment can quickly cover multiple business domain names, reduce the number of configuration files, thereby saving the workload and difficulty of operation and maintenance personnel during configuration, and improving the efficiency of the overall process. Subsequently, this embodiment can meet the scenario of multiple domain names for a single customer, and also supports the scenario of using dynamic domain names, realizing a one-to-many mapping relationship between configuration files and domain names. Finally, in this embodiment, new domain name configurations can also be easily added or existing configurations can be updated in the wildcard domain name configuration database, without the need to process each domain name separately, so that the processing method for the target domain name is more flexible and can meet more business needs.

[0076] In one embodiment, see Figure 2 , step S200 may include:

[0077] Step S210: Searching for the target domain name in the dynamic configuration database.

[0078] In step S210, the dynamic configuration database may include a database storing domain names and corresponding configuration information, and the configuration information may include request forwarding paths, load balancing strategies, etc. Of course, the dynamic configuration database may be updated regularly to meet business development needs. By searching the target domain name in the dynamic configuration database, it is possible to quickly determine whether there is configuration information that directly matches the target domain name.

[0079] Step S220: When the target domain name is not found in the dynamic configuration database, determine the specified level in the target domain name.

[0080] In step S220, if no configuration information directly matching the target domain name is found in the dynamic configuration database, it indicates that the target domain name may need to be matched with a wildcard domain name. Therefore, at this time, a specified level may be determined in the target domain name.

[0081] Of course, if the target domain name is searched in the dynamic configuration database, indicating that there is a configuration file for the target domain name, the configuration file is read and the processing steps are performed.

[0082] In this embodiment, the target domain name is searched in the dynamic configuration database, so that it can be quickly determined whether the target domain name exists in the database. If the target domain name exists, its corresponding configuration information can be directly obtained without performing subsequent steps, thereby improving the resolution efficiency.

[0083] In one embodiment, see Figure 3 , after step S400, the following steps may be included:

[0084] Step S600: searching the modified target domain name in the dynamic configuration database.

[0085] In step S400, the target domain name may be modified based on the domain name rewriting rule. At this time, in step S600, the modified target domain name may be searched in the dynamic configuration database.

[0086] Step S610: When the modified target domain name is found in the dynamic configuration database, the request path is obtained.

[0087] In step S610, if there is a corresponding dynamic configuration, subsequent processing is performed according to the configuration. In addition, if there is no corresponding dynamic configuration, it is confirmed that the domain name configuration resolution fails. As an example, the domain name configuration resolution failure may include the configuration file not existing, the configuration file being damaged, or the domain name rewriting rule being invalid.

[0088] In this embodiment, by searching the modified target domain name in the dynamic configuration database, the correctness of the domain name rewriting is improved, and the subsequent processing flow can be ensured to proceed normally. At the same time, the dynamic configuration database can be updated in real time, thereby allowing flexible domain name processing according to different domain name configurations and request scenarios, which helps to meet different business needs and user requests.

[0089] In one embodiment, see Figure 4 , step S300 includes:

[0090] Step S310: Obtain a regular expression of a wildcard domain name configuration database.

[0091] In step S310, in the wildcard domain name configuration database, each group of wildcard domain name configuration may include a regular expression and a corresponding domain name configuration file. This embodiment does not limit the specific form of the regular expression.

[0092] Step S320: Based on the designated level and the regular expression, match the designated level in the wildcard domain name configuration database.

[0093] In step S320, the regular expression set may be traversed to determine whether there is a rule matching the specified level. If a match is found in the wildcard domain name configuration database matching the specified level, configuration information may be read or domain name rewriting rules may be applied.

[0094] Additionally, if no match is found, an error message can be returned or other actions can be taken to handle the request for the domain name. For example, see Figure 5 , step S300 may further include:

[0095] Step S330: When no domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, a domain name resolution failure message is sent.

[0096] In this embodiment, by using regular expressions for matching, a variety of wildcard domain name patterns can be used, thereby improving the flexibility and adaptability of the configuration. Moreover, as the business develops and changes, new regular expression rules can be added to the wildcard domain name configuration database to support new domain name patterns and processing logic. Secondly, by matching the specified level and regular expression, this embodiment can more accurately identify and process domain name requests that comply with the wildcard domain name rules, reducing the possibility of configuration errors and resolution failures.

[0097] See also Figure 6, the following exemplifies the method for sending a network request provided by one or more embodiments in the present application. It can be understood that the method for sending a network request provided by one or more embodiments in the present application can be applied to the scenario of requesting multiple domain names and dynamic domain names with the same primary domain name. First, when the network request arrives at the gateway, the gateway resolves the user's request domain name. For example, the domain name can be a1b2.abc.com. At this time, the original default logic can be used to search for a corresponding sub-channel configuration in the dynamic configuration. If there is a corresponding configuration file a1b2.abc.com.conf in the dynamic configuration directory, subsequent processing is performed according to the sub-channel configuration. If there is no corresponding configuration, it is determined whether it is a wildcard domain name. Afterwards, when there is no corresponding configuration file in the dynamic configuration directory, the global configuration file containing all the wildcard domain names that can be configured is read, and the domain name a1b2.abc.com is matched with the wildcard domain name in the configuration. In the configuration of each group of wildcard domain names, a regular expression and a corresponding domain name configuration file are included. If the original domain name successfully matches one of the configurations, the corresponding domain name configuration file is returned to the dynamic configuration directory. If all wildcard domain name configurations recorded in the global configuration file fail to match, it means that there is no corresponding configuration for the domain name, and it returns empty, and the domain name resolution fails. Then, the corresponding domain name configuration file is read in the dynamic configuration directory. Since the domain name of this configuration file is only used for Secure Sockets Layer (SSL) decryption, rather than a specific business domain name, only SSL-related configurations and the configuration of the newly added domain name rewriting module are performed in this file. In the application scenario of this application, the real business domain name is located one level after the original domain name, such as the URI of the original request may be " / a1b2.abc.com / real_domain / app / stream / ...". The domain name rewriting module can split the request URI, identify the domain name a1b2.abc.com that needs to be rewritten, and the rewritten URI " / real_domain / app / stream / ...". If the domain name configuration file fails to be read in the dynamic configuration directory, it means that there is no corresponding domain name configuration, and it returns empty, and the domain name resolution fails. Furthermore, after obtaining the rewritten URI, the URI is used as the requested URI to process the subsequent business process. If the domain name is real_domain, the corresponding real_domain.conf sub-channel configuration is read in the dynamic configuration directory, and the subsequent gateway operations and processing are performed according to the configuration, and the domain name resolution is successful. If there is no such sub-channel configuration, it means that the domain name rewrite is wrong or the configuration is missing, and the return value is empty, and the domain name resolution fails. It can be seen that in this application, the live broadcast configuration parsing method based on the wildcard domain name can solve the scenarios that are difficult to support with the original sub-channel configuration method, improve the efficiency of gateway configuration parsing, and enrich the scenarios where the live broadcast gateway can be applied.

[0098] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0099] Based on the same inventive concept, the embodiment of the present application also provides a network request sending device for implementing the network request sending method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more network request sending devices provided below can refer to the limitations of the network request sending method above, and will not be repeated here.

[0100] In an exemplary embodiment, Figure 7 As shown, a device for sending a network request is provided, comprising: an acquisition module, a determination module, a matching module, a modification module and a sending module, wherein:

[0101] The acquisition module is used to obtain the target domain name of the network request and the wildcard domain name configuration database.

[0102] The determination module is used to determine a specified level in the target domain name.

[0103] The matching module is used to search the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level when the wildcard domain name configuration database matches the specified level.

[0104] The modification module is used to modify the target domain name based on the domain name rewriting rule when a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, and obtain the request path corresponding to the modified target domain name.

[0105] The sending module is used to send network requests based on the request path.

[0106] In one embodiment, the determination module is used to search for the target domain name in the dynamic configuration database; if the target domain name is not found in the dynamic configuration database, determine the specified level in the target domain name.

[0107] In one embodiment, the modification module is used to search for the modified target domain name in the dynamic configuration database; when the modified target domain name is found in the dynamic configuration database, the request path is obtained.

[0108] In one embodiment, the determination module is used to determine a second-level domain name and / or a top-level domain name in the target domain name.

[0109] In one embodiment, the matching module is used to obtain a regular expression of a wildcard domain name configuration database; based on the specified level and the regular expression, the specified level is matched in the wildcard domain name configuration database.

[0110] In one embodiment, the matching module is used to send a domain name resolution failure message when no domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database.

[0111] Each module in the above-mentioned network request sending device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0112] In addition, the network request sending device may also include a first module, a second module, etc., which are used to implement other method steps provided by one or more embodiments of the present application.

[0113] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the sending data of the network request. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for sending a network request is implemented.

[0114] Those skilled in the art will understand that Figure 8The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0115] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0116] Step S100: Obtain the target domain name of the network request and the wildcard domain name configuration database.

[0117] Step S200: Determine a designated level in the target domain name.

[0118] Step S300: when the wildcard domain name configuration database matches the specified level, searching the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level.

[0119] Step S400: when a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, the target domain name is modified based on the domain name rewriting rule, and a request path corresponding to the modified target domain name is obtained.

[0120] Step S500: Send a network request based on the request path.

[0121] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0122] Step S210: Searching for the target domain name in the dynamic configuration database.

[0123] Step S220: When the target domain name is not found in the dynamic configuration database, determine the specified level in the target domain name.

[0124] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0125] Step S600: searching the modified target domain name in the dynamic configuration database.

[0126] Step S610: When the modified target domain name is found in the dynamic configuration database, the request path is obtained.

[0127] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0128] Step S310: Obtain a regular expression of a wildcard domain name configuration database.

[0129] Step S320: Based on the designated level and the regular expression, match the designated level in the wildcard domain name configuration database.

[0130] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0131] Step S330: When no domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, a domain name resolution failure message is sent.

[0132] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0133] Step S100: Obtain the target domain name of the network request and the wildcard domain name configuration database.

[0134] Step S200: Determine a designated level in the target domain name.

[0135] Step S300: when the wildcard domain name configuration database matches the specified level, searching the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level.

[0136] Step S400: when a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, the target domain name is modified based on the domain name rewriting rule, and a request path corresponding to the modified target domain name is obtained.

[0137] Step S500: Send a network request based on the request path.

[0138] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0139] Step S210: Searching for the target domain name in the dynamic configuration database.

[0140] Step S220: When the target domain name is not found in the dynamic configuration database, determine the specified level in the target domain name.

[0141] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0142] Step S600: searching the modified target domain name in the dynamic configuration database.

[0143] Step S610: When the modified target domain name is found in the dynamic configuration database, the request path is obtained.

[0144] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0145] Step S310: Obtain a regular expression of a wildcard domain name configuration database.

[0146] Step S320: Based on the designated level and the regular expression, match the designated level in the wildcard domain name configuration database.

[0147] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0148] Step S330: When no domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, a domain name resolution failure message is sent.

[0149] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0150] Step S100: Obtain the target domain name of the network request and the wildcard domain name configuration database.

[0151] Step S200: Determine a designated level in the target domain name.

[0152] Step S300: when the wildcard domain name configuration database matches the specified level, searching the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level.

[0153] Step S400: when a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, the target domain name is modified based on the domain name rewriting rule, and a request path corresponding to the modified target domain name is obtained.

[0154] Step S500: Send a network request based on the request path.

[0155] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0156] Step S210: Searching for the target domain name in the dynamic configuration database.

[0157] Step S220: When the target domain name is not found in the dynamic configuration database, determine the specified level in the target domain name.

[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0159] Step S600: searching the modified target domain name in the dynamic configuration database.

[0160] Step S610: When the modified target domain name is found in the dynamic configuration database, the request path is obtained.

[0161] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0162] Step S310: Obtain a regular expression of a wildcard domain name configuration database.

[0163] Step S320: Based on the designated level and the regular expression, match the designated level in the wildcard domain name configuration database.

[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0165] Step S330: When no domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, a domain name resolution failure message is sent.

[0166] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0167] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0168] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for sending a network request, characterized in that: include: Obtain the target domain name of the network request and the wildcard domain name configuration database; Determining a specified level in the target domain name; In the case where the wildcard domain name configuration database matches the specified level, searching the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level; In a case where a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, modifying the target domain name based on the domain name rewriting rule, and obtaining a request path corresponding to the modified target domain name; Based on the request path, the network request is sent.

2. The method for sending a network request according to claim 1, characterized in that: Determining the specified level in the target domain name includes: Searching for the target domain name in a dynamic configuration database; In the case where the target domain name is not found in the dynamic configuration database, a specified level is determined in the target domain name.

3. The method for sending a network request according to claim 2, characterized in that: In the case where a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, the target domain name is modified based on the domain name rewriting rule, and a request path corresponding to the modified target domain name is obtained, including: Searching the modified target domain name in the dynamic configuration database; When the modified target domain name is found in the dynamic configuration database, the request path is obtained.

4. The method for sending a network request according to claim 1, characterized in that: Determining the specified level in the target domain name includes: A second-level domain name and / or a top-level domain name is determined in the target domain name.

5. The method for sending a network request according to claim 1, characterized in that: When the wildcard domain name configuration database matches the specified level, searching the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level includes: Obtaining a regular expression for the wildcard domain name configuration database; Based on the designated level and the regular expression, the designated level is matched in the wildcard domain name configuration database.

6. The method for sending a network request according to claim 1, characterized in that: When the wildcard domain name configuration database matches the specified level, searching the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level includes: When no domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database, domain name resolution failure information is sent.

7. A device for sending a network request, characterized in that: The device comprises: The acquisition module is used to obtain the target domain name of the network request and the wildcard domain name configuration database; A determination module, configured to determine a specified level in the target domain name; A matching module, configured to search the wildcard domain name configuration database for a domain name rewriting rule that matches the specified level when the wildcard domain name configuration database matches the specified level; A modification module, configured to modify the target domain name based on the domain name rewriting rule and obtain a request path corresponding to the modified target domain name when a domain name rewriting rule matching the specified level is found in the wildcard domain name configuration database; A sending module is used to send the network request based on the request path.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Domain name identification method and device, equipment and medium

    CN109995886A

  • Data proxy method and system, and proxy server

    CN112272158A

  • Multi-level proxy dynamic routing method, device and system based on extensive domain name

    CN118764429A

  • Vendor specific base station auto-configuration framework

    US20150006689A1

  • Data proxy method and system and proxy server

    WO2022057000A1

Cited By

  • Method, device and equipment for detecting domain name security, medium and product

    CN120567829A