CN110460584B - Access request processing method and device, electronic equipment and computer readable medium - Google Patents

Access request processing method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN110460584B
CN110460584B CN201910642535.1A CN201910642535A CN110460584B CN 110460584 B CN110460584 B CN 110460584B CN 201910642535 A CN201910642535 A CN 201910642535A CN 110460584 B CN110460584 B CN 110460584B
Authority
CN
China
Prior art keywords
access
access request
server
rate per
query rate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910642535.1A
Other languages
Chinese (zh)
Other versions
CN110460584A (en
Inventor
王平
段光磊
赫振军
周正
张大虎
王杨
徐婷
柯登科
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910642535.1A priority Critical patent/CN110460584B/en
Publication of CN110460584A publication Critical patent/CN110460584A/en
Application granted granted Critical
Publication of CN110460584B publication Critical patent/CN110460584B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • 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/562Brokering proxy services
    • 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

Abstract

The embodiment of the application discloses an access request processing method, an access request processing device, electronic equipment and a computer readable medium. An embodiment of the method comprises: receiving an access request of an application server to a target third-party server, wherein the application server is a server for supporting micro-service; determining whether the access request contains identification information used for indicating the source of the access request, wherein the identification information comprises an access parameter; if so, checking the access parameters; in response to determining that the access parameter passes the verification, forwarding the access request to the target third-party server. The method and the device can monitor the access request, and efficiency of locating the source of the access request is improved.

Description

Access request processing method and device, electronic equipment and computer readable medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to an access request processing method, an access request processing device, electronic equipment and a computer readable medium.
Background
With the development of computer technology, more and more Applications (APPs) adopt a micro-service architecture. Under the microservice architecture, an application may be viewed as being composed of one or more microservices. Each microservice may be deployed independently and run in a separate process.
In the existing manner, for each microservice of an application, when a third-party service needs to be invoked, an access request is sent directly to the third-party server, typically through the application server providing support for the microservice. However, this approach cannot monitor the access requests of each microservice, and thus, when the source of a certain access request needs to be searched, the source cannot be located quickly.
Disclosure of Invention
The embodiment of the application provides an access request processing method and device, electronic equipment and a computer readable medium, so as to solve the technical problem that in the prior art, the positioning efficiency of the source of an access request is low because the access request of each micro service cannot be monitored.
In a first aspect, an embodiment of the present application provides an access request processing method, which is applied to a target server, where the target server provides a gateway service, and the gateway service is used to manage an access request to a third-party server, and the method includes: receiving an access request of an application server to a target third-party server, wherein the application server is a server for supporting micro-service; determining whether the access request contains identification information indicating the source of the access request, wherein the identification information comprises an access parameter; if so, checking the access parameters; in response to determining that the access parameter passes the verification, forwarding the access request to the target third-party server.
In some embodiments, the access parameter comprises a target query rate per second; and verifying the access parameter, including: acquiring the current query rate per second of the application server; determining whether the target query rate per second is less than or equal to the current query rate per second; if so, determining that the access parameter passes the verification; if not, determining that the access parameter is not verified.
In some embodiments, obtaining the current query rate per second for the application server comprises: inquiring the current query rate per second of the application server from the cache database; the current query rate per second of the application server is stored in a cache database through the following steps: creating an access log corresponding to the access request, and recording the name to the access log; sending the access logs corresponding to the received access requests to the message middleware in real time; processing the access log in the message middleware in real time, and counting the current query rate per second of the application server in real time based on the name; and storing the current query rate per second of the application server to a cache database in real time.
In some embodiments, after determining that the access parameter fails the check, the method further comprises: and updating the target query rate per second to the current query rate per second, and forwarding the updated access request to the target third-party server.
In a second aspect, an embodiment of the present application provides an access request processing apparatus, which is applied to a server, where the server provides a gateway service, and the gateway service is used to manage an access request to a third-party server, and the apparatus includes: the receiving unit is configured to receive an access request of an application server to a target third-party server, wherein the application server is a server for supporting micro-services; a determining unit configured to determine whether the access request includes identification information indicating a source of the access request, wherein the identification information includes an access parameter; the checking unit is configured as a unit and is configured to check the access parameter if the access parameter is the access parameter; a first forwarding unit configured to forward the access request to the target third-party server in response to determining that the access parameter is verified.
In some embodiments, the access parameter comprises a target query rate per second; and a verification unit further configured to: acquiring the current query rate per second of the application server; determining whether the target query rate per second is less than or equal to the current query rate per second; if so, determining that the access parameter passes the verification; if not, determining that the access parameter is not verified.
In some embodiments, the verification unit is further configured to: inquiring the current query rate per second of the application server from the cache database; the current query rate per second of the application server is stored in a cache database through the following steps: creating an access log corresponding to the access request, and recording the name to the access log; sending the access logs corresponding to the received access requests to the message middleware in real time; processing the access log in the message middleware in real time, and counting the current query rate per second of the application server in real time based on the name; and storing the current query rate per second of the application server to a cache database in real time.
In some embodiments, the apparatus further comprises: and the second forwarding unit is configured to update the target query rate per second to the current query rate per second, and forward the updated access request to the target third-party server.
In a third aspect, an embodiment of the present application provides a server, including: one or more processors; storage means having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement a method as in any one of the embodiments of the first aspect described above.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, which when executed by a processor implements the method according to any one of the embodiments of the first aspect.
According to the access request processing method, the access request processing device, the electronic equipment and the computer readable medium, the access request for the target third-party server, which is sent by the application server for providing support for the micro service, is received, then after the fact that the access request contains identification information indicating the source of the access request is determined, the access parameter in the identification information is verified, and finally, when the fact that the access parameter passes the verification is determined, the access request is forwarded to the target third-party server. Thereby, the access request can be monitored by the server providing the gateway service. Since the source of each access request is known in the process, when the source of a certain access request needs to be searched, the source can be quickly and accurately located.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flow diagram for one embodiment of a method of access request processing according to the present application;
FIG. 3 is a flow diagram of yet another embodiment of an access request processing method according to the present application;
FIG. 4 is a schematic block diagram illustrating one embodiment of an access request processing apparatus according to the present application;
FIG. 5 is a block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which the access request processing method or the access request processing apparatus of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include application servers 101, 102, 103, a server 104 providing gateway services, and third party servers 105, 106, 107. The application servers 101, 102, 103 and the server 104 may be communicatively connected via a network. The server 104, third party servers 105, 106, 107 may also be communicatively connected via a network. Various connection types may be included, such as wired, wireless communication links, or fiber optic cables, to name a few.
The application servers 101, 102, 103 may be used to support different microservices, respectively. The micro-services may be divided by service, and different application servers may be used to provide support for different micro-services. For example, for a certain audio-video application, it may relate to a recommendation service, a tv play service, a movie service, etc. The application server 101 may provide support for recommendation services, the application server 102 may provide support for television show services, the application server 103 may provide support for movie services, and so on.
The server 104 may provide a gateway service that may be used to manage access requests to third party servers. Server 104 may perform parsing, checking, forwarding, etc., operations on the access request.
Servers 105, 106, 107 may each be a server providing a different third party server. For example, the server 105 may be a server providing a payment service, the server 106 may be a server providing a video sharing service, and the like, and the server 107 may be a server providing a search service, and the like.
The application servers 101, 102, and 103, the server 104 providing the gateway service, and the third- party servers 105, 106, and 107 may be hardware or software. For a certain server, when the server is hardware, the server may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the giant server is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the access request processing method provided in the embodiment of the present application is generally executed by the server 104, and accordingly, the access request processing apparatus is generally disposed in the server 104.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of application servers, servers providing gateway services, and third party servers, as desired for implementation.
Referring to fig. 2, a flow 200 of one embodiment of an access request processing method according to the present application is shown. The access request processing method comprises the following steps:
step 201, receiving an access request of an application server to a target third-party server.
In this embodiment, an executing subject (e.g., the server 104 shown in fig. 1) of the access request processing method may first receive an access request of an application server (e.g., any one of the application servers 101, 102, 103 shown in fig. 1) to a target third-party server (e.g., any one of the third- party servers 105, 106, 107 shown in fig. 1).
Step 202, it is determined whether the access request includes identification information indicating a source of the access request, wherein the identification information includes the access parameter.
In this embodiment, the execution principal may determine whether the access request includes identification information (e.g., token) indicating a source of the access request. In practice, the identification information may include a plurality of contents, such as an access parameter, an IP (Internet Protocol) address of the application server, a timestamp (for characterizing the transmission time of the above access request), and the like. Wherein the access parameter may be used to indicate the access requirement for the target third-party server. For example, the total number of queries, the IP address of the target third party server, etc. may be included.
In some optional implementations of this embodiment, the access parameter may include a target query rate per second required to be achieved when accessing the target third-party server. In practice, Query Per Second (QPS) is a measure of how much traffic a particular query server processes within a specified time. It should be noted that the target query rate per second may be a query rate per second required by the query server when accessing the target third-party server, and a specific value of the target query rate per second may be preset as required.
In some optional implementation manners of this embodiment, since the application server is configured to support the micro service, the identification information may further include a name of the micro service and information of a person in charge of the micro service. At this time, optionally, the identification information may be generated by the following steps:
firstly, the name of the micro server, the information of the responsible person of the micro service and the access parameters are spliced. For example, the three may be connected by underlining (or other symbols) into a string.
Then, the character string is subjected to URL (Uniform Resource Locator) encoding. In practice, the string may be input to a function (e.g., a URL code function) for URL encoding to obtain a URL encoding of the string.
Finally, the URL code may be determined as the identification information of the access request.
In some optional implementation manners of this embodiment, the execution main body may further create an access log corresponding to the access request, record the access request, the internet protocol address of the application server, the sending time of the access request, the target query rate per second, the name of the micro service, and the information of the responsible person in the access log, and then store the access log so as to query the access information of the application server.
In some optional implementations of this embodiment, the execution subject may further be communicatively connected to a search server (for example, a server deployed with an elastic search). At this time, the execution agent may transmit an access log corresponding to each received access request to the search server. Therefore, subsequent problem positioning and query can be facilitated.
In some optional implementations of this embodiment, in response to determining that the identification information is not included, the execution subject may return, to the application server, prompt information indicating that access to the third-party server is denied.
And step 203, if so, checking the access parameters.
In this embodiment, in response to determining that the access request includes identification information (e.g., token), the execution subject may check the access parameter in the representation information. Here, the access parameter may be checked based on the content in the above-described access parameter. For example, when the access parameter includes the IP address of the target third-party server, the IP address may be checked to determine whether the IP address is a valid IP address.
In some optional implementation manners of this embodiment, in a case that the access parameter may include a target query rate per second that needs to be achieved when the target third-party server is accessed, the target query rate per second may be checked to determine whether the access requirement of the application server exceeds a traffic limit of the query of the application server. Since query rate per second is a measure of how much traffic a particular query server is handling within a specified time. Therefore, the current limitation of the query operation of the application server can be realized, and the stability of the whole system is ensured.
And step 204, responding to the fact that the access parameter is verified, and forwarding the access request to the target third-party server.
In this embodiment, in response to determining that the access parameter passes the verification, the execution subject may forward the access request to the target third-party server. Thus, the application server can call the service provided by the target third-party server.
In the method provided by the above embodiment of the present application, an access request to a target third-party server, which is sent by an application server for providing support for a micro service, is received, then after it is determined that the access request includes identification information indicating a source of the access request, an access parameter in the identification information is verified, and finally, after it is determined that the access parameter passes the verification, the access request is forwarded to the target third-party server. Thereby, the access request can be monitored by the server providing the gateway service. Since the source of each access request is known in the process, when the source of a certain access request needs to be searched, the source can be quickly and accurately located.
With further reference to fig. 3, a flow 300 of yet another embodiment of an access request processing method is shown. The flow 300 of the access request processing method includes the following steps:
step 301, receiving an access request of an application server to a target third party server.
Step 301 of this embodiment can refer to step 101 of the embodiment shown in fig. 1, and is not described herein again.
At step 302, it is determined whether the access request includes identification information indicating the source of the access request.
In this embodiment, the identification information may include a name of the micro service, information of a person in charge of the micro service, an access parameter, an internet protocol address of the application server, a transmission time of the access request, and the like.
The access parameter may include a target query rate per second that needs to be achieved when accessing the target third-party server.
In this embodiment, the execution subject may further be connected to a search server (for example, a server deployed with an elastic search) in a communication manner. In this case, the execution agent may transmit an access log corresponding to each received access request to the search server. Therefore, subsequent problem positioning and query can be facilitated.
Step 303, in response to determining that the identification information is not included, returning prompt information indicating denial of access to the third party server to the application server.
In response to determining that the identification information is included, a current query rate per second of the application server is obtained, step 304.
In this embodiment, the query rate per second for each application server that respectively provides support for different microservices may be stored in real time. The execution subject may query and obtain a current query rate per second of the application server.
In some optional implementations of the present embodiment, the query rate per second of each application server may be stored in a cache server (e.g., redis) in real time. The execution subject may query the current query rate per second of any application server from the cache database.
Wherein, for the application server sending the access request, the current query rate per second of the application server is stored in the cache database in the following way:
first, an access log corresponding to the access request is created, and the name of the micro-service is recorded in the access log. Thus, the access log can be queried by the name of the microservice.
It should be noted that other information may also be stored in the access log, and for example, the information may include, but is not limited to, an IP address of the application server, a sending time of the access request, a target query rate per second, and information of a person in charge of the microserver. Here, various information may be stored in the access log as needed, and is not limited herein.
Then, an access log corresponding to each received access request is sent to the message middleware (e.g., kafka) in real time. The middleware can be separately deployed in an independent server.
And then, processing the access log in the message middleware in real time, and counting the current query rate per second of the application server in real time based on the name of the micro service. In practice, real-time processing of the access logs by a streaming processing engine (e.g., flink) may be adopted, and the access logs may be aggregated by name of the micro-service through an aggregation function provided by the streaming processing engine (e.g., flink). Thus, the number of accesses of the microservice supported by the application server over a certain period of time can be calculated. And dividing the access times by the time length of the time period to obtain the current query rate per second of the application server.
The current query per second rate for the application server may then be stored to a cache database in real time.
It should be noted that the current query rate per second of each application server can be executed according to the above steps. The execution subject may query the cache database for the current query rate per second of each application server.
Step 305 determines whether the target query per second rate is less than or equal to the current query per second rate.
In this embodiment, in response to determining that the target query rate per second is less than or equal to the current query rate per second, the following steps 306-307 may be performed. In response to determining that the target query rate per second is greater than the current query rate per second, the following steps 308-309 may be performed.
In response to determining that the target query rate per second is less than or equal to the current query rate per second, it is determined that the access parameter passes the verification, step 306.
It should be noted that, when the target query rate per second is less than or equal to the current query rate per second, it means that the number of queries required by the application server per unit time is less than the number of queries of the application server per unit time. Since the application server may access other services (e.g., any third party service) at the current query per second rate, the target third party service may be accessed using a target query per second rate that is less than the current query per second rate, as a matter of course. At this point, it may be determined that the access parameter passed the check.
Step 307, the access request is forwarded to the target third party server.
In this embodiment, in response to determining that the access parameter passes the verification, the execution subject may forward the access request to the target third-party server. Thus, the application server can call the service provided by the target third-party server.
In response to determining that the target query rate per second is greater than the current query rate per second, it is determined that the access parameter has not passed the verification, step 308.
Step 309, updating the target query rate per second to the current query rate per second, and forwarding the updated access request to the target third-party server.
In this embodiment, in response to determining that the access parameter fails to be verified, the execution subject may update the target query rate per second to the current query rate per second, and forward the updated access request to the target third-party server. For example, if the target query rate per second is 100 times/second and the current query rate per second is 60 times/second, then access may be denied to queries exceeding the current query rate per second, so that the application server accesses the target third party server at the query rate per second of 60 times/second.
As can be seen from fig. 3, compared with the corresponding embodiment of fig. 1, the flow 300 of the access request processing method in this embodiment involves a step of checking the target query rate per second. Because the query rate per second is a measure of how much traffic a particular query server processes within a specified time, the scheme described in this embodiment can implement throttling of access requests to ensure the stability of the overall system.
With further reference to fig. 4, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an access request processing apparatus, which corresponds to the embodiment of the method shown in fig. 1, and which is specifically applicable in a server. The server may provide a gateway service. The gateway service may be a service for managing access requests to third party servers.
As shown in fig. 4, the access request processing apparatus 400 according to this embodiment includes: the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is configured to receive an access request of an application server to a target third-party server, and the application server is a server for supporting micro-service; a determining unit configured to determine whether the access request includes identification information indicating a source of the access request, wherein the identification information includes an access parameter; the checking unit is configured as a unit and is configured to check the access parameter if the access parameter is the access parameter; a first forwarding unit configured to forward the access request to the target third-party server in response to determining that the access parameter passes the verification.
In some optional implementations of this embodiment, the access parameter includes a target query rate per second; and the verification unit, further configured to: acquiring the current query rate per second of the application server; determining whether the target query rate per second is less than or equal to the current query rate per second; if so, determining that the access parameter passes the verification; if not, determining that the access parameter is not verified.
In some optional implementations of this embodiment, the check unit is further configured to: inquiring the current query rate per second of the application server from a cache database; the current query rate per second of the application server is stored in the cache database through the following steps: creating an access log corresponding to the access request, and recording the name to the access log; sending the access logs corresponding to the received access requests to the message middleware in real time; processing the access log in the message middleware in real time, and counting the current query rate per second of the application server in real time based on the name; and storing the current query rate per second of the application server to a cache database.
In some optional implementations of this embodiment, the apparatus further includes: and the second forwarding unit is configured to update the target query rate per second to the current query rate per second, and forward the updated access request to the target third-party server.
The apparatus provided in the foregoing embodiment of the present application receives an access request to a target third-party server, where the access request is sent by an application server for providing support for a micro service, verifies an access parameter in identification information after determining that the access request includes identification information indicating a source of the access request, and finally forwards the access request to the target third-party server after determining that the access parameter passes verification. Thereby, the access request can be monitored by the server providing the gateway service. Since the source of each access request is known in the process, when the source of a certain access request needs to be searched, the source can be quickly and accurately located.
Referring now to FIG. 5, a block diagram of a computer system 500 suitable for use in implementing a server according to embodiments of the present application is shown. The server shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Liquid Crystal Display (LCD) and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the method of the present application when executed by the Central Processing Unit (CPU) 501. It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The units described may also be provided in a processor, where the names of the units do not in some cases constitute a limitation of the units themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: receiving an access request of an application server to a target third-party server, wherein the application server is a server for supporting micro-service; determining whether the access request contains identification information used for indicating the source of the access request, wherein the identification information comprises an access parameter; if so, checking the access parameters; in response to determining that the access parameter passes the verification, forwarding the access request to the target third-party server.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (8)

1. An access request processing method applied to a server, wherein the server provides a gateway service for managing an access request to a third-party server, the method comprising:
receiving an access request of an application server to a target third-party server, wherein the application server is a server for supporting micro-services corresponding to the same service type;
determining whether the access request contains identification information for indicating the source of the access request, wherein the identification information comprises an access parameter; the access parameter comprises a target query rate per second required for accessing the third-party server;
if so, checking the access parameter;
forwarding the access request to the target third-party server in response to determining that the access parameter passes the verification;
and when the access parameters are not verified, updating the target query rate per second to the current query rate per second, and forwarding the updated access request to the target third-party server.
2. The method according to claim 1, wherein the checking the access parameter comprises:
acquiring the current query rate per second of the application server;
determining whether the target query rate per second is less than or equal to the current query rate per second;
if so, determining that the access parameter passes the verification;
if not, determining that the access parameter is not verified.
3. The access request processing method according to claim 2, wherein the identification information further includes a name of the micro service; and
the obtaining of the current query rate per second of the application server includes:
querying a current query rate per second of the application server from a cache database;
the current query rate per second of the application server is stored in the cache database by the following steps:
creating an access log corresponding to the access request, and recording the name to the access log;
sending the access logs corresponding to the received access requests to the message middleware in real time;
processing the access log in the message middleware in real time, and counting the current query rate per second of the application server in real time based on the name;
and storing the current query rate per second of the application server to a cache database in real time.
4. An access request processing apparatus applied to a server that provides a gateway service for managing an access request to a third-party server, the apparatus comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is configured to receive an access request of an application server to a target third-party server corresponding to the same service type, and the application server is a server for supporting micro-service;
a determining unit configured to determine whether the access request contains identification information indicating a source of the access request, wherein the identification information includes an access parameter, and the access parameter includes a target query rate per second required for accessing the third-party server;
a checking unit configured to check the access parameter if yes; the access parameter comprises a target query rate per second required for accessing the third-party server;
a first forwarding unit configured to forward the access request to the target third-party server in response to determining that the access parameter passes the verification;
a second forwarding unit configured to update the target query rate per second to a current query rate per second in response to determining that the access parameter fails the verification, forward the updated access request to the target third-party server;
each application server provides support for micro-services corresponding to the same service type in the application program.
5. The access request processing apparatus according to claim 4, wherein the access parameter comprises a target query rate per second; and
the verification unit, further configured to:
acquiring the current query rate per second of the application server;
determining whether the target query rate per second is less than or equal to the current query rate per second;
if so, determining that the access parameter passes the verification;
if not, determining that the access parameter is not verified.
6. The access request processing apparatus according to claim 5, wherein the checking unit is further configured to:
querying a current query rate per second of the application server from a cache database;
the current query rate per second of the application server is stored in the cache database by the following steps:
creating an access log corresponding to the access request, and recording the name of the micro service to the access log;
sending the access logs corresponding to the received access requests to the message middleware in real time;
processing the access log in the message middleware in real time through a streaming processing engine, and counting the current query rate per second of the application server in real time;
and storing the current query rate per second of the application server to a cache database in real time.
7. A server, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-3.
8. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-3.
CN201910642535.1A 2019-07-16 2019-07-16 Access request processing method and device, electronic equipment and computer readable medium Active CN110460584B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910642535.1A CN110460584B (en) 2019-07-16 2019-07-16 Access request processing method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910642535.1A CN110460584B (en) 2019-07-16 2019-07-16 Access request processing method and device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN110460584A CN110460584A (en) 2019-11-15
CN110460584B true CN110460584B (en) 2022-02-01

Family

ID=68481260

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910642535.1A Active CN110460584B (en) 2019-07-16 2019-07-16 Access request processing method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN110460584B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198804B (en) * 2019-12-30 2023-09-05 中电工业互联网有限公司 Gateway-based industrial Internet platform third-party micro-service monitoring and early warning method
CN111274150B (en) * 2020-02-07 2023-08-22 北京字节跳动网络技术有限公司 Service instance access method and device and electronic equipment
CN113377605A (en) * 2021-02-10 2021-09-10 北京声智科技有限公司 Access monitoring method, device, server and computer readable storage medium
CN116863127A (en) * 2022-03-28 2023-10-10 华为技术有限公司 Method for acquiring region of interest and related equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108234653A (en) * 2018-01-03 2018-06-29 马上消费金融股份有限公司 A kind of method and device of processing business request
CN108429760A (en) * 2018-03-28 2018-08-21 江苏满运软件科技有限公司 User based on the service of gateway limit asks tracking
CN108847989A (en) * 2018-06-29 2018-11-20 杭州安恒信息技术股份有限公司 Log processing method, business service system and electronic equipment based on micro services framework
CN108989356A (en) * 2018-09-10 2018-12-11 四川长虹电器股份有限公司 A kind of method that API gateway realizes protocol conversion
CN109639754A (en) * 2018-10-29 2019-04-16 南京南瑞继保电气有限公司 A kind of implementation method of dispatching of power netwoks gateway Data Audit
CN109756448A (en) * 2017-11-02 2019-05-14 广东亿迅科技有限公司 API gateway method for managing security and its system based on micro services
CN109831504A (en) * 2019-01-31 2019-05-31 泰康保险集团股份有限公司 Micro services request processing method, device and equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107426302B (en) * 2017-06-26 2020-06-05 腾讯科技(深圳)有限公司 Access scheduling method, device, system, terminal, server and storage medium
CN108427581A (en) * 2018-02-07 2018-08-21 平安普惠企业管理有限公司 System micro services method and terminal device
CN109857755B (en) * 2019-01-08 2021-04-16 中国联合网络通信集团有限公司 Rule checking method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109756448A (en) * 2017-11-02 2019-05-14 广东亿迅科技有限公司 API gateway method for managing security and its system based on micro services
CN108234653A (en) * 2018-01-03 2018-06-29 马上消费金融股份有限公司 A kind of method and device of processing business request
CN108429760A (en) * 2018-03-28 2018-08-21 江苏满运软件科技有限公司 User based on the service of gateway limit asks tracking
CN108847989A (en) * 2018-06-29 2018-11-20 杭州安恒信息技术股份有限公司 Log processing method, business service system and electronic equipment based on micro services framework
CN108989356A (en) * 2018-09-10 2018-12-11 四川长虹电器股份有限公司 A kind of method that API gateway realizes protocol conversion
CN109639754A (en) * 2018-10-29 2019-04-16 南京南瑞继保电气有限公司 A kind of implementation method of dispatching of power netwoks gateway Data Audit
CN109831504A (en) * 2019-01-31 2019-05-31 泰康保险集团股份有限公司 Micro services request processing method, device and equipment

Also Published As

Publication number Publication date
CN110460584A (en) 2019-11-15

Similar Documents

Publication Publication Date Title
CN110460584B (en) Access request processing method and device, electronic equipment and computer readable medium
CN108282529B (en) System, method and device for publishing and subscribing data
CN109189857B (en) Data sharing system, method and device based on block chain
KR20200092249A (en) Method, apparatus and system for slicing live streaming
CN112613010A (en) Authentication service method, device, server and authentication service system
CN110377440B (en) Information processing method and device
US11800201B2 (en) Method and apparatus for outputting information
US8959229B1 (en) Intelligently provisioning cloud information services
CN108900562B (en) Login state sharing method and device, electronic equipment and medium
CN111930709A (en) Data storage method and device, electronic equipment and computer readable medium
CN111556080A (en) Network node monitoring method, device, medium and electronic equipment
CN107315672B (en) Method and device for monitoring server
CN110866031B (en) Database access path optimization method and device, computing equipment and medium
CN114465919B (en) Network service testing method, system, electronic equipment and storage medium
CN109348298B (en) Method and equipment for pushing and playing multimedia data stream
CN109542743B (en) Log checking method and device, electronic equipment and computer readable storage medium
CN110110032B (en) Method and device for updating index file
CN108933802B (en) Method and apparatus for monitoring operation
CN115858905A (en) Data processing method and device, electronic equipment and storage medium
CN112084114A (en) Method and apparatus for testing an interface
CN113132447A (en) Reverse proxy method and system
CN111949472A (en) Method and device for recording application logs
CN109660874B (en) Method and apparatus for generating information
CN110351222B (en) Data security processing method, device and system
CN111460273B (en) Information pushing method and device

Legal Events

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