Network access method and device, electronic equipment and computer readable storage medium

By intercepting and combining multiple domain name resolution methods to resolve network domain name addresses, the problem of low network access efficiency is solved and efficient network access is achieved under complex network configurations.

CN120281650APending Publication Date: 2025-07-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410026673.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-05
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

In the complex network configuration, existing network access methods are prone to intercepting, hijacking or misconfiguration of network domain names, resulting in inefficient network access.

Method used

By intercepting network access requests, filtering out the network configuration information corresponding to the target application, determining at least one domain name resolution method and resolution sequence, using multiple domain name resolution methods to perform domain name resolution, obtaining the target network protocol address and sending it to the application server.

Benefits of technology

When the system domain name resolution method is unavailable, the network protocol address can still be parsed to improve network access efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281650A_ABST
    Figure CN120281650A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a network access method and device, electronic equipment and a computer readable storage medium. According to the embodiment of the invention, when it is detected that the target application initiates the network access request, after the network access request is intercepted, the network configuration information corresponding to the target application is screened out from the preset network configuration information set; determining at least one domain name resolution mode corresponding to the target application and a resolution sequence of the domain name resolution modes, and according to the resolution sequence, performing domain name resolution on a network domain name address carried in the network access request by adopting the domain name resolution mode to obtain a target network protocol address of the target application, sending the target network protocol address to an application server of the target application, so that the application server performs network access based on the target network protocol address; according to the scheme, the access efficiency of network access can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communications, and in particular to a network access method, device, electronic device and computer-readable storage medium. Background Art

[0002] In recent years, with the rapid development of Internet technology, various applications have become more and more diverse. For online applications, these applications often need to connect to the network to achieve network access and access various data or resources during operation. For these applications, the current network access method is usually to resolve the network domain name address (DNS domain name) and resolve the network protocol address (IP address) to achieve network access.

[0003] In the process of research and practice of current technology, the inventor of this application found that when resolving network domain name addresses, the local system domain name resolution method is usually used for resolution. Under the complex network configuration, once the network domain name address is intercepted, hijacked or the network domain name address is configured incorrectly, the network domain name address cannot be resolved, and network access cannot be achieved, thus resulting in low network access efficiency. Summary of the invention

[0004] The embodiments of the present application provide a network access method, device, electronic device, and computer-readable storage medium, which can improve the access efficiency of network access.

[0005] A network access method, comprising:

[0006] When it is detected that the target application initiates a network access request, the network access request is intercepted, and the network request carries a network domain name address;

[0007] Filtering out network configuration information corresponding to the target application from a preset network configuration information set;

[0008] Based on the network configuration information, determining at least one domain name resolution method corresponding to the target application and a resolution order of the domain name resolution methods;

[0009] According to the resolution order, the network domain name address is resolved by adopting the domain name resolution method to obtain the target network protocol address of the target application;

[0010] The target network protocol address is sent to an application server of the target application so that the application server performs network access based on the target network protocol address.

[0011] Accordingly, an embodiment of the present application provides a network access device, including:

[0012] An interception unit, configured to intercept the network access request when it detects that a target application initiates a network access request, where the network request carries a network domain name address;

[0013] A screening unit, configured to screen out the domain name resolution configuration information corresponding to the target application from a preset set of domain name resolution configuration information;

[0014] A determination unit, configured to determine at least one domain name resolution method corresponding to the target application and the resolution order of the domain name resolution method based on the domain name resolution configuration information;

[0015] A resolution unit, configured to perform domain name resolution on the network domain name address by using the domain name resolution method according to the resolution order to obtain the target network protocol address of the target application;

[0016] An access unit, configured to send the target network protocol address to the application server of the target application, so that the application server performs network access based on the target network protocol address.

[0017] In some embodiments, the resolution unit may specifically be configured to screen out a target domain name resolution method from the domain name resolution methods according to the resolution order; perform domain name resolution on the network domain name address by using the target domain name resolution method to obtain a domain name resolution result; and determine the target network protocol address of the target application based on the domain name resolution result.

[0018] In some embodiments, the resolution unit may specifically be configured to, when the target domain name resolution method is system domain name resolution, determine the network egress type of the target application based on the network domain name address; obtain at least one network protocol address corresponding to the network egress type to obtain a set of candidate network protocol addresses; detect the network protocol addresses in the set of candidate network protocol addresses, and determine the domain name resolution result of the network domain name address based on the detection result.

[0019] In some embodiments, the resolution unit may specifically be configured to obtain the application attribute information of the target application, and identify the login location of the target application in the application attribute information; screen out network protocol addresses from the set of candidate network protocol addresses based on the login location to obtain a first set of candidate network protocol addresses; and perform a probing connection on the first set of candidate network protocol addresses to obtain the detection result of the first set of candidate network protocol addresses.

[0020] In some embodiments, the parsing unit may specifically be configured to construct at least one network connection based on the candidate network protocol address and determine the connection status of the network connection; when all the connection statuses are in a connected state, determine that the detection result of the first candidate network protocol address is that the probe connection passes; when at least one of the connection statuses is in a non - connected state, determine that the detection result of the first candidate network protocol address is that the probe connection fails.

[0021] In some embodiments, the parsing unit may specifically be configured to, when the detection result indicates that the probe connection passes, use the first candidate network protocol address as the domain name resolution result of the network domain name address; when the detection result indicates that the probe connection fails, determine that the domain name resolution result is that no network protocol address is resolved for the network domain name address.

[0022] In some embodiments, when the target domain name resolution method is target - protocol domain name resolution, the parsing unit may specifically be configured to generate a domain name resolution request based on the network domain name address; send the domain name resolution request to a parsing server corresponding to the target protocol so that the parsing server resolves the network domain name address based on the target protocol; receive the second candidate network protocol address corresponding to the network domain name address returned by the parsing server, and perform a probe connection on the second candidate network protocol address to obtain a domain name resolution result.

[0023] In some embodiments, when the target domain name resolution method is fallback domain name resolution, the parsing unit may specifically be configured to screen out at least one preset network protocol address corresponding to the target application from a preset set of network protocol addresses; perform a probe connection on the preset network protocol address to obtain a detection result, and determine the domain name resolution result of the network domain name address based on the detection result.

[0024] In some embodiments, the parsing unit may specifically be configured to, when the probe connection of the preset network protocol address passes, use the preset network protocol address with the passed probe connection as the domain name resolution result of the network domain name; when the probe connection of the preset network protocol address fails, determine that the domain name resolution result is that no network protocol address is resolved for the network domain name address.

[0025] In some embodiments, when no network protocol address exists in the domain name resolution result, the parsing unit may specifically be configured to screen out the next domain name resolution method of the target domain name resolution method from the domain name resolution methods based on the parsing order to obtain the target network protocol address of the target application; when a network protocol address exists in the domain name resolution result, use the existing network protocol address as the target network protocol address of the target application.

[0026] In some embodiments, the parsing unit may specifically be configured to, based on the parsing order, filter out the next domain name parsing method of the target domain name parsing method from the domain name parsing methods to obtain the current domain name parsing method, and use the current domain name parsing method as the target domain name parsing method; return to execute the step of performing domain name parsing on the network domain name address by using the target domain name parsing method until a network protocol address exists, so as to obtain the target network protocol address of the target application.

[0027] In some embodiments, the filtering unit may specifically be configured to filter out at least one candidate network configuration information corresponding to the target application from a preset set of network configuration information; determine the current service scenario of the target application according to the network access request; and identify the candidate network configuration information corresponding to the current service scenario from the candidate network configuration information to obtain the network configuration information of the target application.

[0028] In addition, an embodiment of the present application further provides an electronic device, including a processor and a memory. The memory stores an application program, and the processor is configured to run the application program in the memory to execute the network access method provided by the embodiment of the present application.

[0029] In addition, an embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the steps in any one of the network access methods provided by the embodiment of the present application.

[0030] In addition, an embodiment of the present application further provides a computer program product, including a computer program or instructions. When the computer program or instructions are executed by a processor, the steps in the network access method provided by the embodiment of the present application are implemented.

[0031] When the present application embodiment detects that a target application initiates a network access request, after intercepting the network access request, it filters out the network configuration information corresponding to the target application from a preset network configuration information set, determines at least one domain name resolution method corresponding to the target application and the resolution order of the domain name resolution method based on the network configuration information, and according to the resolution order, uses the domain name resolution method to perform domain name resolution on the network domain name address carried in the network access request to obtain the target network protocol address of the target application, and sends the target network protocol address to the application server of the target application so that the application server can perform network access based on the target network protocol address; since this solution can resolve the network domain name address by combining multiple domain name resolution methods, it can continue to resolve the network domain name address when the system domain name resolution method is unavailable, and then resolve the network protocol address. Therefore, the access efficiency of network access can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention, and those skilled in the art can obtain other drawings without creative efforts based on these drawings.

[0033] Figure 1 FIG. is a schematic diagram of the scenario of the network access method provided by the embodiment of the present application;

[0034] Figure 2 FIG. is a schematic flowchart of the network access method provided by the embodiment of the present application;

[0035] Figure 3 FIG. is a schematic overall flowchart of the network access for the target application provided by the embodiment of the present application;

[0036] Figure 4 FIG. is another schematic flowchart of the network access method provided by the embodiment of the present application;

[0037] Figure 5 FIG. is a schematic structural diagram of the network access device provided by the embodiment of the present application;

[0038] Figure 6 FIG. is a schematic structural diagram of the electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0040] The embodiments of the present application provide a network access method, device, electronic device and computer-readable storage medium. The network access device can be integrated in an electronic device, which can be a server or a terminal.

[0041] Among them, 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 services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0042] For example, see Figure 1 Taking the network access device integrated in an electronic device as an example, the electronic device can intercept the network access request when it detects that the target application initiates a network access request, filter out the domain name resolution configuration information corresponding to the target application in the preset domain name resolution configuration information set, and determine at least one domain name resolution method and the resolution order of the domain name resolution method corresponding to the target application based on the domain name resolution configuration information. According to the resolution order, the domain name resolution method is used to perform domain name resolution on the network domain name address carried in the network access request to obtain the target network protocol address of the target application, and the target network protocol address is sent to the application server of the target application so that the application server can perform network access based on the target network protocol address, thereby improving the access efficiency of the network access.

[0043] It can be understood that in the specific implementation of the present application, related data such as the domain name resolution configuration information of the object or the attribute information of the target application, when the following embodiments of the present application are applied to specific products or technologies, need to obtain permission or consent, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0044] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0045] This embodiment will be described from the perspective of a network access device, which can be specifically integrated into an electronic device, which can be a server or a terminal. The terminal can include a tablet computer, a laptop computer, a personal computer (PC), a wearable device, a virtual reality device, or other smart devices that can access the network.

[0046] A network access method, comprising:

[0047] When it is detected that the target application initiates a network access request, the network access request is intercepted. The network request carries a network domain name address. The network configuration information corresponding to the target application is filtered out from the preset network configuration information set. Based on the configuration information, at least one domain name resolution method and the resolution order of the domain name resolution method corresponding to the target application are determined. According to the resolution order, the network domain name address is resolved using the domain name resolution method to obtain the target network protocol address of the target application. The target network protocol address is sent to the application server of the target application so that the application server can perform network access based on the target network protocol address.

[0048] like Figure 2 As shown, the specific process of the network access method is as follows:

[0049] 101. When a network access request initiated by a target application is detected, the network access request is intercepted.

[0050] Among them, the network access request is a network request initiated by the target application for network access, and the network access request carries a network domain name address. The so-called network domain name address can be understood as the domain name under the Domain Name System (DNS), that is, the DNS domain name. The Domain Name System is a service of the Internet. As a distributed database that maps domain names and IP addresses to each other, it enables people to access the Internet more conveniently. DNS uses UDP port 53. Currently, the length limit for each level of domain name is 63 characters, and the total length of the domain name cannot exceed 253 characters.

[0051] When it is detected that the target application initiates a network access request, there are multiple ways to intercept the network access request, which can be as follows:

[0052] For example, a proxy extension can be assembled in the running process of the target application. When it is detected that the target application initiates a network access request, the proxy extension is used to intercept the network access request. Or, when it is detected that the target application initiates a network access request, the request is intercepted on the network link of the network access request. Or, when it is detected that the target application initiates a network access request, the network access request is intercepted through a filter. Or, when it is detected that the target application initiates an access request, the network access request can be intercepted through an interceptor. Or, when it is detected that the target application initiates an access request, other interception methods or interception components that can intercept network requests can also be used to intercept the network access request, and so on.

[0053] 102. Screen out at least one network configuration information corresponding to the target application from the preset network configuration information.

[0054] Among them, the network configuration information may include domain name resolution configuration information. The so-called domain name configuration information can be the configuration information for resolving the network domain name address (DNS domain name). The domain name resolution configuration information indicates at least one domain name resolution method configured for the target application and the resolution order of the domain name resolution method.

[0055] Among them, there are various ways to screen out the network configuration information corresponding to the target application from the preset network configuration information. Specifically, it can be as follows:

[0056] For example, at least one candidate network configuration information corresponding to the target application can be screened out from the preset network configuration information set. According to the network access request, determine the current business scenario of the target application, and identify the candidate network configuration information corresponding to the current business scenario in the candidate network configuration information to obtain the network configuration information of the target application. Or, the application identifier of the target application can be obtained, and based on the application identifier, the preset network configuration information corresponding to the application identifier is screened out from the preset network configuration information set to obtain the network configuration information of the target application. Or, the preset network configuration information can also be used as the domain name resolution configuration information of the target application, and so on.

[0057] Among them, the current business scenario includes the business scenario corresponding to the target application when it initiates a network request. There can be various types of business scenarios. For example, taking the target application as an online document processing application, the business scenario can include document processing scenarios, upload and download scenarios, or other business scenarios related to online document processing, and so on.

[0058] Optionally, in some embodiments, before filtering out the network configuration information corresponding to the target application from the preset network configuration information set, the network configuration information corresponding to the target application may also be configured. Taking the network configuration information as domain name resolution configuration information as an example, there may be multiple ways to configure the domain name resolution configuration information corresponding to the target application, for example, a domain name resolution configuration page may be displayed, the domain name resolution configuration page includes a list of candidate domain name resolution methods, in response to a selection operation on the list of candidate domain name resolution methods, at least one candidate domain name resolution method corresponding to the selection operation is determined, a sorting page for the candidate domain name resolution methods is displayed, the sorting page includes a sorting control, in response to a selection operation on the sorting control, the resolution order of each candidate domain name resolution method is determined, and based on the resolution order and the candidate domain name resolution methods, the domain name resolution configuration information corresponding to the target application is generated, and the domain name resolution configuration information corresponding to the target application is added to the preset domain name resolution configuration information set.

[0059] 103. Based on the network configuration information, determine at least one domain name resolution method and a resolution order of the domain name resolution methods corresponding to the target application.

[0060] Among them, the domain name resolution method can be a method or method for performing domain name resolution on a network domain name address. There can be many types of domain name resolution methods, for example, they can include system domain name resolution, target protocol domain name resolution, fallback domain name resolution or other methods that can perform domain name resolution, etc. The so-called system domain name resolution domain name can be understood as performing domain name resolution through the domain name resolution service that comes with the operating system, the target protocol domain name resolution can be understood as performing domain name resolution using the target protocol (for example, HTTP protocol or UDP protocol), and the fallback domain name resolution can be understood as performing domain name resolution through backing up the main DNS server. When the main DNS server cannot resolve the local domain name, the backup IP address is used to perform domain name resolution. The fallback domain name resolution service is configured in the client or local network to provide local domain name resolution services. When the client device or local network cannot access the main DNS server, it can switch to the backup DNS for domain name resolution.

[0061] The resolution order may be understood as the order in which each domain name resolution method resolves the network domain name address when there are multiple domain name resolution methods.

[0062] There are multiple ways to determine at least one domain name resolution method and a resolution order of the domain name resolution methods corresponding to the target application based on the network configuration information, which may be as follows:

[0063] For example, it is possible to extract the domain name resolution configuration text from the network configuration information, identify at least one domain name resolution identifier and the sorting information of the domain name resolution identifier in the domain name resolution configuration text, determine at least one domain name resolution method corresponding to the target application based on the domain name resolution identifier, and determine the resolution order of the domain name resolution method according to the sorting information of the domain name resolution identifier. Or, it is also possible to directly identify at least one domain name resolution method corresponding to the target application and the resolution order of the domain name resolution method in the network configuration information, and so on.

[0064] Among them, the domain name resolution configuration text can be the text corresponding to the code for configuring domain name resolution. An example of the code for domain name resolution configuration can be as follows:

[0065]

[0066] Taking the above-mentioned code for domain name resolution configuration as an example, it is possible to determine that the domain name resolution methods corresponding to the target application include system domain name resolution, target protocol domain name resolution, and fallback domain name resolution. Moreover, the resolution order of the three domain name resolution methods is to first use system domain name resolution. When system domain name resolution fails to perform domain name resolution, continue to use target protocol domain name resolution. When target protocol domain name resolution fails to perform domain name resolution, continue to use fallback domain name resolution until a usable network protocol address (IP address) is resolved.

[0067] Among them, it should be noted that the number of domain name resolution methods corresponding to the target application can be one, two, or more. When there are two or more domain name resolution methods, the resolution order can be freely set or configured, or the default resolution order can be used, or the resolution order of the domain name resolution method can be configured according to the actual application scenario, and so on.

[0068] 104. According to the resolution order, use the domain name resolution method to perform domain name resolution on the network domain name address to obtain the target network protocol address of the target application.

[0069] Among them, the target network protocol address can be understood as the network protocol address obtained after performing domain name resolution on the network domain name address. The so-called network protocol address can be understood as an IP address. The so-called IP address I can be a unified address format provided by the IP protocol. It assigns a logical address to each network and each host on the Internet to shield the differences in physical addresses.

[0070] Among them, according to the resolution order, there are various ways to perform domain name resolution on the network domain name address using the domain name resolution method. Specifically, it can be as follows:

[0071] For example, according to the parsing order, a target domain name resolution method can be filtered out from the domain name resolution methods, and the target domain name resolution method can be used to perform domain name resolution on the network domain name address to obtain a domain name resolution result. Based on the domain name resolution result, the target network protocol address of the target application can be determined.

[0072] Among them, there are various ways to filter out the target domain name resolution method from the domain name resolution methods according to the parsing order. For example, according to the parsing order, a domain name resolution method with the parsing order being the first or the top can be filtered out from the domain name resolution methods to obtain the target domain name resolution method.

[0073] After filtering out the target domain name resolution method from the domain name resolution methods according to the parsing order, the target domain name resolution method can be used to perform domain name resolution on the network domain name address to obtain a domain name resolution result. There are various ways to perform domain name resolution on the network domain name address using the target domain name resolution method. For example, when the target domain name resolution method is the system domain name resolution, the system domain name resolution can be used to perform domain name resolution on the network domain name address to obtain a domain name resolution result. When the target domain name resolution method is the target protocol domain name resolution, the target protocol domain name resolution is used to perform domain name resolution on the network domain name address to obtain a domain name resolution result. When the target domain name resolution method is the fallback domain name resolution, the fallback domain name resolution is used to perform domain name resolution on the network domain name address to obtain a domain name resolution result. Specifically, it can be as follows:

[0074] (1) When the target domain name resolution method is the system domain name resolution, the system domain name resolution is used to perform domain name resolution on the network domain name address to obtain a domain name resolution result.

[0075] For example, when the target domain name resolution method is the system domain name resolution, based on the network domain name address, the network export type of the target application can be determined, at least one network protocol address corresponding to the network export type can be obtained to get a set of candidate network protocol addresses, the network protocol addresses in the set of candidate network protocol addresses are detected, and based on the detection result, the domain name resolution result of the network domain name address is determined.

[0076] Among them, the network export type can be the network type of the network service provider corresponding to the network export when the target application performs network access. For example, it can include mobile network, Unicom network, Telecom network, Radio and Television network, or the network of other network service providers, etc. There are various ways to determine the network export type of the target application based on the network domain name address. For example, based on the network domain name address, the network attribute information of the target application can be determined, and the network export type can be identified from the network attribute information, or the network export type of the target application can be identified from the network domain name address, etc.

[0077] After determining the network egress type of the target application, at least one network protocol address corresponding to the network egress type can be obtained, thus obtaining a set of candidate network protocol addresses. Taking the network egress type as the mobile network as an example, at least one IP address under the mobile network can be obtained, thus obtaining the candidate network protocol addresses.

[0078] After obtaining the set of candidate network protocol addresses, the network protocol addresses in the set of candidate network protocol addresses can be detected. There can be various ways to detect the network protocol addresses in the set of candidate network protocol addresses. For example, the application attribute information of the target application can be obtained, the login location of the target application can be identified in the application attribute information, and based on the login location, the network protocol addresses can be filtered out from the set of candidate network protocol addresses to obtain the first set of candidate network protocol addresses, and a probe connection can be made to the first set of candidate network protocol addresses to obtain the detection result of the candidate network protocol addresses.

[0079] Among them, the login location can be understood as the location where the target application is logged in when or before initiating a network access request. For example, it can be XX City or any other country or region. There can be various ways to filter out the network protocol addresses from the set of candidate network protocol addresses based on the login location. For example, at least one network protocol address corresponding to the login location can be filtered out from the set of candidate network protocol addresses to obtain the first set of candidate network protocol addresses. For instance, taking the login location as XX City as an example, at least one network protocol address of XX City can be filtered out from the set of candidate network protocol addresses as the first set of candidate network protocol addresses, or taking the login location overseas as an example, at least one network protocol address corresponding to overseas can be filtered out from the set of candidate network protocol addresses as the first set of candidate network protocol addresses.

[0080] After filtering out the first set of candidate network protocol addresses from the set of candidate network protocol addresses, a probe connection can be made to the first set of candidate network protocol addresses to obtain the detection result of the first set of candidate network protocol addresses. There can be various ways to make a probe connection to the first set of candidate network protocol addresses. For example, based on the first set of candidate network protocol addresses, at least one network connection can be constructed, and the connection status of the network connection can be determined. When all the connection statuses are in a connected state, the detection result of the first set of candidate network protocol addresses is determined as the probe connection passing, and when there is at least one unconnected state in the connection status, the detection result of the first set of candidate network protocol addresses is determined as the probe connection failing.

[0081] Among them, the types of network connections can be various. For example, it can include TCP connections or SSL handshake connections, etc., and can also include connections with re-update behaviors, and so on.

[0082] After detecting and connecting to the first candidate network protocol address, the domain name resolution result of the network domain name address can be determined based on the detection result after the detection connection. There are various ways to determine the domain name resolution result of the network domain name address. For example, when the detection result indicates that the detection connection passes, the first candidate network protocol address can be used as the domain name resolution result of the network domain name. When the detection result indicates that the detection connection fails, it is determined that the domain name resolution result is that no network protocol address can be resolved from the network domain name address.

[0083] It should be noted that when the number of first candidate network protocol addresses is 1, when the detection connection of this first candidate network protocol address passes, this first candidate network protocol address can be directly used as the domain name resolution result of the network domain name address. When the number of first candidate network protocol addresses is 2 or more, the detection connections can be sequentially performed on the first candidate network protocol addresses. When there is a candidate network protocol address whose detection connection passes, this first candidate network protocol address can be used as the domain name resolution result of the network domain name address. When there is no candidate network protocol address whose detection connection passes, continue to perform the detection connection on the next first candidate network protocol address until it is detected that there is a first candidate network protocol address whose detection connection passes or all the first candidate network protocol addresses have been detected and connected, so as to obtain the domain name resolution result of the network domain name address.

[0084] (2) When the target domain name resolution method is target protocol domain name resolution, use the target protocol domain name resolution to perform domain name resolution on the network domain name address to obtain the domain name resolution result.

[0085] For example, when the target domain name resolution method is target protocol domain name resolution, based on the network domain name address, generate a domain name resolution request, and send the domain name resolution request to the resolution server corresponding to the target protocol, so that the resolution server resolves the network domain name address based on the target protocol, receive the second candidate network protocol address corresponding to the network domain name address returned by the resolution server, and perform a detection connection on the second candidate network protocol address to obtain the domain name resolution result.

[0086] Among them, the type of the target protocol can be various. For example, it can include the HTTP protocol, the UDP protocol, or other network protocols that can perform domain name resolution, etc. Taking the target protocol as the HTTP protocol as an example, the resolution server can be an HTTPDNS server.

[0087] After the parsing server parses out the second candidate network protocol address corresponding to the network domain name address, it can receive the second candidate network protocol address corresponding to the network domain name address returned by the parsing server. Then, a probe connection is made to the second candidate network protocol address to obtain the domain name resolution result. There are various ways to make a probe connection to the second candidate network protocol address. For example, a probe connection can be made to the second candidate network protocol address to obtain the detection result of the second candidate network protocol address, and based on the detection result, the domain name resolution result of the network domain name address is determined. The method of making a probe connection to the second candidate network protocol address and determining the domain name resolution result can be similar to the method of making a probe connection to the first candidate network protocol address and determining the domain name resolution result. For details, see the above description and will not be elaborated here one by one.

[0088] Among them, taking the target protocol as the HTTP protocol as an example, the parsing server corresponding to the HTTP protocol can be obtained through the GSLB service (a network technology).

[0089] Among them, it should be noted that the number of second candidate network protocol addresses returned by the parsing server can be 1, 2, or more.

[0090] (3) When the target domain name resolution method is fallback domain name resolution, the fallback domain name resolution is used to perform domain name resolution on the network domain name address to obtain the domain name resolution result.

[0091] For example, when the target domain name resolution method is fallback domain name resolution, at least one preset network protocol address corresponding to the target application is filtered out from the preset network protocol address set, a probe connection is made to the preset network protocol address to obtain the detection result, and based on the detection result, the domain name resolution result of the network domain name address is determined.

[0092] Among them, at least one preset network protocol address corresponding to the target application can be understood as at least one network protocol address commonly used by the target application in historical network accesses. The method of making a probe connection to the preset network protocol address can be similar to the method of making a probe connection to the candidate network protocol address. For details, see the above description and will not be elaborated here one by one.

[0093] After making a probe connection to the preset network protocol address, the domain name resolution result of the network domain name address can be determined based on the detection result. There are various ways to determine the domain name resolution result of the network domain name address based on the detection result. For example, when the probe connection of the preset network protocol address passes, the preset network protocol address with the passed probe connection is used as the domain name resolution result of the network domain name address. When the probe connection of the preset network protocol address fails, it is determined that the domain name resolution result is that no network protocol address is resolved for the network domain name address.

[0094] It should be noted that in three cases of the target domain name resolution method, the resolution result of the network domain name address can include one of resolving the network protocol address (i.e., there is a network protocol address) and not resolving the network protocol address (i.e., there is no network protocol address). In the case of resolving the network protocol address, the domain name resolution result can include one of the candidate network protocol address, the network protocol address resolved by the resolution server, and the preset network protocol address.

[0095] After performing domain name resolution on the network domain name address using the target domain name resolution method, the target network protocol address of the target application can be determined based on the domain name resolution result. There can be multiple ways to determine the target network protocol address. For example, when there is no network protocol address in the domain name resolution result, the next domain name resolution method of the target domain name resolution method is filtered out based on the resolution order to obtain the target network protocol address of the target application. When there is a network protocol address in the domain name resolution result, the existing network protocol address is used as the target network protocol address of the target application.

[0096] Among them, when there is no network protocol address in the domain name resolution result, the next domain name resolution method of the target domain name resolution method can be filtered out based on the resolution order, so as to obtain the target network protocol address of the target application. There can be multiple ways to filter out the next domain name resolution method of the target domain name resolution method based on the resolution order. For example, the next domain name resolution method of the target domain name resolution method can be filtered out based on the resolution order to obtain the current domain name resolution method, and the current domain name resolution method is used as the target domain name resolution method, and the step of performing domain name resolution on the network domain name address using the target domain name resolution method is returned and executed until there is a network protocol address, and the target network protocol address of the target application is obtained.

[0097] Among them, the domain name resolution methods for the target application include system domain name resolution, target protocol domain name resolution, and fallback domain name resolution. The resolution order of the three domain name resolution methods is system domain name resolution - target protocol domain name resolution - fallback domain name resolution. Taking the network protocol address as an IP address as an example, that is, the system domain name resolution is preferred. At this time, the system domain name resolution method can be used to perform domain name resolution on the network domain name address to obtain the first candidate IP address. Probe and connect to the first candidate IP address. When the connection is successful, the first candidate IP address returned can be used as the network protocol address corresponding to the network domain name address. When the connection fails, the target protocol domain name resolution method can be used to perform domain name resolution on the network domain name address, that is, use the resolution server of the target protocol to perform domain name resolution on the network domain name address, receive the second candidate IP address returned by the resolution server, and probe and connect to the second candidate IP address. When the connection is successful, the second candidate IP address returned can be used as the network protocol address corresponding to the network domain name address. When the connection fails, the fallback domain name resolution method can be used to perform domain name resolution on the network domain name, and so on, until a connected candidate IP address is detected as the IP address corresponding to the network domain name address.

[0098] 105. Send the target network protocol address to the application server of the target application so that the application server can perform network access based on the target network protocol address.

[0099] For example, the target network protocol address can be directly sent to the application server of the target application so that the application server can perform network access based on the target network protocol address. Or, the target network protocol address can be sent to a third-party relay server, so that the third-party relay server sends the target network protocol address to the application server of the target application so that the application server can perform network access based on the target network protocol address. Or, the target network protocol address can also be sent to the terminal corresponding to the target application and sent to the application server of the target application through the terminal corresponding to the target application so that the application server can perform network access based on the target network protocol address. Or, a target network access request can be generated based on the target network protocol address. The target network access request carries the target network protocol address, and the target network access request is sent to the application server of the target application so that the application server can perform network access based on the target network access request, and so on.

[0100] Among them, after receiving the target network protocol address or the target network access request, the application server can perform network access through the target network protocol address. There are various ways for the application server to perform network access through the target network address. For example, at least one target network connection can be constructed through the target network address, and the database, resource server, or other servers can be accessed based on the target network connection, and so on.

[0101] Among them, taking the target application as an online document processing application, the target protocol as the HTTP protocol, the network protocol address as the IP address, and the domain name resolution methods including system domain name resolution (system dns), target protocol domain name resolution (httpdns), and fallback domain name resolution (fallback dns), taking the resolution order of the three domain name resolution methods as system dns - httpdns - fallback dns as an example, the overall process of network access for the target application can be as follows Figure 3 shown as follows. Globally intercept requests initiated by the online document processing application, and add a layer of dnslookup address resolution judgment (a method of domain name resolution address resolution) to the request interceptor. Specifically, it can include resolving the IP address 1 in the way of system dns and detecting and connecting to the IP address 1. When the connection is in a connected state, use IP 1 as the resolved IP address. When the connection is not connected, resolve IP2, 3, or 4, etc. in the way of httpdns (obtained through the GSLB service), and then detect and connect to IP2, 3, or 4, etc. When the connection is in a connected state, use the IP in the connected state as the resolved IP address. When the connection is not connected, resolve IP addresses 5, 6, or 7, etc. in the way of fallback dns, detect and connect to IP addresses 5, 6, or 7, etc. When the connection is in a connected state, use the IP in the connected state as the resolved IP address, and so on, until an IP in a connected state (usable IP address) is found as the resolved IP address. At this time, stop the detection. Then, based on the resolved IP address, send a request to the background of the online document processing application to achieve network access.

[0102] Among them, in this solution, each network request (network access request) initiated by the target application (business side) will be intercepted, and then, the best available IP address is found through a combination of multiple strategies (domain name resolution methods), and then, a request is sent to the background (application server) of the online document processing application, so as to solve the dns interception problem, complete the availability of the target application domain name, and further improve the access efficiency of network access.

[0103] As can be seen from the above, when the network access request initiated by the target application is detected in the embodiment of the present application, after intercepting the network access request, the network configuration information corresponding to the target application is filtered out from the preset network configuration information set. Based on the network configuration information, at least one domain name resolution method corresponding to the target application and the resolution order of the domain name resolution method are determined. According to the resolution order, the domain name resolution method is used to perform domain name resolution on the network domain name address carried in the network access request to obtain the target network protocol address of the target application, and the target network protocol address is sent to the application server of the target application so that the application server can perform network access based on the target network protocol address. Since this solution can resolve the network domain name address by combining multiple domain name resolution methods, it can continue to resolve the network domain name address when the system domain name resolution method is unavailable, and then resolve the network protocol address. Therefore, the access efficiency of network access can be improved.

[0104] According to the method described in the above embodiment, the following will be further described in detail with examples.

[0105] In this embodiment, it will be described by taking the network access device specifically integrated in an electronic device, the electronic device is a server, the network configuration information is domain name resolution configuration information, the target protocol is the HTTP protocol, the system domain name resolution method is system dns, the target protocol domain name resolution method is httpdns, the fallback domain name resolution method is fallback dns, and the network protocol address is the IP address as an example.

[0106] As Figure 4 shown, a network access method has the following specific process:

[0107] 201. When the server detects a network access request initiated by the target application, it intercepts the network access request.

[0108] For example, when the server detects a network access request initiated by the target application, it can assemble a proxy extension in the running process of the target application. When the network access request is detected, the network access request is intercepted through the proxy extension. Or, when the network access request initiated by the target application is detected, it is intercepted on the network link of the network access request. Or, when the network access request initiated by the target application is detected, the network access request is intercepted through a filter. Or, when the access request initiated by the target application is detected, the network access request can be intercepted through an interceptor. Or, when the access request initiated by the target application is detected, other interception methods or interception components that can intercept network requests can also be used to intercept the network access request, and so on.

[0109] 202. The server filters out at least one domain name resolution configuration information corresponding to the target application from the preset domain name resolution configuration information.

[0110] For example, the server may filter out at least one candidate domain name resolution configuration information corresponding to the target application from the preset domain name resolution configuration information set, determine the current business scenario of the target application according to the network access request, identify the candidate domain name resolution configuration information corresponding to the current business scenario from the candidate domain name resolution configuration information to obtain the domain name resolution configuration information of the target application. Or, it may obtain the application identifier of the target application, and based on the application identifier, filter out the preset domain name resolution configuration information corresponding to the application identifier from the preset domain name resolution configuration information set to obtain the domain name resolution configuration information of the target application. Or, it may also use the preset domain name resolution configuration information as the domain name resolution configuration information of the target application, and so on.

[0111] Optionally, in some embodiments, before the server filters out the domain name resolution configuration information corresponding to the target application from the preset domain name resolution configuration information set, it may also display a domain name resolution configuration page. The domain name resolution configuration page includes a list of candidate domain name resolution methods. In response to a selection operation on the list of candidate domain name resolution methods, it determines at least one candidate domain name resolution method corresponding to the selection operation, displays a sorting page for the candidate domain name resolution methods. The sorting page includes sorting controls. In response to a selection operation on the sorting controls, it determines the parsing order of each candidate domain name resolution method, and based on the parsing order and the candidate domain name resolution methods, generates the domain name resolution configuration information corresponding to the target application, and adds the domain name resolution configuration information corresponding to the target application to the preset domain name resolution configuration information set.

[0112] 203. The server determines at least one domain name resolution method corresponding to the target application and the parsing order of the domain name resolution method based on the domain name resolution configuration information.

[0113] For example, the server may extract the domain name resolution configuration text from the domain name resolution configuration information, identify at least one domain name resolution identifier and the sorting information of the domain name resolution identifier in the domain name resolution configuration text, determine at least one domain name resolution method corresponding to the target application based on the domain name resolution identifier, and determine the parsing order of the domain name resolution method according to the sorting information of the domain name resolution identifier. Or, it may also directly identify at least one domain name resolution method corresponding to the target application and the parsing order of the domain name resolution method in the domain name resolution configuration information, and so on.

[0114] 204. The server filters out the target domain name resolution method from the domain name resolution methods according to the parsing order.

[0115] For example, the server can, according to the resolution order, select the domain name resolution method with the first or top resolution order in the domain name resolution methods to obtain the target domain name resolution method.

[0116] 205. The server uses the target domain name resolution method to perform domain name resolution on the network domain name address to obtain a domain name resolution result.

[0117] For example, when the target domain name resolution method is system dns, the server can determine the network attribute information of the target application based on the network domain name address, identify the network egress type in the network attribute information, or can identify the network egress type of the target application in the network domain name address, and so on.

[0118] The server can obtain at least one IP address corresponding to the network egress type to get a set of candidate IP addresses. Obtain the application attribute information of the target application, identify the login location of the target application in the application attribute information, and filter out at least one IP address corresponding to the login location from the set of candidate IP addresses to obtain the first candidate IP address. Based on the first candidate IP address, construct at least one network connection and determine the connection status of the network connection. When all connection statuses are in a connected state, determine that the detection result of the first candidate IP address is that the probe connection passes. When there is at least one unconnected state in the connection status, determine that the detection result of the first candidate IP address is that the probe connection fails.

[0119] When the detection result indicates that the probe connection passes, the server takes the first candidate IP address as the domain name resolution result of the network domain name. When the detection result indicates that the probe connection fails, the server determines that the domain name resolution result is that no IP address is resolved from the network domain name address.

[0120] When the target domain name resolution method is httpdns, the server can generate a domain name resolution request based on the network domain name address, send the domain name resolution request to the resolution server corresponding to the HTTP protocol, so that the resolution server resolves the network domain name address based on the HTTP protocol, receive the second candidate IP address corresponding to the network domain name address returned by the resolution server, and perform a probe connection on the second candidate IP address to obtain the detection result of the second candidate IP address, and based on the detection result, determine the domain name resolution result of the network domain name address.

[0121] When the target domain name resolution method is fallback dns, the server filters out at least one preset IP address corresponding to the target application from the preset IP address set, performs a probe connection on the preset IP address to obtain a detection result. When the probe connection of the preset IP address passes, the server takes the preset IP address with the passed probe connection as the domain name resolution result of the network domain name address. When the probe connection of the preset IP address fails, the server determines that the domain name resolution result is that no IP address is resolved from the network domain name address.

[0122] 206. The server determines the target IP address of the target application based on the domain name resolution result.

[0123] For example, when there is no IP address in the domain name resolution result, the server can, based on the resolution order, screen out the next domain name resolution method in the domain name resolution methods for the target domain name resolution method to obtain the current domain name resolution method, and use the current domain name resolution method as the target domain name resolution method, and return to execute the step of performing domain name resolution on the network domain name address using the target domain name resolution method until an IP address exists, so as to obtain the target IP address of the target application.

[0124] When there is an IP address in the domain name resolution result, the server uses the existing IP address as the target IP address of the target application.

[0125] 207. The server sends the target IP address to the application server of the target application so that the application server can perform network access based on the target IP address.

[0126] For example, the server can directly send the target IP address to the application server of the target application so that the application server can perform network access based on the target IP address, or can send the target IP address to a third-party relay server, so that the third-party relay server sends the target IP address to the application server of the target application so that the application server can perform network access based on the target IP address, or can also send the target IP address to the terminal corresponding to the target application, and send it to the application server of the target application through the terminal corresponding to the target application so that the application server can perform network access based on the target IP address, or can also generate a target network access request based on the target IP address, the target network access request carries the target IP address, and send the target network access request to the application server of the target application so that the application server can perform network access based on the target network access request, and so on.

[0127] From the above, it can be seen that when the server of this embodiment detects that the target application initiates a network access request, after intercepting the network access request, it filters out the domain name resolution configuration information corresponding to the target application in the preset domain name resolution configuration information set, and determines at least one domain name resolution method and the resolution order of the domain name resolution method corresponding to the target application based on the domain name resolution configuration information, and according to the resolution order, uses the domain name resolution method to perform domain name resolution on the network domain name address carried in the network access request to obtain the target IP address of the target application, and sends the target IP address to the application server of the target application so that the application server performs network access based on the target IP address; because this scheme can resolve the network domain name address by combining multiple domain name resolution methods, it can continue to resolve the network domain name address when the system domain name resolution method is unavailable, and then resolve the IP address, thereby improving the access efficiency of network access.

[0128] In order to better implement the above method, an embodiment of the present application also provides a network access device, which can be integrated into an electronic device, such as a server or a terminal. The terminal may include a tablet computer, a laptop computer and / or a personal computer.

[0129] For example, Figure 5 As shown, the network access device may include an interception unit 301, a screening unit 302, a determination unit 303, a parsing unit 304 and an access unit 305, as follows:

[0130] (1) Interception unit 301;

[0131] The interception unit 301 is used to intercept the network access request when it is detected that the target application initiates a network access request, and the network request carries a network domain name address.

[0132] For example, the interception unit 301 may be specifically configured to assemble a proxy extension in the running process of the target application, and when it is detected that the target application initiates a network access request, the network access request is intercepted by the proxy extension.

[0133] (2) screening unit 302;

[0134] The screening unit 302 is used to screen out the network configuration information corresponding to the target application from the preset network configuration information set.

[0135] For example, the screening unit 302 can be specifically used to screen out at least one candidate network configuration information corresponding to the target application from a preset network configuration information set, determine the current business scenario of the target application based on a network access request, identify the candidate network configuration information corresponding to the current business scenario from the candidate network configuration information, and obtain the network configuration information of the target application.

[0136] (3) Determination unit 303;

[0137] The determination unit 303 is configured to determine at least one domain name resolution method corresponding to the target application and the resolution order of the domain name resolution method based on the network configuration information.

[0138] For example, the determination unit 303 can specifically be configured to extract a domain name resolution configuration text from the network configuration information, identify at least one domain name resolution identifier and the sorting information of the domain name resolution identifier in the domain name resolution configuration text, determine at least one domain name resolution method corresponding to the target application based on the domain name resolution identifier, and determine the resolution order of the domain name resolution method according to the sorting information of the domain name resolution identifier.

[0139] (4) Resolution unit 304;

[0140] The resolution unit 304 is configured to perform domain name resolution on the network domain name address by using the domain name resolution method according to the resolution order to obtain the target network protocol address of the target application.

[0141] For example, the resolution unit 304 can specifically be configured to, according to the resolution order, filter out the target domain name resolution method from the domain name resolution methods, perform domain name resolution on the network domain name address by using the target domain name resolution method to obtain a domain name resolution result, when the network protocol address does not exist in the domain name resolution result, based on the resolution order, filter out the next domain name resolution method of the target domain name resolution method from the domain name resolution methods to obtain the current domain name resolution method, and use the current domain name resolution method as the target domain name resolution method, and return to execute the step of performing domain name resolution on the network domain name address by using the target domain name resolution method until the network protocol address exists, to obtain the target network protocol address of the target application, and when the network protocol address exists in the domain name resolution result, use the existing network protocol address as the target network protocol address of the target application.

[0142] (5) Access unit 305;

[0143] The access unit 305 is configured to send the target network protocol address to the application server of the target application, so that the application server performs network access based on the target network protocol address.

[0144] For example, the access unit 305 can specifically be configured to generate a target network access request based on the target network protocol address, where the target network access request carries the target network protocol address, and send the target network access request to the application server of the target application, so that the application server performs network access based on the target network access request.

[0145] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.

[0146] From the above, it can be seen that in the embodiment of the present application, when the interception unit 301 detects that the target application initiates a network access request, after intercepting the network access request, the screening unit 302 screens out the network configuration information corresponding to the target application in the preset network configuration information set, and the determination unit 303 determines at least one domain name resolution method and the resolution order of the domain name resolution method corresponding to the target application based on the network configuration information. The resolution unit 304 uses the domain name resolution method to perform domain name resolution on the network domain name address carried in the network access request according to the resolution order, and obtains the target network protocol address of the target application. The access unit 305 sends the target network protocol address to the application server of the target application, so that the application server performs network access based on the target network protocol address. Since the scheme can resolve the network domain name address by combining multiple domain name resolution methods, it can continue to resolve the network domain name address when the system domain name resolution method is unavailable, and then resolve the network protocol address, thereby improving the access efficiency of network access.

[0147] The present application also provides an electronic device, such as Figure 6 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:

[0148] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0149] The processor 401 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 performs various functions of the electronic device and processes data. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.

[0150] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the electronic device. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. Correspondingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0151] The electronic device further includes a power supply 403 for powering each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 403 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.

[0152] The electronic device may further include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0153] Although not shown, the electronic device may further include a display unit, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402 to implement various functions as follows:

[0154] When it is detected that a target application initiates a network access request, intercept the network access request. The network request carries a network domain name address. Screen out the network configuration information corresponding to the target application from a preset set of network configuration information. Based on the network configuration information, determine at least one domain name resolution method and the resolution order of the domain name resolution method corresponding to the target application. According to the resolution order, use the domain name resolution method to perform domain name resolution on the network domain name address to obtain the target network protocol address of the target application, and send the target network protocol address to the application server of the target application so that the application server can perform network access based on the target network protocol address.

[0155] For example, the electronic device can assemble a proxy extension in the running process of the target application. When detecting that the target application initiates a network access request, the proxy extension intercepts the network access request. Screen out at least one candidate network configuration information corresponding to the target application from the preset network configuration information set, determine the current business scenario of the target application according to the network access request, identify the candidate network configuration information corresponding to the current business scenario from the candidate network configuration information, and obtain the network configuration information of the target application. Extract the domain name resolution configuration text from the network configuration information, identify at least one domain name resolution identifier and the sorting information of the domain name resolution identifier in the domain name resolution configuration text, determine at least one domain name resolution method corresponding to the target application based on the domain name resolution identifier, and determine the resolution order of the domain name resolution method according to the sorting information of the domain name resolution identifier. According to the resolution order, screen out the target domain name resolution method from the domain name resolution methods, perform domain name resolution on the network domain name address using the target domain name resolution method to obtain the domain name resolution result. When there is no network protocol address in the domain name resolution result, based on the resolution order, screen out the next domain name resolution method after the target domain name resolution method from the domain name resolution methods to obtain the current domain name resolution method, and use the current domain name resolution method as the target domain name resolution method, and return to execute the step of performing domain name resolution on the network domain name address using the target domain name resolution method until there is a network protocol address, and obtain the target network protocol address of the target application. When there is a network protocol address in the domain name resolution result, use the existing network protocol address as the target network protocol address of the target application. Generate a target network access request based on the target network protocol address, where the target network access request carries the target network protocol address, and send the target network access request to the application server of the target application so that the application server can perform network access based on the target network access request.

[0156] For the specific implementation of each of the above operations, reference can be made to the previous embodiments and will not be elaborated here.

[0157] As can be seen from the above, when the target application initiates a network access request in the embodiment of the present application, after intercepting the network access request, the network configuration information corresponding to the target application is filtered out from the preset network configuration information set. Based on the network configuration information, at least one domain name resolution method and the resolution order of the domain name resolution method corresponding to the target application are determined. According to the resolution order, the domain name resolution method is used to perform domain name resolution on the network domain name address carried in the network access request to obtain the target network protocol address of the target application, and the target network protocol address is sent to the application server of the target application so that the application server can perform network access based on the target network protocol address. Since this solution can resolve the network domain name address by combining multiple domain name resolution methods, it can continue to resolve the network domain name address when the system domain name resolution method is unavailable, and then resolve the network protocol address. Therefore, the access efficiency of network access can be improved.

[0158] Those of ordinary skill in the art can understand that all or part of the steps in the above-mentioned various methods can be completed by instructions or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0159] Therefore, the embodiment of the present application provides a computer-readable storage medium, in which multiple instructions are stored, and the instructions can be loaded by a processor to execute the steps in any network access method provided by the embodiment of the present application. For example, the instructions can execute the following steps:

[0160] When it is detected that the target application initiates a network access request, intercept the network access request. The network request carries a network domain name address. Filter out the network configuration information corresponding to the target application from the preset network configuration information set. Based on the network configuration information, determine at least one domain name resolution method and the resolution order of the domain name resolution method corresponding to the target application. According to the resolution order, use the domain name resolution method to perform domain name resolution on the network domain name address to obtain the target network protocol address of the target application, and send the target network protocol address to the application server of the target application so that the application server can perform network access based on the target network protocol address.

[0161] For example, an agent extension is assembled during the running process of the target application. When it is detected that the target application initiates a network access request, the proxy extension intercepts the network access request. At least one candidate network configuration information corresponding to the target application is filtered out from the preset network configuration information set. According to the network access request, the current business scenario of the target application is determined, and the candidate network configuration information corresponding to the current business scenario is identified from the candidate network configuration information to obtain the network configuration information of the target application. The domain name resolution configuration text is extracted from the network configuration information, and at least one domain name resolution identifier and the sorting information of the domain name resolution identifier are identified in the domain name resolution configuration text. Based on the domain name resolution identifier, at least one domain name resolution method corresponding to the target application is determined, and according to the sorting information of the domain name resolution identifier, the resolution order of the domain name resolution method is determined. According to the resolution order, the target domain name resolution method is filtered out from the domain name resolution methods, and the target domain name resolution method is used to perform domain name resolution on the network domain name address to obtain the domain name resolution result. When there is no network protocol address in the domain name resolution result, based on the resolution order, the next domain name resolution method after the target domain name resolution method is filtered out from the domain name resolution methods to obtain the current domain name resolution method, and the current domain name resolution method is used as the target domain name resolution method, and the step of performing domain name resolution on the network domain name address using the target domain name resolution method is returned until there is a network protocol address, and the target network protocol address of the target application is obtained. When there is a network protocol address in the domain name resolution result, the existing network protocol address is used as the target network protocol address of the target application. Based on the target network protocol address, a target network access request is generated, and the target network access request carries the target network protocol address. The target network access request is sent to the application server of the target application so that the application server can perform network access based on the target network access request.

[0162] For the specific implementation of each of the above operations, reference may be made to the previous embodiments and will not be elaborated here.

[0163] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.

[0164] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the network access methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any of the network access methods provided in the embodiments of the present application can be realized. For details, reference may be made to the previous embodiments and will not be elaborated here.

[0165] Among them, according to one aspect of the present application, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in the various alternative implementations of the above-mentioned network access aspect or DNS interception aspect.

[0166] The above has introduced in detail a network access method, device, electronic device and computer-readable storage medium provided by the embodiments of the present application. Specific examples are used in this article to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A network access method, characterized in that, Including: When it is detected that the target application initiates a network access request, intercept the network access request, and the network request carries a network domain name address; Filter out the network configuration information corresponding to the target application from the preset network configuration information set; Based on the network configuration information, determine at least one domain name resolution method corresponding to the target application and the resolution order of the domain name resolution method; According to the resolution order, use the domain name resolution method to perform domain name resolution on the network domain name address to obtain the target network protocol address of the target application; Send the target network protocol address to the application server of the target application so that the application server can perform network access based on the target network protocol address.

2. The network access method according to claim 1, wherein The step of using the domain name resolution method to perform domain name resolution on the network domain name address according to the resolution order to obtain the target network protocol address of the target application includes: According to the resolution order, filter out the target domain name resolution method from the domain name resolution methods; Use the target domain name resolution method to perform domain name resolution on the network domain name address to obtain a domain name resolution result; Based on the domain name resolution result, determine the target network protocol address of the target application.

3. The network access method according to claim 2, wherein The step of using the target domain name resolution method to perform domain name resolution on the network domain name address to obtain a domain name resolution result includes: When the target domain name resolution method is the system domain name resolution, based on the network domain name address, determine the network egress type of the target application; Obtain at least one network protocol address corresponding to the network egress type to obtain a candidate network protocol address set; Detect the network protocol addresses in the candidate network protocol address set, and based on the detection result, determine the domain name resolution result of the network domain name address.

4. The network access method according to claim 3, characterized in that, The step of detecting the network protocol addresses in the candidate network protocol address set includes: Obtain the application attribute information of the target application, and identify the login location of the target application in the application attribute information; Based on the login location, filter out network protocol addresses from the candidate network protocol address set to obtain a first candidate network protocol address; Perform a probe connection on the first candidate network protocol address to obtain the detection result of the first candidate network protocol address.

5. The network access method according to claim 4, wherein The step of performing a probe connection on the first candidate network protocol address to obtain the detection result of the first candidate network protocol address includes: Based on the candidate network protocol address, construct at least one network connection and determine the connection status of the network connection; When the connection statuses are all connected statuses, determine that the detection result of the first candidate network protocol address is that the probe connection passes; When at least one of the connection statuses is an unconnected status, determine that the detection result of the first candidate network protocol address is that the probe connection fails.

6. The network access method according to claim 5, wherein The step of determining the domain name resolution result of the network domain name address based on the detection result includes: When the detection result indicates that the probe connection passes, use the first candidate network protocol address as the domain name resolution result of the network domain name address; When the detection result indicates that the probe connection fails, determine that the domain name resolution result is that no network protocol address is resolved for the network domain name address.

7. The network access method according to claim 2, wherein The performing domain name resolution on the network domain name address by using the target domain name resolution method to obtain a domain name resolution result includes: When the target domain name resolution method is target protocol domain name resolution, generate a domain name resolution request based on the network domain name address; Send the domain name resolution request to a resolution server corresponding to the target protocol, so that the resolution server resolves the network domain name address based on the target protocol; Receive a second candidate network protocol address corresponding to the network domain name address returned by the resolution server, and perform a probe connection on the second candidate network protocol address to obtain a domain name resolution result.

8. The network access method according to claim 2, wherein The performing domain name resolution on the network domain name address by using the target domain name resolution method to obtain a domain name resolution result includes: When the target domain name resolution method is fallback domain name resolution, screen out at least one preset network protocol address corresponding to the target application from a preset network protocol address set; Perform a probe connection on the preset network protocol address to obtain a detection result, and determine the domain name resolution result of the network domain name address based on the detection result.

9. The network access method according to claim 8, wherein The determining the domain name resolution result of the network domain name address based on the detection result includes: When the probe connection of the preset network protocol address passes, use the preset network protocol address with the passed probe connection as the domain name resolution result of the network domain name; When the probe connection of the preset network protocol address fails, determine that the domain name resolution result is that no network protocol address is resolved for the network domain name address.

10. The network access method according to claim 2, wherein The determining the target network protocol address of the target application based on the domain name resolution result includes: When no network protocol address exists in the domain name resolution result, screen out the next domain name resolution method of the target domain name resolution method from the domain name resolution methods based on the resolution order to obtain the target network protocol address of the target application; When a network protocol address exists in the domain name resolution result, use the existing network protocol address as the target network protocol address of the target application.

11. The network access method according to claim 10, wherein The screening out the next domain name resolution method of the target domain name resolution method from the domain name resolution methods based on the resolution order to obtain the target network protocol address of the target application includes: Based on the resolution order, screen out the next domain name resolution method of the target domain name resolution method from the domain name resolution methods to obtain the current domain name resolution method, and use the current domain name resolution method as the target domain name resolution method; Return to execute the step of performing domain name resolution on the network domain name address by using the target domain name resolution method until a network protocol address exists, to obtain the target network protocol address of the target application.

12. The network access method according to claim 1, wherein The screening out the network configuration information corresponding to the target application from a preset network configuration information set includes: Screen out at least one candidate network configuration information corresponding to the target application from a preset network configuration information set; Determine the current business scenario of the target application according to the network access request; Identify the candidate network configuration information corresponding to the current business scenario in the candidate network configuration information to obtain the network configuration information of the target application.

13. A network access device, characterized in that, Including: An interception unit, configured to intercept the network access request when detecting that the target application initiates a network access request, and the network request carries a network domain name address; A screening unit, configured to screen out the network configuration information corresponding to the target application from a preset network configuration information set; A determination unit, configured to determine at least one domain name resolution method corresponding to the target application and the resolution order of the domain name resolution method based on the network configuration information; A resolution unit, configured to perform domain name resolution on the network domain name address by using the domain name resolution method according to the resolution order to obtain the target network protocol address of the target application; An access unit, configured to send the target network protocol address to the application server of the target application, so that the application server performs network access based on the target network protocol address.

14. An electronic device, characterized in that, Including a processor and a memory, the memory stores an application program, and the processor is configured to run the application program in the memory to execute the steps in the network access method according to any one of claims 1 to 12.

15. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, the steps in the network access method according to any one of claims 1 to 12 are implemented.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores multiple instructions, and the instructions are suitable for being loaded by the processor to execute the steps in the network access method according to any one of claims 1 to 12.

Citation Information

Cited By

  • Network access method and device in DNS hijacked scene and related product

    CN121690784A