CN117176687A - Service processing method and device, equipment and computer readable storage medium - Google Patents

Service processing method and device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN117176687A
CN117176687A CN202210585660.5A CN202210585660A CN117176687A CN 117176687 A CN117176687 A CN 117176687A CN 202210585660 A CN202210585660 A CN 202210585660A CN 117176687 A CN117176687 A CN 117176687A
Authority
CN
China
Prior art keywords
domain name
service
service request
result
name result
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
CN202210585660.5A
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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202210585660.5A priority Critical patent/CN117176687A/en
Publication of CN117176687A publication Critical patent/CN117176687A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a service processing method, a device, equipment and a computer readable storage medium. The service processing method in the embodiment obtains a detection result by receiving a service request sent by a service requester and detecting whether a service type corresponding to the service request is a domain name service type; if the detection result represents that the service type is a domain name service type, acquiring a domain name result corresponding to the service request from the cached domain name result, namely directly acquiring the cached domain name result corresponding to the service request, so that the acquired domain name result is more accurate, the service processing flow is reduced, and the service processing process is faster; and finally, determining a return strategy of the domain name result corresponding to the service request based on the obtaining condition of the domain name result corresponding to the service request, and returning the domain name result to the service requester based on the return strategy, so that the result corresponding to the service request can be quickly and accurately returned.

Description

Service processing method and device, equipment and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a service processing method and apparatus, a device, and a computer readable storage medium.
Background
With the rapid development of internet services, service requests sent by application terminals are also increasing day by day. The service types corresponding to the service request include domain name service types and other service types, and how to identify the service requested by the service request according to the service request, so that the service processing flow is reduced, and a service processing method is needed to quickly and accurately return the result corresponding to the service request.
Disclosure of Invention
To solve the above technical problems, embodiments of the present application provide a service processing method and apparatus, an electronic device, and a computer readable storage medium, respectively, so as to identify a service type corresponding to a service request, and quickly and accurately return a result corresponding to the service request.
Other features and advantages of the application will be apparent from the following detailed description, or may be learned by the practice of the application.
According to an aspect of an embodiment of the present application, there is provided a service processing method, including: receiving a service request sent by a service request party, and detecting whether a service type corresponding to the service request is a domain name service type or not to obtain a detection result; if the detection result represents that the service type is the domain name service type, obtaining a domain name result corresponding to the service request from the cached domain name result; the cached domain name result is obtained by caching after the execution of the domain name service type service is completed; and determining a return strategy of the domain name result corresponding to the service request based on the acquisition condition of the domain name result corresponding to the service request, and returning the domain name result to the service requester based on the return strategy.
According to an aspect of an embodiment of the present application, there is provided a service processing apparatus including: the receiving detection module is configured to receive a service request sent by a service request party, and detect whether a service type corresponding to the service request is a domain name service type or not to obtain a detection result; if the detection result represents that the service type is the domain name service type, obtaining a domain name result corresponding to the service request from the cached domain name result; the cached domain name result is obtained by caching after the execution of the domain name service type service is completed; and the return module is configured to determine a return strategy of the domain name result corresponding to the service request based on the acquisition condition of the domain name result corresponding to the service request, and return the domain name result to the service requester based on the return strategy.
In another embodiment, the return module is configured to determine to execute the service corresponding to the service request by a recursive service return policy if the obtaining condition indicates that the domain name result corresponding to the service request is not obtained, so as to obtain the domain name result corresponding to the service request, and return the obtained domain name result to the service requester; and if the obtaining condition characterizes that the domain name result corresponding to the service request is obtained, determining that the obtained domain name result is returned to the service requester through a cache service return strategy.
In another embodiment, the service processing device further includes a matching storage module configured to match a cache condition of a domain name result corresponding to the service request with a preset domain name result cache condition to obtain a matching result; and if the matching result indicates that the matching is successful, caching the domain name result corresponding to the service request so as to update the cached domain name result.
In another embodiment, the service processing apparatus further includes a number first detection module configured to detect a number of data requested by the service request; if the quantity of the data requested by the service request is detected to be larger than a preset quantity threshold value, detecting whether the service type corresponding to the service request is the domain name service type.
In another embodiment, the detection module further includes a second detection module configured to execute, if it is detected that the amount of data requested by the service request is less than or equal to the preset amount threshold, a service corresponding to the service request through a recursive service return policy, so as to obtain a domain name result corresponding to the service request, and return the obtained domain name result to the service requester.
In another embodiment, the service processing apparatus further includes a cache update module configured to count the number of times each domain name result contained in the cached domain name results is acquired within a preset period of time; taking the domain name result with the acquired times less than a preset times threshold value as a target domain name result; and deleting the target domain name result from the cached domain name result.
In another embodiment, the receiving detection module further includes a recursive service processing unit configured to execute, if the detection result indicates that the service type is not the domain name service type, a service corresponding to the service request through a recursive service return policy, so as to obtain a domain name result corresponding to the service request, and return the obtained domain name result to the service requester.
According to an aspect of an embodiment of the present application, there is provided an electronic apparatus including: a controller; and a memory for storing one or more programs which, when executed by the controller, perform the service processing method described above.
According to an aspect of the embodiments of the present application, there is also provided a computer-readable storage medium having stored thereon computer-readable instructions which, when executed by a processor of a computer, cause the computer to perform the above-described service processing method.
According to an aspect of embodiments of the present application, there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the service processing method described above.
In the technical scheme provided by the embodiment of the application, a detection result is obtained by receiving a service request sent by a service request party and detecting whether the service type corresponding to the service request is a domain name service type; if the detection result indicates that the service type is a domain name service type, obtaining a domain name result corresponding to the service request from the cached domain name result; the cached domain name result is obtained by caching after the execution of the domain name service type service is completed, namely the cached domain name result corresponding to the service request is directly obtained, so that the obtained domain name result is more accurate, the service processing flow is reduced, and the service processing process is faster; and finally, determining a return strategy of the domain name result corresponding to the service request based on the obtaining condition of the domain name result corresponding to the service request, and returning the domain name result to the service requester based on the return strategy, so that the result corresponding to the service request can be quickly and accurately returned.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is evident that the drawings in the following description are only some embodiments of the present application and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art. In the drawings:
FIG. 1 is a flow chart of a business processing method according to an exemplary embodiment of the present application;
FIG. 2 is a flow chart of another business processing method shown based on the embodiment shown in FIG. 1;
FIG. 3 is a flow chart of another business processing method shown based on the embodiment shown in FIG. 2;
FIG. 4 is a flow chart of another business processing method shown based on the embodiment shown in FIG. 1;
FIG. 5 is a flow chart of another business processing method shown based on the embodiment shown in FIG. 4;
FIG. 6 is a flow chart illustrating a service handling procedure for a Type65 service request according to another exemplary embodiment of the present application;
FIG. 7 is a schematic diagram of a Local DNS device for traffic handling in the present application;
fig. 8 is a schematic structural view of a service processing apparatus according to an exemplary embodiment of the present application;
FIG. 9 is a schematic diagram of an implementation environment in which the present application is directed;
FIG. 10 is a schematic diagram of another implementation environment in which the present application is directed;
fig. 11 is a schematic diagram of a computer system of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
In the present application, the term "plurality" means two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., a and/or B may represent: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Fig. 1 is a flowchart illustrating a service processing method according to an exemplary embodiment of the present application. The method at least comprises S110 to S130, and is described in detail as follows:
s110: and receiving a service request sent by a service request party, and detecting whether the service type corresponding to the service request is a domain name service type or not to obtain a detection result.
The service request sender comprises a mobile phone, a computer and other terminals with signal sending functions. The service request in this embodiment is a request sent by the user through the service request sending terminal to the operator for requesting to open a related service.
The service Type is a DNS request with a request Type (Type) of "HTTPS (HTTPS specific service Endpoints) (65)" which is not a conventional "A (Host Address)" Type request, and includes various types, such as a domain name service Type, specifically, type65, IOS of apple terminals, including cell phones, ipads, and PCs, in order to prevent DNS hijacking.
For the exemplary description of S110, the domain name service type is type65, and it is detected whether the service type corresponding to the service request is type65, and the detection result characterizes two cases, namely, the case of characterizing the type65 and the case of not characterizing the type 65.
S120: if the detection result indicates that the service type is a domain name service type, obtaining a domain name result corresponding to the service request from the cached domain name result; the cached domain name result is obtained by caching after the execution of the domain name service type service is completed.
Specifically, the domain name service type is type65, and if the service type corresponding to the detected service request is type65, the domain name result corresponding to the type65 service request is obtained from the cached domain name result.
S130: and determining a return strategy of the domain name result corresponding to the service request based on the obtaining condition of the domain name result corresponding to the service request, and returning the domain name result to the service requester based on the return strategy.
The obtaining situation comprises two situations of obtaining results and obtaining failure, wherein the two situations correspond to different return strategies of the domain name result, and the domain name result is returned to the service requester according to the respective return strategies.
The embodiment obtains a detection result by receiving a service request sent by a service request party and detecting whether a service type corresponding to the service request is a domain name service type; if the detection result indicates that the service type is a domain name service type, obtaining a domain name result corresponding to the service request from the cached domain name result; the cached domain name result is obtained by caching after the execution of the domain name service type service is completed, namely the cached domain name result corresponding to the service request is directly obtained, so that the obtained domain name result is more accurate, the service processing flow is reduced, and the service processing process is faster; and finally, determining a return strategy of the domain name result corresponding to the service request based on the obtaining condition of the domain name result corresponding to the service request, and returning the domain name result to the service requester based on the return strategy, so that the result corresponding to the service request can be quickly and accurately returned.
The prior art adopts the same return strategy to return the domain name result to the service requester aiming at a plurality of acquisition conditions. Another exemplary embodiment of the present application further illustrates how domain name results are returned to the service requester for different acquisition situations, and in particular, fig. 2 is a flowchart of another service processing method shown based on the embodiment shown in fig. 1. Wherein, S130 further includes at least S210 to S220, which are described in detail as follows:
S210: if the obtaining condition indicates that the domain name result corresponding to the service request is not obtained, determining to execute the service corresponding to the service request through a recursive service return strategy so as to obtain the domain name result corresponding to the service request, and returning the obtained domain name result to the service requester.
The recursive service return strategy refers to that after the recursive processing is performed on the service request, the obtained processing result is returned to the corresponding service requester.
If the domain name result corresponding to the service request is not obtained, the cached domain name result is indicated that the domain name result corresponding to the service request is not stored, for example, the domain name result corresponding to the service request a is A, the cached domain name result is only B and C, the cached domain name result does not have A, at this time, the service corresponding to the service request a is executed through a general recursive service return strategy, so as to obtain the domain name result A corresponding to the service request a, and the obtained domain name result A is returned to the service requester.
S220: if the obtaining situation characterizes that the domain name result corresponding to the service request is obtained, the obtained domain name result is returned to the service requester through the cache service return strategy.
The cache service return strategy refers to directly obtaining a domain name result corresponding to the service request from the cache domain name result, and then returning the obtained domain name result to the corresponding service requester.
If the domain name result corresponding to the service request is obtained, the existence of the domain name result corresponding to the service request in the cached domain name result is indicated. And directly acquiring a domain name result corresponding to the service request, sending the domain name result to the domain name result corresponding to the service request, and then returning the acquired domain name result to the corresponding service requester.
The embodiment further illustrates different return strategies corresponding to different acquisition conditions, if the domain name result corresponding to the service request is not acquired, ordinary recursion processing is required to be performed on the service request, and the domain name result obtained by the recursion processing is returned to the corresponding service requester. If the domain name result corresponding to the service request is obtained, the service request is not required to be analyzed, the domain name result can be directly sent to the corresponding service requester, the service processing amount is reduced, and the service processing process is quickened.
In a general service processing process, a domain name result obtained by processing is directly returned to a service requester, and is fully utilized, for this purpose, in another exemplary embodiment of the present application, a buffer process is performed on the domain name result, and referring specifically to fig. 3, fig. 3 is a flowchart of another service processing method shown based on the embodiment shown in fig. 2. Wherein, after S220, the method further includes at least S310 to S320, which are described in detail as follows:
S310: and matching the caching condition of the domain name result corresponding to the service request with a preset domain name result caching condition to obtain a matching result.
The caching condition refers to a storage condition of the domain name result, and the domain name result can be cached only when the caching condition is matched with a preset domain name result caching condition.
S320: if the matching result indicates that the matching is successful, caching the domain name result corresponding to the service request so as to update the cached domain name result.
For example, if the caching condition of the domain name result is a, and the caching condition of the preset domain name result is a, it is obvious that the two can be successfully matched, and the domain name result can be cached. If the caching condition of the domain name result is A and the caching condition of the preset domain name result is B, the caching condition of the domain name result cannot be matched with the caching condition of the preset domain name result, which indicates that the domain name result cannot be cached.
The embodiment further illustrates the process of caching the domain name result, after determining that the obtained domain name result is returned to the service requester through the caching service return policy, if the caching condition of the domain name result corresponding to the service request is matched with the caching condition of the preset domain name result, in order to fully utilize the obtained domain name result, the domain name result corresponding to the service request is cached conveniently and subsequently obtained corresponding cached domain name result aiming at the new service request, so that the cached domain name result is updated in time, and the subsequent service processing is faster.
When the amount of data requested by the service request is small, the general recursive service return policy is executed to accurately and effectively return the domain name result to the service requester, if the service request is processed according to the service processing method in the above embodiments, the processing resources are wasted and unnecessary processing flows are generated. The method further includes S410 to S420 in S110, which are described in detail as follows:
s410: the amount of data requested by the service request is detected.
The primary service request includes at least one request data, where the request data is closely related to the service request, and the request data may be a data, B data, C data, etc., and the embodiment is not limited specifically.
S420: if the quantity of the data requested by the service request is detected to be larger than a preset quantity threshold value, detecting whether the service type corresponding to the service request is a domain name service type.
The request data includes 3 a data, 2B data and 1C data, the number of the request data is 3+2+1=6, the preset number threshold is 5, and it is obvious that the number of the request data is greater than the preset number threshold, and whether the service type corresponding to the service request is a domain name service type is detected.
The embodiment further refines the service processing process according to the comparison result of the number of the data requested by the service request and the preset number threshold, compares the number of the data requested by the service request by introducing the preset number threshold, and if the number of the data requested by the service request is detected to be larger than the preset number threshold, detects whether the service type corresponding to the service request is a domain name service type, namely, detects whether the service type corresponding to the service request is a domain name service type when the number of the data requested exceeds a certain threshold.
In another exemplary embodiment of the present application, a case where the amount of data requested by the service request is less than or equal to the preset amount threshold is illustrated, specifically referring to fig. 5, fig. 5 is a flowchart of another service processing method shown based on the embodiment shown in fig. 4. The method further includes S510 after S410, which is described in detail below:
S510: and if the quantity of the data requested by the service request is detected to be smaller than or equal to the preset quantity threshold value, executing the service corresponding to the service request through a recursive service return strategy so as to obtain a domain name result corresponding to the service request, and returning the obtained domain name result to the service requester.
The number of data requested by the service request is 4, the preset data amount threshold is 5, and it is obvious that the number of data requested by the service request is smaller than the preset number threshold, recursive processing is performed on the service corresponding to the service request, and the domain name result obtained by processing is returned to the service requester.
With the increasing number of cached domain name results, but the limited space occupied by the cached domain name results, how to optimize the resources of the cached domain name results under the condition of ensuring that the service processing is performed normally is a technical problem to be solved, therefore, another exemplary embodiment of the present application shows another service processing method based on the embodiments shown in fig. 1 to 5, and the method further includes:
and (a) counting the acquired times of each domain name result contained in the domain name results cached in the preset time period.
The preset time period is a time length value, for example, 08:00 to 09: 00. one day, one month, one year, etc.
Illustratively, the preset time period is 08:00 to 09:00, domain name result includes A, B and C, respectively counted at 08:00 to 09:00, the number of times A is acquired, the number of times B is acquired and the number of times C is acquired.
And (b) taking the domain name result with the acquired times less than the preset times threshold value as a target domain name result.
Illustratively, the preset number of times threshold is 8, and the preset time period is 08:00 to 10:00, the domain name result includes a, B and C. At 08:00 to 10: and in 00, the acquired times of A are 11, the acquired times of B are 6, the acquired times of C are 5, and B and C are taken as target domain name results due to the acquired times effect of B and C and a preset time threshold value.
And (c) deleting the target domain name result from the cached domain name results.
The obtained times of the target domain name result in the preset time period is smaller than the preset times threshold, so that the obtained times are lower, the using frequency is lower, and the cached domain name result with lower obtained times is deleted, so that sufficient cache space is reserved for the cached domain name result with more obtained times.
In this embodiment, a preset frequency threshold is introduced to evaluate the obtained frequency of the cached domain name result, and the cached domain name result with low obtained frequency is deleted, so as to ensure the storage space of the cached domain name result with high obtained frequency.
In another exemplary embodiment of the present application, it is further described how to perform the splitting process for the service types corresponding to the different service requests. Specifically, another service processing method is shown based on the embodiments shown in fig. 1 to 5, and the method further includes:
and (d) if the detection result indicates that the service type is not the domain name service type, executing the service corresponding to the service request through a recursive service return strategy so as to obtain a domain name result corresponding to the service request, and returning the obtained domain name result to the service requester.
The service type corresponding to the service request is a, and the domain name service type is B, if the service type corresponding to the service request is not the domain name service type, recursively processing the service request, and then returning the obtained domain name result to the corresponding service requester.
In this embodiment, a service processing flow when the service type corresponding to the service request is not the domain name service type is clarified, that is, after recursion processing is performed on the service request, the obtained domain name result is returned to the corresponding service requester, so that service processing is split, and the service processing process is more targeted.
With the rapid development of internet services, local DNS (Local Domain Name System ) caters to various diversified and personalized service requests. In recent years, in order to prevent DNS (Domain Name System ) hijacking, mobile phones, iPad, PCs and the like of the IOS system generate a DNS request with a request Type (Type) of HTTPS (HTTPS specific service Endpoints) (65), which is not a conventional A (Host Address) Type request, when a Local DNS system processes such a service request, a cached domain name result cannot be obtained, and only the DNS Type65 service request can be handed over to a recursive service, which causes great challenges to the service capability and stability of the recursive server as the DNS Type65 service request volume is continuously increased. In addition, the DNS Type65 service request goes through the whole recursive service flow, so that the DNS request reply time is prolonged, and the user service experience is reduced. For this reason, another embodiment of the present application performs service processing on the Type65 service request by using the service processing method in the foregoing embodiments, and referring specifically to fig. 6, fig. 6 is a flowchart illustrating a service processing procedure of the Type65 service request according to another exemplary embodiment of the present application.
S610: and receiving a service request sent by a service requester.
Reference is made in particular to the description of S110 above.
S620: and judging whether the service Type corresponding to the service request is Type65 or not, and obtaining a Type judgment result.
Fig. 7 is a schematic diagram of a Local DNS device for service processing in the present application, where the Local DNS device includes a DNS cache system and a DNS recursion system as shown in fig. 7. The DNS cache system receives a DNS service request sent by a service requester; the DNS recursion system comprises a Type65 detection module, a Type65 management module and a Type65 domain name cache module.
The Type65 detection module executes S620, specifically, the module can split the DNS service request, forward the DNS service request that is not Type65 to the recursion module for service processing, the recursion module returns the domain name result obtained by processing to the DNS cache system, and finally the DNS cache system returns the domain name result to the service requester.
S630a: and if the service Type corresponding to the service request is Type65, acquiring a domain name result corresponding to the service request from the cached domain name result, and judging whether the cached domain name result is acquired or not.
If the service Type corresponding to the DNS service request is Type65, the domain name result corresponding to the DNS service request is obtained from the cached domain name result, and not all the cached domain name results can be obtained, so that a further part is required to determine whether the cached domain name result is successfully obtained.
Specifically, as shown in fig. 7, the Type65 management module includes a record management unit, a cache management unit and a policy management unit, where the cache management unit can cache the domain name result to the Type65 cache module.
S630b: and if the service Type corresponding to the service request is represented by the Type judgment result and is not the Type65, executing a recursive service return strategy.
If the service Type corresponding to the DNS service request is not Type65, executing the service corresponding to the DNS service request through a recursive service return strategy to obtain a domain name result corresponding to the DNS service request, and returning the obtained domain name result to the service requester.
Specifically, as shown in fig. 7, after executing S620, the policy management unit determines a return policy, that is, determines to execute a recursive service return policy or a cache service return policy, according to parameters such as a type65 request amount, a request density, and the like.
S640a: and if the domain name result corresponding to the service request is obtained, determining to return the obtained domain name result to the service requester through a cache service return strategy.
Specifically, if the cached domain name result is obtained from the cache management unit in fig. 7, the policy management unit determines that the executed return policy is the cache service return policy.
S640b: if the domain name result corresponding to the service request is not obtained, determining to execute the service corresponding to the service request through a recursive service return strategy so as to obtain the domain name result corresponding to the service request, and returning the obtained domain name result to the service requester.
If the domain name result corresponding to the DNS service request is not obtained, the DNS service request is subjected to care-of temporary storage, and then is processed through a common recursion flow, namely, the service corresponding to the DNS service request is executed through a recursion service return strategy so as to obtain the domain name result corresponding to the DNS service request, and the obtained domain name result is returned to the service requester.
Specifically, if the cached domain name result is not obtained from the cache management unit in fig. 7, the policy management unit determines that the executed return policy is a recursive service return policy, and forwards the DNS service request to the recursive module for service processing, the recursive module returns the domain name result obtained by processing to the DNS cache system, and finally the DNS cache system returns the domain name result to the service requester.
S650: and matching the caching condition of the domain name result corresponding to the service request with a preset domain name result caching condition to obtain a matching result.
The cache management unit in fig. 7 further stores a preset domain name result cache condition, and when the cache condition of the domain name result corresponding to the DNS service request is matched with the preset domain name result cache condition, the preset domain name result cache condition in the cache management unit is called to perform matching processing.
S660: if the matching result indicates that the matching is successful, caching the domain name result corresponding to the service request to update the cached domain name result, and returning the obtained domain name result to the service requester.
Specifically, if the caching condition of the domain name result corresponding to the DNS service request is successfully matched with the preset domain name result caching condition, the domain name result corresponding to the DNS service request is cached to the cache management unit in fig. 7, so as to update the cached domain name result.
In this embodiment, each service processing method in the foregoing embodiment is applied to the process of Type65 service processing, and split detection and cache learning are performed on the service request of DNS Type65, specifically, a Type65 detection module, a Type65 cache module and a Type65 management module are newly added in the Local DNS recursive system, and for the short-time repeated Type65 domain name request service, the domain name result can be immediately returned to the service requester according with the condition, without a primary iteration flow, so that the service pressure of the recursive module is reduced.
In addition, the embodiment can also detect the number of data requested by the service request of DNS Type65, and when the number of the requested data exceeds a preset number threshold, the service request of DNS Type65 is split, and service detection, record management, obtaining and caching of domain name results, cache domain name results and other service processes of Type65 service are enabled.
Another aspect of the present application further provides a service processing apparatus, as shown in fig. 8, and fig. 8 is a schematic structural diagram of the service processing apparatus according to an exemplary embodiment of the present application. Wherein, the business processing device includes:
the receiving detection module 810 is configured to receive a service request sent by a service requester, and detect whether a service type corresponding to the service request is a domain name service type, so as to obtain a detection result; if the detection result indicates that the service type is a domain name service type, obtaining a domain name result corresponding to the service request from the cached domain name result; the cached domain name result is obtained by caching after the execution of the domain name service type service is completed.
The return module 830 is configured to determine a return policy of the domain name result corresponding to the service request based on the obtaining situation of the domain name result corresponding to the service request, and return the domain name result to the service requester based on the return policy.
In another embodiment, the returning module 830 is configured to determine that the service corresponding to the service request is executed by the recursive service return policy if the obtaining situation indicates that the domain name result corresponding to the service request is not obtained, so as to obtain the domain name result corresponding to the service request, and return the obtained domain name result to the service requester; if the obtaining situation characterizes that the domain name result corresponding to the service request is obtained, the obtained domain name result is returned to the service requester through the cache service return strategy.
In another embodiment, the service processing apparatus further includes:
the matching storage module is configured to match the caching condition of the domain name result corresponding to the service request with the caching condition of the preset domain name result to obtain a matching result; if the matching result indicates that the matching is successful, caching the domain name result corresponding to the service request so as to update the cached domain name result.
In another embodiment, the service processing apparatus further includes:
a number first detection module configured to detect a number of data requested by the service request; if the quantity of the data requested by the service request is detected to be larger than a preset quantity threshold value, detecting whether the service type corresponding to the service request is a domain name service type.
In another embodiment, the detection module further comprises:
and the second detection module is configured to execute the service corresponding to the service request through a recursive service return strategy if the quantity of the data requested by the service request is detected to be smaller than or equal to a preset quantity threshold value, so as to obtain a domain name result corresponding to the service request, and return the obtained domain name result to the service requester.
In another embodiment, the service processing apparatus further includes:
the cache updating module is configured to count the acquired times of each domain name result contained in the domain name results cached in the preset time period; taking the domain name result with the acquired times less than a preset times threshold value as a target domain name result; and deleting the target domain name result from the cached domain name result.
In another embodiment, the reception detection module 810 further includes:
and the recursive service processing unit is configured to execute the service corresponding to the service request through a recursive service return strategy if the detection result indicates that the service type is not the domain name service type, so as to obtain a domain name result corresponding to the service request, and return the obtained domain name result to the service requester.
It should be noted that, the service processing apparatus provided in the foregoing embodiment and the service processing method provided in the foregoing embodiment belong to the same concept, and a specific manner in which each module and unit perform an operation has been described in detail in the method embodiment, which is not described herein again.
Referring to fig. 9, fig. 9 is a schematic diagram of an implementation environment according to the present application. The implementation environment includes a service requester 100 and a server 200, and communication is performed between the service requester 100 and the server 200 through a wired or wireless network.
The service requester 100 includes, but is not limited to, a mobile phone, a computer, an intelligent voice interaction device, an intelligent home appliance, a vehicle-mounted terminal, etc., for example, any electronic device capable of sending a service request, such as a smart phone, a tablet, a notebook, a computer, etc., which is not limited in this regard.
The server 200 receives a service request sent by a service request party, and detects whether a service type corresponding to the service request is a domain name service type, so as to obtain a detection result; if the detection result indicates that the service type is a domain name service type, obtaining a domain name result corresponding to the service request from the cached domain name result; the cached domain name result is obtained by caching after the execution of the domain name service type service is completed; based on the obtaining condition of the domain name result corresponding to the service request, determining a return strategy of the domain name result corresponding to the service request, and returning the domain name result to the service requester 100 based on the return strategy. The server 200 may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, where a plurality of servers may form a blockchain, and the servers are nodes on the blockchain, and the server 200 may also be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network ), and basic cloud computing services such as big data and artificial intelligence platforms, which are not limited in this respect.
Fig. 10 is a schematic diagram of another implementation environment in which the present application is directed. Specifically, the service requester 100 sends a service request to a LDNS (Local DNS) cache system in the server 200. The server 200 includes an LDNS cache system, a detection module, a management module, a cache module, and a recursion module.
The detection module detects the number of service requests, the service type and the like, when the number of the service requests exceeds a preset number threshold, the service processing methods are started, if the detection result represents that the service type is a domain name service type, a domain name result corresponding to the service request is obtained from the cached domain name result, namely, the cached domain name result is obtained from the cache module, if the detection module obtains the cached domain name result corresponding to the service request, the cached domain name result can be temporarily stored to the management module, the management module records the operation and the like and returns the operation to the detection module, the detection module returns the cached domain name result to the LDNS cache system, and finally the LDNS cache system returns the domain name result to the service requester 100. If the detection module does not acquire the cached domain name result corresponding to the service request, the service request is forwarded to the recursion module, the recursion module sends the received service request to all levels of domain name services such as a root and the like for analysis processing to acquire a domain name result, the recursion module returns the acquired domain name result to the management module, the management module records the domain name result and the like, judges whether the caching condition of the domain name result is matched with the caching condition of the preset domain name result, if the matching is successful, the domain name result is cached to the caching module, the domain name result is returned to the detection module, the detection module returns the cached domain name result to the LDNS caching system, and finally the LDNS caching system returns to the service requester 100.
Another aspect of the present application also provides an electronic device, including: a controller; and a memory for storing one or more programs which, when executed by the controller, perform the method of service processing in the above embodiments.
Referring to fig. 11, fig. 11 is a schematic diagram of a computer system of an electronic device according to an exemplary embodiment of the present application, which illustrates a schematic diagram of a computer system of an electronic device suitable for implementing an embodiment of the present application.
It should be noted that, the computer system 1100 of the electronic device shown in fig. 11 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 11, the computer system 1100 includes a central processing unit (Central Processing Unit, CPU) 1101 that can perform various appropriate actions and processes, such as performing the methods in the above-described embodiments, according to a program stored in a Read-Only Memory (ROM) 1102 or a program loaded from a storage section 1108 into a random access Memory (Random Access Memory, RAM) 1103. In the RAM 1103, various programs and data required for system operation are also stored. The CPU 1101, ROM 1102, and RAM 1103 are connected to each other by a bus 1104. An Input/Output (I/O) interface 1105 is also connected to bus 1104.
The following components are connected to the I/O interface 1105: an input section 1106 including a keyboard, a mouse, and the like; an output portion 1107 including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and a speaker; a storage section 1108 including a hard disk or the like; and a communication section 1109 including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section 1109 performs communication processing via a network such as the internet. The drive 1110 is also connected to the I/O interface 1105 as needed. Removable media 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed as needed in drive 1110, so that a computer program read therefrom is installed as needed in storage section 1108.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1109, and/or installed from the removable media 1111. When executed by a Central Processing Unit (CPU) 1101, performs the various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with a computer-readable computer program embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Where each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
Another aspect of the application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a business processing method as before. The computer-readable storage medium may be included in the electronic device described in the above embodiment or may exist alone without being incorporated in the electronic device.
Another aspect of the application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the service processing method provided in the above embodiments.
According to an aspect of the embodiment of the present application, there is also provided a computer system including a central processing unit (Central Processing Unit, CPU) which can perform various appropriate actions and processes, such as performing the method in the above-described embodiment, according to a program stored in a Read-Only Memory (ROM) or a program loaded from a storage section into a random access Memory (Random Access Memory, RAM). In the RAM, various programs and data required for the system operation are also stored. The CPU, ROM and RAM are connected to each other by a bus. An Input/Output (I/O) interface is also connected to the bus.
The following components are connected to the I/O interface: an input section including a keyboard, a mouse, etc.; an output section including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and the like, and a speaker, and the like; a storage section including a hard disk or the like; and a communication section including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section performs communication processing via a network such as the internet. The drives are also connected to the I/O interfaces as needed. Removable media such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, and the like are mounted on the drive as needed so that a computer program read therefrom is mounted into the storage section as needed.
The foregoing is merely illustrative of the preferred embodiments of the present application and is not intended to limit the embodiments of the present application, and those skilled in the art can easily make corresponding variations or modifications according to the main concept and spirit of the present application, so that the protection scope of the present application shall be defined by the claims.

Claims (10)

1. A method for processing a service, comprising:
Receiving a service request sent by a service request party, and detecting whether a service type corresponding to the service request is a domain name service type or not to obtain a detection result;
if the detection result represents that the service type is the domain name service type, obtaining a domain name result corresponding to the service request from the cached domain name result; the cached domain name result is obtained by caching after the execution of the domain name service type service is completed;
and determining a return strategy of the domain name result corresponding to the service request based on the acquisition condition of the domain name result corresponding to the service request, and returning the domain name result to the service requester based on the return strategy.
2. The method according to claim 1, wherein the determining a return policy of the domain name result of the service corresponding to the service request based on the obtaining situation of the domain name result corresponding to the service request, and returning the domain name result to the service requester based on the return policy, includes:
if the obtaining condition indicates that the domain name result corresponding to the service request is not obtained, determining to execute the service corresponding to the service request through a recursive service return strategy so as to obtain the domain name result corresponding to the service request, and returning the obtained domain name result to the service requester;
And if the obtaining condition characterizes that the domain name result corresponding to the service request is obtained, determining that the obtained domain name result is returned to the service requester through a cache service return strategy.
3. The method of claim 2, wherein after the determining to return the obtained domain name result to the service requestor via a caching service return policy, the method further comprises:
matching the cache condition of the domain name result corresponding to the service request with a preset domain name result cache condition to obtain a matching result;
and if the matching result indicates that the matching is successful, caching the domain name result corresponding to the service request so as to update the cached domain name result.
4. The method of claim 1, wherein prior to said detecting whether the service type to which the service request corresponds is a domain name service type, the method further comprises:
detecting the quantity of data requested by the service request;
if the quantity of the data requested by the service request is detected to be larger than a preset quantity threshold value, detecting whether the service type corresponding to the service request is the domain name service type.
5. The method according to claim 4, wherein the method further comprises:
and if the quantity of the data requested by the service request is detected to be smaller than or equal to the preset quantity threshold value, executing the service corresponding to the service request through a recursive service return strategy so as to obtain a domain name result corresponding to the service request, and returning the obtained domain name result to the service requester.
6. The method according to any one of claims 1-5, further comprising:
counting the acquired times of each domain name result contained in the cached domain name results within a preset time period;
taking the domain name result with the acquired times less than a preset times threshold value as a target domain name result;
and deleting the target domain name result from the cached domain name result.
7. The method according to any one of claims 1-5, further comprising:
and if the detection result indicates that the service type is not the domain name service type, executing the service corresponding to the service request through a recursive service return strategy so as to obtain a domain name result corresponding to the service request, and returning the obtained domain name result to the service requester.
8. A service processing apparatus, comprising:
the receiving detection module is configured to receive a service request sent by a service request party, and detect whether a service type corresponding to the service request is a domain name service type or not to obtain a detection result; if the detection result represents that the service type is the domain name service type, obtaining a domain name result corresponding to the service request from the cached domain name result; the cached domain name result is obtained by caching after the execution of the domain name service type service is completed;
and the return module is configured to determine a return strategy of the domain name result corresponding to the service request based on the acquisition condition of the domain name result corresponding to the service request, and return the domain name result to the service requester based on the return strategy.
9. An electronic device, comprising:
a controller;
a memory for storing one or more programs that, when executed by the controller, cause the controller to implement the business processing method of any of claims 1-7.
10. A computer readable storage medium having stored thereon computer readable instructions which, when executed by a processor of a computer, cause the computer to perform the business processing method of any of claims 1 to 7.
CN202210585660.5A 2022-05-26 2022-05-26 Service processing method and device, equipment and computer readable storage medium Pending CN117176687A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210585660.5A CN117176687A (en) 2022-05-26 2022-05-26 Service processing method and device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210585660.5A CN117176687A (en) 2022-05-26 2022-05-26 Service processing method and device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117176687A true CN117176687A (en) 2023-12-05

Family

ID=88934082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210585660.5A Pending CN117176687A (en) 2022-05-26 2022-05-26 Service processing method and device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117176687A (en)

Similar Documents

Publication Publication Date Title
CN112087644B (en) Pull stream request processing method, device and system, electronic equipment and storage medium
CN109213604B (en) Data source management method and device
CN107547548B (en) Data processing method and system
CN107690149B (en) Method for triggering network policy update, management function entity and core network equipment
CN110708212A (en) Method and device for tracking call link in distributed system
CN114745724B (en) Access processing method and device, electronic equipment and computer readable medium
CN111209306A (en) Business logic judgment method and device, electronic equipment and storage medium
WO2023116219A1 (en) Cdn node distribution method and apparatus, electronic device, medium and program product
CN113434293A (en) Method and apparatus for processing repeat request, storage medium, and electronic apparatus
CN111310242B (en) Method and device for generating device fingerprint, storage medium and electronic device
CN117176687A (en) Service processing method and device, equipment and computer readable storage medium
CN110781500A (en) Data wind control system and method
CN113726885A (en) Method and device for adjusting flow quota
CN113986995A (en) Request distribution method and device, storage medium and electronic equipment
CN111988195B (en) Response scheme determination method, device, equipment and medium for packet test
CN114240476A (en) Abnormal user determination method, device, equipment and storage medium
CN110851258B (en) API calling method, API calling device, computer equipment and storage medium
CN113553206A (en) Data event execution method and device, electronic equipment and computer readable medium
US20180091461A1 (en) Method and device for securing network communications using self-erasing messages
CN109873882B (en) IP proxy pool management system and management method thereof
CN110019671B (en) Method and system for processing real-time message
CN111371675A (en) Intelligent addressing method, device, equipment and storage medium thereof
CN113365231A (en) Method and device for sending short message
CN112241357A (en) Method, device, equipment and computer readable medium for gray scale test
CN116996481B (en) Live broadcast data acquisition method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination