CN112153168B - Network access method, device, computer equipment and storage medium - Google Patents

Network access method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN112153168B
CN112153168B CN202010817190.1A CN202010817190A CN112153168B CN 112153168 B CN112153168 B CN 112153168B CN 202010817190 A CN202010817190 A CN 202010817190A CN 112153168 B CN112153168 B CN 112153168B
Authority
CN
China
Prior art keywords
domain name
name server
network
server address
address
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
CN202010817190.1A
Other languages
Chinese (zh)
Other versions
CN112153168A (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.)
Fibocom Wireless Inc
Original Assignee
Fibocom Wireless Inc
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 Fibocom Wireless Inc filed Critical Fibocom Wireless Inc
Priority to CN202010817190.1A priority Critical patent/CN112153168B/en
Publication of CN112153168A publication Critical patent/CN112153168A/en
Application granted granted Critical
Publication of CN112153168B publication Critical patent/CN112153168B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a network access method, a network access device, computer equipment and a storage medium. The method is applied to computer equipment; the method comprises the following steps: registering the 5G network; sending a domain name server address request to an operator corresponding to the 5G network; when the domain name server address distributed by the operator is not received, detecting whether a preset domain name server address exists or not; and when the preset domain name server address exists, performing domain name resolution by using the preset domain name server address so as to access a network. The method can improve the applicability of network access.

Description

Network access method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a network access method, apparatus, computer device, and storage medium.
Background
The emergence and development of the 5G technology (the fifth generation mobile communication technology) greatly improve the data transmission speed, bring more convenience and more possibility for people's work and life, and more devices start to access the 5G network. When accessing a network, a device needs to acquire a Domain Name Server (DNS) address, and performs Domain Name resolution by logging in the DNS address, so as to convert a Domain Name into an IP address, and then can access the network through the IP address.
For 5G networks, some operators do not allocate DNS addresses to devices, and some methods currently use public network DNS addresses hard-coded in advance in devices to perform domain name resolution, however, the public network DNS addresses may cause problems such as slow network speed or unstable network in some cases, and it is difficult to satisfy network access in various cases.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a network access method, apparatus, computer device, and storage medium capable of improving applicability.
A network access method, the method being applied to a computer device; the method comprises the following steps:
registering the 5G network;
sending a domain name server address request to an operator corresponding to the 5G network;
when the domain name server address distributed by the operator is not received, detecting whether a preset domain name server address exists or not;
and when the preset domain name server address exists, performing domain name resolution by using the preset domain name server address so as to access a network.
In one embodiment, after the detecting whether the preset domain name server address exists, the method further includes:
and when the preset domain name server address does not exist, performing domain name resolution by using the public network domain name server address so as to access the network.
In one embodiment, after the sending the domain name server address request to the operator corresponding to the 5G network, the method further includes:
and when receiving the domain name server address distributed by the operator, performing domain name resolution by using the domain name server address distributed by the operator so as to access the network.
In one embodiment, the step of presetting the domain name server address comprises:
in the equipment development stage, displaying candidate domain name server addresses;
receiving a selection instruction of a developer for the candidate domain name server address;
and determining the address of the selected domain name server as the preset domain name server address according to the selection instruction.
In one embodiment, before the detecting whether the preset domain name server address exists, the method further comprises:
when the domain name server address distributed by the operator is not received, detecting the attribution type of the registered 5G network;
when detecting that the attribution type of the registered 5G network is overseas, informing the equipment user to set the address of the domain name server;
receiving the overseas domain name server address set by the device user in response to the notification;
and performing domain name resolution by using the overseas domain name server address to access a network.
A network access device, the device comprising:
the registered network module is used for registering the 5G network;
a request sending module, configured to send a domain name server address request to an operator corresponding to the 5G network;
the preset address acquisition module is used for detecting whether a preset domain name server address exists or not when the domain name server address distributed by the operator is not received;
and the network access module is used for performing domain name resolution by using the preset domain name server address when the preset domain name server address exists so as to access the network.
In one embodiment, the network access module is further configured to perform domain name resolution using a public network domain name server address to access the network when the preset domain name server address does not exist.
In one embodiment, the network access module is further configured to perform domain name resolution using the domain name server address allocated by the operator to access the network when the domain name server address allocated by the operator is received.
A computer device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of the network access method of embodiments of the present application.
A computer readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to perform the steps of the network access method according to embodiments of the present application.
The network access method, the device, the computer equipment and the storage medium register the 5G network, send a domain name server address request to an operator corresponding to the 5G network, detect whether the preset domain name server address exists when the domain name server address allocated by the operator is not received, and use the preset domain name server address to carry out domain name resolution to access the network when the preset domain name server address exists.
Drawings
FIG. 1 is a diagram of an application environment of a network access method in one embodiment;
FIG. 2 is a flow diagram illustrating a method for network access in one embodiment;
FIG. 3 is a schematic diagram illustrating an overall flow of a network access method in one embodiment;
FIG. 4 is a block diagram of the architecture of the network access device in one embodiment;
fig. 5 is a block diagram showing the construction of a network access device in another embodiment;
FIG. 6 is a diagram of the internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The network access method provided by the application can be applied to the application environment shown in fig. 1. The computer device 102 sends a request for a domain name server address to the service device 104 of the operator, and when the domain name server address allocated by the service device 104 of the operator is not received, the computer device 102 detects whether a preset domain name server address exists through the connected DNS acquisition unit 106, and when the preset domain name server address exists, performs domain name resolution using the preset domain name server address to access the network. The computer device 102 may be a terminal or a server, and the terminal may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The DNS acquisition unit 106 is a hardware module for acquiring DNS. The DNS acquiring unit 106 may be connected to the computer device 102 through a USB (Universal Serial Bus) or the like, and cooperate with the computer device 102 to implement network access.
In one embodiment, as shown in fig. 2, a network access method is provided, which is described by taking the method as an example applied to the computer device in fig. 1, and includes the following steps:
s202, registering the 5G network.
The 5G network is a fifth generation mobile communication network. Registering the 5G network means that the computer device accesses the 5G network.
In one embodiment, after completing any one of the operations of inserting a SIM card (subscriber identity card, IC card held by a mobile subscriber of the GSM system) into the computer device, changing the computer device from the power-off state to the power-on state, and turning off the airplane mode of the computer device, the computer device registers with the 5G network.
And S204, sending a domain name server address request to an operator corresponding to the 5G network.
The operator refers to network operators such as a gateway, a mobile station, and a telecommunication. A Domain Name Server address, i.e., a DNS (Domain Name Server) address. The domain name server is used for converting the domain name transmitted by the computer equipment into an IP address and feeding back the IP address. The domain name server address is an address for determining a domain name server. A domain name server address request for assigning a domain name server address to the operator request.
In one embodiment, the computer device may perform network dialing through the connected DNS acquiring unit, and after the dialing is successful, the computer device may initiate a DHCP process to establish a bearer connection with an operator network, and send a domain name server address request to a service device of the operator.
In one embodiment, after receiving a domain name server address request sent by a computer device, a service device of an operator may assign a domain name server address and an IP address of the computer device to the computer device, and the computer device may perform domain name resolution using the domain name server address assigned by the operator to access a network. In one embodiment, after receiving the domain name server address request sent by the computer device, the service device of the operator may not allocate the domain name server address, and in the case of no allocation, the computer device may perform step S206 and subsequent steps.
And S206, when the domain name server address distributed by the operator is not received, detecting whether a preset domain name server address exists or not.
In one embodiment, when the domain name server address assigned by the operator is not received, the computer device may detect whether there is a preset domain name server address through the connected DNS acquisition unit.
It is understood that during the device development phase, a developer may preset the domain name server address. In this way, when the operator does not assign a DNS address, i.e., the computer device does not receive the DNS address assigned by the operator, the computer device can perform domain name resolution using a preset domain name server address to access the network.
In one embodiment, in the device development phase, the computer device may recommend a candidate domain name server address to the developer, the developer selects from the candidate domain name server address, and the computer device may use the domain name server address selected by the developer as the preset domain name server address. In another embodiment, the computer device may receive a domain name server address entered by a developer during a device development phase and use the domain name server address entered by the developer as a preset domain name server address.
It is to be understood that the developer may or may not preset the domain name server address. In one embodiment, the computer device may use a default domain name server address (e.g., hard-coded public network DNS address 114.114.114.114 inside the connected DNS acquisition unit) when detecting that there is no preset domain name server address. In another embodiment, the computer device may notify the device user to set the domain name server address when it is detected that there is no preset domain name server address, thereby using the domain name server address set by the device user.
And S208, when the preset domain name server address exists, performing domain name resolution by using the preset domain name server address so as to access the network.
In one embodiment, when detecting that the preset domain name server address exists, the computer device may send the domain name of the website to be accessed to the domain name server corresponding to the preset domain name server address when accessing the network. The domain name server can convert the domain name into the IP address according to the corresponding relation between the stored domain name and the IP address, and feed back the IP address. The computer device can access the network according to the IP address fed back by the domain name server.
For example: after a user A inserts a telecom SIM card into a terminal, the terminal registers a 5G network and sends a domain name server address acquisition request to service equipment of a telecom operator corresponding to the registered 5G network. When the service device of the telecommunications carrier assigns a DNS address and an IP address to the terminal of the user a, the terminal of the user a can perform domain name resolution using the assigned DNS address to access the network. When the service device of the telecom operator does not allocate a DNS address and an IP address to the terminal of the user a, the terminal of the user a may detect whether a preset DNS address exists, and when the preset DNS address exists, the terminal may perform domain name resolution using the preset DNS address to access the network.
In the network access method, the 5G network is registered, a domain name server address request is sent to an operator corresponding to the 5G network, when the domain name server address distributed by the operator is not received, whether the preset domain name server address exists or not is detected, when the preset domain name server address exists, domain name resolution is carried out by using the preset domain name server address so as to access the network, therefore, under the condition that the operator does not distribute the DNS address to the computer equipment, the computer equipment can carry out domain name resolution by using the preset DNS address so as to access the network, the preset DNS address can be preset according to requirements, the method is more flexible than a method for directly using a hard coded public network DNS address, and the applicability is improved. For example, overseas DNS addresses may be preset overseas, so that the operator can use the preset overseas DNS addresses to access the network without assigning DNS addresses to the computer devices, thereby avoiding problems such as slow network speed and even violation risk caused by using domestic DNS addresses overseas.
In one embodiment, after the step of detecting whether a preset domain name server address exists, the method further comprises: and when the preset domain name server address does not exist, performing domain name resolution by using the public network domain name server address so as to access the network.
In one embodiment, the public network DNS address may be 114.114.114.114.
In an embodiment, when the domain name server address assigned by the operator is not received and it is detected that there is no preset domain name server address, the computer device may send the domain name of the website to be accessed to the domain name server corresponding to the public network DNS address by using the public network DNS address hard-coded inside the connected DNS acquisition unit. The domain name server can convert the domain name into the IP address according to the corresponding relation between the stored domain name and the IP address, and feed back the IP address. The computer device can access the network according to the IP address fed back by the domain name server.
In this embodiment, when the device developer does not preset the domain name server address, the computer device may perform domain name resolution through the public network domain name server address to access the network, thereby ensuring that the network can still be normally accessed under the condition that the operator does not allocate the domain name server address.
In one embodiment, after the step of sending the domain name server address request to the operator corresponding to the 5G network, the method further comprises: and when receiving the domain name server address distributed by the operator, performing domain name resolution by using the domain name server address distributed by the operator so as to access the network.
In one embodiment, after sending the domain name server address request to the operator corresponding to the 5G network, when receiving the domain name server address assigned by the operator, the computer device may then directly use the domain name server address assigned by the operator, that is, send the domain name of the website to be accessed to the domain name server corresponding to the DNS address assigned by the operator. The domain name server can convert the domain name into the IP address according to the corresponding relation between the stored domain name and the IP address, and feed back the IP address. The computer device can access the network according to the IP address fed back by the domain name server.
In one embodiment, the control panel of the 5G NSA network is in the LTE core network, and the service device of the operator assigns the primary and secondary DNS addresses to the computer device in the activation message PCO cell of the default bearer through the network. After the 5G SA network registration process is completed, the computer equipment can establish bearing connection with an operator network through a PDU session initialization process, and service equipment of the operator distributes a main DNS address and an auxiliary DNS address to the computer equipment in a PDU session accept message through the network.
In this embodiment, in the case that the domain name server address is assigned by the operator, the computer device may perform domain name resolution using the domain name server address assigned by the operator, so as to access the network quickly.
In one embodiment, the step of presetting the domain name server address specifically includes the following steps: in the equipment development stage, displaying candidate domain name server addresses; receiving a selection instruction of a developer aiming at a candidate domain name server address; and determining the address of the selected domain name server as a preset domain name server address according to the selection instruction.
Specifically, in a development stage of the computer device, the computer device may display the candidate domain name server addresses according to the candidate domain name server addresses set in the connected DNS acquisition unit to recommend to a developer, the developer may select from the candidate domain name server addresses, and the computer device may generate a selection instruction in response to a selection operation of the developer, determine the selected domain name server address according to the selection instruction, and use the selected domain name server address as a preset domain name server address.
In one embodiment, in the development stage of the computer device, the computer device can automatically determine and display candidate domain name server addresses according to domain name server addresses set by past developers so as to recommend the candidate domain name server addresses to the developers. In one embodiment, in the development stage of the computer device, the computer device may also present the domain name server addresses of the candidates written in the connected DNS acquisition unit in advance for recommendation to the developer.
In the embodiment, the candidate domain name server addresses can be recommended in the development stage, so that developers can conveniently select the addresses, the development efficiency is improved, and the accuracy of setting the domain name server addresses is improved.
In one embodiment, prior to the step of detecting whether a preset domain name server address exists, the method further comprises: when the domain name server address distributed by the operator is not received, detecting the attribution type of the registered 5G network; when detecting that the attribution type of the registered 5G network is overseas, informing the equipment user to set the address of the domain name server; receiving the overseas domain name server address set by the device user in response to the notification; domain name resolution is performed using overseas domain name server addresses to access the network.
The home type indicates whether the registered 5G network belongs to a home country or a non-home country, or belongs to a local area or a non-local area. Overseas refers to a country or region other than the home country. It is understood that the type of the home location may be divided according to other factors besides the country or the region, and is not limited.
In one embodiment, when the operator assigned domain name server address is not received, the computer device may first detect the home type of the registered 5G network. When detecting that the home type of the registered 5G network is the home country, the computer device may perform detecting whether a preset domain name server address exists and subsequent steps, use the preset domain name server address when the preset domain name server address exists, and use the public network domain name server address when the preset domain name server address does not exist. When detecting that the home type of the registered 5G network is overseas, the computer device may notify the device user to set a domain name server address, and then the receiving device user sends the domain name of the website to be accessed to the domain name server corresponding to the set overseas DNS address in response to notifying the set overseas domain name server address. The domain name server can convert the domain name into the IP address according to the corresponding relation between the stored domain name and the IP address, and feed back the IP address. The computer device can access the network according to the IP address fed back by the domain name server.
In one embodiment, the computer device may present a prompt message to prompt the device user to set the address of the domain name server overseas. In one embodiment, the computer device may directly present a window or page for setting the domain name server address to enable the device user to set the domain name server address overseas.
In one embodiment, when it is detected that the type of the home location of the registered 5G network is oversea, the computer device may automatically determine a candidate overseas DNS address corresponding to the home location according to the home location of the registered 5G network, recommend the candidate overseas DNS address to the device user, determine the selected overseas DNS address according to a selection instruction of the device user for the candidate overseas DNS address, and perform domain name resolution using the selected overseas DNS address to access the network.
In this embodiment, when it is detected that the home type of the registered 5G network is overseas, the device user may set the address of the overseas domain name server by himself, so that the computer device may perform domain name resolution using the address of the overseas domain name server to access the network, thereby avoiding the problem that the computer device may have a risk of slow network speed or even violation if using the home public network DNS address when the device user uses the computer device overseas, and thus ensuring that the computer device can normally access the network overseas.
Fig. 3 is a schematic overall flow chart of the network access method in one embodiment. First, the computer device may register with the 5G network and then send a DNS address request to the operator to which the 5G network corresponds. When an operator-assigned DNS address is received, then the computer device can perform domain name resolution using the operator-assigned DNS address to access the network. When the operator-assigned DNS address is not received, the computer device may detect whether a preset DNS address exists. When a preset DNS address exists, the computer device may use the preset DNS address for domain name resolution to access the network. When no preset DNS address exists, the computer device may use the public network DNS address for domain name resolution to access the network.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
In one embodiment, as shown in fig. 4, there is provided a network access device 400 comprising: a registered network module 402, a request sending module 404, a preset address obtaining module 406 and a network access module 408, wherein:
a register network module 402 for registering the 5G network.
A request sending module 404, configured to send a domain name server address request to an operator corresponding to the 5G network.
A preset address obtaining module 406, configured to detect whether a preset domain name server address exists when a domain name server address allocated by an operator is not received.
The network access module 408 is configured to perform domain name resolution using a preset domain name server address when the preset domain name server address exists, so as to access a network.
In one embodiment, the network access module 408 is further configured to use the public domain name server address for domain name resolution to access the network when no preset domain name server address exists.
In one embodiment, the network access module 408 is further configured to perform domain name resolution using the operator assigned domain name server address to access the network when the operator assigned domain name server address is received.
In one embodiment, as shown in fig. 5, the network access device 400 further includes:
the address setting module 410 is used for displaying candidate domain name server addresses in the equipment development stage; receiving a selection instruction of a developer aiming at a candidate domain name server address; and determining the address of the selected domain name server as a preset domain name server address according to the selection instruction.
In one embodiment, the address setting module 410 is further configured to detect a home type of the registered 5G network when a domain name server address assigned by an operator is not received; when detecting that the attribution type of the registered 5G network is overseas, informing the equipment user to set the address of the domain name server; receiving the overseas domain name server address set by the device user in response to the notification; domain name resolution is performed using overseas domain name server addresses to access the network.
In the network access device, the 5G network is registered, a domain name server address request is sent to an operator corresponding to the 5G network, when the domain name server address allocated by the operator is not received, whether the preset domain name server address exists is detected, and when the preset domain name server address exists, the preset domain name server address is used for domain name resolution to access the network. For example, overseas DNS addresses may be preset overseas, so that the operator can use the preset overseas DNS addresses to access the network without assigning DNS addresses to the computer devices, thereby avoiding problems such as slow network speed and even violation risk caused by using domestic DNS addresses overseas.
For specific limitations of the network access device, reference may be made to the above limitations of the network access method, which is not described herein again. The modules in the network access device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a network access method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: registering the 5G network; sending a domain name server address request to an operator corresponding to the 5G network; when the domain name server address distributed by an operator is not received, detecting whether a preset domain name server address exists or not; when the preset domain name server address exists, the preset domain name server address is used for domain name resolution to access the network.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and when the preset domain name server address does not exist, performing domain name resolution by using the public network domain name server address so as to access the network.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and when receiving the domain name server address distributed by the operator, performing domain name resolution by using the domain name server address distributed by the operator so as to access the network.
In one embodiment, the processor, when executing the computer program, further performs the steps of: in the equipment development stage, displaying candidate domain name server addresses; receiving a selection instruction of a developer aiming at a candidate domain name server address; and determining the address of the selected domain name server as a preset domain name server address according to the selection instruction.
In one embodiment, when an operator-assigned domain name server address is not received, detecting a home type of the registered 5G network; when detecting that the attribution type of the registered 5G network is overseas, informing the equipment user to set the address of the domain name server; receiving the overseas domain name server address set by the device user in response to the notification; domain name resolution is performed using overseas domain name server addresses to access the network.
In the network access computer equipment, the 5G network is registered, a domain name server address request is sent to an operator corresponding to the 5G network, when the domain name server address distributed by the operator is not received, whether the preset domain name server address exists or not is detected, when the preset domain name server address exists, domain name resolution is carried out by using the preset domain name server address so as to access the network, therefore, under the condition that the operator does not distribute the DNS address to the computer equipment, the computer equipment can carry out domain name resolution by using the preset DNS address so as to access the network, the preset DNS address can be preset according to requirements, the network access computer equipment is more flexible than a public network DNS address directly using hard coding, and the applicability is improved. For example, overseas DNS addresses may be preset overseas, so that the operator can use the preset overseas DNS addresses to access the network without assigning DNS addresses to the computer devices, thereby avoiding problems such as slow network speed and even violation risk caused by using domestic DNS addresses overseas.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A network access method, wherein the method is applied to a computer device; the method comprises the following steps:
registering the 5G network;
sending a domain name server address request to an operator corresponding to the 5G network;
when the domain name server address distributed by the operator is not received, detecting the attribution type of the registered 5G network;
if the attribution type is detected to be the home country, detecting whether a preset domain name server address exists or not, and when the preset domain name server address exists, performing domain name resolution by using the preset domain name server address to access a network; the preset domain name server address is selected by a developer from candidate domain name server addresses, and the candidate domain name server addresses are recommended according to domain name server addresses set by the developer;
and if the attribution type is detected to be overseas, informing the equipment user of setting an overseas domain name server address, and performing domain name resolution on the basis of the overseas domain name server address set by the equipment user in response to the notification so as to access the network.
2. The method of claim 1, wherein after said detecting whether a preset domain name server address exists, the method further comprises:
and when the preset domain name server address does not exist, performing domain name resolution by using the public network domain name server address so as to access the network.
3. The method according to claim 1, wherein after sending the domain name server address request to the operator corresponding to the 5G network, the method further comprises:
and when receiving the domain name server address distributed by the operator, performing domain name resolution by using the domain name server address distributed by the operator so as to access the network.
4. The method of claim 1, wherein the step of presetting the domain name server address comprises:
in the equipment development stage, displaying candidate domain name server addresses;
receiving a selection instruction of a developer for the candidate domain name server address;
and determining the address of the selected domain name server as the preset domain name server address according to the selection instruction.
5. The method of claim 1, wherein after the registering with the 5G network, the method further comprises:
establishing a bearer connection with an operator network;
the sending a domain name server address request to an operator corresponding to the 5G network includes:
and sending a domain name server address request to service equipment of an operator corresponding to the 5G network through the bearer connection.
6. A network access apparatus, the apparatus comprising:
the registered network module is used for registering the 5G network;
a request sending module, configured to send a domain name server address request to an operator corresponding to the 5G network;
the address setting module is used for detecting the attribution type of the registered 5G network when the domain name server address distributed by the operator is not received;
the preset address acquisition module is used for detecting whether a preset domain name server address exists or not if the attribution type is detected to be the home country;
the network access module is used for performing domain name resolution by using the preset domain name server address when the preset domain name server address exists so as to access a network; the preset domain name server address is selected by a developer from candidate domain name server addresses, and the candidate domain name server addresses are recommended according to domain name server addresses set by the developer;
the address setting module is further configured to notify the device user to set an address of the overseas domain name server if it is detected that the home location type is overseas, and perform domain name resolution based on the address of the overseas domain name server set by the device user in response to the notification, so as to access a network.
7. The apparatus of claim 6, wherein the network access module is further configured to perform domain name resolution using a public network domain name server address to access the network when the preset domain name server address does not exist.
8. The apparatus of claim 6, wherein the network access module is further configured to perform domain name resolution using the operator-assigned domain name server address to access the network when the operator-assigned domain name server address is received.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202010817190.1A 2020-08-14 2020-08-14 Network access method, device, computer equipment and storage medium Active CN112153168B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010817190.1A CN112153168B (en) 2020-08-14 2020-08-14 Network access method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010817190.1A CN112153168B (en) 2020-08-14 2020-08-14 Network access method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112153168A CN112153168A (en) 2020-12-29
CN112153168B true CN112153168B (en) 2023-03-10

Family

ID=73888867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010817190.1A Active CN112153168B (en) 2020-08-14 2020-08-14 Network access method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112153168B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347284B (en) * 2021-06-09 2023-08-15 上海移远通信技术股份有限公司 Resource access method, resource access device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103167055A (en) * 2011-12-14 2013-06-19 三星电子株式会社 Domain name server address configuration method and apparatus
CN103327135A (en) * 2013-06-27 2013-09-25 贝壳网际(北京)安全技术有限公司 Domain name resolution method, device and client
CN106603748A (en) * 2016-12-30 2017-04-26 深圳市万普拉斯科技有限公司 Terminal networking method and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006180095A (en) * 2004-12-21 2006-07-06 Matsushita Electric Ind Co Ltd Gateway, and access control method of web server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103167055A (en) * 2011-12-14 2013-06-19 三星电子株式会社 Domain name server address configuration method and apparatus
CN103327135A (en) * 2013-06-27 2013-09-25 贝壳网际(北京)安全技术有限公司 Domain name resolution method, device and client
CN106603748A (en) * 2016-12-30 2017-04-26 深圳市万普拉斯科技有限公司 Terminal networking method and terminal

Also Published As

Publication number Publication date
CN112153168A (en) 2020-12-29

Similar Documents

Publication Publication Date Title
US10462647B2 (en) Communication control method and apparatus, terminal, and network platform
US10104700B2 (en) Message processing method, MME selection method, and apparatuses
US20150237496A1 (en) Subscription Transfer Method, Apparatus, and System
CN105338515B (en) Data service transmission method and mobile communication equipment
CN107197462B (en) Wireless network type detection method and device and electronic equipment
CN104756080A (en) Augmenting capabilities of a host device
KR20110103398A (en) Method and apparatus for obtaining location information using smart card
CN108959384B (en) Webpage data acquisition method and device, computer equipment and storage medium
CN112423281B (en) Wireless module upgrading method, device, computer equipment and storage medium
US11895611B2 (en) Sim card registration method and apparatus, computer device, and storage medium
CN114257440B (en) Network function service discovery method, system and storage medium
CN112153168B (en) Network access method, device, computer equipment and storage medium
CN111049822B (en) Short message verification code sending method and device, short message server and storage medium
CN109451518B (en) Method and equipment for distinguishing WLAN access mode of terminal
CN114585002A (en) Communication processing method, communication processing device, terminal equipment and computer readable storage medium
CN112770380A (en) Specific absorption rate parameter adjusting method, specific absorption rate parameter adjusting device, computer equipment and storage medium
US20200162419A1 (en) Address assignment method and related device
CN102891900B (en) A kind of method, apparatus and system of the domain name mapping in flow unloading
CN111400684A (en) Electronic certificate information acquisition method, system, device, equipment and storage medium
CN113114623B (en) Data connection method, device, terminal equipment and computer readable storage medium
CN111510910A (en) Communication module frequency band setting method and device, computer equipment and storage medium
CN112188591B (en) Network access method, device, computer equipment and storage medium
CN112087297B (en) Method, system and equipment for obtaining security context
CN113873450A (en) Short message configuration method and device, computer equipment and storage medium
CN112543514A (en) Method and device for link recovery processing under narrowband Internet of things

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