CN113709251A - Service request processing system, method and device - Google Patents

Service request processing system, method and device Download PDF

Info

Publication number
CN113709251A
CN113709251A CN202111010420.4A CN202111010420A CN113709251A CN 113709251 A CN113709251 A CN 113709251A CN 202111010420 A CN202111010420 A CN 202111010420A CN 113709251 A CN113709251 A CN 113709251A
Authority
CN
China
Prior art keywords
gateway
target
service server
client
request
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
CN202111010420.4A
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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies 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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202111010420.4A priority Critical patent/CN113709251A/en
Publication of CN113709251A publication Critical patent/CN113709251A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • 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
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a system, a method and a device for processing service requests, wherein the system comprises: the system comprises a client, a controller and a plurality of preset gateways; the client is used for sending a domain name resolution request aiming at the target service server to the controller; the controller is used for determining a target gateway meeting preset conditions from all the alternative gateways according to the current first access time delay and/or the current second access time delay; sending the network address of the target gateway to the client; the client is also used for sending a service request aiming at the target service server to the target gateway based on the network address of the target gateway; and the target gateway is used for receiving the service request and sending the service request to the target service server so that the target service server responds to the service request. Therefore, the processing efficiency of the service request can be improved, and the performance of the SDP framework is improved.

Description

Service request processing system, method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a system, a method, and an apparatus for processing a service request.
Background
With the rapid development of network technology, service requests of clients can be processed based on an SDP (Software Defined Perimeter) architecture. The SDP architecture may include: the system comprises a client, a controller, a plurality of gateways and a plurality of service servers.
When the controller receives a domain name resolution request sent by a client, the network address of a target gateway corresponding to a target service server which the client needs to access can be determined based on the corresponding relation between the gateway and the service server, and the network address is sent to the client. In turn, the client may send a service request to the target gateway based on the network address. And forwarding the service request to a target service server by the target gateway for processing.
As can be seen, in the related art, the service servers corresponding to the gateways are different, and when the performance of a certain gateway is reduced, the processing efficiency of all service requests for the service server corresponding to the gateway is reduced, which may result in low performance of the SDP framework.
Disclosure of Invention
Embodiments of the present invention provide a system, a method, and a device for processing a service request, so as to improve the processing efficiency of the service request and improve the performance of an SDP architecture. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a service request processing system, including: the system comprises a client, a controller and a plurality of preset gateways; wherein:
the client is used for sending a domain name resolution request aiming at the target service server to the controller;
the controller is configured to determine, according to a current first access delay between the client and a plurality of candidate gateways corresponding to the target service server in each preset gateway, and/or a current second access delay between each candidate gateway and the target service server, a target gateway meeting a preset condition from the candidate gateways; sending the network address of the target gateway to the client;
the client is further used for sending a service request aiming at the target service server to the target gateway based on the network address of the target gateway;
and the target gateway is used for receiving the service request and sending the service request to the target service server so that the target service server responds to the service request.
In a second aspect of the present invention, there is provided a service request processing method, where the method is applied to a controller, and the method includes:
receiving a domain name resolution request aiming at a target service server sent by a client;
determining a target gateway meeting preset conditions from the alternative gateways according to a current first access time delay between the client and each alternative gateway corresponding to the target service server in each preset gateway and/or a current second access time delay between each alternative gateway and the target service server;
sending a network address of the target gateway to the client, so that the client sends a service request aiming at the target service server to the target gateway based on the network address; so that the target gateway sends the service request to the target service server, so that the target service server responds to the service request.
Optionally, the determining, according to a current first access delay between the client and each candidate gateway corresponding to the target service server in each preset gateway, and/or a current second access delay between each candidate gateway and the target service server, a target gateway meeting a preset condition from the candidate gateways includes:
calculating the sum of the current first access time delay between the client and the alternative gateway and the current second access time delay between the alternative gateway and the target service server aiming at each alternative gateway corresponding to the target service server in each preset gateway;
and determining the alternative gateway with the minimum corresponding sum value as the target gateway.
Optionally, before the sending the network address of the target gateway to the client, the method further includes:
acquiring a target domain name of the target service server carried in the domain name resolution request;
and acquiring the network address of the target gateway from the network address of each alternative gateway corresponding to the target domain name according to a first corresponding relation between the preset domain name of the service server and the network address of the gateway.
Optionally, before determining, according to a current first access delay between the client and each candidate gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each candidate gateway and the target service server, a target gateway meeting a preset condition from the candidate gateways, the method further includes:
receiving a current first access delay between the client and each alternative gateway sent by the client; wherein, the current first access delay between the client and each alternative gateway is: the client is obtained by calculation based on the time of sending the first detection request to the alternative gateway and the time of receiving the first detection response sent by the alternative gateway, and the first detection request is sent to the controller;
receiving a current second access delay between the alternative gateway and the target service server, which is sent by each alternative gateway; wherein, the current second access delay between the alternative gateway and the target service server is: the alternative gateway is calculated based on the time of sending the second detection request to the target service server and the time of receiving the second detection response sent by the target service server, and is sent to the controller.
Optionally, the method further includes:
and issuing authority information which represents the access authority of the client aiming at each service server to the target gateway so that the target gateway sends the service request to the target service server when receiving the service request and under the condition that the client is judged to have the access authority of the target service server.
Optionally, the method further includes:
when the target gateway is detected to be abnormal, an abnormal notification is sent to the client, so that the client deletes the network address of the target gateway from a second corresponding relation between the network address of the gateway and the domain name of the service server, and the second corresponding relation is updated.
In a third aspect of the present invention, there is also provided a service request processing method, where the method is applied to a client, and the method includes:
sending a domain name resolution request aiming at a target service server to a controller, so that the controller determines a target gateway meeting preset conditions from various alternative gateways according to current first access time delay between the client and various alternative gateways corresponding to the target service server in various preset gateways and/or current second access time delay between each alternative gateway and the target service server, and sending a network address of the target gateway to the client;
receiving the network address of the target gateway sent by the controller;
and sending a first service request aiming at the target service server to the target gateway based on the network address of the target gateway, so that the target gateway sends the first service request to the target service server, and the target service server responds to the first service request.
Optionally, before sending the domain name resolution request for the target service server to the controller, the method further includes:
aiming at each alternative gateway, sending a first detection request to the alternative gateway;
when a first detection response aiming at the first detection request sent by the alternative gateway is received, calculating a current first access delay between the client and the alternative gateway based on the time of sending the first detection request and the time of receiving the first detection response;
and sending the current first access delay between the client and the alternative gateway to the controller.
Optionally, after the receiving the network address of the target gateway sent by the controller, the method further includes:
recording a second corresponding relation between the network address of the target gateway and the target domain name of the target service server;
when the target service server needs to be accessed, acquiring a network address of the target gateway corresponding to a target domain name of the target service server in the second corresponding relation;
and sending a second service request aiming at the target service server to the target gateway based on the network address of the target gateway.
In a fourth aspect of the present invention, there is also provided a service request processing method, where the method is applied to a target gateway, and the method includes:
receiving a service request aiming at a target service server sent by a client; the service request is sent by the client based on the network address of the target gateway received from the controller; the network address of the target gateway is: when receiving a domain name resolution request aiming at a target service server sent by a client, the controller determines a network address of a gateway meeting preset conditions from each alternative gateway according to a current first access delay between the client and each alternative gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each alternative gateway and the target service server;
and sending the service request to the target service server so that the target service server responds to the service request.
Optionally, before receiving the service request for the target service server sent by the client, the method further includes:
sending a second detection request to the target service server;
when a second detection response aiming at the second detection request sent by the target service server is received, calculating the current second access delay between the target gateway and the target service server based on the time of sending the second detection request and the time of receiving the second detection response;
and sending the current second access delay between the target gateway and the target service server to the controller.
Optionally, before the sending the service request to the target service server to make the target service server respond to the service request, the method further includes:
receiving authority information which is sent by the controller and represents the access authority of the client aiming at the target service server;
the sending the service request to the target service server so that the target service server responds to the service request includes:
and under the condition that the client side is judged to have the access right of the target business server, sending the business request to the target business server so that the target business server responds to the business request.
In a fifth aspect of the present invention, there is also provided a service request processing apparatus, where the apparatus is applied to a controller, and the apparatus includes:
the domain name resolution request receiving module is used for receiving a domain name resolution request aiming at a target service server and sent by a client;
a target gateway determining module, configured to determine, according to a current first access delay between the client and each candidate gateway corresponding to the target service server in each preset gateway, and/or a current second access delay between each candidate gateway and the target service server, a target gateway that meets a preset condition from among the candidate gateways;
a network address sending module, configured to send a network address of the target gateway to the client, so that the client sends a service request for the target service server to the target gateway based on the network address; so that the target gateway sends the service request to the target service server, so that the target service server responds to the service request.
Optionally, the target gateway determining module includes:
the access delay sum value operator module is used for calculating the sum value of the current first access delay between the client and the alternative gateway and the current second access delay between the alternative gateway and the target service server aiming at each alternative gateway corresponding to the target service server in each preset gateway;
and the target gateway determining submodule is used for determining the alternative gateway with the minimum corresponding sum value as the target gateway.
Optionally, the apparatus further comprises:
a target domain name obtaining module, configured to obtain a target domain name of the target service server carried in the domain name resolution request before the network address of the target gateway is sent to the client;
and the network address acquisition module is used for acquiring the network address of the target gateway from the network addresses of all the alternative gateways corresponding to the target domain name according to a first corresponding relation between the preset domain name of the service server and the network address of the gateway.
Optionally, the apparatus further comprises:
a first access delay receiving module, configured to receive, before determining, according to a current first access delay between the client and each candidate gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each candidate gateway and the target service server, a target gateway meeting a preset condition from among the candidate gateways, a current first access delay between the client and each candidate gateway sent by the client; wherein, the current first access delay between the client and each alternative gateway is: the client is obtained by calculation based on the time of sending the first detection request to the alternative gateway and the time of receiving the first detection response sent by the alternative gateway, and the first detection request is sent to the controller;
a second access delay receiving module, configured to receive, before determining, according to a current first access delay between the client and each candidate gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each candidate gateway and the target service server, a target gateway meeting a preset condition from among the candidate gateways, a current second access delay between the candidate gateway and the target service server sent by each candidate gateway; wherein, the current second access delay between the alternative gateway and the target service server is: the alternative gateway is calculated based on the time of sending the second detection request to the target service server and the time of receiving the second detection response sent by the target service server, and is sent to the controller.
Optionally, the apparatus further comprises:
and the permission information sending module is used for sending permission information which represents the access permission of the client aiming at each service server to the target gateway so as to enable the target gateway to send the service request to the target service server when receiving the service request and under the condition that the client is judged to have the access permission of the target service server.
Optionally, the apparatus further comprises:
and the abnormity notification sending module is used for sending an abnormity notification to the client when the target gateway is detected to be abnormal, so that the client deletes the network address of the target gateway from a second corresponding relationship between the network address of the gateway and the domain name of the service server to update the second corresponding relationship.
In a sixth aspect of the present invention, there is also provided a service request processing apparatus, where the apparatus is applied to a client, and the apparatus includes:
a domain name resolution request sending module, configured to send a domain name resolution request for a target service server to a controller, so that the controller determines, according to a current first access delay between the client and each candidate gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each candidate gateway and the target service server, a target gateway meeting a preset condition from among the candidate gateways, and sends a network address of the target gateway to the client;
a network address receiving module, configured to receive the network address of the target gateway sent by the controller;
and the first service request sending module is used for sending a first service request aiming at the target service server to the target gateway based on the network address of the target gateway so that the target gateway sends the first service request to the target service server and the target service server responds to the first service request.
Optionally, the apparatus further comprises:
a first detection request sending module, configured to send, for each alternative gateway, a first detection request to the alternative gateway before sending, to the controller, a domain name resolution request for the target service server;
a first access delay calculation module, configured to, when a first detection response to the first detection request sent by the alternative gateway is received, calculate a current first access delay between the client and the alternative gateway based on a time when the first detection request is sent and a time when the first detection response is received;
and a first access delay sending module, configured to send, to the controller, a current first access delay between the client and the alternative gateway.
Optionally, the apparatus further comprises:
a second mapping relation recording module, configured to record a second mapping relation between the network address of the target gateway and the target domain name of the target service server after receiving the network address of the target gateway sent by the controller;
a network address determining module, configured to, when the target service server needs to be accessed, obtain a network address of the target gateway corresponding to a target domain name of the target service server in the second correspondence;
and the second service request sending module is used for sending a second service request aiming at the target service server to the target gateway based on the network address of the target gateway.
In a seventh aspect of the present invention, there is further provided a service request processing apparatus, where the apparatus is applied to a target gateway, and the apparatus includes:
the service request receiving module is used for receiving a service request which is sent by a client and aims at a target service server; the service request is sent by the client based on the network address of the target gateway received from the controller; the network address of the target gateway is: when receiving a domain name resolution request aiming at a target service server sent by a client, the controller determines a network address of a gateway meeting preset conditions from each alternative gateway according to a current first access delay between the client and each alternative gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each alternative gateway and the target service server;
and the service request sending module is used for sending the service request to the target service server so that the target service server responds to the service request.
Optionally, the apparatus further comprises:
a second detection request sending module, configured to send a second detection request to a target service server before receiving a service request, which is sent by the client and is addressed to the target service server;
a second access delay calculation module, configured to, when a second detection response to the second detection request sent by the target service server is received, calculate a current second access delay between the target gateway and the target service server based on a time when the second detection request is sent and a time when the second detection response is received;
and the second access delay sending module is used for sending the current second access delay between the target gateway and the target service server to the controller.
Optionally, the apparatus further comprises:
the permission information receiving module is used for receiving permission information which is sent by the controller and represents the access permission of the client aiming at the target service server before the service request is sent to the target service server so that the target service server responds to the service request;
and the service request sending submodule is used for sending the service request to the target service server under the condition that the client side is judged to have the access right of the target service server, so that the target service server responds to the service request.
In another aspect of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any one of the service request processing methods when executing the program stored in the memory.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements any one of the service request processing methods described above.
An embodiment of the present invention further provides a computer program product including instructions, which when run on a computer, causes the computer to execute any one of the service request processing methods described above.
The embodiment of the invention has the following beneficial effects:
in the system provided by the embodiment of the present invention, one service server may correspond to a plurality of candidate gateways in the preset gateways, and the controller may determine a target gateway that meets a preset condition from the plurality of candidate gateways based on an access delay between the client and the candidate gateways and/or an access delay between the candidate gateways and the service server. That is to say, the controller may determine the target gateway based on the performance of the alternative gateways, and if the performance of a certain alternative gateway is degraded, may select another alternative gateway as the target gateway to forward the service request, so as to avoid processing by the degraded alternative gateway, and further, may improve the processing efficiency of the service request, and improve the performance of the SDP framework.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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 invention, and it is obvious for those skilled in the art that other embodiments can be obtained by referring to these drawings.
Fig. 1 is a networking architecture provided in an embodiment of the present invention;
fig. 2 is a flowchart of a service request processing method provided in an embodiment of the present invention;
fig. 3 is a flowchart of another service request processing method provided in the embodiment of the present invention;
fig. 4 is a flowchart of another service request processing method provided in the embodiment of the present invention;
fig. 5 is a flowchart of another service request processing method provided in the embodiment of the present invention;
fig. 6 is a flowchart of a service request processing method provided in an embodiment of the present invention;
fig. 7 is a flowchart of another service request processing method provided in the embodiment of the present invention;
fig. 8 is a flowchart of another service request processing method provided in the embodiment of the present invention;
fig. 9 is a flowchart of a service request processing method provided in an embodiment of the present invention;
fig. 10 is a flowchart of another service request processing method provided in the embodiment of the present invention;
fig. 11 is a schematic diagram of a service request processing flow provided in an embodiment of the present invention;
fig. 12 is a block diagram of a service request processing apparatus provided in an embodiment of the present invention;
fig. 13 is a structural diagram of a service request processing apparatus provided in an embodiment of the present invention;
fig. 14 is a structural diagram of a service request processing apparatus provided in an embodiment of the present invention;
fig. 15 is a schematic structural diagram of an electronic device provided in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived from the embodiments given herein by one of ordinary skill in the art, are within the scope of the invention.
In the related art, the SDP architecture may include: the system comprises a client, a controller, a plurality of gateways and a plurality of service servers. The service servers corresponding to the gateways are different, and when the performance of a certain gateway is reduced, the processing efficiency of all service requests for the service server corresponding to the gateway is reduced, so that the performance of the SDP architecture is not high.
In order to solve the above problem, an embodiment of the present invention provides a service request processing system. Referring to fig. 1, fig. 1 is a framework of a networking according to an embodiment of the present invention, where the networking includes: the system comprises a controller 102, a client 101, a plurality of preset gateways (including a preset gateway 1031, a preset gateway 1032, a preset gateway 1033 and a preset gateway 1034), and a plurality of service servers (including a service server 1041, a service server 1042, a service server 1043 and a service server 1044). The embodiment of the present invention is described by taking an example including 4 preset gateways and 4 service servers, and is not limited to this.
Correspondingly, the service request processing system provided by the embodiment of the present invention may include: a controller 102, a client 101, and a target gateway (the target gateway may be any one of the plurality of preset gateways described above). Accordingly, the target service server mentioned in the embodiment of the present invention may be any one of the plurality of service servers described above.
As can be seen from fig. 1, each service server corresponds to a plurality of preset gateways (i.e., alternative gateways in the embodiment of the present invention). The alternative gateways corresponding to the service server 1041 include a preset gateway 1031 and a preset gateway 1033; the alternative gateways corresponding to the service server 1042 include a preset gateway 1031, a preset gateway 1032 and a preset gateway 3; the alternative gateways corresponding to the service server 1043 include a preset gateway 1031 and a preset gateway 1032; the alternative gateways corresponding to the service server 1044 include a preset gateway 1033 and a preset gateway 1034.
A client 101, configured to send a domain name resolution request for a target service server to the controller 102.
The controller 102 is configured to determine, according to a current first access delay between the client 101 and each alternative gateway corresponding to a target service server in each gateway, and/or a current second access delay between each alternative gateway and the target service server, a target gateway that meets a preset condition from each alternative gateway; the network address of the target gateway is sent to the client 101.
The client 101 is further configured to send a service request for the target service server to the target gateway based on the network address.
And the target gateway is used for receiving the service request and sending the service request to the target service server so that the target service server responds to the service request.
In the system of the embodiment of the present invention, one service server may correspond to a plurality of candidate gateways in the preset gateways, and the controller may determine a target gateway satisfying a preset condition from the plurality of candidate gateways based on an access delay between the client and the candidate gateway and/or an access delay between the candidate gateway and the service server. That is to say, the controller may determine the target gateway based on the performance of the alternative gateways, and if the performance of a certain alternative gateway is degraded, may select another alternative gateway as the target gateway to forward the service request, so as to avoid processing by the degraded alternative gateway, and further, may improve the processing efficiency of the service request, and improve the performance of the SDP framework.
For further embodiments of the client 101, the controller 102 and the target gateway in the above system, reference may be made to the following detailed description of embodiments of the client, controller and target gateway methods.
The invention provides a service request processing method, which can be applied to a controller, and the controller can be the controller 102 in the system.
Referring to fig. 2, fig. 2 is a flowchart of a service request processing method provided by an embodiment of the present invention, and the method is applied to a controller, and the method may include the following steps:
s201: receiving a domain name resolution request aiming at a target service server sent by a client.
S202: and determining the target gateway meeting the preset conditions from the alternative gateways according to the current first access time delay between the client and the alternative gateways corresponding to the target service servers in the preset gateways and/or the current second access time delay between each alternative gateway and the target service server.
S203: and sending the network address of the target gateway to the client, so that the client sends a service request aiming at the target service server to the target gateway based on the network address, so that the target gateway sends the service request to the target service server, and the target service server responds to the service request.
In the method of the embodiment of the invention, one service server can correspond to a plurality of alternative gateways in the preset gateways, and the controller can determine the target gateway meeting the preset condition from the plurality of alternative gateways based on the access time delay between the client and the alternative gateways and/or the access time delay between the alternative gateways and the service server. That is to say, the controller may determine the target gateway based on the performance of the alternative gateways, and if the performance of a certain alternative gateway is degraded, may select another alternative gateway as the target gateway to forward the service request, so as to avoid processing by the degraded alternative gateway, and further, may improve the processing efficiency of the service request, and improve the performance of the SDP framework.
In step S201, the controller is configured to resolve the domain name of each service server. When a user needs to access one service server (i.e. a target service server in the embodiment of the present invention) through a client, the client may send a domain name resolution request including a target domain name of the target service server to the controller.
In one implementation manner, an accessible service navigation page may be displayed in the client, where the accessible service navigation page includes multiple authority identifiers, and each authority identifier corresponds to a service server having an access authority of the client. For example, one authority identifier may be an icon of the corresponding service server. When the user clicks on the icon, the client may determine that the user selects to access the service server represented by the icon, and send a domain name resolution request for the service server to the controller.
In step S202, one service server corresponds to a plurality of gateways (i.e., alternative gateways) in the preset gateways, that is, the client may access the service server through any alternative gateway corresponding to the service server. Therefore, if the performance of a certain alternative gateway corresponding to the service server is degraded, another alternative gateway corresponding to the service server may be selected to forward the service request for the client to access the service, so as to avoid processing by the degraded alternative gateway, thereby improving the processing efficiency of the service request and improving the performance of the SDP architecture.
Each preset gateway may correspond to all the service servers, or may also correspond to a part of all the service servers.
In the embodiment of the present invention, the controller may determine the target gateway from the alternative gateways in the following manners.
In one implementation, the controller may determine, based on the first access delay, a target gateway that meets a preset condition from among the candidate gateways. For example, the controller may determine the candidate gateway with the smallest first access latency as the target gateway. Alternatively, the controller may determine alternative gateways (which may be referred to as first preferred gateways) whose first access delay is smaller than a preset threshold, and further randomly determine one alternative gateway from the first preferred gateways as the target gateway. When the client accesses the target service server through the target gateway, the access time delay between the client and the target gateway is small, so that the forwarding efficiency of the service request can be improved, and further, the performance of the SDP framework is improved.
In another implementation manner, the controller may determine, based on the second access delay, a target gateway that meets a preset condition from among the candidate gateways. For example, the controller may determine the candidate gateway with the smallest second access latency as the target gateway. Alternatively, the controller may determine alternative gateways (which may be referred to as second preferred gateways) whose second access delay is smaller than a preset threshold, and further randomly determine one alternative gateway from the second preferred gateways as the target gateway. When the client accesses the target service server through the target gateway, the access time delay between the target gateway and the target service server is shorter, so that the processing efficiency of the service request can be improved, and further, the performance of the SDP framework is improved.
In another implementation manner, the controller may determine, from the candidate gateways, a target gateway that meets a preset condition based on a sum of the first access delay and the second access delay. For example, the controller may determine an alternative gateway (which may be referred to as a third preferred gateway) in which a sum of the second access delays of the first access delays is smaller than a preset threshold, and further randomly determine one alternative gateway from the third preferred gateway as the target gateway. When the client accesses the target service server through the target gateway, the access time delay is short, so that the processing efficiency of the service request can be improved, and further, the performance of the SDP framework is improved.
In another implementation, referring to fig. 3, on the basis of fig. 2, step S202 specifically includes:
s2021: and calculating the sum of the current first access time delay between the client and the alternative gateway and the current second access time delay between the alternative gateway and the target service server aiming at each alternative gateway corresponding to the target service server in each preset gateway.
S2022: and determining the alternative gateway with the minimum corresponding sum value as the target gateway.
Based on the processing, when the client accesses the target service server through the target gateway, the forwarding efficiency of the service request can be further improved, and the performance of the SDP framework is improved.
In step S203, in an implementation manner, the service request may carry a server identifier of the target service server, and correspondingly, the target gateway may determine to forward the service request to the target service server according to the server identifier. For example, the server identifier of the service server may be a port corresponding to the service server.
In addition, after forwarding the service request to the target service server, the target gateway may also receive a service response for the service request sent by the target service server, and forward the service response to the client.
In one embodiment, the client in the embodiment of the present invention may be client software of an SDP installed in the terminal device. The client can send a registration request carrying an account and a password to the controller, and correspondingly, the controller can register the client, record the account and the password of the client, and determine the access right of the client, namely, determine the service server with the access right of the client.
In one implementation, when a user logs in a client, the client may send an authentication request carrying an account and a password input by the user to a controller, and the controller may authenticate the received account and password based on the account and password recorded locally. If the authentication is passed, the controller can determine the access right of the client and notify the client. Further, the client may display the accessible service navigation page.
In one embodiment, the controller may also dynamically adjust the access rights of the client. For example, the controller may detect the security level of the client in real time. When the security level of the client is detected to be lower, the controller can modify the access authority of the client, so that the client does not have access to the service server corresponding to the important service. When the security level of the client is detected to be higher, the controller can modify the access authority of the client, so that the client can access more service servers corresponding to important services.
In one embodiment, the controller may also register the default gateway when the default gateway is deployed. After receiving the registration request sent by each preset gateway, the controller records the corresponding relationship between the network address of the preset gateway and the domain name of the corresponding service server. Subsequently, when the preset gateway is on-line again, the controller can also authenticate the preset gateway.
In an embodiment, referring to fig. 4, on the basis of fig. 2, before step S203, the method may further include:
s204: and acquiring a target domain name of a target service server carried in the domain name resolution request.
S205: and acquiring the network address of the target gateway from the network address of each alternative gateway corresponding to the target domain name according to a first corresponding relation between the preset domain name of the service server and the network address of the gateway.
In one implementation, the controller may record a correspondence between the domain name of each service server and the network address of each candidate gateway corresponding to the service server (i.e., the first correspondence in the embodiment of the present invention). The controller may determine, according to the first correspondence, a network address of an alternative gateway corresponding to the target service server, and may further acquire, from the determined network addresses of the alternative gateways, a network address of the target gateway.
For example, the domain name of the service server yi is yi.test.com, and the alternative gateway corresponding to the service server includes: alternative gateway g1, alternative gateway g 2. Com, the network address of each alternative gateway corresponding to the domain name yi.test.com recorded by the controller is: addr1, addr2, addr3, … … addrn. The current access delay between the client end devi and the alternative gateway gj is Cost _ dev _ gj, and the current access delay between the alternative gateway gj and the service server yi is Cost _ gj _ yi.
After the controller receives a domain name resolution request for a service server yi sent by a client, the controller calculates an access delay Cost _ dev _ gj _ yi for the client devi to access the service server yi through an alternative gateway gj, and the calculation is as follows:
Cost_devi_gj_yi=Cost_devi_gj+Cost_gj_yi
and sequentially taking the value of j from 1 to n, and determining that when the value of j is k, the access delay Cost _ devi _ gk _ yi of the client terminal devi accessing the service server yi through the alternative gateway gk has the minimum value, namely Cost _ devi _ gk _ yi equals to min (Cost _ devi _ gj _ yi).
Then, the domain name resolution result of the controller for the service server yi is the network address addrk corresponding to the alternative gateway gk. That is, the controller may determine the alternative gateway gk as the target gateway.
In one embodiment, referring to fig. 5, on the basis of fig. 2, before step S202, the method may further include:
s206: and receiving the current first access delay between the client and each alternative gateway sent by the client.
S207: and receiving the current second access delay between the alternative gateway and the target service server sent by each alternative gateway.
Wherein, the current first access delay between the client and each alternative gateway is: the client is calculated based on the time of sending the first detection request to the alternative gateway and the time of receiving the first detection response sent by the alternative gateway, and the time is sent to the controller. The current second access delay between the alternative gateway and the target service server is: the alternative gateway is calculated based on the time of sending the second detection request to the target service server and the time of receiving the second detection response sent by the target service server, and is sent to the controller.
In the embodiment of the invention, the client can detect the access time delay between the client and each preset gateway and send the access time delay to the controller. Each preset gateway can detect the access time delay between the preset gateway and each corresponding service server and send the access time delay to the controller.
Further, the controller may obtain an access delay between the client and each of the predetermined gateways and an access delay between each of the predetermined gateways and each of the corresponding service servers.
The manner in which the client calculates the first access latency may refer to the detailed description of the method embodiment of the client below; the manner in which the alternative gateway calculates the second access delay may be referred to as detailed below with respect to the target gateway calculating the second access delay.
In one embodiment, the method may further comprise:
and issuing authority information which represents the access authority of the client aiming at each service server to each alternative gateway so that the target gateway sends the service request to the target service server under the condition of judging that the client has the access authority of the target service server when receiving the service request.
In one implementation, for each client, the controller may generate authority information of the client, where the authority information may be preset by a technician or determined by the controller according to a security level of the client. The controller may issue the authority information of the client to each preset gateway. Correspondingly, when a certain alternative gateway receives a service request sent by a client, whether the client has the authority to access the target service server can be judged according to the authority information of the client. If yes, the alternative gateway can send the service request to a target service server; if not, the alternative gateway may discard the service request, or may send a user alert to the client. The user prompt indicates that the client does not currently have access rights to the target service server.
In one embodiment, the method may further comprise:
and when the target gateway is detected to be abnormal, sending an abnormal notification to the client so that the client deletes the network address of the target gateway from the corresponding relation between the network address of the gateway and the domain name of the service server to update the second corresponding relation.
In the embodiment of the present invention, the controller may determine whether the target gateway is abnormal according to the first access delay and/or the second access delay. For example, when it is determined that the target gateway has a larger access delay according to the first access delay and/or the second access delay, it may be determined that the target gateway is abnormal.
In addition, each preset gateway may also periodically send a heartbeat message to the controller, and accordingly, the controller may determine whether the preset gateway is abnormal based on the heartbeat message sent by the preset gateway. For example, if the heartbeat message sent by the preset gateway is not received again when the preset time is reached after the heartbeat message sent by the preset gateway is received last time, the controller may determine that the preset gateway is abnormal. The preset duration is the period of sending the heartbeat message by the preset gateway.
Based on the same inventive concept, the invention provides a service request processing method, which can be applied to a client, and the client can be the client 101 in the system. Referring to fig. 6, the method may include the steps of:
s601: sending a domain name resolution request aiming at a target service server to a controller, so that the controller determines a target gateway meeting preset conditions from various alternative gateways according to the current first access time delay between the client and various alternative gateways corresponding to the target service server in various preset gateways and/or the current second access time delay between each alternative gateway and the target service server, and sending a network address of the target gateway to the client.
S602: and receiving the network address of the target gateway sent by the controller.
S603: and sending a first service request aiming at the target service server to the target gateway based on the network address of the target gateway, so that the target gateway sends the first service request to the target service server, and the target service server responds to the first service request.
In the method of the embodiment of the present invention, one service server may correspond to a plurality of candidate gateways in the preset gateways, and the controller may determine a target gateway satisfying a preset condition from the plurality of candidate gateways based on an access delay between the client and the candidate gateways and/or an access delay between the candidate gateways and the service server. That is to say, the controller may determine the target gateway based on the performance of the alternative gateways, and if the performance of a certain alternative gateway is degraded, may select another alternative gateway as the target gateway to forward the service request, so as to avoid processing by the degraded alternative gateway, and further, may improve the processing efficiency of the service request, and improve the performance of the SDP framework.
The client can send a registration request carrying an account and a password to the controller, and correspondingly, the controller can register the client, record the account and the password of the client, and determine the access right of the client, namely, determine the service server with the access right of the client.
In one implementation, when a user logs in a client, the client may send an authentication request carrying an account and a password input by the user to a controller, and the controller may authenticate the received account and password based on the account and password recorded locally. If the authentication is passed, the controller can determine the access right of the client and notify the client. Further, the client may display the accessible service navigation page. The user can select the service server to be accessed according to the accessible service navigation page.
In one embodiment, referring to fig. 7, on the basis of fig. 6, before step S601, the method further includes:
s604: and sending a first detection request to each alternative gateway.
S605: when a first detection response sent by the alternative gateway and aiming at the first detection request is received, calculating the access delay between the client and the alternative gateway as the first access delay based on the time of sending the first detection request and the time of receiving the first detection response.
S606: and sending the current first access delay between the client and the alternative gateway to the controller.
In one implementation, the client may periodically send a first detection request to each alternative gateway to detect a first access delay between itself and the alternative gateway in real time.
In one implementation, the client may calculate a difference between a time of sending the first detection request and a time of receiving the first detection response as the first access delay between the client and the alternative gateway.
In one embodiment, referring to fig. 8, on the basis of fig. 6, after step S602, the method further includes:
s607: and recording a second corresponding relation between the network address of the target gateway and the target domain name of the target service server.
S608: and when the target service server needs to be accessed, acquiring the network address of the target gateway corresponding to the target domain name of the target service server in the second corresponding relation.
S609: and sending a second service request aiming at the target service server to the target gateway based on the network address of the target gateway.
In one implementation, when a client needs to access a target service server, the client may send a domain name resolution request for the target service server to a controller. The controller then sends the network address of the target gateway to the client, which can use the network address to send a service request to the target gateway.
Furthermore, the client may also locally record a correspondence between the network address of the target gateway and the target domain name of the target service server (i.e., the second correspondence in the embodiment of the present invention). When the client needs to access the target service server again, the client does not need to send a domain name resolution request for the target service server to the controller again, and can directly obtain the network address of the target gateway according to the locally recorded second corresponding relation and send the service request to the target gateway by using the network address.
The client directly accesses the target service server according to the locally recorded second corresponding relation without domain name resolution through the controller, so that the processing efficiency of the service request can be improved, and the performance of the SDP framework is improved.
Based on the same inventive concept, the invention provides a service request processing method, which can be applied to a target gateway, and the target gateway can be a target gateway in the system. Referring to fig. 9, the method may include the steps of:
s901: and receiving a service request aiming at the target service server sent by the client.
The service request is sent by the client based on the network address of the target gateway received from the controller; the network address of the target gateway is: when receiving a domain name resolution request aiming at a target service server sent by a client, a controller determines a network address of a gateway meeting preset conditions from all the alternative gateways according to a current first access time delay between the client and each alternative gateway corresponding to the target service server in all the preset gateways and/or a current second access time delay between each alternative gateway and the target service server.
S902: and sending the service request to the target service server so that the target service server responds to the service request.
In the method of the embodiment of the present invention, one service server may correspond to a plurality of candidate gateways in the preset gateways, and the controller may determine a target gateway satisfying a preset condition from the plurality of candidate gateways based on an access delay between the client and the candidate gateways and/or an access delay between the candidate gateways and the service server. That is to say, the controller may determine the target gateway based on the performance of the alternative gateways, and if the performance of a certain alternative gateway is degraded, may select another alternative gateway as the target gateway to forward the service request, so as to avoid processing by the degraded alternative gateway, and further, may improve the processing efficiency of the service request, and improve the performance of the SDP framework.
In one embodiment, referring to fig. 10, on the basis of fig. 9, before step S901, the method further includes:
s903: and sending a second detection request to the target service server.
S904: and when a second detection response aiming at the second detection request sent by the target service server is received, calculating the current second access delay between the target gateway and the target service server based on the time of sending the second detection request and the time of receiving the second detection response.
S905: and sending the current second access delay between the target gateway and the target service server to the controller.
In one implementation, each alternative gateway may periodically send a second detection request to the target service server to detect a second access delay between itself and the target service server in real time.
In one implementation, the alternative gateway may calculate a difference between a time of sending the second detection request and a time of receiving the second detection response as the second access delay between the alternative gateway and the target service server.
In one embodiment, the method further comprises:
and receiving authority information which is sent by the controller and represents the access authority of the client aiming at the target service server.
The step S902 may include:
and under the condition that the client side is judged to have the access right of the target service server, sending a service request to the target service server so that the target service server responds to the service request.
In one implementation, a client may send a registration request carrying an account and a password to a controller, and accordingly, the controller may register the client, record the account and the password of the client, and determine an access right of the client, that is, determine a service server to which the client has the access right. The controller may issue the authority information of the client to each preset gateway. Correspondingly, when a certain alternative gateway receives a service request sent by a client, whether the client has the authority to access the target service server can be judged according to the authority information of the client. If yes, the alternative gateway can send the service request to a target service server; if not, the alternative gateway may discard the service request, or may send a user alert to the client. The user prompt indicates that the client does not currently have access rights to the target service server.
In one embodiment, the controller may also register the default gateway when the default gateway is deployed. After receiving the registration request sent by each preset gateway, the controller records the corresponding relationship between the network address of the preset gateway and the domain name of the corresponding service server. Subsequently, when the preset gateway is on-line again, the controller can also authenticate the preset gateway.
Referring to fig. 11, fig. 11 is a schematic diagram of a service request processing flow according to an embodiment of the present invention.
Technicians can deploy an SDP framework and process service requests of clients based on the SDP framework. The SDP architecture may include: the system comprises a client, a controller, a plurality of preset gateways and a plurality of service servers.
The controller can register the client and set the client authority according to the dynamic authority generation strategy, namely, the service server with the access authority of the client is determined.
The controller periodically obtains the time delay (first access time delay) between the preset gateway and the service server from the preset gateway, obtains the time delay (second access time delay) between the client and each preset gateway from the client, and stores the time delay.
The client sends an authentication request to the controller, the controller authenticates the client, and after the authentication is passed, the controller sends an accessible service navigation page to the client, and the controller issues user information and the authority of the user to access the service server to each preset gateway.
After the authentication is passed, the client displays an accessible service navigation page, the user clicks an icon corresponding to the service server representing the service yi, and the service server of the service yi is accessed, and the specific process is as follows: the client sends a domain name resolution request of a service server aiming at the service yi to the controller; the controller analyzes the domain name of the service server of the service yi and sends the network address of the target gateway obtained by domain name analysis to the client; the client accesses the service server of the service yi through the network address.
The controller periodically monitors the running state of the preset gateway, and when detecting that a certain preset gateway is abnormal, the controller sends an abnormal notification to the client so that the client deletes the network address of the preset gateway from the corresponding relationship between the network address of the gateway and the domain name of the service server to update the second corresponding relationship. When the client accesses the service server of the service yi again, the domain name resolution request of the service server aiming at the service yi is sent to the controller again, and the normal operation of the service is ensured.
Based on the same inventive concept, an embodiment of the present invention further provides a service request processing apparatus, which is applied to a controller, referring to fig. 12, where fig. 12 is a structural diagram of the service request processing apparatus provided in the embodiment of the present invention, and the apparatus includes:
a domain name resolution request receiving module 1201, configured to receive a domain name resolution request for a target service server sent by a client;
a target gateway determining module 1202, configured to determine, according to a current first access delay between the client and each candidate gateway corresponding to a target service server in each preset gateway, and/or a current second access delay between each candidate gateway and the target service server, a target gateway meeting a preset condition from among the candidate gateways;
a network address sending module 1203, configured to send a network address of a target gateway to a client, so that the client sends a service request for a target service server to the target gateway based on the network address; so that the target gateway sends the service request to the target service server, so that the target service server responds to the service request.
In one embodiment, the target gateway determining module 1202 includes:
the access delay sum value operator module is used for calculating the sum value of the current first access delay between the client and the alternative gateway and the current second access delay between the alternative gateway and the target service server aiming at each alternative gateway corresponding to the target service server in each preset gateway;
and the target gateway determining submodule is used for determining the alternative gateway with the minimum corresponding sum value as the target gateway.
In one embodiment, the apparatus further comprises:
the target domain name acquisition module is used for acquiring a target domain name of a target service server carried in a domain name resolution request before sending the network address of the target gateway to the client;
and the network address acquisition module is used for acquiring the network address of the target gateway from the network addresses of all the alternative gateways corresponding to the target domain name according to the first corresponding relation between the preset domain name of the service server and the network address of the gateway.
In one embodiment, the apparatus further comprises:
the first access delay receiving module is used for receiving the current first access delay between the client and each alternative gateway sent by the client before the target gateway meeting the preset conditions is determined from each alternative gateway according to the current first access delay between the client and each alternative gateway corresponding to the target service server in each preset gateway and/or the current second access delay between each alternative gateway and the target service server; wherein, the current first access delay between the client and each alternative gateway is: the client is obtained by calculation based on the time for sending the first detection request to the alternative gateway and the time for receiving the first detection response sent by the alternative gateway, and the time is sent to the controller;
the second access delay receiving module is used for receiving the current second access delay between the alternative gateway and the target service server, which is sent by each alternative gateway, before the target gateway meeting the preset conditions is determined from each alternative gateway according to the current first access delay between the client and each alternative gateway corresponding to the target service server in each preset gateway and/or the current second access delay between each alternative gateway and the target service server; wherein, the current second access delay between the alternative gateway and the target service server is: the alternative gateway is calculated based on the time of sending the second detection request to the target service server and the time of receiving the second detection response sent by the target service server, and is sent to the controller.
In one embodiment, the apparatus further comprises:
and the permission information sending module is used for sending permission information which represents the access permission of the client aiming at each service server to the target gateway so that the target gateway sends the service request to the target service server under the condition of judging that the client has the access permission of the target service server when receiving the service request.
In one embodiment, the apparatus further comprises:
and the abnormity notification sending module is used for sending an abnormity notification to the client when the abnormity of the target gateway is detected, so that the client deletes the network address of the target gateway from the second corresponding relation between the network address of the gateway and the domain name of the service server to update the second corresponding relation.
Based on the same inventive concept, an embodiment of the present invention further provides a service request processing apparatus, which is applied to a client, referring to fig. 13, where fig. 13 is a structural diagram of the service request processing apparatus provided in the embodiment of the present invention, and the apparatus includes:
a domain name resolution request sending module 1301, configured to send a domain name resolution request for a target service server to a controller, so that the controller determines, according to a current first access delay between a client and each alternative gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each alternative gateway and the target service server, a target gateway meeting a preset condition from each alternative gateway, and sends a network address of the target gateway to the client;
a network address receiving module 1302, configured to receive a network address of a target gateway sent by a controller;
the first service request sending module 1303 is configured to send a first service request for the target service server to the target gateway based on the network address of the target gateway, so that the target gateway sends the first service request to the target service server, and the target service server responds to the first service request.
In one embodiment, the apparatus further comprises:
a first detection request sending module, configured to send, to each alternative gateway, a first detection request;
the first access delay calculation module is used for calculating the current first access delay between the client and the alternative gateway based on the time of sending the first detection request and the time of receiving the first detection response when the first detection response aiming at the first detection request sent by the alternative gateway is received;
and the first access delay sending module is used for sending the current first access delay between the client and the alternative gateway to the controller.
In one embodiment, the apparatus further comprises:
the second corresponding relation recording module is used for recording a second corresponding relation between the network address of the target gateway and the target domain name of the target service server;
the network address determining module is used for acquiring a network address of a target gateway corresponding to a target domain name of a target service server in the second corresponding relation when the target service server needs to be accessed;
and the second service request sending module is used for sending a second service request aiming at the target service server to the target gateway based on the network address of the target gateway.
Based on the same inventive concept, an embodiment of the present invention further provides a service request processing apparatus, which is applied to a target gateway, referring to fig. 14, where fig. 14 is a structural diagram of the service request processing apparatus provided in the embodiment of the present invention, and the apparatus includes:
a service request receiving module 1401, configured to receive a service request, which is sent by a client and is addressed to a target service server; the service request is sent by the client based on the network address of the target gateway received from the controller; the network address of the target gateway is: when receiving a domain name resolution request aiming at a target service server sent by a client, a controller determines a network address of a gateway meeting preset conditions from all alternative gateways according to a current first access time delay between the client and each alternative gateway corresponding to the target service server in all preset gateways and/or a current second access time delay between each alternative gateway and the target service server;
a service request sending module 1402, configured to send a service request to the target service server, so that the target service server responds to the service request.
In one embodiment, the apparatus further comprises:
the second detection request sending module is used for sending a second detection request to the target service server;
the second access delay calculation module is used for calculating the current second access delay between the target gateway and the target service server based on the time of sending the second detection request and the time of receiving the second detection response when receiving the second detection response aiming at the second detection request sent by the target service server;
and the second access delay sending module is used for sending the current second access delay between the target gateway and the target service server to the controller.
In one embodiment, the apparatus further comprises:
the authority information receiving module is used for receiving authority information which is sent by the controller and represents the access authority of the client aiming at the target service server;
and the service request sending submodule sends the service request to the target service server under the condition that the client side is judged to have the access right of the target service server, so that the target service server responds to the service request.
An embodiment of the present invention further provides an electronic device, as shown in fig. 15, including a processor 1501, a communication interface 1502, a memory 1503, and a communication bus 1504, where the processor 1501, the communication interface 1502, and the memory 1503 complete mutual communication through the communication bus 1504,
a memory 1503 for storing a computer program;
the processor 1501 is configured to implement any one of the service request processing methods described above when executing the program stored in the memory 1503.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the service request processing methods described above.
In another embodiment, the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any one of the service request processing methods in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system, the apparatus, the electronic device, and the computer-readable storage medium embodiments, since they are substantially similar to the method embodiments, the description is simple, and the relevant points can be referred to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (27)

1. A service request processing system, the system comprising: the system comprises a client, a controller and a plurality of preset gateways; wherein:
the client is used for sending a domain name resolution request aiming at the target service server to the controller;
the controller is configured to determine, according to a current first access delay between the client and a plurality of candidate gateways corresponding to the target service server in each preset gateway, and/or a current second access delay between each candidate gateway and the target service server, a target gateway meeting a preset condition from the candidate gateways; sending the network address of the target gateway to the client;
the client is further used for sending a service request aiming at the target service server to the target gateway based on the network address of the target gateway;
and the target gateway is used for receiving the service request and sending the service request to the target service server so that the target service server responds to the service request.
2. A service request processing method is applied to a controller, and the method comprises the following steps:
receiving a domain name resolution request aiming at a target service server sent by a client;
determining a target gateway meeting preset conditions from the alternative gateways according to a current first access time delay between the client and each alternative gateway corresponding to the target service server in each preset gateway and/or a current second access time delay between each alternative gateway and the target service server;
sending a network address of the target gateway to the client, so that the client sends a service request aiming at the target service server to the target gateway based on the network address; so that the target gateway sends the service request to the target service server, so that the target service server responds to the service request.
3. The method according to claim 2, wherein the determining, according to a current first access delay between the client and each candidate gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each candidate gateway and the target service server, a target gateway meeting a preset condition from among the candidate gateways comprises:
calculating the sum of the current first access time delay between the client and the alternative gateway and the current second access time delay between the alternative gateway and the target service server aiming at each alternative gateway corresponding to the target service server in each preset gateway;
and determining the alternative gateway with the minimum corresponding sum value as the target gateway.
4. The method of claim 2, wherein prior to said sending the network address of the target gateway to the client, the method further comprises:
acquiring a target domain name of the target service server carried in the domain name resolution request;
and acquiring the network address of the target gateway from the network address of each alternative gateway corresponding to the target domain name according to a first corresponding relation between the preset domain name of the service server and the network address of the gateway.
5. The method according to claim 2, wherein before the determining, according to a current first access delay between the client and each candidate gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each candidate gateway and the target service server, a target gateway meeting a preset condition from among the candidate gateways, the method further comprises:
receiving a current first access delay between the client and each alternative gateway sent by the client; wherein, the current first access delay between the client and each alternative gateway is: the client is obtained by calculation based on the time of sending the first detection request to the alternative gateway and the time of receiving the first detection response sent by the alternative gateway, and the first detection request is sent to the controller;
receiving a current second access delay between the alternative gateway and the target service server, which is sent by each alternative gateway; wherein, the current second access delay between the alternative gateway and the target service server is: the alternative gateway is calculated based on the time of sending the second detection request to the target service server and the time of receiving the second detection response sent by the target service server, and is sent to the controller.
6. The method of claim 2, further comprising:
and issuing authority information which represents the access authority of the client aiming at each service server to the target gateway so that the target gateway sends the service request to the target service server when receiving the service request and under the condition that the client is judged to have the access authority of the target service server.
7. The method of claim 2, further comprising:
when the target gateway is detected to be abnormal, an abnormal notification is sent to the client, so that the client deletes the network address of the target gateway from a second corresponding relation between the network address of the gateway and the domain name of the service server, and the second corresponding relation is updated.
8. A service request processing method is applied to a client, and the method comprises the following steps:
sending a domain name resolution request aiming at a target service server to a controller, so that the controller determines a target gateway meeting preset conditions from various alternative gateways according to a current first access delay between the client and various alternative gateways corresponding to the target service server in various preset gateways and/or a current second access delay between each alternative gateway and the target service server, and sending a network address of the target gateway to the client;
receiving the network address of the target gateway sent by the controller;
and sending a first service request aiming at the target service server to the target gateway based on the network address of the target gateway, so that the target gateway sends the first service request to the target service server, and the target service server responds to the first service request.
9. The method of claim 8, wherein prior to said sending a domain name resolution request to the controller for the target traffic server, the method further comprises:
aiming at each alternative gateway, sending a first detection request to the alternative gateway;
when a first detection response aiming at the first detection request sent by the alternative gateway is received, calculating a current first access delay between the client and the alternative gateway based on the time of sending the first detection request and the time of receiving the first detection response;
and sending the current first access delay between the client and the alternative gateway to the controller.
10. The method of claim 8, wherein after the receiving the network address of the target gateway sent by the controller, the method further comprises:
recording a second corresponding relation between the network address of the target gateway and the target domain name of the target service server;
when the target service server needs to be accessed, acquiring a network address of the target gateway corresponding to a target domain name of the target service server in the second corresponding relation;
and sending a second service request aiming at the target service server to the target gateway based on the network address of the target gateway.
11. A service request processing method is applied to a target gateway, and the method comprises the following steps:
receiving a service request aiming at a target service server sent by a client; the service request is sent by the client based on the network address of the target gateway received from the controller; the network address of the target gateway is: when receiving a domain name resolution request aiming at a target service server sent by a client, the controller determines a network address of a gateway meeting preset conditions from each alternative gateway according to a current first access delay between the client and each alternative gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each alternative gateway and the target service server;
and sending the service request to the target service server so that the target service server responds to the service request.
12. The method of claim 11, wherein before receiving the service request sent by the client for the target service server, the method further comprises:
sending a second detection request to the target service server;
when a second detection response aiming at the second detection request sent by the target service server is received, calculating the current second access delay between the target gateway and the target service server based on the time of sending the second detection request and the time of receiving the second detection response;
and sending the current second access delay between the target gateway and the target service server to the controller.
13. The method of claim 11, wherein before said sending the service request to the target service server to cause the target service server to respond to the service request, the method further comprises:
receiving authority information which is sent by the controller and represents the access authority of the client aiming at the target service server;
the sending the service request to the target service server so that the target service server responds to the service request includes:
and under the condition that the client side is judged to have the access right of the target business server, sending the business request to the target business server so that the target business server responds to the business request.
14. A service request processing apparatus, wherein the apparatus is applied to a controller, and the apparatus comprises:
the domain name resolution request receiving module is used for receiving a domain name resolution request aiming at a target service server and sent by a client;
a target gateway determining module, configured to determine, according to a current first access delay between the client and each candidate gateway corresponding to the target service server in each preset gateway, and/or a current second access delay between each candidate gateway and the target service server, a target gateway that meets a preset condition from among the candidate gateways;
a network address sending module, configured to send a network address of the target gateway to the client, so that the client sends a service request for the target service server to the target gateway based on the network address; so that the target gateway sends the service request to the target service server, so that the target service server responds to the service request.
15. The apparatus of claim 14, wherein the target gateway determination module comprises:
the access delay sum value operator module is used for calculating the sum value of the current first access delay between the client and the alternative gateway and the current second access delay between the alternative gateway and the target service server aiming at each alternative gateway corresponding to the target service server in each preset gateway;
and the target gateway determining submodule is used for determining the alternative gateway with the minimum corresponding sum value as the target gateway.
16. The apparatus of claim 14, further comprising:
a target domain name obtaining module, configured to obtain a target domain name of the target service server carried in the domain name resolution request before the network address of the target gateway is sent to the client;
and the network address acquisition module is used for acquiring the network address of the target gateway from the network addresses of all the alternative gateways corresponding to the target domain name according to a first corresponding relation between the preset domain name of the service server and the network address of the gateway.
17. The apparatus of claim 14, further comprising:
a first access delay receiving module, configured to receive, before determining, according to a current first access delay between the client and each candidate gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each candidate gateway and the target service server, a target gateway meeting a preset condition from among the candidate gateways, a current first access delay between the client and each candidate gateway sent by the client; wherein, the current first access delay between the client and each alternative gateway is: the client is obtained by calculation based on the time of sending the first detection request to the alternative gateway and the time of receiving the first detection response sent by the alternative gateway, and the first detection request is sent to the controller;
a second access delay receiving module, configured to receive, before determining, according to a current first access delay between the client and each candidate gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each candidate gateway and the target service server, a target gateway meeting a preset condition from among the candidate gateways, a current second access delay between the candidate gateway and the target service server sent by each candidate gateway; wherein, the current second access delay between the alternative gateway and the target service server is: the alternative gateway is calculated based on the time of sending the second detection request to the target service server and the time of receiving the second detection response sent by the target service server, and is sent to the controller.
18. The apparatus of claim 14, further comprising:
and the permission information sending module is used for sending permission information which represents the access permission of the client aiming at each service server to the target gateway so as to enable the target gateway to send the service request to the target service server when receiving the service request and under the condition that the client is judged to have the access permission of the target service server.
19. The apparatus of claim 14, further comprising:
and the abnormity notification sending module is used for sending an abnormity notification to the client when the target gateway is detected to be abnormal, so that the client deletes the network address of the target gateway from a second corresponding relationship between the network address of the gateway and the domain name of the service server to update the second corresponding relationship.
20. A service request processing apparatus, wherein the apparatus is applied to a client, and the apparatus comprises:
a domain name resolution request sending module, configured to send a domain name resolution request for a target service server to a controller, so that the controller determines, according to a current first access delay between the client and each candidate gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each candidate gateway and the target service server, a target gateway meeting a preset condition from among the candidate gateways, and sends a network address of the target gateway to the client;
a network address receiving module, configured to receive the network address of the target gateway sent by the controller;
and the first service request sending module is used for sending a first service request aiming at the target service server to the target gateway based on the network address of the target gateway so that the target gateway sends the first service request to the target service server and the target service server responds to the first service request.
21. The apparatus of claim 20, further comprising:
a first detection request sending module, configured to send, for each alternative gateway, a first detection request to the alternative gateway before sending, to the controller, a domain name resolution request for the target service server;
a first access delay calculation module, configured to, when a first detection response to the first detection request sent by the alternative gateway is received, calculate a current first access delay between the client and the alternative gateway based on a time when the first detection request is sent and a time when the first detection response is received;
and a first access delay sending module, configured to send, to the controller, a current first access delay between the client and the alternative gateway.
22. The apparatus of claim 20, further comprising:
a second mapping relation recording module, configured to record a second mapping relation between the network address of the target gateway and the target domain name of the target service server after receiving the network address of the target gateway sent by the controller;
a network address determining module, configured to, when the target service server needs to be accessed, obtain a network address of the target gateway corresponding to a target domain name of the target service server in the second correspondence;
and the second service request sending module is used for sending a second service request aiming at the target service server to the target gateway based on the network address of the target gateway.
23. A service request processing apparatus, wherein the apparatus is applied to a target gateway, and the apparatus comprises:
the service request receiving module is used for receiving a service request which is sent by a client and aims at a target service server; the service request is sent by the client based on the network address of the target gateway received from the controller; the network address of the target gateway is: when receiving a domain name resolution request aiming at a target service server sent by a client, the controller determines a network address of a gateway meeting preset conditions from each alternative gateway according to a current first access delay between the client and each alternative gateway corresponding to the target service server in each preset gateway and/or a current second access delay between each alternative gateway and the target service server;
and the service request sending module is used for sending the service request to the target service server so that the target service server responds to the service request.
24. The apparatus of claim 23, further comprising:
a second detection request sending module, configured to send a second detection request to a target service server before receiving a service request, which is sent by the client and is addressed to the target service server;
a second access delay calculation module, configured to, when a second detection response to the second detection request sent by the target service server is received, calculate a current second access delay between the target gateway and the target service server based on a time when the second detection request is sent and a time when the second detection response is received;
and the second access delay sending module is used for sending the current second access delay between the target gateway and the target service server to the controller.
25. The apparatus of claim 23, further comprising:
the permission information receiving module is used for receiving permission information which is sent by the controller and represents the access permission of the client aiming at the target service server before the service request is sent to the target service server so that the target service server responds to the service request;
and the service request sending submodule is used for sending the service request to the target service server under the condition that the client side is judged to have the access right of the target service server, so that the target service server responds to the service request.
26. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 2-7, or 8-10, or 11-13 when executing a program stored in a memory.
27. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 2 to 7, or 8 to 10, or 11 to 13.
CN202111010420.4A 2021-08-31 2021-08-31 Service request processing system, method and device Pending CN113709251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111010420.4A CN113709251A (en) 2021-08-31 2021-08-31 Service request processing system, method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111010420.4A CN113709251A (en) 2021-08-31 2021-08-31 Service request processing system, method and device

Publications (1)

Publication Number Publication Date
CN113709251A true CN113709251A (en) 2021-11-26

Family

ID=78657700

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111010420.4A Pending CN113709251A (en) 2021-08-31 2021-08-31 Service request processing system, method and device

Country Status (1)

Country Link
CN (1) CN113709251A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107896241A (en) * 2017-10-23 2018-04-10 东软集团股份有限公司 Detection method, device, storage medium and the electronic equipment of network access speed
US20180270302A1 (en) * 2017-03-16 2018-09-20 A10 Networks, Inc. Distributed Global Server Load Balancing Controllers Sharing Service Delay Time

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180270302A1 (en) * 2017-03-16 2018-09-20 A10 Networks, Inc. Distributed Global Server Load Balancing Controllers Sharing Service Delay Time
CN107896241A (en) * 2017-10-23 2018-04-10 东软集团股份有限公司 Detection method, device, storage medium and the electronic equipment of network access speed

Similar Documents

Publication Publication Date Title
CN108923908B (en) Authorization processing method, device, equipment and storage medium
CN109542361B (en) Distributed storage system file reading method, system and related device
CN112087644B (en) Pull stream request processing method, device and system, electronic equipment and storage medium
CN109213604B (en) Data source management method and device
CN111031035B (en) Sensitive data access behavior monitoring method and device
WO2020000749A1 (en) Method and apparatus for detecting unauthorized vulnerabilities
CN109889511B (en) Process DNS activity monitoring method, equipment and medium
CN111104675A (en) Method and device for detecting system security vulnerability
CN111953770B (en) Route forwarding method and device, route equipment and readable storage medium
CN110704820A (en) Login processing method and device, electronic equipment and computer readable storage medium
CN110909355A (en) Unauthorized vulnerability detection method, system, electronic device and medium
US20130227276A1 (en) Device management apparatus, method for device management, and computer program product
CN114244624A (en) Flow control method and device, equipment and storage medium
CN113162923A (en) User reliability evaluation method and device based on user behaviors and storage medium
CN112929241A (en) Network testing method and device
CN110430070B (en) Service state analysis method, device, server, data analysis equipment and medium
CN113709530A (en) Resource downloading method, system, electronic equipment and storage medium
CN110677307A (en) Service monitoring method, device, equipment and storage medium
CN117251837A (en) System access method and device, electronic equipment and storage medium
CN113709251A (en) Service request processing system, method and device
CN114465919B (en) Network service testing method, system, electronic equipment and storage medium
CN108390770B (en) Information generation method and device and server
CN111124532A (en) Service loading method and device, electronic equipment and storage medium
CN115051867A (en) Detection method and device for illegal external connection behaviors, electronic equipment and medium
CN111291127B (en) Data synchronization method, device, server 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20211126