Domain name query method and device, mobile terminal and computer readable storage medium

By setting up a multi -network shared domain name system cache area in the mobile terminal, the problem of low domain name query efficiency after network switching is solved, and a more efficient domain name query and networking process are realized.

CN119383162APending Publication Date: 2025-01-28HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310945552.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-26
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

After switching to different types of networks, the mobile terminal needs to query the domain name system server again for the IP address of the application server, resulting in poor domain name query efficiency.

Method used

By setting up a multi-network shared domain name system cache area in the mobile terminal, the domain name-IP address pair is stored to avoid repeatedly inquiring directly to the domain name system server during network switching.

Benefits of technology

The domain name query efficiency has been improved, the interaction with the domain name system server has been reduced, and the network efficiency of the application software and the application server is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383162A_ABST
    Figure CN119383162A_ABST
Patent Text Reader

Abstract

The invention provides a domain name query method and device, a mobile terminal and a computer readable storage medium, and relates to the technical field of terminals. The mobile terminal supports a first network and a second network, which are different networks. The method comprises the following steps: in response to a first operation, sending a first domain name query request to a domain name system server through a first network, obtaining an IP address of a first application server, and caching the IP address in a domain name system cache region; on the premise that the mobile terminal firstly caches the IP address of the first application server, even if the first application software is networked with the first application server again, the network is switched; and the mobile terminal can also directly acquire the IP address acquired and stored during networking from the domain name system cache region. The operation time for querying the IP address from the domain name system server during re-networking is saved, the data utilization rate of the domain name system cache region is improved, and the networking efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a domain name query method, device, mobile terminal and computer-readable storage medium. Background Art

[0002] The Domain Name System (DNS) is a distributed database that maps domain names to Internet Protocol (IP) addresses, and provides the IP address of the corresponding application server for the domain name of the application software (APP) on the mobile terminal. When the mobile terminal / application software accesses the Internet, it queries the domain name system server (i.e., DNS server) for the IP address of the corresponding application server based on the domain name of the application software, and connects to the corresponding application server based on the IP address to achieve application networking. After the user operates the mobile terminal to open the application software, the application software will trigger the mobile terminal to perform a domain name query based on the networking needs, that is, query the IP address of the corresponding application server based on the domain name of the application software to be connected to the network.

[0003] In specific implementation, the network types for mobile terminals to access the Internet include but are not limited to cellular networks and wireless networks (Wireless Fidelity, Wi-Fi), etc. After switching to different types of networks, the mobile terminal needs to query the domain name system server again for the IP address of the corresponding application server, resulting in poor domain name query efficiency. Summary of the invention

[0004] The embodiments of the present application provide a domain name query method, device, mobile terminal and computer-readable storage medium, which are used to realize the sharing of DNS cache data among different networks, improve the efficiency of domain name query, reduce the interaction with domain name system servers, and improve the networking efficiency between application software and application servers.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In the first aspect, a domain name query method is provided. The domain name query method is applied to a mobile terminal, and the mobile terminal supports a first network and a second network, and the first network and the second network are different networks. The different networks here can be networks of different types, for example, the first network is a cellular network, and the second network is a wireless local area network; or, the first network is a wireless local area network, and the second network is a cellular network. In other cases, the different networks, the first network and the second network are different networks of the same type, for example, the first network is a first cellular network, and the second network is a second cellular network, the first cellular network is a cellular network accessed by the mobile terminal through the first SIM card of the mobile terminal, and the second cellular network is a cellular network accessed by the mobile terminal through the second SIM card of the mobile terminal, and the first SIM card is different from the second SIM card; or, the first network is a first wireless local area network, and the second network is a second wireless local area network, and the first wireless local area network is different from the second wireless local area network.

[0007] In specific implementation, the mobile terminal will receive a first operation, which is used to instruct the first application software in the mobile terminal to connect to the first application server through the first network. The first application software is any application software in the mobile terminal. The condition for the first application software to connect to the corresponding first application server is that it needs to obtain the IP address of the first server and establish a connection with the first server through the IP address to access the Internet. Then, in response to this first operation, the mobile terminal needs to first send a first domain name query request to the domain name system server through the first network. The first domain name query request includes the domain name of the first application software. The first domain name query request is used to query the IP address of the corresponding first application server according to the domain name of the first application software. The domain name system server stores a large number of domain name-IP addresses. After receiving the first domain name query request sent by the mobile terminal, the corresponding IP address can be queried according to the domain name included in the request. The queried IP address is the IP address of the first application server. The domain name system server sends the queried IP address of the first application server to the mobile terminal. After receiving the IP address of the first application server, the first application software can establish a connection with the first application server based on the IP address through the first network to achieve networking.

[0008] In addition, a domain name system cache is also provided in the mobile terminal, and the domain name system cache can store the domain name-IP address obtained by the mobile terminal through various networks, so that the application software in the mobile terminal can reuse it in subsequent networking scenarios. Therefore, after the mobile terminal obtains the IP address of the first application server according to the domain name of the first application software, it can also store the domain name of the first application software and the IP address of the first application server in the domain name system cache in the mobile terminal. After this, usually within a short period of time, if the user opens the first application software again, if the network is switched, that is, from the first network to the second network, the first application software needs to establish a connection with the first application server again. The mobile terminal detects the second operation of the user opening the first application software again, and determines that the first application software is connected to the first application server through the second network. Although the network is switched at this time, the domain name system cache is a cache shared by multiple networks. Based on this, the mobile terminal does not need to directly query the domain name system server for the IP address of the first application server again, but first queries the domain name system cache to see whether the IP address of the first application server corresponding to the domain name of the first application software is stored.

[0009] If the domain name system cache stores the IP address of the first application server, the IP address of the first application server can be given to the first application software. The first application software establishes a connection with the first application server through the second network based on the queried IP address of the first application server to achieve networking. In this way, under the premise that the mobile terminal has previously cached the IP address of the first application server, even if the first application software has switched networks when it is connected to the first application server again, based on the multi-network sharing characteristics of the domain name system cache, the mobile terminal can also directly obtain the IP address obtained and stored when previously connected to the network from the domain name system cache. This saves the operation of querying the IP address from the domain name system server when connecting to the network again, improves the data utilization rate of the domain name system cache, and improves the networking efficiency.

[0010] In a specific implementation of the present application, the mobile terminal will first obtain the IP address of the application server corresponding to the domain name of each application software from the domain name system server, and then store the domain name of each application software and the IP address of the application server in the domain name system cache area. In this way, after receiving the second operation, the mobile terminal can query whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software. If the domain name system cache area does not store the IP address of the first application server, the mobile terminal needs to send a second domain name query request to the domain name system server through the second network. After that, the mobile terminal receives the IP address of the first application server from the domain name system server, and the first application software is connected to the first application server through the second network based on the IP address of the first application server; and the domain name of the first application software and the IP address of the first application server are stored in the domain name system cache area. After receiving the domain name query request sent by the application software, the mobile terminal first searches in the domain name system cache area, and if it cannot find the domain name, it will remotely query the domain name system server. After the corresponding application server IP address is queried, the domain name of the application software and the IP address of the application server will be stored in the domain name system cache area. In this way, the previously acquired domain name-IP address can be cached as much as possible through the domain name system cache area shared by multiple networks, and the application software can obtain the IP address of the application server to ensure the success rate of networking.

[0011] In a specific embodiment of the present application, a scenario of initiating a domain name query request again is defined. Specifically, after the mobile terminal receives the second operation for indicating that the first mobile terminal is connected to the first application server through the second network, it first determines whether there is a previously established connection that has not been disconnected. For example, if the first application software is not closed, that is, the first application software is running in the foreground or in the background, there is no need to reconnect to the network, and the first application software can continue to access the Internet by directly relying on the previously established connection with the first application server. In other cases, if it is detected through the communication module of the mobile terminal that the first application software is still connected to the first application server, it means that there is no need to reconnect to the network, and the first application software can continue to access the Internet by directly relying on the previously established connection with the first application server.

[0012] Correspondingly, when the mobile terminal receives the second operation and before responding to the second operation, if it is found that the first application software is closed, or that the first application software is not connected to the first application server, it is determined that the first application software needs to be reconnected to the first application server. At this time, the mobile terminal first queries the domain name system cache to see whether the IP address of the first application server corresponding to the domain name of the first application software is stored. If the IP address of the first application server is stored, the network can be connected. If not, it is necessary to query the domain name system server for the IP address of the first application server again to ensure that the first application software can successfully connect to the first application server. Before responding to the request to reconnect to the network, it is determined that the previous network has been disconnected, thereby avoiding unnecessary repeated requests and data query operations.

[0013] In a specific embodiment of the present application, a step of determining the validity period of the cached IP address is added. When the mobile terminal obtains the IP address of the first application server returned by the domain name system server, the validity period of the IP address of the first application server will be returned. The validity period is usually configured by default by the domain name system server when returning the IP address. In other words, the IP address of the first application server obtained by the mobile terminal can be reused only within the validity period. After the validity period expires, it becomes invalid data, and the first application software may not be able to connect to the first application server based on the IP address. Therefore, after the mobile terminal finds the IP address of the first application server stored previously in the domain name system cache area, it needs to further query whether the IP address of the first application server is within the validity period.

[0014] If the IP address of the first application server is valid, it means that the IP address of the first application server is available. The mobile terminal can control the first application software to connect to the first application server through the second network based on the queried IP address of the first application server.

[0015] On the contrary, if the IP address of the first application server is not in the validity period, it means that the IP address of the first application server is unavailable. The mobile terminal needs to send a second domain name query request to the domain name system server through the second network, so as to request the IP address of the first application server from the domain name system server again according to the domain name of the first application software. After that, the mobile terminal receives the IP address of the first application server from the domain name system server. On the one hand, based on the IP address of the first application server through the second network, the first application software is connected to the first application server. On the other hand, the mobile terminal stores the domain name of the first application software and the IP address of the first application server in the domain name system cache area, so as to facilitate the re-initiation of the same domain name query request in a short time and directly obtain the IP address from the domain name system cache area, thereby reducing the interaction with the domain name system server and improving the networking efficiency.

[0016] In a specific implementation of the present application, a deletion operation for IP addresses that are no longer valid is added. Specifically, if the mobile terminal finds that the IP address of the first application server is no longer valid, the domain name of the first application software and the IP address of the first application server stored in the domain name system cache are deleted. In this way, the IP address that is no longer valid can be prevented from being repeatedly queried later, and the memory usage of the domain name system cache is released.

[0017] In a specific implementation of the present application, an operation is added to delete the IP addresses that are no longer valid each time the domain name system cache is queried. Specifically, after receiving the second operation, the mobile terminal can also release all the IP addresses of the application servers and the domain names of the corresponding application software that are no longer valid and stored in the domain name system cache. This reduces the repeated queries of the IP addresses that are no longer valid, and releases more memory usage in the domain name system cache.

[0018] In a specific embodiment of the present application, the execution process of the domain name query method is specifically introduced in combination with the internal framework of the mobile terminal. The mobile terminal includes an application layer, a framework layer and a local library. The application layer runs a first application software, the framework layer runs a communication service and an application service associated with the first application software, and the local library runs a domain name system query module and a domain name system cache area; the application layer obtains the operation data of the first operation and sends it to the framework layer; the application service generates a first domain name query request based on the operation data of the first operation, and the communication service sends the first domain name query request to the domain name system server through the first network, and receives the IP address of the first application server from the domain name system server; the communication service sends the IP address of the first application server to the application layer, and based on the IP address of the first application server, the first application software connects to the first application server through the first network. network; and, storing the domain name of the first application software and the IP address of the first application server in correspondence in the domain name system cache area; the application layer obtains the operation data of the second operation and sends it to the framework layer; the application service generates a second domain name query request based on the operation data of the second operation, and sends it to the domain name system query module, and the domain name system query module queries whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software; if the domain name system query module queries that the domain name system cache area stores the IP address of the first application server, the IP address of the first application server is sent to the application layer, and based on the queried IP address of the first application server, the first application software is connected to the first application server through the second network.

[0019] In a specific implementation of the present application, a solution for nested application software to perform domain name query is added. Specifically, the application layer of the mobile terminal runs a first application software and a second application software, and the first application software is a sub-item of the second application software. The first application software can be opened in the second application software, that is, the second application software calls the first application software to connect to the corresponding first application server. Among them, the first application software and the second application software can be any application software, for example, the first application software can be a map application, the second application software can be a payment application, the second application software can be a sub-application software that must rely on the first application software, or it can be an application software that can be used alone or in a nested manner, without limitation.

[0020] During specific implementation, the second application software of the application layer obtains the operation data of the first operation obtained by the application layer, and sends it to the framework layer; the application service generates a first domain name query request based on the operation data of the first operation, and the communication service sends the first domain name query request to the domain name system server through the first network, and receives the IP address of the first application server from the domain name system server; the communication service sends the IP address of the first application server to the second application software of the application layer, and based on the IP address of the first application server, the second application software calls the first application software to connect to the first application server through the first network; and the domain name of the first application software and the IP address of the first application server are stored in the domain name system cache area in correspondence; the second application software of the application layer obtains the operation data of the second operation, and sends it to the framework layer.

[0021] The application service generates a second domain name query request based on the operation data of the second operation, and sends it to the domain name system query module. The domain name system query module queries whether the domain name system cache stores the IP address of the first application server. If the domain name system query module finds that the domain name system cache stores the IP address of the first application server, the IP address of the first application server is sent to the application layer. Based on the queried IP address of the first application server, the second application software can call the first application software to connect to the first application server through the second network.

[0022] In this way, for domain name query requests initiated by nested application software, the domain name-IP address obtained previously can also be cached through the domain name system cache area shared by multiple networks, thereby optimizing the networking process.

[0023] In a second aspect, another domain name query method is provided, which is applied to a mobile terminal. The difference between the present application and the first aspect includes a domain name query scheme for nested application software in a mobile terminal. The mobile terminal supports a first network and a second network, and the first network and the second network are different networks. Specifically, the mobile terminal responds to a first operation, and the first operation acts on a sub-item in the second application software, namely, the first application software, and instructs the second application software to call the first application software and connect to the first application server. The mobile terminal first sends a first domain name query request to the domain name system server through the first network. The mobile terminal receives the IP address of the first application server from the domain name system server, and based on the IP address of the first application server through the first network, the first application software connects to the first application server in the second application software; and the domain name of the first application software and the IP address of the first application server are stored in the domain name system cache area in the mobile terminal in correspondence.

[0024] Afterwards, the mobile terminal receives a second operation, that is, the user again instructs the second application software to call the first application software to connect to the first application server through the second network. At this time, the mobile terminal first queries the domain name system cache to see whether the IP address of the first application server corresponding to the domain name of the first application software is stored.

[0025] If the domain name system cache stores the IP address of the first application server, the first application software is connected to the first application server in the second application software through the second network based on the queried IP address of the first application server.

[0026] Of course, in other implementations of the second aspect, the mobile terminal may also implement the technical solutions provided by the various implementations of the first aspect, which will not be described one by one here.

[0027] In a third aspect, another domain name query method is provided, which is applied to a mobile terminal, the mobile terminal supports a first network and a second network, and the first network and the second network are different networks. The difference between the present application and the first aspect and the second aspect includes that the domain name query solution for nested application software in the mobile terminal is applicable in both the nested use scenario and the independent use scenario of the application software.

[0028] Specifically, the mobile terminal responds to the first operation, and the first operation indicates that in the nested use scenario, the second application software calls the first application software to connect to the first application server through the first network. The first domain name query request is sent to the domain name system server through the first network. The mobile terminal receives the IP address of the first application server from the domain name system server, and based on the IP address of the first application server through the first network, the first application software connects to the first application server in the second application software; and the domain name of the first application software and the IP address of the first application server are stored in the domain name system cache area in the mobile terminal.

[0029] The mobile terminal receives a second operation, which indicates that in a single use scenario, the IP address of the first application server stored in the previous nested use scenario is reused, and the first application software is connected to the first application server through the second network. Specifically, the mobile terminal first queries whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software. If the domain name system cache area stores the IP address of the first application server, the second application software is connected to the first application server through the second network based on the queried IP address of the first application server.

[0030] Of course, in other implementations of the third aspect, the mobile terminal may also implement the technical solutions provided by the various implementations of the first aspect, which will not be described one by one here.

[0031] In a fourth aspect, a domain name query device is provided, comprising a processor, the processor being configured to execute the domain name query method as described in any one of the first to third aspects. The domain name query device supports a first network and a second network, the first network and the second network being different networks.

[0032] In a specific embodiment of the present application, the processor sends a first domain name query request to the domain name system server through the first network in response to a first operation; wherein the first operation is used to instruct the second application software of the mobile terminal to call the first application software to connect to the first application server through the first network; receive the IP address of the first application server from the domain name system server, and based on the IP address of the first application server through the first network, the first application software connects to the first application server in the second application software; and, store the domain name of the first application software and the IP address of the first application server in the domain name system cache area in the mobile terminal in correspondence; in response to the second operation, query whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software; wherein the second operation is used to instruct the second application software to call the first application software to connect to the first application server through the second network; if the domain name system cache area stores the IP address of the first application server, based on the queried IP address of the first application server through the second network, the first application software connects to the first application server in the second application software.

[0033] In a specific implementation of the present application, the processor is specifically used to:

[0034] If the domain name system cache does not store the IP address of the first application server, sending a second domain name query request to the domain name system server through the second network;

[0035] Receive the IP address of the first application server from the domain name system server, and based on the IP address of the first application server, connect the first application software to the first application server through the second network; and store the domain name of the first application software and the IP address of the first application server in the domain name system cache area in correspondence.

[0036] In a specific implementation of the present application, the processor is specifically used to:

[0037] In response to the second operation, if the first application software is closed, query whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software; wherein the first application software is closed including that the mobile terminal does not run the first application software in the foreground and the background, or,

[0038] In response to the second operation, if the first application software is not connected to the first application server, a query is made as to whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software.

[0039] In a specific implementation of the present application, the processor is specifically used to:

[0040] If the domain name system cache stores the IP address of the first application server, the step of connecting the first application software to the first application server through the second network based on the queried IP address of the first application server includes:

[0041] If the domain name system cache stores the IP address of the first application server, query whether the IP address of the first application server is within the validity period;

[0042] If the IP address of the first application server is valid, the first application software is connected to the first application server through the second network based on the queried IP address of the first application server;

[0043] If the IP address of the first application server is not valid, sending a second domain name query request to the domain name system server through the second network;

[0044] Receive the IP address of the first application server from the domain name system server, and based on the IP address of the first application server, connect the first application software to the first application server through the second network; and store the domain name of the first application software and the IP address of the first application server in the domain name system cache area in correspondence.

[0045] In a specific implementation of the present application, the processor is specifically used to:

[0046] If the IP address of the first application server is no longer valid, the domain name of the first application software and the IP address of the first application server stored in the domain name system cache are deleted.

[0047] In a specific implementation of the present application, the processor is specifically used to:

[0048] In response to the second operation, the IP address of the application server and the domain name of the corresponding application software that are no longer valid and stored in the domain name system cache are deleted.

[0049] In a specific implementation manner of the present application, the first network and the second network are networks of different types.

[0050] In a specific implementation of the present application, the first network is a cellular network, and the second network is a wireless local area network; or,

[0051] The first network is a wireless local area network, and the second network is a cellular network.

[0052] In a specific implementation of the present application, the first network and the second network are different networks of the same type;

[0053] The first network is a first cellular network, and the second network is a second cellular network, the first cellular network is a cellular network accessed by the mobile terminal through a first SIM card of the mobile terminal, and the second cellular network is a cellular network accessed by the mobile terminal through a second SIM card of the mobile terminal, and the first SIM card is different from the second SIM card; or,

[0054] The first network is a first wireless local area network, and the second network is a second wireless local area network. The first wireless local area network is different from the second wireless local area network.

[0055] In a specific implementation of the present application, the domain name query device includes an application layer, a framework layer and a local library, the application layer runs a first application software, the framework layer runs a communication service and an application service associated with the first application software, and the local library runs a domain name system query module and a domain name system cache area;

[0056] The application layer obtains the operation data of the first operation and sends it to the framework layer;

[0057] The application service generates a first domain name query request based on the operation data of the first operation, the communication service sends the first domain name query request to the domain name system server through the first network, and receives the IP address of the first application server from the domain name system server;

[0058] The communication service sends the IP address of the first application server to the application layer, and the first application software is connected to the first application server through the first network based on the IP address of the first application server; and the domain name of the first application software and the IP address of the first application server are stored in the domain name system cache area in correspondence;

[0059] The application layer obtains the operation data of the second operation and sends it to the framework layer;

[0060] The application service generates a second domain name query request based on the operation data of the second operation, and sends the request to the domain name system query module, and the domain name system query module queries whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software;

[0061] If the domain name system query module finds that the domain name system cache area stores the IP address of the first application server, the IP address of the first application server is sent to the application layer, and based on the queried IP address of the first application server through the second network, the first application software is connected to the first application server.

[0062] In a specific implementation of the present application, the application layer runs a second application software, the first application software is a sub-item of the second application software, and the method includes:

[0063] The second application software of the application layer obtains the operation data of the first operation obtained by the application layer, and sends it to the framework layer;

[0064] The application service generates a first domain name query request based on the operation data of the first operation, the communication service sends the first domain name query request to the domain name system server through the first network, and receives the IP address of the first application server from the domain name system server;

[0065] The communication service sends the IP address of the first application server to the second application software of the application layer, and based on the IP address of the first application server through the first network, the second application software is connected to the first application server through the first application software; and the domain name of the first application software and the IP address of the first application server are stored in the domain name system cache area in correspondence;

[0066] The second application software of the application layer obtains the operation data of the second operation and sends it to the framework layer;

[0067] The application service generates a second domain name query request based on the operation data of the second operation, and sends the request to the domain name system query module, and the domain name system query module queries whether the domain name system cache area stores the IP address of the first application server;

[0068] If the domain name system query module finds that the domain name system cache area stores the IP address of the first application server, the IP address of the first application server is sent to the application layer. Based on the queried IP address of the first application server through the second network, the second application software can call the first application software to connect to the first application server.

[0069] In a fifth aspect, a mobile terminal is provided, which has the function of implementing the domain name query method of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0070] In a sixth aspect, a mobile terminal is provided, comprising: a communication module, a processor and a memory, wherein the communication module and the memory are coupled to the processor; the memory is used to store computer execution instructions, and when the mobile terminal is running, the processor executes the computer execution instructions stored in the memory, so that the mobile terminal executes a domain name query method as described in any one of the above-mentioned first aspects.

[0071] In a seventh aspect, a mobile terminal is provided, comprising: a processor; the processor is used to couple with a memory, and after reading instructions in the memory, execute the domain name query method as described in any one of the first aspects above according to the instructions.

[0072] In an eighth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer can execute any domain name query method in the first aspect.

[0073] In a ninth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any domain name query method of the first aspect.

[0074] In a tenth aspect, a domain name query device (for example, the domain name query device can be a chip system) is provided, and the device includes a processor for supporting a control device to implement the functions involved in the first aspect. In a possible design, the device also includes a memory, and the memory is used to store program instructions and data necessary for the control device. When the device is a chip system, it can be composed of a chip, or it can include a chip and other discrete devices.

[0075] Among them, the technical effects brought about by any design method in the second aspect to the tenth aspect can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 A schematic diagram of establishing a TCP connection between a mobile terminal and an application server;

[0077] Figure 2 is a schematic diagram of the internal architecture of a mobile terminal;

[0078] Figure 3 A schematic diagram of an interaction for a mobile terminal to obtain an IP address corresponding to the same domain name through different networks;

[0079] Figure 4 A flowchart of a mobile terminal performing domain name query under different networks;

[0080] Figure 5 A schematic diagram of the internal architecture of a mobile terminal provided in an embodiment of the present application;

[0081] Figure 6 A schematic diagram of an interaction of a mobile terminal performing domain name query through different networks provided in an embodiment of the present application;

[0082] Figure 7 One of the flow diagrams of a mobile terminal performing domain name query through different networks provided in an embodiment of the present application;

[0083] Figure 8 A second flow chart of a mobile terminal performing domain name query through different networks provided in an embodiment of the present application;

[0084] Fig. 9 A third flow chart of a mobile terminal performing domain name query through different networks provided in an embodiment of the present application;

[0085] Fig.10 A fourth flowchart of a mobile terminal performing domain name query through different networks provided in an embodiment of the present application;

[0086] Fig.11 A fifth flowchart of a mobile terminal performing domain name query through different networks provided in an embodiment of the present application;

[0087] Fig.12 A sixth flow chart of a mobile terminal performing domain name query via different networks provided in an embodiment of the present application;

[0088] Fig.13 A schematic diagram of the structure of a mobile terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0089] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0090] To facilitate understanding, some technical common sense involved in the embodiments of the present application is first introduced.

[0091] There are many kinds of application software running in mobile terminals such as mobile phones and laptops. Each application software can use cellular networks or Wi-Fi to connect to the Internet and access Internet information. Application software networking means that the application software obtains the IP address of the application server, and the mobile terminal establishes a TCP connection with the application server based on the IP address. Only after the TCP connection is established can the Internet service be used to access Internet information. When the mobile terminal is turned on and registered to the mobile network, it will first obtain the address of the domain name system server, so that it can obtain the IP address of the application server corresponding to the application software from the domain name system server when the application software needs to be connected to the Internet.

[0092] like Figure 1 The figure shows a schematic diagram of establishing a TCP connection between a mobile terminal and an application server. The specific steps include:

[0093] When a user opens application software A on a mobile terminal, the mobile terminal may send a domain name query request to a domain name system server, and the domain name query request includes the domain name of application software A. The domain name system server queries the IP address of application server A corresponding to the domain name of application software A in the pre-stored mapping relationship between domain names and IP addresses, and returns a domain name resolution result including the IP address of application server A to the mobile terminal.

[0094] The mobile terminal provides the obtained IP address of application server A to application software A, so that application software A can call the communication module and establish a TCP connection with application server A based on the IP address of application server A. After application software A establishes a communication connection with application server A, it can interact with application data, for example, sending application data input by the user to application server A, receiving application data fed back by application server A and displaying it in application software A, etc. It can be seen that when the application software of the mobile terminal is connected to the Internet, it is necessary to first query the domain name to the domain name system server and query the IP address of the corresponding application server.

[0095] like Figure 2 The figure shows the internal architecture of a mobile terminal. The mobile terminal mainly includes the application layer (APP), the framework layer (FWK), the native library (Native Librar) and the hardware abstraction layer (HAL). Taking the scenario of application software A being connected to the Internet as an example, application software A can be any application software in the mobile terminal that can be connected to the Internet through different types of networks, such as payment software, game software, image processing software, etc.

[0096] In the internal framework of the mobile terminal, the top layer is the application layer, and the A application software associated with the A application software runs in the application layer. As the top module interacting with the user, the A application software can receive user input operations, such as the operation of the A application connecting to the Internet, or the operation of the A application software querying data, etc. In general, when the user clicks the icon of the A application software on the desktop of the mobile terminal, it can be considered that the user has triggered the operation of starting the A application software and connecting to the A application server.

[0097] Below the application layer is the framework layer, in which a variety of functional services are running, including but not limited to application services corresponding to various types of application software, networking services associated with various types of networks, resource services, etc. After receiving the user's input operation, the A application software of the application layer sends the relevant operation data to the corresponding application service. The application service generates a corresponding request based on the operation data of the input operation and sends the request to the hardware abstraction layer. For example, if the user's input operation is an operation for the A application software to connect to the network, the application service receives the operation data corresponding to the A application software's networking operation and generates a domain name query request, which may include the domain name of the A application software. The application service sends the domain name query request containing the domain name of the A application software to the hardware abstraction layer.

[0098] The hardware abstraction layer is a functional layer between the upper-layer software and the lower-layer hardware. It is used to implement related data processing and hardware call functions based on the calls of the upper-layer software. There is a local library between the framework layer and the hardware abstraction layer. Basic functional modules such as the DNS module can be run in the local library. In other development platforms, the local library can also be included in the framework layer without limitation.

[0099] After the application service generates a domain name query request, it sends the domain name query request to the DNS module. Figure 2 As shown, the DNS module includes two submodules, namely, a domain name query module and a domain name system cache area. Among them, the domain name query module is used to perform a domain name query operation according to a domain name query request, and query the IP address of the application server corresponding to the domain name of the application software. There are two main ways for the domain name query module to perform a domain name query operation according to the domain name query request. One way is to perform a remote domain name query to a domain name system server connected to the mobile terminal by remote communication, and the other way is to perform a local domain name query in the domain name system cache area in the mobile terminal.

[0100] The domain name system server pre-stores the correspondence between the domain names of various application software and the IP addresses of the corresponding application servers. The domain name system server can be a cache server that caches DNS, or it can be a root server that stores DNS. The domain name system server can be an independent server or a distributed server cluster, without limitation. After the mobile terminal is connected to the Internet, it will establish a remote communication connection with the domain name system server through the Internet service, which is used to request the domain name system server to query the IP addresses of certain application servers, so that the application software of the mobile terminal can connect to the application server based on the corresponding application server IP address and access Internet data.

[0101] After the domain name query module obtains the domain name query request, the network service can send the domain name of the application software in the domain name query request to the remote domain name system server, or directly send the domain name query request containing the domain name of the application software to the domain name system server. The domain name system server queries the IP address of the corresponding application server according to the domain name of the application software contained in the domain name query request, and returns the queried IP address of the application server as the DNS resolution result to the mobile terminal that sent the domain name query request, and then the network service of the mobile terminal sends the IP address of the application server to the DNS module.

[0102] After the DNS module receives the IP address of the application server, it can send the obtained IP address of the application server to the application layer via the application service, and the application layer connects the application software to the application server based on the IP address of the application server. On the other hand, the DNS module can also associate the domain name of the application software with the corresponding IP address of the application server and store it in the domain name system cache area for subsequent domain name query scenarios for the same application software.

[0103] In this way, if the same A application software sends a domain name query request again, the domain name query module can first query whether the corresponding application server IP address is cached in the domain name system cache area. If the corresponding application server IP address is stored in the domain name system cache area, the corresponding application server IP address can be directly sent to the application layer. If the corresponding application server IP address is not stored in the domain name system cache area, the domain name query request can be sent to the remote domain name system server again.

[0104] It should be noted that the DNS resolution result returned by the domain name system server to the mobile terminal, that is, the IP address of the corresponding application server provided according to the domain name of the application, will also provide the effective existence time (Time ToLive, TTL) of the IP address. The period from the return of the IP address by the domain name system server to the expiration of the effective existence time is defined as the validity period. During the validity period, the IP address obtained by the domain name query module from the domain name system cache area is in an available state, and after the validity period expires, the IP address is in an unavailable state. Therefore, if the IP address of the application server queried by the domain name query module in the domain name system cache area is in an unavailable state, the application software cannot be connected to the application server through the IP address, and it is still necessary to send a domain name query request to the domain name system server again to request the new IP address of the corresponding application server.

[0105] Generally speaking, there are two main ways for the domain name query module to perform domain name query, one is to perform local query in the domain name system cache area, and the other is to perform remote query to the domain name system server. Among them, the way to perform local query in the domain name system cache area refers to directly searching for the IP address corresponding to the domain name in the domain name system cache area according to the domain name, and once found, it can be returned to the application layer through the application service. In specific execution, the domain name query module can first query whether there is a corresponding application server IP address in the domain name system cache area every time it receives a domain name query request. If the corresponding application server IP address is not found, or the found application server IP address has expired, it is considered that the local domain name query has failed, and a remote domain name query can be sent to the domain name system server at this time. In this way, the IP address of the application server obtained first is locally cached and used for subsequent domain name query operations, which can reduce the number of remote interactions with the domain name system server to a certain extent, reduce waiting delays, and improve networking speed.

[0106] In actual use, the mobile terminal can be connected to the Internet through different types of networks, and the corresponding networking services are also different. For example, the networking services for networking through cellular networks and the network services for networking through Wi-Fi networks are all different. The mobile terminal can request the domain name system server to query the IP address through different networking services. Then, the networking service obtains the IP address returned by the domain name system server and sends it to the DNS module. The DNS module will also store the correspondence between the domain name and the IP address in the domain name system cache area corresponding to each network type according to different network types. In this way, even if the domain name of the same application software and the corresponding IP address of the application server are different, the network type is different, and the domain name system cache area cached in the DNS module is also different.

[0107] like Figure 3 As shown in FIG. 1 , it is a schematic diagram of an interaction in which a mobile terminal obtains an IP address corresponding to the same domain name through different networks. Figure 2 and Figure 3 As shown, the DNS module of the mobile terminal is provided with a local cache area 1 and a local cache area 2, wherein the local cache area 1 is used to cache the correspondence between the domain name and the IP address obtained through the first network, and the local cache area 2 is used to cache the correspondence between the domain name and the IP address obtained through the second network. Then, when a domain name query request for the same application software is sent again in the future, the domain name query module also needs to search for the IP address in the corresponding domain name system cache area according to different network types. For example, if you connect to the Internet through the first network again, you need to search for the IP address in the local cache area 1 corresponding to the first network; if you connect to the Internet through the second network again, you need to search for the IP address in the local cache area 2 corresponding to the second network. In fact, the IP addresses obtained through different networks using the same domain name are the same.

[0108] In one case, if the application software previously obtained the corresponding IP address through the first network and has stored the IP address in the local cache area 1, and the application software is connected to the network again through the second network, since the corresponding IP address does not exist in the local cache area 2 corresponding to the second network, the domain name query request cannot obtain the IP address from the local cache area 1, but needs to request the domain name system server to query the IP address again. In this way, since the IP addresses corresponding to the caches of different networks cannot be shared, it causes a waste of cache resources and increases the number of remote requests to the domain name system server.

[0109] like Figure 4 The figure shows a flow chart of a mobile terminal performing domain name query under different networks. The connection switches of the two networks of the mobile terminal are both turned on. The mobile terminal can select one of the two networks to connect to the network according to the signal conditions of the two networks, and can switch to another network to connect to the network when the signal of the currently connected network deteriorates, assuming that the first network is connected to the network first.

[0110] When using the first network to connect to the Internet, the mobile terminal first opens the A application software. The mobile terminal generates a first domain name query request including the domain name of the A application software, and sends the first domain name query request to the domain name system server. The domain name system server feeds back a first domain name resolution result based on the first domain name query request. The first domain name resolution result includes the IP address of the A application server corresponding to the A application software.

[0111] After the mobile terminal receives the first domain name resolution result, on the one hand, it sends the IP address of the A application server to the A application software, so that the A application software can connect to the A application server according to the IP address of the A application server, thereby realizing the networking of the A application software. On the other hand, the mobile terminal can also save the IP address and the corresponding domain name in the first domain name resolution result into the local cache area 1 corresponding to the first network, so that the mobile terminal can query it again within the validity period.

[0112] Based on the user's active operation or the automatic closing mechanism of the mobile terminal's application, the mobile terminal closes or kills the A application software, and then opens the A application software again in a short time. If the first network connection fails, the mobile terminal will connect the A application software to the network through the second network. It should be noted that killing the A application here usually refers to the situation where both the foreground process and the background process of the A application are closed.

[0113] Since the local cache area 2 corresponding to the second network does not store the corresponding IP address of the A application server, the mobile terminal still has to send a second domain name query request to the domain name system server to query the IP address of the A application server corresponding to the domain name of the A application software when the IP address of the A application server exists in the local cache area 1. The domain name system server feeds back a second domain name resolution result based on the second domain name query request, and the second domain name resolution result includes the IP address of the A application server.

[0114] After the mobile terminal receives the second domain name resolution result, on the one hand, it sends the IP address of the A application server to the A application software, so that the A application software can connect to the A application server according to the IP address of the A application server, and realize the networking of the A application software through the second network. On the other hand, the mobile terminal can also save the IP address and the corresponding domain name in the second domain name resolution result into the local cache area 2 corresponding to the second network, so that the mobile terminal can query it again within the validity period.

[0115] It can be seen that the domain name query method of the mobile terminal has technical problems that the cache resources are wasted because the IP addresses corresponding to the caches of different networks cannot be shared, and the number of remote requests to the domain name system server is increased.

[0116] In view of this, the embodiments of the present application provide a domain name query method, device, mobile terminal and computer-readable storage medium, which set the domain name system cache area in the mobile terminal as a cache area that can be shared by multiple networks, and recognize the use of the previously cached IP address after switching the network, thereby improving the utilization rate of the cached DNS resources, reducing the number of remote accesses to the domain name system server, and improving the speed of domain name query and application software networking.

[0117] like Figure 5 As shown, it is a schematic diagram of the internal architecture of a mobile terminal provided by an embodiment of the present application. In the embodiment of the present application, a DNS module is running in the local library of the mobile terminal. In addition to the domain name query module, the DNS module also has a domain name system cache area. The domain name system cache area is a cache area shared by multiple networks and does not distinguish between network types. The DNS module can interact with the application service in the framework layer, receive the domain name query request issued by the application service, query the IP address of the application server corresponding to the domain name of the application software based on the domain name query request, and return the queried IP address of the application server to the application service.

[0118] After receiving the domain name query request, the domain name query module will first query whether the IP address corresponding to the domain name of the application software has been stored in the domain name system cache. If the IP address corresponding to the domain name of the application software has been stored and the IP address is within the validity period, the IP address can be directly returned to the application service. If the IP address corresponding to the domain name of the application software is not stored in the domain name system cache, the domain name query module can query the domain name system server for the IP address of the application server corresponding to the domain name of the application software through the network service.

[0119] After the DNS module receives the IP address returned by the domain name system server, it can send the IP address to the application layer, so that the application software can be connected to the corresponding application server based on the IP address. In addition, the DNS module can also store the domain name of the application software and the IP address of the corresponding application server in the domain name system cache area. In this way, when the same application software sends a domain name query request again, regardless of whether the network type of the network sent again is the same as the network type of the last network sent, the domain name query module can directly query the previously stored IP address in the domain name system cache area. As long as the IP address is within the validity period, the application software can be connected to the application server through the IP address.

[0120] like Figure 6 As shown, it is an interactive schematic diagram of a mobile terminal performing domain name query through different networks provided by an embodiment of the present application. The A application software of the mobile terminal needs to be connected to the corresponding A application server, and first sends a first domain name query request to the domain name system server through the first network. The first domain name query request includes the domain name of the A application software. After receiving the first domain name query request, the domain name system server queries the IP address of the A application server corresponding to the domain name of the A application software, and returns the first domain name resolution result including the IP address of the A application server to the mobile terminal. The mobile terminal stores the corresponding relationship between the domain name and the IP address in the domain name system cache area.

[0121] Similarly, if the A application software of the mobile terminal is connected to the network through the second network, after sending a second domain name query request to the domain name system server, it will also receive the second domain name resolution result including the IP address of the A application server returned by the domain name system server. The mobile terminal will also store the corresponding relationship between the domain name and the IP address in the same domain name system cache area shared by multiple networks.

[0122] It should be noted that the different networks here may be networks of different types or different networks of the same type.

[0123] In one implementation, the first network and the second network are different types of networks. For example, the first network is a cellular network and the second network is a wireless local area network; or the first network is a wireless local area network and the second network is a cellular network.

[0124] In another embodiment, the first network and the second network are different networks of the same type. For example, the first network is a first cellular network, and the second network is a second cellular network. The first cellular network is a cellular network accessed by the mobile terminal through the first SIM card of the mobile terminal, and the second cellular network is a cellular network accessed by the mobile terminal through the second SIM card of the mobile terminal, and the first SIM card is different from the second SIM card. For another example, the first network is a first wireless local area network, and the second network is a second wireless local area network, and the first wireless local area network is different from the second wireless local area network.

[0125] like Figure 7 As shown, it is one of the flow charts of a mobile terminal performing domain name query through different networks provided in an embodiment of the present application. Figure 7 The diagram shows a domain name query scenario in which a mobile terminal repeatedly opens the same application program in a short period of time under two different networks. Specifically, the mobile terminal first uses the first network to connect to the Internet. The mobile terminal opens application software A and sets application software A to connect to the Internet for the first time. The first time connecting to the Internet can be identified as the first time the mobile terminal connects to the Internet after installing application software A. It can also be considered that the mobile terminal opens application software A to connect to the Internet for the first time after powering on. It can also be considered that the time interval between application software A and the last time it was opened to connect to the Internet is greater than the interval threshold. In these scenarios, the IP address corresponding to the domain name of application software A has never been stored in the domain name system cache, or the previously stored IP address has expired and is unavailable or deleted.

[0126] At this time, the mobile terminal sends a first domain name query request to the domain name system server, and the first domain name query request includes the domain name of application software A. The domain name system server feeds back a first domain name resolution result based on the first domain name query request, and the first domain name resolution result includes the IP address of application server A corresponding to application software A.

[0127] After receiving the first domain name resolution result, the mobile terminal sends the IP address of application server A to application software A, so that application software A connects to application server A according to the IP address of application server A, thereby realizing networking of application software A. On the other hand, the mobile terminal can also save the IP address and the corresponding domain name in the first domain name resolution result into a domain name system cache area shared by multiple networks, so that the mobile terminal can query it again within the validity period.

[0128] Based on the mechanism of user active operation or automatic closing of the application of the mobile terminal, after the mobile terminal kills the A application, it will open the A application software again in a short time. If the first network connection fails, the mobile terminal will switch to the second network to realize the networking of the A application software. Since the domain name system cache area is a cache area shared by multiple networks, the mobile terminal can directly query and obtain the IP address of the A application server stored previously from the domain name system cache area.

[0129] At this time, the mobile terminal also needs to further determine whether the IP address is within the validity period. If the IP address is still within the validity period, the IP address of the A application server can be directly sent to the A application software, so that the A application software can be connected to the A application server according to the IP address to achieve application networking.

[0130] If the IP address is not within the validity period, it means that the IP address is unavailable, and the mobile terminal needs to query the domain name to the domain name system server again. The mobile terminal can send a second domain name query request to the domain name system server, requesting to query the IP address of the A application server corresponding to the domain name of the A application software. The domain name system server feeds back a second domain name resolution result based on the second domain name query request, and the second domain name resolution result includes the IP address of the A application server.

[0131] Correspondingly, after receiving the second domain name resolution result, the mobile terminal sends the IP address of the A application server to the A application software, so that the A application software can connect to the A application server according to the IP address of the A application server, and the A application software can be connected to the network through the second network. On the other hand, the mobile terminal can also save the IP address and the corresponding domain name in the second domain name resolution result to the domain name system cache area shared by multiple networks, so that the A application software can continue to query and use the corresponding application server IP address within the validity period.

[0132] Of course, when the mobile terminal opens the A application software for the second time, if it still uses the first network to connect to the Internet, it can still directly perform a domain name query in the domain name system cache area.

[0133] It should be noted that in this embodiment, the mobile terminal can turn on the connection switch of the first network in advance, connect to the network through the first network first, and then turn on the connection switch of the second network and switch to the second network when the signal of the first network becomes poor or other reasons cause the connection of the first network to fail. Figure 8 The figure shows the second flow chart of the mobile terminal performing domain name query through different networks provided in the embodiment of the present application. Figure 8 In the embodiment, the mobile terminal may also pre-open the connection switch between the first network and the second network, first connect to the network through the first network, and directly switch to the second network when the first network signal deteriorates or other reasons cause the first network connection to fail.

[0134] like Fig. 9 As shown, it is the third flow chart of the mobile terminal provided in the embodiment of the present application performing domain name query through different networks. In this embodiment, it involves a networking scenario in which application software is used in a nested manner. For example, the first application software and the second application software are application software used in a nested manner, and the first application software is a sub-item of the second application software, and the first application software can be opened in the second application software. In specific implementation, the second application software can be a payment software or a taxi software, and the first application software can be a map software in the payment software or the taxi software. For another example, the second application software can be an instant messaging software, and the first application software can be a mailbox software in the instant messaging software. Of course, the second application software and the first application software here can also be other software related to domain name query on the mobile terminal, without limitation.

[0135] Specifically, Fig. 9 As shown, when the connection switches of the first network and the second network are both turned on, the mobile terminal first uses the first network to connect to the Internet. The mobile terminal first opens the second application software, and based on the user operation, opens the first application software in the second application software. At this time, the mobile terminal first queries whether the IP address of the first application server corresponding to the first application software is cached in the domain name system cache area. If not, a domain name query is performed to the domain name system server to obtain the corresponding IP address of the first application server. The mobile terminal sends the received IP address of the first application server to the second application software so that the second application software can connect to the first application server. In addition, the mobile terminal also stores the domain name of the first application software and the IP address of the first application server in the domain name system cache area.

[0136] If the mobile terminal fails to connect to the first network, it will automatically switch to connect to the second network. If the first application software is opened again in the second application software within a short period of time, the mobile terminal can obtain the IP address obtained after the last domain name query in the domain name system cache area shared by the first network and the second network. At this time, the mobile terminal needs to further determine whether the IP address is within the validity period. If it is within the validity period, the cached IP address of the first application server can be directly sent to the second application software, so that the second application software can connect to the first application server corresponding to the first application software.

[0137] If the cached IP address has expired, it is necessary to perform a domain name query on the domain name system server again. After receiving the IP address of the first application server returned by the domain name system server, the IP address of the first application server is returned to application server A, and the corresponding IP address of the first application software and the first application server is saved in the domain name system cache area.

[0138] In a specific implementation of the present application, a solution for nested application software to perform domain name query is added. Specifically, the application layer of the mobile terminal runs a first application software and a second application software, the first application software is a sub-item of the second application software, and the first application software can be opened in the second application software, that is, the second application software calls the first application software to connect to the corresponding first application server. Among them, the first application software and the second application software can be any application software, for example, the first application software can be a map application, the second application software can be a payment application, the second application software can be a sub-application software that must rely on the first application software, or it can be an application software that can be used alone or in a nested manner, without limitation.

[0139] In a specific implementation, the second application software of the application layer obtains the operation data of the first operation obtained by the application layer, and sends it to the framework layer; the application service generates the first domain name query request based on the operation data of the first operation, the communication service sends the first domain name query request to the domain name system server through the first network, and receives the IP address of the first application server from the domain name system server; the communication service sends the IP address of the first application server to the second application software of the application layer, and based on the IP address of the first application server, the second application software calls the first application software to connect to the first application server through the first network; and the domain name of the first application software and the IP address of the first application server are stored in the domain name system cache area in correspondence; the second application software of the application layer obtains the operation data of the second operation, and sends it to the framework layer.

[0140] The application service generates the second domain name query request based on the operation data of the second operation, and sends it to the domain name system query module, and the domain name system query module queries whether the domain name system cache stores the IP address of the first application server. If the domain name system query module finds that the domain name system cache stores the IP address of the first application server, the IP address of the first application server is sent to the application layer, and based on the queried IP address of the first application server through the second network, the second application software can call the first application software to connect to the first application server.

[0141] In this way, for domain name query requests initiated by nested application software, the domain name-IP address obtained previously can also be cached through the domain name system cache area shared by multiple networks, thereby optimizing the networking process.

[0142] In another embodiment, if Fig.10 FIG. 4 is a flow chart of a mobile terminal performing domain name query through different networks provided in an embodiment of the present application. In this embodiment, the domain name query solution for nested application software in a mobile terminal is applicable in both nested application software usage scenarios and standalone application software usage scenarios.

[0143] Specifically, the mobile terminal responds to the first operation, and the first operation indicates that in the nested use scenario, the second application software calls the first application software to connect to the first application server through the first network. A first domain name query request is sent to the domain name system server through the first network. The mobile terminal receives the IP address of the first application server from the domain name system server, and based on the IP address of the first application server through the first network, the first application software connects to the first application server in the second application software; and the domain name of the first application software and the IP address of the first application server are stored in the domain name system cache area in the mobile terminal.

[0144] The mobile terminal receives a second operation, which indicates that in a single use scenario, the IP address of the first application server stored in the previous nested use scenario is reused, and the first application software is connected to the first application server through the second network. Specifically, the mobile terminal first queries whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software. If the domain name system cache area stores the IP address of the first application server, the second application software is connected to the first application server through the second network based on the queried IP address of the first application server.

[0145] It can be seen that the domain name query method provided in the embodiment of the present application is not only applicable to the domain name query scenario of opening an application software separately, but also applicable to the domain name query scenario of repeatedly opening the same sub-application software in the main application software in the nested application scenario, so as to optimize the repeated domain name query scheme in the nested application scenario and reduce memory usage.

[0146] like Fig.11 As shown, it is the fifth flow chart of the mobile terminal performing domain name query through different networks provided in the embodiment of the present application. In this implementation, a deletion operation for DNS data that has expired is added.

[0147] Correspondingly, when the application software of the mobile terminal needs to query the IP address based on the domain name, the DNS module no longer considers the network information such as the network type contained in the domain name query request of the application software, and directly queries the IP address corresponding to the domain name in the domain name system cache area shared by multiple networks. If the IP address corresponding to the domain name of the application software is cached in the domain name system cache area, it is further determined whether the IP address is within the validity period. If the IP address is within the validity period, it means that the IP address is available, and the cached IP address can be sent to the application software so that the application software can connect to the application server based on the IP address.

[0148] On the contrary, if the IP address corresponding to the domain name is not cached in the domain name system cache area, or the cached IP address has expired, it is necessary to perform a domain name query on the domain name system server to obtain a new IP address corresponding to the domain name of the application software.

[0149] After receiving the DNS resolution result returned by the domain name system server, the mobile terminal sends the IP address of the application server to the application software, so that the application software can connect to the application server based on the IP address. On the other hand, the domain name of the application software and the corresponding IP address of the application server are saved in the domain name system cache area for the same application software to use when initiating a domain name query again.

[0150] In addition, if Fig.11 As shown, when the IP address returned by the domain name system server is obtained and cached, the previously stored IP address that has expired can be deleted to release part of the memory in the domain name system cache area. In addition, the mobile terminal can also delete other IP addresses in the domain name system cache area that have expired to reduce the number of invalid domain name queries and release more memory.

[0151] like Fig.12As shown, it is the sixth flow chart of the mobile terminal performing domain name query through different networks provided by the embodiment of the present application. In this embodiment, when the mobile terminal accesses the Internet through a wireless local area network, the wireless local area network used can be a hotspot network provided by other terminals. At this time, the mobile terminal does not need to send a domain name query request directly to the domain name system server, but sends a domain name query request through other terminals that provide hotspot networks. After the other terminals that provide hotspot networks receive the domain name query request sent by the mobile terminal, they call the DNSmasq module, send a domain name query request to the domain name system server, and return the queried IP address to the mobile terminal. Among them, the DNSmasq module is a small and convenient tool for configuring DNS and DHCP, suitable for small networks, which provides DNS function and optional DHCP function.

[0152] Then, when it comes to mobile terminals initiating domain name query requests through different networks, the differences between hotspot networks and other wireless local area networks include that in hotspot network scenarios, mobile terminals initiate domain name query requests to the domain name system server via other terminals that provide hotspots, and receive the IP address returned by the other terminals; in other wireless local area network scenarios, mobile terminals directly initiate domain name query requests to the domain name system server. However, whether it is a hotspot network, zigbee or other wireless networks, they can share the same domain name system cache area in the mobile terminal, improving the utilization rate of cached data and the efficiency of domain name queries.

[0153] like Fig.13 , which is a schematic diagram of the structure of a mobile terminal provided in an embodiment of the present application.

[0154] In addition, an embodiment of the present application also provides a mobile terminal, including a communication module, a memory and a processor;

[0155] Memory stores computer-executable instructions;

[0156] The processor executes the computer-executable instructions stored in the memory, so that the mobile terminal executes the domain name query method provided by the above embodiment. In addition to these main components, the mobile terminal also includes components for implementing basic functions. Fig.13 Provide specific instructions.

[0157] like Fig.13The figure shows a schematic diagram of the structure of a mobile terminal 1300 provided in an embodiment of the present application. The mobile terminal 1300 may include a processor 1310, an external memory interface 1320, a memory 1321, a Universal Serial Bus (USB) interface 1330, a battery 1340, a power management module 1341, a power chip 1342, an antenna 1, an antenna 2, a mobile communication module 1350, a wireless communication module 1360, an audio module 1370, a speaker 1370A, a receiver 1370B, a microphone 1370C, an earphone interface 1370D, a sensor module 1380, a button 1390, a motor 1391, an indicator 1392, a camera 1393, a display screen 1394, and a SIM card module 1395. The sensor module 1380 may include a pressure sensor 1380A, a gyroscope sensor 1380B, an air pressure sensor 1380C, a magnetic sensor 1380D, an acceleration sensor 1380E, a distance sensor 1380F, a proximity light sensor 1380G, a fingerprint sensor 1380H, a temperature sensor 1380J, a touch sensor 1380K, an ambient light sensor 1380L, a bone conduction sensor 1380M, and the like.

[0158] The structure illustrated in the embodiment of the present invention does not constitute a limitation on the mobile terminal 1300. It may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0159] The processor 1310 may include one or more processing units. For example, the processor 1310 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processor (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0160] The controller can be a decision maker that directs the various components of the mobile terminal 1300 to work in coordination according to the instructions. It is the nerve center and command center of the mobile terminal 1300. The controller generates an operation control signal according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

[0161] The processor 1310 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 1310 is a high-speed cache memory, which can store instructions or data that the processor 1310 has just used or cyclically used. If the processor 1310 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 1310, and thus improves the efficiency of the system.

[0162] In some embodiments, the processor 1310 may include an interface. The interface may include an Inter-Integrated Circuit (I2C) interface, an Inter-Integrated Circuit Sound (I2S) interface, a Pulse Code Modulation (PCM) interface, a Universal Asynchronous Receiver / Transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI) interface, a General-Purpose Input / Output (GPIO) interface, a SIM interface, and / or a USB interface, etc.

[0163] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDL) and a serial clock line (SCL). In some embodiments, the processor 1310 may include multiple groups of I2C buses. The processor 1310 may be coupled to the touch sensor 1380K, the charger, the flash, the camera 1393, etc. through different I2C bus interfaces. For example: the processor 1310 may be coupled to the touch sensor 1380K through the I2C interface, so that the processor 1310 communicates with the touch sensor 1380K through the I2C bus interface, thereby realizing the touch function of the mobile terminal 1300.

[0164] The I2S interface can be used for audio communication. In some embodiments, the processor 1310 can include multiple groups of I2S buses. The processor 1310 can be coupled to the audio module 1370 via the I2S bus to achieve communication between the processor 1310 and the audio module 1370. In some embodiments, the audio module 1370 can transmit an audio signal to the wireless communication module 1360 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0165] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 1370 and the wireless communication module 1360 can be coupled via a PCM bus interface. In some embodiments, the audio module 1370 can also transmit audio signals to the wireless communication module 1360 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication, and the sampling rates of the two interfaces are different.

[0166] The UART interface is a universal serial data bus for asynchronous communication. The bus is a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 1310 and the wireless communication module 1360. For example, the processor 1310 communicates with the Bluetooth module through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 1370 can transmit audio signals to the wireless communication module 1360 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0167] The MIPI interface can be used to connect the processor 1310 with peripheral devices such as the display screen 1394 and the camera 1393. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 1310 and the camera 1393 communicate via the CSI interface to implement the shooting function of the mobile terminal 1300. The processor 1310 and the display screen 1394 communicate via the DSI interface to implement the display function of the mobile terminal 1300.

[0168] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 1310 with the camera 1393, the display 1394, the wireless communication module 1360, the audio module 1370, the sensor module 1380, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0169] The USB interface 1330 may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 1330 may be used to connect a charger to charge the mobile terminal 1300, or may be used to transmit data between the mobile terminal 1300 and a peripheral device. The USB interface 1330 may also be used to connect an earphone to play audio through the earphone. The USB interface 1330 may also be used to connect other mobile terminals, such as an AR device, etc.

[0170] The interface connection relationship between the modules shown in the embodiment of the present invention is only for illustrative purposes and does not constitute a structural limitation on the mobile terminal 1300. The mobile terminal 1300 may adopt different interface connection modes in the embodiment of the present invention, or a combination of multiple interface connection modes.

[0171] The battery 1340 may be a rechargeable battery or a disposable battery. The rechargeable battery may receive charging input through a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the battery 1340 may receive charging input from a wired charger through the USB interface 1330. In some wireless charging embodiments, the battery 1340 may receive wireless charging input through a wireless charging coil of the mobile terminal 1300. While the battery 1340 is charging the power chip 1342, it may also power the mobile terminal 1300 through the power management module 1341.

[0172] The power management module 1341 is used to connect the power chip 1342, the battery 1340 and the processor 1310. The power management module 1341 receives input from the power chip 1342 and / or the battery 1340, and supplies power to the processor 1310, the memory 1321, the external memory interface 1320, the display screen 1394, the camera 1393, and the wireless communication module 1360. The power management module 1341 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some embodiments, the power management module 1341 can also be set in the processor 1310. In some embodiments, the power management module 1341 and the power chip 1342 can also be set in the same device.

[0173] The wireless communication function of the mobile terminal 1300 can be implemented through antenna 1, antenna 2, mobile communication module 1350, wireless communication module 1360, modem and baseband processor.

[0174] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the mobile terminal 1300 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, a cellular network antenna can be reused as a wireless local area network diversity antenna. In some embodiments, the antenna can be used in combination with a tuning switch.

[0175] The mobile communication module 1350 may provide a communication processing module for wireless communication solutions including 2G / 3G / 4G / 5G, etc., applied to the mobile terminal 1300. The mobile communication module 1350 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 1350 receives electromagnetic waves from the antenna 1, and performs filtering, amplification, and other processing on the received electromagnetic waves, and transmits them to the modem for demodulation. The mobile communication module 1350 may also amplify the signal modulated by the modem, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 1350 may be arranged in the processor 1310. In some embodiments, at least some of the functional modules of the mobile communication module 1350 may be arranged in the same device as at least some of the modules of the processor 1310.

[0176] The modem may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 1370A, a receiver 1370B, etc.), or displays an image or video through a display screen 1394. In some embodiments, the modem may be an independent device. In some embodiments, the modem may be independent of the processor 1310 and be set in the same device as the mobile communication module 1350 or other functional modules.

[0177] The wireless communication module 1360 can provide a communication processing module for wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc., which are applied to the mobile terminal 1300. The wireless communication module 1360 can be one or more devices integrating at least one communication processing module. The wireless communication module 1360 receives electromagnetic waves via antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 1310. The wireless communication module 1360 can also receive the signal to be sent from the processor 1310, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through antenna 2.

[0178] In some embodiments, the antenna 1 of the mobile terminal 1300 is coupled to the mobile communication module 1350, and the antenna 2 is coupled to the wireless communication module 1360, so that the mobile terminal 1300 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include Global System for Mobilecommunications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a Global Satellite Positioning System (Satellite Based Augmentation Systems, SBAS), a Global Navigation Satellite System (GLObal NavigAtion Satellite System, GLONASS), a BeiDou navigation Satellite system (BeiDou navigation Satellite system, BDS), a Quasi-Zenith Satellite System (Quasi-Zenith Satellite System, QZSS) and / or a Satellite Based Augmentation System (SBAS).

[0179] The mobile terminal 1300 implements the display function through a GPU, a display screen 1394, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 1394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 1310 may include one or more GPUs that execute program instructions to generate or change display information.

[0180] The display screen 1394 is used to display images, videos, etc. The display screen 1394 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode or an active matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLED, Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the mobile terminal 1300 may include 1 or N display screens 1394, where N is a positive integer greater than 1.

[0181] The mobile terminal 1300 can realize the shooting function through ISP, camera 1393, video codec, GPU, display screen and application processor.

[0182] ISP is used to process the data fed back by camera 1393. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and chromaticity of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 1393.

[0183] The camera 1393 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the mobile terminal 1300 may include 1 or N cameras 1393, where N is a positive integer greater than 1.

[0184] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the mobile terminal 1300 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0185] The video codec is used to compress or decompress digital video. The mobile terminal 1300 may support one or more video codecs. Thus, the mobile terminal 1300 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG13, MPEG4, etc.

[0186] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, the intelligent cognition of the mobile terminal 1300 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0187] The external memory interface 1320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile terminal 1300. The external memory card communicates with the processor 1310 through the external memory interface 1320 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0188] The internal memory 1321 can be used to store computer executable program codes, which include instructions. The processor 1310 executes various functional applications and data processing of the mobile terminal 1300 by running the instructions stored in the internal memory 1321. The memory 1321 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the mobile terminal 1300 (such as audio data, a phone book, etc.), etc. In addition, the memory 1321 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, other volatile solid-state storage devices, a universal flash memory (Universal Flash Storage, UFS), etc.

[0189] The mobile terminal 1300 can implement audio functions such as music playing and recording through the audio module 1370, the speaker 1370A, the receiver 1370B, the microphone 1370C, the earphone interface 1370D, and the application processor.

[0190] The audio module 1370 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 1370 can also be used to encode and decode audio signals. In some embodiments, the audio module 1370 can be arranged in the processor 1310, or some functional modules of the audio module 1370 can be arranged in the processor 1310.

[0191] The speaker 1370A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The mobile terminal 1300 can listen to music or listen to a hands-free call through the speaker 1370A.

[0192] The receiver 1370B, also called a "handset", is used to convert audio electrical signals into sound signals. When the mobile terminal 1300 receives a call or voice message, the voice can be received by placing the receiver 1370B close to the ear.

[0193] Microphone 1370C, also called "microphone" or "microphone", is used to convert sound signals into audio electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 1370C with his mouth to input the sound signal into the microphone 1370C. The mobile terminal 1300 can be provided with at least one microphone 1370C. In some embodiments, the mobile terminal 1300 can be provided with two microphones 1370C, which can not only collect sound signals but also realize noise reduction function. In some embodiments, the mobile terminal 1300 can also be provided with three, four or more microphones 1370C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc.

[0194] The earphone jack 1370D is used to connect a wired earphone and can be a USB interface, or a 3.5 mm Open Mobile Terminal Platform (OMTP) standard interface, or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.

[0195] The key 1390 includes a power key, a volume key, etc. The key 1390 may be a mechanical key or a touch key. The mobile terminal 1300 receives the key 1390 input and generates a key signal input related to the user settings and function control of the mobile terminal 1300.

[0196] Motor 1391 can generate vibration prompts. Motor 1391 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. Touch operations acting on different areas of the display screen 1394 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0197] Indicator 1392 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0198] The SIM card module 1395 is used to implement the communication function of the SIM card. The SIM card module 1395 may include a SIM card interface, a SIM card circuit and related auxiliary devices. The SIM card can be connected to and separated from the mobile terminal 1300 by inserting it into the SIM card interface or pulling it out from the SIM card interface. The mobile terminal 1300 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card module 1395 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface at the same time. The types of the multiple cards can be the same or different. The SIM card interface can also be compatible with different types of SIM cards. The SIM card interface can also be compatible with external memory cards. The mobile terminal 1300 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the mobile terminal 1300 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the mobile terminal 1300 and cannot be separated from the mobile terminal 1300.

[0199] The domain name query methods in the aforementioned embodiments can all be implemented in the mobile terminal 1300 having the aforementioned hardware structure.

[0200] On the basis of the above embodiments, an embodiment of the present application further provides a domain name query device, the domain name query device includes a processor, and the processor is used to execute the domain name query method provided by the above embodiments.

[0201] The embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the domain name query method provided in the above embodiment.

[0202] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the domain name query method provided in the above embodiment.

[0203] The specific implementation methods of the mobile terminal, control device, computer-readable storage medium, and computer program product containing instructions provided in the embodiments of the present application and the technical effects brought about by them can be found in the specific implementation process of the domain name query method provided in the aforementioned embodiments and the technical effects brought about by them, which will not be repeated here.

[0204] In some embodiments, through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0205] Each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0206] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk.

[0207] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.

Claims

1. A domain name query method, characterized in that: Applied to a mobile terminal, the mobile terminal supports a first network and a second network, the first network and the second network are different networks, the method includes: In response to a first operation, sending a first domain name query request to a domain name system server through the first network; wherein the first operation is used to instruct a first application software in the mobile terminal to connect to a first application server through the first network; Receiving the IP address of the first application server from the domain name system server, connecting the first application software to the first application server through the first network based on the IP address of the first application server; and storing the domain name of the first application software and the IP address of the first application server in a domain name system cache area in the mobile terminal in correspondence; In response to a second operation, querying whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software; wherein the second operation is used to instruct the first application software to connect to the first application server through the second network; If the domain name system cache stores the IP address of the first application server, the first application software is connected to the first application server through the second network based on the queried IP address of the first application server.

2. The domain name query method according to claim 1, characterized in that: After the step of querying, in response to the second operation, whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software, the method further includes: If the domain name system cache does not store the IP address of the first application server, sending a second domain name query request to the domain name system server through the second network; Receive the IP address of the first application server from the domain name system server, connect the first application software to the first application server through the second network based on the IP address of the first application server; and store the domain name of the first application software and the IP address of the first application server in the domain name system cache area in correspondence.

3. The domain name query method according to claim 1 or 2, characterized in that: The step of querying, in response to the second operation, whether the domain name system cache stores the IP address of the first application server corresponding to the domain name of the first application software comprises: In response to the second operation, if the first application software is closed, querying whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software; wherein the first application software is closed including that the mobile terminal does not run the first application software in the foreground and the background, or, In response to the second operation, if the first application software is not connected to the first application server, the domain name system cache is queried to see whether the IP address of the first application server corresponding to the domain name of the first application software is stored.

4. The domain name query method according to any one of claims 1 to 3, characterized in that: If the domain name system cache stores the IP address of the first application server, the step of connecting the first application software to the first application server through the second network based on the queried IP address of the first application server includes: If the domain name system cache stores the IP address of the first application server, query whether the IP address of the first application server is valid; If the IP address of the first application server is valid, the first application software is connected to the first application server through the second network based on the queried IP address of the first application server; If the IP address of the first application server is not valid, sending a second domain name query request to the domain name system server through the second network; Receive the IP address of the first application server from the domain name system server, connect the first application software to the first application server through the second network based on the IP address of the first application server; and store the domain name of the first application software and the IP address of the first application server in the domain name system cache area in correspondence.

5. The domain name query method according to claim 4, characterized in that: The method further comprises: If the IP address of the first application server is no longer valid, the domain name of the first application software and the IP address of the first application server stored in the domain name system cache are deleted.

6. The domain name query method according to any one of claims 1 to 5, characterized in that: The method further comprises: In response to the second operation, the IP address of the application server and the domain name of the corresponding application software that are no longer valid and stored in the domain name system cache are deleted.

7. The domain name query method according to any one of claims 1 to 6, characterized in that: The first network and the second network are networks of different types.

8. The domain name query method according to claim 7, characterized in that: The first network is a cellular network, and the second network is a wireless local area network; or, The first network is a wireless local area network, and the second network is a cellular network.

9. The domain name query method according to any one of claims 1 to 6, characterized in that: The first network and the second network are different networks of the same type; The first network is a first cellular network, and the second network is a second cellular network, the first cellular network is a cellular network accessed by the mobile terminal through the first SIM card of the mobile terminal, the second cellular network is a cellular network accessed by the mobile terminal through the second SIM card of the mobile terminal, and the first SIM card is different from the second SIM card; or, The first network is a first wireless local area network, the second network is a second wireless local area network, and the first wireless local area network is different from the second wireless local area network.

10. The domain name query method according to any one of claims 1 to 9, characterized in that: The mobile terminal comprises an application layer, a framework layer and a local library, the application layer runs the first application software, the framework layer runs a communication service and an application service associated with the first application software, and the local library runs a domain name system query module and a domain name system cache area; The application layer obtains the operation data of the first operation and sends it to the framework layer; The application service generates the first domain name query request based on the operation data of the first operation, the communication service sends the first domain name query request to the domain name system server through the first network, and receives the IP address of the first application server from the domain name system server; The communication service sends the IP address of the first application server to the application layer, and the first application software is connected to the first application server through the first network based on the IP address of the first application server; and storing the domain name of the first application software and the IP address of the first application server in the domain name system cache area in correspondence; The application layer obtains the operation data of the second operation and sends it to the framework layer; The application service generates the second domain name query request based on the operation data of the second operation, and sends the request to the domain name system query module, and the domain name system query module queries whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software; If the domain name system query module finds that the domain name system cache area stores the IP address of the first application server, the IP address of the first application server is sent to the application layer, and based on the queried IP address of the first application server, the first application software is connected to the first application server through the second network.

11. The domain name query method according to claim 10, characterized in that: The application layer runs a second application software, the first application software is a sub-item of the second application software, and the method includes: The second application software of the application layer obtains the operation data of the first operation obtained by the application layer, and sends the data to the framework layer; The application service generates the first domain name query request based on the operation data of the first operation, the communication service sends the first domain name query request to the domain name system server through the first network, and receives the IP address of the first application server from the domain name system server; The communication service sends the IP address of the first application server to the second application software of the application layer, and based on the IP address of the first application server, the second application software calls the first application software through the first network to connect to the first application server; and the domain name of the first application software and the IP address of the first application server are stored in the domain name system cache area in correspondence; The second application software of the application layer obtains the operation data of the second operation, and sends it to the framework layer; The application service generates the second domain name query request based on the operation data of the second operation, and sends the request to the domain name system query module, and the domain name system query module queries whether the domain name system cache area stores the IP address of the first application server; If the domain name system query module finds that the domain name system cache area stores the IP address of the first application server, the IP address of the first application server is sent to the application layer, and based on the queried IP address of the first application server through the second network, the second application software calls the first application software to connect to the first application server.

12. A domain name query method, characterized in that: Applied to a mobile terminal, the mobile terminal supports a first network and a second network, the first network and the second network are different networks, the method includes: In response to a first operation, a first domain name query request is sent to a domain name system server through the first network; wherein the first operation is used to instruct the second application software of the mobile terminal to call the first application software to connect to the first application server through the first network; receiving the IP address of the first application server from the domain name system server, and connecting the first application software to the first application server in the second application software through the first network based on the IP address of the first application server; and storing the domain name of the first application software and the IP address of the first application server in a domain name system cache area in the mobile terminal in correspondence; In response to a second operation, querying whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software; wherein the second operation is used to instruct the second application software to call the first application software to connect to the first application server through a second network; If the domain name system cache stores the IP address of the first application server, the first application software is connected to the first application server in the second application software through the second network based on the queried IP address of the first application server.

13. A domain name query method, characterized in that: Applied to a mobile terminal, the mobile terminal supports a first network and a second network, the first network and the second network are different networks, the method includes: In response to a first operation, a first domain name query request is sent to a domain name system server through the first network; wherein the first operation is used to instruct the second application software of the mobile terminal to call the first application software to connect to the first application server through the first network; receiving the IP address of the first application server from the domain name system server, and connecting the first application software to the first application server in the second application software through the first network based on the IP address of the first application server; and storing the domain name of the first application software and the IP address of the first application server in a domain name system cache area in the mobile terminal in correspondence; In response to a second operation, querying whether the domain name system cache area stores the IP address of the first application server corresponding to the domain name of the first application software; wherein the second operation is used to instruct the first application software to connect to the first application server through a second network; If the domain name system cache stores the IP address of the first application server, the second application software is connected to the first application server through the second network based on the queried IP address of the first application server.

14. A domain name query device, characterized in that: The method comprises a processor, wherein the processor is used to execute the domain name query method according to any one of claims 1 to 13.

15. A mobile terminal, characterized in that: It includes a communication module, a memory and a processor, wherein the communication module and the memory are coupled to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the mobile terminal executes the domain name query method according to any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the domain name query method according to any one of claims 1 to 13.