CN111147616B - Resource acquisition method and device, electronic equipment and storage medium - Google Patents

Resource acquisition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111147616B
CN111147616B CN201911305514.7A CN201911305514A CN111147616B CN 111147616 B CN111147616 B CN 111147616B CN 201911305514 A CN201911305514 A CN 201911305514A CN 111147616 B CN111147616 B CN 111147616B
Authority
CN
China
Prior art keywords
domain name
server
address
information
resource
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
CN201911305514.7A
Other languages
Chinese (zh)
Other versions
CN111147616A (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.)
Beijing Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System 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 Beijing Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN201911305514.7A priority Critical patent/CN111147616B/en
Publication of CN111147616A publication Critical patent/CN111147616A/en
Application granted granted Critical
Publication of CN111147616B publication Critical patent/CN111147616B/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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/35Network arrangements, protocols or services for addressing or naming involving non-standard use of addresses for implementing network functionalities, e.g. coding subscription information within the address or functional addressing, i.e. assigning an address to a function
    • 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/5053Lease time; Renewal aspects

Abstract

The application provides a resource acquisition method, a resource acquisition device, electronic equipment and a storage medium, wherein the method comprises the following steps that a client responds to user input operation to acquire domain name address information input by a user: the client searches a corresponding IP address in a preset storage area of the client according to the domain name address information; the client sends a resource information acquisition request carrying the domain name address information to a server corresponding to the IP address; the server searches the IP address of the storage server of the resource information in a preset storage area of the server according to the domain name address information in the resource information acquisition request; the server acquires corresponding resource information in the storage server according to the IP address of the storage server; the server sends the resource information to the client.

Description

Resource acquisition method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer network technologies, and in particular, to a resource acquisition method and apparatus, an electronic device, and a storage medium.
Background
In the existing resource acquisition method, a user generally inputs a domain name through a client, and then the domain name is analyzed through a domain name analysis server to obtain an IP address, and then a server corresponding to the IP address acquires corresponding resources.
If the server corresponding to the resource is changed, the corresponding IP address is also changed or the resource server needs to be added, the IP corresponding to the server needs to be added, and at this time, the IP address needs to be modified or added to the source code in the DNS server.
Disclosure of Invention
An embodiment of the present application aims to provide a resource obtaining method, a resource obtaining device, an electronic device, and a storage medium, so as to solve the problems of high technical requirements and inconvenience when a traditional DNS server performs IP address resolution and when an IP address changes or needs to be added.
In a first aspect, an embodiment provides a resource obtaining method, where the method is applied to a client, and the method includes: acquiring domain name address information input by a user; searching a corresponding IP address in a preset storage area of the client according to the domain name address information, and establishing a mapping relation between the domain name address information and the IP address in advance and storing the mapping relation in the preset storage area of the client; sending the resource information acquisition request carrying the domain name address information to a server corresponding to the IP address; and receiving resource information which is returned by the server and corresponds to the domain name address information, wherein the resource information is obtained by the server according to the domain name address information.
In the above designed resource obtaining method, the client searches the IP address of the corresponding server in the preset storage area of the client through the domain name address information, and the corresponding server also searches the IP address of the resource storage server in the preset storage area of the client according to the domain name address information carried in the resource obtaining request sent by the client, so as to obtain the corresponding resource information, when the IP address of the server changes or the IP address of the server is increased, the purpose can be achieved by correspondingly modifying or increasing the IP address in the preset storage area corresponding to the domain name address information, and the modification of the mapping relation in the preset storage area is less difficult than the modification of the IP in the code, thereby solving the problems of high technical requirements and inconvenience when the IP address is changed or the IP address needs to be increased in the conventional DNS server for IP address resolution.
In an optional implementation manner of the first aspect, before the searching for the corresponding IP address in the preset storage area of the client according to the domain name address information, the method further includes: sending the domain name address information to a domain name resolution server; judging whether analysis failure information returned by the domain name server is received or not; and if so, executing the step of searching the corresponding IP address in a preset storage area of the client according to the domain name address information.
In a second aspect, an embodiment provides a resource obtaining method, where the method is applied to a server, and the method includes: acquiring a resource acquisition request which is sent by a client and carries domain name address information; searching an IP address of a storage server of the resource information in a preset storage area of the server according to the domain name address information; and calling corresponding resource information in the storage server according to the IP address and sending the resource information to the client.
In the above designed resource obtaining method, the client searches the IP address of the corresponding server in the preset storage area of the client through the domain name address information, and the corresponding server also searches the IP address of the resource storage server in the preset storage area of the client according to the domain name address information carried in the resource obtaining request sent by the client, so as to obtain the corresponding resource information, when the IP address of the server changes or the IP address of the server is increased, the purpose can be achieved by correspondingly modifying or increasing the IP address in the preset storage area corresponding to the domain name address information, and the modification of the mapping relation in the preset storage area is less difficult than the modification of the IP in the code, thereby solving the problems of high technical requirements and inconvenience when the IP address is changed or the IP address needs to be increased in the conventional DNS server for IP address resolution.
In an optional implementation manner of the second aspect, the searching, by the domain name address information, an IP address of a storage server of resource information in a preset storage area of the server according to the domain name address information includes: judging whether a plurality of characteristic character strings of the domain name address information have preset characteristic character strings or not; if yes, searching an IP address of a storage server of the resource information in a preset storage area of the server according to the preset characteristic character string; the calling the corresponding resource information in the storage server according to the IP address and sending the resource information to the client comprises the following steps: and replacing the preset characteristic character string in the domain name address information with the IP address of the storage server to form a new domain name address, calling corresponding resource information in the storage server according to the new domain name address, and sending the resource information to the client.
In an optional implementation manner of the second aspect, before the obtaining a resource obtaining request carrying domain name address information sent by the obtaining client, the method further includes: acquiring the domain name address information and the IP address of a storage server of the resource information corresponding to the domain name address information; and associating the domain name address information and the IP address of the storage server of the resource information corresponding to the domain name address information and storing the IP address in a preset storage area of the server.
In a third aspect, an embodiment provides a resource obtaining apparatus, which is applied to a client, and the apparatus includes: the acquisition module is used for acquiring domain name address information input by a user; the searching module is used for searching a corresponding IP address in a preset storage area of the client according to the domain name address information, and the domain name address information and the IP address establish a mapping relation in advance and are stored in the preset storage area of the client; a sending module, configured to send the resource information acquisition request carrying the domain name address information to a server corresponding to the IP address; and the receiving module is used for receiving resource information which is returned by the server and corresponds to the domain name address information, and the resource information is obtained by the server according to the domain name address information.
In the resource obtaining device designed above, the client searches the IP address of the corresponding server in the preset storage area of the client through the domain name address information, and the corresponding server also searches the IP address of the resource storage server in the preset storage area of the client according to the domain name address information carried in the resource obtaining request sent by the client, so as to obtain the corresponding resource information, when the IP address of the server changes or increases the IP address of the server, the purpose can be achieved by correspondingly modifying or increasing the IP address in the preset storage area corresponding to the domain name address information, and the modification of the mapping relation in the preset storage area is less difficult than the modification of the IP in the code, thereby solving the problems of high technical requirements and inconvenience when the IP address changes or the IP address needs to be increased in the IP address resolution of the traditional DNS server.
In an optional implementation manner of the third aspect, the sending module is further configured to send domain name address information to a domain name resolution server; the judging module is used for judging whether analysis failure information returned by the domain name server is received or not; and the execution module is used for executing the step of searching the corresponding IP address in the preset storage area of the client according to the domain name address information.
In a fourth aspect, an embodiment provides a resource obtaining apparatus, which is applied to a server, and the apparatus includes: the system comprises an acquisition module, a resource acquisition module and a resource management module, wherein the acquisition module is used for acquiring a resource acquisition request which is sent by a client and carries domain name address information; the searching module is used for searching the IP address of the storage server of the resource information in a preset storage area of the server according to the domain name address information; the calling module is used for calling the corresponding resource information in the storage server according to the IP address; and the sending module is used for sending the resource information to the client.
In the resource obtaining device designed above, the client searches the IP address of the corresponding server in the preset storage area of the client through the domain name address information, and the corresponding server also searches the IP address of the resource storage server in the preset storage area of the client according to the domain name address information carried in the resource obtaining request sent by the client, so as to obtain the corresponding resource information, when the IP address of the server changes or increases the IP address of the server, the purpose can be achieved by correspondingly modifying or increasing the IP address in the preset storage area corresponding to the domain name address information, and the modification of the mapping relation in the preset storage area is less difficult than the modification of the IP in the code, thereby solving the problems of high technical requirements and inconvenience when the IP address changes or the IP address needs to be increased in the IP address resolution of the traditional DNS server.
In an optional implementation of the fourth aspect, the obtaining module is further configured to obtain the domain name address information and an IP address of a storage server of resource information corresponding to the domain name address information; and the associated storage module is used for associating and storing the domain name address information and the IP address of the storage server of the resource information corresponding to the domain name address information in a preset storage area of the server.
In a fifth aspect, an embodiment provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor executes the computer program to perform the method in the first aspect, any optional implementation manner of the first aspect, and any optional implementation manner of the second aspect.
In a sixth aspect, embodiments provide a non-transitory readable storage medium on which a computer program is stored, the computer program, when executed by a processor, performing the method of the first aspect, any optional implementation of the first aspect, the second aspect, or any optional implementation of the second aspect.
In a seventh aspect, an embodiment provides a computer program product, which when run on a computer, causes the computer to execute the method in the first aspect, any optional implementation manner of the first aspect, and any optional implementation manner of the second aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a first flowchart of a resource acquisition method according to a first embodiment of the present application;
fig. 2 is a second flowchart of a resource obtaining method according to a first embodiment of the present application;
fig. 3 is a third flowchart of a resource obtaining method according to the first embodiment of the present application;
fig. 4 is a fourth flowchart of a resource obtaining method according to the first embodiment of the present application;
fig. 5 is a fifth flowchart of a resource obtaining method according to the first embodiment of the present application;
fig. 6 is a structural diagram of a resource acquisition apparatus according to a second embodiment of the present application;
fig. 7 is a structural diagram of a resource acquisition device according to a third embodiment of the present application;
fig. 8 is a block diagram of an electronic device according to a fourth embodiment of the present application.
Icon: 200-an obtaining module; 202-a lookup module; 204-a sending module; 206-a receiving module; 208-a judgment module; 210-an execution module; 300-an acquisition module; 302-a lookup module; 304-a sending module; 306-an associative memory module; 4-an electronic device; 401-a processor; 402-a memory; 403-communication bus.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
First embodiment
As shown in fig. 1, an embodiment of the present application provides a resource obtaining method, which is a resource obtaining interaction process between a client and a server, and the method specifically includes the following steps:
step S100: the client acquires domain name address information input by a user.
Step S102: and the client searches a corresponding IP address in a preset storage area of the client according to the domain name address information.
Step S104: and the client sends a resource information acquisition request carrying the domain name address information to the server corresponding to the IP address.
Step S106: and the server searches the IP address of the storage server of the resource information in a preset storage area of the server according to the domain name address information in the resource information acquisition request.
Step S108: and the server acquires the corresponding resource information in the storage server according to the IP address of the storage server.
Step S110: the server sends the resource information to the client.
In step S100, the client may access a browser or other access application used by the website or domain name address on behalf of the user; the client acquires domain name address information input by a user in response to a user input operation, which may be understood as that the user inputs domain name address information corresponding to a website address that the user wants to access on the client, for example, the user inputs domain name address information tx-minglue-0 in a certain browser of a computer. After the client acquires the domain name address information input by the user, step S102 is executed.
In step S102, the preset storage area may be a Hosts file in the terminal device corresponding to the client, or may be another storage file; the client searches the corresponding IP address in the Hosts file of the preset storage area of the client according to the domain name address information, and the domain name address information and the corresponding IP address can establish a mapping relation in advance and write the mapping relation into the preset storage area of the terminal equipment corresponding to the client, so that the client can search the IP address which is stored in advance and has the mapping relation in the preset storage area of the client according to the domain name address information. For example, a mapping relationship between tx-minimum-0 in the domain name address information and the IP address 192.168.37.24 is established in advance in a preset storage region of the terminal device corresponding to the client, and the client acquires domain name address information tx-minimum-0 input by the user, that is, the client can find the corresponding IP address 192.168.37.24 in the preset storage region according to the domain name address information. After the client finds the corresponding IP address in step S102, step S104 is performed.
In step S104, the client sends a resource obtaining request to the server corresponding to the found IP address according to the found IP address, where the resource obtaining request carries the domain name address information. The Resource obtaining request may be a Uniform Resource Locator (URL) request, where the URL request carries the domain name address information. For example, the URL sent by the client is http:// tx-minvalue-0. After the client sends the resource obtaining request to the server corresponding to the IP address, the corresponding server receives the resource obtaining request, and after the server receives the resource obtaining request, step S106 is executed.
In step S106, after receiving the resource obtaining request, the server searches an IP address of a storage server of the resource information in a preset storage area of the server according to domain name address information in the resource obtaining request, where the preset storage area may be a Hosts file of the server or other storage files; the searching mode in the preset storage area according to the domain name address information is consistent with the searching mode of the client, and is not described herein again. In addition, it should be noted here that the IP address of the searched storage server may be the IP address of the server, or may be the IP address of another server different from the server; when the IP address of the storage server is the IP address of the server, it indicates that the resource information is stored in the server, for example, the IP address found by the server in the preset storage area according to tx-minglue-0 in the domain name address information is 192.168.37.24, which is the same as the IP address found by the client, which indicates that the resource information is stored in the server; if the searched IP address is 192.168.37.32, the IP address is different from the IP address searched by the client, and the resource information is stored in other servers. After the server finds the IP address of the storage server of the resource information, step S108 is performed.
In step S108, the server obtains the corresponding resource information in the storage server according to the IP address of the storage server, where the obtaining mode may specifically be that the server sends a corresponding resource information obtaining request to the storage server according to the IP address of the storage server, and then the storage server sends the corresponding resource information to the server; the resource information corresponding to the storage server can be directly called for the server through a back-end service interface to obtain the resource information. After the server acquires the corresponding resource information in the storage server, step S110 is executed, and the server returns the acquired resource information to the client, so that the client displays the resource information in the corresponding browser after receiving the resource information returned by the server, for example, the resource information may be a picture, a character, and the like, and finally performs corresponding display in the browser corresponding to the client.
In the above designed resource obtaining method, the client searches the IP address of the corresponding server in the preset storage area of the client through the domain name address information, and the corresponding server also searches the IP address of the resource storage server in the preset storage area of the client according to the domain name address information carried in the resource obtaining request sent by the client, so as to obtain the corresponding resource information, when the IP address of the server changes or the IP address of the server is increased, the purpose can be achieved by correspondingly modifying or increasing the IP address in the preset storage area corresponding to the domain name address information, and the modification of the mapping relation in the preset storage area is less difficult than the modification of the IP in the code, thereby solving the problems of high technical requirements and inconvenience when the IP address is changed or the IP address needs to be increased in the conventional DNS server for IP address resolution.
In an optional implementation manner of this embodiment, before the step S102, the client searches for a corresponding IP address in a preset storage area of the client according to the domain name address information, as shown in fig. 2, the method further includes:
step S1010: the client sends the domain name address information to a domain name resolution server.
Step S1012: the client determines whether the analysis failure information returned by the domain name server is received, and if so, the process goes to step S102.
In the above steps, before the client searches the corresponding IP address in the preset storage area, the client may also send the domain name address information to the domain name resolution server, and the domain name resolution server may search whether there is a corresponding matching relationship in the corresponding database, and if not, return the information of failed resolution to the client. Therefore, in step S1012, the client determines whether the analysis failure information returned by the domain name server is received, and if the analysis failure information returned by the domain name server is received, it indicates that the domain name server cannot be analyzed, at this time, step S102 is executed to search for a corresponding IP address in a preset storage area of the client according to the domain name address information. After the client determines that the resolution failure information returned by the domain name server is received in step S1012, determining whether to execute step S102 may be performed through a user operation. For example, after the client receives the analysis failure information returned by the domain name server, the analysis failure information may display a prompt box on the client, and if the user intends to continue the search (for example, if the prompt box further has a search continuation button for sending a search continuation instruction to the client after the client clicks), the client may search in a preset storage area of the terminal device itself at this time.
In an optional implementation manner of this embodiment, the domain name address information may include a plurality of characteristic character strings, and on this basis, in step S106, the server searches an IP address of a storage server of the resource information in a preset storage area of the server according to the domain name address information in the resource information acquisition request, as shown in fig. 3, specifically, the IP address may be:
step S1060: the server determines whether the plurality of characteristic character strings of the domain name address information have a preset characteristic character string, and if yes, the process goes to step S1062.
Step S1062: and the server searches the IP address of the storage server of the resource information in a preset storage area of the server according to the preset characteristic character string.
In step S1060, after the server acquires the resource acquisition request sent by the client, the domain name address information in the resource acquisition request is extracted, and whether a plurality of character strings in the domain name address information have a preset characteristic character string is determined. For example, according to the foregoing example, the resource obtaining request sent by the client is http:// tx-minvalue-0; and when the server identifies that the plurality of characteristic character strings of the domain name address information have the preset character string, searching the IP address of the storage server of the resource information in the preset storage area of the server according to the preset character string.
On the basis of the above scheme, the step S108 server obtains the corresponding resource information in the storage server according to the IP address of the storage server, as shown in fig. 4, specifically, the resource information may be:
step S1080: and replacing the preset characteristic character string in the domain name address information with the IP address of the storage server to form new domain name address information.
Step S1082: and sending a resource acquisition request to the storage server, wherein the resource acquisition request carries new domain name address information.
Step S1084: and receiving the resource information returned by the storage server and sending the resource information to the client.
In the above steps S1080 to S184, the server replaces the preset characteristic character string in the domain name address information with the found IP address of the storage server, so as to form new domain name address information, which can also be understood as a new resource acquisition request, and sends the new resource acquisition request to the storage server through the IP address of the storage server, so as to obtain the corresponding resource information returned by the storage server. Assuming that the searched IP address is 192.168.37.32, after the preset feature string tx-minvalue-0 is replaced, the resource acquisition request is changed to http:// 192.168.37.32/getList, and then the resource acquisition request http:// 192.168.37.32. The resource information corresponding to each domain name address information in the storage server is configured in advance, for example, which pictures and which characters need to be displayed at the client specifically according to the domain name tx-minglue-0. After the new resource acquisition request is obtained, the resource information configured in advance is found through the new domain name address information, and then the resource information is returned to the server and returned to the client by the server, so that the client displays the resource information.
In an optional implementation manner of this embodiment, before the step S100 of obtaining, by the client, domain name address information input by the user, that is, at the time of initialization, as shown in fig. 5, the method further includes:
step S90: the client acquires domain name address information and the IP address of the server; the server acquires domain name address information and an IP address of a storage server of resource information corresponding to the domain name address information.
Step S92: associating and storing the domain name address information and the IP address of the server in a preset storage area of the client; and associating the domain name address information and the IP address of the storage server of the resource information corresponding to the domain name address information and storing the IP address in a preset storage area of the server.
The steps are a pre-deployment process, after the domain name address information to be set and the server IP corresponding to the domain name address information are known, a mapping relation is established and stored in a preset storage area. According to the method, in the server deployment process, when deployment personnel deploy on site, only the actual IP address of the current deployment machine needs to be checked, then the preset storage area of the machine is modified, the domain name address information and the actual IP address form a mapping relation and then are added to the preset storage area for storage, and then service is started, so that automatic resolution of the IP address can be realized, and the mapping relation is added in the preset storage area only by a primary engineer, so that the method is not high in professional ability requirement, simple and convenient; when a plurality of servers are required to be deployed, particularly when the servers in different places are deployed, basic deployment personnel can be trained, and the servers can be deployed by executing the operation on each machine.
Second embodiment
Fig. 6 shows a schematic structural block diagram of a resource obtaining apparatus provided in the present application, and it should be understood that the apparatus corresponds to the method embodiments executed by the client in fig. 1 to fig. 5, and is capable of executing the steps involved in the method executed by the client in the first embodiment, and specific functions of the apparatus may be referred to the above description, and in order to avoid repetition, detailed description is appropriately omitted here. The device includes at least one software function that can be stored in memory in the form of software or firmware (firmware) or solidified in the Operating System (OS) of the device. Specifically, the apparatus includes: an obtaining module 200, configured to obtain domain name address information input by a user; the searching module 202 is configured to search a corresponding IP address in a preset storage area of the client according to the domain name address information, where the domain name address information and the IP address establish a mapping relationship in advance and are stored in the preset storage area of the client; a sending module 204, configured to send a resource information obtaining request carrying domain name address information to a server corresponding to the IP address; the receiving module 206 is configured to receive resource information corresponding to the domain name address information returned by the server, where the resource information is obtained by querying the server according to the domain name address information.
In the resource obtaining device designed above, the client searches the IP address of the corresponding server in the preset storage area of the client through the domain name address information, and the corresponding server also searches the IP address of the resource storage server in the preset storage area of the client according to the domain name address information carried in the resource obtaining request sent by the client, so as to obtain the corresponding resource information, when the IP address of the server changes or increases the IP address of the server, the purpose can be achieved by correspondingly modifying or increasing the IP address in the preset storage area corresponding to the domain name address information, and the modification of the mapping relation in the preset storage area is less difficult than the modification of the IP in the code, thereby solving the problems of high technical requirements and inconvenience when the IP address changes or the IP address needs to be increased in the IP address resolution of the traditional DNS server.
In an optional implementation manner of this embodiment, the sending module 204 is further configured to send the domain name address information to a domain name resolution server; the judging module 208 is configured to judge whether resolution failure information returned by the domain name server is received; the executing module 210 is configured to execute a step of searching for a corresponding IP address in a preset storage area of the client according to the domain name address information.
Third embodiment
Fig. 7 shows a schematic structural block diagram of a resource acquisition apparatus provided in the present application, and it should be understood that the apparatus corresponds to the above-mentioned method embodiments executed by the server in fig. 1 to 5, and is capable of executing the steps involved in the method executed by the server in the first embodiment, and specific functions of the apparatus may be referred to the above description, and in order to avoid repetition, detailed description is appropriately omitted here. The device includes at least one software functional module that can be stored in memory in the form of software or firmware (firmware) or solidified in the Operating System (OS) of the device. Specifically, the apparatus includes: an obtaining module 300, configured to obtain a resource obtaining request carrying domain name address information sent by a client; the searching module 302 is configured to search, according to the domain name address information, an IP address of a storage server of the resource information in a preset storage area of the server; the obtaining module 300 is further configured to obtain corresponding resource information in the storage server according to the IP address; a sending module 304, configured to send the resource information to the client.
In the resource obtaining device designed above, the client searches the IP address of the corresponding server in the preset storage area of the client through the domain name address information, and the corresponding server also searches the IP address of the resource storage server in the preset storage area of the client according to the domain name address information carried in the resource obtaining request sent by the client, so as to obtain the corresponding resource information, when the IP address of the server changes or increases the IP address of the server, the purpose can be achieved by correspondingly modifying or increasing the IP address in the preset storage area corresponding to the domain name address information, and the modification of the mapping relation in the preset storage area is less difficult than the modification of the IP in the code, thereby solving the problems of high technical requirements and inconvenience when the IP address changes or the IP address needs to be increased in the IP address resolution of the traditional DNS server.
In an optional implementation manner of this embodiment, the domain name address information includes a plurality of characteristic character strings, and the searching module 302 is specifically configured to determine whether the plurality of characteristic character strings of the domain name address information have a preset characteristic character string; and if so, searching the IP address of the storage server of the resource information in a preset storage area of the server according to the preset characteristic character string.
In an optional implementation manner of this embodiment, the obtaining module 300 is specifically configured to replace a preset feature character string in the domain name address information with an IP address of a storage server to form new domain name address information; sending a resource acquisition request to a storage server, wherein the resource acquisition request carries new domain name address information; and receiving the resource information returned by the storage server and sending the resource information to the client.
In an optional implementation manner of this embodiment, the obtaining module 300 is configured to obtain domain name address information and an IP address of a storage server of resource information corresponding to the domain name address information; and the associated storage module 306 is configured to associate and store the domain name address information and the IP address of the storage server of the resource information corresponding to the domain name address information in a preset storage area of the server.
Fourth embodiment
As shown in fig. 8, the present application provides an electronic device 4 including: a processor 401 and a memory 402, the processor 401 and the memory 402 being interconnected and communicating with each other through a communication bus 403 and/or other form of connection mechanism (not shown), the memory 402 storing a computer program executable by the processor 401, when the computing device is running, the processor 401 executing the computer program to execute the method in the first embodiment or any alternative implementation manner of the first embodiment, for example, the step S100 to the step S110, the client obtains domain name address information input by the user: the client searches a corresponding IP address in a preset storage area of the client according to the domain name address information; the client sends a resource information acquisition request carrying the domain name address information to a server corresponding to the IP address; the server searches the IP address of the storage server of the resource information in a preset storage area of the server according to the domain name address information in the resource information acquisition request; the server acquires corresponding resource information in the storage server according to the IP address of the storage server; the server sends the resource information to the client.
The present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the first embodiment, any of the alternative implementations of the first embodiment.
The storage medium may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
The present application provides a computer program product, which when run on a computer causes the computer to execute the method of the first embodiment or any alternative implementation of the first embodiment.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
It should be noted that the functions, if implemented in the form of software functional modules and sold or used as independent products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A resource acquisition method is applied to a client, and comprises the following steps:
acquiring domain name address information input by a user;
searching a corresponding IP address in a preset storage area of the client according to the domain name address information, wherein a mapping relation is pre-established between the domain name address information and the IP address and is stored in the preset storage area of the client;
sending a resource information acquisition request carrying the domain name address information to a server corresponding to the IP address;
and receiving resource information which is returned by the server and corresponds to the domain name address information, wherein the resource information is obtained by searching the IP address of a storage server of the corresponding resource information in a preset storage area of the server end according to the domain name address information and inquiring from the storage server of the resource information, and the domain name address information and the IP address of the storage server of the resource information establish a mapping relation in advance and are stored in the preset storage area of the server.
2. The method according to claim 1, wherein before the searching for the corresponding IP address in the preset storage area of the client according to the domain name address information, the method further comprises:
sending the domain name address information to a domain name server;
judging whether analysis failure information returned by the domain name server is received or not;
and if so, executing the step of searching the corresponding IP address in a preset storage area of the client according to the domain name address information.
3. A resource acquisition method is applied to a server, and comprises the following steps:
acquiring a resource acquisition request which is sent by a client and carries domain name address information;
searching an IP address of a storage server of the resource information in a preset storage area of the server according to the domain name address information;
and acquiring corresponding resource information in the storage server according to the IP address and sending the resource information to the client.
4. The method according to claim 3, wherein the domain name address information includes a plurality of characteristic strings, and the searching for the IP address of the storage server of the resource information in the preset storage area of the server according to the domain name address information includes:
judging whether a plurality of characteristic character strings of the domain name address information have preset characteristic character strings or not;
and if so, searching the IP address of the storage server of the resource information in a preset storage area of the server according to the preset characteristic character string.
5. The method of claim 4, wherein the obtaining the corresponding resource information in the storage server according to the IP address and sending the resource information to the client comprises:
replacing the preset characteristic character string in the domain name address information with the IP address of the storage server to form new domain name address information;
sending a resource acquisition request to the storage server, wherein the resource acquisition request carries the new domain name address information;
and receiving the resource information returned by the storage server and sending the resource information to the client.
6. The method according to claim 3, wherein before the resource obtaining request carrying domain name address information sent by the obtaining client, the method further comprises:
acquiring the domain name address information and the IP address of a storage server of the resource information corresponding to the domain name address information;
and associating the domain name address information and the IP address of the storage server of the resource information corresponding to the domain name address information and storing the IP address in a preset storage area of the server.
7. A resource acquisition device applied to a client, the device comprising:
the acquisition module is used for acquiring domain name address information input by a user;
the searching module is used for searching a corresponding IP address in a preset storage area of the client according to the domain name address information, and the domain name address information and the IP address establish a mapping relation in advance and are stored in the preset storage area of the client;
a sending module, configured to send a resource information acquisition request carrying the domain name address information to a server corresponding to the IP address;
and the receiving module is used for receiving resource information which is returned by the server and corresponds to the domain name address information, and the resource information is obtained by the server according to the domain name address information.
8. A resource acquisition device applied to a server, the device comprising:
the acquisition module is used for acquiring a resource acquisition request which is sent by a client and carries domain name address information;
the searching module is used for searching the IP address of the storage server of the resource information in a preset storage area of the server according to the domain name address information;
the acquisition module is further configured to acquire corresponding resource information in the storage server according to the IP address;
and the sending module is used for sending the resource information to the client.
9. An electronic device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the method of any one of claims 1 to 5 when executing the computer program.
10. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1 to 5.
CN201911305514.7A 2019-12-17 2019-12-17 Resource acquisition method and device, electronic equipment and storage medium Active CN111147616B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911305514.7A CN111147616B (en) 2019-12-17 2019-12-17 Resource acquisition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911305514.7A CN111147616B (en) 2019-12-17 2019-12-17 Resource acquisition method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111147616A CN111147616A (en) 2020-05-12
CN111147616B true CN111147616B (en) 2022-10-25

Family

ID=70518684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911305514.7A Active CN111147616B (en) 2019-12-17 2019-12-17 Resource acquisition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111147616B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111988298B (en) * 2020-08-13 2023-05-30 山东伏羲智库互联网研究院 Data processing method, device and equipment
CN113691646A (en) * 2021-08-18 2021-11-23 北京天融信网络安全技术有限公司 Domain name service resource access method, device, electronic equipment and medium
CN113760931B (en) * 2021-08-20 2023-12-29 济南浪潮数据技术有限公司 Resource information access method, device, equipment and medium
CN113709231B (en) * 2021-08-24 2024-02-20 广州文远知行科技有限公司 Data packet loading method, client, server, equipment and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7058633B1 (en) * 2002-09-09 2006-06-06 Cisco Technology, Inc. System and method for generalized URL-rewriting
JP5135165B2 (en) * 2008-10-24 2013-01-30 Kddi株式会社 Content server system, content server, and client computer
CN101771694B (en) * 2010-01-12 2012-12-26 深圳市五巨科技有限公司 Method for ensuring successful webpage browsing at client side and device therefor
CN103389983B (en) * 2012-05-08 2016-12-14 阿里巴巴集团控股有限公司 A kind of capturing webpage contents method and device for network crawler system
CN104754073A (en) * 2015-03-25 2015-07-01 百度在线网络技术(北京)有限公司 Resource access method and device
CN106302842B (en) * 2015-05-21 2020-02-18 阿里巴巴集团控股有限公司 Domain name resolution method, device and system
JPWO2017188036A1 (en) * 2016-04-27 2019-03-07 日本電気株式会社 ACCESS CONTROL DEVICE, ACCESS CONTROL SYSTEM, ACCESS CONTROL METHOD, AND ACCESS CONTROL PROGRAM
CN106790749A (en) * 2016-12-13 2017-05-31 小咖秀(北京)科技有限公司 A kind of method that optimizing field name resolution speed is updated based on hosts
WO2019028683A1 (en) * 2017-08-08 2019-02-14 深圳前海达闼云端智能科技有限公司 Method and system for acquiring and collecting client local dns server

Also Published As

Publication number Publication date
CN111147616A (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN111147616B (en) Resource acquisition method and device, electronic equipment and storage medium
US10412176B2 (en) Website access method, apparatus, and website system
CN102333122B (en) Downloaded resource provision method, device and system
US10740299B2 (en) Systems and methods for providing continuing access to a remote computer program
US20160057205A1 (en) Application sharing method and apparatus
TWI506553B (en) Method and system for automatic detecting and resolving apis
EP2800343A1 (en) Message processing method, device and system
US8135764B2 (en) Configuration management server, name recognition method and name recognition program
US20070083485A1 (en) File server, file providing method and recording medium
CN110677492B (en) Access request processing method and device, electronic equipment and storage medium
CN111143723A (en) Page jump method and device, electronic equipment and storage medium
CN108256014B (en) Page display method and device
US20150127838A1 (en) Page Operation Processing Method and Apparatus, and Terminal
CN108959384B (en) Webpage data acquisition method and device, computer equipment and storage medium
CN109768980B (en) Server access method, device, mobile terminal and computer readable storage medium
CN111199001A (en) Resource overloading compatibility processing method and system for browser
CN112506670A (en) Multi-node automatic operation and maintenance task processing method, system and storage medium
CN111083054A (en) Route configuration processing method and device, computer equipment and storage medium
WO2014121629A1 (en) Method and system for displaying literal contents, mobile terminal, cloud typesetting server, and storage medium
CN112565238A (en) Method for popping privacy policy, client and computer-readable storage medium
CN110213211B (en) Method, device, terminal and storage medium for identifying secure download link
CN110635958B (en) Network fault diagnosis method, device and storage medium
US8717611B2 (en) Image processing apparatus that updates a message on a server after an image is edited, the server providing a microblogging function
CN111104415A (en) Time zone updating method, time zone updating device, electronic equipment and storage medium
CN112925998B (en) Interface data processing method, device and system, electronic equipment and storage medium

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