WO2021120977A1 - Server, data processing method and medium - Google Patents

Server, data processing method and medium Download PDF

Info

Publication number
WO2021120977A1
WO2021120977A1 PCT/CN2020/130190 CN2020130190W WO2021120977A1 WO 2021120977 A1 WO2021120977 A1 WO 2021120977A1 CN 2020130190 W CN2020130190 W CN 2020130190W WO 2021120977 A1 WO2021120977 A1 WO 2021120977A1
Authority
WO
WIPO (PCT)
Prior art keywords
resolution
domain name
server
result
sent
Prior art date
Application number
PCT/CN2020/130190
Other languages
French (fr)
Chinese (zh)
Inventor
刘云冲
矫恒浩
马忠飞
赵贝
张宏波
Original Assignee
聚好看科技股份有限公司
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 聚好看科技股份有限公司 filed Critical 聚好看科技股份有限公司
Publication of WO2021120977A1 publication Critical patent/WO2021120977A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]

Definitions

  • This application relates to the field of computer communication, and in particular to a server, a data processing method and a medium.
  • the DNS server saves the corresponding relationship between the resolution result such as the IP address and the domain name. According to the corresponding relationship between the resolution result and the domain name, the target resolution result corresponding to the domain name carried in the received resolution request can be determined, so that the target The analysis result is fed back to the user's smart device.
  • Figure 1 is a schematic diagram of a scenario where an existing server processes a domain name.
  • the user’s smart device initiates a resolution request to a server provided by the network operator or other public servers, for example, a resolution request for querying the IP address of www.example.com.
  • the server obtains The domain name carried in the resolution request is queried according to the domain name whether the resolution result corresponding to the domain name is stored.
  • the server sends the obtained resolution result to the smart device; otherwise, it forwards the resolution request to other pre-configured servers, such as a recursive DNS server, Iteratively forwards to the root server through other DNS servers, and iteratively forwards to authoritative servers at all levels through other DNS servers to obtain the resolution results of the domain name carried in the resolution request by other servers, and send the obtained resolution results to the smart device and locally
  • the domain name and its corresponding resolution result are cached, so that when a resolution request carrying the domain name is received again later, the cached resolution result corresponding to the domain name can be directly sent to the smart device to improve the response efficiency of the smart device.
  • the server determines that the resolution result corresponding to the domain name exceeds After the validity period, the resolution result corresponding to the domain name will be deemed invalid, and the resolution result corresponding to the domain name needs to be queried from other servers, and the resolution result corresponding to the domain name sent by other servers is sent to the smart device.
  • TTL validity period
  • the server when the resolution result corresponding to a certain domain name cached by the server expires, and other servers fail, the server will not be able to obtain the resolution results of the domain name fed back by other servers in time, and has been waiting for feedback from other servers. As a result of the resolution of the domain name, the server cannot respond to the resolution request in a timely manner, which reduces the server’s response efficiency and user experience.
  • This application provides a server, a data processing method, and a medium to solve the problem that the existing server cannot respond to the analysis request in a timely manner, which reduces the response efficiency of the server and the user experience.
  • this application provides a data processing method, which includes:
  • this application provides a server, and the server includes:
  • a communicator which is used to establish a communication connection with other servers
  • the controller the controller is used to execute:
  • this application provides a data processing device, the device including:
  • the receiving unit is configured to receive the first resolution request, and obtain the domain name information carried in the first resolution request;
  • a first processing unit configured to determine that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has expired, then forward the first resolution request to other servers;
  • the second processing unit is configured to determine that the resolution result of the domain name sent by the other server is not received within a preset first time period, and send the target resolution result.
  • the present application provides a computer-readable storage medium that stores a computer program that, when executed by a processor, implements the steps of the data processing method described above.
  • the server determines that the target resolution result corresponding to the domain name carried in the received first resolution request is cached locally, and determines that the validity period corresponding to the target resolution result has expired , First forward the received first resolution request to other servers, and when it is determined that the resolution result of the domain name sent by other servers is not received within the preset first time period, the cached target resolution result is sent first to avoid waiting all the time It takes time for other servers to send the resolution result of the domain name, and realizes that the first resolution request can be responded to in time within the preset first time period, which improves the response efficiency of the server and the user experience.
  • Figure 1 is a schematic diagram of a scenario where an existing server processes a domain name
  • Figure 2 is a schematic diagram of a data processing process provided by some embodiments of the present application.
  • Figure 3 is a schematic diagram of an existing data processing flow
  • FIG. 4 is a schematic diagram of a specific data processing flow provided by some embodiments of the application.
  • FIG. 5 is a schematic structural diagram of a server provided by some embodiments of this application.
  • FIG. 6 is a schematic structural diagram of a data processing device provided by some embodiments of this application.
  • this application provides a server, a data processing method, and a medium.
  • the user's smart device initiates a resolution request to a server provided by the network operator or other public servers, for example, a resolution request to query the IP address of www.example.com.
  • the server receives the resolution request for resolving a certain domain name sent by the smart device, it performs corresponding processing on the resolution request, and obtains the domain name information carried in the resolution request.
  • the server pre-caches the resolution results corresponding to some domain names and their corresponding expiration dates. After obtaining the resolution results in the resolution request, the domain name is resolved with the cached ones. The domain name of the result is matched.
  • Fig. 2 is a schematic diagram of a data processing process provided by some embodiments of the present application, and the process includes:
  • S201 Receive a first resolution request, and obtain domain name information carried in the first resolution request.
  • the data processing method provided in this application is applied to the server.
  • the smart device After receiving the domain name input by the user, the smart device generates a corresponding first resolution request according to the domain name, and sends the generated first resolution request to a server provided by the network operator or other public servers. After receiving the first resolution request, the subsequent server obtains the domain name information carried in the first resolution request through corresponding processing. Then, based on the data processing method provided in this application, corresponding processing is performed on the information of the domain name, so as to realize the response to the first resolution request.
  • the first analysis request received by the server may be an analysis request sent by a smart device, or may be an analysis request sent by a smart device forwarded by a lower-level server.
  • S202 Determine that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has expired, then forward the first resolution request to another server.
  • S203 Determine that the resolution result of the domain name sent by the other server is not received within a preset first time period, and send the target resolution result.
  • the server can cache the received resolution results of a certain domain name sent by other servers, so that the second resolution carrying the domain name can be subsequently received again.
  • the server can cache the received resolution results of a certain domain name sent by other servers, so that the second resolution carrying the domain name can be subsequently received again.
  • the server In order that the server can no longer continue to send the locally cached target resolution result corresponding to the domain name when the resolution result of a certain domain name changes, that is, send the wrong resolution result, which affects the subsequent business access of the smart device, other servers are giving When the server sends the resolution result of any domain name, it will also send the validity period corresponding to the resolution result.
  • the server After the server receives the resolution result of the domain name and the validity period corresponding to the resolution result, it caches the resolution result of the domain name, the time when the resolution result is received, and the validity period corresponding to the resolution result, and requests the resolution of the domain name on the subsequent smart device As a result, according to the time when the resolution request is received and the validity period corresponding to the resolution result, determine whether the validity period corresponding to the resolution result of the domain name has expired, so that it can be forwarded to other servers when the validity period corresponding to the resolution result has expired The received first resolution request is used to update the locally cached resolution result corresponding to the domain name according to the resolution result of the domain name sent by other servers.
  • the method of determining whether the validity period corresponding to the resolution result of the domain name has expired according to the time when the resolution request is received and the validity period corresponding to the resolution result includes:
  • Method 1 Start timing when receiving the analysis result. Subsequently, it is determined whether the time period recorded by the timer when the resolution request is received is greater than the validity period corresponding to the resolution result, and it is determined whether the validity period corresponding to the resolution result of the domain name expires. If it is greater than, it is determined that the validity period corresponding to the resolution result of the domain name has expired; otherwise, it is determined that the validity period corresponding to the resolution result of the domain name has not expired.
  • Method 2 When receiving the analysis result, count down from the validity period corresponding to the analysis result. It is subsequently determined whether the remaining time recorded by the timer is 0 when the resolution request is received, and it is determined whether the validity period corresponding to the resolution result of the domain name has expired. If so, it is determined that the validity period corresponding to the resolution result of the domain name has expired; otherwise, it is determined that the validity period corresponding to the resolution result of the domain name has not expired.
  • Method 3 When the analysis result is received, the valid time range is determined according to the current time when the analysis result is received and the validity period corresponding to the analysis result. Subsequently, it is determined whether the time when the resolution request is received is within the valid time range, and it is determined whether the validity period corresponding to the resolution result of the domain name has expired. If so, it is determined that the validity period corresponding to the resolution result of the domain name has expired; otherwise, it is determined that the validity period corresponding to the resolution result of the domain name has not expired.
  • the domain name is matched with the domain name for which the resolution result has been cached.
  • Domain name determine whether the validity period corresponding to the target resolution result corresponding to the matched domain name has expired, if it is determined that the validity period corresponding to the target resolution result has expired, send the target resolution result, and forward the first resolution request to Other servers update the current locally cached target resolution result and the validity period corresponding to the target resolution result.
  • the server can respond to the user's first resolution request in time, and in most cases, the target resolution result cached locally by the server is also correct, but once the resolution result of a certain domain name changes, and When other servers can respond normally, the server directly sends the locally cached target resolution result corresponding to the domain name, which will cause the smart device to perform subsequent business processing according to the target resolution result, which affects the user's subsequent business access.
  • the target analysis result is sent first.
  • the target resolution result is sent to the smart device;
  • the result is forwarded by the lower-level server, and when it is determined that the resolution result of the domain name sent by the other server is not received within the preset first time period, the target resolution result is sent to the lower-level server.
  • the first resolution request is sent by a smart device, it is determined that the resolution result of the domain name sent by the other server is received within the preset first time period, and the resolution result of the domain name is sent to the smart device;
  • the resolution result is forwarded by the lower-level server, and when it is determined that the resolution result of the domain name sent by the other server is received within the preset first time period, the resolution result of the domain name is sent to the lower-level server.
  • the first duration when setting the first duration, it can be determined based on experience, or it can be set to a different value according to different scenarios. If you want to ensure the efficiency of the server in responding to the first resolution request, you can set the preset first time length to be shorter. If you want to avoid that the first time length is set too short, the domain name resolution results normally sent by other servers cannot be sent. , You can set the preset first duration longer. Preferably, it can be set according to the statistics of the duration of normal interaction between each other server and the server.
  • the server determines that the target resolution result corresponding to the domain name carried in the received first resolution request is cached locally, and determines that the validity period corresponding to the target resolution result has expired , First forward the received first resolution request to other servers, and when it is determined that the resolution result of the domain name sent by other servers is not received within the preset first time period, the cached target resolution result is sent first to avoid waiting all the time It takes time for other servers to send the resolution result of the domain name, and realizes that the first resolution request can be responded to in time within the preset first time period, which improves the response efficiency of the server and the user experience.
  • determining that the domain name resolution result sent by the other server is not received within the preset first time period includes:
  • the response information sent by the other server is not received within the preset first time period, and the response information is success response information or failure response information, wherein the success response information carries the resolution of the domain name result.
  • network delays, other server failures, etc. may occur, so that the server cannot receive the domain name resolution results sent by other servers within the preset first time period.
  • a network delay occurs, it may cause communication delays between other servers and servers, so that the server cannot receive the domain name resolution results sent by other servers within the preset first time period; when a network failure occurs, It will make it impossible to establish a communication connection between other servers and the server, so that the server cannot receive the resolution results of the domain name sent by other servers within the preset first time period; when other servers fail, the server may not be able to It is assumed that within the first time period, the resolution result of the domain name sent by other servers or the failure response information sent by other servers, such as SERVFAIL, REFUSED, etc., are received. Based on this, in this application, the server determines that the domain name resolution result sent by other servers is not received within the preset first time period, including the following situations:
  • the successful response message carries the resolution result of the domain name, such as NOERROR, NXDOMAIN, etc.
  • the server When based on the foregoing situation, it is determined that the resolution result of the domain name sent by other servers is not currently received within the preset first time period, the server directly sends the locally cached target resolution result.
  • the method further includes:
  • the server when other servers send the resolution result of the domain name to the server, they will generally also send the validity period corresponding to the resolution result to the server, so that the server can monitor the update time of the resolution result and request the domain name from other servers in time.
  • the resolution result is to update the locally cached target resolution result according to the resolution result of the domain name sent by other servers, so as to improve the accuracy of subsequent response to the resolution request of the domain name. Therefore, in this application, after receiving the resolution result corresponding to the domain name and the validity period corresponding to the resolution result, the target resolution result is updated according to the resolution result, and the validity period corresponding to the target resolution result is performed according to the validity period corresponding to the resolution result. Update.
  • the receiving the resolution result of the domain name sent by the other server includes:
  • the updating the target analysis result according to the analysis result includes:
  • the target analysis result is updated according to the analysis result, and the validity period corresponding to the target analysis result is updated according to the validity period corresponding to the analysis result.
  • the receiving the resolution result of the domain name sent by the other server includes:
  • a second duration is preset.
  • the server may determine whether the resolution result of the domain name sent by the other server is received within the second preset time period after it has not received the resolution result of the domain name sent by the other server within the preset first time period. If the resolution result of the domain name sent by another server is received within the second preset time period, the locally cached target resolution result is directly updated according to the received resolution result of the domain name.
  • the resolution result of the domain name sent by the other server is not received within the second preset time period , Then no longer wait for the resolution result sent by other servers to the domain name carried in the first resolution request that was forwarded last time, and forward the first resolution request to other servers at a preset time interval until it receives the name of the domain name sent by other servers.
  • the resolution result is to update the locally cached target resolution result according to the received resolution result of the domain name.
  • the method further includes:
  • the target resolution result is directly sent.
  • the server When the server receives the resolution result of the domain name sent by other servers, it also receives the validity period corresponding to the resolution result sent by other servers.
  • the server updates the locally cached target resolution result according to the received resolution result of the domain name. , And update the validity period corresponding to the locally cached target analysis result according to the validity period corresponding to the received analysis result.
  • the second duration when setting the second duration, it can be determined based on experience, or different values can be set according to different scenarios. If you want to reduce the time spent waiting for other servers to send the resolution results of the domain name, you can set the preset second duration to be shorter. If you want to reduce the number of frequent forwarding of the first resolution request to other servers, you can set this The preset second duration is set to be longer.
  • the third duration it can be determined based on experience, or it can be set to a different value according to different scenarios. If you have strict requirements on the resolution results of the domain name, you can set the preset third duration to be shorter. If you want to reduce the number of frequently forwarding second resolution requests to other servers, you can set the preset third duration Is longer.
  • time interval it can also be determined based on experience, or it can be set to different values according to different scenarios. If you want to obtain the resolution results of the domain name sent by other servers as soon as possible, you can set the time interval shorter. If you want to reduce the number of frequent forwarding of the first resolution request to other servers, you can set the time interval Is longer.
  • the server receives the resolution request for a certain domain name for the first time, and the server does not cache the target resolution result corresponding to the domain name locally, in order to respond to the resolution request sent by the smart device ,
  • the server needs to forward the resolution request to other servers to obtain the resolution result of the domain name carried in the resolution request sent by other servers, send the received resolution result of the domain name, and cache the domain name and its corresponding resolution result in local.
  • the server When the server receives the resolution result of the domain name sent by other servers, it also receives the validity period corresponding to the resolution result sent by other servers.
  • the server caches the domain name, the resolution result of the domain name, and the validity period corresponding to the resolution result in local.
  • the validity period of the domain name can be set shorter, so that the server can frequently update the target resolution result corresponding to a certain domain name in the local cache. ; If you want to effectively reduce the frequency of the server forwarding analysis requests to other servers, reduce the load when other servers process analysis requests, improve service performance, and process more resolution requests, you can set the domain name's validity period longer.
  • the server sends the target resolution result, it will also send the pre-configured time period to the receiving device (including smart devices and subordinates).
  • Server that is, the pre-configured time period is sent to the receiving device as the validity period corresponding to the target resolution result, so that the receiving device can perform the locally cached resolution result of the domain name according to the target resolution result and the pre-configured time period.
  • the validity period corresponding to the analysis result is updated.
  • the method for setting the pre-configured time period is the same as the method for setting the validity period described above, and the repetition will not be repeated.
  • the method further includes:
  • the server can directly send the target resolution result without requesting the domain name carried in the resolution request from other servers.
  • the analysis result of the local cache is updated according to the received analysis result.
  • FIG. 3 is a schematic diagram of an existing data processing flow, which includes:
  • S301 Receive a first resolution request, and obtain domain name information carried in the first resolution request.
  • S306 Send the resolution result of the domain name carried in the success response information and cache the success response information.
  • the target resolution result corresponding to the domain name is cached locally, the target resolution result is updated according to the resolution result of the domain name carried in the successful response message, and the target resolution result is updated according to the resolution result carried in the successful response message.
  • the validity period is to update the validity period corresponding to the target resolution result; if the target resolution result corresponding to the domain name is not cached locally, the resolution result of the domain name carried in the successful response message and the validity period corresponding to the resolution result are directly stored.
  • FIG. 4 is a schematic diagram of a specific data processing flow provided by some embodiments of the application, and the flow includes:
  • S401 Receive a first resolution request, and obtain domain name information carried in the first resolution request.
  • S402 Determine whether the target resolution result corresponding to the domain name is cached locally, if yes, execute S403, otherwise, execute S412.
  • S405 Determine whether the response information sent by the other server is received within the preset first time period, if yes, execute S406, otherwise, execute S408.
  • S406 Determine whether the response information is a successful response information, if yes, execute S407, otherwise, execute S408.
  • S407 Send the resolution result of the domain name carried in the successful response message, and update the target resolution result according to the resolution result, and perform the validity period corresponding to the target resolution result according to the validity period corresponding to the resolution result carried in the successful response message Update.
  • S409 Determine whether the success response information sent by the other server is received within the preset second time period, if yes, execute S410, otherwise, execute S411.
  • S410 Update the target analysis result according to the analysis result carried in the successful response result, and update the validity period corresponding to the target analysis result according to the validity period corresponding to the analysis result carried in the successful response information.
  • S412 Forward the analysis request to other servers.
  • S413 Receive success response information sent by other servers, save the resolution result of the domain name and the validity period corresponding to the resolution result carried in the success response information, and send the resolution result of the domain name.
  • FIG. 5 is a schematic structural diagram of a server provided by some embodiments of the application.
  • the server includes:
  • the communicator 51 is used to establish a communication connection with other servers;
  • the controller 52 is configured to execute:
  • the analysis result is controlled to control the communicator 51 to send the target analysis result.
  • the principle of the server provided in this application for solving the problem is the same as the principle of solving the problem of the data processing method in the above-mentioned embodiment.
  • the repetition will not be repeated.
  • controller 52 is configured to execute:
  • the failure response information sent by the other server is received through the communicator 51 within the preset first time period; or
  • the response information sent by the other server is not received through the communicator 51 within the preset first time period, and the response information is success response information or failure response information, wherein the success response information carries There is a resolution result of the domain name.
  • controller 52 is configured to execute:
  • the target resolution result is sent through the communicator 51, when the domain name resolution result sent by the other server is received through the communicator 51, the target resolution result is updated according to the resolution result.
  • controller 52 is configured to execute:
  • the resolution result corresponding to the domain name and the validity period corresponding to the resolution result are received through the communicator 51; the target resolution result is updated according to the resolution result, and the target resolution result is updated according to the validity period corresponding to the resolution result.
  • the validity period corresponding to the target analysis result is updated.
  • controller 52 is configured to execute:
  • controller 52 is configured to execute:
  • the second resolution request carrying the domain name is received through the communicator 51 within the preset third time period, Then, the target analysis result is directly sent through the communicator 51.
  • controller 52 is configured to execute:
  • the target analysis result and the pre-configured time period are sent through the communicator 51.
  • controller 52 is configured to execute:
  • the resolution result of the domain name sent by the other server is received within the preset first time period, then the resolution result of the domain name is sent.
  • the server determines that the target resolution result corresponding to the domain name carried in the received first resolution request is cached locally, and determines that the validity period corresponding to the target resolution result has expired , First forward the received first resolution request to other servers, and when it is determined that the resolution result of the domain name sent by other servers is not received within the preset first time period, the cached target resolution result is sent first to avoid waiting all the time It takes time for other servers to send the resolution result of the domain name, and realizes that the first resolution request can be responded to in time within the preset first time period, which improves the response efficiency of the server and the user experience.
  • FIG. 6 is a schematic structural diagram of a data processing device provided by some embodiments of this application.
  • the device includes:
  • the receiving unit 61 is configured to receive the first resolution request sent by the smart device, and obtain the domain name information carried in the first resolution request;
  • the first processing unit 62 is configured to determine that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has expired, then forward the first resolution request to other servers;
  • the second processing unit 63 is configured to determine that the domain name resolution result sent by the other server is not received within a preset first time period, and send the target resolution result.
  • the second processing unit 63 is specifically configured to receive the failure response information sent by the other server within the preset first time period; or, in the preset first time period, The response information sent by the other server is not received within the time period, and the response information is success response information or failure response information, wherein the success response information carries the resolution result of the domain name.
  • the receiving unit 61 is further configured to receive the resolution result of the domain name sent by the other server after sending the target resolution result;
  • the device also includes:
  • the update unit is configured to update the target analysis result according to the received analysis result.
  • the receiving unit 61 is specifically configured to receive the resolution result corresponding to the domain name and the validity period corresponding to the resolution result;
  • the update unit is specifically configured to update the target analysis result according to the analysis result, and update the validity period corresponding to the target analysis result according to the validity period corresponding to the analysis result.
  • the receiving unit 61 is specifically configured to receive a resolution result of the domain name sent by the other server within a preset second time period; or, determine that it is within a preset second time period The domain name resolution result sent by the other server is not received, and the first resolution request is sent to the other server at a preset time interval until the domain name resolution result sent by the other server is received.
  • the second processing unit 63 is further configured to, if the resolution result of the domain name sent by the other server is not received within a preset second time period, set a preset third time period If the second resolution request carrying the domain name is received within, the target resolution result is directly sent.
  • the first processing unit 62 is further configured to send the target analysis result and a pre-configured time period.
  • the first processing unit 62 is further configured to, if it is determined that the resolution result of the domain name sent by the other server is received within a preset first time period, send the domain name Analyze the results.
  • the server determines that the target resolution result corresponding to the domain name carried in the received first resolution request is cached locally, and determines that the validity period corresponding to the target resolution result has expired , First forward the received first resolution request to other servers, and when it is determined that the resolution result of the domain name sent by other servers is not received within the preset first time period, the cached target resolution result is sent first to avoid waiting all the time It takes time for other servers to send the resolution result of the domain name, and realizes that the first resolution request can be responded to in time within the preset first time period, which improves the response efficiency of the server and the user experience.
  • the present application also provides a computer-readable storage medium that stores a computer program executable by a processor, and when the program is on the processor At runtime, the following steps are realized when the processor is executed:
  • the determining that the domain name resolution result sent by the other server is not received within a preset first time period includes:
  • the response information sent by the other server is not received within the preset first time period, and the response information is success response information or failure response information, wherein the success response information carries the resolution of the domain name result.
  • the method further includes:
  • the receiving the resolution result of the domain name sent by the other server includes:
  • the updating the target analysis result according to the analysis result includes:
  • the target analysis result is updated according to the analysis result, and the validity period corresponding to the target analysis result is updated according to the validity period corresponding to the analysis result.
  • the receiving the resolution result of the domain name sent by the other server includes:
  • the method further includes:
  • the target resolution result is directly sent.
  • the sending the target analysis result includes:
  • the method further includes:
  • the resolution result of the domain name sent by the other server is received within the preset first time period, then the resolution result of the domain name is sent.
  • the server determines that the target resolution result corresponding to the domain name carried in the received first resolution request is cached locally, and determines that the validity period corresponding to the target resolution result has expired , First forward the received first resolution request to other servers.
  • the cached target resolution result is sent first to avoid waiting It takes time for other servers to send the resolution result of the domain name, and realizes that the first resolution request can be responded to in time within the preset first time period, which improves the response efficiency of the server and the user experience.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Disclosed are a server, a data processing method and a medium, which are used to solve the problems that existing servers cannot respond in a timely manner to resolution requests sent by smart devices, and server response efficiency and user experience are reduced. A first duration is preset, and a server, upon determining that a target resolution result corresponding to a domain name carried in a received first resolution request is cached locally and that a validity period corresponding to the target resolution result has expired, firstly forwards the received first resolution request to another server, and upon determining that a resolution result of the domain name sent by the other server is not received within the preset first duration, firstly sends the cached target resolution result, so as to avoid time spent waiting for the other server to send the resolution result of the domain name, thereby responding to the first resolution request in a timely manner within the preset first duration, and improving server response efficiency and user experience.

Description

一种服务器、数据处理方法及介质Server, data processing method and medium
本申请要求在2020年10月12日提交中国专利局、申请号为202011084472.1、发明名称为“一种服务器、数据处理方法、装置及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office, the application number is 202011084472.1, and the invention title is "a server, data processing method, device and medium" on October 12, 2020, the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请涉及计算机通信领域,尤其涉及一种服务器、数据处理方法及介质。This application relates to the field of computer communication, and in particular to a server, a data processing method and a medium.
背景技术Background technique
相关技术中,DNS服务器保存了IP地址等解析结果与域名的对应关系,根据该解析结果与域名的对应关系,可以确定接收到的解析请求中携带的域名所对应目标解析结果,从而将该目标解析结果反馈给用户的智能设备。In related technologies, the DNS server saves the corresponding relationship between the resolution result such as the IP address and the domain name. According to the corresponding relationship between the resolution result and the domain name, the target resolution result corresponding to the domain name carried in the received resolution request can be determined, so that the target The analysis result is fed back to the user's smart device.
实际应用场景中,图1为现有服务器处理域名的场景示意图。如图1所示,用户的智能设备向网络运营商提供的或是其他公共的服务器发起解析请求,例如,查询www.example.com的IP地址的解析请求,服务器接收到该解析请求后,获取该解析请求中携带的域名,根据该域名查询是否保存有该域名对应的解析结果。若保存了该域名对应的解析结果且该解析结果对应的有效期未到期,则服务器将获取的解析结果发送至智能设备;否则,将解析请求转发至预先配置的其他服务器,比如递归DNS服务器、通过其他DNS服务器迭代转发给根服务器、通过其他DNS服务器迭代转发给各级权威服务器,以获得其他服务器对该解析请求中携带的域名的解析结果,将获取的解析结果发送至智能设备,并本地缓存该域名及其对应的解析结果,以方便后续再次接收到携带有该域名的解析请求时,可以直接将缓存的该域名对应的解析结果发送至智能设备,提高对智能设备的响应效率。In an actual application scenario, Figure 1 is a schematic diagram of a scenario where an existing server processes a domain name. As shown in Figure 1, the user’s smart device initiates a resolution request to a server provided by the network operator or other public servers, for example, a resolution request for querying the IP address of www.example.com. After receiving the resolution request, the server obtains The domain name carried in the resolution request is queried according to the domain name whether the resolution result corresponding to the domain name is stored. If the resolution result corresponding to the domain name is saved and the validity period corresponding to the resolution result has not expired, the server sends the obtained resolution result to the smart device; otherwise, it forwards the resolution request to other pre-configured servers, such as a recursive DNS server, Iteratively forwards to the root server through other DNS servers, and iteratively forwards to authoritative servers at all levels through other DNS servers to obtain the resolution results of the domain name carried in the resolution request by other servers, and send the obtained resolution results to the smart device and locally The domain name and its corresponding resolution result are cached, so that when a resolution request carrying the domain name is received again later, the cached resolution result corresponding to the domain name can be directly sent to the smart device to improve the response efficiency of the smart device.
其中,其他服务器在反馈解析结果时,还会反馈该解析结果对应的有效期(TTL),当再次接收到智能设备发送的携带有该域名的解析请求时,服务器在确定该域名对应的解析结果超出该有效期后,会将该域名对应的解析结果视为无效,需要重新向其他服务器查询该域名对应的解析结果,并将其他服务器发送的该域名对应的解析结果发送至智能设备。Among them, when other servers feed back the resolution result, they will also feed back the validity period (TTL) corresponding to the resolution result. When the resolution request sent by the smart device carrying the domain name is received again, the server determines that the resolution result corresponding to the domain name exceeds After the validity period, the resolution result corresponding to the domain name will be deemed invalid, and the resolution result corresponding to the domain name needs to be queried from other servers, and the resolution result corresponding to the domain name sent by other servers is sent to the smart device.
对于上述的处理方法,当出现服务器缓存的某一域名对应的解析结果到期,且其他服务器出现故障,则该服务器将无法及时获取到其他服务器反馈的该域名的解析结果,一直等待其他服务器反馈的该域名的解析结果,进而导致服务器无法及时响应该解析请求,降 低服务器的响应效率以及用户体验。For the above processing method, when the resolution result corresponding to a certain domain name cached by the server expires, and other servers fail, the server will not be able to obtain the resolution results of the domain name fed back by other servers in time, and has been waiting for feedback from other servers. As a result of the resolution of the domain name, the server cannot respond to the resolution request in a timely manner, which reduces the server’s response efficiency and user experience.
发明内容Summary of the invention
本申请提供了一种服务器、数据处理方法及介质,用以解决现有服务器无法及时响应解析请求,降低服务器的响应效率以及用户体验的问题。This application provides a server, a data processing method, and a medium to solve the problem that the existing server cannot respond to the analysis request in a timely manner, which reduces the response efficiency of the server and the user experience.
第一方面,本申请提供了一种数据处理方法,所述方法包括:In the first aspect, this application provides a data processing method, which includes:
接收第一解析请求,并获取所述第一解析请求中携带的域名的信息;Receiving the first resolution request, and obtaining the domain name information carried in the first resolution request;
确定本地缓存有所述域名对应的目标解析结果,且所述目标解析结果对应的有效期已到期,则向其他服务器转发所述第一解析请求;Determining that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has expired, then forwarding the first resolution request to other servers;
确定在预设第一时长内未接收到所述其他服务器发送的所述域名的解析结果,发送所述目标解析结果。It is determined that the resolution result of the domain name sent by the other server is not received within the preset first time period, and the target resolution result is sent.
第二方面,本申请提供了一种服务器,所述服务器包括:In the second aspect, this application provides a server, and the server includes:
通信器,所述通信器用于与其他服务器建立通信连接;A communicator, which is used to establish a communication connection with other servers;
控制器,所述控制器用于执行:The controller, the controller is used to execute:
控制所述通信器接收第一解析请求,并获取所述第一解析请求中携带的域名的信息;确定本地缓存有所述域名对应的目标解析结果,且所述目标解析结果对应的有效期已到期,则控制所述通信器向所述其他服务器发送所述第一解析请求;确定在预设第一时长内未通过所述通信器接收到所述其他服务器发送的所述域名的解析结果,控制所述通信器发送所述目标解析结果。Control the communicator to receive the first resolution request and obtain the domain name information carried in the first resolution request; determine that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has expired Within a preset first time period, the communicator is controlled to send the first resolution request to the other server; it is determined that the domain name resolution result sent by the other server is not received by the communicator within the preset first time period, Controlling the communicator to send the target analysis result.
第三方面,本申请提供了一种数据处理装置,所述装置包括:In a third aspect, this application provides a data processing device, the device including:
接收单元,用于接收第一解析请求,并获取所述第一解析请求中携带的域名的信息;The receiving unit is configured to receive the first resolution request, and obtain the domain name information carried in the first resolution request;
第一处理单元,用于确定本地缓存有所述域名对应的目标解析结果,且所述目标解析结果对应的有效期已到期,则向其他服务器转发所述第一解析请求;A first processing unit, configured to determine that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has expired, then forward the first resolution request to other servers;
第二处理单元,用于确定在预设第一时长内未接收到所述其他服务器发送的所述域名的解析结果,发送所述目标解析结果。The second processing unit is configured to determine that the resolution result of the domain name sent by the other server is not received within a preset first time period, and send the target resolution result.
第四方面,本申请提供了一种计算机可读存储介质,其存储有计算机程序,所述计算机程序被处理器执行时实现如上述所述数据处理方法的步骤。In a fourth aspect, the present application provides a computer-readable storage medium that stores a computer program that, when executed by a processor, implements the steps of the data processing method described above.
由于本申请中预设有第一时长,服务器在确定本地缓存有接收到的第一解析请求中携带的域名所对应的目标解析结果,并确定该目标解析结果对应的有效期已到期的情况下,先向其他服务器转发接收到的第一解析请求,当确定在预设第一时长内未接收到其他服务器发送的该域名的解析结果后,便先发送缓存的目标解析结果,从而避免一直等待其他服 务器发送该域名的解析结果所耗费的时间,并实现可以在预设第一时长内及时响应第一解析请求,提高服务器的响应效率以及用户体验。Since the first time duration is preset in this application, the server determines that the target resolution result corresponding to the domain name carried in the received first resolution request is cached locally, and determines that the validity period corresponding to the target resolution result has expired , First forward the received first resolution request to other servers, and when it is determined that the resolution result of the domain name sent by other servers is not received within the preset first time period, the cached target resolution result is sent first to avoid waiting all the time It takes time for other servers to send the resolution result of the domain name, and realizes that the first resolution request can be responded to in time within the preset first time period, which improves the response efficiency of the server and the user experience.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings that need to be used in the description of the embodiments or related technologies. Obviously, the drawings in the following description are merely present For some of the embodiments of the application, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为现有服务器处理域名的场景示意图;Figure 1 is a schematic diagram of a scenario where an existing server processes a domain name;
图2本申请一些实施例提供的一种数据处理过程示意图;Figure 2 is a schematic diagram of a data processing process provided by some embodiments of the present application;
图3为现有的数据处理流程示意图;Figure 3 is a schematic diagram of an existing data processing flow;
图4为本申请一些实施例提供的具体的数据处理流程示意图;FIG. 4 is a schematic diagram of a specific data processing flow provided by some embodiments of the application;
图5为本申请一些实施例提供的一种服务器的结构示意图;FIG. 5 is a schematic structural diagram of a server provided by some embodiments of this application;
图6为本申请一些实施例提供的一种数据处理装置的结构示意图。FIG. 6 is a schematic structural diagram of a data processing device provided by some embodiments of this application.
具体实施方式Detailed ways
为了提高服务器对解析请求的响应效率,并提高用户体验,本申请提供了一种服务器、数据处理方法及介质。In order to improve the response efficiency of the server to the parsing request and improve the user experience, this application provides a server, a data processing method, and a medium.
为了使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请作进一步的详细描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。In order to make the objectives, technical solutions, and advantages of the application more clear, the application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
在实际使用过程中,用户的智能设备向网络运营商提供的或是其他公共的服务器发起解析请求,例如,查询www.example.com的IP地址的解析请求。当服务器接收到智能设备发送的对某一域名进行解析的解析请求之后,对该解析请求进行相应的处理,获取该解析请求中携带的域名的信息。为了实现将一些域名对应的解析结果快速转发给智能设备,服务器预先缓存了一些域名对应的解析结果及其对应的有效期,当获取到解析请求中的解析结果之后,将该域名与已缓存有解析结果的域名进行匹配,当存在匹配的域名时,确定该匹配的域名所对应的目标解析结果对应的有效期是否到期,若确定该目标解析结果对应的有效期已到期,则可以先向其他服务器发送该解析结果。根据是否在预设第一时长内接收到其他服务器发送的该域名的解析结果,确定是否直接发送目标解析结果。In actual use, the user's smart device initiates a resolution request to a server provided by the network operator or other public servers, for example, a resolution request to query the IP address of www.example.com. After the server receives the resolution request for resolving a certain domain name sent by the smart device, it performs corresponding processing on the resolution request, and obtains the domain name information carried in the resolution request. In order to quickly forward the resolution results corresponding to some domain names to smart devices, the server pre-caches the resolution results corresponding to some domain names and their corresponding expiration dates. After obtaining the resolution results in the resolution request, the domain name is resolved with the cached ones. The domain name of the result is matched. When there is a matching domain name, it is determined whether the validity period corresponding to the target resolution result corresponding to the matched domain name has expired. If it is determined that the validity period corresponding to the target resolution result has expired, you can first contact other servers Send the analysis result. According to whether the resolution result of the domain name sent by other servers is received within the preset first time period, it is determined whether to directly send the target resolution result.
图2本申请一些实施例提供的一种数据处理过程示意图,该过程包括:Fig. 2 is a schematic diagram of a data processing process provided by some embodiments of the present application, and the process includes:
S201:接收第一解析请求,并获取所述第一解析请求中携带的域名的信息。S201: Receive a first resolution request, and obtain domain name information carried in the first resolution request.
在本申请中,本申请提供的数据处理方法应用于服务器。In this application, the data processing method provided in this application is applied to the server.
在实际应用过程中,当用户希望通过某一注册的域名访问到某一网站时,可以通过输入域名获取到某一网站的某一页面的IP地址,从而实现访问某一网站的目的。而智能设备接收到用户输入的域名之后,会根据该域名生成对应的第一解析请求,并将生成的第一解析请求发送至网络运营商提供的或是其他公共的服务器。后续服务器接收到第一解析请求之后,通过相应的处理,获取该第一解析请求中携带的域名的信息。然后基于本申请提供的数据处理方法,对该域名的信息进行相应的处理,从而实现对第一解析请求进行响应。In the actual application process, when a user wants to access a certain website through a certain registered domain name, he can obtain the IP address of a certain page of a certain website by entering the domain name, so as to achieve the purpose of visiting a certain website. After receiving the domain name input by the user, the smart device generates a corresponding first resolution request according to the domain name, and sends the generated first resolution request to a server provided by the network operator or other public servers. After receiving the first resolution request, the subsequent server obtains the domain name information carried in the first resolution request through corresponding processing. Then, based on the data processing method provided in this application, corresponding processing is performed on the information of the domain name, so as to realize the response to the first resolution request.
其中,服务器接收到的第一解析请求可以是智能设备发送的解析请求,也可以是下级服务器转发的智能设备发送的解析请求。Wherein, the first analysis request received by the server may be an analysis request sent by a smart device, or may be an analysis request sent by a smart device forwarded by a lower-level server.
S202:确定本地缓存有所述域名对应的目标解析结果,且所述目标解析结果对应的有效期已到期,则向其他服务器转发所述第一解析请求。S202: Determine that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has expired, then forward the first resolution request to another server.
S203:确定在预设第一时长内未接收到所述其他服务器发送的所述域名的解析结果,发送所述目标解析结果。S203: Determine that the resolution result of the domain name sent by the other server is not received within a preset first time period, and send the target resolution result.
在实际应用场景下,修改域名所对应的解析结果的情况是相对较少发生的,比如,修改某一域名对应的IP地址等,使得重新查询其他服务器得到的对该域名的解析结果多数情况下也是与之前相同的。因此,为了方便后续智能设备及时获取已访问过的域名的解析结果,服务器可以将接收到的其他服务器发送的某一域名的解析结果进行缓存,以便后续再次接收到携带有该域名的第二解析请求时,直接发送本地缓存的该域名的解析结果,提高响应解析请求的效率。In actual application scenarios, it is relatively rare to modify the resolution result corresponding to a domain name, for example, modify the IP address corresponding to a domain name, etc., so that the resolution result of the domain name obtained by re-querying other servers is most often It's the same as before. Therefore, in order to facilitate subsequent smart devices to obtain the resolution results of the visited domain names in time, the server can cache the received resolution results of a certain domain name sent by other servers, so that the second resolution carrying the domain name can be subsequently received again. When requesting, directly send the locally cached resolution result of the domain name to improve the efficiency of responding to the resolution request.
为了服务器可以在某一域名的解析结果发生变化时,不再继续发送本地缓存的该域名对应的目标解析结果,即发送错误的解析结果,影响智能设备进行后续的业务的访问,其他服务器在给服务器发送任一域名的解析结果时,还会发送该解析结果对应的有效期。服务器接收到该域名的解析结果以及该解析结果对应的有效期之后,将该域名的解析结果、接收到该解析结果的时间以及该解析结果对应的有效期缓存,并在后续智能设备请求该域名的解析结果时,根据接收到该解析请求的时间以及该解析结果对应的有效期,确定该域名的解析结果对应的有效期是否到期,从而可以在该解析结果对应的有效期已到期时,向其他服务器转发接收到的第一解析请求,以根据其他服务器发送的域名的解析结果,对本地缓存的该域名对应的解析结果进行更新。In order that the server can no longer continue to send the locally cached target resolution result corresponding to the domain name when the resolution result of a certain domain name changes, that is, send the wrong resolution result, which affects the subsequent business access of the smart device, other servers are giving When the server sends the resolution result of any domain name, it will also send the validity period corresponding to the resolution result. After the server receives the resolution result of the domain name and the validity period corresponding to the resolution result, it caches the resolution result of the domain name, the time when the resolution result is received, and the validity period corresponding to the resolution result, and requests the resolution of the domain name on the subsequent smart device As a result, according to the time when the resolution request is received and the validity period corresponding to the resolution result, determine whether the validity period corresponding to the resolution result of the domain name has expired, so that it can be forwarded to other servers when the validity period corresponding to the resolution result has expired The received first resolution request is used to update the locally cached resolution result corresponding to the domain name according to the resolution result of the domain name sent by other servers.
其中,在根据接收到该解析请求的时间以及该解析结果对应的有效期,确定该域名的 解析结果对应的有效期是否到期的方法包括:Among them, the method of determining whether the validity period corresponding to the resolution result of the domain name has expired according to the time when the resolution request is received and the validity period corresponding to the resolution result includes:
方法一、在接收到该解析结果时开始计时。后续判断接收到解析请求时计时器所记录的时长是否大于该解析结果对应的有效期,确定该域名的解析结果对应的有效期是否到期。若大于,则确定该域名的解析结果对应的有效期已到期;否则,确定该域名的解析结果对应的有效期未到期。Method 1: Start timing when receiving the analysis result. Subsequently, it is determined whether the time period recorded by the timer when the resolution request is received is greater than the validity period corresponding to the resolution result, and it is determined whether the validity period corresponding to the resolution result of the domain name expires. If it is greater than, it is determined that the validity period corresponding to the resolution result of the domain name has expired; otherwise, it is determined that the validity period corresponding to the resolution result of the domain name has not expired.
方法二、在接收到该解析结果时,从该解析结果对应的有效期开始倒计时。后续判断接收到解析请求时,计时器所记录的剩余时长是否为0,确定该域名的解析结果对应的有效期是否到期。若是,则确定该域名的解析结果对应的有效期已到期;否则,确定该域名的解析结果对应的有效期未到期。Method 2: When receiving the analysis result, count down from the validity period corresponding to the analysis result. It is subsequently determined whether the remaining time recorded by the timer is 0 when the resolution request is received, and it is determined whether the validity period corresponding to the resolution result of the domain name has expired. If so, it is determined that the validity period corresponding to the resolution result of the domain name has expired; otherwise, it is determined that the validity period corresponding to the resolution result of the domain name has not expired.
方法三、在接收到该解析结果时,根据当前接收到该解析结果的时间、以及该解析结果对应的有效期,确定有效时间范围。后续判断接收到解析请求时的时间是否在该有效时间范围内,确定该域名的解析结果对应的有效期是否到期。若是,则确定该域名的解析结果对应的有效期已到期;否则,确定该域名的解析结果对应的有效期未到期。Method 3: When the analysis result is received, the valid time range is determined according to the current time when the analysis result is received and the validity period corresponding to the analysis result. Subsequently, it is determined whether the time when the resolution request is received is within the valid time range, and it is determined whether the validity period corresponding to the resolution result of the domain name has expired. If so, it is determined that the validity period corresponding to the resolution result of the domain name has expired; otherwise, it is determined that the validity period corresponding to the resolution result of the domain name has not expired.
对于上述的方法,一旦其他服务器出现故障,或者拒绝服务器访问,则容易造成服务器一直等待其他服务器反馈该域名的解析结果,从而无法继续响应该用户的第一解析请求,进而对用户后续业务的访问造成影响。For the above method, once other servers fail or deny server access, it is easy to cause the server to wait for other servers to feed back the resolution result of the domain name, so that it cannot continue to respond to the user's first resolution request, and then access the user's subsequent services. Make an impact.
在一种可能的实施方式中,为了可以及时响应第一解析请求,在获取到第一解析请求中携带的域名的信息之后,将该域名与已缓存有解析结果的域名进行匹配,当存在匹配的域名时,确定该匹配的域名所对应的目标解析结果对应的有效期是否到期,若确定该目标解析结果对应的有效期已到期,则发送该目标解析结果,并将第一解析请求转发至其他服务器,来更新当前本地缓存的该目标解析结果及该目标解析结果对应的有效期。In a possible implementation manner, in order to respond to the first resolution request in time, after obtaining the domain name information carried in the first resolution request, the domain name is matched with the domain name for which the resolution result has been cached. Domain name, determine whether the validity period corresponding to the target resolution result corresponding to the matched domain name has expired, if it is determined that the validity period corresponding to the target resolution result has expired, send the target resolution result, and forward the first resolution request to Other servers update the current locally cached target resolution result and the validity period corresponding to the target resolution result.
通过上述的方法,虽然可以使服务器及时对用户的第一解析请求进行响应,且多数情况下该服务器本地缓存的目标解析结果也是正确的,但一旦遇到某一域名的解析结果发生变化,且其他服务器是可以正常响应的情况,则服务器直接发送本地缓存的该域名对应的目标解析结果,会使得智能设备按照该目标解析结果进行后续的业务处理,影响用户后续的业务访问。因此,为了可以及时响应第一解析请求,并尽可能地保证向智能设备发送的域名的解析结果的准确性,在本申请中,在确定本地缓存有某一域名对应的目标解析结果,且该目标解析结果对应的有效期已到期之后,先将该第一解析请求转发至其他服务器,根据预设第一时长内是否接收到其他服务器发送的该域名的解析结果,从而确定如何响应该智能设备的第一解析请求。Through the above method, although the server can respond to the user's first resolution request in time, and in most cases, the target resolution result cached locally by the server is also correct, but once the resolution result of a certain domain name changes, and When other servers can respond normally, the server directly sends the locally cached target resolution result corresponding to the domain name, which will cause the smart device to perform subsequent business processing according to the target resolution result, which affects the user's subsequent business access. Therefore, in order to respond to the first resolution request in a timely manner and ensure the accuracy of the resolution result of the domain name sent to the smart device as much as possible, in this application, it is determined that the target resolution result corresponding to a certain domain name is cached locally, and the After the validity period corresponding to the target resolution result has expired, first forward the first resolution request to other servers, and determine how to respond to the smart device according to whether the domain name resolution results sent by other servers are received within the preset first time period The first resolution request.
具体实施过程中,若确定在预设第一时长内未接收到该其他服务器发送的该域名的解 析结果,说明可能出现网络延迟、或者其他服务器发生故障等情况,则先发送目标解析结果。In the specific implementation process, if it is determined that the analysis result of the domain name sent by the other server is not received within the preset first time period, indicating that there may be network delays or other server failures, etc., the target analysis result is sent first.
其中,若第一解析请求是智能设备发送的,则确定在预设第一时长内未接收到该其他服务器发送的该域名的解析结果时,将目标解析结果发送至智能设备;若第一解析结果是下级服务器转发的,则确定在预设第一时长内未接收到该其他服务器发送的该域名的解析结果时,将目标解析结果发送至下级服务器。Wherein, if the first resolution request is sent by a smart device, when it is determined that the resolution result of the domain name sent by the other server is not received within the preset first time period, the target resolution result is sent to the smart device; The result is forwarded by the lower-level server, and when it is determined that the resolution result of the domain name sent by the other server is not received within the preset first time period, the target resolution result is sent to the lower-level server.
S204:若确定在预设第一时长内接收到所述其他服务器发送的所述域名的解析结果,则发送所述域名的解析结果。S204: If it is determined that the resolution result of the domain name sent by the other server is received within the preset first time period, send the resolution result of the domain name.
在一种可能的实施方式中,为了保证服务器响应第一解析请求的准确性,在本申请中,若确定在预设第一时长内接收到其他服务器发送的该域名的解析结果,说明当前其他服务器正常工作,为了保证准确地响应该第一解析请求,则发送接收到的其他服务器发送的该域名的解析结果。In a possible implementation manner, in order to ensure the accuracy of the server's response to the first resolution request, in this application, if it is determined that the resolution result of the domain name sent by another server is received within the preset first time period, it means that the current other The server works normally, and in order to ensure that it accurately responds to the first resolution request, it sends the received resolution results of the domain name sent by other servers.
其中,若第一解析请求是智能设备发送的,则确定在预设第一时长内接收到该其他服务器发送的该域名的解析结果时,将该域名的解析结果发送至智能设备;若第一解析结果是下级服务器转发的,则确定在预设第一时长内接收到该其他服务器发送的该域名的解析结果时,将该域名的解析结果发送至下级服务器。Wherein, if the first resolution request is sent by a smart device, it is determined that the resolution result of the domain name sent by the other server is received within the preset first time period, and the resolution result of the domain name is sent to the smart device; The resolution result is forwarded by the lower-level server, and when it is determined that the resolution result of the domain name sent by the other server is received within the preset first time period, the resolution result of the domain name is sent to the lower-level server.
在本申请中,在设置第一时长时,可以根据经验确定,也可以是根据场景的不同,设置不同的值。如果希望保证服务器响应第一解析请求的效率,则可以将该预设第一时长设置的短一些,如果希望避免由于第一时长设置的过短,从而无法发送其他服务器正常发送的域名的解析结果,则可以将该预设第一时长设置的长一些。较佳的,可以根据统计的各个其他服务器与该服务器进行正常交互的时长进行设置。In this application, when setting the first duration, it can be determined based on experience, or it can be set to a different value according to different scenarios. If you want to ensure the efficiency of the server in responding to the first resolution request, you can set the preset first time length to be shorter. If you want to avoid that the first time length is set too short, the domain name resolution results normally sent by other servers cannot be sent. , You can set the preset first duration longer. Preferably, it can be set according to the statistics of the duration of normal interaction between each other server and the server.
由于本申请中预设有第一时长,服务器在确定本地缓存有接收到的第一解析请求中携带的域名所对应的目标解析结果,并确定该目标解析结果对应的有效期已到期的情况下,先向其他服务器转发接收到的第一解析请求,当确定在预设第一时长内未接收到其他服务器发送的该域名的解析结果后,便先发送缓存的目标解析结果,从而避免一直等待其他服务器发送该域名的解析结果所耗费的时间,并实现可以在预设第一时长内及时响应第一解析请求,提高服务器的响应效率以及用户体验。Since the first time duration is preset in this application, the server determines that the target resolution result corresponding to the domain name carried in the received first resolution request is cached locally, and determines that the validity period corresponding to the target resolution result has expired , First forward the received first resolution request to other servers, and when it is determined that the resolution result of the domain name sent by other servers is not received within the preset first time period, the cached target resolution result is sent first to avoid waiting all the time It takes time for other servers to send the resolution result of the domain name, and realizes that the first resolution request can be responded to in time within the preset first time period, which improves the response efficiency of the server and the user experience.
为了准确地确定其他服务器是否可能出现故障,在上述实施例的基础上,在本申请中,确定在预设第一时长内未接收到所述其他服务器发送的所述域名的解析结果,包括:In order to accurately determine whether other servers may fail, on the basis of the foregoing embodiment, in this application, determining that the domain name resolution result sent by the other server is not received within the preset first time period includes:
在所述预设第一时长内接收到所述其他服务器发送的失败响应信息;或Receiving failure response information sent by the other server within the preset first time period; or
在所述预设第一时长内未接收到所述其他服务器发送的响应信息,所述响应信息为成 功响应信息,或失败响应信息,其中,所述成功响应信息中携带有所述域名的解析结果。The response information sent by the other server is not received within the preset first time period, and the response information is success response information or failure response information, wherein the success response information carries the resolution of the domain name result.
在实际应用场景中,可能出现网络延迟、其他服务器故障等情况,使得服务器在预设第一时长内无法接收到其他服务器发送的域名的解析结果。具体的,当出现网络延迟时,可能会造成其他服务器与服务器之间的通信延迟,使得服务器无法在预设第一时长内接收到其他服务器发送的该域名的解析结果;当出现网络故障时,会使其他服务器与该服务器之间无法建立通信连接,使得服务器也无法在预设第一时长内接收到其他服务器发送的该域名的解析结果;当其他服务器出现故障时,可能造成服务器无法在预设第一时长内接收到其他服务器发送的该域名的解析结果或者接收到其他服务器发送的失败响应信息,比如,SERVFAIL、REFUSED等。基于此,在本申请中,服务器确定在预设第一时长内未接收到其他服务器发送的域名的解析结果,包括如下情况:In actual application scenarios, network delays, other server failures, etc. may occur, so that the server cannot receive the domain name resolution results sent by other servers within the preset first time period. Specifically, when a network delay occurs, it may cause communication delays between other servers and servers, so that the server cannot receive the domain name resolution results sent by other servers within the preset first time period; when a network failure occurs, It will make it impossible to establish a communication connection between other servers and the server, so that the server cannot receive the resolution results of the domain name sent by other servers within the preset first time period; when other servers fail, the server may not be able to It is assumed that within the first time period, the resolution result of the domain name sent by other servers or the failure response information sent by other servers, such as SERVFAIL, REFUSED, etc., are received. Based on this, in this application, the server determines that the domain name resolution result sent by other servers is not received within the preset first time period, including the following situations:
情况一、若在预设第一时长内接收到其他服务器发送的失败响应信息,说明其他服务器可能出现故障,且暂时无法恢复,则确定在预设第一时长内未接收到其他服务器发送的域名的解析结果。Case 1: If the failure response message sent by other servers is received within the preset first time period, it means that other servers may be faulty and cannot be recovered temporarily, then it is determined that the domain name sent by other servers is not received within the preset first time period The result of the analysis.
情况二、若在预设第一时长内未接收到其他服务器发送的响应信息,即未能在预设第一时长内接收到其他服务器发送的成功响应信息或者失败响应信息,则确定在预设第一时长内未接收到其他服务器发送的域名的解析结果。Case 2: If the response information sent by other servers is not received within the preset first time period, that is, the success response information or the failure response information sent by other servers cannot be received within the preset first time period, it is determined to be in the preset first time period. The domain name resolution result sent by other servers is not received within the first time period.
其中,成功响应信息中携带有该域名的解析结果,比如,NOERROR、NXDOMAIN等。Among them, the successful response message carries the resolution result of the domain name, such as NOERROR, NXDOMAIN, etc.
当基于上述的情况,确定当前在预设第一时长内未接收到其他服务器发送的域名的解析结果之后,服务器直接发送本地缓存的目标解析结果。When based on the foregoing situation, it is determined that the resolution result of the domain name sent by other servers is not currently received within the preset first time period, the server directly sends the locally cached target resolution result.
进一步地,可能出现网络延迟,或者其他服务器处理任务较多导致未能在预设第一时长内处理服务器发送的第一解析请求等情况,使得服务器无法在预设第一时长内接收到其他服务器发送的域名的解析结果,而在发送了本地缓存的目标解析结果之后,又接收到了其他服务器发送的该域名的解析结果。为了保证智能设备后续再次对该域名进行第一解析请求时,服务器对该第一解析请求响应的准确性,服务器发送了本地缓存的目标解析结果之后,若接收到了其他服务器发送的该域名的解析结果,则会根据当前接收到的其他服务器发送的该域名的解析结果,对本地缓存的该域名对应的目标解析结果进行更新。具体的,发送所述目标解析结果之后,所述方法还包括:Further, there may be network delays, or other server processing tasks may result in failure to process the first analysis request sent by the server within the preset first time period, etc., so that the server cannot receive other servers within the preset first time period. The resolution result of the sent domain name, and after sending the locally cached target resolution result, the resolution result of the domain name sent by other servers is received. In order to ensure the accuracy of the server's response to the first resolution request when the smart device subsequently makes the first resolution request for the domain name again, after the server sends the locally cached target resolution result, if it receives the resolution of the domain name sent by other servers As a result, the locally cached target resolution result corresponding to the domain name will be updated according to the currently received resolution result of the domain name sent by other servers. Specifically, after sending the target analysis result, the method further includes:
接收到所述其他服务器发送的所述域名的解析结果时,根据所述解析结果对所述目标解析结果进行更新。When receiving the resolution result of the domain name sent by the other server, update the target resolution result according to the resolution result.
在实际应用场景中,其他服务器在向服务器发送域名的解析结果时,一般还会向服务 器发送该解析结果对应的有效期,以便服务器可以监控该解析结果的更新时间,及时向其他服务器请求该域名的解析结果,从而根据其他服务器发送的该域名的解析结果对本地缓存的目标解析结果进行更新,提高后续响应该域名的解析请求的准确性。因此,在本申请中,接收到域名对应的解析结果以及该解析结果对应的有效期之后,根据该解析结果对目标解析结果进行更新,并根据该解析结果对应的有效期对目标解析结果对应的有效期进行更新。具体的,所述接收到所述其他服务器发送的所述域名的解析结果,包括:In actual application scenarios, when other servers send the resolution result of the domain name to the server, they will generally also send the validity period corresponding to the resolution result to the server, so that the server can monitor the update time of the resolution result and request the domain name from other servers in time. The resolution result is to update the locally cached target resolution result according to the resolution result of the domain name sent by other servers, so as to improve the accuracy of subsequent response to the resolution request of the domain name. Therefore, in this application, after receiving the resolution result corresponding to the domain name and the validity period corresponding to the resolution result, the target resolution result is updated according to the resolution result, and the validity period corresponding to the target resolution result is performed according to the validity period corresponding to the resolution result. Update. Specifically, the receiving the resolution result of the domain name sent by the other server includes:
接收到所述域名对应的解析结果以及所述解析结果对应的有效期;Receiving the resolution result corresponding to the domain name and the validity period corresponding to the resolution result;
所述根据所述解析结果对所述目标解析结果进行更新,包括:The updating the target analysis result according to the analysis result includes:
根据所述解析结果对所述目标解析结果进行更新,并根据所述解析结果对应的有效期对所述目标解析结果对应的有效期进行更新。The target analysis result is updated according to the analysis result, and the validity period corresponding to the target analysis result is updated according to the validity period corresponding to the analysis result.
为了及时对目标解析结果进行更新,在上述各实施例的基础上,在本申请中,所述接收到所述其他服务器发送的所述域名的解析结果,包括:In order to update the target resolution result in time, on the basis of the foregoing embodiments, in this application, the receiving the resolution result of the domain name sent by the other server includes:
在预设第二时长内接收到所述其他服务器发送的所述域名的解析结果;或Receiving the resolution result of the domain name sent by the other server within the preset second time period; or
确定在预设第二时长内未接收到所述其他服务器发送的所述域名的解析结果,按照预设时间间隔向所述其他服务器发送所述第一解析请求,直至接收到所述其他服务器发送的所述域名的解析结果。It is determined that the resolution result of the domain name sent by the other server is not received within the preset second time period, and the first resolution request is sent to the other server at a preset time interval until the other server is sent The result of the resolution of the domain name.
在实际应用场景中,由于可能出现网络延迟、或者当前其他服务器处理的任务较多未能在预设第一时长内处理了该第一解析请求,但当网络不延迟了,或者其他服务器处理完该第一解析请求了,服务器无需再次向其他服务器发送第一解析请求,也还是可以接收到其他服务器发送的该域名的解析结果的。因此,为了避免服务器频繁向其他服务器转发第一解析请求,在本申请中,预设有第二时长。服务器可以在预设第一时长内未接收到其他服务器发送的域名的解析结果之后,判断在第二预设时长内是否接收到其他服务器发送的该域名的解析结果。若在第二预设时长内接收到其他服务器发送的该域名的解析结果,则直接根据接收到的域名的解析结果对本地缓存的目标解析结果进行更新。In actual application scenarios, due to possible network delays or many other tasks currently processed by other servers, the first parsing request cannot be processed within the preset first time period, but when the network is not delayed or other servers have completed processing With the first resolution request, the server does not need to send the first resolution request to other servers again, and it can still receive the resolution result of the domain name sent by other servers. Therefore, in order to prevent the server from frequently forwarding the first analysis request to other servers, in this application, a second duration is preset. The server may determine whether the resolution result of the domain name sent by the other server is received within the second preset time period after it has not received the resolution result of the domain name sent by the other server within the preset first time period. If the resolution result of the domain name sent by another server is received within the second preset time period, the locally cached target resolution result is directly updated according to the received resolution result of the domain name.
在一种可能的实施方式中,可能出现网络故障、其他服务器故障等情况,使得其他服务器无法正常接收到服务器转发的第一解析请求,或者向服务器发送域名的解析结果,因此,为了及时获取到其他服务器发送该域名的解析结果,提高后续响应携带有该域名的第一解析请求的准确性,在本申请中,若在第二预设时长内未接收到其他服务器发送的该域名的解析结果,则不再等待其他服务器对上一次转发的第一解析请求中携带的域名所发送的解析结果,按照预设时间间隔向其他服务器转发第一解析请求,直至接收到其他服务器发送的该域名的解析结果,从而根据该接收到的域名的解析结果,对本地缓存的目标解析 结果进行更新。In a possible implementation, there may be network failures, other server failures, etc., so that other servers cannot normally receive the first resolution request forwarded by the server, or send the resolution result of the domain name to the server. Therefore, in order to obtain timely The other server sends the resolution result of the domain name to improve the accuracy of the subsequent response to the first resolution request carrying the domain name. In this application, if the resolution result of the domain name sent by the other server is not received within the second preset time period , Then no longer wait for the resolution result sent by other servers to the domain name carried in the first resolution request that was forwarded last time, and forward the first resolution request to other servers at a preset time interval until it receives the name of the domain name sent by other servers. The resolution result is to update the locally cached target resolution result according to the received resolution result of the domain name.
若在预设第二时长内未接收到所述其他服务器发送的所述域名的解析结果,所述方法还包括:If the resolution result of the domain name sent by the other server is not received within the preset second time period, the method further includes:
在预设第三时长内接收到携带有所述域名的第二解析请求,则直接发送所述目标解析结果。If the second resolution request carrying the domain name is received within the preset third time period, the target resolution result is directly sent.
在另一种可能的实施方式中,为了避免频繁向其他服务器转发第一解析请求,造成其他服务器负载压力大的情况,在预设第二时长内未接收到其他服务器发送的域名的解析结果之后,若服务器在该预设第二时长之后的一段时间内再次接收到携带有该域名的第二解析请求,则不再向其他服务器转发该第二解析请求,直接发送本地缓存的该域名对应的目标解析结果。因此,在本申请中,预设有第三时长。在预设第二时长内未接收到其他服务器发送的域名的解析结果之后,若在预设第三时长内接收到携带有该域名的第二解析请求,则直接发送本地缓存的目标解析结果。In another possible implementation manner, in order to avoid frequently forwarding the first resolution request to other servers, causing heavy load pressure on other servers, after the domain name resolution results sent by other servers are not received within the preset second time period If the server receives the second resolution request carrying the domain name again within a period of time after the preset second duration, it will not forward the second resolution request to other servers, and directly send the locally cached domain name corresponding to the domain name. Target analysis result. Therefore, in this application, a third duration is preset. After the resolution result of the domain name sent by other servers is not received within the preset second time period, if the second resolution request carrying the domain name is received within the preset third time period, the locally cached target resolution result is directly sent.
服务器在接收到其他服务器发送的域名的解析结果的同时,还会接收到其他服务器发送的该解析结果对应的有效期,服务器根据该接收到的域名的解析结果,对本地缓存的目标解析结果进行更新,并根据接收到的该解析结果对应的有效期,对本地缓存的目标解析结果对应的有效期进行更新。When the server receives the resolution result of the domain name sent by other servers, it also receives the validity period corresponding to the resolution result sent by other servers. The server updates the locally cached target resolution result according to the received resolution result of the domain name. , And update the validity period corresponding to the locally cached target analysis result according to the validity period corresponding to the received analysis result.
需要说明的是,在本申请中,在设置第二时长时,可以根据经验确定,也可以是根据场景的不同,设置不同的值。如果希望减少耗费在等待其他服务器发送该域名的解析结果的时间,则可以将该预设第二时长设置的短一些,如果希望减少频繁向其他服务器转发第一解析请求的次数,则可以将该预设第二时长设置的长一些。It should be noted that, in this application, when setting the second duration, it can be determined based on experience, or different values can be set according to different scenarios. If you want to reduce the time spent waiting for other servers to send the resolution results of the domain name, you can set the preset second duration to be shorter. If you want to reduce the number of frequent forwarding of the first resolution request to other servers, you can set this The preset second duration is set to be longer.
在设置第三时长时,可以根据经验确定,也可以是根据场景的不同,设置不同的值。如果对域名的解析结果有严格的要求,则可以将该预设第三时长设置的短一些,如果希望减少频繁向其他服务器转发第二解析请求的次数,则可以将该预设第三时长设置的长一些。When setting the third duration, it can be determined based on experience, or it can be set to a different value according to different scenarios. If you have strict requirements on the resolution results of the domain name, you can set the preset third duration to be shorter. If you want to reduce the number of frequently forwarding second resolution requests to other servers, you can set the preset third duration Is longer.
同样的,在设置时间间隔时,也可以根据经验确定,也可以是根据场景的不同,设置不同的值。如果希望尽可能的及时获取到其他服务器发送该域名的解析结果,则可以将该时间间隔设置的短一些,如果希望减少频繁向其他服务器转发第一解析请求的次数,则可以将该时间间隔设置的长一些。Similarly, when setting the time interval, it can also be determined based on experience, or it can be set to different values according to different scenarios. If you want to obtain the resolution results of the domain name sent by other servers as soon as possible, you can set the time interval shorter. If you want to reduce the number of frequent forwarding of the first resolution request to other servers, you can set the time interval Is longer.
在另一种可能的实施方式中,可能出现服务器第一次接收到对某一域名的解析请求,则该服务器本地不会缓存有该域名对应的目标解析结果,为了响应智能设备发送的解析请求,服务器需要向其他服务器转发该解析请求,以获取其他服务器发送的该解析请求中携带的域名的解析结果,发送接收到的该域名的解析结果,并将该域名及其对应的解析结果 缓存在本地。In another possible implementation, it may happen that the server receives the resolution request for a certain domain name for the first time, and the server does not cache the target resolution result corresponding to the domain name locally, in order to respond to the resolution request sent by the smart device , The server needs to forward the resolution request to other servers to obtain the resolution result of the domain name carried in the resolution request sent by other servers, send the received resolution result of the domain name, and cache the domain name and its corresponding resolution result in local.
服务器在接收到其他服务器发送的域名的解析结果的同时,还会接收到其他服务器发送的该解析结果对应的有效期,服务器将该域名、该域名的解析结果、以及该解析结果对应的有效期缓存在本地。When the server receives the resolution result of the domain name sent by other servers, it also receives the validity period corresponding to the resolution result sent by other servers. The server caches the domain name, the resolution result of the domain name, and the validity period corresponding to the resolution result in local.
其中,在设置有效期时,可以根据场景的不同,设置不同时长的有效期。如果为了严格保证向智能设备发送的某一域名的解析结果的准确性,则可以将该域名的有效期设置的短一些,以使服务器可以频繁对本地缓存的某一域名对应的目标解析结果进行更新;如果希望有效降低服务器向其他服务器转发解析请求分析的频率,降低其他服务器处理解析请求时的负载,提高服务性能,处理更多的解析请求,则可以将该域名的有效期设置的长一些。Among them, when setting the validity period, you can set validity periods of different durations according to different scenarios. If in order to strictly ensure the accuracy of the resolution result of a certain domain name sent to the smart device, the validity period of the domain name can be set shorter, so that the server can frequently update the target resolution result corresponding to a certain domain name in the local cache. ; If you want to effectively reduce the frequency of the server forwarding analysis requests to other servers, reduce the load when other servers process analysis requests, improve service performance, and process more resolution requests, you can set the domain name's validity period longer.
同样的,确定在预设第一时长内未接收到其他服务器发送的该域名的解析结果,服务器在发送目标解析结果时,也会将预先配置的时间段发送至接收设备(包括智能设备和下级服务器),即将该预先配置的时间段作为该目标解析结果对应的有效期发送至接收设备,以使接收设备根据该目标解析结果以及该预先配置的时间段,对本地缓存的该域名的解析结果以及该解析结果对应的有效期进行更新。Similarly, it is determined that the resolution result of the domain name sent by other servers is not received within the preset first time period. When the server sends the target resolution result, it will also send the pre-configured time period to the receiving device (including smart devices and subordinates). Server), that is, the pre-configured time period is sent to the receiving device as the validity period corresponding to the target resolution result, so that the receiving device can perform the locally cached resolution result of the domain name according to the target resolution result and the pre-configured time period. The validity period corresponding to the analysis result is updated.
需要说明的是,该预先配置的时间段的设置方法与上述有效期的设置方法相同,重复之处不做赘述。It should be noted that the method for setting the pre-configured time period is the same as the method for setting the validity period described above, and the repetition will not be repeated.
此外,若确定本地缓存有该域名对应的目标解析结果,且所述目标解析结果对应的有效期未到期,所述方法还包括:In addition, if it is determined that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has not expired, the method further includes:
发送所述目标解析结果。Send the target analysis result.
当然,服务器确定本地缓存有该域名对应的目标解析结果后,该目标解析结果对应的有效期未到期,则服务器直接发送该目标解析结果即可,无需向其他服务器请求该解析请求中携带的域名的解析结果,从而根据接收到的解析结果对本地缓存的目标解析结果进行更新。Of course, after the server determines that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has not expired, the server can directly send the target resolution result without requesting the domain name carried in the resolution request from other servers. The analysis result of the local cache is updated according to the received analysis result.
图3为现有的数据处理流程示意图,该流程包括:Figure 3 is a schematic diagram of an existing data processing flow, which includes:
S301:接收第一解析请求,并获取该第一解析请求中携带的域名的信息。S301: Receive a first resolution request, and obtain domain name information carried in the first resolution request.
S302:判断本地是否缓存有该域名对应的目标解析结果,若是,则执行S303,否则,执行S304。S302: Determine whether the target resolution result corresponding to the domain name is cached locally, if yes, execute S303, otherwise, execute S304.
S303:判断该目标解析结果对应的有效期是否已到期,若是,则执行S304,否则,执行S308。S303: Determine whether the validity period corresponding to the target analysis result has expired, if yes, execute S304, otherwise, execute S308.
S304:向其他服务器转发该解析请求。S304: Forward the analysis request to other servers.
S305:判断是否接收到其他服务器发送的成功响应信息,若是,则执行S306,否则执行S307。S305: Determine whether a successful response message sent by another server is received, if yes, execute S306, otherwise, execute S307.
S306:发送该成功响应信息中携带的该域名的解析结果并缓存该成功响应信息。S306: Send the resolution result of the domain name carried in the success response information and cache the success response information.
其中,若本地缓存有该域名对应的目标解析结果,则根据该成功响应信息中携带的该域名的解析结果,对目标解析结果进行更新,并根据该成功响应信息中携带的该解析结果对应的有效期,对目标解析结果对应的有效期进行更新;若本地未缓存有该域名对应的目标解析结果,则直接将该成功响应信息中携带的该域名的解析结果以及该解析结果对应的有效期保存。Wherein, if the target resolution result corresponding to the domain name is cached locally, the target resolution result is updated according to the resolution result of the domain name carried in the successful response message, and the target resolution result is updated according to the resolution result carried in the successful response message. The validity period is to update the validity period corresponding to the target resolution result; if the target resolution result corresponding to the domain name is not cached locally, the resolution result of the domain name carried in the successful response message and the validity period corresponding to the resolution result are directly stored.
S307:继续等待,直至接收到其他服务器发送成功响应信息,然后执行S306。S307: Continue to wait until a successful response message sent by another server is received, and then execute S306.
S308:直接发送缓存的目标解析结果。S308: Send the cached target analysis result directly.
为了方便说明本申请提供的数据处理方法,下面通过具体的实施例进行说明:In order to facilitate the description of the data processing method provided in this application, specific embodiments are described below:
图4为本申请一些实施例提供的具体的数据处理流程示意图,该流程包括:FIG. 4 is a schematic diagram of a specific data processing flow provided by some embodiments of the application, and the flow includes:
S401:接收第一解析请求,并获取该第一解析请求中携带的域名的信息。S401: Receive a first resolution request, and obtain domain name information carried in the first resolution request.
S402:判断本地是否缓存有该域名对应的目标解析结果,若是,则执行S403,否则,执行S412。S402: Determine whether the target resolution result corresponding to the domain name is cached locally, if yes, execute S403, otherwise, execute S412.
S403:判断该目标解析结果对应的有效期是否已到期,若是,则执行S404,否则,执行S414。S403: Determine whether the validity period corresponding to the target analysis result has expired, if yes, execute S404, otherwise, execute S414.
S404:向其他服务器转发该第一解析请求。S404: Forward the first analysis request to other servers.
S405:判断是否在预设第一时长内接收到该其他服务器发送的响应信息,若是,则执行S406,否则,执行S408。S405: Determine whether the response information sent by the other server is received within the preset first time period, if yes, execute S406, otherwise, execute S408.
S406:判断该响应信息是否为成功响应信息,若是,则执行S407,否则,执行S408。S406: Determine whether the response information is a successful response information, if yes, execute S407, otherwise, execute S408.
S407:将成功响应信息中携带的域名的解析结果发送,并根据该解析结果,对目标解析结果进行更新,根据成功响应信息中携带的该解析结果对应的有效期,对目标解析结果对应的有效期进行更新。S407: Send the resolution result of the domain name carried in the successful response message, and update the target resolution result according to the resolution result, and perform the validity period corresponding to the target resolution result according to the validity period corresponding to the resolution result carried in the successful response message Update.
S408:发送该目标解析结果。S408: Send the target analysis result.
S409:判断是否在预设第二时长内接收到该其他服务器发送的成功响应信息,若是,则执行S410,否则,执行S411。S409: Determine whether the success response information sent by the other server is received within the preset second time period, if yes, execute S410, otherwise, execute S411.
S410:根据成功响应结果中携带的解析结果,对目标解析结果进行更新,根据成功响应信息中携带的该解析结果对应的有效期,对目标解析结果对应的有效期进行更新。S410: Update the target analysis result according to the analysis result carried in the successful response result, and update the validity period corresponding to the target analysis result according to the validity period corresponding to the analysis result carried in the successful response information.
S411:在预设第三时长内接收到携带有所述域名的第二解析请求,则直接发送所述目标解析结果。S411: If a second resolution request carrying the domain name is received within a preset third time period, the target resolution result is directly sent.
S412:向其他服务器转发该解析请求。S412: Forward the analysis request to other servers.
S413:接收其他服务器发送的成功响应信息,将该成功响应信息中携带的该域名的解析结果以及该解析结果对应的有效期保存,并发送该域名的解析结果。S413: Receive success response information sent by other servers, save the resolution result of the domain name and the validity period corresponding to the resolution result carried in the success response information, and send the resolution result of the domain name.
S414:发送该目标解析结果。S414: Send the target analysis result.
本申请还提供可以一种服务器,图5为本申请一些实施例提供的一种服务器的结构示意图,该服务器包括:This application may also provide a server. FIG. 5 is a schematic structural diagram of a server provided by some embodiments of the application. The server includes:
通信器51,所述通信器用于与其他服务器建立通信连接;The communicator 51 is used to establish a communication connection with other servers;
控制器52,所述控制器用于执行:The controller 52 is configured to execute:
控制所述通信器51接收第一解析请求,并获取所述第一解析请求中携带的域名的信息;确定本地缓存有所述域名对应的目标解析结果,且所述目标解析结果对应的有效期已到期,则控制所述通信器51向所述其他服务器发送所述第一解析请求;确定在预设第一时长内未通过所述通信器51接收到所述其他服务器发送的所述域名的解析结果,控制所述通信器51发送所述目标解析结果。Control the communicator 51 to receive the first resolution request, and obtain the domain name information carried in the first resolution request; determine that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has expired Expires, control the communicator 51 to send the first resolution request to the other server; determine that the domain name sent by the other server is not received by the communicator 51 within the preset first time period The analysis result is controlled to control the communicator 51 to send the target analysis result.
本申请提供的服务器解决问题的原理与上述实施例中的数据处理方法解决问题的原理相同,具体参见上述实施例,重复之处不做赘述。The principle of the server provided in this application for solving the problem is the same as the principle of solving the problem of the data processing method in the above-mentioned embodiment. For details, please refer to the above-mentioned embodiment, and the repetition will not be repeated.
在某些可能的实施方式中,所述控制器52用于执行:In some possible implementation manners, the controller 52 is configured to execute:
在所述预设第一时长内通过所述通信器51接收到所述其他服务器发送的失败响应信息;或The failure response information sent by the other server is received through the communicator 51 within the preset first time period; or
在所述预设第一时长内未通过所述通信器51接收到所述其他服务器发送的响应信息,所述响应信息为成功响应信息,或失败响应信息,其中,所述成功响应信息中携带有所述域名的解析结果。The response information sent by the other server is not received through the communicator 51 within the preset first time period, and the response information is success response information or failure response information, wherein the success response information carries There is a resolution result of the domain name.
在某些可能的实施方式中,所述控制器52用于执行:In some possible implementation manners, the controller 52 is configured to execute:
通过所述通信器51发送所述目标解析结果之后,通过所述通信器51接收到所述其他服务器发送的所述域名的解析结果时,根据所述解析结果对所述目标解析结果进行更新。After the target resolution result is sent through the communicator 51, when the domain name resolution result sent by the other server is received through the communicator 51, the target resolution result is updated according to the resolution result.
在某些可能的实施方式中,所述控制器52用于执行:In some possible implementation manners, the controller 52 is configured to execute:
通过所述通信器51接收到所述域名对应的解析结果以及所述解析结果对应的有效期;根据所述解析结果对所述目标解析结果进行更新,并根据所述解析结果对应的有效期对所述目标解析结果对应的有效期进行更新。The resolution result corresponding to the domain name and the validity period corresponding to the resolution result are received through the communicator 51; the target resolution result is updated according to the resolution result, and the target resolution result is updated according to the validity period corresponding to the resolution result. The validity period corresponding to the target analysis result is updated.
在某些可能的实施方式中,所述控制器52用于执行:In some possible implementation manners, the controller 52 is configured to execute:
在预设第二时长内通过所述通信器51接收到所述其他服务器发送的所述域名的解析结果;或Receiving the resolution result of the domain name sent by the other server through the communicator 51 within the preset second time period; or
确定在预设第二时长内未通过所述通信器51接收到所述其他服务器发送的所述域名的解析结果,按照预设时间间隔通过所述通信器51向所述其他服务器发送所述第一解析请求,直至通过所述通信器51接收到所述其他服务器发送的所述域名的解析结果。It is determined that the resolution result of the domain name sent by the other server is not received through the communicator 51 within the preset second time period, and the first time is sent to the other server through the communicator 51 at a preset time interval. A resolution request is received until the domain name resolution result sent by the other server is received through the communicator 51.
在某些可能的实施方式中,所述控制器52用于执行:In some possible implementation manners, the controller 52 is configured to execute:
若在预设第二时长内未接收到所述其他服务器发送的所述域名的解析结果,在预设第三时长内通过所述通信器51接收到携带有所述域名的第二解析请求,则直接通过所述通信器51发送所述目标解析结果。If the resolution result of the domain name sent by the other server is not received within the preset second time period, the second resolution request carrying the domain name is received through the communicator 51 within the preset third time period, Then, the target analysis result is directly sent through the communicator 51.
在某些可能的实施方式中,所述控制器52用于执行:In some possible implementation manners, the controller 52 is configured to execute:
通过所述通信器51发送所述目标解析结果及预先配置的时间段。The target analysis result and the pre-configured time period are sent through the communicator 51.
在某些可能的实施方式中,所述控制器52用于执行:In some possible implementation manners, the controller 52 is configured to execute:
若确定在预设第一时长内接收到所述其他服务器发送的所述域名的解析结果,则发送所述域名的解析结果。If it is determined that the resolution result of the domain name sent by the other server is received within the preset first time period, then the resolution result of the domain name is sent.
由于本申请中预设有第一时长,服务器在确定本地缓存有接收到的第一解析请求中携带的域名所对应的目标解析结果,并确定该目标解析结果对应的有效期已到期的情况下,先向其他服务器转发接收到的第一解析请求,当确定在预设第一时长内未接收到其他服务器发送的该域名的解析结果后,便先发送缓存的目标解析结果,从而避免一直等待其他服务器发送该域名的解析结果所耗费的时间,并实现可以在预设第一时长内及时响应第一解析请求,提高服务器的响应效率以及用户体验。Since the first time duration is preset in this application, the server determines that the target resolution result corresponding to the domain name carried in the received first resolution request is cached locally, and determines that the validity period corresponding to the target resolution result has expired , First forward the received first resolution request to other servers, and when it is determined that the resolution result of the domain name sent by other servers is not received within the preset first time period, the cached target resolution result is sent first to avoid waiting all the time It takes time for other servers to send the resolution result of the domain name, and realizes that the first resolution request can be responded to in time within the preset first time period, which improves the response efficiency of the server and the user experience.
本申请还提供了一种数据处理装置,图6为本申请一些实施例提供的一种数据处理装置的结构示意图,该装置包括:This application also provides a data processing device. FIG. 6 is a schematic structural diagram of a data processing device provided by some embodiments of this application. The device includes:
接收单元61,用于接收智能设备发送的第一解析请求,并获取所述第一解析请求中携带的域名的信息;The receiving unit 61 is configured to receive the first resolution request sent by the smart device, and obtain the domain name information carried in the first resolution request;
第一处理单元62,用于确定本地缓存有所述域名对应的目标解析结果,且所述目标解析结果对应的有效期已到期,则向其他服务器转发所述第一解析请求;The first processing unit 62 is configured to determine that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has expired, then forward the first resolution request to other servers;
第二处理单元63,用于确定在预设第一时长内未接收到所述其他服务器发送的所述域名的解析结果,发送所述目标解析结果。The second processing unit 63 is configured to determine that the domain name resolution result sent by the other server is not received within a preset first time period, and send the target resolution result.
在某些可能的实施方式中,所述第二处理单元63,具体用于在所述预设第一时长内接收到所述其他服务器发送的失败响应信息;或,在所述预设第一时长内未接收到所述其他服务器发送的响应信息,所述响应信息为成功响应信息,或失败响应信息,其中,所述成功响应信息中携带有所述域名的解析结果。In some possible implementation manners, the second processing unit 63 is specifically configured to receive the failure response information sent by the other server within the preset first time period; or, in the preset first time period, The response information sent by the other server is not received within the time period, and the response information is success response information or failure response information, wherein the success response information carries the resolution result of the domain name.
在某些可能的实施方式中,所述接收单元61,还用于发送所述目标解析结果之后,接 收所述其他服务器发送的所述域名的解析结果;In some possible implementation manners, the receiving unit 61 is further configured to receive the resolution result of the domain name sent by the other server after sending the target resolution result;
所述装置还包括:The device also includes:
更新单元,用于根据接收到的所述解析结果对所述目标解析结果进行更新。The update unit is configured to update the target analysis result according to the received analysis result.
在某些可能的实施方式中,所述接收单元61,具体用于接收到所述域名对应的解析结果以及所述解析结果对应的有效期;In some possible implementation manners, the receiving unit 61 is specifically configured to receive the resolution result corresponding to the domain name and the validity period corresponding to the resolution result;
所述更新单元,具体用于根据所述解析结果对所述目标解析结果进行更新,并根据所述解析结果对应的有效期对所述目标解析结果对应的有效期进行更新。The update unit is specifically configured to update the target analysis result according to the analysis result, and update the validity period corresponding to the target analysis result according to the validity period corresponding to the analysis result.
在某些可能的实施方式中,所述接收单元61,具体用于在预设第二时长内接收到所述其他服务器发送的所述域名的解析结果;或,确定在预设第二时长内未接收到所述其他服务器发送的所述域名的解析结果,按照预设时间间隔向所述其他服务器发送所述第一解析请求,直至接收到所述其他服务器发送的所述域名的解析结果。In some possible implementation manners, the receiving unit 61 is specifically configured to receive a resolution result of the domain name sent by the other server within a preset second time period; or, determine that it is within a preset second time period The domain name resolution result sent by the other server is not received, and the first resolution request is sent to the other server at a preset time interval until the domain name resolution result sent by the other server is received.
在某些可能的实施方式中,所述第二处理单元63,还用于若在预设第二时长内未接收到所述其他服务器发送的所述域名的解析结果,在预设第三时长内接收到携带有所述域名的第二解析请求,则直接发送所述目标解析结果。In some possible implementation manners, the second processing unit 63 is further configured to, if the resolution result of the domain name sent by the other server is not received within a preset second time period, set a preset third time period If the second resolution request carrying the domain name is received within, the target resolution result is directly sent.
在某些可能的实施方式中,所述第一处理单元62,还用于发送所述目标解析结果及预先配置的时间段。In some possible implementation manners, the first processing unit 62 is further configured to send the target analysis result and a pre-configured time period.
在某些可能的实施方式中,所述第一处理单元62,还用于若确定在预设第一时长内接收到所述其他服务器发送的所述域名的解析结果,则发送所述域名的解析结果。In some possible implementation manners, the first processing unit 62 is further configured to, if it is determined that the resolution result of the domain name sent by the other server is received within a preset first time period, send the domain name Analyze the results.
由于本申请中预设有第一时长,服务器在确定本地缓存有接收到的第一解析请求中携带的域名所对应的目标解析结果,并确定该目标解析结果对应的有效期已到期的情况下,先向其他服务器转发接收到的第一解析请求,当确定在预设第一时长内未接收到其他服务器发送的该域名的解析结果后,便先发送缓存的目标解析结果,从而避免一直等待其他服务器发送该域名的解析结果所耗费的时间,并实现可以在预设第一时长内及时响应第一解析请求,提高服务器的响应效率以及用户体验。Since the first time duration is preset in this application, the server determines that the target resolution result corresponding to the domain name carried in the received first resolution request is cached locally, and determines that the validity period corresponding to the target resolution result has expired , First forward the received first resolution request to other servers, and when it is determined that the resolution result of the domain name sent by other servers is not received within the preset first time period, the cached target resolution result is sent first to avoid waiting all the time It takes time for other servers to send the resolution result of the domain name, and realizes that the first resolution request can be responded to in time within the preset first time period, which improves the response efficiency of the server and the user experience.
在上述各实施例的基础上,本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有可由处理器执行的计算机程序,当所述程序在所述处理器上运行时,使得所述处理器执行时实现如下步骤:On the basis of the foregoing embodiments, the present application also provides a computer-readable storage medium that stores a computer program executable by a processor, and when the program is on the processor At runtime, the following steps are realized when the processor is executed:
接收第一解析请求,并获取所述第一解析请求中携带的域名的信息;Receiving the first resolution request, and obtaining the domain name information carried in the first resolution request;
确定本地缓存有所述域名对应的目标解析结果,且所述目标解析结果对应的有效期已到期,则向其他服务器转发所述第一解析请求;Determining that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has expired, then forwarding the first resolution request to other servers;
确定在预设第一时长内未接收到所述其他服务器发送的所述域名的解析结果,发送所 述目标解析结果。It is determined that the resolution result of the domain name sent by the other server is not received within the preset first time period, and the target resolution result is sent.
在某些可能的实施方式中,所述确定在预设第一时长内未接收到所述其他服务器发送的所述域名的解析结果,包括:In some possible implementation manners, the determining that the domain name resolution result sent by the other server is not received within a preset first time period includes:
在所述预设第一时长内接收到所述其他服务器发送的失败响应信息;或Receiving failure response information sent by the other server within the preset first time period; or
在所述预设第一时长内未接收到所述其他服务器发送的响应信息,所述响应信息为成功响应信息,或失败响应信息,其中,所述成功响应信息中携带有所述域名的解析结果。The response information sent by the other server is not received within the preset first time period, and the response information is success response information or failure response information, wherein the success response information carries the resolution of the domain name result.
在某些可能的实施方式中,所述发送所述目标解析结果之后,所述方法还包括:In some possible implementation manners, after the sending the target analysis result, the method further includes:
接收到所述其他服务器发送的所述域名的解析结果时,根据所述解析结果对所述目标解析结果进行更新。When receiving the resolution result of the domain name sent by the other server, update the target resolution result according to the resolution result.
在某些可能的实施方式中,所述接收到所述其他服务器发送的所述域名的解析结果,包括:In some possible implementation manners, the receiving the resolution result of the domain name sent by the other server includes:
接收到所述域名对应的解析结果以及所述解析结果对应的有效期;Receiving the resolution result corresponding to the domain name and the validity period corresponding to the resolution result;
所述根据所述解析结果对所述目标解析结果进行更新,包括:The updating the target analysis result according to the analysis result includes:
根据所述解析结果对所述目标解析结果进行更新,并根据所述解析结果对应的有效期对所述目标解析结果对应的有效期进行更新。The target analysis result is updated according to the analysis result, and the validity period corresponding to the target analysis result is updated according to the validity period corresponding to the analysis result.
在某些可能的实施方式中,所述接收到所述其他服务器发送的所述域名的解析结果,包括:In some possible implementation manners, the receiving the resolution result of the domain name sent by the other server includes:
在预设第二时长内接收到所述其他服务器发送的所述域名的解析结果;或Receiving the resolution result of the domain name sent by the other server within the preset second time period; or
确定在预设第二时长内未接收到所述其他服务器发送的所述域名的解析结果,按照预设时间间隔向所述其他服务器发送所述第一解析请求,直至接收到所述其他服务器发送的所述域名的解析结果。It is determined that the resolution result of the domain name sent by the other server is not received within the preset second time period, and the first resolution request is sent to the other server at a preset time interval until the other server is sent The result of the resolution of the domain name.
在某些可能的实施方式中,若在预设第二时长内未接收到所述其他服务器发送的所述域名的解析结果,所述方法还包括:In some possible implementation manners, if the domain name resolution result sent by the other server is not received within the preset second time period, the method further includes:
在预设第三时长内接收到携带有所述域名的第二解析请求,则直接发送所述目标解析结果。If the second resolution request carrying the domain name is received within the preset third time period, the target resolution result is directly sent.
在某些可能的实施方式中,所述发送所述目标解析结果,包括:In some possible implementation manners, the sending the target analysis result includes:
发送所述目标解析结果及预先配置的时间段。Send the target analysis result and the pre-configured time period.
在某些可能的实施方式中,所述方法还包括:In some possible implementation manners, the method further includes:
若确定在预设第一时长内接收到所述其他服务器发送的所述域名的解析结果,则发送所述域名的解析结果。If it is determined that the resolution result of the domain name sent by the other server is received within the preset first time period, then the resolution result of the domain name is sent.
由于本申请中预设有第一时长,服务器在确定本地缓存有接收到的第一解析请求中携 带的域名所对应的目标解析结果,并确定该目标解析结果对应的有效期已到期的情况下,先向其他服务器转发接收到的第一解析请求,当确定在预设第一时长内未接收到其他服务器发送的该域名的解析结果后,便先发送缓存的目标解析结果,从而避免一直等待其他服务器发送该域名的解析结果所耗费的时间,并实现可以在预设第一时长内及时响应第一解析请求,提高服务器的响应效率以及用户体验。Since the first time duration is preset in this application, the server determines that the target resolution result corresponding to the domain name carried in the received first resolution request is cached locally, and determines that the validity period corresponding to the target resolution result has expired , First forward the received first resolution request to other servers. When it is determined that the resolution result of the domain name sent by other servers has not been received within the preset first time period, the cached target resolution result is sent first to avoid waiting It takes time for other servers to send the resolution result of the domain name, and realizes that the first resolution request can be responded to in time within the preset first time period, which improves the response efficiency of the server and the user experience.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。This application is described with reference to flowcharts and/or block diagrams of methods, equipment (systems), and computer program products according to this application. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are used to generate It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. In this way, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, then this application is also intended to include these modifications and variations.

Claims (10)

  1. 一种数据处理方法,其特征在于,所述方法包括:A data processing method, characterized in that the method includes:
    接收第一解析请求,并获取所述第一解析请求中携带的域名的信息;Receiving the first resolution request, and obtaining the domain name information carried in the first resolution request;
    确定本地缓存有所述域名对应的目标解析结果,且所述目标解析结果对应的有效期已到期,则向其他服务器转发所述第一解析请求;Determining that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has expired, then forwarding the first resolution request to other servers;
    确定在预设第一时长内未接收到所述其他服务器发送的所述域名的解析结果,发送所述目标解析结果。It is determined that the resolution result of the domain name sent by the other server is not received within the preset first time period, and the target resolution result is sent.
  2. 根据权利要求1所述的方法,其特征在于,所述确定在预设第一时长内未接收到所述其他服务器发送的所述域名的解析结果,包括:The method according to claim 1, wherein the determining that the resolution result of the domain name sent by the other server is not received within a preset first time period comprises:
    在所述预设第一时长内接收到所述其他服务器发送的失败响应信息;或Receiving failure response information sent by the other server within the preset first time period; or
    在所述预设第一时长内未接收到所述其他服务器发送的响应信息,所述响应信息为成功响应信息,或失败响应信息,其中,所述成功响应信息中携带有所述域名的解析结果。The response information sent by the other server is not received within the preset first time period, and the response information is success response information or failure response information, wherein the success response information carries the resolution of the domain name result.
  3. 根据权利要求1所述的方法,其特征在于,所述发送所述目标解析结果之后,所述方法还包括:The method according to claim 1, wherein after the sending of the target analysis result, the method further comprises:
    接收到所述其他服务器发送的所述域名的解析结果时,根据所述解析结果对所述目标解析结果进行更新。When receiving the resolution result of the domain name sent by the other server, update the target resolution result according to the resolution result.
  4. 根据权利要求3所述的方法,其特征在于,所述接收到所述其他服务器发送的所述域名的解析结果,包括:The method according to claim 3, wherein the receiving a resolution result of the domain name sent by the other server comprises:
    接收到所述域名对应的解析结果以及所述解析结果对应的有效期;Receiving the resolution result corresponding to the domain name and the validity period corresponding to the resolution result;
    所述根据所述解析结果对所述目标解析结果进行更新,包括:The updating the target analysis result according to the analysis result includes:
    根据所述解析结果对所述目标解析结果进行更新,并根据所述解析结果对应的有效期对所述目标解析结果对应的有效期进行更新。The target analysis result is updated according to the analysis result, and the validity period corresponding to the target analysis result is updated according to the validity period corresponding to the analysis result.
  5. 根据权利要求3所述的方法,其特征在于,所述接收到所述其他服务器发送的所述域名的解析结果,包括:The method according to claim 3, wherein the receiving a resolution result of the domain name sent by the other server comprises:
    在预设第二时长内接收到所述其他服务器发送的所述域名的解析结果;或Receiving the resolution result of the domain name sent by the other server within the preset second time period; or
    确定在预设第二时长内未接收到所述其他服务器发送的所述域名的解析结果,按照预设时间间隔向所述其他服务器发送所述第一解析请求,直至接收到所述其他服务器发送的所述域名的解析结果。It is determined that the resolution result of the domain name sent by the other server is not received within the preset second time period, and the first resolution request is sent to the other server at a preset time interval until the other server is sent The result of the resolution of the domain name.
  6. 根据权利要求5所述的方法,其特征在于,若在预设第二时长内未接收到所述其他服务器发送的所述域名的解析结果,所述方法还包括:The method according to claim 5, wherein if the domain name resolution result sent by the other server is not received within a preset second time period, the method further comprises:
    在预设第三时长内接收到携带有所述域名的第二解析请求,则直接发送所述目标解析结果。If the second resolution request carrying the domain name is received within the preset third time period, the target resolution result is directly sent.
  7. 根据权利要求1所述的方法,其特征在于,所述发送所述目标解析结果,包括:The method according to claim 1, wherein the sending the target analysis result comprises:
    发送所述目标解析结果及预先配置的时间段。Send the target analysis result and the pre-configured time period.
  8. 根据权利要求1-5任一所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-5, wherein the method further comprises:
    若确定在预设第一时长内接收到所述其他服务器发送的所述域名的解析结果,则发送所述域名的解析结果。If it is determined that the resolution result of the domain name sent by the other server is received within the preset first time period, then the resolution result of the domain name is sent.
  9. 一种服务器,其特征在于,所述服务器包括:A server, characterized in that, the server includes:
    通信器,所述通信器用于与其他服务器建立通信连接;A communicator, which is used to establish a communication connection with other servers;
    控制器,所述控制器用于执行:The controller, the controller is used to execute:
    控制所述通信器接收第一解析请求,并获取所述第一解析请求中携带的域名的信息;确定本地缓存有所述域名对应的目标解析结果,且所述目标解析结果对应的有效期已到期,则控制所述通信器向所述其他服务器发送所述第一解析请求;确定在预设第一时长内未通过所述通信器接收到所述其他服务器发送的所述域名的解析结果,控制所述通信器发送所述目标解析结果。Control the communicator to receive the first resolution request and obtain the domain name information carried in the first resolution request; determine that the target resolution result corresponding to the domain name is cached locally, and the validity period corresponding to the target resolution result has expired Within a preset first time period, the communicator is controlled to send the first resolution request to the other server; it is determined that the domain name resolution result sent by the other server is not received by the communicator within the preset first time period, Controlling the communicator to send the target analysis result.
  10. 一种计算机可读存储介质,其特征在于,其存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-8中任一所述数据处理方法的步骤。A computer-readable storage medium, characterized in that it stores a computer program that, when executed by a processor, implements the steps of the data processing method according to any one of claims 1-8.
PCT/CN2020/130190 2020-10-12 2020-11-19 Server, data processing method and medium WO2021120977A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011084472.1 2020-10-12
CN202011084472.1A CN112422705A (en) 2020-10-12 2020-10-12 Server, data processing method and medium

Publications (1)

Publication Number Publication Date
WO2021120977A1 true WO2021120977A1 (en) 2021-06-24

Family

ID=74853972

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/130190 WO2021120977A1 (en) 2020-10-12 2020-11-19 Server, data processing method and medium

Country Status (2)

Country Link
CN (1) CN112422705A (en)
WO (1) WO2021120977A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113905099B (en) * 2021-09-26 2023-12-19 北京达佳互联信息技术有限公司 Control method and device for reporting request, server, terminal and storage medium
CN115051876A (en) * 2022-08-12 2022-09-13 中兴通讯股份有限公司 Communication method, XR linkage communication system, operation control device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065762A (en) * 2014-05-30 2014-09-24 小米科技有限责任公司 Method and device for detecting hijacking of DNS (Domain Name Server)
US20190007522A1 (en) * 2017-06-23 2019-01-03 Nokia Solutions And Networks Oy Method of optimizing traffic in an isp network
CN110572390A (en) * 2019-09-06 2019-12-13 深圳平安通信科技有限公司 Method, device, computer equipment and storage medium for detecting domain name hijacking

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9906488B2 (en) * 2010-10-26 2018-02-27 Cedexis, Inc. Surrogate name delivery network
CN106331212B (en) * 2016-08-25 2019-05-07 北京润通丰华科技有限公司 A kind of domain name analytic method and system resident based on DNS cache
CN109639748B (en) * 2017-10-09 2021-10-26 阿里巴巴集团控股有限公司 Cache updating method, device and system of DNS (Domain name Server) and domain name system
CN110290233A (en) * 2019-06-27 2019-09-27 广州虎牙科技有限公司 Domain name analytic method, device, server and computer readable storage medium
CN110855806A (en) * 2019-09-27 2020-02-28 网宿科技股份有限公司 Domain name request processing method and device and server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065762A (en) * 2014-05-30 2014-09-24 小米科技有限责任公司 Method and device for detecting hijacking of DNS (Domain Name Server)
US20190007522A1 (en) * 2017-06-23 2019-01-03 Nokia Solutions And Networks Oy Method of optimizing traffic in an isp network
CN110572390A (en) * 2019-09-06 2019-12-13 深圳平安通信科技有限公司 Method, device, computer equipment and storage medium for detecting domain name hijacking

Also Published As

Publication number Publication date
CN112422705A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
JP6514699B2 (en) Facilitates third party execution of batch processing of requests that require authorization from the resource owner for repeated access to the resource
US20200221376A1 (en) PDU Type Setting Method, UE Policy Setting Method, and Related Entity
WO2020233059A1 (en) Login processing method based on data processing and related apparatus
EP3668063A1 (en) Domain name resolution method, server and system
EP2665228B1 (en) Method for adjusting resources dynamically and scheduling device
US11159649B2 (en) Systems and methods of rate limiting for a representational state transfer (REST) application programming interface (API)
WO2021120977A1 (en) Server, data processing method and medium
WO2019237594A1 (en) Session persistence method and apparatus, and computer device and storage medium
KR102166589B1 (en) Method and apparatus for realizing communication between web page and native application, and electronic device
CN111147453A (en) System login method and integrated login system
US20110161663A1 (en) Intelligent caching for ocsp service optimization
JP2017123140A (en) Method and apparatus for updating object data in object storage system
US11677850B2 (en) Method, apparatus and system for notification
WO2021007752A1 (en) Return-to-source method and related device in content delivery network
CN107026879B (en) Data caching method and background application system
WO2021120355A1 (en) Domain name parsing method, authoritative domain name server and local domain name server
WO2018223789A1 (en) Method and system for performing operation with respect to transaction id, and computer readable storage medium
WO2021031905A1 (en) Data management method, apparatus, device and system and computer-readable storage medium
CN111597213A (en) Caching method, software server and storage medium
US20070265976A1 (en) License distribution in a packet data network
CN111782391A (en) Resource allocation method, device, electronic equipment and storage medium
WO2017000669A1 (en) Centralised management control method, apparatus, and related device for domain name resource record caching
JP5109901B2 (en) Session data sharing method
US20190223004A1 (en) Implementation method, apparatus and system for remote access
EP3288242B1 (en) Domain name system accessing method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20901214

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 18/07/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20901214

Country of ref document: EP

Kind code of ref document: A1