CN113347284B - Resource access method, resource access device, electronic equipment and storage medium - Google Patents

Resource access method, resource access device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113347284B
CN113347284B CN202110642578.7A CN202110642578A CN113347284B CN 113347284 B CN113347284 B CN 113347284B CN 202110642578 A CN202110642578 A CN 202110642578A CN 113347284 B CN113347284 B CN 113347284B
Authority
CN
China
Prior art keywords
domain name
connection
data
binding
data dial
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
CN202110642578.7A
Other languages
Chinese (zh)
Other versions
CN113347284A (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.)
Quectel Wireless Solutions Co Ltd
Original Assignee
Quectel Wireless Solutions 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 Quectel Wireless Solutions Co Ltd filed Critical Quectel Wireless Solutions Co Ltd
Priority to CN202110642578.7A priority Critical patent/CN113347284B/en
Publication of CN113347284A publication Critical patent/CN113347284A/en
Application granted granted Critical
Publication of CN113347284B publication Critical patent/CN113347284B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The embodiment of the application relates to the technical field of Internet, and discloses a resource access method, a resource access device, electronic equipment and a storage medium. The resource access method comprises the following steps: determining the data dialing connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and the data dialing connection; and obtaining an Internet Protocol (IP) address corresponding to the domain name through the data dial-up connection corresponding to the domain name, and generating a routing rule corresponding to the domain name so as to access network resources corresponding to the domain name through the data dial-up connection corresponding to the domain name. The technical scheme provided by the embodiment of the application can access the network resources corresponding to the domain name through the designated data dial-up connection.

Description

Resource access method, resource access device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of Internet, in particular to a resource access method, a resource access device, electronic equipment and a storage medium.
Background
The process of establishing a wireless Data service is called Data dialing (Data Call). After the data dial-up connection is established successfully, information such as an internet protocol (Internet Protocol, IP) address, a gateway address, DNS and the like is acquired. In an actual application scenario, a plurality of data dial-up connections can be created at the same time, and different services are performed through different data dial-up connections. In the scenario for service access using domain names, the domain name needs to be accessed using a designated data dial-up connection.
However, there may be multiple data dial-up connections for one device. How to use a specified data dial-up connection when accessing a certain network service is a problem to be solved.
Disclosure of Invention
An object of an embodiment of the present application is to provide a resource access method, a resource access device, an electronic apparatus, and a storage medium, which can access a network resource corresponding to a domain name through a designated data dial-up connection.
In order to solve the above technical problems, in a first aspect, an embodiment of the present application provides a resource access method, including: determining the data dialing connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and the data dialing connection; and obtaining an Internet Protocol (IP) address corresponding to the domain name through the data dial-up connection corresponding to the domain name, and generating a routing rule corresponding to the domain name so as to access network resources corresponding to the domain name through the data dial-up connection corresponding to the domain name.
In a second aspect, an embodiment of the present application provides a resource access device, including: the agent module and the domain name binding module; the proxy module is used for determining the data dialing connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and the data dialing connection; the domain name binding module is used for obtaining the Internet Protocol (IP) address corresponding to the domain name through the data dial-up connection corresponding to the domain name, and generating a routing rule corresponding to the domain name so as to access the network resource corresponding to the domain name through the data dial-up connection corresponding to the domain name.
In a third aspect, an embodiment of the present application provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the resource access method as mentioned in the above embodiments.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the resource access method mentioned in the foregoing embodiment.
According to the resource access method, the resource access device, the electronic equipment and the storage medium provided by the embodiment of the application, the long term evolution (Long Term Evolution, LTE) module can determine the data dialing connection corresponding to the domain name carried by the domain name resolution request according to the binding relation between the pre-stored domain name and the data dialing connection, further obtain the IP address corresponding to the domain name through the data dialing connection corresponding to the domain name, and generate the routing rule, so that when a user accesses network resources through the domain name, the user can access the network resources corresponding to the domain name through the data dialing connection corresponding to the domain name.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures of the drawings are not to be taken in a limiting sense, unless otherwise indicated.
FIG. 1 is a flow chart of a method of resource access in an embodiment of the application;
FIG. 2 is a flow chart of a method of resource access in another embodiment of the application;
FIG. 3 is a flow chart of a method of resource access in yet another embodiment of the application;
FIG. 4 is a flow chart of a method of resource access in yet another embodiment of the application;
FIG. 5 is a flow chart of a method of resource access in yet another embodiment of the application;
FIG. 6 is a flow chart of a method of resource access in yet another embodiment of the application;
FIG. 7 is a flow chart of a method of resource access in yet another embodiment of the application;
FIG. 8 is a schematic diagram of interactions of a local application, a DNS proxy service, and a domain name binding service in an embodiment of the present application;
FIG. 9 is a schematic diagram of a resource access device according to an embodiment of the present application
Fig. 10 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings. However, those of ordinary skill in the art will understand that in various embodiments of the present application, numerous technical details have been set forth in order to provide a better understanding of the present application. However, the claimed application may be practiced without these specific details and with various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not be construed as limiting the specific implementation of the present application, and the embodiments can be mutually combined and referred to without contradiction.
In the network, network access to a certain server is in the form of an IP address. The user often uses a domain name method to access the network (e.g. access www.xxx.com), which will resolve the domain name into an IP address, that is, using a domain name system (Domain Name System, DNS) server of a data dial-up connection to resolve the domain name into an IP address, and then uses the resolved IP address to access the network through a socket () function. However, the LTE module may have multiple data dial-up connections. The manner in which routing rules are used in an operating system (e.g., linux) defines which data dial-up connection is used to access a certain network resource. The routing rules are in the format of: the destination IP address via points to the data dial-up connection interface name (via the gateway dev of the data dial-up connection). The principle can know that a certain data dial-up connection is used for accessing the domain name, the DNS server of the data dial-up connection needs to firstly analyze the IP address of the domain name, then a routing rule is set, and the IP address is pointed to the data dial-up connection. However, for some third party software and local area network (Local Area Network, LAN) hosts that connect devices, access to network resources through specific data dialing cannot be achieved in this manner. Because the third party software and the logic of the LAN host cannot be modified. Currently, the third party software and LAN hosts access network resources using domain names as follows: and calling a network information query function (gethostbyname) class function in the Linux standard library, resolving the domain name into an IP address, and then establishing socket connection by using the IP address to access network resources. The gethostbyname function in the Linux standard library cannot use the designated DNS to resolve the domain name, and the user needs to implement the domain name resolution interface by himself. This approach uses domain names to access network resources for third party software and LAN hosts of the access device, and cannot implement access domain name specific data dial-up connections.
In the embodiment of the application, the resource access method can be applied to the LTE module. The resource access method shown in fig. 1 includes the following steps.
Step 101: and determining the data dialing connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and the data dialing connection.
Step 102: and obtaining an Internet Protocol (IP) address corresponding to the domain name through the data dial-up connection corresponding to the domain name, and generating a routing rule corresponding to the domain name so as to access network resources corresponding to the domain name through the data dial-up connection corresponding to the domain name.
In the embodiment of the application, the LTE module can determine the data dial-up connection corresponding to the domain name carried by the domain name resolution request according to the binding relation between the pre-stored domain name and the data dial-up connection, and further acquire the IP address corresponding to the domain name through the data dial-up connection corresponding to the domain name, and generate the routing rule, so that when a user accesses network resources through the domain name, the user can access the network resources corresponding to the domain name through the data dial-up connection corresponding to the domain name.
In one embodiment, as shown in FIG. 2, step 102: the method comprises the following sub-steps of:
step 1021: and sending a domain name resolution request to a domain name resolution server corresponding to the data dial-up connection corresponding to the domain name. Specifically, the domain name resolution server resolves the domain name according to the received domain name resolution request to obtain an IP address corresponding to the domain name, and returns the resolution result to the LTE module.
Step 1022: and acquiring the Internet Protocol (IP) address corresponding to the domain name according to the response of the corresponding domain name resolution server.
Step 1023: and generating a routing rule corresponding to the domain name according to the Internet Protocol (IP) address corresponding to the domain name and the data dial-up connection corresponding to the domain name.
Take the example of a data dial-up connection as a data dial-up connection. The LTE module uses a domain name resolution server which is connected with the data dial corresponding to the domain name to perform domain name resolution. And after the resolution is successful, obtaining the IP address corresponding to the domain name. And the LTE module sets a routing rule according to the IP address corresponding to the domain name. The data dialing connection is a mode that the LTE module is connected to the data dialing, such as a home gateway device, and an Ethernet port, a WIFI wireless interface and the like are arranged on an interface connected to the data dialing. For another example, the vehicle-mounted module is connected to a data dialing interface such as data dialing, WIFI, etc.
It should be noted that, as those skilled in the art will appreciate, the data dial-up connection may be other connections, and the present embodiment is merely illustrative.
In this embodiment, after setting a binding relationship between a domain name and a data dial-up connection, when the LTE module accesses the domain name, the LTE module may automatically use a domain name resolution server of the data dial-up connection corresponding to the domain name to resolve the domain name, and automatically set a corresponding routing rule after resolving. Compared with the method that when domain name resolution is carried out, a domain name resolution server connected through data dialing is manually set, after the IP address is obtained, the analyzed IP address is manually set to be routed to the appointed data dialing connection, and finally the appointed data dialing connection is used for accessing the domain name, so that the operation is simpler.
In one embodiment, before obtaining the internet protocol IP address corresponding to the domain name and generating the routing rule corresponding to the domain name through the data dial-up connection corresponding to the domain name, the method further includes: and determining that the binding relationship matched with the domain name exists in the binding relationship of the domain name and the data dial-up connection.
In this embodiment, it is first determined whether there is a binding relationship between domain names carried by the domain name resolution request, so as to avoid resource waste caused by executing subsequent operations under the condition of unmatched binding relationships.
Optionally, the determining that the binding relationship between the domain name and the data dial-up connection exists in the binding relationship matched with the domain name includes: using the domain name, matching and inquiring in the binding relation between the domain name and the data dial-up connection, and judging whether the binding relation matched with the domain name exists or not; if yes, determining that a binding relationship matched with the domain name exists in the binding relationship of the domain name and the data dial-up connection; if the binding relation is determined to exist, the binding relation corresponding to the domain name at the upper level of the domain name is used as the binding relation matched with the domain name, and the binding relation matched with the domain name is determined to exist. For example, for a domain name aa.bb.cc, the domain name aa.bb.cc is used for matching, and if the binding relationship corresponding to aa.bb.cc is not matched, bb.cc is used for matching. As a result of matching using bb.cc, the domain name bb.cc and the domain name aa.bb.cc can be matched. In this embodiment, by setting multi-stage domain name matching, domain name batch matching can be realized.
Optionally, if it is determined that the binding relationship between the domain name and the data dial-up connection does not exist a binding relationship matching with the carried domain name, the resource access method further includes: sending a domain name resolution request to a default domain name resolution server; and acquiring the Internet Protocol (IP) address corresponding to the domain name according to the response of the default domain name resolution server.
Specifically, as shown in fig. 3, the resource access method includes the steps of:
step 301: and determining the data dialing connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and the data dialing connection.
Step 302: judging whether a binding relationship matched with the domain name carried by the domain name resolution request exists in the binding relationship of the domain name and the data dial-up connection. If it is determined that there is, step 303 is performed, and if it is determined that there is not, step 304 is performed.
Step 303: and obtaining an Internet Protocol (IP) address corresponding to the domain name through the data dial-up connection corresponding to the domain name, and generating a routing rule corresponding to the domain name so as to access network resources corresponding to the domain name through the data dial-up connection corresponding to the domain name. The flow is then ended.
Step 304: sending a domain name resolution request to a default domain name resolution server; and acquiring the Internet Protocol (IP) address corresponding to the domain name according to the response of the default domain name resolution server.
In this embodiment, a compatibility mechanism is set for the domain name with no binding relationship, and the default domain name resolution server is used to resolve the domain name resolution request, so as to obtain the IP address corresponding to the domain name, thereby improving the compatibility of the resource access method.
It should be noted that, as will be understood by those skilled in the art, other measures may be adopted in the case that the binding relationship corresponding to the domain name carried by the domain name resolution request is not matched, and this embodiment is merely illustrative.
In one embodiment, after obtaining the internet protocol IP address corresponding to the domain name, the resource access method further includes: and establishing communication connection of the network resources corresponding to the domain name according to the Internet Protocol (IP) address corresponding to the domain name. Specifically, after the IP address is obtained, a socket connection is created by using the IP address, and network access is performed.
In this embodiment, communication connection is established based on the routing rule, so that the LTE module may access network resources corresponding to the domain name through the designated data dial-up connection.
In one embodiment, before determining a data dial-up connection corresponding to a domain name according to the domain name carried by the domain name resolution request and the binding relationship between the domain name and each data dial-up connection, the resource access method includes: and loading and storing the binding relation between the domain name and the data dial-up connection. Specifically, the user may create a binding of domain name and data dial-up connection on the LTE module or other device. And loading the binding relation between the domain name and the data dial-up connection by the LTE module and storing the binding relation into a database.
It should be noted that, as will be understood by those skilled in the art, the binding relationship between the domain name and the data dial-up connection may be stored in the LTE module in the form of a data table, or may be stored in the device in other forms, which is not limited in this embodiment.
In one embodiment, before determining the data dial-up connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relationship between the domain name and each data dial-up connection, the resource access method further includes: the domain name resolution request is obtained through a domain name resolution interface of a network information query function (gethostbyname).
In this embodiment, the gethotbyname domain name resolution interface is a domain name resolution interface of the C library, so that the resource access method of this embodiment can be compatible with the domain name resolution interface in the C library, and further can be compatible with all application programs using the domain name resolution interface in the C library.
It should be noted that, as those skilled in the art can understand, the domain name resolution request may also be initiated through other interfaces, and this embodiment is merely illustrative.
The above embodiments may be combined with each other to refer to each other, for example, the following are examples after the combination of the embodiments, but not limited to these examples; the embodiments can be arbitrarily combined into a new embodiment on the premise of no contradiction.
In one embodiment, the resource access method as shown in FIG. 4 includes the following steps.
Step 401: and determining the data dialing connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and the data dialing connection.
Step 402: judging whether a binding relationship matched with the domain name carried by the domain name resolution request exists in the binding relationship of the domain name and the data dial-up connection. If it is determined that there is, step 403 is performed, and if it is determined that there is not, step 406 is performed.
Step 403: and sending a domain name resolution request to a domain name resolution server corresponding to the data dial-up connection corresponding to the domain name.
Step 404: and acquiring the Internet Protocol (IP) address corresponding to the domain name according to the response of the corresponding domain name resolution server.
Step 405: and generating a routing rule corresponding to the domain name according to the Internet Protocol (IP) address corresponding to the domain name and the data dial-up connection corresponding to the domain name. The flow is then ended.
Step 406: sending a domain name resolution request to a default domain name resolution server; and acquiring the Internet Protocol (IP) address corresponding to the domain name according to the response of the default domain name resolution server.
Optionally, before determining the data dial-up connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and each data dial-up connection, loading and storing the binding relation between the domain name and the data dial-up connection.
Optionally, before determining the data dial-up connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and each data dial-up connection, acquiring the domain name resolution request through a network information query function type domain name resolution interface.
In one embodiment, the resource access method as shown in FIG. 5 includes the following steps.
Step 501: and determining the data dialing connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and the data dialing connection.
Step 502: and sending a domain name resolution request to a domain name resolution server corresponding to the data dial-up connection corresponding to the domain name.
Step 503: and acquiring the Internet Protocol (IP) address corresponding to the domain name according to the response of the corresponding domain name resolution server.
Step 504: and generating a routing rule corresponding to the domain name according to the Internet Protocol (IP) address corresponding to the domain name and the data dial-up connection corresponding to the domain name.
Step 505: and establishing communication connection of the network resources corresponding to the domain name according to the Internet Protocol (IP) address corresponding to the domain name.
Optionally, before determining the data dial-up connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and each data dial-up connection, loading and storing the binding relation between the domain name and the data dial-up connection.
Optionally, before determining the data dial-up connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and each data dial-up connection, acquiring the domain name resolution request through a network information query function type domain name resolution interface.
In one embodiment, the resource access method as shown in FIG. 6 includes the following steps.
Step 601: and determining the data dialing connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and the data dialing connection.
Step 602: judging whether a binding relationship matched with the domain name carried by the domain name resolution request exists in the binding relationship of the domain name and the data dial-up connection. If it is determined that there is a presence, step 603 is performed, and if it is determined that there is no presence, step 604 is performed.
Step 603: and obtaining an Internet Protocol (IP) address corresponding to the domain name through the data dial-up connection corresponding to the domain name, and generating a routing rule corresponding to the domain name so as to access network resources corresponding to the domain name through the data dial-up connection corresponding to the domain name. Step 605 is then performed.
Step 604: sending a domain name resolution request to a default domain name resolution server; and acquiring the Internet Protocol (IP) address corresponding to the domain name according to the response of the default domain name resolution server.
Step 605: and establishing communication connection of the network resources corresponding to the domain name according to the Internet Protocol (IP) address corresponding to the domain name.
Optionally, before determining the data dial-up connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and each data dial-up connection, loading and storing the binding relation between the domain name and the data dial-up connection.
Optionally, before determining the data dial-up connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and each data dial-up connection, acquiring the domain name resolution request through a network information query function type domain name resolution interface.
In one embodiment, the resource access method as shown in FIG. 7 includes the following steps.
Step 701: and determining the data dialing connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and the data dialing connection.
Step 702: judging whether a binding relationship matched with the domain name carried by the domain name resolution request exists in the binding relationship of the domain name and the data dial-up connection. If it is determined that there is a presence, step 703 is performed, and if it is determined that there is no presence, step 706 is performed.
Step 703: and sending a domain name resolution request to a domain name resolution server corresponding to the data dial-up connection corresponding to the domain name.
Step 704: and acquiring the Internet Protocol (IP) address corresponding to the domain name according to the response of the corresponding domain name resolution server.
Step 705: and generating a routing rule corresponding to the domain name according to the Internet Protocol (IP) address corresponding to the domain name and the data dial-up connection corresponding to the domain name. Step 707 is then performed.
Step 706: sending a domain name resolution request to a default domain name resolution server; and acquiring the Internet Protocol (IP) address corresponding to the domain name according to the response of the default domain name resolution server.
Step 707: and establishing communication connection of the network resources corresponding to the domain name according to the Internet Protocol (IP) address corresponding to the domain name.
Optionally, before determining the data dial-up connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and each data dial-up connection, loading and storing the binding relation between the domain name and the data dial-up connection.
Optionally, before determining the data dial-up connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and each data dial-up connection, acquiring the domain name resolution request through a network information query function type domain name resolution interface.
In one embodiment, a local application, a DNS proxy service, and a domain name binding service are provided in the LTE module. Network resources are accessed in coordination by the local application, DNS proxy service, and domain name binding service. The local application may be a client application, a third party application, or an application on a LAN host. The DNS proxy service may be an open source DNS proxy service, such as a service tool (dnsmasq). The domain name binding service program receives a response result of the domain name resolution request of the DNS proxy service program, and sets a routing rule according to the response result. Specifically, a schematic of the local application, DNS proxy, and domain name binding service interactions is shown in fig. 8. Wherein the local application performs the steps of:
step 801: the local application is initialized.
Step 802: the local application program calls the gethostbyname standard library function to resolve the domain name, and initiates a domain name resolution request to the DNS proxy service program.
Step 803: the local application program obtains a domain name resolution response and obtains an IP address of the domain name.
Step 804: the local application establishes a socket connection using the IP address of the domain name.
Step 805: the local application program accesses the network resource corresponding to the domain name through the data dial-up connection. The flow is then ended.
The DNS proxy service program performs the following steps:
step 806: the DNS proxy service program is initialized.
Step 807: the DNS proxy service waits for a domain name resolution request.
Step 808: the DNS proxy service receives the domain name resolution request.
Step 809: the DNS proxy service program inquires the binding relation between the domain name and the data dial connection and judges whether the binding relation corresponding to the domain name exists or not. If it is determined that there is no, step 810 is performed, and if it is determined that there is, step 811 is performed.
Step 810: the DNS proxy service program performs domain name resolution using a domain name resolution server configured by default. Step 813 is then performed.
Step 811: the DNS proxy service program performs domain name resolution through a domain name resolution server corresponding to the data dial connection corresponding to the domain name.
Step 812: and acquiring the IP address, notifying a domain name binding service program, and waiting for confirmation information. After receiving the confirmation information, step 813 is performed.
Step 813: after resolution is complete, a domain name resolution response is sent to the local application and step 807 is returned. The flow is then ended.
The domain name binding service program performs the steps of:
step 814: the domain name binding service program is initialized.
Step 815: the domain name binding service creates a database storing binding relationships for domain names and data dial-up connections.
Step 816: the domain name binding service loads entries in a database that stores binding relationships for domain names and data dial-up connections.
Step 817: the domain name binding service waits for a domain name resolution success notification.
Step 818: the domain name binding service receives a domain name resolution success notification.
Step 819: the domain name binding service sets the routing rules. Specifically, a routing rule is set according to the IP address and the binding relationship between the domain name and the data dial-up connection.
Step 820: returns a confirmation to the DNS proxy server and returns to step 817.
As can be seen from the above, in this embodiment, the LTE module (e.g. LAN host) uses a unified mechanism to go through DNS proxy service when accessing the data dial-up connection. The local loop address is set in the DNS configuration file of the LTE module so as to receive the domain name resolution response. The domain name binding service program loads the binding relation (i.e. binding rule) between the domain name and the data dial-up connection and stores the binding relation in the database. When the local application accesses a domain name, a domain name resolution request is sent to the DNS proxy service program. After receiving the domain name resolution request, the DNS proxy server program performs matching inquiry in the database, and if no binding relation corresponding to the domain name carried by the domain name resolution request is inquired, uses a default domain name resolution server to perform domain name resolution. If the binding relation corresponding to the domain name carried by the domain name resolution request is queried, domain name resolution is carried out by using a domain name resolution server connected with the bound data dial. And after the resolution is successful, sending a domain name resolution success notification to a domain name binding service program. The domain name resolution success notification includes the IP address corresponding to the domain name. The domain name binding service program sets a routing rule according to the IP address corresponding to the domain name and the binding relation of the domain name and the data dial-up connection, and returns confirmation information to the DNS proxy service program. After receiving the confirmation information, or after receiving the response of the default domain name resolution server, the DNS proxy server confirms that the domain name resolution is completed. After the domain name resolution is completed, a domain name resolution response is sent to the local client program. After the local client program obtains the IP address, the socket is created by using the IP address, and network access is performed. The resource access method of the embodiment enables that the user can address the specific domain name to access the specific data dial-up connection by specifying the binding rule under the scene of the multi-data dial-up connection, and the operation is simple. After the binding relation is set by the user, when a local application program on the LTE module accesses the domain name, a special domain name resolution mode is not needed, the binding of the domain name and the appointed data dial-up connection can be realized only by using a standard Linux domain name resolution function, the domain name resolution flow is processed in a DNS proxy service program and a domain name binding service program, and the local application program of the LTE module is not required to be modified. The LTE module is compatible with all applications using the domain name resolution interface in the C library through the gethostbyname class function (i.e., the domain name resolution interface in the C library). In the resource access method of the embodiment, the domain name with the specified binding relationship walks the special domain name resolution flow, and the rest of domain name walks the default domain name resolution flow, so that the resource access method can be compatible with the access of network resources corresponding to the domain name with the unbound binding relationship.
The above steps of the methods are divided, for clarity of description, and may be combined into one step or split into multiple steps when implemented, so long as they include the same logic relationship, and they are all within the protection scope of this patent; it is within the scope of this patent to add insignificant modifications to the algorithm or flow or introduce insignificant designs, but not to alter the core design of its algorithm and flow.
The embodiment of the application also provides a resource access device, as shown in fig. 9, which comprises: a proxy module 901 and a domain name binding module 902. The proxy module 901 is configured to determine a data dial connection corresponding to a domain name according to the domain name carried by the domain name resolution request and a binding relationship between the domain name and the data dial connection. The domain name binding module 902 is configured to obtain an internet protocol IP address corresponding to a domain name through a data dial-up connection corresponding to the domain name, and generate a routing rule corresponding to the domain name, so as to access a network resource corresponding to the domain name through the data dial-up connection corresponding to the domain name.
It is to be noted that this embodiment is a system implementation corresponding to the above method embodiment, and this embodiment may be implemented in cooperation with the above method embodiment. The related technical details mentioned in the above method embodiments are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the related technical details mentioned in the present embodiment can also be applied in the above-described method embodiments.
It should be noted that, each module involved in this embodiment is a logic module, and in practical application, one logic unit may be one physical unit, or may be a part of one physical unit, or may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present application, units less closely related to solving the technical problem presented by the present application are not introduced in the present embodiment, but it does not indicate that other units are not present in the present embodiment.
The embodiment of the application also provides an electronic device, as shown in fig. 10, including: at least one processor 110; and a memory 120 communicatively coupled to the at least one processor 110; wherein the memory stores instructions executable by the at least one processor 110, the instructions being executable by the at least one processor 110 to enable the at least one processor 110 to perform the above-described method embodiments.
Where memory 120 and processor 110 are connected by a bus, the bus may comprise any number of interconnected buses and bridges, the buses connecting the various circuits of one or more of the processor 110 and memory 120 together. The bus may also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or may be a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 110 is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor 110.
The processor 110 is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory 120 may be used to store data used by processor 110 in performing operations.
The embodiment of the application also provides a computer readable storage medium which stores a computer program. The computer program implements the above-described method embodiments when executed by a processor.
That is, it will be understood by those skilled in the art that all or part of the steps in implementing the methods of the embodiments described above may be implemented by a program stored in a storage medium, where the program includes several instructions for causing a device (which may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps in the methods of the embodiments of the application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples of carrying out the application and that various changes in form and details may be made therein without departing from the spirit and scope of the application.

Claims (10)

1. The resource access method is characterized by being applied to a Long Term Evolution (LTE) module and comprising the following steps:
determining the data dialing connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and the data dialing connection;
wherein, the data dialing is the establishment process of wireless data service;
and obtaining an Internet Protocol (IP) address corresponding to the domain name through the data dial-up connection corresponding to the domain name, and generating a routing rule corresponding to the domain name so as to access network resources corresponding to the domain name through the data dial-up connection corresponding to the domain name.
2. The method for accessing resources according to claim 1, wherein the obtaining the internet protocol IP address corresponding to the domain name and generating the routing rule corresponding to the domain name through the data dial-up connection corresponding to the domain name comprises:
sending the domain name resolution request to a domain name resolution server corresponding to the data dial-up connection corresponding to the domain name;
acquiring an Internet Protocol (IP) address corresponding to the domain name according to the response of the corresponding domain name resolution server;
and generating a routing rule corresponding to the domain name according to the Internet Protocol (IP) address corresponding to the domain name and the data dial-up connection corresponding to the domain name.
3. The method for accessing resources according to claim 1, further comprising, before said obtaining an internet protocol IP address corresponding to the domain name and generating a routing rule corresponding to the domain name through the data dial-up connection corresponding to the domain name:
and determining that the binding relationship matched with the domain name exists in the binding relationship of the domain name and the data dial-up connection.
4. A method for accessing a resource according to claim 3, wherein said determining that there is a binding relationship matching the domain name in the binding relationship of the domain name and the data dial-up connection comprises:
using the domain name, matching and inquiring in the binding relation between the domain name and the data dial-up connection, and judging whether the binding relation matched with the domain name exists or not;
if yes, determining that a binding relationship matched with the domain name exists in the binding relationship of the domain name and the data dial-up connection;
if the binding relation is determined to exist, the binding relation corresponding to the domain name at the upper level of the domain name is used as the binding relation matched with the domain name, and the binding relation matched with the domain name is determined to exist.
5. The method according to claim 3, wherein if it is determined that there is no binding relationship matching the carried domain name in the binding relationship of the domain name and the data dial-up connection, the method further comprises:
sending a domain name resolution request to a default domain name resolution server;
and acquiring the Internet Protocol (IP) address corresponding to the domain name according to the response of the default domain name resolution server.
6. The resource access method according to claim 1 or 4, characterized in that after acquiring the internet protocol IP address corresponding to the domain name, the resource access method further comprises:
and establishing communication connection of network resources corresponding to the domain name according to the Internet Protocol (IP) address corresponding to the domain name.
7. The resource access method according to any one of claims 1 to 4, wherein before determining the data dial-up connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relationship between the domain name and each data dial-up connection, the resource access method includes:
and loading and storing the binding relation between the domain name and the data dial-up connection.
8. A resource access device, comprising: the agent module and the domain name binding module;
the proxy module is used for determining the data dialing connection corresponding to the domain name according to the domain name carried by the domain name resolution request and the binding relation between the domain name and the data dialing connection;
wherein, the data dialing is the establishment process of wireless data service;
the domain name binding module is used for obtaining the Internet Protocol (IP) address corresponding to the domain name through the data dial-up connection corresponding to the domain name, and generating the routing rule corresponding to the domain name so as to access the network resource corresponding to the domain name through the data dial-up connection corresponding to the domain name.
9. An electronic device, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the resource access method of any one of claims 1 to 7.
10. A computer readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the resource access method according to any one of claims 1 to 7.
CN202110642578.7A 2021-06-09 2021-06-09 Resource access method, resource access device, electronic equipment and storage medium Active CN113347284B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110642578.7A CN113347284B (en) 2021-06-09 2021-06-09 Resource access method, resource access device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110642578.7A CN113347284B (en) 2021-06-09 2021-06-09 Resource access method, resource access device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113347284A CN113347284A (en) 2021-09-03
CN113347284B true CN113347284B (en) 2023-08-15

Family

ID=77475622

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110642578.7A Active CN113347284B (en) 2021-06-09 2021-06-09 Resource access method, resource access device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113347284B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752411A (en) * 2012-06-29 2012-10-24 华为终端有限公司 Redirection method and device
CN106603748A (en) * 2016-12-30 2017-04-26 深圳市万普拉斯科技有限公司 Terminal networking method and terminal
CN110224996A (en) * 2019-05-20 2019-09-10 深圳壹账通智能科技有限公司 Network Access Method, device, computer equipment and the storage medium of application program
CN110247999A (en) * 2019-07-11 2019-09-17 广东美的制冷设备有限公司 Domain name analytic method, domain name mapping device, household appliance and storage medium
CN111314499A (en) * 2020-02-17 2020-06-19 深信服科技股份有限公司 Domain name proxy method, device, equipment and readable storage medium
CN112153168A (en) * 2020-08-14 2020-12-29 深圳市广和通无线股份有限公司 Network access method, device, computer equipment and storage medium
CN112698113A (en) * 2020-12-10 2021-04-23 上海移远通信技术股份有限公司 Amplitude calibration method and device of receiving channel and network equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752411A (en) * 2012-06-29 2012-10-24 华为终端有限公司 Redirection method and device
CN106603748A (en) * 2016-12-30 2017-04-26 深圳市万普拉斯科技有限公司 Terminal networking method and terminal
CN110224996A (en) * 2019-05-20 2019-09-10 深圳壹账通智能科技有限公司 Network Access Method, device, computer equipment and the storage medium of application program
CN110247999A (en) * 2019-07-11 2019-09-17 广东美的制冷设备有限公司 Domain name analytic method, domain name mapping device, household appliance and storage medium
WO2021004144A1 (en) * 2019-07-11 2021-01-14 广东美的制冷设备有限公司 Domain name resolution method, domain name resolution device, household appliance, and storage medium
CN111314499A (en) * 2020-02-17 2020-06-19 深信服科技股份有限公司 Domain name proxy method, device, equipment and readable storage medium
CN112153168A (en) * 2020-08-14 2020-12-29 深圳市广和通无线股份有限公司 Network access method, device, computer equipment and storage medium
CN112698113A (en) * 2020-12-10 2021-04-23 上海移远通信技术股份有限公司 Amplitude calibration method and device of receiving channel and network equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"家庭宽带用户IPv6地址分配实施方案的研究与部署";冯忠义,杜祥,朱敏晓;《江苏通信》;20210105;全文 *

Also Published As

Publication number Publication date
CN113347284A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
US10924558B2 (en) Network function information interaction method and device, and computer storage medium
KR100440583B1 (en) A Method and Apparatus of Management and Control of UPnP Device in Home Network from the Internet
US20220159104A1 (en) IPv4/IPv6 BRIDGE
JP2020522201A (en) Service discovery methods, registration centers, and devices
CN115442423A (en) Method for discovering services provided by a network repository function
CN113132185B (en) Equipment distribution network binding method, system, mobile terminal and storage medium
CN104219127A (en) Creation method and device of virtual network instance
CN113411215B (en) Time-sensitive network centralized user configuration method and system based on OPC UA
CN110572820B (en) Registration method and device of IMS terminal, position information server and storage medium
CN113746928B (en) Cross-cloud service calling method, device and system
CN104969515A (en) Methods and gateways for processing DNS request
CN112104640B (en) Data processing method, device and equipment of gateway and readable storage medium
CN112532711A (en) Edge computing application deployment method, terminal, edge computing node and storage medium
CN102598636A (en) Method for a secure device to resolve an IP address of a target server
CN105657055A (en) Local area network equipment finding method and device oriented to WEB page
US8861503B2 (en) Method and system for synchronizing data between mobile terminal and internet phone
EP3439238A1 (en) Architecture, method and apparatus for realizing network function communication
EP2854375A1 (en) Communication processing method, server and terminal
CN112637126B (en) Service registration method and Pod
CN115174310B (en) PDN dialing and configuration method, system, device, equipment and storage medium
CN113347284B (en) Resource access method, resource access device, electronic equipment and storage medium
KR20220006605A (en) Cloud communication method and device, user device, network device
CN106331163B (en) Method and device for controlling service platform
CN110661895A (en) Network address mapping method and network address mapping equipment of server
CN115567521A (en) Communication method and device between local area network and public cloud, and computing equipment

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