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

Server, data processing method and medium Download PDF

Info

Publication number
CN112422705A
CN112422705A CN202011084472.1A CN202011084472A CN112422705A CN 112422705 A CN112422705 A CN 112422705A CN 202011084472 A CN202011084472 A CN 202011084472A CN 112422705 A CN112422705 A CN 112422705A
Authority
CN
China
Prior art keywords
domain name
resolution
result
server
servers
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011084472.1A
Other languages
Chinese (zh)
Inventor
刘云冲
矫恒浩
马忠飞
赵贝
张宏波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Hisense Media Network Technology Co Ltd
Juhaokan Technology Co Ltd
Original Assignee
Qingdao Hisense Media Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Hisense Media Network Technology Co Ltd filed Critical Qingdao Hisense Media Network Technology Co Ltd
Priority to CN202011084472.1A priority Critical patent/CN112422705A/en
Priority to PCT/CN2020/130190 priority patent/WO2021120977A1/en
Publication of CN112422705A publication Critical patent/CN112422705A/en
Pending legal-status Critical Current

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]

Landscapes

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

Abstract

The application discloses a server, a data processing method and a medium, which are used for solving the problems that the existing server cannot respond to an analysis request sent by intelligent equipment in time, and the response efficiency of the server and the user experience are reduced. The server transmits the received first analysis request to other servers under the condition that the target analysis result corresponding to the domain name carried in the received first analysis request is determined to be locally cached and the validity period corresponding to the target analysis result is determined to be due, and the cached target analysis result is transmitted first after the analysis result of the domain name transmitted by other servers is determined not to be received within the preset first time period, so that the time consumed by waiting for other servers to transmit the analysis result of the domain name is avoided, the first analysis request can be responded in time within the preset first time period, and the response efficiency of the server and the user experience are improved.

Description

Server, data processing method and medium
Technical Field
The present application relates to the field of computer communications, and in particular, to a server, a data processing method, an apparatus, and a medium.
Background
In the prior art, a DNS server stores a correspondence between an analysis result such as an IP address and a domain name, and can determine a target analysis result corresponding to the domain name carried in a received analysis request according to the correspondence between the analysis result and the domain name, thereby feeding back the target analysis result to an intelligent device of a user.
In an actual application scenario, fig. 1 is a schematic view of a scenario in which an existing server processes a domain name. As shown in fig. 1, the intelligent device of the user initiates an analysis request, for example, an analysis request for querying an IP address of www.example.com, to a server provided by a network operator or other public servers, and after receiving the analysis request, the server obtains a domain name carried in the analysis request, and queries whether an analysis result corresponding to the domain name is stored according to the domain name. If the analysis result corresponding to the domain name is stored and the validity period corresponding to the analysis result is not due, the server sends the acquired analysis result to the intelligent equipment; otherwise, the resolution request is forwarded to other preconfigured servers, such as a recursive DNS server, iteratively forwarded to the root server through other DNS servers, and iteratively forwarded to authority servers of each level through other DNS servers, so as to obtain resolution results of the domain name carried in the resolution request by other servers, the obtained resolution results are sent to the intelligent device, and the domain name and the resolution result corresponding to the domain name are locally cached, so that when the resolution request carrying the domain name is received again in the following process, the cached resolution result corresponding to the domain name can be directly sent to the intelligent device, and the response efficiency to the intelligent device is improved.
When the other servers receive the resolution result again, the server determines that the resolution result corresponding to the domain name exceeds the valid period, and determines that the resolution result corresponding to the domain name is invalid, and needs to query the resolution result corresponding to the domain name from the other servers again, and sends the resolution result corresponding to the domain name sent by the other servers to the intelligent device.
For the processing method, when the resolution result corresponding to a certain domain name cached by the server expires and other servers fail, the server cannot acquire the resolution result of the domain name fed back by other servers in time and waits for the resolution result of the domain name fed back by other servers all the time, so that the server cannot respond to the resolution request in time, and the response efficiency of the server and the user experience are reduced.
Disclosure of Invention
The application provides a server, a data processing method, a data processing device and a data processing medium, which are used for solving the problems that the existing server cannot respond to an analysis request in time, and the response efficiency and the user experience of the server are reduced.
In a first aspect, the present application provides a data processing method, including:
receiving a first analysis request, and acquiring domain name information carried in the first analysis request;
determining that a target analysis result corresponding to the domain name is cached locally, and if the validity period corresponding to the target analysis result is expired, forwarding the first analysis request to other servers;
and determining that the domain name resolution results sent by the other servers are not received within a preset first time length, and sending the target resolution results.
In a second aspect, the present application provides a server, comprising:
a communicator for establishing a communication connection with other servers;
a controller to perform:
controlling the communicator to receive a first analysis request and acquiring domain name information carried in the first analysis request; if the target analysis result corresponding to the domain name is determined to be cached locally and the validity period corresponding to the target analysis result is expired, controlling the communicator to send the first analysis request to the other servers; and determining that the resolution result of the domain name sent by the other server is not received by the communicator within a preset first time, and controlling the communicator to send the target resolution result.
In a third aspect, the present application provides a data processing apparatus, comprising:
the receiving unit is used for receiving a first analysis request and acquiring the domain name information carried in the first analysis request;
a first processing unit, configured to determine that a target resolution result corresponding to the domain name is locally cached, and if a validity period corresponding to the target resolution result expires, forward the first resolution request to another server;
and the second processing unit is used for determining that the domain name resolution results sent by the other servers are not received within a preset first time length, and sending the target resolution results.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the data processing method as described above.
The server transmits the received first analysis request to other servers under the condition that the target analysis result corresponding to the domain name carried in the received first analysis request is determined to be locally cached and the validity period corresponding to the target analysis result is determined to be due, and the cached target analysis result is transmitted first after the analysis result of the domain name transmitted by other servers is determined not to be received within the preset first time period, so that the time consumed by waiting for other servers to transmit the analysis result of the domain name is avoided, the first analysis request can be responded in time within the preset first time period, and the response efficiency of the server and the user experience are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a scenario in which a domain name is processed by a conventional server;
FIG. 2 is a schematic diagram of a data processing process provided in some embodiments of the present application;
FIG. 3 is a schematic diagram of a conventional data processing flow;
FIG. 4 is a block diagram illustrating a specific data processing flow according to some embodiments of the present application;
FIG. 5 is a block diagram of a server according to some embodiments of the present application;
fig. 6 is a schematic structural diagram of a data processing apparatus according to some embodiments of the present application.
Detailed Description
In order to improve the response efficiency of a server to an analysis request and improve user experience, the application provides the server, a data processing method, a data processing device and a medium.
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In actual use, the user's smart device initiates a resolution request to a server provided by the network operator or otherwise public, for example, a resolution request to query www.example.com for the IP address. After receiving an analysis request for analyzing a certain domain name sent by the intelligent device, the server performs corresponding processing on the analysis request to acquire domain name information carried in the analysis request. In order to realize the fast forwarding of the resolution results corresponding to some domain names to the intelligent device, the server pre-caches the resolution results corresponding to some domain names and the validity periods corresponding to the resolution results, after the resolution results in the resolution request are obtained, the domain name is matched with the domain name in which the resolution results are cached, when the matched domain name exists, whether the validity period corresponding to the target resolution result corresponding to the matched domain name expires is determined, and if the validity period corresponding to the target resolution result expires is determined, the resolution results can be sent to other servers. And determining whether to directly send the target analysis result according to whether to receive the analysis result of the domain name sent by other servers within a preset first time period.
Fig. 2 is a schematic diagram of a data processing process provided in some embodiments of the present application, where the process includes:
s201: receiving a first analysis request, and acquiring domain name information carried in the first analysis request.
In the application, the data processing method provided by the application is applied to a server.
In the actual application process, when a user wants to access a certain website through a certain registered domain name, the user can acquire the IP address of a certain page of the certain website by inputting the domain name, so that the purpose of accessing the certain website is achieved. After receiving the domain name input by the user, the intelligent device generates a corresponding first resolution request according to the domain name, and sends the generated first resolution request to a server provided by a network operator or other public servers. And after receiving the first resolution request, the subsequent server acquires the domain name information carried in the first resolution request through corresponding processing. Then, based on the data processing method provided by the application, the information of the domain name is correspondingly processed, so that the first resolution request is responded.
The first analysis request received by the server may be an analysis request sent by the smart device, or an analysis request sent by the smart device and forwarded by a subordinate server.
S202: and if the local cache is determined to have the target analysis result corresponding to the domain name and the validity period corresponding to the target analysis result is expired, forwarding the first analysis request to other servers.
S203: and determining that the domain name resolution results sent by the other servers are not received within a preset first time length, and sending the target resolution results.
In an actual application scenario, the situation of modifying the resolution result corresponding to the domain name occurs relatively rarely, for example, the IP address corresponding to a certain domain name is modified, so that the resolution result of the domain name obtained by re-querying another server is the same as that obtained before in most cases. Therefore, in order to facilitate the subsequent intelligent device to obtain the resolution result of the accessed domain name in time, the server may cache the received resolution result of a certain domain name sent by another server, so that when the second resolution request carrying the domain name is received again in the subsequent process, the locally cached resolution result of the domain name is directly sent, and the efficiency of responding to the resolution request is improved.
In order that a server does not continuously send a target analysis result corresponding to a domain name cached locally, namely an incorrect analysis result is sent when an analysis result of the domain name changes, the intelligent device is influenced to access subsequent services, and when other servers send the analysis result of any domain name to the server, the other servers also send a valid period corresponding to the analysis result. After receiving the resolution result of the domain name and the valid period corresponding to the resolution result, the server caches the resolution result of the domain name, the time for receiving the resolution result and the valid period corresponding to the resolution result, and determines whether the valid period corresponding to the resolution result of the domain name is due according to the time for receiving the resolution request and the valid period corresponding to the resolution result when the subsequent intelligent device requests the resolution result of the domain name, so that the server can forward the received first resolution request to other servers when the valid period corresponding to the resolution result is due, and 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 for determining whether the valid period corresponding to the resolution result of the domain name is due according to the time when the resolution request is received and the valid period corresponding to the resolution result comprises the following steps:
the first method starts timing when the analysis result is received. And subsequently judging whether the time length recorded by the timer when the analysis request is received is greater than the valid period corresponding to the analysis result, and determining whether the valid period corresponding to the analysis result of the domain name is expired. If so, determining that the validity period corresponding to the resolution result of the domain name is expired; otherwise, determining that the validity period corresponding to the resolution result of the domain name is not due.
And secondly, when the analysis result is received, counting down from the validity period corresponding to the analysis result. And subsequently judging whether the remaining time recorded by the timer is 0 or not when the analysis request is received, and determining whether the valid period corresponding to the analysis result of the domain name is expired or not. If so, determining that the validity period corresponding to the resolution result of the domain name is expired; otherwise, determining that the validity period corresponding to the resolution result of the domain name is not due.
And thirdly, when the analysis result is received, determining an effective time range according to the current time for receiving the analysis result and the effective period corresponding to the analysis result. And subsequently judging whether the time when the resolution request is received is within the valid time range, and determining whether the valid period corresponding to the resolution result of the domain name is due. If so, determining that the validity period corresponding to the resolution result of the domain name is expired; otherwise, determining that the validity period corresponding to the resolution result of the domain name is not due.
For the above method, once other servers have a fault or deny the server access, the server is easily caused to wait for other servers to feed back the resolution result of the domain name, so that the first resolution request of the user cannot be continuously responded, and further the access of the subsequent service of the user is affected.
In a possible implementation manner, in order to respond to the first resolution request in time, after the information of the domain name carried in the first resolution request is acquired, the domain name is matched with the domain name in which the resolution result is cached, when the matched domain name exists, whether the valid period corresponding to the target resolution result corresponding to the matched domain name expires is determined, if the valid period corresponding to the target resolution result expires is determined, the target resolution result is sent, and the first resolution request is forwarded to other servers, so that the target resolution result and the valid period corresponding to the target resolution result which are cached locally at present are updated.
Through the method, although the server can respond to the first resolution request of the user in time, and the target resolution result locally cached by the server is correct under most conditions, once the resolution result of a certain domain name changes and other servers can respond normally, the server directly sends the target resolution result locally cached corresponding to the domain name, so that the intelligent device can perform subsequent service processing according to the target resolution result, and subsequent service access of the user is influenced. Therefore, in order to respond to the first resolution request in time and ensure the accuracy of the resolution result of the domain name sent to the intelligent device as much as possible, in the present application, after it is determined that a target resolution result corresponding to a certain domain name is cached locally and the validity period corresponding to the target resolution result has expired, the first resolution request is forwarded to another server, and according to whether the resolution result of the domain name sent by another server is received within a preset first time period, it is determined how to respond to the first resolution request of the intelligent device.
In a specific implementation process, if it is determined that the domain name resolution result sent by the other server is not received within a preset first time period, which indicates that network delay may occur or other servers fail, the target resolution result is sent first.
If the first analysis request is sent by the intelligent equipment, when the analysis result of the domain name sent by the other server is determined not to be received within a preset first time period, the target analysis result is sent to the intelligent equipment; and if the first analysis result is forwarded by the lower-level server, when determining that the analysis result of the domain name sent by the other server is not received within a preset first time period, sending the target analysis result to the lower-level server.
S204: and if the domain name resolution results sent by the other servers are determined to be received within a preset first time period, sending the domain name resolution results.
In a possible implementation manner, in order to ensure accuracy of the server responding to the first resolution request, in the present application, if it is determined that the resolution result of the domain name sent by another server is received within a preset first time period, which indicates that the other server is currently working normally, in order to ensure accurate response to the first resolution request, the received resolution result of the domain name sent by the other server is sent.
If the first resolution request is sent by the intelligent equipment, determining that the resolution result of the domain name sent by the other server is received within a preset first time period, and sending the resolution result of the domain name to the intelligent equipment; and if the first resolution result is forwarded by the lower-level server, determining that the resolution result of the domain name sent by the other server is received within a preset first time period, and sending the resolution result of the domain name to the lower-level server.
In the present application, when the first time duration is set, the first time duration may be determined empirically, or different values may be set according to different scenes. If it is desired to ensure the efficiency of the server responding to the first resolution request, the preset first duration may be set to be shorter, and if it is desired to avoid that the resolution result of the domain name normally sent by another server cannot be sent due to the too short first duration, the preset first duration may be set to be longer. Preferably, the time length of the normal interaction between each other server and the server can be set according to statistics.
The server transmits the received first analysis request to other servers under the condition that the target analysis result corresponding to the domain name carried in the received first analysis request is determined to be locally cached and the validity period corresponding to the target analysis result is determined to be due, and the cached target analysis result is transmitted first after the analysis result of the domain name transmitted by other servers is determined not to be received within the preset first time period, so that the time consumed by waiting for other servers to transmit the analysis result of the domain name is avoided, the first analysis request can be responded in time within the preset first time period, and the response efficiency of the server and the user experience are improved.
In order to accurately determine whether another server may fail, on the basis of the foregoing embodiment, in the present application, determining that the resolution result of the domain name sent by the other server is not received within a preset first time period includes:
receiving failure response information sent by the other servers within the preset first time period; or
Response information sent by other servers is not received within the preset first duration, and the response information is success response information or failure response information, wherein the success response information carries the domain name resolution result.
In an actual application scenario, conditions such as network delay and other server failures may occur, so that the server cannot receive the resolution result of the domain name sent by the other server within a preset first time period. Specifically, when network delay occurs, communication delay between other servers and the server may be caused, so that the server cannot receive the resolution result of the domain name sent by the other server within a preset first time period; when a network fault occurs, communication connection cannot be established between other servers and the server, so that the server cannot receive the resolution result of the domain name sent by other servers within a preset first time period; when other servers fail, the server may not receive the resolution result of the domain name sent by other servers within a preset first time period or receive failure response information sent by other servers, such as servfile, release, and the like. Based on this, in the present application, the server determines that the resolution result of the domain name sent by another server is not received within the preset first duration, including the following cases:
in the first situation, if failure response information sent by other servers is received within a preset first time period, which indicates that other servers may have a fault and cannot be recovered temporarily, it is determined that an analysis result of a domain name sent by other servers is not received within the preset first time period.
And in the second case, if the response information sent by the other server is not received within the preset first time period, that is, the successful response information or the failed response information sent by the other server is not received within the preset first time period, 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 successful response information carries the resolution result of the domain name, such as NOERROR, nxdmoin, and the like.
And when determining that the domain name resolution results sent by other servers are not received within the preset first time period based on the above situation, the server directly sends the locally cached target resolution results.
Further, network delay may occur, or the first resolution request sent by the server cannot be processed within a preset first time period due to more processing tasks of other servers, so that the server cannot receive the resolution result of the domain name sent by other servers within the preset first time period, and after the target resolution result of the local cache is sent, the resolution result of the domain name sent by other servers is received. In order to ensure the accuracy of the response of the server to the first resolution request when the intelligent device subsequently performs the first resolution request on the domain name again, after the server sends the locally cached target resolution result, if the resolution result of the domain name sent by another server is received, the locally cached target resolution result corresponding to the domain name is updated according to the currently received resolution result of the domain name sent by another server. Specifically, after sending the target analysis result, the method further includes:
and when the domain name resolution results sent by the other servers are received, updating the target resolution result according to the resolution results.
In an actual application scenario, when sending the domain name resolution result to the server, the other servers generally send the valid 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 resolution result of the domain name from the other servers in time, thereby updating the locally cached target resolution result according to the domain name resolution result sent by the other servers and improving the accuracy of the subsequent response to the domain name resolution request. Therefore, in the present 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 updated according to the validity period corresponding to the resolution result. Specifically, the receiving the resolution result of the domain name sent by the other server includes:
receiving an analysis result corresponding to the domain name and an effective period corresponding to the analysis result;
the updating the target analysis result according to the analysis result comprises:
and updating the target analysis result according to the analysis result, and updating the validity period corresponding to the target analysis result 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 domain name resolution results sent by the other servers within a preset second time period; or
And determining that the analysis results of the domain name sent by the other servers are not received within a preset second time, and sending the first analysis request to the other servers according to a preset time interval until the analysis results of the domain name sent by the other servers are received.
In an actual application scenario, since network delay may occur or tasks processed by other servers at present are more, the first resolution request cannot be processed within a preset first time period, but when the network does not delay or other servers process the first resolution request, the server does not need to send the first resolution request to other servers again, and may also receive resolution results of the domain name sent by other servers. Therefore, in order to avoid that the server frequently forwards the first parsing request to other servers, in the 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 a second preset time period after the server does not receive the resolution result of the domain name sent by the other server within the preset first time period. And if the analysis result of the domain name sent by other servers is received within a second preset time, directly updating the target analysis result of the local cache according to the received analysis result of the domain name.
In a possible implementation manner, a network failure, a failure of another server, and the like may occur, so that another server cannot normally receive the first resolution request forwarded by the server, or send the resolution result of the domain name to the server, and therefore, in order to obtain the resolution result of the domain name sent by another server in time and improve the accuracy of the subsequent response to the first resolution request carrying the domain name, in the present application, if the resolution result of the domain name sent by another server is not received within a second preset time period, the other server does not wait for the resolution result sent by the domain name carried in the first resolution request forwarded last time, and forwards the first resolution request to another server according to a preset time interval until the resolution result of the domain name sent by another server is received, so as to obtain the resolution result of the domain name according to the received resolution result, and updating the target analysis result of the local cache.
If the resolution results of the domain names sent by the other servers are not received within a preset second time period, the method further comprises the following steps:
and if a second analysis request carrying the domain name is received within a preset third time length, directly sending the target analysis result.
In another possible implementation manner, in order to avoid a situation that the first resolution request is frequently forwarded to other servers and the load pressure of other servers is high, after the resolution result of the domain name sent by other servers is 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 time period, the server does not forward the second resolution request to other servers, and directly sends the target resolution result corresponding to the domain name cached locally. Therefore, in the present application, the third duration is preset. After the analysis results of the domain names sent by other servers are not received within the preset second time period, if a second analysis request carrying the domain name is received within the preset third time period, the target analysis result of the local cache is directly sent.
The server receives the domain name resolution results sent by other servers and also receives the valid periods corresponding to the resolution results sent by other servers, updates the locally cached target resolution results according to the received domain name resolution results, and updates the valid periods corresponding to the locally cached target resolution results according to the received valid periods corresponding to the resolution results.
In the present application, when the second time length is set, the second time length may be determined empirically, or may be set to a different value depending on a scene. If it is desired to reduce the time spent waiting for other servers to send the resolution result of the domain name, the preset second duration may be set to be shorter, and if it is desired to reduce the number of times of frequently forwarding the first resolution request to other servers, the preset second duration may be set to be longer.
When the third time length is set, it may be determined empirically, or may be set to different values according to different scenes. If the resolution result of the domain name has strict requirements, the preset third duration may be set to be shorter, and if the number of times of frequently forwarding the second resolution request to other servers is desired to be reduced, the preset third duration may be set to be longer.
Similarly, the time interval may be determined empirically, or may be set to a different value depending on the scene. If it is desired to acquire the resolution result of the domain name sent by the other server as soon as possible, the time interval may be set to be shorter, and if it is desired to reduce the number of times of frequently forwarding the first resolution request to the other server, the time interval may be set to be longer.
In another possible implementation manner, it may occur that a server receives an analysis request for a certain domain name for the first time, the server does not locally cache a target analysis result corresponding to the domain name, and in order to respond to the analysis request sent by the intelligent device, the server needs to forward the analysis request to another server to obtain an analysis result of the domain name carried in the analysis request sent by the other server, send the received analysis result of the domain name, and cache the domain name and the analysis result corresponding to the domain name locally.
The server receives the domain name resolution results sent by other servers and also receives the valid periods corresponding to the resolution results sent by other servers, and the server caches the domain name, the domain name resolution results and the valid periods corresponding to the resolution results locally.
When the validity period is set, the validity periods with different durations can be set according to different scenes. If the accuracy of the resolution result of a certain domain name sent to the intelligent device is strictly guaranteed, the validity period of the domain name can be set to be shorter, so that the server can frequently update the target resolution result corresponding to the certain domain name cached locally; if it is desired to effectively reduce the frequency of the server forwarding the analysis request to other servers, reduce the load of other servers when processing the analysis request, improve the service performance, and process more analysis requests, the validity period of the domain name may be set longer.
Similarly, it is determined that the resolution result of the domain name sent by another server is not received within the preset first time period, and when the server sends the target resolution result, the server also sends a pre-configured time period to the receiving device (including the intelligent device and the lower-level server), that is, the pre-configured time period is sent to the receiving device as the valid period corresponding to the target resolution result, so that the receiving device updates the locally cached resolution result of the domain name and the valid period corresponding to the resolution result according to the target resolution result and the pre-configured time period.
It should be noted that the setting method of the preconfigured time period is the same as the setting method of the validity period, and repeated parts are not described again.
In addition, if it is determined that the target resolution result corresponding to the domain name is locally cached, and the validity period corresponding to the target resolution result is not due, the method further includes:
and sending the target analysis result.
Certainly, after the server determines that the target analysis result corresponding to the domain name is locally cached, the valid period corresponding to the target analysis result is not due, the server directly sends the target analysis result, and does not need to request the analysis result of the domain name carried in the analysis request from other servers, so that the target analysis result locally cached is updated according to the received analysis result.
Fig. 3 is a schematic diagram of a conventional data processing flow, which includes:
s301: and receiving a first resolution request and acquiring the domain name information carried in the first resolution request.
S302: and judging whether a target analysis result corresponding to the domain name is cached locally, if so, executing S303, otherwise, executing S304.
S303: determining whether the validity period corresponding to the target parsing result is expired, if so, executing S304, otherwise, executing S308.
S304: the resolution request is forwarded to other servers.
S305: and judging whether successful response information sent by other servers is received, if so, executing S306, and otherwise, executing S307.
S306: and sending the resolution result of the domain name carried in the successful response information and caching the successful response information.
If the target analysis result corresponding to the domain name is cached locally, updating the target analysis result according to the analysis result of the domain name carried in the successful response information, and updating 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; if the target analysis result corresponding to the domain name is not cached locally, the analysis result of the domain name carried in the successful response information and the validity period corresponding to the analysis result are directly saved.
S307: and continuing to wait until receiving the successful response information sent by other servers, and then executing S306.
S308: and directly sending the cached target analysis result.
For convenience of explanation of the data processing method provided in the present application, the following description is made by way of specific examples:
fig. 4 is a schematic diagram of a specific data processing flow provided in some embodiments of the present application, where the flow includes:
s401: and receiving a first resolution request and acquiring the domain name information carried in the first resolution request.
S402: and judging whether a target analysis result corresponding to the domain name is cached locally, if so, executing S403, otherwise, executing S412.
S403: and judging whether the validity period corresponding to the target analysis result is expired, if so, executing S404, otherwise, executing S414.
S404: and forwarding the first resolving request to other servers.
S405: and judging whether response information sent by the other server is received within a preset first time period, if so, executing S406, and otherwise, executing S408.
S406: and judging whether the response message is a successful response message, if so, executing S407, otherwise, executing S408.
S407: and sending the domain name resolution result carried in the successful response information, updating the target resolution result according to the resolution result, and updating the validity period corresponding to the target resolution result according to the validity period corresponding to the resolution result carried in the successful response information.
S408: and sending the target analysis result.
S409: and judging whether successful response information sent by the other server is received within a preset second time length, if so, executing S410, and otherwise, executing S411.
S410: and updating the target analysis result according to the analysis result carried in the successful response result, and updating 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: and if a second analysis request carrying the domain name is received within a preset third time length, directly sending the target analysis result.
S412: the resolution request is forwarded to other servers.
S413: and receiving successful response information sent by other servers, storing the resolution result of the domain name carried in the successful response information and the validity period corresponding to the resolution result, and sending the resolution result of the domain name.
S414: and sending the target analysis result.
The present application further provides a server, and fig. 5 is a schematic structural diagram of a server provided in some embodiments of the present application, where the server includes:
a communicator 51 for establishing a communication connection with other servers;
a controller 52 for performing:
controlling the communicator 51 to receive a first resolution request and obtain domain name information carried in the first resolution request; determining that a target resolution result corresponding to the domain name is cached locally, and if a validity period corresponding to the target resolution result expires, controlling the communicator 51 to send the first resolution request to the other server; determining that the domain name resolution result sent by the other server is not received through the communicator 51 within a preset first time period, and controlling the communicator 51 to send the target resolution result.
The principle of solving the problem by the server provided by the present application is the same as that of solving the problem by the data processing method in the above embodiment, and reference is specifically made to the above embodiment, and repeated details are not described herein.
In some possible embodiments, the controller 52 is configured to perform:
receiving failure response information sent by the other server through the communicator 51 within the preset first time length; or
Response information sent by the other servers is not received through the communicator 51 within the preset first duration, where the response information is success response information or failure response information, and the success response information carries an analysis result of the domain name.
In some possible embodiments, the controller 52 is configured to perform:
after the target resolution result is sent by the communicator 51, when the resolution result of the domain name sent by the other server is received by the communicator 51, the target resolution result is updated according to the resolution result.
In some possible embodiments, the controller 52 is configured to perform:
receiving, by the communicator 51, an analysis result corresponding to the domain name and an expiration date corresponding to the analysis result; and updating the target analysis result according to the analysis result, and updating the validity period corresponding to the target analysis result according to the validity period corresponding to the analysis result.
In some possible embodiments, the controller 52 is configured to perform:
receiving the resolution result of the domain name sent by the other server through the communicator 51 within a preset second time period; or
Determining that the domain name resolution result sent by the other server is not received by the communicator 51 within a preset second duration, and sending the first resolution request to the other server by the communicator 51 according to a preset time interval until the domain name resolution result sent by the other server is received by the communicator 51.
In some possible embodiments, the controller 52 is configured to perform:
if the analysis result of the domain name sent by the other server is not received within the preset second time period, and a second analysis request carrying the domain name is received through the communicator 51 within the preset third time period, the target analysis result is directly sent through the communicator 51.
In some possible embodiments, the controller 52 is configured to perform:
and sending the target analysis result and a preset time period through the communicator 51.
In some possible embodiments, the controller 52 is configured to perform:
and if the domain name resolution results sent by the other servers are determined to be received within a preset first time period, sending the domain name resolution results.
The server transmits the received first analysis request to other servers under the condition that the target analysis result corresponding to the domain name carried in the received first analysis request is determined to be locally cached and the validity period corresponding to the target analysis result is determined to be due, and the cached target analysis result is transmitted first after the analysis result of the domain name transmitted by other servers is determined not to be received within the preset first time period, so that the time consumed by waiting for other servers to transmit the analysis result of the domain name is avoided, the first analysis request can be responded in time within the preset first time period, and the response efficiency of the server and the user experience are improved.
Fig. 6 is a schematic structural diagram of a data processing apparatus according to some embodiments of the present application, where the apparatus includes:
the receiving unit 61 is configured to receive a first resolution request sent by an intelligent device, and acquire domain name information carried in the first resolution request;
a first processing unit 62, configured to determine that a target resolution result corresponding to the domain name is locally cached, and if a validity period corresponding to the target resolution result expires, forward the first resolution request to another server;
and 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.
In some possible embodiments, 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 response information sent by the other servers is not received within the preset first time, wherein the response information is success response information or failure response information, and the success response information carries the resolution result of the domain name.
In some possible embodiments, the receiving unit 61 is further configured to receive, after sending the target resolution result, the resolution result of the domain name sent by the other server;
the device further comprises:
and the updating unit is used for updating the target analysis result according to the received analysis result.
In some possible embodiments, the receiving unit 61 is specifically configured to receive an analysis result corresponding to the domain name and an expiration date corresponding to the analysis result;
the updating 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.
In some possible embodiments, the receiving unit 61 is specifically configured to receive, within a preset second time period, a resolution result of the domain name sent by the other server; or determining that the domain name resolution results sent by the other servers are not received within a preset second time period, and sending the first resolution request to the other servers according to a preset time interval until the domain name resolution results sent by the other servers are received.
In some possible embodiments, the second processing unit 63 is further configured to, if the domain name resolution result sent by the other server is not received within a preset second time period, and a second resolution request carrying the domain name is received within a preset third time period, directly send the target resolution result.
In some possible embodiments, the first processing unit 62 is further configured to send the target parsing result and a preconfigured time period.
In some possible embodiments, the first processing unit 62 is further configured to send the resolution result of the domain name 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.
The server transmits the received first analysis request to other servers under the condition that the target analysis result corresponding to the domain name carried in the received first analysis request is determined to be locally cached and the validity period corresponding to the target analysis result is determined to be due, and the cached target analysis result is transmitted first after the analysis result of the domain name transmitted by other servers is determined not to be received within the preset first time period, so that the time consumed by waiting for other servers to transmit the analysis result of the domain name is avoided, the first analysis request can be responded in time within the preset first time period, and the response efficiency of the server and the user experience are improved.
On the basis of the foregoing embodiments, the present application further provides a computer-readable storage medium, in which a computer program executable by a processor is stored, and when the program is run on the processor, the processor is caused to execute the following steps:
receiving a first analysis request, and acquiring domain name information carried in the first analysis request;
determining that a target analysis result corresponding to the domain name is cached locally, and if the validity period corresponding to the target analysis result is expired, forwarding the first analysis request to other servers;
and determining that the domain name resolution results sent by the other servers are not received within a preset first time length, and sending the target resolution results.
In some possible embodiments, the determining that the resolution result of the domain name sent by the other server is not received within a preset first time period includes:
receiving failure response information sent by the other servers within the preset first time period; or
Response information sent by other servers is not received within the preset first duration, and the response information is success response information or failure response information, wherein the success response information carries the domain name resolution result.
In some possible embodiments, after sending the target parsing result, the method further includes:
and when the domain name resolution results sent by the other servers are received, updating the target resolution result according to the resolution results.
In some possible embodiments, the receiving the resolution result of the domain name sent by the other server includes:
receiving an analysis result corresponding to the domain name and an effective period corresponding to the analysis result;
the updating the target analysis result according to the analysis result comprises:
and updating the target analysis result according to the analysis result, and updating the validity period corresponding to the target analysis result according to the validity period corresponding to the analysis result.
In some possible embodiments, the receiving the resolution result of the domain name sent by the other server includes:
receiving the domain name resolution results sent by the other servers within a preset second time period; or
And determining that the analysis results of the domain name sent by the other servers are not received within a preset second time, and sending the first analysis request to the other servers according to a preset time interval until the analysis results of the domain name sent by the other servers are received.
In some possible embodiments, if the resolution result of the domain name sent by the other server is not received within a preset second time period, the method further includes:
and if a second analysis request carrying the domain name is received within a preset third time length, directly sending the target analysis result.
In some possible embodiments, the sending the target parsing result includes:
and sending the target analysis result and a preset time period.
In some possible embodiments, the method further comprises:
and if the domain name resolution results sent by the other servers are determined to be received within a preset first time period, sending the domain name resolution results.
The server transmits the received first analysis request to other servers under the condition that the target analysis result corresponding to the domain name carried in the received first analysis request is determined to be locally cached and the validity period corresponding to the target analysis result is determined to be due, and the cached target analysis result is transmitted first after the analysis result of the domain name transmitted by other servers is determined not to be received within the preset first time period, so that the time consumed by waiting for other servers to transmit the analysis result of the domain name is avoided, the first analysis request can be responded in time within the preset first time period, and the response efficiency of the server and the user experience are improved.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method of data processing, the method comprising:
receiving a first analysis request, and acquiring domain name information carried in the first analysis request;
determining that a target analysis result corresponding to the domain name is cached locally, and if the validity period corresponding to the target analysis result is expired, forwarding the first analysis request to other servers;
and determining that the domain name resolution results sent by the other servers are not received within a preset first time length, and sending the target resolution results.
2. 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 servers within the preset first time period; or
Response information sent by other servers is not received within the preset first duration, and the response information is success response information or failure response information, wherein the success response information carries the domain name resolution result.
3. The method of claim 1, wherein after sending the target resolution result, the method further comprises:
and when the domain name resolution results sent by the other servers are received, updating the target resolution result according to the resolution results.
4. The method according to claim 3, wherein the receiving the resolution result of the domain name sent by the other server comprises:
receiving an analysis result corresponding to the domain name and an effective period corresponding to the analysis result;
the updating the target analysis result according to the analysis result comprises:
and updating the target analysis result according to the analysis result, and updating the validity period corresponding to the target analysis result according to the validity period corresponding to the analysis result.
5. The method according to claim 3, wherein the receiving the resolution result of the domain name sent by the other server comprises:
receiving the domain name resolution results sent by the other servers within a preset second time period; or
And determining that the analysis results of the domain name sent by the other servers are not received within a preset second time, and sending the first analysis request to the other servers according to a preset time interval until the analysis results of the domain name sent by the other servers are received.
6. The method according to claim 5, wherein if the resolution result of the domain name sent by the other server is not received within a preset second time period, the method further comprises:
and if a second analysis request carrying the domain name is received within a preset third time length, directly sending the target analysis result.
7. The method of claim 1, wherein the sending the target resolution result comprises:
and sending the target analysis result and a preset time period.
8. The method according to any one of claims 1-5, further comprising:
and if the domain name resolution results sent by the other servers are determined to be received within a preset first time period, sending the domain name resolution results.
9. A server, characterized in that the server comprises:
a communicator for establishing a communication connection with other servers;
a controller to perform:
controlling the communicator to receive a first analysis request and acquiring domain name information carried in the first analysis request; if the target analysis result corresponding to the domain name is determined to be cached locally and the validity period corresponding to the target analysis result is expired, controlling the communicator to send the first analysis request to the other servers; and determining that the resolution result of the domain name sent by the other server is not received by the communicator within a preset first time, and controlling the communicator to send the target resolution result.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when being executed by a processor, carries out the steps of the data processing method according to any one of claims 1 to 8.
CN202011084472.1A 2020-10-12 2020-10-12 Server, data processing method and medium Pending CN112422705A (en)

Priority Applications (2)

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

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN112422705A true CN112422705A (en) 2021-02-26

Family

ID=74853972

Family Applications (1)

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

Country Status (2)

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

Cited By (2)

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

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150215267A1 (en) * 2010-10-26 2015-07-30 Cedexis Inc. Surrogate name delivery network
CN106331212A (en) * 2016-08-25 2017-01-11 北京润通丰华科技有限公司 Domain name server (DNS) cache camping-based domain name resolution method and system
CN109639748A (en) * 2017-10-09 2019-04-16 阿里巴巴集团控股有限公司 Buffering updating method, device, system and the domain name system of dns server
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

Family Cites Families (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)
EP3419249A1 (en) * 2017-06-23 2018-12-26 Nokia Solutions and Networks Oy Methods 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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150215267A1 (en) * 2010-10-26 2015-07-30 Cedexis Inc. Surrogate name delivery network
CN106331212A (en) * 2016-08-25 2017-01-11 北京润通丰华科技有限公司 Domain name server (DNS) cache camping-based domain name resolution method and system
CN109639748A (en) * 2017-10-09 2019-04-16 阿里巴巴集团控股有限公司 Buffering updating method, device, system and the domain name system of dns server
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

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113905099A (en) * 2021-09-26 2022-01-07 北京达佳互联信息技术有限公司 Method, device, server, terminal and storage medium for controlling reporting request
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

Also Published As

Publication number Publication date
WO2021120977A1 (en) 2021-06-24

Similar Documents

Publication Publication Date Title
EP3905640B1 (en) Method for scheduling edge node of content distribution network, and apparatus
CN108718347B (en) Domain name resolution method, system, device and storage medium
CN108390933B (en) Message distribution method, device, server and storage medium
CN108958949B (en) Calling method and system of application program
CN107026879B (en) Data caching method and background application system
CN105100032A (en) Method and apparatus for preventing resource steal
CN112422705A (en) Server, data processing method and medium
JP2021511702A (en) Application programming interface Methods and devices for transmitting API requests
CN111177601B (en) Page rendering processing method, device, equipment and readable storage medium
WO2011015009A1 (en) Method and server for obtaining page data, and method and server for updating page
CN112788126A (en) Resource downloading method, device, server and storage medium
CN111221469A (en) Method, device and system for synchronizing cache data
CN111367672A (en) Data caching method and device, electronic equipment and computer storage medium
CN111526185A (en) Data downloading method, device, system and storage medium
CN106657140B (en) Application authorization method and device
CN112565238A (en) Method for popping privacy policy, client and computer-readable storage medium
CN106933932B (en) Data processing method and device and application server
CN113518013A (en) Processing method and device for realizing heartbeat mechanism
CN111049945A (en) Network request optimization method, device, equipment and medium based on HTTP (hyper text transport protocol)
CN114338630B (en) Domain name access method, device, electronic equipment, storage medium and program product
CN115361279A (en) Configuration data updating method and device, electronic equipment and computer readable medium
WO2020098773A1 (en) Request response method and device, edge node and authentication system
CN112714092B (en) Registration login method, device and computer readable storage medium
EP3236633A1 (en) Method and apparatus for processing resource operation request
CN110858201B (en) Data processing method and system, processor and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210226

RJ01 Rejection of invention patent application after publication