CN109768980B - Server access method, device, mobile terminal and computer readable storage medium - Google Patents

Server access method, device, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN109768980B
CN109768980B CN201910042580.3A CN201910042580A CN109768980B CN 109768980 B CN109768980 B CN 109768980B CN 201910042580 A CN201910042580 A CN 201910042580A CN 109768980 B CN109768980 B CN 109768980B
Authority
CN
China
Prior art keywords
domain name
list
resolution address
name resolution
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910042580.3A
Other languages
Chinese (zh)
Other versions
CN109768980A (en
Inventor
黄开勋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth Software Co Ltd
Original Assignee
Shenzhen Skyworth Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Skyworth Software Co Ltd filed Critical Shenzhen Skyworth Software Co Ltd
Priority to CN201910042580.3A priority Critical patent/CN109768980B/en
Publication of CN109768980A publication Critical patent/CN109768980A/en
Application granted granted Critical
Publication of CN109768980B publication Critical patent/CN109768980B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a server access method, a device, a mobile terminal and a computer readable storage medium, wherein the method comprises the following steps: when the access abnormality of a server corresponding to a mobile terminal is detected, a request for acquiring a domain name list is sent to the server, when the domain name list is not received, a preset domain name list is acquired, the request for acquiring a domain name resolution address list is sent, when the domain name resolution address list is not received, the preset domain name resolution address list is acquired, the connection relation between the domain name of the preset domain name list and the domain name resolution address of the preset domain name list is detected according to the preset domain name list and the preset domain name resolution address list, a detection result is obtained, whether a target domain name resolution address meeting a preset condition exists or not is judged according to the detection result, if the target domain name resolution address exists, the target domain name resolution address is acquired, the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and the. The invention improves the success rate of server access.

Description

Server access method, device, mobile terminal and computer readable storage medium
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a server access method, an apparatus, a mobile terminal, and a computer-readable storage medium.
Background
The internet television OTT box refers to a high-definition mobile terminal for a user to watch online videos (such as high-definition live television, television drama, movies, integrated art and the like) through connecting the internet. With the popularization of networks, OTT boxes have entered thousands of households. At present, an OTT box generally uses a Local domain name of an operator to resolve a server domain name, but the Local domain name has a problem that a background domain name cannot be resolved, so that connection with the background server fails, and user experience is affected.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a server access method, a server access device, a mobile terminal and a computer readable storage medium, and aims to solve the problem that a server cannot be accessed.
In order to achieve the above object, the present invention provides a server access method, including the following steps:
when detecting that a server corresponding to a mobile terminal is abnormally accessed, sending a request for acquiring a domain name list to the server;
when the domain name list is not received, acquiring a preset domain name list, and sending a request for acquiring a domain name resolution address list to the server;
when the domain name resolution address list is not received, acquiring a preset domain name resolution address list;
detecting the connection relation between the domain name corresponding to the preset domain name list and the domain name resolution address corresponding to the preset domain name list according to the preset domain name list and the preset domain name resolution address list, and obtaining a detection result;
judging whether a target domain name resolution address meeting preset conditions exists according to the detection result;
and if the target domain name resolution address exists, the target domain name resolution address is obtained, the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and the server is successfully connected.
Optionally, when detecting that a server corresponding to the mobile terminal is abnormally accessed, the step of sending a request for obtaining the domain name list to the server includes:
when detecting that a server corresponding to a mobile terminal is abnormally accessed, acquiring the product model and serial number information of the mobile terminal;
and sending the product model and the serial number information of the mobile terminal to the server as request information for acquiring a domain name list.
Optionally, after the step of sending a request for obtaining a domain name list to the server when it is detected that the server corresponding to the mobile terminal is abnormally accessed, the method further includes:
when receiving the domain name list, sending a request for acquiring a domain name resolution address list to the server;
when the domain name resolution address list is received, detecting the connection relation between the domain name corresponding to the domain name list and the domain name resolution address corresponding to the domain name resolution address list according to the domain name list and the domain name resolution address list, and obtaining a detection result;
judging whether a target domain name resolution address meeting preset conditions exists according to the detection result;
and if the target domain name resolution address exists, the target domain name resolution address is obtained, the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and the server is successfully connected.
Optionally, the step of acquiring a preset domain name list and sending a request for acquiring a domain name resolution address list to the server when the domain name list is not received includes:
when the domain name list is not received, acquiring a preset domain name list, and detecting whether the mobile terminal is in a networking state;
if the mobile terminal is in a networking state, acquiring a network operator, an Internet Protocol (IP) address and geographical position information of the mobile terminal;
and sending the operator, the IP address and the geographical position information of the mobile terminal to the server as request information for acquiring the domain name resolution address list.
Optionally, the step of detecting a connection relationship between a domain name corresponding to the preset domain name list and a domain name resolution address corresponding to the preset domain name list according to the preset domain name list and the preset domain name resolution address list to obtain a detection result includes:
acquiring a domain name corresponding to the preset domain name list, modifying the domain name corresponding to the mobile terminal into the domain name corresponding to the preset domain name list, and executing ping operation for detecting whether the domain name corresponding to the preset domain name list is connected with a domain name resolution address corresponding to the preset domain name list;
and obtaining a detection result, and storing the domain name corresponding to the preset domain name list and the detection result between the domain name corresponding to the preset domain name list and the domain name resolution address in a domain name database in an associated manner.
Optionally, the detection result includes a connected result and an unconnected result between the domain name resolution address of the preset domain name resolution address list and the domain name of the domain name list, and the step of determining whether there is a target domain name resolution address meeting a preset condition according to the detection result includes:
detecting whether the unconnected result exists in a detection result between a domain name resolution address of the preset domain name resolution address list and a domain name of the domain name list according to the domain name database;
if not, determining that the domain name resolution address of the corresponding preset domain name resolution address list meets the preset condition, and determining that the domain name resolution address corresponding to the preset condition is the target domain name resolution address;
if the preset domain name resolution address exists, determining that the domain name resolution address of the corresponding preset domain name resolution address list does not meet the preset condition, and determining that the domain name resolution address corresponding to the preset condition is not the target domain name resolution address.
Optionally, after the step of obtaining the detection result and storing the domain name corresponding to the preset domain name list and the detection result between the domain name corresponding to the preset domain name list and the domain name resolution address in association with the domain name database, the method further includes:
and sending the domain name resolution address corresponding to the preset domain name resolution address list, the corresponding detection result, the operator of the mobile terminal, the IP address and the geographic position information to the server so as to enable the server to be used as a basis for whether to feed back the corresponding domain name resolution address list.
In addition, to achieve the above object, the present invention further provides a mobile terminal, including: a memory, a processor and a server access program stored on the memory and executable on the processor, the server access program when executed by the processor implementing the steps of the server access method as described above.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a server access program which, when executed by a processor, implements the steps of the server access method as described above.
In the technical scheme of the invention, when the access abnormality of a server corresponding to a mobile terminal is detected, a request for acquiring a domain name list is sent to the server, when the domain name list is not received, a preset domain name list is acquired, a request for acquiring a domain name resolution address list is sent to the server, when the domain name resolution address list is not received, the preset domain name resolution address list is acquired, the connection relation between a domain name corresponding to the preset domain name list and a domain name resolution address corresponding to the preset domain name list is detected according to the preset domain name list and the preset domain name resolution address list, the detection result between the domain name corresponding to the preset domain name list and the domain name resolution address corresponding to the preset domain name list is obtained and stored, whether a target domain name resolution address meeting preset conditions exists or not is judged according to the detection result, if the target domain name resolution address exists, the target domain name resolution address is acquired, and the domain name resolution address corresponding, and connecting with the server successfully. Therefore, the problem that the server cannot be accessed is solved, the success rate of server access is improved, and the user experience is enhanced.
Drawings
Fig. 1 is a schematic structural diagram of a mobile terminal in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a server access method according to the present invention;
fig. 3 is a schematic diagram of an alternative mobile terminal according to an embodiment of the present invention performing Ping operation;
FIG. 4 is a flowchart illustrating a second embodiment of a server access method according to the present invention;
fig. 5 is a flowchart illustrating a server access method according to a third embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The solution of the embodiment of the invention is mainly as follows: by sending a request for obtaining a domain name list to a server when detecting that the server corresponding to the mobile terminal is abnormally accessed, obtaining a preset domain name list when the domain name list is not received, sending the request for obtaining a domain name resolution address list to the server, obtaining a preset domain name resolution address list when the domain name resolution address list is not received, detecting a connection relationship between a domain name corresponding to the preset domain name list and a domain name resolution address corresponding to the preset domain name list according to the preset domain name list and the preset domain name resolution address list, obtaining and storing a detection result between the domain name corresponding to the preset domain name list and the domain name resolution address corresponding to the preset domain name list, judging whether a target domain name resolution address meeting preset conditions exists according to the detection result, if so, obtaining the target domain name resolution address, and modifying the domain name resolution address corresponding to the mobile terminal into the target domain name resolution address, the server is successfully connected, so that the success rate of server access is improved, and the problem that the server cannot be accessed is solved.
The embodiment of the invention provides a mobile terminal.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a mobile terminal in a hardware operating environment according to an embodiment of the present invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
As shown in fig. 1, the mobile terminal may include: a processor 1001, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include an operating system, a network communication module, and a server access program therein.
In the present invention, the mobile terminal calls a server access program stored in the memory 1005 through the processor 1001, and performs the following operations:
when detecting that a server corresponding to a mobile terminal is abnormally accessed, sending a request for acquiring a domain name list to the server;
when the domain name list is not received, acquiring a preset domain name list, and sending a request for acquiring a domain name resolution address list to the server;
when the domain name resolution address list is not received, acquiring a preset domain name resolution address list;
detecting the connection relation between the domain name corresponding to the preset domain name list and the domain name resolution address corresponding to the preset domain name list according to the preset domain name list and the preset domain name resolution address list, and obtaining a detection result;
judging whether a target domain name resolution address meeting preset conditions exists according to the detection result;
and if the target domain name resolution address exists, the target domain name resolution address is obtained, the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and the server is successfully connected.
Further, the processor 1001 may call the server access program stored in the memory 1005, and also perform the following operations:
when detecting that a server corresponding to a mobile terminal is abnormally accessed, acquiring the product model and serial number information of the mobile terminal;
and sending the product model and the serial number information of the mobile terminal to the server as request information for acquiring a domain name list.
Further, the processor 1001 may call the server access program stored in the memory 1005, and also perform the following operations:
when receiving the domain name list, sending a request for acquiring a domain name resolution address list to the server;
when the domain name resolution address list is received, detecting the connection relation between the domain name corresponding to the domain name list and the domain name resolution address corresponding to the domain name resolution address list according to the domain name list and the domain name resolution address list, and obtaining a detection result;
judging whether a target domain name resolution address meeting preset conditions exists according to the detection result;
and if the target domain name resolution address exists, the target domain name resolution address is obtained, the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and the server is successfully connected.
Further, the processor 1001 may call the server access program stored in the memory 1005, and also perform the following operations:
when the domain name list is not received, acquiring a preset domain name list, and detecting whether the mobile terminal is in a networking state;
if the mobile terminal is in a networking state, acquiring a network operator, an Internet Protocol (IP) address and geographical position information of the mobile terminal;
and sending the operator, the IP address and the geographical position information of the mobile terminal to the server as request information for acquiring the domain name resolution address list.
Further, the processor 1001 may call the server access program stored in the memory 1005, and also perform the following operations:
acquiring a domain name corresponding to the preset domain name list, modifying the domain name corresponding to the mobile terminal into the domain name corresponding to the preset domain name list, and executing ping operation for detecting whether the domain name corresponding to the preset domain name list is connected with a domain name resolution address corresponding to the preset domain name list;
and obtaining a detection result, and storing the domain name corresponding to the preset domain name list and the detection result between the domain name corresponding to the preset domain name list and the domain name resolution address in a domain name database in an associated manner.
Further, the processor 1001 may call the server access program stored in the memory 1005, and also perform the following operations:
detecting whether the unconnected result exists in a detection result between a domain name resolution address of the preset domain name resolution address list and a domain name of the domain name list according to the domain name database;
if not, determining that the domain name resolution address of the corresponding preset domain name resolution address list meets the preset condition, and determining that the domain name resolution address corresponding to the preset condition is the target domain name resolution address;
if the preset domain name resolution address exists, determining that the domain name resolution address of the corresponding preset domain name resolution address list does not meet the preset condition, and determining that the domain name resolution address corresponding to the preset condition is not the target domain name resolution address.
Further, the processor 1001 may call the server access program stored in the memory 1005, and also perform the following operations:
and sending the domain name resolution address corresponding to the preset domain name resolution address list, the corresponding detection result, the operator of the mobile terminal, the IP address and the geographic position information to the server so as to enable the server to be used as a basis for whether to feed back the corresponding domain name resolution address list.
In the embodiment, by the above scheme, when detecting that the access of the server corresponding to the mobile terminal is abnormal, sending a request for obtaining a domain name list to the server, when the domain name list is not received, obtaining a preset domain name list, sending a request for obtaining a domain name resolution address list to the server, when the domain name resolution address list is not received, obtaining a preset domain name resolution address list, detecting a connection relationship between a domain name corresponding to the preset domain name list and a domain name resolution address corresponding to the preset domain name list according to the preset domain name list and the preset domain name resolution address list, obtaining and storing a detection result between the domain name corresponding to the preset domain name list and the domain name resolution address corresponding to the preset domain name list, judging whether a target domain name resolution address meeting a preset condition exists according to the detection result, and if so, obtaining the target domain name resolution address, and the domain name resolution address corresponding to the mobile terminal is modified into a target domain name resolution address, and the target domain name resolution address is successfully connected with the server, so that the safety of user data is improved, and the problem of low control stability of the mobile terminal is solved.
Based on the hardware structure, the embodiment of the server access method is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of a server access method according to the present invention.
In a first embodiment, the server access method includes the steps of:
step S10, when detecting that the server corresponding to the mobile terminal is abnormal in access, sending a request for obtaining a domain name list to the server;
in this embodiment, when it is detected that a server corresponding to a mobile terminal is abnormally accessed, a request for acquiring a domain name list is sent to the server corresponding to the mobile terminal.
Further, in an embodiment, when it is detected that a server corresponding to the mobile terminal is abnormally accessed, a request for acquiring a domain name list is sent to the server, and whether a domain name list correspondingly fed back based on the request for acquiring the domain name list exists is detected.
Specifically, in an embodiment, a request for obtaining a domain name list is sent to a server, where sending the request for obtaining the domain name list to the server includes sending instruction information for obtaining the domain name list to the server and detecting whether there is instruction information for a domain name list correspondingly fed back based on the request for obtaining the domain name list.
It should be noted that, in an embodiment, the domain name list in the request for obtaining the domain name list is sent to the server, and is a current latest domain name list when the server receives the request for obtaining the domain name list, where the domain name list includes at least one domain name, for example, the domain name: domain name 1, domain name 2, domain name 3, domain name 4, domain name 5.
Further, in an embodiment, the domain name list is updated, and the updated domain name list is configured in the server background in advance by a server background person according to a corresponding change caused by the increase or decrease of the functions of the mobile terminal. For example, a new function is added in the mobile terminal by a product developer of the mobile terminal, a new domain name a is used in the function, and after a server corresponding to the mobile terminal with the new function is on-line, a server background person adds the domain name a to a latest domain name list in a server background.
Optionally, step S10 includes:
step a, when detecting that a server corresponding to a mobile terminal is abnormally accessed, acquiring the product model and serial number information of the mobile terminal;
and b, sending the product model and the serial number information of the mobile terminal to the server as request information for acquiring the domain name list.
In this embodiment, when it is detected that a server corresponding to the mobile terminal is abnormally accessed, the product model and the serial number information of the mobile terminal are acquired, and the product model and the serial number information of the mobile terminal are sent to the server as request information for acquiring the domain name list.
Specifically, in one embodiment, when a request for acquiring a domain name list triggered by a user based on a mobile terminal is received, the request for acquiring the domain name list triggered by the mobile terminal includes instruction information for acquiring a product model and a serial number of the mobile terminal, and instruction information for sending the product model and the serial number information to a server as request information for acquiring the domain name list.
It should be noted that before receiving a request of a user for acquiring a domain name list triggered by the mobile terminal, the product model and the serial number information of the mobile terminal are preset in the mobile terminal, so that when receiving the request of the user for acquiring the domain name list triggered by the mobile terminal, the product model and the serial number information of the mobile terminal are successfully acquired.
Further, in an embodiment, the product model and the serial number information of the mobile terminal are sent to the server as request information for acquiring the domain name list, so that the server performs matching query in the domain name list pre-stored in the server according to the product model and the serial number information of the mobile terminal and sends the corresponding domain name list, if the matching query is successful, that is, a domain name list corresponding to the product model and the serial number information exists in the pre-stored domain name list, the existence of the domain name list correspondingly fed back by the server based on the product model and the serial number information is detected, and if the matching query is failed, that is, a domain name list corresponding to the product model and the serial number information does not exist in the pre-stored domain name list, the absence of the domain name list correspondingly fed back by the server based on the product model and the.
Further, in an embodiment, when a setting instruction of a preset domain name list is received, the domain name information is acquired, and the domain name information is stored in the preset domain name list.
It should be noted that the setting instruction for presetting the domain name list includes instruction information for acquiring domain name information and instruction information for storing the domain name information in the preset domain name list.
Specifically, in an embodiment, it should be noted that when a setting instruction of a preset domain name list is received, an input interface including a text editing box is displayed, a domain name corresponding to the setting instruction input by a mobile terminal system development engineer based on the input interface and product model and serial number information of a mobile terminal corresponding to the domain name are acquired, and the domain name and the product model and serial number information of the mobile terminal corresponding to the domain name are stored in an associated manner. The function information of the mobile terminal can be obtained according to the product model of the mobile terminal, and the function information of the specific mobile terminal can be obtained according to the serial number of the mobile terminal, so that a development engineer of an embedded system of the mobile terminal can independently configure the specific mobile terminal.
Further, in an embodiment, when function information of a new function of the mobile terminal is acquired, an embedded system development engineer of the mobile terminal may trigger a setting instruction of the preset domain name list.
Further, in an embodiment, the preset domain name list includes at least one domain name, for example, the domain name: domain name 1, domain name 2, domain name 3, domain name 4, domain name 5. For example: the user requests that domain name 1 be in hundred degrees, then the domain name is www.baidu.com.
Further, in an embodiment, when a setting instruction of a preset domain name resolution address list is received, a domain name resolution address is obtained, and the domain name resolution address information is stored in the preset domain name resolution address list.
It should be noted that the setting instruction of the preset domain name resolution address list includes instruction information for acquiring a domain name resolution address and instruction information for storing the domain name resolution address information in the preset domain name resolution address list.
Specifically, in an embodiment, the domain name resolution Address and a network operator and an IP Address (Internet Protocol Address) corresponding to the domain name resolution Address are obtained through a system network interface of the mobile terminal, and the Address location information is obtained through a request IP Address resolution server of the mobile terminal.
It should be noted that, in an embodiment, the preset domain name resolution address list includes at least one domain name resolution address, for example, the preset domain name resolution address list includes: domain name resolution address 1, domain name resolution address 2, domain name resolution address 3, domain name resolution address 4, and domain name resolution address 5. For example, the domain name resolution address: 223.5.5.5, 223.6.6.6, 114.114.114.114, 114.114.115.115, and the like.
Step S20, when the domain name list is not received, acquiring a preset domain name list, and sending a request for acquiring a domain name resolution address list to the server;
in this embodiment, when the domain name list is not received, the preset domain name list is acquired, and a request for acquiring a domain name resolution address list is sent to the server.
Further, in an embodiment, when a domain name list fed back by the server based on the request for obtaining the domain name list is not received, it is determined that the corresponding domain name list does not exist in the server, a preset domain name list obtaining instruction is triggered, and the corresponding preset domain name list is obtained based on the preset domain name list obtaining instruction.
It should be noted that, before the preset domain name list is obtained, the preset domain name list needs to be preset in the server, and is set by the server background operator, and the domain name in the domain name list is preset, and is correspondingly preset by the server background operator according to the product model and the serial number of the mobile terminal.
Further, in an embodiment, the preset domain name list includes at least one domain name, for example, the domain name: domain name 1, domain name 2, domain name 3, domain name 4, domain name 5. For example: the user requests that domain name 1 be in hundred degrees, then the domain name is www.baidu.com.
Further, in an embodiment, when a request for acquiring a domain name system domain name resolution address list triggered by a user based on a mobile terminal is received, the request for acquiring the domain name resolution address list is sent to a server, and whether a domain name resolution address list correspondingly fed back based on the request for acquiring the domain name resolution address list exists is detected.
Step S30, when the domain name resolution address list is not received, acquiring a preset domain name resolution address list;
in this embodiment, if the name does not exist, the preset domain name resolution address list is obtained.
It should be noted that, in an embodiment, a domain name resolution address list in a request for obtaining a domain name resolution address is sent to a server, and a current latest domain name resolution address list in the request for obtaining the domain name resolution address list is received by the server, where the domain name resolution address list includes at least one domain name resolution address, and for example, the domain name resolution address list includes: domain name resolution address 1, domain name resolution address 2, domain name resolution address 3, domain name resolution address 4, and domain name resolution address 5.
Further, in an embodiment, the domain name resolution address list is updated, and the domain name resolution address list is updated and configured in the server background by the server background personnel according to the corresponding change of information such as network operators, IP addresses, geographical locations and the like. For example, a mobile terminal embedded system development engineer adds an operator, an IP address, and a geographic location in a mobile terminal, and then the new operator, the IP address, and the geographic location use a new domain name resolution address B, and then a server corresponding to the mobile terminal including the new domain name resolution address B is on-line, and a server background worker adds the domain name resolution address B in a latest domain name resolution address list in a server background.
Further, in an embodiment, when a domain name resolution address list correspondingly fed back by the server based on a request for obtaining the domain name resolution address list is not detected, it is determined that the corresponding domain name resolution address list does not exist in the server, a preset domain name resolution address list obtaining instruction is triggered, and a corresponding preset domain name resolution address list is obtained based on the preset domain name resolution address list obtaining instruction.
It should be noted that, before the preset domain name resolution address list is obtained, the domain name resolution address list needs to be preset in the server, and is set by the server background operator, and the domain name addresses in the domain name resolution address list are preset by the server background operator obtaining the recommended DNS from the internet.
It should be noted that, in an embodiment, the domain name resolution address list includes at least one domain name resolution address, for example, the preset domain name resolution address list includes: domain name resolution address 1, domain name resolution address 2, domain name resolution address 3, domain name resolution address 4, and domain name resolution address 5. For example, the list of domain name resolution addresses includes: 223.5.5.5, 223.6.6.6, 114.114.114.114, 114.114.115.115, and the like.
Step S40, detecting the connection relation between the domain name corresponding to the preset domain name list and the domain name resolution address corresponding to the preset domain name list according to the preset domain name list and the preset domain name resolution address list, and obtaining a detection result;
in this embodiment, a connection relationship between a domain name corresponding to the preset domain name list and a domain name resolution address corresponding to the preset domain name list is detected according to the preset domain name list and the preset domain name resolution address list, and a detection result between the domain name corresponding to the preset domain name list and the domain name resolution address corresponding to the preset domain name list is obtained and stored.
Optionally, step S40 includes:
step c, acquiring a domain name corresponding to the preset domain name list, modifying the domain name corresponding to the mobile terminal into the domain name corresponding to the preset domain name list, and executing ping operation for detecting whether connection exists between the domain name corresponding to the preset domain name list and a domain name resolution address corresponding to the preset domain name list;
and d, obtaining a detection result, and storing the domain name corresponding to the preset domain name list and the detection result between the domain name corresponding to the preset domain name list and the domain name resolution address in a domain name database in an associated manner.
In this embodiment, a domain name corresponding to a preset domain name list is obtained, a domain name corresponding to a mobile terminal is modified into a domain name corresponding to the preset domain name list, a ping operation for detecting whether a connection is made between the domain name corresponding to the preset domain name list and a domain name resolution address corresponding to the preset domain name list is executed, a detection result is obtained, and the domain name corresponding to the preset domain name list and the detection result between the domain name corresponding to the preset domain name list and the domain name resolution address are stored in a domain name database in an associated manner.
It should be noted that Ping (Packet Internet Groper, Internet Packet explorer) is a program for testing the amount of network connection.
Further, in an embodiment, a ping operation of detecting whether a domain name corresponding to the preset domain name list is connected to a domain name resolution address corresponding to the preset domain name resolution address list is performed based on the preset domain name resolution address list and the preset domain name list, including a ping operation between each domain name resolution address in the preset domain name resolution address list and each domain name in the preset domain name list.
Optionally, in an embodiment, for example, the preset domain name resolution address list includes a domain name resolution address 1, a domain name resolution address 2, and a domain name resolution address 3, where the domain name in the preset domain name list includes a domain name 1, a domain name 2, a domain name 3, a domain name 4, and a domain name 5, the domain name resolution address corresponding to the mobile terminal is modified into the domain name resolution address 1, then Ping operations are respectively performed with the domain name 1, the domain name 2, the domain name 3, the domain name 4, and the domain name 5, and a detection result of each Ping operation of the domain name resolution address 1 is stored; modifying a domain name resolution address corresponding to the mobile terminal into a domain name resolution address 2, then respectively executing Ping operation with a domain name 1, a domain name 2, a domain name 3, a domain name 4 and a domain name 5, and storing a detection result of each Ping operation of the domain name resolution address 2; modifying a domain name resolution address corresponding to the mobile terminal into a domain name resolution address 3, then respectively executing Ping operation with a domain name 1, a domain name 2, a domain name 3, a domain name 4 and a domain name 5, storing a detection result of each Ping operation of the domain name resolution address 3, and storing the domain name resolution address in a preset domain name resolution address list and the detection results of all corresponding Ping operations in a domain name database in an associated manner.
Optionally, in an implementation example, for example, as shown in fig. 3, fig. 3 is a schematic diagram of an optional mobile terminal according to an embodiment of the present invention executing Ping operation. Modifying the domain name resolution address corresponding to the mobile terminal into a domain name resolution address 1, and then respectively executing Ping operations with the domain name 1, the domain name 2, the domain name 3, the domain name 4 and the domain name 5 to obtain a detection result of each Ping operation, wherein the results of all Ping operations corresponding to the domain name resolution address 1 are detection results.
Optionally, after step S40, the method further includes sending a domain name resolution address corresponding to the preset domain name resolution address list, the corresponding detection result, and the operator, the IP address, and the geographic location information of the mobile terminal to the server, so that the server can be used as a basis for whether to feedback the corresponding domain name resolution address list.
In this embodiment, when receiving a domain name resolution address corresponding to a preset domain name resolution address list, a corresponding detection result, and operator, IP address, and geographical location information of the mobile terminal, the domain name resolution address corresponding to the preset domain name resolution address list, a corresponding detection result of Ping operation, and the operator, IP address, and geographical location information are sent to the server, so that the server can be used as a basis for whether to feed back the corresponding domain name resolution address list.
Specifically, in an embodiment, a domain name resolution address in a domain name resolution address list, a detection result of a Ping operation corresponding to the domain name resolution address list, and operator, IP address and geographical location information are preset and sent to a server, so that the server can be used as a basis for whether to feed back the corresponding domain name resolution address list, wherein the detection result of the Ping operation includes a connected result and an unconnected result, and the domain name resolution address and a domain name corresponding to the connected result and the unconnected result are sent to the server, so that when the server sets the domain name resolution address list and the domain name list, the domain name resolution address and a source basis of the domain name are provided, and therefore, the connection accuracy and reliability of the domain name resolution address list and the domain name of the domain name list in the server are improved.
Step S50, judging whether a target domain name resolution address meeting preset conditions exists according to the detection result, if yes, executing step S60;
and step S60, acquiring the target domain name resolution address, modifying the domain name resolution address corresponding to the mobile terminal into the target domain name resolution address, and successfully connecting with the server.
In this embodiment, whether a target domain name resolution address meeting a preset condition exists is determined according to the detection result, and if the target domain name resolution address exists, the target domain name resolution address is obtained, and the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and is successfully connected with the server.
It should be noted that the target domain name resolution address is an effective domain name that can implement the connection between the mobile terminal and the server, and the results of all Ping operations corresponding to the target domain name resolution address are connected results. And if the target domain name resolution address exists, acquiring the target domain name resolution address, modifying the domain name resolution address corresponding to the mobile terminal into the target domain name resolution address, and successfully connecting with the server.
Optionally, step S50 includes:
step e, detecting whether the unconnected result exists in the detection result between the domain name resolution address of the preset domain name resolution address list and the domain name of the domain name list according to the domain name database;
step f, if the domain name resolution address does not exist, determining that the domain name resolution address of the corresponding preset domain name resolution address list meets the preset condition, and determining the domain name resolution address corresponding to the preset condition as the target domain name resolution address;
and g, if the domain name resolution address exists, determining that the domain name resolution address of the corresponding preset domain name resolution address list does not meet the preset condition, and determining that the domain name resolution address corresponding to the preset condition is not the target domain name resolution address.
In this embodiment, according to a domain name database, whether an unconnected result exists in a detection result between a domain name resolution address of a preset domain name resolution address list and a domain name of the domain name list is detected, if not, it is determined that a domain name resolution address of the corresponding preset domain name resolution address list satisfies a preset condition, it is determined that the domain name resolution address corresponding to the preset condition is a target domain name resolution address, if so, it is determined that the domain name resolution address of the corresponding preset domain name resolution address list does not satisfy the preset condition, and it is determined that the domain name resolution address corresponding to the preset condition is not the target domain name resolution address.
Specifically, in an embodiment, a domain name resolution address of a preset domain name resolution address list in a domain name database is obtained, all Ping operation detection results corresponding to the domain name resolution address are queried in the domain name database according to the domain name resolution address, whether an unconnected result exists in all Ping operation detection results corresponding to the domain name resolution address is judged, if the unconnected result exists, the domain name resolution address is determined not to be a target domain name resolution address, and if the unconnected result does not exist, the domain name resolution address is determined to be the target domain name resolution address.
It should be noted that, the number of target domain name resolution addresses in the domain name database may be multiple.
Further, in an embodiment, when receiving an instruction to acquire a target domain name resolution address in the domain name database, if it is detected that more than one target domain name resolution address exists, a selection interface including a target domain name resolution address selection instruction is displayed, and when receiving a selection instruction triggered by a user based on the selection interface, a domain name corresponding to the mobile terminal is modified into a domain name resolution address corresponding to the selection instruction, and the domain name resolution address is successfully connected with the server.
Further, in an embodiment, it should be noted that, in a server corresponding to the mobile terminal, when the server receives a request for obtaining a target domain name resolution address in a domain name database sent by the mobile terminal, if the server detects that there is more than one target domain name resolution address, the server obtains the target domain name resolution address with the largest number of times of use among the plurality of target domain name resolution addresses, and sends the target domain name resolution address with the largest number of times of use to the mobile terminal, so that the mobile terminal can implement a successful connection with the server, where the target domain name resolution address with the largest number of times of use by the server is an optimal domain name resolution address selected for ensuring that the mobile terminal is connected with the server, and reliability of connection between the mobile terminal and the server is improved.
The solution provided in this embodiment is to send a request for obtaining a domain name list to a server when detecting that a server corresponding to a mobile terminal is abnormally accessed, obtain a preset domain name list when the domain name list is not received, send a request for obtaining a domain name resolution address list to the server, obtain a preset domain name resolution address list when the domain name resolution address list is not received, detect a connection relationship between a domain name corresponding to the preset domain name list and a domain name resolution address corresponding to the preset domain name list according to the preset domain name list and the preset domain name resolution address list, obtain and store a detection result between the domain name corresponding to the preset domain name list and the domain name resolution address corresponding to the preset domain name list, determine whether a target domain name resolution address meeting a preset condition exists according to the detection result, if so, obtain the target domain name resolution address, and modify the domain name resolution address corresponding to the mobile terminal into the target domain name resolution address, and connecting with the server successfully. Therefore, the problem that the server cannot be accessed is solved, the success rate of server access is improved, and the user experience is enhanced.
Further, referring to fig. 4, fig. 4 is a flowchart illustrating a second embodiment of the server access method according to the present invention, after step S10, the method further includes:
step S70, when receiving the domain name list, sending a request for obtaining a domain name resolution address list to the server;
step S80, when receiving the domain name resolution address list, detecting the connection relation between the domain name corresponding to the domain name list and the domain name resolution address corresponding to the domain name resolution address list according to the domain name list and the domain name resolution address list, and obtaining the detection result;
step S90, judging whether a target domain name resolution address meeting the preset condition exists according to the detection result, if yes, executing step S100;
and S100, acquiring the target domain name resolution address, modifying the domain name resolution address corresponding to the mobile terminal into the target domain name resolution address, and successfully connecting the target domain name resolution address with the server.
In this embodiment, when a domain name list is received, a request for obtaining a domain name resolution address list is sent to a server, when the domain name resolution address list is received, a connection relationship between a domain name corresponding to the domain name list and a domain name resolution address corresponding to the domain name resolution address list is detected according to the domain name list and the domain name resolution address list, a detection result between the domain name corresponding to the domain name list and the domain name resolution address corresponding to the domain name resolution address list is obtained and stored, whether a target domain name resolution address meeting a preset condition exists is determined according to the detection result, if the target domain name resolution address exists, the target domain name resolution address is obtained, the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and the target domain name resolution address is successfully.
Specifically, in an embodiment, if a domain name list corresponding to feedback exists, the domain name list is obtained, where it needs to be stated that, before obtaining a preset domain name list, the domain name list needs to be preset in a server, and is set by a server background operator, and a domain name in the domain name list is preset by the server background operator according to a product model and a serial number of the mobile terminal.
Further, in one embodiment, the domain name list includes at least one domain name, for example, the domain name list: domain name 1, domain name 2, domain name 3, domain name 4, domain name 5.
Specifically, in an embodiment, when the domain name list is received, a request for obtaining a domain name resolution address list is sent to the server, where sending the request for obtaining the domain name resolution address list to the server includes sending instruction information for obtaining the domain name resolution address list to the server and detecting whether there is instruction information of a domain name resolution address list correspondingly fed back based on the request for obtaining the domain name resolution address list.
Specifically, in an embodiment, if a domain name resolution address list corresponding to the feedback exists, the domain name resolution address list is obtained, where the domain name resolution address list corresponding to the feedback includes at least one domain name resolution address, for example, the domain name resolution address list includes: domain name resolution address 1, domain name resolution address 2, domain name resolution address 3, domain name resolution address 4, and domain name resolution address 5.
Specifically, in an embodiment, a domain name resolution address corresponding to a domain name resolution address list is obtained, a domain name resolution address corresponding to the mobile terminal is modified into a domain name resolution address corresponding to the domain name resolution address list, a ping operation for detecting whether a domain name resolution address corresponding to the domain name resolution address list is connected with a domain name corresponding to the domain name list is performed, a detection result between the domain name corresponding to the domain name list and the domain name resolution address corresponding to the domain name resolution address list is obtained, and the detection result between the domain name resolution address corresponding to the domain name resolution address list and the domain name corresponding to the domain name resolution address list is stored in a domain name database in an associated manner.
Specifically, in an embodiment, for example, the domain name resolution address list includes a domain name resolution address 1, a domain name resolution address 2, and a domain name resolution address 3, where the domain names in the domain name list include a domain name 1, a domain name 2, a domain name 3, a domain name 4, and a domain name 5, the domain name resolution address corresponding to the mobile terminal is modified into the domain name resolution address 1, then Ping operations are respectively performed with the domain name 1, the domain name 2, the domain name 3, the domain name 4, and the domain name 5, and a detection result of each Ping operation of the domain name resolution address 1 is stored; modifying a domain name resolution address corresponding to the mobile terminal into a domain name resolution address 2, then respectively executing Ping operation with a domain name 1, a domain name 2, a domain name 3, a domain name 4 and a domain name 5, and storing a detection result of each Ping operation of the domain name resolution address 2; modifying a domain name resolution address corresponding to the mobile terminal into a domain name resolution address 3, then respectively executing Ping operation with a domain name 1, a domain name 2, a domain name 3, a domain name 4 and a domain name 5, storing a detection result of each Ping operation of the domain name resolution address 3, and storing the domain name resolution address in a domain name resolution address list and the detection results of all corresponding Ping operations in a domain name database in an associated manner.
Further, in an embodiment, according to a domain name database, whether an unconnected result exists in detection results of all Ping operations corresponding to domain name resolution addresses in a domain name resolution address list is detected, if the unconnected result does not exist, it is determined that a domain name corresponding to the unconnected result does not exist as the domain name resolution address, if the unconnected result exists, it is determined that the domain name resolution address does not exist in the domain name database, prompt information is output, and the domain name resolution address is obtained again.
Optionally, in an embodiment, when receiving an instruction to acquire a target domain name resolution address in the domain name database, if it is detected that more than one target domain name resolution address exists, a selection interface including a target domain name resolution address selection instruction is displayed, and when receiving a selection instruction triggered by a user based on the selection interface, a domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address corresponding to the selection instruction, and the target domain name resolution address is successfully connected to the server.
Further, in an embodiment, when receiving an instruction for obtaining a target domain name resolution address in a domain name database, if it is detected that more than one target domain name resolution address exists, obtaining a target domain name resolution address with the largest occurrence frequency in the database from among a plurality of target domain name resolution addresses, modifying a domain name resolution address corresponding to the mobile terminal into the target domain name resolution address with the largest occurrence frequency, and successfully connecting with the server, wherein selecting the target domain name resolution address with the largest occurrence frequency in the database is to ensure that an optimal domain name resolution address is selected, and improve reliability of connection with the server.
Further, in an embodiment, when receiving the domain name resolution address in the domain name resolution address list and the detection results of all the corresponding Ping operations, the domain name resolution address in the domain name resolution address list, the detection results of all the corresponding Ping operations, and the operator, the IP address and the geographic location information of the mobile terminal are sent to the server, so that the server can be used as a basis for whether to feed back the corresponding domain name resolution address list.
Specifically, in an embodiment, a domain name resolution address in a domain name resolution address list, detection results of all corresponding Ping operations, and operator, IP address and geographical location information of the mobile terminal are sent to the server, so that the server can be used as a basis for whether to feed back the corresponding domain name resolution address list, wherein all Ping operation detection results include corresponding detection results and unconnected results, and the domain name resolution address and the domain name corresponding to the detection results and the unconnected results are sent to the server, so that when the server sets the domain name resolution address list and the domain name list, the domain name resolution address and a source basis of the domain name are used, and therefore, the connection accuracy and reliability of the domain name resolution address in the domain name resolution address list and the domain name in the domain name list in the server are improved.
According to the scheme provided by the embodiment, when a domain name list is received, a request for acquiring the domain name resolution address list is sent to a server, when the domain name resolution address list is received, the connection relation between a domain name corresponding to the domain name list and a domain name resolution address corresponding to the domain name resolution address list is detected according to the domain name list and the domain name resolution address list, a detection result between the domain name corresponding to the domain name list and the domain name resolution address corresponding to the domain name resolution address list is obtained and stored, whether a target domain name resolution address meeting preset conditions exists or not is judged according to the detection result, if the target domain name resolution address exists, the target domain name resolution address is acquired, the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and the target domain name resolution. Therefore, the problem that the server cannot be accessed is solved, the success rate of server access is improved, and the user experience is enhanced.
Further, referring to fig. 5, fig. 5 is a flowchart illustrating a third embodiment of the server access method according to the present invention, where the step S20 includes:
step S201, when the domain name list is not received, acquiring a preset domain name list, detecting whether the mobile terminal is in a networking state, if so, executing step S202;
step S202, obtaining a network operator, an Internet Protocol (IP) address and geographical position information of the mobile terminal;
step S203, sending the operator, the IP address, and the geographic location information of the mobile terminal to the server as request information for acquiring the domain name resolution address list.
In this embodiment, when the domain name list is not received, the preset domain name list is acquired, whether the mobile terminal is in a networking state is detected, if the mobile terminal is in the networking state, the network operator, the internet protocol IP address and the geographic position information of the mobile terminal are acquired, and the operator, the IP address and the geographic position information of the mobile terminal are sent to the server as request information for acquiring the domain name resolution address list.
Further, in an implementation manner, when a request of a user based on a domain name list triggered by the mobile terminal is received, whether the mobile terminal is in a networking state is detected, and if the mobile terminal is not in the networking state, a prompt message of whether the user performs the networking operation of the mobile terminal is output to remind the user of whether the user performs the networking operation of the mobile terminal. The prompt information mode for outputting whether the user performs the mobile terminal networking operation comprises a voice prompt mode and a text prompt mode. Specifically, when the mobile terminal is detected not to be in the networking state, a prompt interface containing information that the mobile terminal is not in the networking state is displayed, and when a selection instruction whether to perform networking operation or not triggered based on the prompt interface is received, operation corresponding to the selection instruction is executed. Specifically, when the mobile terminal is not detected to be in the networking state, voice prompt information containing information that the mobile terminal is not in the networking state is output.
Further, in one embodiment, when receiving a request of a user based on a domain name list triggered by a mobile terminal, detecting that the mobile terminal is in a networking state, acquiring network operator, IP address and geographical location information, sending the operator, IP address and geographical location information of the mobile terminal to a server as request information for acquiring the domain name resolution address list, detecting whether a domain name resolution address list correspondingly fed back based on the operator, IP address and geographical location information of the mobile terminal exists, if a corresponding domain name address exists in the server according to the operator, IP address and geographical location information of the mobile terminal, the server triggers an instruction for feeding back the domain name resolution address list corresponding to the operator, IP address and geographical location information of the mobile terminal, and the mobile terminal based on the instruction for feeding back the domain name resolution address list, and detecting that the domain name resolution address list correspondingly fed back based on the operator, the IP address and the geographic position information exists. For example, in an implementation example, the mobile terminal of the user a uses a network connected with the operator, acquires an IP address of the mobile terminal, acquires an address located by the network based on the IP address of the mobile terminal, for example, wuhan city, north and hundredth, sends the operator connection, the IP address of the mobile terminal, and the geographic location information to the corresponding server, and detects whether the domain name resolution address list correspondingly fed back based on the operator, the IP address, and the geographic location information exists.
Further, in an implementation manner, if the mobile terminal is not in the networking state, a prompt message containing information that the mobile terminal is not in the networking state is output to remind the user whether to perform networking operation again.
According to the scheme provided by the embodiment, when the domain name list is not received, the preset domain name list is obtained, whether the mobile terminal is in a networking state is detected, if the mobile terminal is in the networking state, the network operator, the Internet Protocol (IP) address and the geographic position information of the mobile terminal are obtained, and the operator, the IP address and the geographic position information of the mobile terminal are used as request information for obtaining the domain name resolution address list and are sent to the server. Therefore, the acquisition of the domain name resolution address list is realized, and technical support is provided for solving the problem that the server cannot be accessed subsequently.
The present invention also provides a mobile terminal, comprising: a memory, a processor, and a server access program stored on the memory and executable on the processor, the server access program being executed by the processor for:
when detecting that a server corresponding to a mobile terminal is abnormally accessed, sending a request for acquiring a domain name list to the server;
when the domain name list is not received, acquiring a preset domain name list, and sending a request for acquiring a domain name resolution address list to the server;
when the domain name resolution address list is not received, acquiring a preset domain name resolution address list;
detecting the connection relation between the domain name corresponding to the preset domain name list and the domain name resolution address corresponding to the preset domain name list according to the preset domain name list and the preset domain name resolution address list, and obtaining a detection result;
judging whether a target domain name resolution address meeting preset conditions exists according to the detection result;
and if the target domain name resolution address exists, the target domain name resolution address is obtained, the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and the server is successfully connected.
Further, the server access program when executed by the processor further performs the following operations:
when detecting that a server corresponding to a mobile terminal is abnormally accessed, acquiring the product model and serial number information of the mobile terminal;
and sending the product model and the serial number information of the mobile terminal to the server as request information for acquiring a domain name list.
Further, the server access program when executed by the processor further performs the following operations:
when receiving the domain name list, sending a request for acquiring a domain name resolution address list to the server;
when the domain name resolution address list is received, detecting the connection relation between the domain name corresponding to the domain name list and the domain name resolution address corresponding to the domain name resolution address list according to the domain name list and the domain name resolution address list, and obtaining a detection result;
judging whether a target domain name resolution address meeting preset conditions exists according to the detection result;
and if the target domain name resolution address exists, the target domain name resolution address is obtained, the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and the server is successfully connected.
Further, the server access program when executed by the processor further performs the following operations:
when the domain name list is not received, acquiring a preset domain name list, and detecting whether the mobile terminal is in a networking state;
if the mobile terminal is in a networking state, acquiring a network operator, an Internet Protocol (IP) address and geographical position information of the mobile terminal;
and sending the operator, the IP address and the geographical position information of the mobile terminal to the server as request information for acquiring the domain name resolution address list.
Further, the server access program when executed by the processor further performs the following operations:
acquiring a domain name corresponding to the preset domain name list, modifying the domain name corresponding to the mobile terminal into the domain name corresponding to the preset domain name list, and executing ping operation for detecting whether the domain name corresponding to the preset domain name list is connected with a domain name resolution address corresponding to the preset domain name list;
and obtaining a detection result, and storing the domain name corresponding to the preset domain name list and the detection result between the domain name corresponding to the preset domain name list and the domain name resolution address in a domain name database in an associated manner.
Further, the server access program when executed by the processor further performs the following operations:
detecting whether the unconnected result exists in a detection result between a domain name resolution address of the preset domain name resolution address list and a domain name of the domain name list according to the domain name database;
if not, determining that the domain name resolution address of the corresponding preset domain name resolution address list meets the preset condition, and determining that the domain name resolution address corresponding to the preset condition is the target domain name resolution address;
if the preset domain name resolution address exists, determining that the domain name resolution address of the corresponding preset domain name resolution address list does not meet the preset condition, and determining that the domain name resolution address corresponding to the preset condition is not the target domain name resolution address.
Further, the server access program when executed by the processor further performs the following operations:
and sending the domain name resolution address corresponding to the preset domain name resolution address list, the corresponding detection result, the operator of the mobile terminal, the IP address and the geographic position information to the server so as to enable the server to be used as a basis for whether to feed back the corresponding domain name resolution address list.
The specific implementation of the mobile terminal of the present invention is basically the same as the embodiments of the server access method described above, and is not described herein again.
In the embodiment, by the above scheme, when detecting that the access of the server corresponding to the mobile terminal is abnormal, sending a request for obtaining a domain name list to the server, when the domain name list is not received, obtaining a preset domain name list, sending a request for obtaining a domain name resolution address list to the server, when the domain name resolution address list is not received, obtaining a preset domain name resolution address list, detecting a connection relationship between a domain name corresponding to the preset domain name list and a domain name resolution address corresponding to the preset domain name list according to the preset domain name list and the preset domain name resolution address list, obtaining and storing a detection result between the domain name corresponding to the preset domain name list and the domain name resolution address corresponding to the preset domain name list, judging whether a target domain name resolution address meeting a preset condition exists according to the detection result, and if so, obtaining the target domain name resolution address, and the domain name resolution address corresponding to the mobile terminal is modified into a target domain name resolution address, and the server is successfully connected. Therefore, the problem that the server cannot be accessed is solved, the success rate of server access is improved, and the user experience is enhanced.
The present invention also provides a computer-readable storage medium storing a server access program executable by one or more processors for:
when detecting that a server corresponding to a mobile terminal is abnormally accessed, sending a request for acquiring a domain name list to the server;
when the domain name list is not received, acquiring a preset domain name list, and sending a request for acquiring a domain name resolution address list to the server;
when the domain name resolution address list is not received, acquiring a preset domain name resolution address list;
detecting the connection relation between the domain name corresponding to the preset domain name list and the domain name resolution address corresponding to the preset domain name list according to the preset domain name list and the preset domain name resolution address list, and obtaining a detection result;
judging whether a target domain name resolution address meeting preset conditions exists according to the detection result;
and if the target domain name resolution address exists, the target domain name resolution address is obtained, the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and the server is successfully connected.
Further, the server access program when executed by the processor further performs the following operations:
when detecting that a server corresponding to a mobile terminal is abnormally accessed, acquiring the product model and serial number information of the mobile terminal;
and sending the product model and the serial number information of the mobile terminal to the server as request information for acquiring a domain name list.
Further, the server access program when executed by the processor further performs the following operations:
when receiving the domain name list, sending a request for acquiring a domain name resolution address list to the server;
when the domain name resolution address list is received, detecting the connection relation between the domain name corresponding to the domain name list and the domain name resolution address corresponding to the domain name resolution address list according to the domain name list and the domain name resolution address list, and obtaining a detection result;
judging whether a target domain name resolution address meeting preset conditions exists according to the detection result;
and if the target domain name resolution address exists, the target domain name resolution address is obtained, the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and the server is successfully connected.
Further, the server access program when executed by the processor further performs the following operations:
when the domain name list is not received, acquiring a preset domain name list, and detecting whether the mobile terminal is in a networking state;
if the mobile terminal is in a networking state, acquiring a network operator, an Internet Protocol (IP) address and geographical position information of the mobile terminal;
and sending the operator, the IP address and the geographical position information of the mobile terminal to the server as request information for acquiring the domain name resolution address list.
Further, the server access program when executed by the processor further performs the following operations:
acquiring a domain name corresponding to the preset domain name list, modifying the domain name corresponding to the mobile terminal into the domain name corresponding to the preset domain name list, and executing ping operation for detecting whether the domain name corresponding to the preset domain name list is connected with a domain name resolution address corresponding to the preset domain name list;
and obtaining a detection result, and storing the domain name corresponding to the preset domain name list and the detection result between the domain name corresponding to the preset domain name list and the domain name resolution address in a domain name database in an associated manner.
Further, the server access program when executed by the processor further performs the following operations:
detecting whether the unconnected result exists in a detection result between a domain name resolution address of the preset domain name resolution address list and a domain name of the domain name list according to the domain name database;
if not, determining that the domain name resolution address of the corresponding preset domain name resolution address list meets the preset condition, and determining that the domain name resolution address corresponding to the preset condition is the target domain name resolution address;
if the preset domain name resolution address exists, determining that the domain name resolution address of the corresponding preset domain name resolution address list does not meet the preset condition, and determining that the domain name resolution address corresponding to the preset condition is not the target domain name resolution address.
Further, the server access program when executed by the processor further performs the following operations:
and sending the domain name resolution address corresponding to the preset domain name resolution address list, the corresponding detection result, the operator of the mobile terminal, the IP address and the geographic position information to the server so as to enable the server to be used as a basis for whether to feed back the corresponding domain name resolution address list.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the server access method described above, and is not described herein again.
In the embodiment, by the above scheme, when detecting that the access of the server corresponding to the mobile terminal is abnormal, sending a request for obtaining a domain name list to the server, when the domain name list is not received, obtaining a preset domain name list, sending a request for obtaining a domain name resolution address list to the server, when the domain name resolution address list is not received, obtaining a preset domain name resolution address list, detecting a connection relationship between a domain name corresponding to the preset domain name list and a domain name resolution address corresponding to the preset domain name list according to the preset domain name list and the preset domain name resolution address list, obtaining and storing a detection result between the domain name corresponding to the preset domain name list and the domain name resolution address corresponding to the preset domain name list, judging whether a target domain name resolution address meeting a preset condition exists according to the detection result, and if so, obtaining the target domain name resolution address, and the domain name resolution address corresponding to the mobile terminal is modified into a target domain name resolution address, and the server is successfully connected. Therefore, the problem that the server cannot be accessed is solved, the success rate of server access is improved, and the user experience is enhanced.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a mobile terminal (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A server access method, characterized in that the server access method comprises the steps of:
when detecting that a server corresponding to a mobile terminal is abnormally accessed, sending a request for acquiring a domain name list to the server;
when the domain name list is not received, acquiring a preset domain name list, and sending a request for acquiring a domain name resolution address list to the server;
when the domain name resolution address list is not received, acquiring a preset domain name resolution address list;
detecting the connection relation between the domain name corresponding to the preset domain name list and the domain name resolution address corresponding to the preset domain name list according to the preset domain name list and the preset domain name resolution address list, and obtaining a detection result;
judging whether a target domain name resolution address meeting preset conditions exists according to the detection result;
and if the target domain name resolution address exists, the target domain name resolution address is obtained, the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and the server is successfully connected.
2. The server access method according to claim 1, wherein the step of sending a request for obtaining the domain name list to the server when detecting that the server corresponding to the mobile terminal is abnormally accessed comprises:
when detecting that a server corresponding to a mobile terminal is abnormally accessed, acquiring the product model and serial number information of the mobile terminal;
and sending the product model and the serial number information of the mobile terminal to the server as request information for acquiring a domain name list.
3. The server access method according to claim 1, wherein after the step of sending the request for obtaining the domain name list to the server when detecting that the server corresponding to the mobile terminal is abnormally accessed, the method further comprises:
when receiving the domain name list, sending a request for acquiring a domain name resolution address list to the server;
when the domain name resolution address list is received, detecting the connection relation between the domain name corresponding to the domain name list and the domain name resolution address corresponding to the domain name resolution address list according to the domain name list and the domain name resolution address list, and obtaining a detection result;
judging whether a target domain name resolution address meeting preset conditions exists according to the detection result;
and if the target domain name resolution address exists, the target domain name resolution address is obtained, the domain name resolution address corresponding to the mobile terminal is modified into the target domain name resolution address, and the server is successfully connected.
4. The server access method according to claim 1, wherein the step of obtaining a preset domain name list when the domain name list is not received, and sending a request for obtaining a domain name resolution address list to the server comprises:
when the domain name list is not received, acquiring a preset domain name list, and detecting whether the mobile terminal is in a networking state;
if the mobile terminal is in a networking state, acquiring a network operator, an Internet Protocol (IP) address and geographical position information of the mobile terminal;
and sending the operator, the IP address and the geographical position information of the mobile terminal to the server as request information for acquiring the domain name resolution address list.
5. The server access method according to any one of claims 1 to 4, wherein the step of detecting a connection relationship between a domain name corresponding to the preset domain name list and a domain name resolution address corresponding to the preset domain name list according to the preset domain name list and the preset domain name resolution address list, and obtaining a detection result includes:
acquiring a domain name corresponding to the preset domain name list, modifying the domain name corresponding to the mobile terminal into the domain name corresponding to the preset domain name list, and executing ping operation for detecting whether the domain name corresponding to the preset domain name list is connected with a domain name resolution address corresponding to the preset domain name list;
and obtaining a detection result, and storing the domain name corresponding to the preset domain name list and the detection result between the domain name corresponding to the preset domain name list and the domain name resolution address in a domain name database in an associated manner.
6. The server access method according to claim 5, wherein the detection result includes a connected result and a disconnected result between the domain name resolution address of the preset domain name resolution address list and the domain name of the domain name list, and the step of determining whether there is a target domain name resolution address satisfying a preset condition according to the detection result includes:
detecting whether the unconnected result exists in a detection result between a domain name resolution address of the preset domain name resolution address list and a domain name of the domain name list according to the domain name database;
if not, determining that the domain name resolution address of the corresponding preset domain name resolution address list meets the preset condition, and determining that the domain name resolution address corresponding to the preset condition is the target domain name resolution address;
if the preset domain name resolution address exists, determining that the domain name resolution address of the corresponding preset domain name resolution address list does not meet the preset condition, and determining that the domain name resolution address corresponding to the preset condition is not the target domain name resolution address.
7. The method according to claim 5, wherein after the step of obtaining the detection result and associating and storing the domain name corresponding to the preset domain name list and the detection result between the domain name corresponding to the preset domain name list and the domain name resolution address to a domain name database, the method further comprises:
and sending the domain name resolution address corresponding to the preset domain name resolution address list, the corresponding detection result, the operator of the mobile terminal, the IP address and the geographic position information to the server so as to enable the server to be used as a basis for whether to feed back the corresponding domain name resolution address list.
8. A server access apparatus, characterized in that the server access apparatus comprises: memory, a processor and a server access program stored on the memory and executable on the processor, the server access program when executed by the processor implementing the steps of the server access method according to any of claims 1-7.
9. A mobile terminal, characterized in that the mobile terminal comprises: memory, a processor and a server access program stored on the memory and executable on the processor, the server access program when executed by the processor implementing the steps of the server access method according to any of claims 1-7.
10. A computer-readable storage medium, having stored thereon a server access program which, when executed by a processor, implements the server access method steps of any of claims 1 to 7.
CN201910042580.3A 2019-01-16 2019-01-16 Server access method, device, mobile terminal and computer readable storage medium Active CN109768980B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910042580.3A CN109768980B (en) 2019-01-16 2019-01-16 Server access method, device, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910042580.3A CN109768980B (en) 2019-01-16 2019-01-16 Server access method, device, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109768980A CN109768980A (en) 2019-05-17
CN109768980B true CN109768980B (en) 2020-12-29

Family

ID=66452275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910042580.3A Active CN109768980B (en) 2019-01-16 2019-01-16 Server access method, device, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109768980B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110753113A (en) * 2019-10-21 2020-02-04 深圳市酷开网络科技有限公司 Network interface request method, device and storage medium
CN112689013A (en) * 2020-12-24 2021-04-20 中国农业银行股份有限公司 System, method and device for service discovery
CN114338382B (en) * 2021-12-30 2023-11-14 北京天融信网络安全技术有限公司 Domain name based equipment online method and device, computer equipment and storage medium
CN114401140B (en) * 2022-01-13 2022-11-11 腾讯科技(深圳)有限公司 Access processing method, related device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106888280A (en) * 2017-03-29 2017-06-23 北京奇虎科技有限公司 DNS update methods, apparatus and system
CN108574744A (en) * 2017-07-28 2018-09-25 北京金山云网络技术有限公司 A kind of domain name analytic method, device, electronic equipment and readable storage medium storing program for executing
CN108718347A (en) * 2018-05-18 2018-10-30 腾讯科技(深圳)有限公司 A kind of domain name analytic method, system, device and storage medium
CN109040343A (en) * 2018-09-11 2018-12-18 达闼科技(北京)有限公司 Domain name analytic method, device, computer readable storage medium and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108307296B (en) * 2016-10-06 2020-11-03 瑞莱恩斯吉奥信息通讯有限公司 System and method for providing differentiated services to user equipment in international locations

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106888280A (en) * 2017-03-29 2017-06-23 北京奇虎科技有限公司 DNS update methods, apparatus and system
CN108574744A (en) * 2017-07-28 2018-09-25 北京金山云网络技术有限公司 A kind of domain name analytic method, device, electronic equipment and readable storage medium storing program for executing
CN108718347A (en) * 2018-05-18 2018-10-30 腾讯科技(深圳)有限公司 A kind of domain name analytic method, system, device and storage medium
CN109040343A (en) * 2018-09-11 2018-12-18 达闼科技(北京)有限公司 Domain name analytic method, device, computer readable storage medium and electronic equipment

Also Published As

Publication number Publication date
CN109768980A (en) 2019-05-17

Similar Documents

Publication Publication Date Title
CN109768980B (en) Server access method, device, mobile terminal and computer readable storage medium
CN107948135B (en) Data processing method and device supporting multiple API protocols
US9560506B2 (en) Emergency contacts information system
US10250714B2 (en) Page redirection method, routing device, terminal device and system
CN108039969B (en) Network automatic configuration method, device, system, storage medium and target computer
CN104580085B (en) service data updating method, system, client and server
CN108200132B (en) Resource acquisition method, device, equipment and computer readable storage medium
CN111399756A (en) Data storage method, data downloading method and device
CN110519409B (en) Domain name dynamic configuration method, device, equipment and storage medium
CN111147616B (en) Resource acquisition method and device, electronic equipment and storage medium
US10051552B2 (en) Method for realizing resource attribute notification, and common service entity
CN111147314A (en) Switch upgrading method, device and storage medium
CN107453922B (en) Basic service configuration method, client and server
CN110519810B (en) Service relay switching method, terminal equipment, storage medium and device
CN110413292B (en) Light application installation method of application program, mobile terminal and storage medium
CN108804711B (en) Data processing method and device and computer readable storage medium
CN105530323A (en) File upgrading method, related equipment and system
CN113688183A (en) Multi-type data source extraction method, system, terminal equipment and storage medium
CN109951549B (en) Network page access method and device and computer readable storage medium
CN111061637B (en) Interface testing method, interface testing device and storage medium
CN109600738B (en) User information updating method, device, equipment and storage medium
CN109495319B (en) Method, device and equipment for determining fault information of CDN node
CN110929133A (en) Operation and maintenance information query system and method
CN111464523A (en) Network monitoring method, terminal device and computer readable storage medium
CN107682271B (en) Method and device for generating routing line

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant